Commit graph

71 commits

Author SHA1 Message Date
Lwmte
64f1be7c37 Cleanup savegame and sound code 2021-10-31 23:55:17 +03:00
Lwmte
cbbb28e388 Restore background track on savegame reload 2021-10-29 03:39:22 +03:00
Lwmte
d470cdcf01 Refactor and fix sound code 2021-10-29 02:22:26 +03:00
Lwmte
27c4dee8b2 Merge branch 'master' into errors 2021-10-28 11:28:24 +03:00
MontyTRC89
51cc21338e Linked all the coded for loading and saving 2021-10-15 05:55:22 +02:00
MontyTRC89
174183ad20 Working on new savegames, first prototype load and save (missing UI) 2021-10-11 10:44:28 +02:00
Troye
552352dd21 W1 2021-09-25 16:03:28 -05:00
Lwmte
1d0ceb0ff4 Fix more stuff 2021-09-16 01:12:19 +03:00
Lwmte
68923228dd Remove unused globals and move others from control.cpp to needed source files 2021-09-15 21:09:09 +03:00
Lwmte
b9ff80220e Move all sky stuff to renderer 2021-09-09 13:30:49 +03:00
Lwmte
ba6c260b92 Further code organizing 2021-09-08 18:19:06 +03:00
hispidence
bc9e863307 Give documentation comments new tag names. Part 2 of making the documentation better. 2021-08-23 19:16:24 +01:00
hispidence
6c3f2d1673 Update SetScriptErrorMode call. 2021-08-21 00:15:56 +01:00
hispidence
10419d15a8 Fixed some GameFlowScript.cpp warnings:
Remove SkyVelocity1 and SkyVelocity2 - they weren't being used.
Change a loop var to a size_t.
Make GameScriptInventoryObject.yOffset a short.
2021-08-20 02:42:47 +01:00
hispidence
07a756a369 Remove some unused includes. 2021-08-17 14:23:47 +01:00
hispidence
9b4cd106d1 Make some getters const. 2021-08-17 13:37:08 +01:00
hispidence
672f90e238 Add documentation for SetGameFarView, Level.FarView, and Level.UVRotate, as well as some value checking. 2021-08-17 13:36:34 +01:00
hispidence
b8521b5224 Fail assert if string is not found. 2021-08-16 12:52:45 +01:00
hispidence
af84f318b6 Document errorMode. Make it an enum on the Lua side rather than a string. 2021-08-16 12:52:06 +01:00
hispidence
3f3b259cb9 Make window title a strings.lua string instead. 2021-08-15 23:23:33 +01:00
hispidence
813b8bb42a Add documentation comments in GameFlowScript.cpp.
Move windowTitle from GameScriptSettings to GameFlowScript and rename it to SetWindowTitleKey.
2021-08-15 23:04:56 +01:00
hispidence
196646297b Amend doc comment. 2021-08-12 17:20:09 +01:00
hispidence
686a4902a5 Update GameFlowScript to account for the changes made to GameScriptInventoryObject.
Add FROM_DEGREES calls to fix the "rot" property.
2021-08-11 01:28:37 +01:00
hispidence
156342ca14 Register GameScriptRotation in GameFlowScript and not GameLogicScript. 2021-08-11 01:26:35 +01:00
hispidence
05054a05fe Make the read-only table of kInventorySlots in GameFlowScript instead of GameLogicScript. 2021-08-08 23:53:52 +01:00
hispidence
c96a92f1cb Improve GameScriptLevel.
Rename LARA_DRAW_TYPE to LARA_TYPE as it's used in more than just drawing code. Make WEATHER_TYPE a scoped enum (would have done this for LARA_TYPE too but didn't want to pepper casts in other parts of the codebase). Relabel constants in both enums.

Add kLaraTypes and kWeatherTypes and add them as tables in GameFlow.

Remove Background member - it's not level-specific so GameFlow is a better home for it.

Add (incomplete for now) documentation for some GameScriptLevel members - those I tested, at any rate.
2021-08-07 19:20:17 +01:00
hispidence
e409222739 Clean up GameFlowScript.
Remove a lot of members which were unused and which represented level properties already accounted for in GameScriptLevel.

Make TITLE_TYPE an enum class and relabel its values.

Add TitleScreenImagePath and SetTitleScreenImagePath, which replaces GameScriptLevel's Background member.

