mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 00:37:58 +03:00

Treat functions as global that would previously be accessed through the GameFlow table. This does pollute the global environment in Lua a bit, but keeps it consistent with the functions in GameLogicScript, which are all accessed as globals. Add some default member initialisers. Remove WriteDefaults. Rename Intro to IntroImagePath and make it a std::string. Add some documentation for the functions of GameFlowScript. Fix some comments.
23 lines
583 B
C++
23 lines
583 B
C++
#include "framework.h"
|
|
#include "GameScriptMirror.h"
|
|
|
|
void GameScriptMirror::Register(sol::state* lua)
|
|
{
|
|
lua->new_usertype<GameScriptMirror>("Mirror",
|
|
sol::constructors<GameScriptMirror(short, int, int, int, int)>(),
|
|
"room", &GameScriptMirror::Room,
|
|
"startX", &GameScriptMirror::StartX,
|
|
"endX", &GameScriptMirror::EndX,
|
|
"startZ", &GameScriptMirror::StartZ,
|
|
"endZ", &GameScriptMirror::EndZ
|
|
);
|
|
}
|
|
|
|
GameScriptMirror::GameScriptMirror(short room, int startX, int endX, int startZ, int endZ)
|
|
{
|
|
Room = room;
|
|
StartX = startX;
|
|
EndX = endX;
|
|
StartZ = startZ;
|
|
EndZ = endZ;
|
|
}
|