Add initial documentation comments for GameScriptPosition and GameScriptRotation.

This commit is contained in:
hispidence 2021-07-17 23:51:01 +01:00
parent d08585a9e0
commit c6d680fa07
2 changed files with 47 additions and 3 deletions

View file

@ -2,6 +2,11 @@
#include "framework.h" #include "framework.h"
/***
Represents a position in the game world.
@classmod Position
@pragma nostrip
*/
namespace sol { namespace sol {
class state; class state;
} }
@ -9,10 +14,25 @@ struct PHD_3DPOS;
class GameScriptPosition { class GameScriptPosition {
public: public:
/// (int) x coordinate
//@mem X
/// (int) y coordinate
//@mem Y
/// (int) z coordinate
//@mem Z
int x; int x;
int y; int y;
int z; int z;
/***
@int X x coordinate
@int Y y coordinate
@int Z z coordinate
@return A Position object.
@function Position.new
*/
GameScriptPosition(int x, int y, int z); GameScriptPosition(int x, int y, int z);
GameScriptPosition(PHD_3DPOS const& pos); GameScriptPosition(PHD_3DPOS const& pos);
void StoreInPHDPos(PHD_3DPOS& pos) const; void StoreInPHDPos(PHD_3DPOS& pos) const;

View file

@ -2,6 +2,13 @@
#include "framework.h" #include "framework.h"
/***
Represents a rotation as a combination of individual
angles, in degrees, about each axis.
All values will be clamped to [-32768, 32767].
@classmod Rotation
@pragma nostrip
*/
namespace sol { namespace sol {
class state; class state;
} }
@ -9,9 +16,26 @@ struct PHD_3DPOS;
class GameScriptRotation { class GameScriptRotation {
public: public:
int x; /// (int) rotation about x axis
int y; //@mem X
int z;
/// (int) rotation about y axis
//@mem Y
/// (int) rotation about z axis
//@mem Z
short x;
short y;
short z;
/***
@int X rotation about x axis
@int Y rotation about y axis
@int Z rotation about z axis
@return A Rotation object.
@function Rotation.new
*/
GameScriptRotation(int x, int y, int z); GameScriptRotation(int x, int y, int z);
GameScriptRotation(PHD_3DPOS const& pos); GameScriptRotation(PHD_3DPOS const& pos);