Commit graph

120 commits

Author SHA1 Message Date
Lwmte
6193a758ff Move savegames to separate folder, organize savegame code 2021-10-31 21:36:51 +03:00
Lwmte
18bddbf7e8 Refactor and fix sound code 2021-10-29 02:22:26 +03:00
Lwmte
961937d7cd Don't use legacy function names in sound code 2021-10-02 18:54:53 +03:00
Lwmte
d1735d4bbd Cleanup 2021-09-25 16:00:30 +03:00
MontyTRC89
f1ce048ffa Refactored flame emitters, Lara burn and lightning bolts; 2021-09-22 05:51:25 +02:00
Lwmte
afa0504c6c Move around some files 2021-09-19 23:41:26 +03:00
Lwmte
2b49b9aa42 Fix more stuff 2021-09-16 01:12:19 +03:00
Lwmte
42bb372f63 Remove unused globals and move others from control.cpp to needed source files 2021-09-15 21:09:09 +03:00
MontyTRC89
3a80f1616d Fixed previous merge 2021-09-14 05:19:01 +02:00
MontyTRC
4f527f9b9b
Merge branch 'master' into displaystrings 2021-09-14 05:11:43 +02:00
Lwmte
37d648cfd0 Revert "Fix regressions"
This reverts commit 7faf1fb02a.
2021-09-11 10:13:04 +03:00
Lwmte
7faf1fb02a Fix regressions 2021-09-11 09:41:29 +03:00
MontyTRC89
865202b33c Merge branch 'doors_refactoring'
# Conflicts:
#	TR5Main/Game/door.cpp
#	TR5Main/Game/door.h
#	TR5Main/Game/memory/malloc.cpp
#	TR5Main/Objects/Generic/Switches/cog_switch.cpp
#	TR5Main/Objects/Generic/Switches/crowbar_switch.cpp
#	TR5Main/Objects/Generic/Switches/generic_switch.h
#	TR5Main/Objects/Generic/Switches/turn_switch.cpp
#	TR5Main/Objects/TR4/Object/tr4_obelisk.cpp
#	TR5Main/Renderer/Renderer11Draw.cpp
#	TR5Main/Specific/level.cpp
#	TR5Main/TombEngine.vcxproj
#	TR5Main/TombEngine.vcxproj.filters
2021-09-11 05:38:26 +02:00
Lwmte
4186dfe685 Merge branch 'master' into item_data 2021-09-09 11:10:25 +03:00
Lwmte
9af21e3146 Further code organizing 2021-09-08 18:19:06 +03:00
Lwmte
2bee1df81a Move all effect source files to separate directory, rename effect2 to effects 2021-09-08 18:07:48 +03:00
hispidence
dfef61cbe3 Add this comment to remind myself to think about stuff when implementing loading/saving. 2021-08-31 13:25:42 +01:00
hispidence
74629db9d3 Make SetLevelFunc and GetLevelFunc only store the function in m_levelFuncs.
Store the function in m_levelFuncs instead of the table itself.
2021-08-30 18:21:42 +01:00
hispidence
861720dce0 Add DisplayString "flags" and "translated" support, as well as some things I forgot to commit earlier. 2021-08-29 20:25:54 +01:00
hispidence
1cde8877e4 Remove PrintString; it has been "replaced" with DisplayString/AddString. 2021-08-29 20:11:29 +01:00
hispidence
9a2d1a0f2d Rename AddDisplayString to SetDisplayString. Make it call insert_or_assign instead of just insert.
Add GetDisplayString and assorted types/static functions.
2021-08-29 20:09:59 +01:00
hispidence
501be9c594 Add ScreenToPercent and PercentToScreen. 2021-08-29 20:03:51 +01:00
hispidence
5e525bb545 Add more reserved script names. 2021-08-29 17:03:51 +01:00
Nils
58eda862e3 Fixed More Include Hell 2021-08-28 13:27:58 +02:00
hispidence
72f925c3bc Change PrintString arg names to better reflect what it does. 2021-08-27 19:08:28 +01:00
hispidence
a61e2fd0b0 Implement ShowString, HideString, and PrintString. 2021-08-27 18:56:35 +01:00
hispidence
68118bc9a3 Replace Get*ByName with GetByName, AddLuaName* with AddName, and RemoveLuaName* with RemoveName. Replace m_*MapName with m_nameMap. Use a std::variant for the types that m_nameMap elements could be. Modify SetNameCallbacks params to be variadic. These do make it look more complex, but also make it more generic, and mean that specific parameters do not need to be repeated (which will make it easier if/when we change said parameters). 2021-08-27 18:21:37 +01:00
hispidence
88f056dc41 Set callbacks to nil and collect garbage when unloading level. 2021-08-27 12:46:01 +01:00
hispidence
85d37a3594 Make ExecuteFunction print a better error message with the name of the function. 2021-08-23 22:07:18 +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
1cccef16b2 Give documentation comments new tag names. Part 2 of making the documentation better. 2021-08-23 19:16:24 +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
hispidence
6df0bb5252 Remove some unused includes. 2021-08-17 14:23:47 +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
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
8de08be1de Register GameScriptRotation in GameFlowScript and not GameLogicScript. 2021-08-11 01:26:35 +01:00
hispidence
9ce4157d54 More cleanup. 2021-08-09 00:54:09 +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
2dde169769 Don't register Color in GameScript (it's in GameFlow now). 2021-08-07 19:14:11 +01:00
hispidence
9b29de8dda Make MakeReadOnlyTable a member function of LuaHandler so that GameFlow can use it too. 2021-08-07 19:00:45 +01:00