mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 04:26:42 +03:00
Move scripting source files into new filder. Obviously, these won't work yet or even compile.
This commit is contained in:
parent
a9d8b78c96
commit
69de6e4502
24 changed files with 3 additions and 3 deletions
|
@ -1,70 +0,0 @@
|
|||
#include "frameworkandsol.h"
|
||||
#include "GameScriptRotation.h"
|
||||
#include "Specific/phd_global.h"
|
||||
|
||||
/*** Represents a rotation.
|
||||
Rotations are specifed as a combination of individual
|
||||
angles, in degrees, about each axis.
|
||||
All values will be clamped to [-32768, 32767].
|
||||
@miscclass Rotation
|
||||
@pragma nostrip
|
||||
*/
|
||||
|
||||
void GameScriptRotation::Register(sol::state* state)
|
||||
{
|
||||
state->new_usertype<GameScriptRotation>("Rotation",
|
||||
sol::constructors<GameScriptRotation(int, int, int)>(),
|
||||
sol::meta_function::to_string, &GameScriptRotation::ToString,
|
||||
|
||||
/// (int) rotation about x axis
|
||||
//@mem x
|
||||
"x", &GameScriptRotation::x,
|
||||
|
||||
/// (int) rotation about x axis
|
||||
//@mem y
|
||||
"y", &GameScriptRotation::y,
|
||||
|
||||
/// (int) rotation about x axis
|
||||
//@mem z
|
||||
"z", &GameScriptRotation::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::GameScriptRotation(int aX, int aY, int aZ)
|
||||
{
|
||||
x = aX;
|
||||
y = aY;
|
||||
z = aZ;
|
||||
}
|
||||
|
||||
void GameScriptRotation::StoreInPHDPos(PHD_3DPOS& pos) const
|
||||
{
|
||||
pos.xRot = x;
|
||||
pos.yRot = y;
|
||||
pos.zRot = z;
|
||||
}
|
||||
|
||||
GameScriptRotation::GameScriptRotation(PHD_3DPOS const & pos)
|
||||
{
|
||||
x = pos.xRot;
|
||||
y = pos.yRot;
|
||||
z = pos.zRot;
|
||||
}
|
||||
|
||||
/***
|
||||
@tparam Rotation rotation this rotation
|
||||
@treturn string A string showing the x, y, and z values of the rotation
|
||||
@function __tostring
|
||||
*/
|
||||
std::string GameScriptRotation::ToString() const
|
||||
{
|
||||
return "{" + std::to_string(x) + ", " + std::to_string(y) + ", " + std::to_string(z) + "}";
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue