Commit graph

105 commits

Author SHA1 Message Date
Brad Ellis
9aea1c9ba8 Change string back; I was using this for debugging. 2021-06-16 14:52:30 +01:00
Brad Ellis
8f3f973c5e GameFlowScript changes:
Inherit from LuaHandler.

Remove the SCRIPT.DAT-related code.

Add m_translationsMap which stores strings by key and holds a vector with their translations. The index of a translation corresponds with the index of the language in m_languageNames; e.g. if Italian is at index 2 in m_languageNames, then the Italian translation of a string will be at index 2 in the vector. See GameFlow:SetStrings in English.lua.

Add m_languageNames which stores a vector of language names. See GameFlow:SetLanguageNames in English.lua.

Add WriteDefaults and AddTracks, which is there for data which isn't in Lua scripts yet. It will be removed in the future.

Add AddLevel, which corresponds with GameFlow:AddLevel in Gameflow.lua.

Add LoadGameFlowScript, which loads (for now) Gameflow.lua and English.lua.

Add GetLang, which is to load the old-style strings and which will be removed when the switch to new strings is complete.
2021-06-16 14:51:58 +01:00
Brad Ellis
514a691836 GameLogicScript inherits from LuaHandler now. 2021-06-16 14:39:43 +01:00
Brad Ellis
a435b889a2 Call WriteDefaults and AddTracks. These are temporary things to add the settings which were in SCRIPT.DAT but which have no Lua counterpart yet.
The bool "rain" is now the WeatherType "Weather" to reflect what's in the C++ implementation.

Gameflow -> GameFlow to be consistent with C++.
2021-06-16 14:38:59 +01:00
Brad Ellis
731b7b6f6b Add working demo of new strings system. I believe the plan is that in the future, this will be automatically generated in TombIDE - right now it's only for demonstration purposes.
Gameflow -> GameFlow for consistency with the C++ source.
2021-06-16 14:35:27 +01:00
Brad Ellis
a66ecb7b34 Change Strings to std::unordered_map. This is a temporary thing to work nicely with the current English.lua, and will be removed/replaced/reworked when the new strings system is fully in place. 2021-06-16 14:33:43 +01:00
Brad Ellis
cf0b4d5e7a Add LuaHandler class to hold some repeated functionality between GameFlowScript and GameLogicScript. 2021-06-16 14:32:42 +01:00
Brad Ellis
52fe1655e5 Make hardcoded array of audio names, as they would normally be loaded from SCRIPT.DAT which is being removed - this is only present until a new system is in-place for them. 2021-06-16 14:29:50 +01:00
Trxye
622cc4210a fix inventory drawing; implement inventory in game code; 2021-05-20 14:19:11 -05:00
asasas9500
d4c6cc4a97 Fix line endings 2020-12-21 13:16:29 -03:00
asasas9500
912b0abbae Fix bridges; Fix script IDs 2020-09-28 10:04:44 -03:00
asasas9500
44c988716a Remove ControlXRayMachine(); Move bridges to generic objects folder; Merge bridges 2020-09-27 20:44:17 -03:00
Woops
4c3a3cbbd1 implement 2020-08-28 12:05:25 -05:00
Nils Gaitzsch
82b3944dde Deactivated Pool memory
@TODO: Fix Pool
Changed pointers for ChunkIds to smart pointers
2020-08-11 19:18:36 +02:00
Montagna Marco
18994dd59e Moving all globals of level under LEVEL struct; Fixed severe performance issue; 2020-07-21 09:56:47 +02:00
Montagna Marco
d6f45db5ec Merge branch 'master' of https://github.com/MontyTRC89/TR5Main 2020-06-26 07:06:51 +02:00
Montagna Marco
235dab2f13 New FLOOR_INFO struct; Refactoring rooms part I 2020-06-26 07:06:18 +02: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
TokyoSU
3699a78e34 Implemented Mutant and Locusts
- Added ItemNearTarget().
2020-06-10 21:38:25 +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
488dfd102d Implemented Big Rat (TR1) Template
- Fixed old object (added by me) missing from the lua script.
2020-06-08 13:51:44 +02:00
TokyoSU
8f11417654 Implemented Baboon
- Fixed AIObject not being initialized !
- Fixed ITEM_DEACTIVATED (cause im french and ITEM_DESACTIVATED is more appropriate)
2020-06-04 12:49:08 +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
2c5a621cb3 Refactor include and moving some structure to right file
- started moving structure out of types.h.
- fixed ExtraAnim using 0 instead of -1.
- changed void(*)(); to function<> for lara routines.
- changed short(*)() effect to function<> for CreatureEffect/CreatureEffect2.
- renamed guardian to laserhead.
- moved some structure to their right place.
- renamed TYPE_ZONE to ZoneTypeEnum.
- fixed zoneType not using ZoneTypeEnum as variable.
- fixed LOT.zone not using ZoneEnumType.
- changed "variable : 1" to bool in some structure.
- implemented @krys new collision structure and improved it a bit (but commented for "later")
- level need #pragma pack(push, 1) #pragma pack(pop) to work (for structure), else it crash at LoadTexturesInfos().

