Commit graph

771 commits

Author SHA1 Message Date
Lwmte
222177f45b
Mirrors (#1519)
* WIP TR4 style mirrors

* Fixed broken previous commit

* Added debris and effects drawing in mirrored rooms;
Some optimizations for early skip non mirrored items;

* Implemented mirrors in file format

* Use default argument value for ReadCount

* Use emplace_back and camera room number

* Fixed items culling in mirror rooms;
Changed file format for having also virtual room;

* Cached reflection matrix of mirrors at load time;
Fixed lighting in mirrored items;
Added bad cull mode after mirrore debrises drawing;
Added mirroring of dynamic lights;

* Fixed ambient occlusion in mirrored rooms

* Fixed random statics positions while shooting

* Added logic for hiding selectively reflecting moveables and statics;
Added enabled flag for disabling mirrros in the future with LUA;

* Simplify renderer code, remove excessive if statements

* Update level.cpp

* Decopypaste more mirror-related code

* More decopypasting, rename inline function, remove unneeded arg

* Remove unnecessary inline, dont reflect room lights

* Fixed billboards, reintroduce ReflectVectorOptionally

* Fixed dynamic lights

* Update RendererDraw.cpp

* Fixed 3D sprites mirroring

* Draw reflections also when Lara is in any of mirrored rooms, not only camera

* Remove unrelated changes

* Remove lambdas

* Rename fields for consistency

* Reorganize renderer code a little

* Rename

* Spawn mirrored dynamic lights in Lara rooms too

* Update RendererDraw.cpp

* Add option to reflect sprites

* Update CHANGELOG.md

* Fixed mirrors on savegame reloading

* Fix Lara not mirroring when using binoculars

* Continuation of previous fix

* Fixed 3D non-sorted sprites mirroring

* Fixed various binocular / lasersight issues

* Fix meshswap, if object is not present

* Don't perform binocular animations if binocular meshswap is not present

* Rename CamOldPos and use more consistent type for it

* Update title.bin

* Fixed #1521

* Fixed #1522

* Interpolate Lara flare light, hide target highlighters in binos

* Fix #1525

* Fixed postprocessing order and precompile shaders to speed-up loading

* Fixed #1524

* Fixed silent crash if several Lara objects are present in level near dynamic light with shadow

* Implement proper soft shadows

* Disable self-shadowing for now, as it's causing visual glitches

* Update RendererInit.cpp

* Update CHANGELOG.md

* Update CHANGELOG.md

* Formatting pass

* Revert "Formatting pass"

This reverts commit 88a8ba24de.

* Reapply "Formatting pass"

This reverts commit becd24da93.

* Update RendererFrame.cpp

* Final formatting pass

---------

Co-authored-by: MontyTRC89 <montyhammet@hotmail.it>
Co-authored-by: Jakub <80340234+Jakub768@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2024-12-25 10:21:07 +02:00
Lwmte
e3ecc3acdb Update docs, fix savegame formatting, bump version 2024-12-24 23:22:02 +01:00
Lwmte
3ea8978c67 Rename traveledDistance to distanceTraveled 2024-12-24 20:04:13 +01:00
Lwmte
b62c8d7c40 Minor changes 2024-12-21 20:01:55 +01:00
Lwmte
0ae3888456 Expose different animation slots to scripting API 2024-12-21 10:09:00 +01:00
Lwmte
db717658fc Added references to Type module 2024-12-16 21:33:37 +01:00
Lwmte
ae79247979 Update docs 2024-12-16 08:10:26 +01:00
Lwmte
0abb8981ba Add separate binoculars/lasersight camera types, correct default gunflash ranges 2024-12-16 01:11:33 +01:00
Lwmte
8d08a9feb5 Move statistics back to TEN classes 2024-12-15 23:59:31 +01:00
Lwmte
63a5464d00 Clarify documentation 2024-12-15 23:50:41 +01:00
Lwmte
773c5bb7bb Remove obsolete mirror class, more cleanups in documentation 2024-12-15 23:47:59 +01:00
Lwmte
becadbf046 Fixed time reference 2024-12-15 23:40:58 +01:00
Lwmte
f97d257fd1 Add optics camera type, big enum cleanup and doc formatting 2024-12-15 23:34:33 +01:00
Lwmte
4f66f24bbd Return flyby camera type, if flyby is active 2024-12-15 21:21:55 +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
1f1d3b2aad Delete old documentation when recompiling 2024-12-02 23:57:17 +01:00
Lwmte
c0a93612ae
Dynamic spotlight (#1488)
* Initial commit

* Update CHANGELOG.md

* Provide helper method to convert rotation to directional vector

* Remove unneeded arguments, add missing function registration

* Fixed direction

* Fixed incorrect behaviour of Moveable:GetJointRotation() function

* Add optional castShadow flag to light functions

* Fixed spotlight shadows

* Cleanup

* Fix spotlight shadows again

* Interpolate dynamic lights, if unique ID is given

* Use name instead of unique ID

* Update docs

* Update CHANGELOG.md

* Fix incorrect variable type

* Update CHANGELOG.md
2024-11-28 23:09:29 +02:00
Lwmte
b5fa51b2dc Recompile docs for 1.6, version update 2024-11-21 18:27:42 +01:00
Lwmte
9fad7eec50 Fix mistake in documentation 2024-11-21 16:41:18 +01: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
Joey Quint
db68eeaca3
Expose wind (#1465)
* Expose wind

* Update EffectsFunctions.cpp

---------

Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-20 09:15:26 +02:00
Sezz
2624c5bed2 Formatting 2024-11-16 22:07:57 +11:00
Stranger1992
3cb6eec261 Add Strings.DisplayString Enum page
Also:

* bumped up engine version with a developers tag.
* Increased margin of the menu to accommodate changes
2024-11-15 00:52:36 +00:00
Lwmte
784f957596
Fast reload (#1445)
* Initial commit
* Fix crash on title
* Update level.cpp
* Update CHANGELOG.md
* Do slight audiotrack fade-ins and fade-outs on leveljumps
* Implement hash checks
* Fixes
* Rename rapid to fast
* Fixed flipmaps and bridge reinit
* Bypass reinitializing renderer for fast reload
* Fix issue when title and last loaded level are the same files
* Update CHANGELOG.md
* Additional fixes
* Wrap savegame loading code into a try-catch
* Update CHANGELOG.md
* Remove door collision on fast reload, restore stopper flag
* Display log message if level file was not found
* Update CHANGELOG.md
* Clear blocked flag for boxes
* Implement fast reload setting
* Add defaults to settings
* Consistent naming
* Smooth level loading audio crossfades
* Stop non-ambience soundtracks early
* Minor formatting
* Update Settings.lua 
---------

Co-authored-by: Jakub <80340234+Jakub768@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2024-11-11 12:55:50 +02:00
Lwmte
f51d499e68 Regenerate documentation 2024-11-03 11:39:16 +01:00
Lwmte
4a8d66d077 Update Objects.ObjID.html 2024-11-03 10:54:23 +01:00
Lwmte
45fca95385 Added recompiled doc files 2024-11-02 19:26:40 +01:00
Joey Quint
840b32fb71
Expose moveable's target state to Lua API (#1436) 2024-11-02 14:44:27 +02:00
MontyTRC89
5f974935b4 Fixed black screen and stretched strings after changing display settings in game. 2024-10-29 06:01:03 +01:00
MontyTRC89
4f3ea36bc1 Temporarly hack for solving invisible Lara in some cases with HUB system 2024-10-13 05:52:52 +02:00
MontyTRC89
061d152207 Fixed rolling ball interpolation 2024-09-29 06:16:13 +02:00
MontyTRC89
1695caa602 Interpolation disable by default on CreateItem();
Interpolation enabled in renderer always after the first frame;
2024-09-06 06:07:12 +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
Stranger1992
e4b3124a68 Rename hair objects to distinguish between the two
ID_HAIR -> SINGLE_BRAID_HAIR
ID_HAIR2 -> DUAL_PIGTAIL_HAIR
2024-08-16 00:09:13 +01:00
Sezz
e3c1ccf5c2 Integrate GetWaterSurface(), GetWaterDepth() and GetWaterHeight() into PointCollisionData 2024-08-16 02:12:41 +10: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
TokyoSU
b9b99af3d2
Seal Mutant Port (#1392)
* begin mutant crawler import

* progress.

* Update MutantCrawler.cpp

* Done seal mutant.

- Changed how ThrowPoison color worked.
The old function didn't really reflect the correct color.

* Update CHANGELOG.md

* Improve ThrowSealMutantGas

* Add ID_SEAL_MUTANT scripting ID

* Update ObjectIDs.h

* Remove IsLaraCrouching()

* Use correct data types for poison effect

* Use references, not pointers

* Use proper spacing

* Use const

* Remove magic numbers, ordering, const, etc

* Remove pointless CreatureBiteInfo constructor; remove global constants;; etc

* Formatting, cleanup

* Replace GetRandomControl() usage

* Comment

* Update CHANGELOG.md

* rename variable

* demagic numbers

* Define constants

* Remove anim data checks

* Update poison gas spawn function

* Update tr3_flamethrower.cpp

* Update SealMutant.cpp

* Update seal mutant

* Update seal light

* Update SealMutant.cpp

* Minor changes

* Update sealMutant

* Update effects.h

* Update flamethrower to have lara as target too.

* Revert feffects from int to uchar

* Cleanup

---------

Co-authored-by: Kubsy <kubadd475@gmail.com>
Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Jakub <80340234+Jakub768@users.noreply.github.com>
Co-authored-by: Jakub <kubabilinski03@gmail.com>
2024-08-11 16:48:52 +01:00
Stranger1992
f804c794f8 Fixed an error in the KeyClearAll() function that prevented it from being displayed in the Lua API 2024-07-03 15:49:38 +01:00
Sezz
063e994213 Merge branch 'develop' into develop_60fps 2024-06-04 19:16:48 +10:00
MontyTRC89
d5ed115d50 Fixed wrong positions for transparent faces in moveable items 2024-05-16 11:49:58 +02:00
Jakub
654e3a0381 remove changes.txt (changelog is now in CHANGELOG.md) 2024-05-16 09:31:38 +01:00
Sezz
715df20e1f Fix crosshair angle interpolation 2024-05-11 01:51:48 +10:00
Sezz
fa697cc26e Update lens flare Lua API 2024-05-10 22:20:04 +10:00
MontyTRC89
1bd1832037 WIP solution for variable monitor refresh rates 2024-05-09 05:42:36 +02:00
Sezz
d49dd998be Merge branch 'develop' into develop_60fps 2024-05-08 14:11:51 +10:00
Sezz
e7889d2b88 Update colour objects 2024-05-08 14:10:45 +10:00
Sezz
2eb2ff877d Starfield and lens flare cleanup 2024-05-08 13:47:47 +10:00
Lwmte
83b6258de0 Merge branch 'develop' into develop_60fps 2024-05-03 10:16:48 +03:00
Lwmte
57cf323d73 Add autodelete parameter to ShowString 2024-05-03 10:16:32 +03:00
MontyTRC89
cedad8c3ab Merge branch 'develop' into develop_60fps 2024-05-01 05:33:10 +02:00