Commit graph

89 commits

Author SHA1 Message Date
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
MontyTRC89
4245bed3b3 Removed TR5 doors code; Added OCB for underwater switches; Small fixes to doors; 2021-09-06 05:27:27 +02:00
MontyTRC89
14152a0b4f Refactored doors in multiple files 2021-09-05 06:05:00 +02:00
Nils
0af567b7fd Removed BaddieSlots
ActiveCreatures now contains pointers to CREATURE_INFOs of items instead
Every Item with Creature Info now contains their own path finding data.
Fixed OoB issues with XZ_GET_SECTOR
2021-09-03 09:37:42 +02:00
Nils
7f774d04b3 Merge branch 'master' into item_data
# Conflicts:
#	TR5Main/Game/Lara/lara.cpp
#	TR5Main/Game/Lara/lara_collide.cpp
#	TR5Main/Game/Lara/lara_monkey.cpp
#	TR5Main/Game/Lara/lara_struct.h
#	TR5Main/Game/Lara/lara_tests.cpp
#	TR5Main/Game/collide.h
#	TR5Main/Game/control.h
#	TR5Main/Game/effect.h
#	TR5Main/Game/effect2.cpp
#	TR5Main/Game/flipeffect.cpp
#	TR5Main/Game/floordata.h
#	TR5Main/Game/hair.cpp
#	TR5Main/Game/health.cpp
#	TR5Main/Game/items.cpp
#	TR5Main/Game/newinv2.cpp
#	TR5Main/Game/spotcam.cpp
#	TR5Main/Objects/Effects/tr4_bubbles.cpp
#	TR5Main/Objects/TR1/Entity/tr1_ape.cpp
#	TR5Main/Objects/TR1/Entity/tr1_bigrat.cpp
#	TR5Main/Objects/TR1/Entity/tr1_doppelganger.cpp
#	TR5Main/Objects/TR2/Entity/tr2_birdmonster.cpp
#	TR5Main/Objects/TR2/Entity/tr2_shark.cpp
#	TR5Main/Objects/TR2/Entity/tr2_spider.cpp
#	TR5Main/Objects/TR2/Entity/tr2_yeti.cpp
#	TR5Main/Objects/TR3/Entity/tr3_fishemitter.cpp
#	TR5Main/Objects/TR3/Entity/tr3_flamethrower.cpp
#	TR5Main/Objects/TR3/Entity/tr3_monkey.cpp
#	TR5Main/Objects/TR3/Entity/tr3_raptor.cpp
#	TR5Main/Objects/TR3/Entity/tr3_scuba.cpp
#	TR5Main/Objects/TR3/Entity/tr3_trex.cpp
#	TR5Main/Objects/TR3/Vehicles/kayak.cpp
#	TR5Main/Objects/TR3/Vehicles/minecart.cpp
#	TR5Main/Objects/TR4/Entity/tr4_bat.cpp
#	TR5Main/Objects/TR4/Entity/tr4_big_beetle.cpp
#	TR5Main/Objects/TR4/Entity/tr4_bigscorpion.cpp
#	TR5Main/Objects/TR4/Entity/tr4_demigod.cpp
#	TR5Main/Objects/TR4/Entity/tr4_dog.cpp
#	TR5Main/Objects/TR4/Entity/tr4_hammerhead.cpp
#	TR5Main/Objects/TR4/Entity/tr4_harpy.cpp
#	TR5Main/Objects/TR4/Entity/tr4_mutant.cpp
#	TR5Main/Objects/TR4/Entity/tr4_smallscorpion.cpp
#	TR5Main/Objects/TR4/Entity/tr4_troops.cpp
#	TR5Main/Objects/TR4/Entity/tr4_wildboar.cpp
#	TR5Main/Objects/TR4/Trap/tr4_joby_spikes.cpp
#	TR5Main/Objects/TR4/Vehicles/motorbike.cpp
#	TR5Main/Objects/TR5/Entity/tr5_doberman.cpp
#	TR5Main/Objects/TR5/Entity/tr5_imp.cpp
#	TR5Main/Objects/TR5/Entity/tr5_larson.cpp
#	TR5Main/Objects/TR5/Entity/tr5_lion.cpp
#	TR5Main/Objects/TR5/Entity/tr5_reaper.cpp
#	TR5Main/Objects/TR5/Object/tr5_pushableblock.cpp
#	TR5Main/Objects/TR5/Object/tr5_rollingball.cpp
#	TR5Main/Objects/TR5/Trap/tr5_fallingceiling.cpp
#	TR5Main/Renderer/Renderer11Draw2D.cpp
#	TR5Main/Specific/input.cpp
#	TR5Main/Specific/level.cpp
#	TR5Main/TombEngine.vcxproj.filters
2021-08-31 18:20:23 +02:00
Nils
f72a305afd Fixed Door crashes by doing a simple copy of the floor data instead of memcpy
Using resize() insteaad of clear() for vectors in LEVEL to force a deallocation
2021-08-30 17:28:26 +02:00
Lwmte
e879038220 Fix namespace case 2021-08-30 18:03:21 +03:00
Nils
2ec9b40f8c Cleaned up several buffers to use fixed arrays
Removed game_malloc
TODO: DOOR_DATA destructor crashes
2021-08-29 16:35:19 +02:00
Nils
58eda862e3 Fixed More Include Hell 2021-08-28 13:27:58 +02:00
Lwmte
e0b47d629f Merge branch 'master' into legacy_trigger_refactor 2021-08-24 19:04:54 +03: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
Lwmte
e7e1cca356 First commit 2021-08-20 02:01:50 +03: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
Lwmte
bc15f34339 Add support for sphere volumes 2021-08-05 15:46:03 +03:00
Lwmte
673db7a866 Update level.cpp 2021-08-05 14:51:15 +03:00
Lwmte
ac17da7336 Fix GetSpheres some more, fix cameras/sinks/AI objects/sound sources not cleaning on reload 2021-08-03 13:23:51 +03:00
Lwmte
5b9bcc2715 Fix several silly mistakes with std::vector 2021-08-03 01:30:44 +03:00
Lwmte
2966d5da02 Add refraction vertex attribute, separate attribs into separate normalized float values 2021-07-31 18:51:38 +03:00
Lwmte
633e0eadc3 Implement per-vertex effects for rooms and objects 2021-07-30 20:55:03 +03:00
hispidence
945082ce54 Change mesh loading to use emplace_back.
Change some remaining vector::back calls to use the already-existing references.
2021-07-24 19:14:23 +01:00
hispidence
daf46fed61 Clean up a load of warnings and possible errors:
Fix buffer from char*[255] to char[255]. This also allows us to avoid the C-style cast to char const *.