Register GameScriptColor in GameFlowScript since we will be using it for the fog and sky layer properties of levels.
2021-08-07 19:13:36 +01:00
hispidence
7d26686836 Add ErrorMode to GameScriptSettings (C++) and errorMode to settings (Lua). Call SetErrorMode in LoadGameFlowScript. 2021-08-06 16:44:37 +01:00
hispidence
4155d5faa4 Change ExecuteScript and ExecuteString to return void and throw a TENScriptException on error. Remove my old comments which didn't really add info. Implement SetSettings. 2021-08-03 15:12:24 +01:00
hispidence
b566e33f68 Missed these in the last commit. 2021-07-28 19:06:15 +01:00
hispidence
b94cc960a2 Clean up GameFlow and GameScriptLevel by adding default member initialisers. Replace GameScriptFog with GameScriptColor. Rename some enums for consistency. Make TITLE_TYPE and enum for consistency. 2021-07-26 18:23:29 +01:00
hispidence
16b3511d5f Make GetString return a char const *.
Make Intro a char const *.
2021-07-23 21:48:49 +01:00
Troye
5d8bb0014d FLARE_AGE constant; fix dynamic light intensity; fix release builds 2021-07-13 22:29:47 -05:00
MontyTRC89
cf98c30910 Merge branch 'NewLuaScripting' of https://github.com/MontyTRC89/TR5Main into NewLuaScripting 2021-06-26 07:37:02 +02:00
MontyTRC89
a4d3ec9d26 Switched audio tracks from int index to string; Added Tracks.lua loading support; 2021-06-26 07:36:54 +02:00
hispidence
1fbb41d997 Remove Strings and CurrentStrings from GameFlow; they were for the old system. Remove LoadScript for the same reason. 2021-06-25 14:33:26 +01:00
hispidence
350d0426ca Remove assignment that already happens in LuaHandler. 2021-06-23 21:27:04 +01:00
MontyTRC89
a455a091c0 Removed test code; Removed scripts from project (they will be created by LD); Added some missing strings for inventory; Added scripting for puzzles; Removed some old code for scripting; 2021-06-23 05:58:24 +02:00
MontyTRC89
dc5db910f2 Added translations support and fixed some bugs with strings 2021-06-20 06:33:44 +02:00
MontyTRC89
e2e4022188 Merge branch 'master' into NewLuaScripting
# Conflicts:
#	TR5Main/Scripting/GameFlowScript.cpp
#	TR5Main/Scripting/GameFlowScript.h
2021-06-19 07:20:04 +02:00
MontyTRC89
a4467c2a4b Moving to stringed keys for game strings 2021-06-19 07:11:22 +02:00
hispidence
7ff1ab2349 GameFlowScript changes:
Remove all code related to reading SCRIPT.DAT.

Include AudioTracks.h, which, I emphasise, is temporary until we start listing audio tracks in Lua.

Hardcode language to English for now.

Add WeatherType and LaraType usertypes. These were in the Lua scripts but weren't connected with their related C++ types.

Name -> NameStringIndex; the latter is what the engine reads, and as far as I can tell, that is what GameFlow.lua is passing.

Add _GameFlow usertype to correspond to the GameFlow class. I don't think this is the perfect way to expose this functionality to Lua, but it will do the job for now.

GameFlow's destructor now deletes its dynamically allocated memory. Note that I haven't fully looked into whether said memory needs to be dynamically allocated; I just new'd GameScriptLevels and LanguageScripts because they were being new'd in the original implementation.
2021-06-16 15:05:10 +01:00
asasas9500
10a3d9167a Fix line endings 2020-12-21 13:16:29 -03:00
Raildex
a3433e16cb Deactivated Pool memory
@TODO: Fix Pool
Changed pointers for ChunkIds to smart pointers
2020-08-11 19:18:36 +02:00
Raildex
b635f4df13 Fixed std namespace collisions
Refactored ChunkID/ChunkReader/Writer
2020-06-20 23:39:08 +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
MontyTRC89
6bff6caed2 Decompiled input 2020-04-23 19:22:01 +02:00
MontyTRC89
b496c3caba Decompiled UpdateStorm(); Code cleaning; 2020-04-14 06:11:10 +02:00
MontyTRC89
ac7d6b95f7 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
MontyTRC89
19bfa217df Fixed sky not drawing 2020-01-19 20:13:22 +01:00