hispidence
5280feb812
Update SetScriptErrorMode call.
2021-08-21 00:15:56 +01:00
hispidence
1621a00b3a
Rename SetErrorMode to SetScriptErrorMode to avoid VS getting confused by some MS function with the same name. Add GetScriptErrorMode.
2021-08-21 00:13:44 +01:00
hispidence
bd6d2a998c
Remove obsolete class.
2021-08-20 03:01:32 +01:00
hispidence
b5483512f2
Remove comments; these are technically no longer unused as they're linked up with Lua variables.
2021-08-20 02:43:56 +01:00
hispidence
ad7c6fddd1
Fixed some GameFlowScript.cpp warnings:
...
Remove SkyVelocity1 and SkyVelocity2 - they weren't being used.
Change a loop var to a size_t.
Make GameScriptInventoryObject.yOffset a short.
2021-08-20 02:42:47 +01:00
hispidence
6170ae72e8
Add newindex error to SoundSourceInfo.
2021-08-20 01:51:51 +01:00
hispidence
9fbf00cce5
Fix some documentation.
2021-08-20 01:51:16 +01:00
hispidence
7af11a9bf4
Add unlimitedAir documentation comment.
2021-08-20 01:48:06 +01:00
hispidence
12d896776a
Give newindex errors to script classes which already have index errors.
2021-08-20 01:41:14 +01:00
hispidence
e74fa376d1
Move index_error_maker into new file (ScriptUtil.h). Add newindex_error_maker. Make them call ScriptAssert instead of just throwing an exception so it won't terminate the application on WARN or SILENT error modes.
2021-08-20 01:37:49 +01:00
hispidence
6df0bb5252
Remove some unused includes.
2021-08-17 14:23:47 +01:00
hispidence
3329523091
Make some getters const.
2021-08-17 13:37:08 +01:00
hispidence
906d583e7f
Add documentation for SetGameFarView, Level.FarView, and Level.UVRotate, as well as some value checking.
2021-08-17 13:36:34 +01:00
hispidence
8cba52f026
Fix assert error message.
2021-08-17 00:30:21 +01:00
hispidence
9271172129
Fail assert if string is not found.
2021-08-16 12:52:45 +01:00
hispidence
e5d12a56f2
Document errorMode. Make it an enum on the Lua side rather than a string.
2021-08-16 12:52:06 +01:00
hispidence
b574a9b899
Make window title a strings.lua string instead.
2021-08-15 23:23:33 +01:00
hispidence
e49450d6b6
Make AudioTrack documentation stub.
2021-08-15 23:07:22 +01:00
hispidence
99e056b3c7
Add documentation comments in GameFlowScript.cpp.
...
Move windowTitle from GameScriptSettings to GameFlowScript and rename it to SetWindowTitleKey.
2021-08-15 23:04:56 +01:00
hispidence
e7166b05ba
Fix some documentation.
2021-08-12 22:11:50 +01:00
hispidence
62948dddb0
Fix some GameLogic documentation.
2021-08-12 20:14:40 +01:00
hispidence
3b2775203b
Remove GetLara as the Lara object is easier to use.
...
Add documentation for the Lara object.
2021-08-12 20:14:02 +01:00
hispidence
ece2dd9c38
Actually add documentation.
2021-08-12 19:58:22 +01:00
hispidence
cc5072dc64
Take CalculateDistance and CalculateHorizontalDistance out of header file as they can be static now.
...
Add documentation for said functions.
2021-08-12 19:57:17 +01:00
hispidence
0d3de8127c
Register CalculateDistance and CalculateHorizontalDistance in GameLogicScript.
2021-08-12 19:54:03 +01:00
hispidence
8b7815c8a0
Make OnControlPhase take a float, representing the delta time.
...
This is not ACTUALLY the amount of time that has passed, since things in the gameplay loop appear to assume they are being called thirty times per second, even if more or less time has passed. Thus to keep the scripts in sync with the the rest of the engine, we force a 1/30 second delta time.
2021-08-12 18:20:14 +01:00
hispidence
b480ea23f7
Amend doc comment.
2021-08-12 17:20:09 +01:00
hispidence
801f47704f
Fix documentation; Level -> LevelVars.
2021-08-12 02:43:59 +01:00
hispidence
634ab107ad
Make "loop" arg to PlayAudioTrack optional; defaulting to false.
2021-08-12 02:39:29 +01:00
hispidence
c29af38f39
Add comments and update documentation for InventoryAdd/InventoryRemove.
2021-08-12 02:38:30 +01:00
hispidence
f4fb3786c9
Rename Lua tables Game and Level to GameVars and LevelVars to disambiguate the latter from the Level class.
2021-08-12 00:39:52 +01:00
hispidence
bf13661da6
Remove GameScriptLevel members which look superfluous. Mark some others as unused (for now).
2021-08-11 14:51:21 +01:00
hispidence
3a3afcaf38
Update Level documentation.
2021-08-11 14:50:10 +01:00
hispidence
855f67e1b9
Add default member initialisers and default constructor for GameScriptRotation.
...
These aren't intended (at the moment) to be exposed to the script writer; it's needed so that classes with a GameScriptRotation member can have a default member initialiser.
2021-08-11 14:39:26 +01:00
hispidence
978e61108c
Add default member initialisers, SetSlot function, and default constructor for GameScriptInventoryObject.
...
Expose default constructor to Lua API. Use SetSlot as a sol::property instead of accessing the member directly.
Update documentation.
2021-08-11 14:38:24 +01:00
hispidence
b24d6e8841
Update GameFlowScript to account for the changes made to GameScriptInventoryObject.
...
Add FROM_DEGREES calls to fix the "rot" property.
2021-08-11 01:28:37 +01:00
hispidence
8de08be1de
Register GameScriptRotation in GameFlowScript and not GameLogicScript.
2021-08-11 01:26:35 +01:00
hispidence
6f382a08e9
Refactor and add documenation for GameScriptInventoryObject.
2021-08-11 01:23:07 +01:00
hispidence
bd0a681fb0
Fix wrong name in ItemInfo documentation.
2021-08-11 01:21:11 +01:00
hispidence
1f6ca859b6
Rename some of GameScriptLevel's Lua "members" to better reflect their purpose.
...
Add documentation that was missing.
2021-08-09 20:02:55 +01:00
hispidence
ea08939509
Fix clusterfuck of a sentence.
2021-08-09 20:01:39 +01:00
hispidence
6257cf49b7
Give InventoryObject some documentation. Rename "name" to "nameKey".
2021-08-09 20:01:05 +01:00
hispidence
9ce4157d54
More cleanup.
2021-08-09 00:54:09 +01:00
hispidence
4eba60c941
Clean GameScriptInventoryObject a bit.
2021-08-09 00:22:58 +01:00
hispidence
b9806c25a1
Add some initial documentation for GameScriptMirror.
2021-08-09 00:07:53 +01:00
hispidence
72cd78ace7
Remove ResetHub; as it's almost certainly going to be made obsolete with the new scripts and save game rework.
2021-08-09 00:07:08 +01:00
hispidence
d3742cb87e
Change InventoryAdd/Remove/GetCount/SetCount and GameScriptInventoryObject to use ItemEnumPair.
2021-08-09 00:01:40 +01:00
hispidence
5458e7a67e
Make the read-only table of kInventorySlots in GameFlowScript instead of GameLogicScript.
2021-08-08 23:53:52 +01:00
hispidence
d386d55546
Modify InvItem table to map to both GAME_OBJECT_ID and inv_objects. We can't use a std::pair directly since sol::as_table will interpret the unordered_map weirdly if we do.
2021-08-08 23:52:38 +01:00
hispidence
9fbb3cc7b7
Improve GameScriptLevel.
...
Rename LARA_DRAW_TYPE to LARA_TYPE as it's used in more than just drawing code. Make WEATHER_TYPE a scoped enum (would have done this for LARA_TYPE too but didn't want to pepper casts in other parts of the codebase). Relabel constants in both enums.
Add kLaraTypes and kWeatherTypes and add them as tables in GameFlow.
Remove Background member - it's not level-specific so GameFlow is a better home for it.
Add (incomplete for now) documentation for some GameScriptLevel members - those I tested, at any rate.
2021-08-07 19:20:17 +01:00