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
MontyTRC89
e46cc2e542
Added LUA name for statics; LUA names refactoring;
2021-07-14 05:29:23 +02:00
hispidence
3599cf68d4
Make GameLogicScript use kInventorySlots. Make InvItem a read-only table. This means we do not need to write an enum directly in the Lua source.
2021-07-13 13:21:13 +01:00
hispidence
1dd6780c87
Add map from inventory slot string keys to their GAME_OBJECT_ID counterpart.
2021-07-13 13:17:31 +01:00
hispidence
b7db2c68ad
Remove ID_GOLDROSE_ITEM; the current plan is for secrets to be done via triggers instead of the pickup itself.
2021-07-12 16:13:52 +01:00
hispidence
b93b6aca71
Use GetInventoryCount in have_i_got_object as it works the same way.
2021-07-11 17:10:35 +01:00
hispidence
b5d56fa766
Forgot header in last commit.
2021-07-11 17:09:24 +01:00
hispidence
5d5479c3d0
Change AddDisplayPickup to use GAME_OBJECT_ID.
2021-07-11 17:04:41 +01:00
hispidence
54e14ccb3f
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
hispidence
2dbaac0572
Add += operator and from_underlying function, because for some reason C++ doesn't like implicitly converting between an enum and its own underlying type.
...
These ONLY work for the type itself and its underlying type - this means the compiler will notify us if we try and use an int or long instead of a bool, and we can double check to make sure it is intended.
2021-07-11 16:50:29 +01:00
hispidence
2d4ce0bc61
Forgot to commit this comment earlier.
2021-07-11 13:08:23 +01:00
hispidence
af75b4f55d
Make GAME_OBJECT_ID a short in its underlying type (since that's the type that's mostly used to refer to it) and remove typedef to make VC++ stop giving tons of warnings.
2021-07-11 13:07:50 +01:00
hispidence
97c665f21f
Make some ints to GAME_OBJECT_ID and add comments.
2021-07-10 18:01:10 +01:00