Commit graph

104 commits

Author SHA1 Message Date
Lwmte
8f4ba68f30 Reorganize includes tier 3 2021-12-24 03:32:19 +03:00
Lwmte
2101d3e65f Reorganize includes tier 2 2021-12-22 16:23:57 +03:00
Lwmte
313cf0a764 Minor cleanups 2021-12-01 18:12:04 +03:00
Lwmte
83bae04c01 Replace logD/logE everywhere with TENLog 2021-10-31 10:50:36 +03:00
MontyTRC89
4c3583c1ed Merge remote-tracking branch 'origin/inventory_class' into savegame
# Conflicts:
#	TR5Main/Game/savegame.cpp
#	TR5Main/Renderer/Renderer11Draw.cpp
#	TR5Main/Specific/input.cpp
2021-10-15 05:23:04 +02:00
Troye
af287cdf6d InventoryClass; 2021-10-12 04:15:22 -05:00
Troye
acc4281555 purge ring inventory; 2021-10-12 00:26:46 -05:00
MontyTRC89
174183ad20 Working on new savegames, first prototype load and save (missing UI) 2021-10-11 10:44:28 +02:00
Lwmte
cefc60c7ea Move around some files 2021-09-19 23:41:26 +03:00
Lwmte
99e1572b82 Update winmain.cpp 2021-09-16 01:13:28 +03:00
Lwmte
1d0ceb0ff4 Fix more stuff 2021-09-16 01:12:19 +03:00
MontyTRC89
88de21198a Merge branch 'master' into displaystrings 2021-09-14 05:11:43 +02:00
Lwmte
ba6c260b92 Further code organizing 2021-09-08 18:19:06 +03:00
hispidence
af4fa26a2c Merge branch 'master' into displaystrings 2021-08-30 18:44:21 +01:00
Lwmte
6d9cf3c214 Fix namespace case 2021-08-30 18:03:21 +03:00
Lwmte
21df1e84f1 Globals cleanup, remove wrecking ball hack, remove gassed property, fix diagonal block jump bug 2021-08-29 23:53:58 +03:00
hispidence
cdf27e54d2 No good reason not to load Lua's math library that I can think of. 2021-08-29 17:05:43 +01:00
MontyTRC89
0ed8181cda 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
ac6be98e00 Make Debug and Release configs build two separate executables. This is to stop Visual Studio getting confused and being unable to hit breakpoints or give callstack information when switching from one config to the other.
Add output console back in for Debug.

Make Release able to compile and run.
2021-08-17 14:23:06 +01:00
hispidence
58b9717689 Make TENLog use spdlog.
Debug builds output to console and log file (Build/logs/TENLog.txt), and Release only logs to log file.
2021-08-17 14:19:53 +01:00
asasas9500
43bb0bc410 Remove hack remains 2021-08-16 18:19:40 -03:00
hispidence
3f3b259cb9 Make window title a strings.lua string instead. 2021-08-15 23:23:33 +01:00
hispidence
8ddd04f9d7 Don't register CalculateDistance functions in winmain. 2021-08-12 22:11:22 +01:00
hispidence
339a95c6e4 Wrap some WinMain script calls in a TenScriptException try-catch block to log any errors happening in GameFlow/GameScript construction and GameFlow loading. 2021-08-07 18:59:36 +01:00
hispidence
354b21d4f4 Add m_levelFuncs and SetLevelFunc. These correspond to the table "LevelFuncs", which will hold trigger functions and the OnStart (etc) callbacks. Putting them into a table will make it much easier to discard them when the player goes from one level to another (through loading a save or finishing the current level).
Rework Level and Game tables as they weren't entirely working before. These correspond to m_locals and m_globals, which hold the level-specific and game-spanning data that will go into save files.

