mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 12:36:45 +03:00
Move GameScriptLevel, GameScriptAudioTrack, GameScriptInventoryObject, GameScriptSkyLayer, GameScriptSettings and GameScriptMirror into their own files. This could be changed later as this does create many small .h and .cpp files, but for now this cleans things up and makes it easier to check things class by class.
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.
This commit is contained in:
parent
4de85da46a
commit
5562667f98
16 changed files with 387 additions and 3 deletions
27
TR5Main/Scripting/GameScriptLevel.cpp
Normal file
27
TR5Main/Scripting/GameScriptLevel.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include "framework.h"
|
||||
#include "GameScriptLevel.h"
|
||||
|
||||
void GameScriptLevel::Register(sol::state* state)
|
||||
{
|
||||
state->new_usertype<GameScriptLevel>("Level",
|
||||
sol::constructors<GameScriptLevel()>(),
|
||||
"name", &GameScriptLevel::NameStringKey,
|
||||
"script", &GameScriptLevel::ScriptFileName,
|
||||
"fileName", &GameScriptLevel::FileName,
|
||||
"loadScreen", &GameScriptLevel::LoadScreenFileName,
|
||||
"ambientTrack", &GameScriptLevel::AmbientTrack,
|
||||
"layer1", &GameScriptLevel::Layer1,
|
||||
"layer2", &GameScriptLevel::Layer2,
|
||||
"fog", &GameScriptLevel::Fog,
|
||||
"horizon", &GameScriptLevel::Horizon,
|
||||
"colAddHorizon", &GameScriptLevel::ColAddHorizon,
|
||||
"storm", &GameScriptLevel::Storm,
|
||||
"background", &GameScriptLevel::Background,
|
||||
"weather", &GameScriptLevel::Weather,
|
||||
"laraType", &GameScriptLevel::LaraType,
|
||||
"rumble", &GameScriptLevel::Rumble,
|
||||
"resetHub", &GameScriptLevel::ResetHub,
|
||||
"mirror", &GameScriptLevel::Mirror,
|
||||
"objects", &GameScriptLevel::InventoryObjects
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue