Commit graph

6669 commits

Author SHA1 Message Date
Sezz
eb83b13e78 Simplify electric arc spline function 2023-01-21 01:30:43 +11:00
Sezz
e6885c345e Simplify loop 2023-01-21 00:11:42 +11:00
Sezz
df2acef972 Use fmod() 2023-01-20 23:18:06 +11:00
Sezz
d9462511b6 Use floats for electric arc effect positions 2023-01-20 23:06:53 +11:00
Sezz
8b79b2c20b Make more sense of weird electric arc interpolation 2023-01-20 19:49:58 +11:00
Sezz
f6564f0813 Define constants; sort out types 2023-01-20 17:33:07 +11:00
Sezz
5e336d22d8 Make heavy guard internal functions const; define constants 2023-01-20 16:11:43 +11:00
Sezz
7d240e9951 Demagic flag 2023-01-16 20:38:15 +11:00
Sezz
069a762380 Add temporary comments 2023-01-16 19:13:26 +11:00
Sezz
2aa6b32e0a Rename local variable 2023-01-15 23:45:18 +11:00
Sezz
72b056809e Rename things for consistency 2023-01-15 23:44:38 +11:00
Sezz
ea78d1d7ad Add comment 2023-01-15 22:44:31 +11:00
Sezz
ccd64823cc Greatly simplify electric arc code 2023-01-15 22:17:44 +11:00
Sezz
6d40748684 Rename parameter 2023-01-15 17:09:00 +11:00
Sezz
6fddfdb71d Add parentheses 2023-01-15 17:01:09 +11:00
Sezz
aa5ae9ad9b Update raygun smoke effect 2023-01-15 16:57:49 +11:00
Sezz
6d07c6d4c2 Use bools 2023-01-15 16:24:59 +11:00
Sezz
12e6136be0 Remove unused parameter 2023-01-15 16:06:44 +11:00
Sezz
ec83fdc74a Remove commented code 2023-01-15 15:59:50 +11:00
Sezz
453ff1e64f Rename global 2023-01-15 15:31:56 +11:00
Sezz
b2cf5bd3e1 Rename files 2023-01-15 15:21:09 +11:00
Sezz
a78c828377 Organise 2023-01-15 15:10:55 +11:00
Sezz
b174098c3b Merge branch 'master' into fix-TR5-Twogun 2023-01-14 13:14:13 +11:00
Sezz
a4b7afa9dc Temporarily switch to additive blend mode for smoke particles 2023-01-14 12:56:17 +11:00
Sezz
36e3d91089 Update effects.cpp 2023-01-14 12:14:18 +11:00
Sezz
6283377d84 Formatting of recent merges 2023-01-14 11:57:06 +11:00
Nemoel-Tomo
28de727723
changing life and max-rotation of explosion (#953)
* changing life and max-rotation of explosion
* Don't define explosion consts on a global scope

Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2023-01-14 00:19:27 +02:00
Lwmte
805d272228 Update Changes.txt 2023-01-13 19:17:42 +02:00
Nemoel-Tomo
fa2ccaabe1
OG explosion effect, fixed TR5_explosion item, seth missiles (#946)
* OG explosion effect, fixed TR5_explosion item, seth missiles
* formatting
* fixed issues, added light to the explosions
* Formatting
* update explosion sprite
* formatting the chaos
* Fix formatting
* Formatting
* fixed light from particles
* removed age field, using life field
* removed remnand of age field
* fading out lightning

Co-authored-by: Sezz <sezzary@outlook.com>
2023-01-13 20:13:04 +02:00
Lwmte
93b708bc81 Fix incorrect LOTType merge 2023-01-13 17:26:59 +02:00
Sezz
3d554b7894 Fix wrongly removed line; optimise 2023-01-14 02:16:50 +11:00
Sezz
64f6da2ece Remove unnecessary includes 2023-01-14 01:53:30 +11:00
Sezz
76066b27ec Rename a spline function, remove old commented function 2023-01-14 01:45:16 +11:00
Sezz
7a58d88386 Remove unused code 2023-01-14 01:31:59 +11:00
Sezz
044778a4cd Simplify electric arc code 2023-01-14 01:15:19 +11:00
Sezz
75bd13be75 Update Renderer11DrawEffect.cpp 2023-01-14 00:21:49 +11:00
TokyoSU
8e2443f37d
LOTType refactor (#949)
* Finished LOTType refactor
* Fixed SMALL_SPIDER zone and vault.
- Fixed SMALL_SPIDER vault climb (2 click).
- Added SMALL_SPIDER and BIG_SPIDER state and anim enum.

* Update tr2_spider.cpp
* Formatting; rename spider enum entries
* Fix comments
* Fix CreatureVault condition

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2023-01-13 15:03:10 +02:00
Sezz
c3a6c6c846 More organising 2023-01-13 23:41:17 +11:00
Adngel
c3746cd196
Fix Big Rat death crash (#952)
* Fix Big Rat death crash
* Function name changed
* Update Changes.txt
2023-01-13 14:40:36 +02:00
Nemoel-Tomo
1be5c9f651 added hit routine for head mesh, formatting 2023-01-13 11:00:21 +01:00
TokyoSU
de2e7c7ca1 Added range customize for hitRoutine
- use item->ItemFlags[7] to specify the joint detection range.
2023-01-13 10:01:00 +01:00
Lwmte
827b8d05f0 Fix #880 2023-01-13 02:28:03 +02:00
Lwmte
1bd485d5a5 Update Changes.txt 2023-01-13 01:43:42 +02:00
Lwmte
bd8afeecc4 Fix certain enemies not damaging Lara if binoculars or lasersight mode is active 2023-01-13 01:11:55 +02:00
Adngel
8041a04db4
Lua new functions adngel (#934)
* Function: Update Floor Collision

Adds a new function to allow update the Floor collision of some objects (bridges, trapdoors, platforms, etc).

* Function: Play Camera

Allows to set activate a camera while this function is called.

Right now, it requires the position and room of the target. (WIP)

* Update

* Removed the duplicated comment for UpdateFloorCollision.
* Added new function GetIndex to the class Moveable.
* Added new function GetIndex to the class CameraObject.
* Added a new variable to the object LevelCameraInfo (Index).
* Edited the function PlayCamera

* Function: GetCameraType

* Update descriptions

Updated descriptions for.
* GetItemFlags(index)
* SetItemFlags (value, index)

* Bug fix on FixedCameras.

Bug description: When a fixed camera was being triggered, and, if the target go behind and obstacle, then the screen turned black.

Reason: In those conditions, the move camera check the origin vector received, however, that vector was incomplete because it had the room 0, so although Move camera corrected the room later, it was already using some wrong calculus at room 0 that caused the black camera (this got an offset that places it out of the real room).

The reason why the vector was getting room 0, was because the operator function = of the GameVector class, was forgetting to copy the Room Number.

After this fix, the bug is not observed anymore.

* Removal of Function UpdateFloorCollision

* Erasing of forgotten line

It was included for the UpdateBridgeFunction, but as that function is not here anymore, this include is not necessary.

* GetIndex functions hidden from public lua API

They still remain as they are being used by other classes, but they can't be called by lua script anymore.

* First attempht of new Enum for lua

Need to test first.

* Removal of GetIndex() in CameraObject

The GetIndex from the moveable class, is used in CameraObject class.

But this one from CameraObject, although I created it was still unused. So I'm unmaking it.

The Index var in the LevelCameraInfo.cpp is still there and is required for PlayCamera() function to work.

* Update GetCameraType() @usage example.

* Branch Update

- Extracted CameraType enumerator to its own header.
- Fixed formatting of CameraObject.cpp line 70

* Added comments for the doc

- Added comments to the enumerator for the doc.
- Removed datar from the function description, guiding to the enumerator CameraType info.

* Update Changes.txt

Added the content of this branch to the changes.txt

* Error correction in CameraTypes enumerator header.

* Updated usage example.

Updated for a shorter example.

* Update Changes.txt

Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2023-01-13 00:10:47 +02:00
Nemoel-Tomo
0db34e9485 removed LASER_GUARD hack in los.cpp 2023-01-12 19:10:49 +01:00
Lwmte
23ffafd396 Fix savegame crash for disabled enemies with partially set activation mask 2023-01-12 19:26:07 +02:00
Sezz
2661340134 Move hit function 2023-01-12 22:24:25 +11:00
Sezz
00b865489d Naming 2023-01-12 22:20:57 +11:00
Sezz
0b97ea3776 Minor fixes 2023-01-12 22:11:02 +11:00