Co-Authored-By: krys <krys@users.noreply.github.com>
2020-05-28 15:17:34 +02:00
TokyoSU
9045a2206d Partially finished Entity Folder Refactoring
- Less Compile Time
- ObjectInfo now use std::function.
- added isPickup and isPuzzleHole in ObjectInfo.
- Renamed EVIL_LARA to LARA_DOPPELGANGER (DOPPELGANGER in xml)
- Removed TR1 Larson/Pierre and TR1 Raptor.
2020-05-27 19:07:34 +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
Montagna Marco
1bb0546753 Fixed math function names; Fixed effects rendering; Fixed Lara matrices; 2020-05-01 06:33:43 +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
85e462f6a2 First EXE build successfully 2020-04-24 19:15:05 +02:00
Montagna Marco
4cc46789e9 Decompiled input 2020-04-23 19:22:01 +02:00
Montagna Marco
9f05715977 Decompiled level loading functions; Moved lot of vars in DLL; Added Zlib; 2020-04-22 14:12:10 +02:00
Montagna Marco
4246d8ae46 Decompiled UpdateStorm(); Code cleaning; 2020-04-14 06:11:10 +02:00
Montagna Marco
97c6fe0dd8 Decompiled FixedCamera() and CameraBoundsCollide() 2020-04-09 14:19:18 +02:00
Montagna Marco
3f35e4de4f Refactoring 1 2020-04-01 13:09:14 +02:00
Montagna Marco
bd199af075 Refactoring; Added all sounds from all TR; Removed trash legacy functions for skinning and meshes processing; New skinning procedure, without fixed arrays; Code cleaning; Decompiled LoadSamples; Dynamic size sound map; 2020-03-02 09:49:11 +01:00
Montagna Marco
15f47b3e6c Fixed sky not drawing 2020-01-19 20:13:22 +01: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
c89f89f607 Added title flyby; Added scripted audio tracks; 2019-05-31 21:45:20 +02:00
MontyTRC89
3e13bdd891 New setup dialog; Refactoring configuration dialog; Refactoring strings; New strings added; 2019-05-08 21:11:18 +02:00
MontyTRC89
0e49d65c8e Added TR3 flamethrower; Added TR3 spiky ceiling; Added TR3 spiky wall; Added TR4 horse and horseman; New slots; 2019-05-06 23:48:44 +02:00
MontyTRC89
112d33374d Improved resolution change; Added windowed setting; 2019-05-02 21:19:24 +02:00
MontyTRC89
c30ed7373f Refactoring; Added fixed extra rotation to inventory objects; 2019-04-30 12:56:27 +02:00
MontyTRC89
5a2842f89d Refactoring 2019-04-29 13:10:58 +02:00
MontyTRC89
80cbe5a4f0 Finished controls settings; Added some global variables; Fixed load and save configuration; 2019-04-28 16:48:29 +02:00