Commit graph

72 commits

Author SHA1 Message Date
Lwmte
fb65e68191 Remove broken CollideStaticObjects function
# Conflicts:
#	TR5Main/Game/collide.cpp
2021-09-02 19:50:10 +02:00
Lwmte
cccd7a048b Clarify function names
# Conflicts:
#	TR5Main/Game/collide.cpp
2021-09-02 19:49:07 +02:00
Lwmte
1115b9d5f5 More cleanup 2021-08-30 10:34:20 +03:00
Lwmte
31cb8408eb Remove more magic 2021-08-26 19:00:50 +03:00
Lwmte
dd3b6fa4e5 Move collision and FX functions from effect.cpp 2021-08-26 15:54:52 +03:00
Lwmte
d5597dc35e Rename DoObjectDynamics to DoProjectileDynamics 2021-08-26 14:13:29 +03:00
Lwmte
6a10fab856 Move and rename DoProperDetection to collide.cpp 2021-08-26 12:37:46 +03:00
Lwmte
162d6c05db Remove GetTiltType, swap wrongly named TiltX/TiltZ variables (mistake by Core) 2021-08-26 11:39:08 +03:00
Lwmte
c0cb6ae37c Organize COLL_INFO 2021-08-25 06:54:17 +03:00
Lwmte
f69f723a85 Further fixes 2021-08-25 06:33:15 +03:00
Lwmte
e35e6acf8e Cleanup and comment GetCollisionInfo 2021-08-25 05:45:10 +03:00
Lwmte
0b8ca4fa54 Replace all remaining occurences of coll globals 2021-08-24 16:54:26 +03:00
Lwmte
b7d014080b COLL_RESULT conversion in progress (broken) 2021-08-22 01:39:14 +03:00
Lwmte
ef2ff5bf51 Completely get rid of TriggerIndex 2021-08-20 15:26:12 +03:00
Lwmte
218e9f685a Replace all direct occurences of TestTriggers with TestTriggersAtXYZ and references to TriggerIndex global in structs 2021-08-20 14:13:06 +03:00
Lwmte
6727138e64 Add RefreshFloorGlobals hack to temporarily fix issues with monkeyswing and possibly other states 2021-08-19 18:43:52 +03:00
MontyTRC89
e798d50d32 Fixed ID_SAS; Fixed serious bugs with CreatureActive(); Fixed grenades;' 2021-04-29 06:26:30 +02:00
asasas9500
43fffd9746 Delete leftover code 2021-02-07 01:20:50 -03:00
asasas9500
12a3da6875 Make Lara aware of virtual rooms 2021-01-07 11:16:21 -03:00
asasas9500
d4c6cc4a97 Fix line endings 2020-12-21 13:16:29 -03:00
asasas9500
dfcd40463a Revert collision vectors 2020-12-20 00:00:18 -03:00
asasas9500
671d59e1c8 Merge branch 'DiagonalCollisions' into NoShifts 2020-08-07 16:43:29 -03:00
KrysB4k
b57cc8d5c1 Merge branch 'master' into DiagonalCollisions 2020-07-26 10:51:06 +02:00
Montagna Marco
014aa1baa7 Frames refactoring 2020-07-25 18:02:35 +02:00
asasas9500
219fe4c1db Fix namespace 2020-06-21 14:31:35 -03:00
asasas9500
64923f91aa Merge branch 'DiagonalCollisions' into NoShifts 2020-06-09 12:09:00 -03:00
KrysB4k
dec07d9c7f Revert "Added ChocolateFans functions"
This reverts commit c3f4b5c62f.
2020-06-09 16:26:14 +02:00
KrysB4k
c3f4b5c62f Added ChocolateFans functions
SnapToDiagonal() and SnapToQuadrant replace the angle switchcases in some of Lara's anim collision functions
2020-06-08 16:29:03 +02:00
KrysB4k
3a2e2a4b61 Merge branch 'master' into DiagonalCollisions 2020-06-07 20:32:00 +02:00
TokyoSU
024a2e5612 Refactored Crocodile
- Refactored the bat a bit.
- Improved crocodile code style.
- Fixed crocodile attack range.
- Fixed crocodile water/land transition.
- Fixed crocodile not aligning to floor rotation.
- Simplified CalcItemToFloorRotation() and added a description to inform and warn the user.
2020-06-07 09:30:14 +02:00
KrysB4k
9af4e39456 Added GetOrthogonalIntersect()
GetOrthogonalIntersect() replaces bloated dir switch case in functions like TestLaraVault() and similar
2020-06-07 02:49:38 +02:00
asasas9500
b3b4d22476 Move COLL_TYPE, HEIGHT_TYPES, HEADINGS and OCTANTS to control.h 2020-06-06 19:05:54 -03:00
asasas9500
89a7801212 Merge branch 'master' into NoShifts 2020-06-06 18:37:21 -03:00
KrysB4k
bf60b8cff2 Merge branch 'master' into DiagonalCollisions 2020-06-06 23:17:16 +02:00
asasas9500
ea975e554b Create RotateBoundingBox() 2020-06-06 17:55:05 -03:00
asasas9500
4f3a87664a Merge branch 'DiagonalCollisions' into NoShifts 2020-06-06 16:00:44 -03:00
asasas9500
8dfe41f8d1 Move COLL_TYPE, HEIGHT_TYPES and HEADINGS to collide.h; Create OCTANTS, SnapToQuadrant(), GetQuadrant(), SnapToDiagonal() and GetOctant() 2020-06-06 15:48:38 -03:00
KrysB4k
2943609195 Add GetDiagonalIntersect()
GetDiagonalIntersect() returns Vector2 with x and z coordinates aligned to diagonal, offset by LARA_RAD
2020-06-06 20:37:19 +02:00
asasas9500
a627e08583 Improve collision vectors 2020-06-04 15:09:54 -03:00
TokyoSU
ee59d27517 (Broken) Deleted Global Folder
- No more enums.h, constants.h, macro.h, etc...
- moved all structure in types.h to there respective file.
2020-05-30 15:55:23 +02:00
TokyoSU
2c5a621cb3 Refactor include and moving some structure to right file
- started moving structure out of types.h.
- fixed ExtraAnim using 0 instead of -1.
- changed void(*)(); to function<> for lara routines.
- changed short(*)() effect to function<> for CreatureEffect/CreatureEffect2.
- renamed guardian to laserhead.
- moved some structure to their right place.
- renamed TYPE_ZONE to ZoneTypeEnum.
- fixed zoneType not using ZoneTypeEnum as variable.
- fixed LOT.zone not using ZoneEnumType.
- changed "variable : 1" to bool in some structure.
- implemented @krys new collision structure and improved it a bit (but commented for "later")
- level need #pragma pack(push, 1) #pragma pack(pop) to work (for structure), else it crash at LoadTexturesInfos().

