mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-09 20:18:23 +03:00
Move scripting source files into new filder. Obviously, these won't work yet or even compile.
This commit is contained in:
parent
8c82eed3d2
commit
8a31dbf644
20 changed files with 0 additions and 0 deletions
41
Scripting/Source/GameScriptSettings.cpp
Normal file
41
Scripting/Source/GameScriptSettings.cpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include "frameworkandsol.h"
|
||||
#include "GameScriptSettings.h"
|
||||
|
||||
/***
|
||||
Settings that will be run on game startup.
|
||||
@pregameclass Settings
|
||||
@pragma nostrip
|
||||
*/
|
||||
|
||||
void GameScriptSettings::Register(sol::state* lua)
|
||||
{
|
||||
lua->new_usertype<GameScriptSettings>("Settings",
|
||||
"screenWidth", &GameScriptSettings::ScreenWidth,
|
||||
"screenHeight", &GameScriptSettings::ScreenHeight,
|
||||
"enableDynamicShadows", &GameScriptSettings::EnableDynamicShadows,
|
||||
"windowed", &GameScriptSettings::Windowed,
|
||||
"enableWaterCaustics", &GameScriptSettings::EnableWaterCaustics,
|
||||
"drawingDistance", &GameScriptSettings::DrawingDistance,
|
||||
"showRendererSteps", &GameScriptSettings::ShowRendererSteps,
|
||||
"showDebugInfo", &GameScriptSettings::ShowDebugInfo,
|
||||
|
||||
/*** How should the application respond to script errors?
|
||||
Must be one of the following:
|
||||
`ErrorMode.TERMINATE` - print to the log file and terminate the application when any script error is hit.
|
||||
This is the one you will want to go for if you want to know IMMEDIATELY if something has gone wrong.
|
||||
|
||||
`ErrorMode.WARN` - print to the log file and continue running the application when a recoverable script error is hit.
|
||||
Choose this one if terminating the application is too much for you. Note that unrecoverable errors will still terminate
|
||||
the application.
|
||||
|
||||
`ErrorMode.SILENT` - do nothing when a recoverable script error is hit.
|
||||
Think __very__ carefully before using this setting. These error modes are here to help you to keep your scripts
|
||||
working properly, but if you opt to ignore errors, you won't be alerted if you've misused a function or passed
|
||||
an invalid argument.
|
||||
|
||||
As with `ErrorMode.WARN`, unrecoverable errors will still terminate the application.
|
||||
@mem errorMode
|
||||
*/
|
||||
"errorMode", &GameScriptSettings::ErrorMode
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue