hispidence
a8344ed35e
Make functions take reference-to-const args.
2021-07-23 21:49:44 +01:00
hispidence
16b3511d5f
Make GetString return a char const *.
...
Make Intro a char const *.
2021-07-23 21:48:49 +01:00
hispidence
ba48783bc3
Define scale and translation vectors just before the Decompose call instead of in its arguments, since it takes them by non-const reference.
2021-07-23 21:48:06 +01:00
hispidence
18d9223d12
De-ambiguate a comparison operator and define PHD_3DPOS variables before TriggerShockWave calls, because taking an address of a temporary in this way is apparently not standard-compliant.
2021-07-23 21:46:38 +01:00
hispidence
1decbe9966
Declare WarningsAsErrors so that files which end up indirectly including GameScriptNamedBase.h don't complain
2021-07-23 21:43:08 +01:00
hispidence
f65ec91756
Rearrange headers so generic_bridge.h sees g_Level.
2021-07-23 21:41:44 +01:00
hispidence
f9ae0046c6
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
40933eef0c
Add GameScriptSinkInfo/SinkInfo.
2021-07-23 15:59:13 +01:00
hispidence
171d427d77
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
a94893516b
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
5257a3c074
Add m_camerasMapName, AddLuaNameCamera, RemoveLuaNameCamera, GetCameraByName, and GetMeshByName.
2021-07-23 02:09:52 +01:00
hispidence
cb59e06493
Add GameScriptCameraInfo.h and GameScriptCameraInfo.cpp.
2021-07-23 02:08:13 +01:00
hispidence
dbe6ffdd5c
Add __tostring metamethod to GameScriptPosition, GameScriptRotation and GameScriptColor.
...
Make their properties lowercase to keep them consistent with the properties of other classes.
Move documentation from GameScriptPosition.h to GameScriptPosition.cpp.
2021-07-23 02:06:50 +01:00
hispidence
b264099ff1
Add m_temporary to GameScriptMeshInfo, as well as a constructor and destructor.
...
Fix documentation.
Remove duplicated pos property.
2021-07-23 02:04:47 +01:00
hispidence
8473d26425
Rearrange GameScriptItemInfo a bit.
...
Exchange m_temporary in the move constructor.
Fix documentation to reference ObjID instead of int.
2021-07-23 02:03:31 +01:00
hispidence
3509b2b307
Call AddLuaNameMesh in ReadRooms.
2021-07-21 18:21:10 +01:00
hispidence
bd4df80c46
Add documentation and constructor member initialisers for GameScript.
2021-07-21 18:19:57 +01:00
hispidence
29d4f89263
Add conversions between GameScriptColor and Vector3/Vector4.
2021-07-21 18:18:51 +01:00
hispidence
5b8cf2dc66
Add new files to the project.
2021-07-21 18:18:02 +01:00
hispidence
8e5bf062f7
Add GameScriptMeshInfo. This is still a fairly skeletal class for the time being.
2021-07-21 18:17:30 +01:00
hispidence
31605294ea
Make GameScriptItemInfo inherit from GameScriptNamedBase and remove functions which now reside there.
2021-07-21 18:16:35 +01:00
hispidence
0e1ffafd88
Add GameScriptNameBase, which will serve as a base class for the GameScriptXInfo classes to avoid having to specify static callback-assignment functions and index metafunctions for each one individually.
2021-07-21 18:14:43 +01:00
hispidence
23ec719020
Link up MeshInfo with GameLogicScript, adding a m_meshesMapName and implementing AddLuaNameMesh and RemoveLuaNameMesh.
...
Add GetMeshByName and make GetItemByName take a constant reference.
Remove no-longer-used headers.
2021-07-21 18:12:17 +01:00
hispidence
63a696f25e
Make the "Lara" global non-owning. Will look into this and see if we actually need it.
2021-07-21 18:09:53 +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
hispidence
7008ab75f8
Make GameScriptColor::Register static.
2021-07-20 17:53:10 +01:00
hispidence
2d1b9c8178
Move documentation from GameScriptRotation.h to ".cpp.
2021-07-20 17:49:14 +01:00
hispidence
f6ff21bda2
Add Register function and documentation for GameScriptColor, since it will be used in GameScriptMeshInfo.
2021-07-20 17:48:39 +01:00
hispidence
24b7d549f6
Add concept of 'temporary' ItemInfo instances. These instances will kill the ITEM_INFO they reference when they are destroyed. This was previously the default behaviour. However, now that we're using things like GetItemByName, it makes more sense for ItemInfos to be non-owning by default.
...
Move LDoc from GameScriptItemInfo.h to GameScriptItemInfo.cpp. This might seem counter-intuitive, but LDoc is concerned with the Lua interfaces rather than the actual C++ functions; since the Lua interfaces are defined in GameScriptItemInfo::Register, it makes more sense for the comments to be nearby.
2021-07-20 17:18:39 +01:00
hispidence
075a8cf7dd
Use markdown when generating docs.
2021-07-20 00:19:56 +01:00
hispidence
1ba7007d92
Make the contents of ObjectIDs.h part of the Lua interface.
2021-07-20 00:16:15 +01:00
hispidence
f7ef7ae505
Add ObjectIDs.h. Add documentation comments to InventorySlots.h
2021-07-20 00:14:59 +01:00
hispidence
58ba18b5bc
Add m_initialised to GameScriptItemInfo. This is possibly temporary, and controls whether SetRoom calls ItemNewRoom or just sets the room number. This is because ItemNewRoom relies on InitialiseItem having been called, but InitialiseItem requires the roomNumber of the object to be correct.
...
Add and document GetLara.
2021-07-20 00:10:00 +01:00
MontyTRC89
f7fee69634
Added LUA name insertion on items loading; Fixed item rooms change (use ItemNewRoom);
2021-07-19 05:52:21 +02:00
hispidence
513888ed3c
Add SetAnimNumber, GetAnimNumber, SetFrameNumber and GetFrameNumber. Fix SetGoalAnimState call.
2021-07-18 17:37:39 +01:00
hispidence
4ec17f525c
Rename «Current/Goal/Required»Anim to «Current/Goal/Required»AnimState.
2021-07-18 15:29:40 +01:00
hispidence
53b971c033
Remove 'typedef' from enums and structs. This was required in C, but in C++ all it does is generate thousands of warnings.
2021-07-18 15:22:15 +01:00
hispidence
c6d680fa07
Add initial documentation comments for GameScriptPosition and GameScriptRotation.
2021-07-17 23:51:01 +01:00
hispidence
d08585a9e0
Fix some whitespace.
2021-07-17 23:50:10 +01:00
hispidence
1e38b88339
Set luaName to blank in CreateItem to indicate the lack of a name.
2021-07-17 23:49:40 +01:00
hispidence
903f9d19b3
Implementations for GameScriptItemInfo member functions «Get/Set»ObjectID, «Get/Set»Name, and default implementations for the callbacks.
2021-07-17 23:48:35 +01:00
hispidence
4342c8c466
Add GameScriptItemInfo::«Set/Get»ObjectID and GameScriptItemInfo::SetNameCallbacks.
...
Add calls to the callbacks to GameScriptItemInfo::SetName, so that giving a Lua name to an object removes its existing object and any other object currently using the new name, before then putting the name into the map.
Add initial documentation for the Lua-exported parts.
2021-07-17 23:47:07 +01:00
hispidence
87ebe31767
Uncomment ExecuteFunction and make it take a const ref.
...
Make «Add/Remove»LuaName return a bool for future error checking, and pass them via lambdas to GameScriptItemInfo, allowing it to call them whenever an object is added or removed (they would not have access to the m_itemsMapName otherwise).
2021-07-17 22:26:07 +01:00
hispidence
d8a060ed52
Add LDoc config and CSS template used for generating Lua API documentation.
2021-07-17 22:13:15 +01:00
MontyTRC89
7c1e29e6d0
Added code (to finish) for executing LUA triggers
2021-07-17 05:56:40 +02:00
MontyTRC89
223e7b673f
New volume triggers logic
2021-07-16 11:13:57 +02:00
MontyTRC89
0495681cb1
Fixed volumes and added debug message
2021-07-15 10:56:03 +02:00
MontyTRC89
916d22759b
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
98c62c58bb
Merge branch 'master' of https://github.com/MontyTRC89/TR5Main
2021-07-14 05:30:04 +02:00
Troye
5d8bb0014d
FLARE_AGE constant; fix dynamic light intensity; fix release builds
2021-07-13 22:29:47 -05:00