Make GetVariable and SetVariable take sol::table args. Sol seems to require this in order to use them as metamethods of a table (it doesn't require them for usertypes, but it seems more logical from the API point of view for Level and Game to be tables).

Add documentation for the above tables.

Move several functions out of the GameScript class in order to simplify its interface, and make them static functions that only live in GameLogicScript.cpp.

Remove g_GameScript from GameLogicScript.cpp as it's not used there; let winmain.cpp deal with it instead.
2021-08-05 21:36:18 +01:00
Lwmte
1323a06c8f Fix window stuff, move caustics to subfolder 2021-08-03 10:17:24 +03:00
hispidence
498873bc65 Remove HandleScriptMessage and associated globals - apparently this is no longer supposed to be here. 2021-08-02 12:49:17 +01:00
hispidence
4fd68787dc Make GetItemByName take a const ref, and make its error print the name of the item that could not be found.
Register GetItemByName in GameLogicScript instead of winmain. Register GameScriptColor too.

Define the lambdas passed to GameScriptItemInfo in terms of the actual functions we define. Functions that make a GameScriptItemInfo should pass false to make_unique (so the Lua object made does not control the lifetime of the ITEM_INFO).
2021-07-20 17:58:11 +01:00
MontyTRC89
255393b589 Added FROM_DEGREES function; Added quantity param to PickedUpObject(); LUA scripting refactoring WIP; 2021-06-29 05:00:15 +02:00
hispidence
1fbb41d997 Remove Strings and CurrentStrings from GameFlow; they were for the old system. Remove LoadScript for the same reason. 2021-06-25 14:33:26 +01:00
hispidence
ea551c4219 Load script data from Lua. 2021-06-16 15:10:05 +01:00
Trxye
c0ca04a806 clean up ring inventory code; fix KillItem(); 2021-05-26 01:58:30 -05:00
asasas9500
98803594fc Remove getCurrentCommit() 2021-02-08 23:59:03 -03:00
asasas9500
5682a3b6cd Delete empty files 2021-02-07 18:15:20 -03:00
Raildex
483736e86a Removing Debug Console 2021-02-03 16:21:24 +01:00
Raildex
6df3aafada Added working Release Configuration 2021-01-19 16:49:40 +01:00
KrysB4k
7754e5c606 Revert "Pushables: Fix error in stack height code, use bbox Y1 value for non-rigid pushables"
This reverts commit 4327a78f85.
2020-12-25 01:31:17 +01:00
KrysB4k
4327a78f85 Pushables: Fix error in stack height code, use bbox Y1 value for non-rigid pushables
Y1 value of pushable's bounding box is now used in computing block height
2020-12-25 01:30:24 +01:00
asasas9500
10a3d9167a Fix line endings 2020-12-21 13:16:29 -03:00
Raildex
ac61f71386 Refactored framework.h
Removed Renderer headers from framework.h
Removed bass headers from framework.h
Removed windows-related headers to avoid nameclashes with std::min and std::max
added <algorithm> for general-purpose functions (like std::min/max)
Added NOMINMAX define to project
Minor Refactorings
2020-09-29 21:43:56 +02:00
asasas9500
26a4b39b43 Fix bridges; Fix script IDs 2020-09-28 10:04:44 -03:00
asasas9500
547b643232 Merge branch 'master' into NoShifts 2020-08-25 19:25:28 -03:00
Raildex
028077a998 Displaying Commit Message on Title 2020-08-18 20:26:47 +02:00
Raildex
a3433e16cb Deactivated Pool memory
@TODO: Fix Pool
Changed pointers for ChunkIds to smart pointers
2020-08-11 19:18:36 +02:00
Raildex
b58d18ade2 Refactored functions 2020-08-09 15:25:56 +02:00
asasas9500
c411689790 Merge branch 'DiagonalCollisions' into NoShifts 2020-08-07 16:43:29 -03:00
asasas9500
a9dfdec427 Merge branch 'DiagonalCollisions' into NoShifts 2020-06-21 14:09:31 -03:00
Raildex
e5ead31064 Putting Renderer into namespace
made g_Renderer a global object
2020-06-21 14:27:12 +02:00
Raildex
b635f4df13 Fixed std namespace collisions
Refactored ChunkID/ChunkReader/Writer
2020-06-20 23:39:08 +02:00
Raildex
d2d6e5f30c Made g_Inventory a constant object.
Fixed shadow intensity
Fixed CameraViewConstantBuffer
2020-06-16 19:45:06 +02:00