Commit graph

117 commits

Author SHA1 Message Date
Lwmte
f87d592ce6 Added Flow.GetTotalSecretCount() 2025-03-09 19:14:39 +01:00
TrainWrack
f1bb383baa
Horizon Effects (#1583)
* First Commit

* Check

* Check

* Check

* Is it done?

* GetHorizonDone

* Add HorizonSwap

* Fix Interpolation

* Update CHANGELOG.md

* Update EffectsFunctions.cpp

* Update EffectsFunctions.h

* Docs

* Create Horizon Class and implement it.

* Fix Interpolation

* Make HorizonObject part of WeatherController

* Implement horizon fading

* Save horizon parameters

* Update CHANGELOG.md

* Update RendererDraw.cpp

* Update EffectsFunctions.cpp

* Invert current horizon transition value if another transition is queued

* Add missing shader change

* StartPosition

* Cleaup

* Start working on Position

* Code commit

* Fix interpolation checks distance for position.

* Docs

* Update CHANGELOG.md

* SavePosition in savegame

* Major cleanup

* Update weather.cpp

* First commit

* Some fixes

* Reworked horizon workflow

* Update CHANGELOG.md

* Update docs

* Added missing rumble parameter

* String constants; use TypeOrNil; general cleanup

* Fix documentation

* Fix documentation

* Update documentation

---------

Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2025-03-09 06:30:07 +02:00
TrainWrack
d19d56acee
Collision Class (#1579)
* First Commit

* Make ScriptCollision class

* Fix typo

* Return correct types

* Use NO_HEIGHT

* Implement GetSurfaceMaterial

* Add enums

* Added death, climbable wall, monkeybar

* FIx angle

* Revise things

* Make "Collision" script module; add IsOutOfBounds() method

* Rename IsOutOfBounds()

* Allow getting floor or ceiling material type

* Don't need IsWall()

* Update Collision.cpp

* Restore IsWall()

* Rename class to "Probe"; start docs; make steepness inquirers return an optional

* Update Probe.cpp

* Update class name in doc

* Update Probe.cpp

* add GetRoomName

* UpdateEnums

* Update MaterialType enum; make room name getting more local

* Revise constructors; update doc

* Update Probe.cpp

* Generate html docs

* Slightly clearer doc comments

* Convert spaces to tabs

* Update Probe.cpp

* Update Probe.cpp

* Rename parameters

* Update Probe.cpp

* ScriptProbe -> Probe

* ExposeGetRoom

* Register Collision.MaterialType table; Enable ClimbWall again.

* Cleanup

* Docs revision

* Update CHANGELOG.md

* Moved names to script reserved names

* Fixed incorrect namespace for probe

* Use consistent names; cleanup

* Make argument optional; fix doc

* Update Probe.cpp

* Add missing includes

* Add Preview() method; update docs

* Add constant

---------

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2025-03-05 10:13:48 +02:00
Lwmte
d0527bf2dd Remove GetNextLevel, as it is broken 2024-12-25 09:32:34 +01:00
Sezz
be820cac3d Some cleanup 2024-12-16 15:14:42 +11:00
Lwmte
773c5bb7bb Remove obsolete mirror class, more cleanups in documentation 2024-12-15 23:47:59 +01:00
Lwmte
f97d257fd1 Add optics camera type, big enum cleanup and doc formatting 2024-12-15 23:34:33 +01:00
Lwmte
f4763bd4a2
Customize global hardcoded parameters (#1495)
* Initial commit

* Update CHANGELOG.md

* Tint flare smoke

* Expose GetCustomizations

* Added lensflare and flicker customization options for flare

* Update LensFlare.cpp

* Remove unnecessary code

* Update lara_flare.cpp

* Massive refactor to merge animations, settings and customizations

* Add HUD customization options

* Customize weapons

* Fixed flare, renamed recoil to interval, fixed lensflare default

* Occlude flare lensflares

* Update Settings.cpp

* Use alternate damage for lasersight mode

* Added hair cust

* Fix comment

* Fix another comment

* Fix link

* Fix placeholder table names

* Reorganize types

* Add missing initializers for hair settings

* Added physics cust

* Clarify description

* Update settings.lua

* Update CHANGELOG.md

* Add gun smoke, gun shells and ammo pickup counts

* Fix naming ambiguity

* Remove missing features from documentation

* Fix comment

* Fix parameter name, change default settings file

* Fixed pitch black

* Rollback DoDistanceFogForVertex

* Add camera cust

* Change binocular/lasersight toggle to color

* Update lara_basic.cpp

* Add time and statistics classes and script API for it

* Fix comment

* Use DoDamage on Lara helpers to register with statistics

* Update Time.cpp

* Fix documentation

* Fix default flare timeout

* Update Settings.lua

* Add flare muzzle offset customization

* Remove young Lara limitations

* Fix lasersight color

* Push full settings.lua

* Update RendererCompatibility.cpp

* Allow to customize root meshes, decopypaste hair and joint init code

* Added sol Time operator overloads

* Some changes to docs, add meaningful error for unknown fields

* Use existing new index template, add gunflash color settings, add shotgun muzzle

* Remove excessive usage of GetSettings()

* Cleanups

* Update Settings.lua

* Clarify parameter name

* Fix InitializeWeaponInfo

* PR review code tidying

* Fix bad merge

* Update FlowHandler.cpp

* Remove tabs for LDoc comments

* Use different comment style to preserve formatting

* Update lara_fire.cpp

* Some cleanups

* Fixed GetTimeUnits

* Fix typo

* Update Time.cpp

---------

Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-15 18:24:49 +02:00
Lwmte
91081c9f0d
Freeze event and OnUseItem callbacks (#1463)
* Add use item callbacks, add menu boilerplate code

* Set up scripting API for game mode

* Use word "break" instead of "menu" everywhere

* Rudimentary implementation of BreakPhase

* More progress

* Doc update

* Always active lensflare

* Update CHANGELOG.md

* Fix hair interpolation for spectator mode

* Update target highlighter and other HUD elements while in break mode

* Fix various problems

* Don't try to update camera in spectator mode

* Cleanup camera code

* Rename break to freeze

* Update FlowHandler.cpp

* Update Flow.html

* Update control.cpp

* Rename method

* Add displaystring owner to differentiate between freeze modes

* Disable triggers and volumes in freeze mode

* Update control.cpp

* Rename enum

* Update CHANGELOG.md

* Implement full freeze, correct callback behaviour

* Update RendererDrawMenu.cpp

* Allow DumpGameScene to do partial pass

* Remove hack

* Introduce render mode enum to render scene without any postprocess

* Tidying

* Fix problems with items or renderer not updating before entering freeze mode

* Fix rebase errors

* Use interpolation factor getter instead of raw value everywhere

* Update documentation

* Fixed setting freeze mode from OnStart

* Fixed freeze mode not working in OnStart event

* Revert "Fixed freeze mode not working in OnStart event"

This reverts commit 87f6fbdc6d.

* Bypass cinematic bars and fades for non-full render modes

---------

Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 20:54:39 +00:00
Sezz
2624c5bed2 Formatting 2024-11-16 22:07:57 +11:00
Lwmte
99a4c68417 Add GetNextLevel and make load game behaviour consistent with scripting API 2024-11-16 10:49:52 +01:00
Lwmte
506ee0f088 Fixed #1459 2024-11-08 23:26:15 +01:00
Lwmte
cb0e8fb23e Merge branch 'develop' into develop_60fps 2024-10-05 00:28:40 +02:00
Lwmte
1e6c2158ea Add IsStringPresent script function for further usage in nodes 2024-10-02 00:16:26 +02:00
MontyTRC89
3a345e9ccb Merge branch 'develop' into develop_60fps
# Conflicts:
#	TombEngine/Game/control/control.cpp
#	TombEngine/Game/gui.cpp
#	TombEngine/Renderer/RendererDrawMenu.cpp
#	TombEngine/Scripting/Internal/TEN/Flow/FlowHandler.cpp
2024-08-16 10:19:51 +02:00
Kewin Kupilas
f2c52e61aa
Add "Lara's Home" menu entry (#1394)
* Add "Lara's Home" menu entry

* Minor things

* Move home_level into Strings.lua

* Lara's Home -> Home Level

---------

Co-authored-by: Sezz <sezzary@outlook.com>
2024-08-11 17:20:09 +01:00
Sezz
6fa494b093 Make monkey swing auto jump a player setting; Lua formatting 2024-06-06 11:42:54 +10:00
MontyTRC89
1d30d43aac Added color to lens flare;
Added LUA api for starfield and lens flare;
2024-04-28 06:31:59 +02:00
Lwmte
b8b76cd9c9 Update Flow.html 2024-04-06 08:24:22 +02:00
Lwmte
e7b36e5692 Update FlowHandler.cpp 2024-04-06 08:21:14 +02:00
Lwmte
86f9cb86c7 Add GetFlipMapStatus function 2024-04-06 08:16:07 +02:00
Lwmte
08b1bfa9ab Uncomment flipmap documentation 2024-04-04 21:33:49 +02:00
Lwmte
5383dc0056
Hub system (#1333)
* Work in progress

* Work in progress 2

* Work

* Fix Lara meshswaps appearing

* Update control.cpp

* Work

* Update lara_initialise.cpp

* Solve some problems with default weapon and holsters

* Implement actual resetHub script command, add comments and safeguards

* Update Changes.txt

* Update Changes.txt

* Additional refactors

* Add logging for hub system

* Add savegame verification, correct size writing method

* Transfer vehicles between levels

* Log vehicle transfer

* Update lara_initialise.cpp

* Move all vehicle transfer code to InitializeLaraLevelJump

* Also move health initialization to appropriate function

* Put all static fields into SaveGame class

* Formatting

* Fix pelvis pistol

* Partially fix hub vehicle loading

* WIP

* Introduce a hack for reinitializing vehicles on a hub

* Fix holsters again

* Update lara_initialise.cpp

* Better way to preserve crawl state on leveljump

* Update lara_initialise.cpp

* Update savegame.cpp

* Add IsOnHub

* Fix disappearing Lara

* Update lara_initialise.cpp

* Move inventory objects init to subfunction

* Fix issues with LevelVars reset and default soundtrack on hub restore

* Update lara_initialise.cpp

* Formatting

---------

Co-authored-by: Sezz <sezzary@outlook.com>
2024-03-21 09:06:50 +00:00
Lwmte
fcd22caafb Display missing string ID instead of "string not found" message 2024-02-18 18:36:31 +01:00
hispidence
ba648e1383 Fixed doc comments and regenerated docs. 2024-01-07 13:22:52 +00:00
Lwmte
bfc7d1b3d4
Lara start position handling (#1301)
* Implement LARA_START_POS object handling

* Update lara_initialise.cpp

* Update Changes.txt

* Update Changes.txt

* Don't use LARA_START_POSes with OCB 0
2023-12-28 20:36:33 +00:00
Lwmte
b94d21b20d Update FlowHandler.cpp 2023-12-25 09:29:26 +01:00
Lwmte
dacc2c8f6a
Get game status (#1297)
* Initial commit
* Fix issues with getting game status correctly
* Remove wrong test code
* Fix merge
2023-12-25 10:15:39 +02:00
Sezz
8991a4b9be Move DisplaySprite, ScaleModes, and AlignModes to View namespace 2023-11-10 19:23:36 +11:00
Lwmte
0f6900151e Fix Flow.FlipMap() call 2023-11-09 10:42:42 +01:00
Lwmte
0cc9312a20
Split misc namespace (#1233)
* Add Sound module

Add Sound module for sound management. Removed LDoc comments from Misc module for sound management functions. Moved the SoundTrackTypes.h file to the folder "\TombEngine\Scripting\Internal\TEN\Misc\SoundTrackTy

* Update SoundHandler.cpp

tableMisc variable renamed to tableSound

* remove functions for audio management from Misc

remove functions for audio management from Misc

* Add StopSound() function

Add StopSound(int) function

* Prevent stack overflow issue

* Update SoundHandler.cpp

* Split remaining Misc functions into modules

* moved LDoc comments above the respective functions

moved LDoc comments above the respective functions

* Fixed References to Sound.SoundTrackType

Fixed References to Sound.SoundTrackType

* Fix merge

* Minor formatting

* Minor formatting

* Move GetDisplayPosition() to Util namespace

* Fix error

---------

Co-authored-by: davidmarr <116632612+davidmarr@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2023-10-20 09:53:59 +01:00
Sezz
1f54576a45 Maybe register tables properly 2023-10-08 15:25:28 +11:00
Sezz
bf1287a9be Update FlowHandler.cpp 2023-10-06 21:01:15 +11:00
Sezz
f8583e7746 Register constants simply for now 2023-10-06 21:00:31 +11:00
Sezz
668cec5d79 Merge branch 'develop' into renderer 2023-10-06 14:20:26 +11:00
Sezz
95b8951471 Move files 2023-10-06 14:10:37 +11:00
Sezz
0d1a4b875c Add TEN::Scripting::DisplaySprite namespace 2023-10-06 13:39:29 +11:00
Sezz
8776484fab Formatting 2023-10-06 13:08:02 +11:00
davidmarr
5f8f887120
Add lua function DoesSaveGameExist() (#1221)
* internal function made available as a lua function
* Update Changes.txt
* Update FlowHandler.cpp
* Update Changes.txt

---------

Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2023-10-05 00:03:03 +03:00
Sezz
63cf3cba3a Add objects 2023-09-30 16:54:57 +10:00
Jakub
bfe545e375
Savegame functions (#1217)
* Possibly make loading work

* fix compile error

* Move LevelComplete reset to more appropriate place

* Implement Delete save and move functions to FlowHandler

* Fixes and optimizations

* Rename global

* rename func names to more meaningful ones, correct grammar.

* add a check to see if file actually exists before loading

* correct.

* add LogLevel for Delete() func

* Revert "correct."

This reverts commit 5e332bba95.

* Revert "add a check to see if file actually exists before loading"

This reverts commit ef9fb63aa2.

* Fix attempts to load savegames from incorrect slots

* Simplify savegame delete function

* Update Changes.txt

* Minor changes

* Disable Save/Load quick actions when EnableLoadSave is false

* Formatting

* Implement enable load/save into lua

* Fix merge

* Update Changes.txt

* Update savegame.cpp

* Fix savegame count not properly increasing, don't reload headers every frame in menu

* Update savegame.cpp

* Set TimeInMenu default value to -1.0f

* Minor changes

---------

Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2023-09-25 11:06:40 +01:00
Lwmte
1d256322cf Make SystemStrings.lua loading optional 2023-09-23 08:34:27 +02:00
Lwmte
f677a5071c
Split strings file (#1204)
* Initial Commit
* Rename
* Alphabetise system strings; minor formatting
* Fix missed rename
* Alphabetise user strings
* Newline
* Bug fix with default Strings.Lua file resulted in a crash.
* Rename in iterator

---------

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
2023-08-31 23:14:17 +03:00
Jakub
491e43aa2d
renderer fix and bilinear filtering (#1193)
* Fixed wrong spotlight specula attenuation;
* Fixed possible bug with spotlghts;
* Attempt to fix the saturate problem of lights
* Restored old saturate in rooms shader
* Removed commented code
* Added experimental point filer set by gameflow
* Fixed compilation error
* Fix includes, change defaults, update Changes.txt

---------

Co-authored-by: MontyTRC89 <montyhammet@hotmail.it>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2023-08-27 10:05:08 +03:00
Adngel
f50e2447b2
Adngel lua weapons functions (#1199)
* LaraAmmoType and GetAmmoType.

Added the Lua function GetAmmoType
Added the enumerator LaraAmmoType for the engine uses.
Added the enumerator AMMO_TYPE_IDS for the Lua api.

* Added security checks to AddCallback.

AddCallback now will print information in the log if the function is already added, to avoid duplication.

* Added security check to RemoveCallback function.

* Ortographic mistake

* Fix SetAction function

The function now will accept compound values, for example:

ItemAction.USE | ItemAction.COMBINABLE

* Fix in GetAmmoType

Now it collect correctly the data from the special ammo weapons.

* Formatting

* Formatting

* Formatting

---------

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
2023-08-24 20:16:14 +01:00
Sezz
c8e75ea717
Vec2 scripting object refactor (#1167)
* Vec2i and Vec2 for scripting

* Update converter

* Add arithmetic methods; add ToVec2() and ToVec2i() converters

* Fix typo

* Convert to switch case

* Update savegame.cpp

* Formatting

* Update objects

* Formatting

* Maybe fix Vec2 load

* Remove Vec2i

* Update Vec2.cpp
2023-08-13 14:59:49 +10:00
Lwmte
1f17dd9995 Replace filesystem::exists with is_regular_file and is_directory to resolve ambiguity in file checks 2023-06-02 20:33:37 +02:00
Lwmte
4d63d92364
x64 version (#1113)
* Sort out compiler errors (excluding external libraries)

* Add TODO comment

* Use empty() method

* Fix wrong casts

* Fix new warnings

* Fix merge error

* Revert "Merge branch 'develop' into sezz_x64"

This reverts commit f695769189, reversing
changes made to 54c5e0c70d.

* Revert "Revert "Merge branch 'develop' into sezz_x64""

This reverts commit e1128c41f8.

* Update all libraries with x86 versions, organize lib directories, update x64 config

* Show app bitness in a log file

* Fix text rendering by uncommenting ToWString helper function

* Ship dlls and automatically replace them when switching between x86/x64

* Update TombEngine.vcxproj

* Adjust ammo struct; remove unneeded line

* Update broken x64 config for release mode

* Fix more project config inconsistencies

* Update TombEngine.vcxproj

* Remove unnecessary casts

* Tabs not spaces

* Update TombEngine.vcxproj.user

* Revert "Update TombEngine.vcxproj.user"

This reverts commit c168943ed0.

* Add x64 lua53.lib, remove DLLs.

---------

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Co-authored-by: hispidence <squidshirehimself@gmail.com>
2023-05-21 16:01:27 +01:00
Sezz
84f0215d8c Formatting 2023-05-18 15:19:23 +10:00
hispidence
961270ac8d Rename assetvars to gamevars, make some better function names. 2023-05-13 17:31:13 +01:00