Commit graph

8102 commits

Author SHA1 Message Date
Kubsy
ca34ec1f0f Update Changes.txt 2023-03-03 16:08:28 +00:00
Sezz
a48b644c9d Fix imp formatting 2023-03-04 03:06:16 +11:00
Stranger1992
3e9f5e88f9 Update TombEngine.vcxproj 2023-03-03 15:45:28 +00:00
Stranger1992
779b580772 Merge branch 'develop' of https://github.com/MontyTRC89/TombEngine into develop 2023-03-03 15:43:57 +00:00
Stranger1992
8a0cd18845 Update Changes.txt 2023-03-03 15:43:46 +00:00
Kubsy
3b165aecf4
slamming door backport (#1019)
* start implementing teeth spike door

* further backport.

* further backport.

* Update TombEngine.vcxproj

* finish backport (with compile issue)

* update teeth spike door

* fix blood not appearing, add to ObjectID

* Update ObjectIDs.h

* Amended internal name to be consistent with other entries

* Renames

Teeth_Spike_Doors -> Slamming_Doors

Co-Authored-By: Kubsy <80340234+Kubsy@users.noreply.github.com>

* Further renames

Co-Authored-By: Kubsy <80340234+Kubsy@users.noreply.github.com>

* Enable shadow casting

* Randomise blood at lara's position instead of slamming doors.

* demagic numbers

* Addition of new sound slots for slamming doors (previously missing)

* Update: Uses of Item Flags to use Control function damageing methods.

- This commit includes the use of Item Flags to can utilise the damaging functions from the GenericSphereBoxCollision function.
- This commit changes the item pointer for an item reference.
- This commit applies condition checks to avoid the repetitions of instructions.

* Bug fix.

Now the doors don't cause damage to Lara while they are deactivated and only will start to cause damage once they get triggered.

* Revert platform toolset

* Update SlammingDoors.h

* address Sezz comments

* Formatting

---------

Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Co-authored-by: Adngel <adngel@hotmail.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2023-03-03 15:42:45 +00:00
Stranger1992
6c3f90f1c3
Stranger1992/tr5 imp refactor (#1024)
* Imp Animation ENUMS

Demagic

* Clarify State & Anim 5

* Fixed Death routine

* Revert "Fixed Death routine"

This reverts commit ebdb20bf56.

* Re-fixed death routine and added OCB Enums

* Updated state values for consistency.

* Demagic imp damage value

* Fixed imp

- Fixed the rock mesh.
- Fixed the imp not scared of the torch (hand and floor).
- Optimized InitialiseImp() and ImpControl().

* De-magic Meshswap flag

* Demagic Attack Velocity

* Demagic rate of the meshswap changing. (Was too fast previously)

* Reduce distance check

* Update tr5_imp.cpp

* Remove second attack range

* Update tr5_imp.cpp

* Update tr5_imp.cpp

---------

Co-authored-by: TokyoSU <77746747+TokyoSU@users.noreply.github.com>
2023-03-03 15:29:53 +00:00
Sezz
ce206b3e8b Fix bubbles 2023-03-03 23:18:32 +11:00
Sezz
ac5fcd6cce Fix operators 2023-03-02 03:16:41 +11:00
Sezz
c21713749c Perfect 2D sprite scaling; rename functions 2023-03-02 02:22:54 +11:00
Sezz
b24d228a25 Merge branch 'develop' into screen_space_sprites 2023-03-02 01:26:05 +11:00
Kubsy
9b9e8b068f Update Changes.txt 2023-02-28 17:47:10 +00:00
Nemoel-Tomo
0c9d571bbd
Fixed Sophia Lee charging position (#1023) 2023-02-28 17:44:30 +00:00
hispidence
f5a68df813 Merge remote-tracking branch 'origin/develop' into develop 2023-02-27 14:55:28 +00:00
hispidence
9cd98757b7 Fixed and regenerated docs. 2023-02-27 14:33:55 +00:00
Sezz
3848940cf4 Merge branch 'master' into develop 2023-02-27 15:21:26 +11:00
Kubsy
2129ed9b1b Merge branch 'develop' 2023-02-26 11:57:02 +00:00
Kubsy
f9104ec084 delete 1.0.7 changelog to sync master with develop 2023-02-26 11:55:12 +00:00
Lwmte
52df6dbb10 Fix debug page switch regression 2023-02-26 13:18:56 +02:00
Lwmte
2b88e2bc16 Update Changes.txt 2023-02-26 08:59:11 +02:00
Sezz
2f65447c10 Define constants 2023-02-26 17:23:42 +11:00
Sezz
5961ceefb6 Formatting 2023-02-26 15:37:26 +11:00
Sezz
bf1c0eef65 Merge branch 'develop' into better_look_camera 2023-02-26 15:16:36 +11:00
Sezz
2c71eb4929 Fix monkey auto jump. 2023-02-26 13:12:56 +11:00
Lwmte
1bd493f93d Update Changes.txt 2023-02-25 23:11:49 +02:00
Lwmte
77d559ac93 Update Changes.txt 2023-02-25 22:13:14 +02:00
Lwmte
9f5e5976fb Fix missing caustics regression 2023-02-25 21:51:33 +02:00
Lwmte
0bc5edad47 Update Changes.txt 2023-02-25 21:35:18 +02:00
Lwmte
4d75dab2ae Update Changes.txt 2023-02-25 21:34:44 +02:00
Kubsy
fbe69b3bd3 Update Changes.txt 2023-02-25 17:25:16 +00:00
Kubsy
a5dbef4d25 give 1 rocket instead of 10 2023-02-25 17:24:06 +00:00
Sezz
fe7de0907b
Fix direction generation (#1017)
* Fix direction generation

* Use PI_MUL_2

* Use rejection sampling

* Add 2D point generation functions

* Simplify

* Rename parameter
2023-02-25 15:08:12 +00:00
Sezz
2b187e8757
Update drips, ripples, bubbles (#998)
* Update drips and ripples

* Make splash bubbles way cooler

* Remove LaraNodeUnderwater global; simplify wetness drip spawning

* Simplify node effects

* Add bubble spawned function for dives

* Fix dive bubble spawning

* Ripple fade wip

* Update ripples

* Remove extern

* Rename local variables

* Simplify ripples; convert enum to enum class

* Rename enum entry

* Simplify ripples

* Use "size" instead of "scale"

* Adjust ripple value

* Reorder bubble calculations

* Fix drip crash

* Reduce number of bubbles spawned

* Temporarily restore high bubble count

* Refactor node effect functions

* Maybe improve bubble lag; move player bubble handler function

* Reduce Bubble struct size

* Switch to std::vector for effects

* Also use std::vector as container for display pickups

* Revert "Also use std::vector as container for display pickups"

This reverts commit 539a7d77dd.

* Update effects.h

* Update lara_helpers.cpp

* Fix bubbles getting stuck on walls
2023-02-25 14:51:45 +00:00
Stranger1992
0237c47c0b Incorrect method correction 2023-02-25 13:47:37 +00:00
Kubsy
95a0af2fdb Update Changes.txt 2023-02-25 10:25:39 +00:00
Kubsy
0c9703ce30
Instancing - further renderer fixes (#984)
* 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

* 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

* 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;

* Fixed GPU states in alpha blend pass;

* Some names refactoring;

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

* 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 sorted quads drawing (and now footprints work)

* Added white sprite;
Added AddColoredQuad() functions;

* Fixed missing sprites

---------

Co-authored-by: MontyTRC89 <montyhammet@hotmail.it>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2023-02-25 10:20:21 +00:00
Sezz
8b925a51bb Update SophiaLeigh.cpp 2023-02-24 13:45:06 +11:00
Sezz
ac6c6711bd Maybe fix Sophia knockback range 2023-02-24 13:42:33 +11:00
Sezz
8c0408a8cb Change LARA_EXTRA_ANIM_ prefix back to LEA_ 2023-02-23 13:08:11 +11:00
TokyoSU
fe6ad46617 Fixed spear/sword guardian missing function. 2023-02-22 12:32:24 +01:00
TokyoSU
ed6f1ceef6
Fix sophia ocb and added knockback effect. (#996)
* Fix sophia ocb

- They where using flags instead of normal, also removed the immortal state in tower mode to let the modder do that instead.
- Removed the SetFlagField and GetFlagField which will be removed later.
- Increased small bolt damage, it was too low to do any damage to lara.
- Added the knockback collision for sophia. (WIP)

* added drawing for knockback shockwave

* Added knockback effect correctly.

- Need to add the explosion effect when knockback is called.

* Readd knockback type

* pulled the last commit

* new pull

* added knockbackeffect

* Fixed distance and orient for knockback

- Reduced distance for knockback to match the effect.
- Added a small explosion (only effect) to lara position when knockback is called.
- Fixed knockback velocity being invalid after orient was changed.

* Fixed double empty line.

* Update Changes.txt

* Update Changes.txt

* Fixed what @Lwmte reported

* Minor formatting; demagic values

* Add braces tabs

* Minor comment changes.

* Update SophiaLeigh.cpp

* Revert "Update SophiaLeigh.cpp"

This reverts commit c066b2ce92.

---------

Co-authored-by: Nemoel-Tomo <tomo_669@hotmail.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2023-02-22 11:07:12 +00:00
TokyoSU
fe472f66c6
Fix tr2 statue (#1004)
* Added tr2_spear transition from jade to alive

- added a smoke when the transition is done for a mesh, it need some adjust through.

* Updated sword guardian too.

* Fix spear and sword taking damage when doing transition

* Fix sword and spear joint rotation

* Fix project toolset

* Update Changes.txt

* Update Changes.txt

* Fixed sword guardian using wrong effect during transition.

- Remove TENLog in spear and sword code.
- Improved sword fly effect randomness (now in sphere).

* Fix project toolset again

* Changed sector to block

* Grammar, formatting

* Reformat enum

* Formatting

---------

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Kubsy <80340234+Kubsy@users.noreply.github.com>
2023-02-22 10:25:19 +00:00
Sezz
063a246a62 Big gun formatting 2023-02-22 12:02:01 +11:00
Sezz
8c5c0a43a8 Civvy formatting 2023-02-22 11:52:36 +11:00
Kubsy
9e0ae96fab Update Changes.txt 2023-02-21 17:09:55 +00:00
Adngel
864f23b7b7
Civvy adngel (#1000)
* Update tr3_civvy.cpp

- Reorganize includes by alphabetical order.
- Completed the States and Anim list,
- States renamed
- Changed pointers for references.
- Changed ranges that were causing block in the states machine.

* Ability to search for other enemies.

* Attack to other entities

* Update tr3_civvy.cpp

- Punches renamed with a more descriptive name.
- Added own rotation value to the Aiming states.
- Testing with AI.bite, in some cases it blocks the state behaviour when facing against enemies.

* Update tr3_civvy.cpp

* Cleaning unused code

* Changes to use ID_CIVVY instead of ID_CIVVIE

* Removed case

Lara is not in the ActiveCreatures list.

* Update README.md

* removed redundant variable.

* Update tr3_civvy.cpp

* Update tr3_civvy.cpp

* Update tr3_civvy.cpp

* Todo note

When the civvy is in function, he searches for active entities nearby and if conditions accepts, he selects it as target.

However, if an AI object is applied, that enemy search is not done, to avoid it mess with the AI objects searches that are also stored in the same creature->enemy (variable, where he also stores his target).

Because of this, when is in a AI state (PATROL, GUARD), there is not enemy search detection, so he won't snap out of the AI state unless that he get actually attacked (a condition that make him alert, and being alert, the AI states dissapear).

I leave pending for the future the polishment of this feature for this creature (that surelly will must be done in addition with other creatures).

For the others enemies, this problem is also there but is more subtle because they only have to check for Lara, but this enemy that use to be friendly to Lara, need to focus on the other entities, and the function GetAITarget is not ready for that at this moment.

* Fixed issues with update to develop branch

* Head rotation update.

Now it only will look at target if this is ahead. If it's behind, the entity will look forward instead of constantly looking at side (for the rotation clamp).

* Feedback applied

* Update Feedback

* Removal of ID_CIVVIE (Unused)

* Added fix for removal of old ID_CIVVIE slot so the ObjectIDs remain the same.

* Update Feedback

* Fixing identation

* Update tr3_civvy.cpp

* CivvyBiteStruct

* Update feedback

---------

Co-authored-by: Kubsy <80340234+Kubsy@users.noreply.github.com>
Co-authored-by: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2023-02-21 16:33:19 +00:00
TokyoSU
d0e721da80
Fix tony not using boss effects. (#997)
* Fixed tony not using boss effects.

- Fixed tony taking damage before the fight if lara is not in this detection range.

* Added orange color to tony explosion.

* Removed new hitPoints immunity

- There was already a check for that :p

* Remove old tony file.

* Formatting

* Formatting

* Update Changes.txt

* Update Changes.txt

* Fix project after develop merge

* Convert GetRandomControl() calls as requested

* Rename tony file to the old one.

* Fixed InFront flame not touching lara.

---------

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Kubsy <80340234+Kubsy@users.noreply.github.com>
2023-02-21 16:10:32 +00:00
TokyoSU
7ed6e7a08c
Fix big gun rocket exploding when spawned. (#1010)
* Fix big_gun projectile exploding instantely.

- Fix a possible crash with biggun if CreateItem() is saturated.

* Update Changes.txt

* Update big_gun.cpp

- Revert lara gunsmoke value.
- Update the projectile roomNumber when spawned.

* Minor changes
2023-02-21 15:49:49 +00:00
Sezz
34be53b45e Demagic value 2023-02-21 22:42:07 +11:00
Sezz
c2d98d7b4b Fix stepping function 2023-02-21 22:38:14 +11:00