Commit graph

8102 commits

Author SHA1 Message Date
Sezz
6d7fae33f9
Fix twisting hair bug + new hair class (#1039)
* Start on hair class

* Add comments

* Simplify

* Simplify

* Simplify

* Simplify

* Simplify

* Simplify

* Simplify

* Update hair.cpp

* Use DX BoundingSphere

* Add comments

* Draw debug spheres

* Dynamically determine braid segment count

* Add GetJointOffset() function

* Spaces

* Add GetBoneLength() function

* Fix bone length function

* Fix off by one error

* Simplify

* Simplify

* Optimise

* Get reference

* Half solution for young Lara's hair

* Remove debug code

* Fix off-by-one error

* Remove "this->"; apply damping to each segment

* Simplify

* Use quaternions for hair

* Fix comment

* Fix hair gimbal lock

* Twist braid correctly

* Use better names

* Add holster spheres for hair collision

* Simplify

* Update hair.cpp

* Define constant

* Braces

* Simplify

* Add comment; add safety check
2023-03-24 12:16:20 +00:00
Kubsy
1f2e815ee2 Update Changes.txt 2023-03-24 08:46:41 +00:00
Kubsy
39b2371e62
IsSoundEffectplaying lua implementation (#1037)
* implement IsSoundEffectPlaying (not working currently)

* fully working IsSoundEffectPlaying()

* Address @Sezzary 's comments
2023-03-24 07:25:27 +00:00
Lwmte
5ece5b3c03 Update Changes.txt 2023-03-21 22:31:27 +02:00
Kubsy
96a170d534 Update Changes.txt 2023-03-21 08:52:44 +00:00
Lwmte
75c6794544 Update "fake" backholster object room number as well during shooting 2023-03-21 00:52:05 +02:00
Sezz
8c45fafd5c Simplify BitField operator 2023-03-20 12:41:41 +11:00
Kubsy
121b6542c5 Update Changes.txt 2023-03-19 09:26:36 +00:00
Nemoel-Tomo
8fc38c6b4f
Tr3 boateffect (#1025)
* New rooms collector

* Fixed bugs in rooms collector;
Added caching of transformed portals vertices;

* Added more optimizations

* Fixed a bug in room collector;
Restored build configurations;

* Added static meshes caching;
Improved rooms collector;
Added statistics for rooms collector;

* Added ControlPhase time

* Corrected sme typos

* Moved scissor rectangle calculation away from draw routines

* Added cache invalidation

* test

* Normalize camera to door vector

* Added test code from OL;

* Excluded dot = 0 from doors processing; Increades stack overflow guard limit to 128; Removed test code;

* Optimized drawing of additive sprites

* Increased sprites instances count to 512 per bucket; Index UV array in shader by index instead of branching;

* Cleanded sprites shaders;
Optimized alpha blended sprites;

* Added Width and Height fields to Texture2D;
Restored underwater caustics;

* Restored bars drawing;

* Restored drawing of overlays

* Fixed fit code in DrawFullScreenSprite()

* Upgraded to DXTK 2019;
Implemented DDS loading;

* Upgraded DXTK to 2019

* Allow loading of both DDS and PNG textures

* Temporarly disabled shininess in inventory

* good progression

* Optimized alpha blended faces;
Fixed bug with floating statics alpha blended polygons;
Fixed gunshells when alpha blended faces are present on screen;
Restored debug stats also for release mode;

* update

* progression on the boat effect

* code cleaning

* formatting

* Fixed GPU states in alpha blend pass;

* added 3 useable streamers. left-right-center

* working code but without any formatting

* Some names refactoring;

* Renamed AddSprite3D to AddQuad;
Added overload to AddQuad for setting individual colors to each quad vertex;

* only test

* added waves to other vehicles

* add mist to speedboat and rubber boat

* WIP statics instancing

* Refactored constant buffers;
Restored gunflashes;
WIP dynamic lights for instanced statics;

* Polished instancing code

* Code fixes

* Changed grouping of instanced statics using std::map;
Improved instancing;

* Fixed lighting for instanced statics

* Draw gunshells with instancing

* Changed caustics frame index if out of range

* Removed not needed and repeated calculation of room's distance in rooms collector

* Avoid doing dot product if already was tested that door can't be seend by current camera position

* Removed old debug variables;
Added dot products count debug variable;
Avoid doing dot product if already done;

* Fixed normal mapping

* Fixed drawing of effects, moveables explosions and other things using the static FX;

* Instancing for scarabs and bats

* Fixed missing sorted sprites in overlapping rooms

* fixed merging issues, made branch playable

* Fixed sorted quads drawing (and now footprints work)

* Added white sprite;
Added AddColoredQuad() functions;

* pulled latest instancing branch

* included AddQuad from instancing branch

* Fixed missing sprites

* formatting

* update

* update

* merged develop to boat effect

* Organise includes

* Fix formatting

* Avoid using 5 different names for the same thing

* Avoid manual trigonometry

* Simplify use of enum class

* Prepare structs for later

* Outline streamer object methods

* Simplify

* Un-invert streamer array; use "for each" loops

* Store segments in dynamic container

* Remove unneeded function

* Simplify

* Store only 2 vertices per segment

* Progress

* Progress

* Allow for multiple instances of the same streamer

* Define constants; fix StreamerInstancer

* Update blend mode

* Simplify class structure

* Simplify

* Further restructuring

* Have smooth tail end when starting a streamer

* Pass life as value in seconds

* Update drawing

* Properly erase empty elements

* Clear up naming ambiguities

* Add assertions

* Simplify loops

* Simplify; clamp interpolation alpha value just in case

* Clear streamers during cleanup

* Simplify

* Optimise update methods

* Pass const references instead of copies of objects to quad rendering

* Simplify

* Update effect templates

* Slightly optimise sprite functions

* Add methods for streamer vertex handling

* FINALLY get AxisAngle working with streamers

* Simplify

* Update AxisAngle

* Allow streamers to rotate; simplify AxisAngle usage for helix

* Add TranslatePoint() overloads

* Progress

* Add converter method to AxisAngle

* Rename class; use flags

* Fix flags

* Use std::min

* Simplify

* Fix error

* Fix sprite blending

* Prepare vehicle wake function

* Create SpawnVehicleWake() and adopt for speedboat

* Remove commented code

* Add comment

* Update wake function

* Backtrack

* Adopt streamer function for kayak

* Update vehicle wakes

* Roughly update wake offsets

* Simplify

* Add comment; fix condition

* Update VehicleHelpers.cpp

* Update VehicleHelpers.cpp

* Adjust wake function and adopt for UPV

* Remove old streamer implementation

* Remove "this->" on member variables

* Update parameters

* Cleanup

* Update savegame

* Add failsafe

* Fix streamer opacity handling

* Update VehicleHelpers.cpp

* Rename parameters

* Make streamers fade in faster

* Adjust minecart wake offset

* Remove debug Bit.Trip rainbow

* Simplify

* rised the wakes on water level a nit for opaque textures

* Always align wakes with water surface height; demagic values

* Adjust wake function

* Use TEN assertion()

* rised the streamers a bit so that it also works on opaque textures

* adjusted speedboat wake offsets

* Fix wakes clamping on water surface

* add missing semi-colon

---------

Co-authored-by: MontyTRC89 <montyhammet@hotmail.it>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
Co-authored-by: Kubsy <kubadd475@gmail.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2023-03-19 09:17:43 +00:00
TokyoSU
5d71632710
Implemented TR3 wasp mutant. (#1015)
* Groundwork for ID_WASP_MUTANT , ID_WASP_MUTANT_SPAWNPOINT

Framework for new entities

* Removal of reduntant ID_WASP_SPAWNPOINT slot

* Update TombEngine.vcxproj

* Implemented Wasp_Mutant code.

- Improved the nodeNumber variable of particle which don't have a enum for it, also removed the TR3 offset 9,10,11 since it's for the cleaner and it was already implemented by Troye.
- Removed monster mutant which is not in this branch.

* Update Changes.txt

* Demagic values; convert GetRandomControl() calls

* Fix compile error

* Grammar

* Update tr3_wasp.cpp

* Update comment

* Fixed wasp.

- Remove random movement (wasp could just not move).
- Fixed requiredState resetting the targetState to 0.
- Added a new feature, the wasp light will fade away when dead.
- Increased the detection range of the wasp, now at 15 block (for the spawner, also to avoid using TargetVisible()).
- Fixed CreatureEffect not spawning the blood at the right place.

* Renamed wasp file.

* Update Changes.txt

* Formatting; demagic

* Use "for each" loop in particle draw function

* Simplify wasp venom sack effect

* Minor adjustments

---------

Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2023-03-19 09:16:27 +00:00
Sezz
4b624709d9 Fix comment 2023-03-17 21:06:07 +11:00
Sezz
3c50ec5ad4 Add Empty and Default static members to BitField 2023-03-17 20:03:34 +11:00
Sezz
f9a6f5a8b8 Remove uses of "this->" in BitField class and optimise 2023-03-17 19:20:48 +11:00
Sezz
4000ab08c9 Update comment 2023-03-16 22:09:27 +11:00
Sezz
e2306b45ba Simplify floordata height functions 2023-03-16 21:53:20 +11:00
Sezz
dafcf0369a Use BLOCK() 2023-03-16 17:33:44 +11:00
Sezz
76d12185ee Simplify floordata slope functions 2023-03-16 16:35:54 +11:00
Sezz
91fe4c3bf4 Simplify floordata bridge method 2023-03-16 13:43:01 +11:00
Sezz
23689774c2 Simplify more floordata functions 2023-03-16 13:05:19 +11:00
Sezz
4ea4d3a0cd Update math objects 2023-03-16 00:21:30 +11:00
Sezz
bb3ae9d495 Remove decomp comments 2023-03-15 23:14:37 +11:00
Sezz
b85f6612ea Remove "this->" from certain classes 2023-03-15 20:01:33 +11:00
Sezz
98f084d4bd Make compass needle faster 2023-03-15 18:20:39 +11:00
Sezz
b35a337bc3 Demagic alpha value 2023-03-15 00:56:57 +11:00
Sezz
c8104edb8d Fix compass 2023-03-15 00:50:00 +11:00
Sezz
d76ab1e1fa Forward declarations 2023-03-15 00:03:39 +11:00
Kubsy
63e09e6024 Update Changes.txt 2023-03-14 12:49:48 +00:00
Sezz
a0915cc085
Add exposure bar (cold environments) (#1028)
* Add cold bar

* Renames

* Fix compiler error

* Replenish cold exposure underwater

* Choose better name

* Fix cold exposure on UPV

* Update savegame
2023-03-14 12:46:42 +00:00
Sezz
7355b2373a Fix formatting from merge 2023-03-14 23:15:56 +11:00
Tony
a8bee58b04
Removed redefinition of VarMapMal and moved it to VarMapVal.h. (#1026)
This change makes the project perfectly compilable for C++20, everything works just fine.
2023-03-14 23:09:49 +11:00
Sezz
3e56786c65 Merge branch 'develop' into better_look_camera 2023-03-13 17:17:45 +11:00
Sezz
d4545acb11 Fix upside down sprites 2023-03-13 15:34:19 +11:00
Sezz
44d5de9f5c Merge branch 'develop' into sezz_sprites_in_2d_space 2023-03-12 22:48:45 +11:00
Sezz
6f83e9c406 Update comment 2023-03-12 21:43:26 +11:00
Sezz
23c92ce308 Update comment 2023-03-12 20:52:51 +11:00
Sezz
3927cdef27 Add floordata glossary of terms 2023-03-12 14:25:01 +11:00
Sezz
adc777bc2b Minor floordata revision 2023-03-12 10:36:12 +11:00
Kubsy
d0597da6b0 Update Changes.txt 2023-03-11 13:52:54 +00:00
Sezz
3009c6ffa0 Begin making sense of floordata 2023-03-12 00:26:44 +11:00
Sezz
7935ce127d Minor status bar fixes 2023-03-09 13:46:42 +11:00
Sezz
512efca814 Remove hardcoded sounds 2023-03-09 13:37:59 +11:00
Kubsy
115c548854 update changes.txt 2023-03-08 15:25:17 +00:00
Nemoel-Tomo
a953a8307e
clear camera at levelend (#1021) 2023-03-08 15:23:20 +00:00
Sezz
13309ee288
HUD revisions tier 2 (#1016)
* Create classes for status bars

* Formatting

* Remove unnecessary lines

* Add air status bar

* Simplify health bar logic

* Add sprint status bar

* Add comments

* Rename constant

* Add comments

* Simplify draw logic; adjust bar life

* Exclude torch

* Rename constant

* Prepare opacity functionality for status bars

* Simplify colour values

* Organise bar rendering code; remove unused constant

* Demagic several values

* Add constant

* Encapsulate constants inside classes; update bar display life

* Pass reference to renderer HUD bar

* Update StatusBars.cpp

* Rename parameter

* Update StatusBars.cpp

* Encapsulation

* Tabs

* Remove unnecessary parameters

* Refine health bar behaviour

* Reduce copypase

* Don't show air bar when wading in water

* Don't show air bar while treading water

* Only show air bar when necessary

* Refine check

* Don't flash sprint bar

* Initialise bars properly on level load

* Avoid depleting air bar when dead

* Remove unnecessary includes; rename local variables and constants

* Rename

* Rename function

* Update StatusBars.h

* Add GetLaraInfo() overloads

* Remove else

* Update comment

* Remove include

* Adjust bar positions
2023-03-08 15:20:04 +00:00
Sezz
d7d54fbfdd Demagic angle function values 2023-03-09 00:18:54 +11:00
Sezz
f8a8f40ac2 Allow batch item pick up underwater 2023-03-08 00:39:54 +11:00
Sezz
5dd85db64e Move interpolation functions into their own file 2023-03-06 19:03:26 +11:00
Sezz
9b2fa0237a Update Changes.txt 2023-03-04 03:19:03 +11:00
Sezz
47ec1060ab Merge branch 'develop' of https://github.com/MontyTRC89/TombEngine into develop 2023-03-04 03:17:30 +11:00
Sezz
91b43c8136 Fix formatting 2023-03-04 03:17:14 +11:00