Make GameScriptPosition and GameScriptRotation convertible from PHD_3POS and add a function which puts their position or rotation data into a PHD_3POS. Make their members public since their setters and getters were trivial, aside from some tests which seem to serve no purpose (an int can't be larger than INT_MAX or smaller than INT_MIN).

This commit is contained in:
hispidence 2021-07-03 23:07:21 +01:00
parent 214d45acfa
commit 3adf79879a
4 changed files with 43 additions and 98 deletions

View file

@ -5,21 +5,17 @@
namespace sol {
class state;
}
struct PHD_3DPOS;
class GameScriptPosition {
private:
public:
int x;
int y;
int z;
public:
GameScriptPosition(int x, int y, int z);
GameScriptPosition(PHD_3DPOS const& pos);
static void Register(sol::state*);
int GetX() const;
void SetX(int x);
int GetY() const;
void SetY(int y);
int GetZ() const;
void SetZ(int z);
};
void StoreInPHDPos(PHD_3DPOS& pos) const;
};