Co-Authored-By: krys <krys@users.noreply.github.com>
2020-05-28 15:17:34 +02:00
TokyoSU
9c1c4517d7
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
Krys
9b0139e901 Added CalcItemToFloorRotation
Added CalcItemToFloorRotation function (collide.cpp) which calculates XZ tangents and applies to item rot

Co-Authored-By: TokyoSU <tokyosu@users.noreply.github.com>
2020-05-22 12:55:03 +02:00
Montagna Marco
85e462f6a2 First EXE build successfully 2020-04-24 19:15:05 +02:00
Montagna Marco
4246d8ae46 Decompiled UpdateStorm(); Code cleaning; 2020-04-14 06:11:10 +02:00
Montagna Marco
c69cdeee40 Fixed AiPickupCollision; Fixed setup flags of many objects; Fixed item savegames; Refactored inventory; Added InitialseShootSwitch; 2020-01-12 08:02:48 +01:00
asasas9500
9933a57a02 Fix GetCollisionInfo() 2019-12-29 01:40:55 -03:00
TokyoSU
177a9c9197 Changed mgLOS to TR5 instead of using TR3 one
- changed mgLOS from TR3 to TR5.
- changed a bit GetTiltType() that normally return short.
- changed a bit CollideStaticObjects() and LaraBaddieCollision() to use "vector<short>" instead of "array".
- fixed GetCollidedObjects() where "collidedItems[numItems] = NULL" is called before last return.
- created GetRoomList() to get the roomList with vector or array return.
- structured some function.
2019-12-17 17:37:53 +01:00
TokyoSU
4bd18f7f18 Now release mode is compatible 2019-12-15 16:19:01 +01:00
Montagna Marco
39271a71a5 Fixed problems with item new room 2019-12-11 22:25:26 +01:00