Commit graph

33 commits

Author SHA1 Message Date
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
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
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
MontyTRC89
7c1e29e6d0 Added code (to finish) for executing LUA triggers 2021-07-17 05:56:40 +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
5dd8ca33a8 Implement GiveInvItem, TakeInvItem, GetInvItemCount and SetInvItemCount (names to be finalized). 2021-07-10 14:05:01 +01:00
hispidence
7a43cd156c Make InventoryAdd and InventoryRemove static. Add them as Lua functions. 2021-07-05 18:18:20 +01:00
hispidence
47f5745304 Register SetAmbientTrack and PlayAudioTrack. Make PlayAudioTrack static, pass its string arg by reference-to-const, and let it use the loop bool passed in instead of the one stored in global state.
Improve some text formatting in the header.
2021-07-04 14:33:57 +01:00
hispidence
b7d2a45a29 Make SetAmbientTrack take a string by const ref. Change functions to access GameScript[Position/Rotation] members directly instead of via getters/setters. 2021-07-03 23:18:10 +01:00
hispidence
948e3519a2 Add m_onStart, m_onEnd, m_onLoad, m_onControlPhase, and m_onSave callbacks. Add InitCallBacks, which assigns the aforementioned member functions and checks that they exist in the script, throwing an exception if not. 2021-07-01 19:31:15 +01:00
hispidence
b4a52de5d0 Register GameScriptRotation and GameScriptPosition in GameScript constructor. Remove GameScriptItem class, which has been merged into GameScriptItemInfo. 2021-07-01 19:29:58 +01:00
MontyTRC89
a507e9e1be Moved GameScriptPosition, GameScriptRotation and GameScriptColor classes in separate files 2021-06-29 05:28:17 +02: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
a70bd1f13d GameLogicScript inherits from LuaHandler now. 2021-06-16 14:39:43 +01:00
Raildex
b635f4df13 Fixed std namespace collisions
Refactored ChunkID/ChunkReader/Writer
2020-06-20 23:39:08 +02:00
Raildex
2b4d1ca2e8 resolving namespace std conflicts 2020-06-18 15:54:08 +02:00
asasas9500
b58fc1473e Scripting (#211)
* Create template for variables; Rename properties; Improve console input

* Improve console input again
2020-06-09 09:16:51 +02:00
TokyoSU
b615a98c46 (Broken) Deleted Global Folder
- No more enums.h, constants.h, macro.h, etc...
- moved all structure in types.h to there respective file.
2020-05-30 15:55:23 +02:00
TokyoSU
29f0724693 New project format (#206)
* Starting Reformat the project

- New Import Method, no more "../../" in import,
- New Entity Folder Structure, less compile time

* Refactoring the Project

- added precompiled header with default import like microsoft or directx.
- fix many double import.
- fix math.h confliting math.h from
microsoft.
- fix effects.h confliting Effects.h from DirectX.
- refactored TR4 entity folder and how it's loaded.

* Update Some Code Before Switching to Master

* Finished the NewProjectFormat Template

- need to finish entity in the master later.

* Added Monty NewFileFormat

* Fixed Monty NewFileFormat Include

* Revert "Fixed Monty NewFileFormat Include"

This reverts commit ebf0afca10.

* Trying to fix conflits for NewFileFormat

* Fixed .filters

* Last Commit in NewProjectFormat
2020-05-27 09:21:20 +02:00
Raildex
6fd9ce1473 Added Debug Console Window
Added Script function that handles standalone script commands
2020-05-01 20:42:17 +02:00
MontyTRC89
22ccaa2c5a Merge branch 'master' into scripting 2020-04-30 21:52:16 +02:00
asasas9500
4dc0169461 Improve Lua scripting 2020-04-28 12:24:10 -03:00
MontyTRC89
6b819c2855 Started math refactoring 2020-04-25 16:23:53 +02:00
MontyTRC89
06042a2f57 Decompiled FixedCamera() and CameraBoundsCollide() 2020-04-09 14:19:18 +02:00
MontyTRC89
25418903ad Decompiled EFFECTS.CPP, EFFECT2.CPP, TOMB4FX.CPP 2019-12-22 00:20:10 +01:00
MontyTRC89
37ac9b77fd Merged branches 2019-12-02 09:11:21 +01:00
MontyTRC89
0d342637fb Decompiling Lara 2019-11-21 07:43:34 +01:00
MontyTRC89
548f9c0ad8 Improved readLara(); Added LaraBurn(); Code cleaning in inventory; 2018-10-10 22:29:40 +02:00
MontyTRC89
94b5a6f61a Improved savegame system 2018-10-09 00:02:14 +02:00
MontyTRC89
5c376c0f95 New streams class; Refactored chunk IO; Added chunk writer; Started new savegame system; 2018-10-01 22:22:35 +02:00
MontyTRC89
c7995dae7f Started implementing new file format; Added new functions for scripting; 2018-09-24 21:34:43 +02:00
MontyTRC89
59c02796cb Implemented LUA trigger 2018-09-23 12:01:07 +02:00
MontyTRC89
b7dfc803d2 Refactored script system; Decompiled TestTriggers; Added some functions and variables; Fixed a couple of bugs in control phase; 2018-09-22 23:54:51 +02:00