Commit graph

32 commits

Author SHA1 Message Date
hispidence
21a867e821 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
011e1a9bf4 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
f0698a3c80 Added code (to finish) for executing LUA triggers 2021-07-17 05:56:40 +02:00
hispidence
a0ced5c34e 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
a00f3a23fb Implement GiveInvItem, TakeInvItem, GetInvItemCount and SetInvItemCount (names to be finalized). 2021-07-10 14:05:01 +01:00
hispidence
34859c154f Make InventoryAdd and InventoryRemove static. Add them as Lua functions. 2021-07-05 18:18:20 +01:00
hispidence
33dcd85a06 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
9386993bcd 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
997d31af89 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
f22551ab32 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
d25cfb6c92 Moved GameScriptPosition, GameScriptRotation and GameScriptColor classes in separate files 2021-06-29 05:28:17 +02:00
MontyTRC89
f81d8e439f Added FROM_DEGREES function; Added quantity param to PickedUpObject(); LUA scripting refactoring WIP; 2021-06-29 05:00:15 +02:00
Brad Ellis
514a691836 GameLogicScript inherits from LuaHandler now. 2021-06-16 14:39:43 +01:00
Nils Gaitzsch
c860919616 Fixed std namespace collisions
Refactored ChunkID/ChunkReader/Writer
2020-06-20 23:39:08 +02:00
Nils Gaitzsch
232458472b resolving namespace std conflicts 2020-06-18 15:54:08 +02:00
asasas9500
1732048a00
Scripting (#211)
* Create template for variables; Rename properties; Improve console input

* Improve console input again
2020-06-09 09:16:51 +02:00
TokyoSU
ee59d27517 (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
9c1c4517d7
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
Nils Gaitzsch
ca12b10ec3 Added Debug Console Window
Added Script function that handles standalone script commands
2020-05-01 20:42:17 +02:00
MontyTRC
6b16828381
Merge branch 'master' into scripting 2020-04-30 21:52:16 +02:00
asasas9500
960110196e Improve Lua scripting 2020-04-28 12:24:10 -03:00
Montagna Marco
20bd242052 Started math refactoring 2020-04-25 16:23:53 +02:00
Montagna Marco
97c6fe0dd8 Decompiled FixedCamera() and CameraBoundsCollide() 2020-04-09 14:19:18 +02:00
Montagna Marco
d5f6858a01 Decompiled EFFECTS.CPP, EFFECT2.CPP, TOMB4FX.CPP 2019-12-22 00:20:10 +01:00
Montagna Marco
09c2957f4f Merged branches 2019-12-02 09:11:21 +01:00
Montagna Marco
2443494349 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