Remove original push_back call to g_Level.SoundSources which I left in by accident.

Use string constructor which takes pointer to first char and pointer to last char + 1. This removes the need to zero the memory (the calls were generating warnings about accessing buffer[256] when buffer is only 255 elements) and also gets rid of warning C6054 about string possibly not being zero-terminated.

Change calls to push_back and back with an emplace_back. Aside from being shorter and slightly more efficient, it gets rid of warning C26444 (about creating local variables with no name).
2021-07-24 19:08:17 +01:00
hispidence
9dd4bcf4ca Add SOUND_SOURCE_INFO and AI_OBJECT names when loading in the level data. Implement remaining functions on the GameLogicScript side. 2021-07-24 12:45:33 +01:00
hispidence
97d5d85f7a Add AddLuaNameSink, RemoveLuaNameSink, and GetSinkByName.
Make a template that all GetXByName member functions work off, to reduce copypasted functions.
For consistency, rename RemoveLuaName and AddLuaName to RemoveLuaNameItem and AddLuaNameItem.
Fix some documentation comments, order function documentation into sections.
2021-07-23 16:02:30 +01:00
hispidence
5f64de39dd Change ReadRooms to push back the ROOM_INFO to g_Level.Rooms first, and then working on the reference. This means that the MESH_INFO reference that gets added to the mesh-name table correctly refers to the copy that sits in the vector of an element of g_Level.Rooms and not a local copy that goes out of scope before the end of the function. It also makes loading about 50ms faster. 2021-07-23 02:41:39 +01:00
hispidence
3635bfca8f Call AddLuaNameCamera when loading a level to add a reference to the camera to the name-camera map. 2021-07-23 02:12:12 +01:00
hispidence
bbbca5849d Call AddLuaNameMesh in ReadRooms. 2021-07-21 18:21:10 +01:00
MontyTRC89
81611e2bdd Added LUA name insertion on items loading; Fixed item rooms change (use ItemNewRoom); 2021-07-19 05:52:21 +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
MontyTRC89
fcc4e4465d Added LUA name for statics; LUA names refactoring; 2021-07-14 05:29:23 +02:00
hispidence
10aec3d6f2 Make some functions take a GAME_OBJECT_ID instead of a short. Make AIOBJECT use a GAME_OBJECT_ID instead of a short. 2021-07-11 16:55:20 +01:00
MontyTRC89
c1bfae6bf9 Refactored cameras, sinks and sound sources; Added sound sources playback; 2021-07-10 06:55:37 +02:00
MontyTRC89
34862c94e7 Added trigger volumes experimental 2021-07-05 16:33:50 +02:00
MontyTRC89
1c197bae7e Fix merge conflicts 2021-03-27 07:38:51 +01:00
MontyTRC89
2e86229b5c New level loader code for anim textures 2021-03-27 07:33:40 +01:00
MontyTRC89
d544ab5917 Animated textures data in polygons 2021-03-12 21:33:02 +01:00
MontyTRC89
67dc6e0379 Implemented new anim textures in file format 2021-03-10 18:45:12 +01:00
asasas9500
29e00e9219 Fix boxes 2021-01-28 20:49:30 -03:00
asasas9500
fbd4848a22 Fix no pathfinding 2021-01-17 20:29:37 -03:00
asasas9500
98e9d953d2 Implement new random system 2020-10-24 01:05:59 -03:00
Nils
0ee12930d5 Added Static Mesh Tint Support 2020-10-07 09:08:23 +02:00
Nils
ea9afa7413 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
912b0abbae Fix bridges; Fix script IDs 2020-09-28 10:04:44 -03:00
asasas9500
9241d011b1 Fix first bugs in new floordata 2020-09-19 20:09:57 -03:00
asasas9500
26a32db4a0 New floordata prototype 2020-09-14 00:19:05 -03:00
Montagna Marco
d09e4d9ae7 Fixed sounds 2020-09-08 19:50:19 +02:00
Montagna Marco
82af97c8cc Fixed enemy monkey; Added new zone for ID_VON_CROY; Small AI fixes; Added 3 blocks jump; 2020-09-01 07:06:31 +02:00