Commit graph

323 commits

Author SHA1 Message Date
hispidence
b7354c16f7 Add hopefully-temporary constexpr so that if I have to multiply by a pretend resolution at least it's not via magic numbers. 2021-08-29 21:08:07 +01:00
hispidence
b765ce9be1 Add OnStart, OnEnd and FreeLevelScript calls to DoTitle. 2021-08-27 19:03:23 +01:00
hispidence
7527ac28ca Add calls to SetCallbackDrawString and ProcessDisplayStrings. 2021-08-27 19:02:10 +01:00
hispidence
4f6f3b9adf Remove more vestiges of old trigger system. Replace TO_LUA_SCRIPT with the enum that used to be there - TO_BODYBAG - so that the following enums still have their same values. 2021-08-23 22:05:58 +01:00
hispidence
a1d5deed99 Merge remote-tracking branch 'origin/master' 2021-08-23 02:03:20 +01:00
hispidence
ef9a74d5e0 Clean up GameLogicScript.
Add some new member functions, ResetLevelTables and GetLevelFunc. The former is called in FreeLevelScripts, which is now called in control.cpp.

Remove AddTrigger, as the LevelFuncs table takes care of triggers.
2021-08-23 02:02:47 +01:00
MontyTRC89
327a21489f Refactoring ID_LITTLE_BEETLES 2021-08-22 06:08:02 +02:00
MontyTRC89
2e1ac44c08 Merge branch 'master' of https://github.com/MontyTRC89/TombEngine 2021-08-20 05:26:07 +02:00
MontyTRC89
109b7d6e18 Merge branch 'master' of https://github.com/MontyTRC89/TombEngine; Renamed namespaces;
# Conflicts:
#	TR5Main/TR5Main.vcxproj.user
2021-08-20 05:25:51 +02: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
MontyTRC89
aa706f010c Fixed locusts; First try of namespaces for objects; 2021-08-19 14:17:21 +02:00
hispidence
d1c67f29cc Remove g_AudioTracks reference from a file where it's not used. 2021-08-17 13:15:38 +01:00
asasas9500
b04354e35a Remove hack remains 2021-08-16 18:19:40 -03:00
hispidence
8733903333 Cast this bit too in service of killing warnings. 2021-08-12 22:17:08 +01:00
hispidence
acebbad182 Clean up some warnings. 2021-08-12 22:10:05 +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
Lwmte
5802745c1c Fix some lasersight issues 2021-08-11 15:18:22 +03:00
Lwmte
af38c9cc4e Fix #289 2021-08-11 13:10:22 +03:00
hispidence
873f046533 Fix what seems to be a copy-paste error (sky layer 2 doesn't seem to be implemented right now anyway, but still). 2021-08-07 19:25:55 +01:00
hispidence
e0ffefaf5d Scope TITLE_TYPE usage. 2021-08-07 19:25:13 +01:00
hispidence
d1ca2df0a6 Fix old LARA_DRAW_TYPE usage with LARA_TYPE constants.
These don't need to be scoped, but I originally made it an enum class and plan to end up doing so down the line anyway, and this should save a bit of time there.
2021-08-07 19:24:39 +01:00
Lwmte
5b432b133b Fix git mess 2021-08-06 12:21:16 +03:00
Lwmte
16c36be7de Reorder renderer operations, redo debug output (use F10-F11 to switch pages), add debug sphere/box drawing 2021-08-06 11:12:34 +03:00
Lwmte
bc15f34339 Add support for sphere volumes 2021-08-05 15:46:03 +03:00
Lwmte
6d91e7ddba Don't call nonexistent volume functions 2021-08-05 14:56:09 +03:00
Lwmte
e8b1792d44 Fix controls lockup if level was changed during flyby with disabled controls 2021-08-05 14:26:23 +03:00
hispidence
ead31e63f2 Replace WarningsAsErrors usage with ScriptAssert usage.
For recoverable errors, add some recovery behaviour and logging so a level designer can see in the log what was done as a result of the error.

Warn about default behaviour if no callbacks are added.
2021-08-04 16:51:28 +01:00
hispidence
19c776588f Wrap GameMain in a try-catch that catches TENScriptException. Any unhandled exception should be caught here and logged. 2021-08-03 15:14:24 +01:00
hispidence
6cbf19fe8d Merge branch 'master' of https://github.com/MontyTRC89/TombEngine 2021-08-02 12:49:32 +01:00
hispidence
0da5f86f90 Remove HandleScriptMessage and associated globals - apparently this is no longer supposed to be here. 2021-08-02 12:49:17 +01:00
Lwmte
4da3b6b624 Fix binoculars mode engaging other states 2021-08-02 12:35:17 +03:00
Lwmte
b6e9b30293 Fix poisoning 2021-08-01 23:28:54 +03:00
MontyTRC89
f0698a3c80 Added code (to finish) for executing LUA triggers 2021-07-17 05:56:40 +02:00
MontyTRC89
0caaab8c52 New volume triggers logic 2021-07-16 11:13:57 +02:00
MontyTRC89
3836ed7a26 Fixed volumes and added debug message 2021-07-15 10:56:03 +02:00
MontyTRC89
8294e73199 Merge remote-tracking branch 'origin/lara_info'
# Conflicts:
#	TR5Main/Game/Lara/lara_flare.h
#	TR5Main/Scripting/GameLogicScript.cpp
2021-07-14 05:48:42 +02:00
MontyTRC89
1b60545b4a Merge branch 'master' of https://github.com/MontyTRC89/TR5Main 2021-07-14 05:30:04 +02:00
hispidence
42a11f2118 Call title script if present. 2021-07-10 17:51:01 +01:00
MontyTRC89
c1bfae6bf9 Refactored cameras, sinks and sound sources; Added sound sources playback; 2021-07-10 06:55:37 +02:00
Troye
e201df8f97 clean up larainfo; add anim bools' 2021-07-08 14:15:14 -05:00
MontyTRC89
99f476f3b9 Made LUA script optional; Deleted my bugged test code for volumes; 2021-07-06 11:54:34 +02:00
MontyTRC89
d85d624609 Merge branch 'NewLuaScripting' of https://github.com/MontyTRC89/TR5Main into NewLuaScripting
# Conflicts:
#	TR5Main/Game/control.cpp
#	TR5Main/Scripting/GameScriptItemInfo.cpp
2021-07-05 16:38:22 +02:00
MontyTRC89
34862c94e7 Added trigger volumes experimental 2021-07-05 16:33:50 +02:00
hispidence
19402f8d55 Move OnStart and OnLoad calls to after things are initialised but before the game loop begins. 2021-07-03 22:56:12 +01:00
hispidence
76aa8cd786 Init and call new Lua script callbacks. 2021-07-01 19:32:10 +01:00
MontyTRC89
b6e74eb4e6 Merge branch 'NewLuaScripting' of https://github.com/MontyTRC89/TR5Main into NewLuaScripting
# Conflicts:
#	TR5Main/Scripting/GameLogicScript.cpp
2021-06-29 05:03:57 +02:00
MontyTRC89
7f8cdec884 Merge branch 'master' of https://github.com/MontyTRC89/TR5Main into NewLuaScripting 2021-06-29 05:01:35 +02:00
hispidence
9e17b737ea Run the level script inside DoLevel. For now, this just runs the script once. 2021-06-28 18:34:59 +01:00
MontyTRC89
4c7110558f Switched audio tracks from int index to string; Added Tracks.lua loading support; 2021-06-26 07:36:54 +02:00
wolfcheese
d7b1720ca2 Removed code messing up angle of crossbow arrows during lasersight. Crossbow ammo now depletes during lasersight. 2021-06-23 14:45:04 -04:00