Commit graph

8102 commits

Author SHA1 Message Date
Sezz
1caa6f4994
Animation refactors tier 3 (#1092)
* Remove most direct accesses to g_Level.Anims

* Make all anim and frame data access read-only

* Simplify

* Simplify

* Use GetAnimData()

* g_Level.Anims to GetAnimData() conversions

* Use SetAnimation() in wraith trap init

* Minor formatting fixes
2023-05-11 13:30:41 +01:00
MontyTRC89
2ee5420cda Disabled wibble for fog 2023-05-11 13:42:36 +02:00
Sezz
9764f128fe Remove old broken tightrope code 2023-05-11 17:44:21 +10:00
MontyTRC89
7da42d8850 Refactored fog code;
Added noise and wibble to fog;
Fixed sprites;
2023-05-11 09:29:12 +02:00
Sezz
f0dd6b06a0 Move weapon target lists to player object 2023-05-11 16:11:16 +10:00
Sezz
f27eb072ba Merge branch 'develop' into sezz_sprites_in_2d_space 2023-05-11 13:31:18 +10:00
hispidence
d706a8105e Use const string refs instead of string_view (see prev commit for more details) 2023-05-10 23:36:18 +01:00
hispidence
c522761c2f Use const string refs instead of string_view for directory locations. While string_view is better for some situations, in this scenario it wasn't helping to avoid any copies, and only made things more verbose.
Refactor the -level option handling again to early out if the file doesn't exist and to determine ahead of time if the path is absolute or relative, thus potentially skipping string comparisons.
2023-05-10 23:35:35 +01:00
MontyTRC89
9390e46ed4 Tryiing without raymarch 2023-05-10 10:47:10 +02:00
Lwmte
84150dc625 Add refactors from switch state ambiguity fixes branch 2023-05-09 21:59:34 +02:00
MontyTRC89
22ff6613a2 Added frustum culling for fog bulbs 2023-05-09 15:10:47 +02:00
MontyTRC89
dba52861de Sorting fog bulbs front to back;
Performance improvements;
2023-05-09 14:03:09 +02:00
MontyTRC89
52f3642f2a Avoid raymarch if fog > 1 2023-05-09 12:25:59 +02:00
MontyTRC89
471521b0ba Raymarch less expansive;
Added fog bulbs to sprites;
Removed premultiplication of fog density by color at load time;
2023-05-09 06:03:31 +02:00
hispidence
a5477c545b Improve -level command line arg so it can work with full absolute paths. 2023-05-08 18:15:01 +01:00
MontyTRC89
d31a8b5e38 Merge branch 'renderer_fixes_and_features' of https://github.com/MontyTRC89/TombEngine into renderer_fixes_and_features
# Conflicts:
#	TombEngine/Shaders/ShaderLight.hlsli
2023-05-08 18:59:13 +02:00
MontyTRC89
5de58a89c9 Improved fog formula and handling 2023-05-08 18:58:24 +02:00
Sezz
cdd8641776 Fix Tokyo's formatting part 3 2023-05-08 14:46:50 +10:00
Sezz
ca57f46ab8 Fix formatting 2023-05-08 14:24:16 +10:00
hispidence
a2d985b4c5 First commit of assetDir command line option. 2023-05-08 00:12:09 +01:00
davidmarr
d5eb432514
PrintLog() function in LUA. (#1095)
* Log() function in LUA.

Log() function in LUA.
Allows you to enter logs directly from LUA.
It's possible to send Error, Warning and Info messages

* Update LogLevel.h

* Update ReservedScriptNames.h

* Update Miscellanous.cpp

* added example of use

* added log level values in the function description

* Update Miscellanous.cpp

* Update Miscellanous.cpp

* Update Miscellanous.cpp

* Update LogLevel.h

* Update Miscellanous.cpp

* Update ReservedScriptNames.h

* Changed function name and added allowSpam parameter

* Update Miscellanous.cpp

* Constants in ReservedScriptNames

* native error handling

added native error handling in description

* Misc.LogLevel constants

* spammed message

* Update LogLevel.h

* Update LogLevel.h

* Update LogLevel.h

* Corrected optional parameter

---------

Co-authored-by: Kubsy <kubadd475@gmail.com>
2023-05-07 15:19:46 +01:00
hispidence
c4202101b7 Merge remote-tracking branch 'origin/develop' into develop 2023-05-06 20:42:35 +01:00
hispidence
98383186d9 Define SOL_SAFE_FUNCTION_CALLS for release builds to print errors instead of crashing (e.g. when giving Flow.AddLevel an incorrect argument). 2023-05-06 20:41:56 +01:00
Lwmte
33b965256f
Default input bindings (#1097)
* Initial Commit

* Correct tabulation

* Update Changes.txt

* Identify xinput devices in a more generic way

* Avoid passing copy of input bindings; make function static; comments

* More correct way to apply default bindings, also set rumble and analog camera options for XInput

---------

Co-authored-by: Sezz <sezzary@outlook.com>
2023-05-06 21:11:22 +02:00
hispidence
4f6e6c7a33
Merge pull request #1096 from MontyTRC89/vec2_and_vec4
Vec2
2023-05-06 18:24:50 +01:00
Kubsy
ec301719f2
Implement warnings for sprites and other stuff. (#1091)
* Bunch of checks before using sprite slots, warning if missing

- Bar graphics
- Helical lasers
- Electricity arks
- "Particles"
- Splashes
- Bubbles
- Drips
- Shockwaves
- Blood
- Underwater dust
- Snow
- Rain
- Smoke
- "Sparks particles" (flare sparks, ricochets sparks, friction sparks, electric sparks, electric cleaner sparks)
- Explosions

* Decopypaste logging by using CheckIfSlotExists, move checks up in some needed cases

* Update Changes.txt

* Add more warnings, simplify CheckIfSlotExists, demagic some sprite IDs

* Also show numerical object ID in the warnings

---------

Co-authored-by: Joey Quint <joey_quint@hotmail.fr>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2023-05-06 12:07:21 +01:00
Lwmte
9ef62a4eeb Throw a warning if no node catalogs were found instead of silent crash 2023-05-06 00:20:50 +02:00
Nemoel-Tomo
f54e612e79
fixed crash with puzzleholes if there is no trigger (#1098) 2023-05-05 10:03:29 +01:00
hispidence
c21793f3f5 Merge remote-tracking branch 'origin/vec2_and_vec4' into vec2_and_vec4 2023-05-04 20:15:26 +01:00
hispidence
3e9feb2b43 Make ToLength take a float instead of an integer. 2023-05-04 20:13:51 +01:00
Raildex
d70ae11561 constant fog formula with simplex noise 2023-05-04 15:01:20 +02:00
Sezz
1a10ca87a9 Formatting 2023-05-04 13:27:13 +10:00
Lwmte
dda0ce85a4 Fix memory leak in sample allocation 2023-05-03 21:15:45 +02:00
Kubsy
9e674a6a37 add a check of OCB for keyhole
if 0 use default lara anim, anything else. Fetch from OCB and use that as animation.
2023-05-03 19:40:02 +01:00
MontyTRC89
57ff13c50b WIP raymarch 2023-05-03 11:11:47 +02:00
hispidence
1b52ec7584 Add Vec2 doc HTML file, bump version number, add Vec2 to changes.txt 2023-05-02 19:30:14 +01:00
hispidence
6dc9682f95 Add Vec2 2023-05-02 19:28:13 +01:00
hispidence
d5d088656e Merge remote-tracking branch 'origin/develop' into vec2_and_vec4 2023-05-02 15:07:42 +01:00
Lwmte
963921fb38 Delete VS2022 solution, switch to v143 platform toolset natively 2023-05-02 11:03:54 +02:00
Lwmte
77398d10c4 Don't crash the engine if SetAnimation is called with out of bounds anim index 2023-05-02 10:13:10 +02:00
Lwmte
982b7d7c96 Fix footprints not being cleared after level change 2023-05-02 09:43:16 +02:00
Sezz
0dc05060af Fix comments 2023-05-02 15:11:31 +10:00
Lwmte
147d36d41d Make menu input handling delay more consistent 2023-05-01 20:47:25 +02:00
Lwmte
efbea19f47 Fix gamepad still vibrating if Lara was poisoned prior to death 2023-05-01 20:40:45 +02:00
Lwmte
f3a615fc0f Fix action button not working in title 2023-05-01 17:04:48 +02:00
Lwmte
0aa9dac848 Fix compile errors 2023-05-01 15:51:48 +02:00
hispidence
a5f244d08a
Other callbacks (#1085)
* Implement PRESTART, POSTSTART, PREEND, POSTEND, PRESAVE, POSTSAVE, PRELOAD and POSTLOAD callbacks.

* Cleanup pass

* Update Changes.txt and improve doc comment.

* Fix Changes.txt.

* Formatting

* Give OnEnd and associated callback points get an arg stating why the level ended, so the scripter can differentiate between exit to menu, load, level complete, and player death.

* Update doc comments.

---------

Co-authored-by: Sezz <sezzary@outlook.com>
2023-05-01 12:46:22 +01:00
Kubsy
7f2baaf53f
Object init organize (#1090)
* start reorganize

* progress

* address some of @Lwmte suggestions

* Move setup.cpp to Game folder and capitalize it

* Include corrections

* include the new Setup.cpp in vcxproj

---------

Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
Co-authored-by: Sezz <sezzary@outlook.com>
2023-05-01 11:24:48 +01:00
Kubsy
54a95f81dd allow gunship to destroy 16 smash objects instead of 8 2023-05-01 09:28:39 +01:00
Sezz
2e05578e61 Merge branch 'develop' of https://github.com/MontyTRC89/TombEngine into develop 2023-05-01 16:18:37 +10:00