Compare commits

...

343 commits

Author SHA1 Message Date
Marcin Kurczewski
5e3fb42a25 docs: improve release process documentation
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
2025-04-28 14:49:50 +02:00
Marcin Kurczewski
6d5bdd89a3 ui: improve modal sizing
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
2025-04-28 11:46:57 +02:00
lahm86
a859d668f9 lara: test alignment position height validity in TR1
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
This applies a fix introduced in TR2 to TR1 so that Lara doesn't become
clamped under a steeply sloped ceiling if picking up an item there.

Resolves #2879.
2025-04-27 21:53:55 +01:00
lahm86
e03c65ca0f lara/common: move Lara_AlignPosition to TRX
This merges Lara_AlignPosition (Item_AlignPosition) into TRX.
2025-04-27 18:57:03 +01:00
lahm86
ff86b5e712 tr2/objects: use common OBJECT_BOUNDS
This updates all relevant TR2 objects to use OBJECT_BOUNDS rather than
an arbitrary array of values for testing bounds. The approach is
equivalent to TR1. Lara_TestPosition has also been moved to TRX, and
kept in Lara's module rather than in items.c, as it's only used by
Lara.
2025-04-27 18:57:03 +01:00
lahm86
cdfb5942c1 tr2/data: fix Living Quarters flame deactivation
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Resolves #2851.
2025-04-27 15:03:53 +01:00
lahm86
8b78a7f001 room: fix abyss height check
As Lara's position is stored as int32, we need to use the same in the
abyss height check function, otherwise internal casting yields invalid
results.

Resolves #2874.
2025-04-27 13:30:38 +01:00
Marcin Kurczewski
2cd998673f
Merge branch 'stable' into develop
Some checks are pending
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
2025-04-26 19:57:08 +02:00
Marcin Kurczewski
1f89b14a46
docs/tr2: release 1.0.2
Some checks failed
Run code linters / Run code linters (push) Has been cancelled
2025-04-26 19:55:58 +02:00
Marcin Kurczewski
9c0c0160df
game-strings: fix memory leak 2025-04-26 19:54:03 +02:00
Marcin Kurczewski
3e4017d338
game-strings: fix crash with -l/--level 2025-04-26 19:54:02 +02:00
Marcin Kurczewski
0c5b5dbb7b
tr2/inventory: fix button mashing loading game instead of saving
Resolves #2863.
2025-04-26 19:53:58 +02:00
Marcin Kurczewski
a7269bbe8a game-strings: fix memory leak 2025-04-26 20:53:15 +03:00
Marcin Kurczewski
f27d0435a9 game-strings: fix crash with -l/--level 2025-04-26 20:53:15 +03:00
Marcin Kurczewski
88f41c5a75 tr2/inventory: fix button mashing loading game instead of saving
Resolves #2863.
2025-04-26 20:43:42 +03:00
Marcin Kurczewski
d97edaf1eb
audio: fix clicks in sample decoding
Resolves #2846.
2025-04-26 19:19:32 +02:00
Marcin Kurczewski
820fc307d2
audio: split into smaller functions 2025-04-26 19:19:31 +02:00
Marcin Kurczewski
24b81007ba
audio: fix wrong benchmark times
The decoder benchmark was formatting the wrong variable and produced
meaningless results in the logs.
2025-04-26 19:19:28 +02:00
Marcin Kurczewski
0ba717edd5 audio: fix clicks in sample decoding
Resolves #2846.
2025-04-26 20:17:21 +03:00
Marcin Kurczewski
3696e84925 audio: split into smaller functions 2025-04-26 20:17:21 +03:00
Marcin Kurczewski
e439371c66 audio: fix wrong benchmark times
The decoder benchmark was formatting the wrong variable and produced
meaningless results in the logs.
2025-04-26 20:17:21 +03:00
Marcin Kurczewski
864589bf0a
game-strings: use OG JSON as a fallback in expansions
Resolves #2847.
2025-04-26 19:05:01 +02:00
lahm86
5a50de02ed
door: move door module to TRX
This moves the door module fully to TRX as the logic is identical in
both games.
2025-04-26 19:04:13 +02:00
lahm86
d6fc167749
tr2/objects/door: prevent Lara voiding in closed doors
This uses the same approach as TR1 to avoid Lara voiding in closing/
closed doors that are not placed on portals.

Resolves #2848.
2025-04-26 19:03:52 +02:00
Marcin Kurczewski
2f2f0c6842
tr2/viewport: fix screenshots at wrong resolution
Resolves #2845.
2025-04-26 19:03:16 +02:00
lahm86
4035fe6411
items: replace items by index rather than room
Carried items use NO_ROOM so were not included when replacing guns
with ammo. This ensures everything is checked when replacing IDs.

Resolves #2850.
Resolves #2856.
2025-04-26 19:03:09 +02:00
Marcin Kurczewski
e32a4c270f
docs: fix formatting and mistyped option name 2025-04-26 19:02:57 +02:00
Marcin Kurczewski
92ff6e12c7 game-strings: use OG JSON as a fallback in expansions
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
Resolves #2847.
2025-04-26 17:55:25 +03:00
Marcin Kurczewski
73da4c2945 shell: do not create logs with --help 2025-04-26 17:53:26 +03:00
Marcin Kurczewski
dc41197cd6 shell: improve support for CLI options
- Adds documentation
- Adds a --help switch
- Tidies short/long option form conventions
2025-04-26 17:53:26 +03:00
lahm86
890c7f76bb door: move door module to TRX
This moves the door module fully to TRX as the logic is identical in
both games.
2025-04-26 12:39:42 +01:00
lahm86
83ac9514cb tr2/objects/door: prevent Lara voiding in closed doors
This uses the same approach as TR1 to avoid Lara voiding in closing/
closed doors that are not placed on portals.

Resovles #2848.
2025-04-26 12:39:42 +01:00
Marcin Kurczewski
96b86b1605
docs/tr2: fix changelog merge mistake 2025-04-26 13:18:45 +02:00
Marcin Kurczewski
607ac811f0 tr2/viewport: fix screenshots at wrong resolution
Resolves #2845.
2025-04-26 14:07:54 +03:00
lahm86
15b758c57d items: replace items by index rather than room
Carried items use NO_ROOM so were not included when replacing guns
with ammo. This ensures everything is checked when replacing IDs.

Resolves #2850.
Resolves #2856.
2025-04-26 11:34:52 +01:00
Marcin Kurczewski
eec8f16d5f tools: download GM assets too 2025-04-26 13:06:08 +03:00
Marcin Kurczewski
2536ff55c1 docs: fix formatting and mistyped option name 2025-04-26 12:26:50 +03:00
Marcin Kurczewski
10b9bcc780 option: port sound settings dialog to ui
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
2025-04-26 10:31:36 +03:00
Marcin Kurczewski
c00d0627cf
tr2: release 1.0.1
Some checks failed
Publish a pre-release / TR1 (Linux) (push) Has been cancelled
Publish a pre-release / TR1 (Windows) (push) Has been cancelled
Publish a pre-release / TR1 (Mac) (push) Has been cancelled
Publish a pre-release / TR2 (Linux) (push) Has been cancelled
Publish a pre-release / TR2 (Windows) (push) Has been cancelled
Publish a pre-release / TR2 (Mac) (push) Has been cancelled
Run code linters / Run code linters (push) Has been cancelled
Publish a pre-release / Create a prerelease (push) Has been cancelled
2025-04-24 23:37:15 +02:00
Marcin Kurczewski
a6ebaf5c38
docs/tr2: release 1.0.1 2025-04-24 23:37:10 +02:00
Marcin Kurczewski
3acab0dc34 tr2/ui: improve graphic settings dialog sizing
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
Resolves #2841.
2025-04-24 10:36:15 +03:00
lahm86
c590824944 game: prioritize save over load
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
This matches OG behaviour where save is preferred over load when both
inputs are detected on the same frame.

Resolves #2833.
2025-04-23 21:43:08 +01:00
lahm86
f590c9243c graphic_settings: add scroll wraparound option
This makes the scroll wraparound option available in both games'
graphics dialogs. TR1's dialog is also updated to allow scrolling until
such times as it's moved to the new UI framework.

Resolves #2834.
2025-04-23 20:43:21 +01:00
lahm86
3030d694a5 tr2/shell: reload background image on aspect change
Resolves #2832.
2025-04-23 20:40:01 +01:00
lahm86
4d36177247 tr2/shell: fix PSX FOV option not being applied immediately
Resolves  #2831.
2025-04-23 20:40:01 +01:00
lahm86
b935707b5b tr2/option_controls: fix selected layout not saving
Resolves #2830.
2025-04-23 20:40:01 +01:00
Marcin Kurczewski
4d5040d15c misc: fix build warnings
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
2025-04-23 11:37:52 +02:00
Marcin Kurczewski
e22bf087f6
tr2: release 1.0
Some checks failed
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
Run code linters / Run code linters (push) Has been cancelled
2025-04-23 07:41:34 +02:00
Marcin Kurczewski
c7b5932b94
docs/tr2: release 1.0 2025-04-23 07:41:29 +02:00
Marcin Kurczewski
69b08d55ca tr2/shell: center offscreen window on game launch
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
2025-04-22 23:50:14 +02:00
Marcin Kurczewski
169ee7603f tr2/shell: allow negative window x,y 2025-04-22 23:50:14 +02:00
Marcin Kurczewski
4fa521d956 tr2/shell: fix support for dual monitors
Addresses #2820.
2025-04-22 23:50:14 +02:00
Marcin Kurczewski
8133f72e20 tr2/shell: improve moving window around 2025-04-22 22:39:20 +02:00
Marcin Kurczewski
05876ba9c4 tr2: improve reacting to resizes
Addresses parts of #2820.
2025-04-22 21:12:58 +02:00
Marcin Kurczewski
aaf58ba623 tr2: remove environment texture
It's not used at the moment.
2025-04-22 21:12:58 +02:00
Marcin Kurczewski
f8560b4fd5 ui: fix fader memory violation
Resolves #2821.
2025-04-22 20:14:09 +02:00
Marcin Kurczewski
0adefabf41 data: use HD assets
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / TR1 (Linux) (push) Waiting to run
Publish a pre-release / TR1 (Windows) (push) Waiting to run
Publish a pre-release / TR1 (Mac) (push) Waiting to run
Publish a pre-release / TR2 (Linux) (push) Waiting to run
Publish a pre-release / TR2 (Windows) (push) Waiting to run
Publish a pre-release / TR2 (Mac) (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
2025-04-22 16:14:32 +02:00
lahm86
004e6b4b4a gym: fix compiler warning 2025-04-22 11:54:01 +01:00
Marcin Kurczewski
953f30205e build: offload binary assets to TRX-data 2025-04-22 12:37:43 +02:00
Marcin Kurczewski
b912917d81 build: skip installer builds for PRs 2025-04-22 11:54:31 +02:00
lahm86
e9c4404c5d gym: calculate best time automatically
This removes the need to store the current best time as it is always
the first completed entry's time (or -1 if no completions).

Resolves #2812.
2025-04-22 10:35:39 +01:00
Marcin Kurczewski
daf6dc3020 output: allow aspect-ratio specific images 2025-04-22 09:08:56 +02:00
Marcin Kurczewski
fbc26fcba6 docs: update logos
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Waiting to run
Publish a pre-release / Build TR2 (push) Waiting to run
Publish a pre-release / Create a prerelease (push) Blocked by required conditions
2025-04-21 18:38:40 +02:00
Marcin Kurczewski
e8ef98d893 inventory: merge g_Inv_Mode to libtrx
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-21 13:55:56 +02:00
Marcin Kurczewski
938dffddce tr2/flares: fix thrown flares embedding in the ground 2025-04-21 12:16:44 +02:00
Marcin Kurczewski
0654940d6f tr2/flares: fix flicker in 60 fps
Resolves #2806. The OG mistakenly used the wrong arm (right instead of
left) to determine the flare light position in
`Lara_GetJointAbsPosition_I`. At 60 FPS, this mistake caused Lara's hand
position to appear significantly off from the expected location, which
coincidentally led to the flicker effect disappearing. While fixing the
bone did position Lara's hand correctly, it didn't bring back the
missing flicker at 60 FPS. In fact, it caused the flicker effect to
disappear at 30 FPS as well, making it static at both frame rates. It
turned out that although the game does randomize the position of the
flares' light source, it doesn't do so sufficiently. The primary cause
of the flickering was actually the randomness introduced by using the
incorrect bone. To restore the flicker effect to how it originally
appeared, I had to enhance the randomness of the flare's light position.
2025-04-21 10:38:36 +02:00
Marcin Kurczewski
9667be9f0e tr1/output: fix splash and bubbles having UW tint
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Resolves #2793.
2025-04-20 22:35:13 +02:00
Marcin Kurczewski
962a66a090 output: tidy shade constants 2025-04-20 21:58:51 +02:00
lahm86
cd67279fc7 tr2/objects/gondola: save gondola position
This updates gondola objects to have their positions saved in order to
be able to restore them correctly on load when they've been destroyed.
Legacy saves will ignore this.

Resolves #1612.
2025-04-20 20:44:37 +01:00
Marcin Kurczewski
6e48174a92 config: fix assault course times reset on quit
Resolves #1578.
2025-04-20 21:25:45 +02:00
Marcin Kurczewski
c2b005cec5 gym: improve ASSAULT_STATS structure 2025-04-20 21:25:45 +02:00
lahm86
ae37db2cf8 tr2/objects/boat: use const for Y shift 2025-04-20 19:41:03 +01:00
lahm86
0c0ce5bcf6 tr2/objects/boat: fix initial water height test
This fixes the boat's initial water height test when Lara is climbing
on to avoid tinting it unnecessarily.

Resolves #2787.
2025-04-20 19:41:03 +01:00
Marcin Kurczewski
747f0af086 ui/stats: fix assault course dialog 2025-04-20 19:19:33 +02:00
Marcin Kurczewski
f29e30ffe2 ui/requester: fix scrolling for nonselectable dialogs 2025-04-20 19:19:33 +02:00
Marcin Kurczewski
d8b83e4747 gym: move to trx 2025-04-20 19:19:33 +02:00
Marcin Kurczewski
7a4e188eaa misc: remove REQUEST_INFO 2025-04-20 17:07:49 +02:00
Marcin Kurczewski
33617deba7 ui: port play any level dialog to trx 2025-04-20 17:07:49 +02:00
Marcin Kurczewski
f23a777f64 ui: move select level dialog to libtrx 2025-04-20 17:07:49 +02:00
Marcin Kurczewski
7f574c9448 ui: merge save slot dialog via libtrx 2025-04-20 17:07:49 +02:00
Marcin Kurczewski
db94669ae4 tr2: move scaler to libtrx 2025-04-20 17:07:49 +02:00
Marcin Kurczewski
f04a18f208 tr2/ui: port save/load dialog to ui 2025-04-20 17:07:49 +02:00
Marcin Kurczewski
ef72c674b3 tr2/ui: improve window decoration margins 2025-04-20 17:07:49 +02:00
Marcin Kurczewski
34a93057c2 ui/label: allow null text 2025-04-20 17:07:49 +02:00
lahm86
e7fb4616e8 docs: update docs for hotkeys fix
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Re #2797, which was fixed in 0.6.
2025-04-20 15:06:28 +01:00
lahm86
a2be75c8e8 objects: use common approach for extra bone rotation
This removes duplicated logic for applying extra rotations to animation
bones.
2025-04-20 13:57:58 +01:00
lahm86
5f7bab0dd9 tr2/data: add missing 8 bit textures
This restores 8-bit textures for those injections in TR2 where models
are replaced or inserted.

Resolves #2792.
2025-04-20 13:04:22 +01:00
lahm86
092fe1dc70 console/pos: show flipped room when applicable
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
If Lara is in a room and the flipmap is on, the console will now report
the flipped room's number when using the pos command.

Resolves #2487.
2025-04-19 22:56:09 +01:00
lahm86
51af4233be console/teleport: pass room numbers when known
This updates the teleporting logic to pass room number to Lara's
teleport function when they are already known, rather than finding
rooms by position in all cases. This may result in telporting to
positions (i.e. with no rooms) being less lenient when overlapping
rooms are involved.

Resolves #2486.
2025-04-19 22:56:09 +01:00
Marcin Kurczewski
f688f5c06c tr1/ui: fix loading from empty slots
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-19 22:03:16 +02:00
Marcin Kurczewski
9ee04f9c41 ui: fix flash not working 2025-04-19 21:42:19 +02:00
Marcin Kurczewski
411c3443df ui/stack: fix scaling row gaps 2025-04-19 20:49:34 +02:00
Marcin Kurczewski
a8ed69f769 tr1/ui: port save/load dialog to ui 2025-04-19 20:49:34 +02:00
Marcin Kurczewski
5dae2f9807 tr1/ui: port select level dialog to ui 2025-04-19 20:49:34 +02:00
Marcin Kurczewski
b6d79fe2ef ui/stack: only spread gaps on ALIGN_*_DISTRIBUTE 2025-04-19 20:49:34 +02:00
Marcin Kurczewski
b7144b7dbe ui/requester: add optional scroll indicators 2025-04-19 20:49:34 +02:00
Marcin Kurczewski
eb4606cc8d ui/requester: add optional reserving of space 2025-04-19 20:49:34 +02:00
Marcin Kurczewski
0676fbdd4d ui/requester: fix clamping
Fixes the selection outline disappearing for a single frame when
navigating beyond the last visible row.
2025-04-19 20:49:34 +02:00
Marcin Kurczewski
83bee31c0c ui/requester: fix visible row count
The mistaken logic would cause the requester to sometimes display one
extra row, depending on the API usage.
2025-04-19 20:49:34 +02:00
Marcin Kurczewski
009c0b003c ui/pad: fix calculating right and bottom margins 2025-04-19 20:49:34 +02:00
Marcin Kurczewski
c239b1124d ui: add fixed element 2025-04-19 20:49:34 +02:00
Marcin Kurczewski
17d15dc0c5 ui: add offset element 2025-04-19 20:49:34 +02:00
lahm86
fa5a4f118b objects/movable_block: fix angle resetting and snapping
This restores pushblock angles after performing collision tests, and
also snaps them to the grid on initialisation if a builder places them
at non 90 degree angles to avoid instead snapping during collision.

Resolves #2776.
2025-04-19 19:03:30 +01:00
lahm86
80757eb08c ui/requester: add option to allow requester wraparound
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This allows the up or down input key to be held in requesters and the
UI will wrap around to the top/bottom.
2025-04-19 07:54:36 +01:00
lahm86
2d05a683d6 tr2/ui/graphic_settings: improve text responsiveness
This adds checks for when the text scale is changed so that the
visible row count is set accordingly to avoid overlap. This also
resolves some problems with the visible/selected rows where they
would not be highlighted correctly.
2025-04-19 07:54:36 +01:00
lahm86
70fe64c991 tr2/ui/graphic_settings: add further controls to graphics dialog
This makes several visual/rendering options available in TR2's graphic
dialog, including adding support for enum types.
2025-04-19 07:54:36 +01:00
Marcin Kurczewski
dd2af3377a tr1/game-flow: fix level numbering
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Resolves #2767.
2025-04-18 21:10:22 +02:00
Marcin Kurczewski
77fdc9f589 tr1/output: use water tint for underwater pickups
Resolves #2673.
2025-04-18 20:16:31 +02:00
Marcin Kurczewski
0fc11f401b tr1/game-flow: fix story so far not playing cafe.rpl
Resolves #2779.
2025-04-18 17:24:54 +02:00
Marcin Kurczewski
f144f8ccad tr1/output: make sprites use the meshes shader 2025-04-18 17:24:44 +02:00
Marcin Kurczewski
01b2d37fdc tr1/game-flow: fix story so far showing up in UB
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Resolves #2611.
2025-04-18 14:55:28 +02:00
Marcin Kurczewski
1e53333864 ui: rename ui2 to just ui 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
7c1cafd321 ui: final cleanup 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
1954a96fab ui2: port tr2 graphic settings dialog 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
e3240b166c ui2: port controls dialog 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
dfa3797b87 ui2: port stats dialogs 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
7bf7c2e6b5 ui2: port pause exit dialog 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
9023dfbbf8 ui2: port new game dialog 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
238fd19e4f ui2: port examine item dialog 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
c4ef88a058 ui2: port photo mode widget 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
5fb2a8274f ui2: port console widget 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
3acf3177c9 ui2: add fader 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
6d3cde42cd ui2: add requester widget 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
f0f200fd4b ui2: add frame widget 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
af3322aa48 ui2: introduce UI v2 2025-04-18 10:53:35 +02:00
Marcin Kurczewski
d0d41fb52e text: optimize repeated drawing 2025-04-18 10:53:35 +02:00
lahm86
ec2a0452ff tr2/savegame: save and load current music
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This allows the current music track and position to be saved and
restored on load, similar to TR1X.

Resolves #2579.
2025-04-17 19:34:35 +01:00
lahm86
0e24b65ae6 tr2/objects/waterfall: save waterfall flags
This updates waterfall objects to have their flags saved in order to be
able to restore them correctly on load.  Legacy saves will ignore this.

Resolves #2686.
2025-04-17 17:22:14 +01:00
lahm86
10f1bc6fbd tr2/data: fix invalid portals in The Deck
This disables the visibility portal from room 17 to room 104 (and vice
versa) in The Deck to avoid Lara seeing or targeting enemies in the
disconnected rooms.

Resolves #2393.
2025-04-17 17:21:24 +01:00
lahm86
45b64cbb97 tr2/objects/springboard: handle skidoo interaction
This updates the springboard to deal with the scenario when Lara
crosses one on a skidoo. The skidoo will now be thrown into the air
(along with Lara) rather than Lara falling indefinitely.

Resolves #1903.
2025-04-17 13:57:14 +01:00
lahm86
e424ad8a11 tr2/objects/bird_guardian: restore bird guardian shadow
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This restores the bird guardian's shadow if texture fixes are enabled.

Resolves #2060.
2025-04-17 12:09:33 +01:00
Marcin Kurczewski
48c9980045 tr1/output: exempt sprites from scissoring
This did more harm than good, plus we weren't using the scissor box for
objects anyway.
2025-04-17 12:11:23 +02:00
Marcin Kurczewski
1bdcdb5898 tr1/output: disable wibble effect for sprites 2025-04-17 12:11:23 +02:00
Marcin Kurczewski
6a6fb11780 tr1/output: fix calculating texture sizes 2025-04-17 12:11:23 +02:00
lahm86
94b78af2fb tr2/data: fix default mesh on Bartoli in cutscene 4
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This injects a fix to hide the default mesh that appears on Bartoli in
the Temple of Xian cutsene.

Resolves #2558.
2025-04-16 22:19:39 +01:00
lahm86
772308b359 tr2/data: fix boat explosion showing default mesh
This injects an object to represent the boat exploding when it crosses
mines, and safeguards the code to ensure the object is present to avoid
showing the default mesh.

Resolves #1605.
2025-04-16 22:19:39 +01:00
lahm86
a277f91654 tr2/objects/lift: adjust directional tests
Some checks failed
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Run code linters / Run code linters (push) Has been cancelled
This fixes the lift so that it can be used facing any cardinal
direction in custom levels, and not just South.

Resolves #2100.
2025-04-15 06:42:53 +01:00
lahm86
53c86b315e room: ignore tilts in walls for the camera
OG levels contain no-space (tilt FD entries in walls), which can cause
checks against NO_HEIGHT to yield inaccurate results. No-space is used
in glitched playthroughs, but this change ensures that NO_HEIGHT is
respected when the camera is involved.

Resolves #2764.
2025-04-15 06:42:32 +01:00
Marcin Kurczewski
b49d4341db
tr2/option: fix crash in the graphics dialog
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-14 19:43:17 +02:00
lahm86
71b1ce78d2 tr2/data: fix various softlocks
This fixes softlocks in Temple of Xian, Floating Islands and Vegas.

Resolves #2042.
Resolves #2590.
Resolves #1851.
2025-04-14 18:09:27 +01:00
lahm86
234c339bd2 tr2/camera: determine room for in-game cutscenes
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Standalone cutscene levels already determine the room for cinematic
positions, but in-game cutscenes do not and hence camera interpolation
clamping can yield bad results for wide ranging cinematics. This
ensures the camera is always in the correct room for in-game cutscenes.

Resolves #2754.
2025-04-13 21:33:03 +01:00
lahm86
7c8fadc0d2 docs: update injection descriptions
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This updates the purpose of each injection file type.
2025-04-13 18:06:50 +01:00
lahm86
3e39a090f7 tr1/data: fix enemy death SFX
This fixes the panther and skate kid's death SFX

Resolves #2647.
2025-04-13 18:06:50 +01:00
lahm86
bc7be80ab8 tr2/data: fix silent Cold War shark
This injects animation commands for the shark in Cold War for its
biting SFX.

Resolves  #2678.
2025-04-13 18:06:50 +01:00
lahm86
b851487296 data: fix pickup mesh scales
This fixes the pickup mesh scales for the keys in Folly and
miscellaneous pickups in The Golden Mask.

Resolves #2652.
2025-04-13 18:06:50 +01:00
lahm86
85a3d6cb98 creature: set TR1 enemy room number above position
This uses the same approach as TR2 to set an enemy's room number
slightly above their position, so that one click water does not produce
a tint and to allow sound effects to play.

Resolves #2753.
2025-04-13 15:55:18 +01:00
lahm86
ecab0d92e6 object: move bridge, drawbridge and trapdoor to TRX
This moves the three bridges, drawbridge and trapdoor implementations
to TRX, and makes the config option to fix collision issues available
in TR2.

Resolves #2752.
Resolves #2294.
2025-04-13 13:21:06 +01:00
lahm86
5d096fe311 tr1/objects/trapdoor: rename trapdoor types
This renames the trapdoor types in TR1 to match TR2.
2025-04-13 13:21:06 +01:00
lahm86
81287845ca config: add bridge collision fix option to TR2
This makes the bridge collision config setting available in TR2,
currently not used however.
2025-04-13 13:21:06 +01:00
lahm86
80219acb08 items: move Item_IsTriggerActive to TRX 2025-04-13 13:21:06 +01:00
Marcin Kurczewski
fe45c6171c
build: fix TR2 installer filename
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-13 12:12:28 +02:00
Marcin Kurczewski
454d133db7 tr2/option: add fov to the graphic options
Resolves #2728.
2025-04-13 09:08:11 +02:00
Marcin Kurczewski
c6d1b4b996 tr2/option: adjust faster unless holding slow 2025-04-13 09:08:11 +02:00
Marcin Kurczewski
bfbc54963d tr2/option: fix psx_fov naming 2025-04-13 09:08:11 +02:00
Marcin Kurczewski
60534c4bef tr2/output: fix crashes in large rooms
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Resolves #2749.
2025-04-12 23:51:30 +02:00
lahm86
9b073d69f3 tr1/room: add support for antitriggers
This allows antitriggers to be used like in TR2+.

Resolves #2580.
2025-04-12 22:33:40 +01:00
Marcin Kurczewski
7895617006 anims: fix crash when an anim has no frames
Resolves #2746.
2025-04-12 23:27:28 +02:00
Marcin Kurczewski
a12e5f523c docs: link water color entries to the main table 2025-04-12 23:27:16 +02:00
Marcin Kurczewski
f258d6de05 tr2: add ability to skip cutscenes
Resolves #2127.
2025-04-12 22:34:57 +02:00
Marcin Kurczewski
e3d1fdc4da tr1/game-flow: fix skipping cutscenes
Resolves #2743
2025-04-12 22:34:57 +02:00
Marcin Kurczewski
cec3c8d235 config: rename enable_cine to enable_cutscenes 2025-04-12 22:34:57 +02:00
Marcin Kurczewski
72c67d7973 config: add/improve enable_legal option
Resolves #2740. Resolves #2741.
2025-04-12 22:33:59 +02:00
Marcin Kurczewski
34da7a31ad config: fix default water color inconsistencies
It diverged from the documented values due to rounding errors.
2025-04-12 22:33:50 +02:00
Marcin Kurczewski
384000ef7f docs: add water color previews 2025-04-12 22:33:50 +02:00
Marcin Kurczewski
f980e4f22c game-flow: allow string hex values 2025-04-12 22:33:50 +02:00
Marcin Kurczewski
1f6f85b0af config: save water color as hex 2025-04-12 22:33:50 +02:00
Marcin Kurczewski
571ac73cb0 docs: extract water tables to its own section 2025-04-12 22:33:50 +02:00
Marcin Kurczewski
fec09ad56b tr2: fix crashes when the images are missing
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Also relaxes constraints around missing images.
2025-04-12 20:18:04 +02:00
lahm86
d57b2b9234 effects: raise TR2 effects limit
This raises the TR2 effects limits from 100 to 1000, like TR1. The
constant has been renamed for TR1 as well for consistency.

Resolves #1581.
2025-04-12 16:42:06 +01:00
lahm86
28fc94a89f pathing: raise TR2 creature slot limit
This brings TR2 into line with TR1 in terms of the maximum number of
enemies at a time.

Resolves #1624.
2025-04-12 16:42:06 +01:00
lahm86
941d525d37 items: raise TR2 item limit
This brings TR2 into line with TR1 in terms of the maximum number of
items per level. Because of how floor data is compiled, the maximum for
referencing items in triggers is 1024.

Resolves #1794.
2025-04-12 16:42:06 +01:00
Marcin Kurczewski
e93ed2b6ce tr2: make water color customizable like in TR1X
Tackles #1619. While does not offer a simple toggle for the PS1 style,
it is now possible to edit the game flow file by hand with those
settings.
2025-04-12 15:05:10 +02:00
lahm86
c69fe9c891 objects: raise static mesh slot capacity
This raises the static mesh slot capacity from 50 to 256. 2D statics
remain fixed at 50 for the time being.

Resolves #2734.
2025-04-12 12:36:49 +01:00
lahm86
adf2703305 tr2/objects/bird_guardian: remove hard-coded end level behaviour
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This removes the hard-coded end level behaviour of the bird guardian in
TR2. For OG, an injection is provided to add a command to the death
animation to yield the same result; custom levels can modify the object
accordingly externally.

Resolves #1583.
2025-04-12 08:41:07 +01:00
lahm86
0674d546c4 inject: add animation command editing support
This allows an animation's set of commands to be overwritten with
pre-compiled values, which are then later parsed into the animation
command list, and the originals discarded.
2025-04-12 08:41:07 +01:00
lahm86
36ab43f0b3 tr2/option_passport: add new game options
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This adds NG+, Japanese, and Japanese NG+ options (as well as regular
NG) to the new game page in the passport.

Resolves #2731.
2025-04-11 21:30:11 +01:00
Marcin Kurczewski
2aa0f2e161 tr1/output: optimize uvw access
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-11 15:45:33 +02:00
Marcin Kurczewski
0df70ce4bf tr2/savegame: fix warning
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-11 08:25:16 +02:00
Marcin Kurczewski
741bdfe135 config: clamp fog distances 2025-04-11 08:25:16 +02:00
Marcin Kurczewski
26f290e2b7 tr2/config: update default fog distances 2025-04-11 08:25:16 +02:00
Marcin Kurczewski
98acd91c5a tr2/options: add graphic options dialog
Resolves #1615.
2025-04-11 08:25:16 +02:00
Marcin Kurczewski
0f5e54d714 tr2/output: make fog distances customizable
Resolves #1622.
2025-04-11 08:25:16 +02:00
lahm86
57bc7610b4 savegame: move common logic to TRX
This moves the bulk of savegame logic to TRX.
2025-04-11 07:12:31 +01:00
lahm86
af29ece2f7 tr1/savegame: adopt strategy registration
This brings TR1 into line with TR2 in terms of registering savegame
strategies externally rather than defining them within the main module.
2025-04-11 07:12:31 +01:00
lahm86
5631b7be4a savegame: move initial version to TRX 2025-04-11 07:12:31 +01:00
lahm86
626030a4d7 tr2/savegame: move select level requester filler
This moves filling the requester info for the select level screen to
the savegame module, similar to TR1.
2025-04-11 07:12:31 +01:00
lahm86
e469d774a9 tr2/vars: remove unused variables
The global level file name and demo loaded flag variables are no longer
used.
2025-04-11 07:12:31 +01:00
Marcin Kurczewski
cc04478e2d
savegame: fix header type
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-10 14:28:37 +02:00
Marcin Kurczewski
99fb8be9bd tr1/output: disable wibble effect on the shadows
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-09 19:04:03 +02:00
Marcin Kurczewski
52ef286ab4 tr2/sound: fix not able to completely mute sounds
Resolves #2722.
2025-04-09 19:03:47 +02:00
Marcin Kurczewski
c5977558be creature: clean up 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
2cd7f04a1e creature: move Creature_IsAlly to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
c324d486d3 creature: move Creature_IsHostile to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
2d37378223 creature: move Creature_CheckBaddieOverlap to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
d4da3f874e creature: move Creature_Kill to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
81c570a61c creature: move Creature_Vault to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
3959fdb35a creature: move Creature_Underwater to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
664fdaa1c6 creature: move Creature_Float to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
b52a61a1b5 creature: move Creature_Die to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
16b5b389f5 creature: move Creature_CanTargetEnemy to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
5afcc59d04 creature: move Creature_Animate to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
7718406bbe creature: move Creature_CheckBaddieOverlap to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
c79f80486f creature: move Creature_Collision to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
4747121024 lara: make Lara_Push API common 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
b346f537a4 items: move Item_TestBoundsCollide to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
3dfb3085d9 creature: move Creature_Neck to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
f0104c568f creature: consolidate BITE 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
3d898a8844 creature: move Creature_Effect to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
751e5c4cb5 creature: move Creature_Head to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
a878739c40 creature: move Creature_Tilt to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
4e03c39ffd creature: move Creature_Turn to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
dbfb93cfd7 creature: move Creature_Mood to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
ec7e8e22bd creature: move Creature_EnsureHabitat to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
6b3999ab2c creature: move Creature_AIInfo to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
90494c1fc9 creature: move Creature_Initialise to trx 2025-04-09 19:03:28 +02:00
Marcin Kurczewski
74e6205e7e tools: move inspect_save to tools/ 2025-04-09 16:21:13 +02:00
Marcin Kurczewski
aba72f28a8 tr2/savegame/bson: mirror tr1's footer approach 2025-04-09 16:21:13 +02:00
Marcin Kurczewski
7613e0c806 tr1/output: reduce noise from OpenGL debug output 2025-04-09 14:23:58 +02:00
lahm86
d00c561a41 gun/const: move gun constants to TRX
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This moves and combines gun constants into TRX.
2025-04-09 07:14:50 +01:00
lahm86
bc31423029 objects: rename TR1 inventory objects
This updates TR1's inventory object names to match TR2.
2025-04-09 07:14:50 +01:00
lahm86
bf54cf9130 tr2/objects/harpoon_bolt: fix harpoon test on invalid objects
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This fixes testing harpoon colliding with invalid objects, such as
sprite pickups.

Resolves #2718.
2025-04-08 21:53:49 +01:00
Marcin Kurczewski
9fab033d89 tr1/docs: document water colors 2025-04-08 21:50:43 +02:00
Marcin Kurczewski
bd4b56f726 tr1/output: make water color player-customizable 2025-04-08 21:50:43 +02:00
lahm86
ca56a3c68e lara: rename ammo properties
This renames Lara's ammo properties in TR1 to match TR2.
2025-04-08 20:47:40 +01:00
lahm86
e7c193a106 savegame: move common module 2025-04-08 20:47:40 +01:00
lahm86
962e87a9e6 savegame: move types to TRX
This moves the remaining savegame types, enums and consts to TRX. The
strategy has been updated so both games fully match.
2025-04-08 20:47:40 +01:00
lahm86
be337ffbe7 savegame/types: move resume info to TRX
This moves the resume info definition to TRX and updates both games to
use similarly named properties.
2025-04-08 20:47:40 +01:00
lahm86
4350fa2d10 stats/types: move statistic types to TRX
This moves the various statistic structs to TRX and updates naming and
types such that both games match as far as possible.
2025-04-08 20:47:40 +01:00
Marcin Kurczewski
989ba0ac6d tr1/output: improve scissor precision
Resolves #2713.
2025-04-08 21:02:01 +02:00
lahm86
2fb3824b3b items: handle null anims/frames for sprite objects
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This ensures that sprite objects (or anything with no animation index
defined) are assigned a default animation and as such allows us to
handle null frames when getting item bounds. When Lara's animations are
injected, animation index 0 (which sprite objects would previously
default to) is no longer valid, hence sprites then pointing to a null
entry.
2025-04-08 11:05:29 +01:00
lahm86
6820532711 tr1/savegame_bson: append game version
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This adds the current TRX version to the BSON payload.
2025-04-08 07:40:34 +01:00
lahm86
12edeaee37 tr1/savegame: move misc properties to module
This moves the counter, total save count and initial version properties
to the main savegame module rather than using globals.
2025-04-08 07:40:34 +01:00
lahm86
fc09a0cf90 tr1/savegame: remove passing of game info
The savegame strategies no longer require to receive the game info
object so this updates all relevant function signatures.
2025-04-08 07:40:34 +01:00
lahm86
1127372135 misc: remove bonus level unlock storage
Storage of the bonus level unlock flag is redundant because the
gameflow overwrites it always when a level is completed (re-calculated
from the main level stats) and uses the value then to determine if the
next level can be played.
2025-04-08 07:40:34 +01:00
lahm86
8672505f56 tr1/savegame: move death count to resume info
This moves the death count from the global game info into the resume
info stats struct.
2025-04-08 07:40:34 +01:00
lahm86
ebd5331b31 tr1/savegame: move resume info storage
This moves storage of resume info into the savegame module rather than
in the global game info.
2025-04-08 07:40:34 +01:00
Marcin Kurczewski
9c708933bc tr1/option: add ui for changing the fog 2025-04-08 08:16:02 +02:00
Marcin Kurczewski
67354e9f43 tr1/output: fix sprites missing fog effect 2025-04-08 08:16:02 +02:00
Marcin Kurczewski
def5d37192 tr1/config: make fog player-customizable 2025-04-08 08:16:02 +02:00
Marcin Kurczewski
287fddea7e tr1/data: improve bubbles appearance
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-07 17:16:24 +02:00
Marcin Kurczewski
8cde0e45e2 tr1/output: fix sprite UVs
Resolves #2672.
2025-04-07 17:16:24 +02:00
Marcin Kurczewski
264c18c1c8
build: fix Linux executable name
Resolves #2705.
2025-04-07 12:28:36 +02:00
Marcin Kurczewski
04437d02c4 tr1/output: remove pretty pixels option 2025-04-07 12:17:30 +02:00
Marcin Kurczewski
8bec5dc086 tr1/output: store all uvws in a common buffer 2025-04-07 12:17:30 +02:00
Marcin Kurczewski
039032e69e tr1/output: improve bilinear filter UVs 2025-04-07 12:17:30 +02:00
lahm86
0d80ca8f8f tr2/savegame: implement BSON saves
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This implements BSON save games, similar to TR1, and opts for it to be
used in place of legacy for writing. Saves will also be stored in a
separate saves directory.
2025-04-06 20:56:25 +01:00
lahm86
5b524faec9 savegame: move common types
This moves the savegame info and format types to TRX. More intricate
work will be needed in TR1 to allow moving more, so that is beyond
current scope.
2025-04-06 20:56:25 +01:00
lahm86
699c1d9873 tr2/savegame: introduce strategy concept
This introduces the concept of savegame strategies, like TR1X, with the
legacy strategy being the only one currently.
2025-04-06 20:56:25 +01:00
lahm86
49ad919de3 tr2/savegame: isolate legacy savegame module
This isolates TR2's legacy savegame logic into its own module, similar
to TR1, and updates related usage throughout.
2025-04-06 20:56:25 +01:00
lahm86
539763492d tr2/savegame: move pre/post processing logic
This moves the pre and post processing logic to the main savegame
module.
2025-04-06 20:56:25 +01:00
lahm86
2fbe0c582a tr2/savegame: encapsulate save IO
This removes the disjointed OG approach of saving and loading by
storing some variables globally before later interperting them, in
favour of using the same approach as TR1's legacy saves, where the
buffer is read/written in one move.
2025-04-06 20:56:25 +01:00
lahm86
8de5ab20dd game: move game mode flag to game module
This makes the bonus flag common between both games, now accessible in
the game module. This paves the way for TR2 to offer alternate game
modes in the future (beyond current scope).
2025-04-06 20:56:25 +01:00
lahm86
f6d1cfe475 tr2/savegame: refactor savegame logic
This is a general refactor of the savegame logic, primarily to bring it
closer to TR1 in preparation for introducing strategies.
2025-04-06 20:56:25 +01:00
lahm86
5b932b38bb tr2/savegame: move resume info to module storage
This moves the resume info array into the common savegame module.
2025-04-06 20:56:25 +01:00
lahm86
e4545e0d73 tr2/savegame: hide legacy functions
This updates callers to use the Savgame_Save and Savegame_Load
functions in order to hide the current legacy approach. TR1 also had
duplicated function declarations, so these are removed.
2025-04-06 20:56:25 +01:00
lahm86
efdd14aa8d tr2/misc: eliminate current stats
This removes current_stats in favour of using the current info for
levels.
2025-04-06 20:56:25 +01:00
lahm86
fc4a22f79a tr2/types: rename START_INFO to RESUME_INFO
This renames the START_INFO struct to RESUME_INFO, along with the
relevant variables that use it.
2025-04-06 20:56:25 +01:00
lahm86
0c8a9ecb95 input: ignore ALT-F4 on Windows
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Either Alt key can be used with F4 to close windows, so this ensures
both cases are accounted for to ensure no action is taken on the F4
input role.

Resolves #2690.
2025-04-05 19:34:18 +01:00
lahm86
a627ff2beb tr1/savegame: set save game info on save
This allows strategies to set any values in savegame info during saving
that would normally be set during initial fill_info reads. This
resolves the restart level option not being available until the saves
are re-scanned.
2025-04-05 19:33:57 +01:00
lahm86
9e0e36c3c7 tr1/option_passport: fix restart level escape check
This ensures the menu back input is respected when using save crystals
and there are no saves present.
2025-04-05 19:33:57 +01:00
lahm86
1717158094 objects: assign default sprite lighting if not set
This restores default shading on sprites that have values below zero
(i.e. TombEditor default) in the level file.

Resolves #2701.
2025-04-05 17:26:02 +01:00
Marcin Kurczewski
d1986f82d7
tr1/docs: update changelog
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-05 13:13:16 +02:00
Marcin Kurczewski
d647539581 tr1/output: move good functions to its own module
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-04 23:11:09 +02:00
Marcin Kurczewski
8a6a852af3 tr1/output: disable object clipping
Tackles #2005 for TR1.
2025-04-04 23:11:09 +02:00
Marcin Kurczewski
431436eea1 tr1/output: fix fog being applied twice to objects 2025-04-04 23:11:09 +02:00
Marcin Kurczewski
b90707805b tr1/output: minor cleanups 2025-04-04 23:11:09 +02:00
Marcin Kurczewski
02c265683b tr1/inventory: remove sprite objects
They never seem to be used in either OG or the custom levels.
2025-04-04 20:36:54 +02:00
Marcin Kurczewski
30c5d02344 tr1/output: draw trigger debug info using the new approach 2025-04-04 20:36:54 +02:00
Marcin Kurczewski
c874ec0669 tr1/output: draw portal debug info using the new approach 2025-04-04 20:36:54 +02:00
Marcin Kurczewski
530f7f7931 tr1/output: improve file hierarchy 2025-04-04 20:36:54 +02:00
Marcin Kurczewski
a02a8e1229 tr1/output: draw spheres using the new approach 2025-04-04 20:36:54 +02:00
Marcin Kurczewski
519783fafb tr1/output: draw shadows using the new approach 2025-04-04 20:36:54 +02:00
Marcin Kurczewski
effabcfb9c
docs/tr1: update changelog 2025-04-04 17:11:18 +02:00
Marcin Kurczewski
767df0999d tr1/output: merge s_output.c to output.c 2025-04-04 17:10:15 +02:00
Marcin Kurczewski
b797d9f75f tr1/output/objects: rewrite object mesh drawing
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-04 12:29:34 +02:00
Marcin Kurczewski
a6c154d89a tr1/output: fix the scissor test 2025-04-04 12:29:34 +02:00
Marcin Kurczewski
273a63bafe tr1/output: rewrite room drawing 2025-04-04 09:49:15 +02:00
Marcin Kurczewski
01e18f2cf0
gfx/context: fix Mac builds
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-04 00:04:35 +02:00
lahm86
de1a63fc74 tools: clean-up config tool build messages
This fixes VS messages regarding namespaces, removes some redundant
usings and SDK parameters, and adds XAML design data contexts.
2025-04-03 17:09:56 +01:00
lahm86
494c2724fc tools: merge config tool projects
This merges the three config tool projects into a single VS solution.
2025-04-03 17:09:56 +01:00
Marcin Kurczewski
6e27f24264 tr1/output/sprites: do not interpolate texture layer
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-04-01 23:48:39 +02:00
Marcin Kurczewski
c0ff49461c tr1/output/sprites: fix small mistakes 2025-04-01 23:48:39 +02:00
Marcin Kurczewski
88870ef539 tr1/output/sprites: simplify projection matrix 2025-04-01 23:48:39 +02:00
Marcin Kurczewski
e88764f280
tr1: release 4.9
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-03-31 14:12:05 +02:00
Marcin Kurczewski
a52d1efc81
docs/tr1: release 4.9
Some checks failed
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Run code linters / Run code linters (push) Has been cancelled
2025-03-31 14:11:39 +02:00
Marcin Kurczewski
41155eed25
tr1: release 4.9 2025-03-31 14:10:31 +02:00
Marcin Kurczewski
85235ce6a3
docs/tr1: release 4.9 2025-03-31 14:10:17 +02:00
Marcin Kurczewski
3f76e74ed5 build: merge Docker images 2025-03-31 14:09:23 +02:00
Marcin Kurczewski
e048bad1b6 build: split justfile into smaller files; add groups 2025-03-31 14:09:23 +02:00
Marcin Kurczewski
12661fe6e6
docs: fix wording 2025-03-31 12:44:25 +02:00
Marcin Kurczewski
3e2206906e build: add TR2 installer automatic builds
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-03-30 12:34:54 +01:00
lahm86
e2bcd1aeb7 docs: update docs 2025-03-30 12:34:54 +01:00
lahm86
0618baebc9 tools/installer: create TR2 installer
This creates a TR2 installer in similar fashion to TR1. The installers
themselves are basically directory tree copiers, rather than having to
extract from BIN/ISO like TR1.
2025-03-30 12:34:54 +01:00
lahm86
b670eaa16a tr2/data: create images directory
This updates the game flows to look in a dedicated images directory in
order to tidy up the main data folder. Default images provided as PNG
to avoid users having to copy manually.
2025-03-30 12:34:54 +01:00
lahm86
5fb3f84fed tools/installer: standardize output paths
This standardizes output paths to conform with shipped TRX data.
Folders and files created within the target folder will be in
lower-case; PCX files will be copied to a sub-directory within images
as TRX ships with custom images, and this as a result keeps the data
folder tidy.
2025-03-30 12:34:54 +01:00
lahm86
24fb920cd1 tools/installer: rename solution 2025-03-30 12:34:54 +01:00
lahm86
417e7486c8 tools/installer: decouple shortcut and expansion logic
This decouples the shortcut creation so it can be used generically in
either game. It also allows for the expansion pack zip names to be
defined externally rather than guessing from the selected type.
2025-03-30 12:34:54 +01:00
lahm86
cf8fc3d6bf tools/installer: migrate TR1X installer
This migrates the TR1X installer to use the new common library.
2025-03-30 12:34:54 +01:00
lahm86
6142621274 tools/installer: hide expansion options unless enabled 2025-03-30 12:34:54 +01:00
lahm86
365cff79c1 tools/installer: move language to external file
This moves all language used in the installer to an embedded JSON file
to allow for customisation per game.
2025-03-30 12:34:54 +01:00
lahm86
e16fcda94b tools/installer: create common installer library
This creates a generic common installer WPF library for both games.
2025-03-30 12:34:54 +01:00
walkawayy
2adaf2ac0f
controls: fix console opening when remapping its key (#2683)
Some checks failed
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Run code linters / Run code linters (push) Has been cancelled
Resolves #2641.
2025-03-26 09:30:47 -04:00
lahm86
0939b6b384 tr2/inventory: handle GF weapon removal and addition
Some checks failed
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Run code linters / Run code linters (push) Has been cancelled
This responds to scenarios when the game flow removes all weapons but
also re-adds pistols, such that Lara's meshes can be drawn correctly.

Resolves #2677.
2025-03-24 14:46:21 +00:00
lahm86
f396ef4514 tr2: add support for The Golden Mask
This implements support for the Golden Mask by providing relevant game
flow files, command line handling, and object alias setup on launch.

Resolves #1554.
Resolves #1604.
Resolves #1621.
Resolves #2667.
2025-03-24 14:46:21 +00:00
lahm86
ae5a7fe208 objects/wolf: create Golden Mask wolf alias
This allows for the small spider in the Golden Mask to be used as an
alias for the wolf.
2025-03-24 14:46:21 +00:00
lahm86
5bc307b14f objects/bear: create Golden Mask bear alias
This allows for the big spider in the Golden Mask to be used as an
alias for the bear.
2025-03-24 14:46:21 +00:00
lahm86
0aaa6a6779 tr2/objects/monk: create Golden Mask monk alias
This allows the Golden Mask mod to refer to an alias of Monk1 as Monk3,
which in turn allows for the object's shadow to be removed.
2025-03-24 14:46:21 +00:00
lahm86
faa6819832 objects/wolf: move wolf to TRX
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This moves the wolf module fully to TRX.
2025-03-23 13:27:58 +00:00
lahm86
1fafa4483c objects/bear: move bear to TRX
This moves the bear module fully to TRX.
2025-03-23 13:27:58 +00:00
lahm86
3562a23716 lara: move damage function to TRX
This moves Lara_TakeDamage fully to TRX.
2025-03-23 13:27:58 +00:00
lahm86
9e3729702a spawn: move initial spawn declaration to TRX
This moves the declaration of Spawn_Blood to TRX.
2025-03-23 13:27:58 +00:00
lahm86
b6bb8459e8 creature: move creature declarations to TRX
This moves common creature function declarations, types, enums and
consts to TRX, along with TR2's Creature_Activate approach, although
currently only used in TR2. A follow-up task will be to update each
TR1 creature control similarly.
2025-03-23 13:27:58 +00:00
lahm86
58e8def9e5 lot: move initial LOT declaration to TRX
This moves the declaration of LOT_EnableBaddieAI to TRX.
2025-03-23 13:27:58 +00:00
lahm86
5727910c6e tr2/stats: allow two of each secret type
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This allows custom levels to define up to two of each secret type per
level, and continue to have statistics accurately captured.

Resolves #2674.
2025-03-23 08:07:26 +00:00
lahm86
46892814fb tr2/level: pre-load default statistics
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This allows for statistics to be gathered en masse during game launch,
such that legacy saves can still be utilised and refer to accurate
total statistics, such as secrets.
2025-03-22 21:35:06 +00:00
Marcin Kurczewski
5d3d677a00 tr1/output: optimize dynamic sprites 2025-03-22 19:58:24 +01:00
Marcin Kurczewski
edf4b2d5a6 vector: fix const correctness 2025-03-22 19:58:24 +01:00
Marcin Kurczewski
0d7fb0ebef gl: add debug messages in debug builds 2025-03-22 19:58:24 +01:00
lahm86
3d47493af6 tr2/game_flow: implement bonus level support
This implements bonus level handling the game flow for TR2, similar to
TR1.

Resolves #2668.
2025-03-22 17:25:22 +00:00
lahm86
9191c91407 stats: introduce TRX stats header
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This moves the item load observer header to TRX, to allow it to be
called commonly from the main level reader.
2025-03-21 18:16:38 +00:00
lahm86
e45f331ec5 tr2/game_flow: remove secret count from game flow
This removes the need the control around setting secret counts in the
game flow, which is now redundant.
2025-03-21 18:16:38 +00:00
lahm86
fc4064582d tr2/stats: determine secret count automatically
This fixes the hardcoded check to skip secret counts in statistics for
the final two levels and allows to do away with the game flow's secret
count mechanic, by counting the number of secret pickups in the level
and storing in the stats.

Resolves #1582.
2025-03-21 18:16:38 +00:00
walkawayy
e7809774f4 stats: fix the distance travelled display when over 1000m
Resolves #2659.
2025-03-21 11:43:22 -04:00
walkawayy
66d1b59330 tr1/stats: change the detailed stats option to three modes
Resolves #2658.
The three stat options include:
minimal: kills, pickups, secrets, time
detailed: minimal and max pickup and max kill count
full: detailed and ammo hits/used, health packs used, distance
2025-03-21 11:43:22 -04:00
walkawayy
9424083dd8 tr1/stats: move Deaths stat to last in non-detailed stats mode 2025-03-21 11:43:22 -04:00
walkawayy
e3b4a14ac1 tr1/savegame: use simpler method to get savegame header version 2025-03-21 11:43:22 -04:00
walkawayy
0c6ee1b4c5 tr1/stats: introduce stat incrementing functions 2025-03-21 11:43:22 -04:00
walkawayy
2ef5723457 tr1/stats: add extra stats from TR2
Resolves #2651.
Added stats are ammo hits/used, health packs used, and distance
travelled.
2025-03-21 11:43:22 -04:00
lahm86
6583b6f111 tr1/savegame_bson: handle Lara animation shift
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Prior to 4.8, Lara's legacy animation set could still be referenced
from old savegames, but the case now is that only applicable animations
are setup during level load. This shifts Lara's animation index to
match her object if detected on load; a similar approach is already in
place for TombATI saves.

Resolves #2654.
2025-03-21 11:33:18 +00:00
Marcin Kurczewski
1fecbf8c2f tr1/output: color underwater sprites
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
Resolves #2093.
2025-03-20 22:43:23 +01:00
Marcin Kurczewski
0c4f92a61f tr1/output: simplify frame drawing functions 2025-03-20 18:16:19 +01:00
Marcin Kurczewski
39a4279a2e tr1/output: render room sprites using new approach 2025-03-20 18:16:02 +01:00
Marcin Kurczewski
2f7a1aa46d gfx/gl: extract common shader code
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-03-20 14:20:02 +01:00
Marcin Kurczewski
57c7146f32 gfx/gl: remove opengl 2.1 support
According to GitHub comments, it was not working anyway.
2025-03-20 14:20:02 +01:00
Marcin Kurczewski
1ce8e57dd6 gfx/gl: improve metrics 2025-03-20 14:20:02 +01:00
Marcin Kurczewski
87503ba133 benchmark: fix one-liner benchmark messages
Ending a benchmark without ticking in-between with a non-NULL message
would print the time twice.
2025-03-20 14:20:02 +01:00
Marcin Kurczewski
100b49c15f strings: fix NULL 2025-03-20 14:20:02 +01:00
lahm86
e2bf13807a tr2/gym: move global vars to module scope
This removes the global scoped assault course variables and replaces
with accessors.
2025-03-20 12:10:41 +00:00
lahm86
8e1599a48e tr2/gym: move assault course control to gym module
This moves the assault course control logic to the gym module.
2025-03-20 12:10:41 +00:00
lahm86
a2f02dc57e tr2/inventory_ring: allow disabling gym access
This honours the game flow setting for disabling the gym.
2025-03-20 12:10:41 +00:00
lahm86
b33a5649bc tr2/gym: introduce gym module
This introduces a gym module in TR2 to store relevant properties, and
currently moves the inventory open flag out of global scope.
2025-03-20 12:10:41 +00:00
lahm86
77d4df36fc tr1/savegame: fix removing requester heading early
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
This moves the full savegame requester shutdown to the passport control
when other text is being closed rather than when present saves are
filled.

Resolves #2649.
2025-03-19 21:13:36 +00:00
Marcin Kurczewski
2baeeabd23
tools: improve commit name for stable
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped
2025-03-18 22:39:16 +01:00
881 changed files with 22478 additions and 22234 deletions

View file

@ -10,14 +10,8 @@ jobs:
strategy:
matrix:
include:
- game_version: tr1
platform: win
- game_version: tr1
platform: linux
- game_version: tr2
platform: win
- game_version: tr2
platform: linux
- platform: win
- platform: linux
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
@ -35,5 +29,5 @@ jobs:
- name: Build Docker image (${{ matrix.platform }})
run: |
just ${{ matrix.game_version }}-image-${{ matrix.platform }}
just ${{ matrix.game_version }}-push-image-${{ matrix.platform }}
just image-${{ matrix.platform }}
just push-image-${{ matrix.platform }}

View file

@ -3,6 +3,10 @@ name: Build TR1X and the installer
on:
workflow_call:
inputs:
platform:
type: string
description: "Platform to build for"
required: true
target:
type: string
description: "Target to build for"
@ -12,15 +16,6 @@ jobs:
build:
name: Build release assets
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: linux
just_target: tr1-package-linux ${{ inputs.target }}
- platform: win
just_target: tr1-package-win-all ${{ inputs.target }}
- platform: win-installer
just_target: tr1-package-win-installer ${{ inputs.target }}
steps:
- name: Install dependencies
@ -37,13 +32,17 @@ jobs:
name: Prepare variables
run: echo "version=$(just output-current-version 1)" >> $GITHUB_OUTPUT
- name: Package asset (${{ matrix.platform }})
run: just ${{ matrix.just_target }}
- name: Download large assets
if: ${{ inputs.target == 'release' }}
run: just download-assets 1
- name: Package asset (${{ inputs.platform }})
run: just tr1-package-${{ inputs.platform }} ${{ inputs.target }}
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
name: TR1X-${{ steps.vars.outputs.version }}-${{ matrix.platform }}
name: TR1X-${{ steps.vars.outputs.version }}-${{ inputs.platform }}
path: |
*.zip
*.exe

View file

@ -1,8 +1,12 @@
name: Build TR2X
name: Build TR2X and the installer
on:
workflow_call:
inputs:
platform:
type: string
description: "Platform to build for"
required: true
target:
type: string
description: "Target to build for"
@ -12,13 +16,6 @@ jobs:
build:
name: Build release assets
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: linux
just_target: tr2-package-linux ${{ inputs.target }}
- platform: win
just_target: tr2-package-win-all ${{ inputs.target }}
steps:
- name: Install dependencies
@ -35,13 +32,17 @@ jobs:
name: Prepare variables
run: echo "version=$(just output-current-version 2)" >> $GITHUB_OUTPUT
- name: Package asset (${{ matrix.platform }})
run: just ${{ matrix.just_target }}
- name: Download large assets
if: ${{ inputs.target == 'release' }}
run: just download-assets 2
- name: Package asset (${{ inputs.platform }})
run: just tr2-package-${{ inputs.platform }} ${{ inputs.target }}
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
name: TR2X-${{ steps.vars.outputs.version }}-${{ matrix.platform }}
name: TR2X-${{ steps.vars.outputs.version }}-${{ inputs.platform }}
path: |
*.zip
*.exe

View file

@ -11,34 +11,52 @@ on:
- '!develop'
jobs:
package_tr1_multiplatform:
name: Build TR1
package_tr1_linux:
name: TR1 (Linux)
uses: ./.github/workflows/job_build_tr1.yml
with:
target: 'debug'
platform: linux
target: debug
secrets: inherit
package_tr1_win:
name: TR1 (Windows)
uses: ./.github/workflows/job_build_tr1.yml
with:
platform: win-all
target: debug
secrets: inherit
package_tr1_mac:
name: Build TR1
name: TR1 (Mac)
if: vars.MACOS_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr1_macos.yml
with:
target: 'debug'
target: debug
let_mac_fail: true
secrets: inherit
package_tr2_multiplatform:
name: Build TR2
package_tr2_linux:
name: TR2 (Linux)
uses: ./.github/workflows/job_build_tr2.yml
with:
target: 'debug'
platform: linux
target: debug
secrets: inherit
package_tr2_win:
name: TR2 (Windows)
uses: ./.github/workflows/job_build_tr2.yml
with:
platform: win-all
target: debug
secrets: inherit
package_tr2_mac:
name: Build TR2
name: TR2 (Mac)
if: vars.MACOS_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr2_macos.yml
with:
target: 'debug'
target: debug
let_mac_fail: true
secrets: inherit

View file

@ -9,16 +9,24 @@ on:
- develop
jobs:
package_tr1_multiplatform:
name: Build TR1
if: vars.PRERELEASE_ENABLE == 'true'
package_tr1_linux:
name: TR1 (Linux)
uses: ./.github/workflows/job_build_tr1.yml
with:
target: 'debug'
platform: linux
target: debug
secrets: inherit
package_tr1_win:
name: TR1 (Windows)
uses: ./.github/workflows/job_build_tr1.yml
with:
platform: win-all
target: debug
secrets: inherit
package_tr1_mac:
name: Build TR1
name: TR1 (Mac)
if: |
vars.PRERELEASE_ENABLE == 'true' &&
vars.MACOS_ENABLE == 'true'
@ -28,16 +36,24 @@ jobs:
let_mac_fail: true
secrets: inherit
package_tr2_multiplatform:
name: Build TR2
if: vars.PRERELEASE_ENABLE == 'true'
package_tr2_linux:
name: TR2 (Linux)
uses: ./.github/workflows/job_build_tr2.yml
with:
target: 'debug'
platform: linux
target: debug
secrets: inherit
package_tr2_win:
name: TR2 (Windows)
uses: ./.github/workflows/job_build_tr2.yml
with:
platform: win-all
target: debug
secrets: inherit
package_tr2_mac:
name: Build TR2
name: TR2 (Mac)
if: |
vars.PRERELEASE_ENABLE == 'true' &&
vars.MACOS_ENABLE == 'true'
@ -48,12 +64,14 @@ jobs:
secrets: inherit
publish_prerelease:
if: vars.PRERELEASE_ENABLE == 'true'
if: always() && (vars.PRERELEASE_ENABLE == 'true')
name: Create a prerelease
needs:
- package_tr1_multiplatform
- package_tr1_linux
- package_tr1_win
- package_tr1_mac
- package_tr2_multiplatform
- package_tr2_linux
- package_tr2_win
- package_tr2_mac
with:
draft: false

View file

@ -28,30 +28,51 @@ on:
default: github.ref_name
jobs:
package_multiplatform:
name: Build release assets
package_tr1_linux:
name: Build TR1 (Linux)
if: vars.RELEASE_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr1.yml
with:
target: "release"
platform: linux
target: release
secrets: inherit
package_tr1_win:
name: Build TR1 (Windows)
if: vars.RELEASE_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr1.yml
with:
platform: win-all
target: release
secrets: inherit
package_tr1_win_installer:
name: Build TR1 (Windows installer)
if: vars.RELEASE_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr1.yml
with:
platform: win-installer
target: release
secrets: inherit
package_mac:
name: "Build release assets (mac)"
name: Build TR1 (Mac)
if: |
vars.RELEASE_ENABLE == 'true' &&
vars.MACOS_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr1_macos.yml
with:
target: "release"
target: release
let_mac_fail: ${{ inputs.let_mac_fail == true || inputs.let_mac_fail == 'true' }}
secrets: inherit
publish_release:
if: vars.RELEASE_ENABLE == 'true'
if: always() && (vars.RELEASE_ENABLE == 'true')
name: Create a GitHub release
needs:
- package_multiplatform
- package_tr1_linux
- package_tr1_win
- package_tr1_win_installer
- package_mac
with:
draft: ${{ inputs.draft || false }}

View file

@ -28,30 +28,52 @@ on:
default: github.ref_name
jobs:
package_multiplatform:
name: Build release assets
package_tr2_linux:
name: Build TR2 (Linux)
if: vars.RELEASE_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr2.yml
with:
target: "release"
platform: linux
target: release
secrets: inherit
package_tr2_win:
name: Build TR2 (Windows)
if: vars.RELEASE_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr2.yml
with:
platform: win-all
target: release
secrets: inherit
package_tr2_win_installer:
name: Build TR2 (Windows installer)
if: vars.RELEASE_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr2.yml
with:
platform: win-installer
target: release
secrets: inherit
package_mac:
name: "Build release assets (mac)"
name: Build TR2 (Mac)
if: |
vars.RELEASE_ENABLE == 'true' &&
vars.MACOS_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr2_macos.yml
with:
target: "release"
target: release
let_mac_fail: ${{ inputs.let_mac_fail == true || inputs.let_mac_fail == 'true' }}
secrets: inherit
publish_release:
if: vars.RELEASE_ENABLE == 'true'
if: always() && (vars.RELEASE_ENABLE == 'true')
name: Create a GitHub release
needs:
- package_multiplatform
- package_tr2_linux
- package_tr2_win
- package_tr2_win_installer
- package_mac
with:
draft: ${{ inputs.draft || false }}
prerelease: ${{ inputs.draft || false }}

11
.gitignore vendored
View file

@ -35,3 +35,14 @@ Release/
**/subprojects/dwarfstack-*/
src/tr1/subprojects/dwarfstack.wrap
src/tr2/subprojects/dwarfstack.wrap
data/tr1/ship/data/images/
data/tr2/ship/data/images/
data/tr2/ship/data/level1.tr2
data/tr2/ship/data/level2.tr2
data/tr2/ship/data/level3.tr2
data/tr2/ship/data/level4.tr2
data/tr2/ship/data/level5.tr2
data/tr2/ship/data/main_gm.sfx
data/tr2/ship/data/title_gm.tr2
data/tr2/ship/music/

View file

@ -123,3 +123,9 @@ Please refer to the [detailed documentation](docs/tr2/).
further refined our identity by adopting the name TR1X. Meanwhile, TR2Main
follows a completely separate and unique path, unconnected to our
development work.
## Credits
- Endless GitHub contributors.
- TR1 title screen image by Kidd Bowyer. HD assets by goblan and posix.
- TR2 HD images by Arsunt.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

File diff suppressed because one or more lines are too long

BIN
data/tr1/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

View file

@ -8,12 +8,10 @@
"savegame_fmt_legacy": "saveati.%d",
"savegame_fmt_bson": "save_tr1_%02d.dat",
"demo_delay": 16,
"water_color": [0.45, 1.0, 1.0],
"draw_distance_fade": 22.0,
"draw_distance_max": 30.0,
"injections": [
"data/injections/backpack.bin",
"data/injections/braid.bin",
"data/injections/bubbles.bin",
"data/injections/lara_animations.bin",
"data/injections/purple_crystal.bin",
"data/injections/uzi_sfx.bin",
@ -30,7 +28,7 @@
"music_track": 2,
"inherit_injections": false,
"sequence": [
{"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/eidos.webp", "legal": true, "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "play_fmv", "fmv_id": 0},
{"type": "play_fmv", "fmv_id": 1},
{"type": "play_fmv", "fmv_id": 2},
@ -59,6 +57,7 @@
"injections": [
"data/injections/lara_gym_guns.bin",
"data/injections/braid.bin",
"data/injections/bubbles.bin",
"data/injections/gym_textures.bin",
"data/injections/lara_animations.bin",
"data/injections/uzi_sfx.bin",
@ -151,6 +150,7 @@
"injections": [
"data/injections/folly_fd.bin",
"data/injections/folly_itemrots.bin",
"data/injections/folly_pickup_meshes.bin",
"data/injections/folly_textures.bin",
],
},
@ -246,6 +246,7 @@
"data/injections/khamoon_fd.bin",
"data/injections/khamoon_mummy.bin",
"data/injections/khamoon_textures.bin",
"data/injections/panther_sfx.bin",
],
},
@ -265,6 +266,7 @@
"data/injections/obelisk_meshfixes.bin",
"data/injections/obelisk_skybox.bin",
"data/injections/obelisk_textures.bin",
"data/injections/panther_sfx.bin",
],
},
@ -306,6 +308,7 @@
"data/injections/mines_meshfixes.bin",
"data/injections/mines_pushblocks.bin",
"data/injections/mines_textures.bin",
"data/injections/skate_kid_sfx.bin",
],
"item_drops": [
{"enemy_num": 17, "object_ids": [86]},
@ -481,8 +484,8 @@
{
"path": "data/cut4.phd",
"music_track": 22,
"draw_distance_fade": 12.0,
"draw_distance_max": 18.0,
"fog_start": 12.0,
"fog_end": 18.0,
"lara_type": "player_1",
"inherit_injections": false,
"injections": [
@ -503,8 +506,8 @@
// FMVs
"fmvs": [
{"path": "fmv/core.avi"},
{"path": "fmv/escape.avi"},
{"path": "fmv/core.avi", "legal": true},
{"path": "fmv/escape.avi", "legal": true},
{"path": "fmv/cafe.avi"},
{"path": "fmv/mansion.avi"},
{"path": "fmv/snow.avi"},

View file

@ -9,12 +9,10 @@
"savegame_fmt_legacy": "save_demo_pc.%d",
"savegame_fmt_bson": "save_demo_pc_%02d.dat",
"demo_delay": 16,
"water_color": [0.45, 1.0, 1.0],
"draw_distance_fade": 22.0,
"draw_distance_max": 30.0,
"injections": [
"data/injections/backpack.bin",
"data/injections/braid.bin",
"data/injections/bubbles.bin",
"data/injections/lara_animations.bin",
"data/injections/lara_jumping.bin",
"data/injections/uzi_sfx.bin",

View file

@ -5,12 +5,10 @@
"savegame_fmt_legacy": "save_tmp.%d",
"savegame_fmt_bson": "save_tmp_%02d.dat",
"demo_delay": 0,
"water_color": [0.45, 1.0, 1.0],
"draw_distance_fade": 22.0,
"draw_distance_max": 30.0,
"injections": [
"data/injections/backpack.bin",
"data/injections/braid.bin",
"data/injections/bubbles.bin",
"data/injections/lara_animations.bin",
"data/injections/lara_jumping.bin",
"data/injections/uzi_sfx.bin",

View file

@ -8,12 +8,10 @@
"savegame_fmt_legacy": "saveuba.%d",
"savegame_fmt_bson": "save_trub_%02d.dat",
"demo_delay": 16,
"water_color": [0.45, 1.0, 1.0],
"draw_distance_fade": 22,
"draw_distance_max": 30,
"injections": [
"data/injections/backpack.bin",
"data/injections/braid.bin",
"data/injections/bubbles.bin",
"data/injections/lara_animations.bin",
"data/injections/uzi_sfx.bin",
"data/injections/explosion.bin",
@ -36,7 +34,7 @@
"data/injections/pda_model.bin",
],
"sequence": [
{"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/eidos.webp", "legal": true, "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "play_fmv", "fmv_id": 0},
{"type": "play_fmv", "fmv_id": 1},
{"type": "exit_to_title"},
@ -44,7 +42,7 @@
},
"levels": [
// Level 0: Return to Egypt
// Level 1: Return to Egypt
{
"path": "data/egypt.phd",
"music_track": 59,
@ -58,11 +56,12 @@
"data/injections/egypt_fd.bin",
"data/injections/egypt_meshfixes.bin",
"data/injections/egypt_textures.bin",
"data/injections/panther_sfx.bin",
],
"unobtainable_kills": 1,
},
// Level 1: Temple of the Cat
// Level 2: Temple of the Cat
{
"path": "data/cat.phd",
"music_track": 59,
@ -77,11 +76,12 @@
"data/injections/cat_itemrots.bin",
"data/injections/cat_meshfixes.bin",
"data/injections/cat_textures.bin",
"data/injections/panther_sfx.bin",
],
"unobtainable_pickups": 1,
},
// Level 2: Atlantean Stronghold
// Level 3: Atlantean Stronghold
{
"path": "data/end.phd",
"music_track": 60,
@ -98,7 +98,7 @@
"unobtainable_kills": 1,
},
// Level 3: The Hive
// Level 4: The Hive
{
"path": "data/end2.phd",
"music_track": 60,
@ -123,7 +123,8 @@
{"type": "dummy"},
// Level 5: Current Position
// Level 6: Current Position
// This level is necessary to read TombATI's save files.
{
"path": "data/current.phd",
"type": "current",
@ -134,7 +135,7 @@
],
"fmvs": [
{"path": "fmv/core.avi"},
{"path": "fmv/escape.avi"},
{"path": "fmv/core.avi", "legal": true},
{"path": "fmv/escape.avi", "legal": true},
],
}

View file

@ -271,7 +271,7 @@
"door_8": {"name": "Door 8"},
"trapdoor_1": {"name": "Trapdoor 1"},
"trapdoor_2": {"name": "Trapdoor 2"},
"big_trapdoor": {"name": "Big Trapdoor"},
"trapdoor_3": {"name": "Trapdoor 3"},
"bridge_flat": {"name": "Bridge Flat"},
"bridge_tilt_1": {"name": "Bridge Tilt 1"},
"bridge_tilt_2": {"name": "Bridge Tilt 2"},
@ -341,35 +341,40 @@
},
"game_strings": {
"CONTROL_BACKEND_CONTROLLER": "Controller",
"CONTROL_BACKEND_KEYBOARD": "Keyboard",
"CONTROL_CUSTOMIZE": "Customize Controls",
"CONTROL_CUSTOM_1": "User Keys 1",
"CONTROL_CUSTOM_2": "User Keys 2",
"CONTROL_CUSTOM_3": "User Keys 3",
"CONTROL_DEFAULT_KEYS": "Default Keys",
"CONTROL_RESET_DEFAULTS": "Reset All: Hold %s",
"CONTROL_UNBIND": "Unbind: Hold %s",
"CONTROLS_BACKEND_CONTROLLER": "Controller",
"CONTROLS_BACKEND_KEYBOARD": "Keyboard",
"CONTROLS_CUSTOMIZE": "Customize Controls",
"CONTROLS_CUSTOM_1": "User Keys 1",
"CONTROLS_CUSTOM_2": "User Keys 2",
"CONTROLS_CUSTOM_3": "User Keys 3",
"CONTROLS_DEFAULT_KEYS": "Default Keys",
"CONTROLS_RESET_DEFAULTS": "Reset All: Hold %s",
"CONTROLS_UNBIND": "Unbind: Hold %s",
"DETAIL_BILINEAR": "Bilinear",
"DETAIL_BRIGHTNESS": "Brightness",
"DETAIL_DECIMAL_FMT": "%d",
"DETAIL_FBO_FILTER": "FBO filter",
"DETAIL_FLOAT_FMT": "%.1f",
"DETAIL_FOG_END": "Fog end",
"DETAIL_FOG_START": "Fog start",
"DETAIL_FPS": "FPS",
"DETAIL_PRETTY_PIXELS": "Pretty pixels",
"DETAIL_INTEGER_FMT": "%d",
"DETAIL_REFLECTIONS": "Reflections",
"DETAIL_RENDER_MODE": "Render mode",
"DETAIL_RENDER_MODE_FBO": "Framebuffer",
"DETAIL_RENDER_MODE_LEGACY": "Window size",
"DETAIL_RESOLUTION": "Resolution",
"DETAIL_RESOLUTION_FMT": "%dx%d",
"DETAIL_SELECT_DETAIL": "Select Detail",
"DETAIL_STRING_FMT": "%s",
"DETAIL_TEXTURE_FILTER": "Texture filter",
"DETAIL_TITLE": "Graphic Options",
"DETAIL_TRAPEZOID_FILTER": "Trapezoid filter",
"DETAIL_UI_BAR_SCALE": "UI bar scale",
"DETAIL_UI_SCROLL_WRAPAROUND": "UI scroll wrap",
"DETAIL_UI_TEXT_SCALE": "UI text scale",
"DETAIL_VSYNC": "VSync",
"DETAIL_WATER_COLOR_B": "Water color (B)",
"DETAIL_WATER_COLOR_G": "Water color (G)",
"DETAIL_WATER_COLOR_R": "Water color (R)",
"HEADING_GAME_OVER": "GAME OVER",
"HEADING_INVENTORY": "INVENTORY",
"HEADING_ITEMS": "ITEMS",
@ -526,13 +531,18 @@
"PHOTO_MODE_ROTATE_PROMPT": "Rotate camera",
"PHOTO_MODE_SNAP_PROMPT": "Take picture",
"PHOTO_MODE_TITLE": "Photo Mode",
"SOUND_SET_VOLUMES": "Set Volumes",
"SOUND_DIALOG_MUSIC": "\\{icon sound} Sound",
"SOUND_DIALOG_SOUND": "\\{icon music} Music",
"SOUND_DIALOG_TITLE": "Set Volumes",
"STATS_AMMO": "AMMO HITS/USED",
"STATS_BASIC_FMT": "%d",
"STATS_BONUS_STATISTICS": "Bonus Statistics",
"STATS_DEATHS": "DEATHS",
"STATS_DETAIL_FMT": "%d of %d",
"STATS_DISTANCE_TRAVELLED": "DISTANCE TRAVELLED",
"STATS_FINAL_STATISTICS": "Final Statistics",
"STATS_KILLS": "KILLS",
"STATS_MEDIPACKS_USED": "HEALTH PACKS USED",
"STATS_PICKUPS": "PICKUPS",
"STATS_SECRETS": "SECRETS",
"STATS_TIME_TAKEN": "TIME TAKEN",

View file

@ -1,6 +1,6 @@
{
"levels": [
// Level 0: Return to Egypt
// Level 1: Return to Egypt
{
"title": "Return to Egypt",
"objects": {
@ -8,7 +8,7 @@
},
},
// Level 1: Temple of the Cat
// Level 2: Temple of the Cat
{
"title": "Temple of the Cat",
"objects": {
@ -16,22 +16,22 @@
},
},
// Level 2: Atlantean Stronghold
// Level 3: Atlantean Stronghold
{
"title": "Atlantean Stronghold",
},
// Level 3: The Hive
// Level 4: The Hive
{
"title": "The Hive",
},
// Level 4: Title
// Level 5: Title
{
"title": "Title",
},
// Level 5: Current Position
// Level 6: Current Position
{
"title": "Current Position",
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 410 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,25 +1,18 @@
#ifdef VERTEX
// Vertex shader
#ifdef OGL33C
out vec2 vertTexCoords;
out vec2 vertCoords;
#else
varying vec2 vertTexCoords;
varying vec2 vertCoords;
#endif
layout(location = 0) in vec2 inPosition;
layout(location = 1) in vec2 inTexCoords;
out vec2 vertTexCoords;
out vec2 vertCoords;
void main(void) {
gl_Position = vec4(inPosition * vec2(2.0, -2.0) + vec2(-1.0, 1.0), 0.0, 1.0);
vertCoords = inPosition;
vertTexCoords = inTexCoords;
}
#else
// Fragment shader
#elif defined(FRAGMENT)
#define EFFECT_NONE 0
#define EFFECT_VIGNETTE 1
@ -33,42 +26,29 @@ uniform bool tintEnabled;
uniform vec3 tintColor;
uniform int effect;
#ifdef OGL33C
#define OUTCOLOR outColor
#define TEXTURE2D texture
#define TEXTURE1D texture
in vec2 vertTexCoords;
in vec2 vertCoords;
out vec4 outColor;
#else
#define OUTCOLOR gl_FragColor
#define TEXTURE2D texture2D
#define TEXTURE1D texture1D
varying vec2 vertTexCoords;
varying vec2 vertCoords;
#endif
in vec2 vertTexCoords;
in vec2 vertCoords;
out vec4 outColor;
void main(void) {
vec2 uv = vertTexCoords;
if (alphaEnabled) {
float alpha = TEXTURE2D(texAlpha, uv).r;
float alpha = texture(texAlpha, uv).r;
if (alpha < 0.5) {
discard;
}
}
if (paletteEnabled) {
float paletteIndex = TEXTURE2D(texMain, uv).r;
OUTCOLOR = TEXTURE1D(texPalette, paletteIndex);
float paletteIndex = texture(texMain, uv).r;
outColor = texture(texPalette, paletteIndex);
} else {
OUTCOLOR = TEXTURE2D(texMain, uv);
outColor = texture(texMain, uv);
}
if (tintEnabled) {
OUTCOLOR.rgb *= tintColor.rgb;
outColor.rgb *= tintColor.rgb;
}
if (effect == EFFECT_VIGNETTE) {
@ -76,7 +56,7 @@ void main(void) {
float y_dist = vertCoords.y - 0.5;
float light = 256 - sqrt(x_dist * x_dist + y_dist * y_dist ) * 300.0;
light = clamp(light, 0, 255) / 255;
OUTCOLOR *= vec4(light, light, light, 1);
outColor *= vec4(light, light, light, 1);
}
}
#endif // VERTEX
#endif

View file

@ -1,5 +1,4 @@
#ifdef VERTEX
// Vertex shader
layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec4 inTexCoords;
@ -7,20 +6,13 @@ layout(location = 2) in float inTexZ;
layout(location = 3) in vec4 inColor;
uniform mat4 matProjection;
uniform mat4 matModelView;
#ifdef OGL33C
out vec4 vertColor;
out vec4 vertTexCoords;
out float vertTexZ;
#else
varying vec4 vertColor;
varying vec4 vertTexCoords;
varying float vertTexZ;
#endif
out vec4 vertColor;
out vec4 vertTexCoords;
out float vertTexZ;
void main(void) {
gl_Position = matProjection * matModelView * vec4(inPosition, 1);
gl_Position = matProjection * vec4(inPosition, 1);
vertColor = inColor / 255.0;
vertTexCoords = inTexCoords;
vertTexCoords.xy *= vertTexCoords.zw;
@ -28,8 +20,7 @@ void main(void) {
vertTexZ = inTexZ;
}
#else
// Fragment shader
#elif defined(FRAGMENT)
uniform sampler2D tex0;
uniform bool texturingEnabled;
@ -38,52 +29,28 @@ uniform bool alphaPointDiscard;
uniform float alphaThreshold;
uniform float brightnessMultiplier;
#ifdef OGL33C
#define OUTCOLOR outColor
#define TEXTURESIZE textureSize
#define TEXTURE texture
#define TEXELFETCH texelFetch
in vec4 vertColor;
in vec4 vertTexCoords;
in float vertTexZ;
out vec4 OUTCOLOR;
#else
#define OUTCOLOR gl_FragColor
#define TEXTURESIZE textureSize2D
#define TEXELFETCH texelFetch2D
#define TEXTURE texture2D
varying vec4 vertColor;
varying vec4 vertTexCoords;
varying float vertTexZ;
#endif
in vec4 vertColor;
in vec4 vertTexCoords;
in float vertTexZ;
out vec4 outColor;
void main(void) {
OUTCOLOR = vertColor;
outColor = vertColor;
vec2 texCoords = vertTexCoords.xy;
texCoords.xy /= vertTexCoords.zw;
if (texturingEnabled) {
#if defined(GL_EXT_gpu_shader4) || defined(OGL33C)
if (alphaPointDiscard && smoothingEnabled) {
// do not use smoothing for chroma key
ivec2 size = TEXTURESIZE(tex0, 0);
ivec2 texCoordsNN = ivec2(texCoords.xy * size.xy) % size.xy;
vec4 texel = TEXELFETCH(tex0, texCoordsNN, 0);
if (texel.a == 0.0) {
discard;
}
if (alphaPointDiscard && smoothingEnabled && discardTranslucent(tex0, texCoords)) {
discard;
}
#endif
vec4 texColor = TEXTURE(tex0, texCoords.xy);
vec4 texColor = texture(tex0, texCoords.xy);
if (alphaThreshold >= 0.0 && texColor.a <= alphaThreshold) {
discard;
}
OUTCOLOR = vec4(OUTCOLOR.rgb * texColor.rgb * brightnessMultiplier, texColor.a);
outColor = vec4(outColor.rgb * texColor.rgb * brightnessMultiplier, texColor.a);
}
}
#endif // VERTEX
#endif

View file

@ -0,0 +1,65 @@
#define WALL_L 1024
#define SHADE_NEUTRAL 0x1000
#define SHADE_MAX 0x1FFF
#define VERT_NO_CAUSTICS 0x01
#define VERT_FLAT_SHADED 0x02
#define VERT_REFLECTIVE 0x04
#define VERT_NO_LIGHTING 0x08
#define VERT_SPRITE 0x10 // flag for billboarded sprites in mesh shader
#define WIBBLE_SIZE 32
#define MAX_WIBBLE 2
#define PI 3.1415926538
vec3 waterWibble(vec4 position, vec2 viewportSize, int time)
{
// get screen coordinates
vec3 ndc = position.xyz / position.w; //perspective divide/normalize
vec2 viewportCoord = ndc.xy * 0.5 + 0.5; //ndc is -1 to 1 in GL. scale for 0 to 1
vec2 viewportPixelCoord = viewportCoord * viewportSize;
viewportPixelCoord.x += sin((float(time) + viewportPixelCoord.y) * 2.0 * PI / WIBBLE_SIZE) * MAX_WIBBLE;
viewportPixelCoord.y += sin((float(time) + viewportPixelCoord.x) * 2.0 * PI / WIBBLE_SIZE) * MAX_WIBBLE;
// reverse transform
viewportCoord = viewportPixelCoord / viewportSize;
ndc.xy = (viewportCoord - 0.5) * 2.0;
return ndc * position.w;
}
float shadeFog(float shade, float depth, vec2 fog)
{
float fogBegin = fog.x;
float fogEnd = fog.y;
if (depth < fogBegin) {
return shade + 0.0;
} else if (depth >= fogEnd) {
return shade + float(SHADE_MAX);
} else {
return shade + (depth - fogBegin) * SHADE_MAX / (fogEnd - fogBegin);
}
}
vec3 applyShade(vec3 color, float shade)
{
return color * (2.0 - (shade / SHADE_NEUTRAL));
}
bool discardTranslucent(sampler2D tex, vec2 uv)
{
// do not use smoothing for chroma key
ivec2 size = textureSize(tex, 0);
ivec2 texCoordsNN = ivec2(uv.xy * size.xy) % size.xy;
vec4 texel = texelFetch(tex, texCoordsNN, 0);
return texel.a == 0.0;
}
bool discardTranslucent(sampler2DArray tex, vec3 uvw)
{
// do not use smoothing for chroma key
ivec2 size = textureSize(tex, 0).xy;
ivec3 texCoordsNN = ivec3(ivec2(uvw.xy * size.xy) % size.xy, uvw.z);
vec4 texel = texelFetch(tex, texCoordsNN, 0);
return texel.a == 0.0;
}

View file

@ -1,38 +1,22 @@
#ifdef VERTEX
// Vertex shader
layout(location = 0) in vec2 inPosition;
#ifdef OGL33C
out vec2 vertTexCoords;
#else
varying vec2 vertTexCoords;
#endif
out vec2 vertTexCoords;
void main(void) {
vertTexCoords = inPosition;
gl_Position = vec4(vertTexCoords * vec2(2.0, 2.0) + vec2(-1.0, -1.0), 0.0, 1.0);
}
#else
// Fragment shader
#elif defined(FRAGMENT)
uniform sampler2D tex0;
#ifdef OGL33C
#define OUTCOLOR outColor
#define TEXTURE texture
in vec2 vertTexCoords;
out vec4 OUTCOLOR;
#else
#define OUTCOLOR gl_FragColor
#define TEXTURE texture2D
varying vec2 vertTexCoords;
#endif
in vec2 vertTexCoords;
out vec4 outColor;
void main(void) {
OUTCOLOR = TEXTURE(tex0, vertTexCoords);
outColor = texture(tex0, vertTexCoords);
}
#endif // VERTEX
#endif

View file

@ -0,0 +1,122 @@
#ifdef VERTEX
uniform int uTime;
uniform vec2 uViewportSize;
uniform mat4 uMatProjection;
uniform mat4 uMatModelView;
uniform bool uTrapezoidFilterEnabled;
uniform bool uWibbleEffect;
layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec3 inNormal;
layout(location = 2) in vec3 inUVW;
layout(location = 3) in vec4 inTextureSize;
layout(location = 4) in vec2 inTrapezoidRatios;
layout(location = 5) in int inFlags;
layout(location = 6) in vec4 inColor;
layout(location = 7) in float inShade;
out vec4 gWorldPos;
out vec3 gNormal;
flat out int gFlags;
flat out int gTexLayer;
out vec2 gTexUV;
flat out vec4 gAtlasSize;
out vec2 gTrapezoidRatios;
out float gShade;
out vec4 gColor;
void main(void) {
// billboard sprites if flagged, else standard vertex transform
vec4 eyePos = uMatModelView * vec4(inPosition.xyz, 1.0);
if ((inFlags & VERT_SPRITE) != 0) {
// inNormal.xy carries sprite displacement for billboarding
eyePos.xy += inNormal.xy;
}
gWorldPos = eyePos;
gNormal = inNormal;
gl_Position = uMatProjection * eyePos;
// apply water wibble effect only to non-sprite vertices
if (uWibbleEffect && (inFlags & VERT_NO_CAUSTICS) == 0 && (inFlags & VERT_SPRITE) == 0) {
gl_Position.xyz =
waterWibble(gl_Position, uViewportSize, uTime);
}
gFlags = inFlags;
gAtlasSize = inTextureSize;
gTexUV = inUVW.xy;
gTexLayer = int(inUVW.z);
gTrapezoidRatios = inTrapezoidRatios;
if (uTrapezoidFilterEnabled) {
gTexUV *= inTrapezoidRatios;
}
gShade = inShade;
gColor = inColor;
}
#elif defined(FRAGMENT)
uniform int uTime;
uniform sampler2DArray uTexAtlas;
uniform sampler2D uTexEnvMap;
uniform bool uSmoothingEnabled;
uniform bool uAlphaDiscardEnabled;
uniform bool uTrapezoidFilterEnabled;
uniform bool uReflectionsEnabled;
uniform float uAlphaThreshold;
uniform float uBrightnessMultiplier;
uniform vec3 uGlobalTint;
uniform vec2 uFog; // x = fog start, y = fog end
uniform bool uWaterEffect;
in vec4 gWorldPos;
in vec3 gNormal;
flat in int gFlags;
flat in int gTexLayer;
in vec2 gTexUV;
flat in vec4 gAtlasSize;
in float gShade;
in vec4 gColor;
in vec2 gTrapezoidRatios;
out vec4 outColor;
vec2 clampTexAtlas(vec2 uv, vec4 atlasSize)
{
float epsilon = 0.5 / 256.0;
return clamp(uv, atlasSize.xy + epsilon, atlasSize.zw - epsilon);
}
void main(void) {
vec4 texColor = gColor;
vec3 texCoords = vec3(gTexUV.x, gTexUV.y, gTexLayer);
if (uTrapezoidFilterEnabled) {
texCoords.xy /= gTrapezoidRatios;
}
texCoords.xy = clampTexAtlas(texCoords.xy, gAtlasSize);
if ((gFlags & VERT_FLAT_SHADED) == 0 && texCoords.z >= 0) {
if (uAlphaDiscardEnabled && uSmoothingEnabled && discardTranslucent(uTexAtlas, texCoords)) {
discard;
}
texColor = texture(uTexAtlas, texCoords);
if (uAlphaThreshold >= 0.0 && texColor.a <= uAlphaThreshold) {
discard;
}
}
if ((gFlags & VERT_REFLECTIVE) != 0 && uReflectionsEnabled) {
texColor *= texture(uTexEnvMap, (normalize(gNormal) * 0.5 + 0.5).xy) * 2;
}
if ((gFlags & VERT_NO_LIGHTING) == 0) {
float shade = gShade;
shade = shadeFog(shade, gWorldPos.z, uFog);
texColor.rgb = applyShade(texColor.rgb, shade);
texColor.rgb *= uGlobalTint;
}
texColor.rgb *= uBrightnessMultiplier;
outColor = vec4(texColor.rgb, gColor.a);
}
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

File diff suppressed because it is too large Load diff

BIN
data/tr2/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

View file

@ -2,8 +2,9 @@
// NOTE: bad changes to this file may result in crashes.
// Lines starting with double slashes are comments and are ignored.
"main_menu_picture": "data/title.pcx",
"main_menu_picture": "data/images/title_eu.webp",
"savegame_fmt_legacy": "savegame.%d",
"savegame_fmt_bson": "save_tr2_%02d.dat",
"cmd_init": {"action": "exit_to_title"},
"cmd_title": {"action": "noop"},
@ -27,7 +28,7 @@
"path": "data/title.tr2",
"music_track": 64,
"sequence": [
{"type": "display_picture", "path": "data/legal.pcx"},
{"type": "display_picture", "path": "data/images/legal_eu.webp", "legal": true},
{"type": "play_fmv", "fmv_id": 0},
{"type": "play_fmv", "fmv_id": 1},
{"type": "exit_to_title"},
@ -46,7 +47,6 @@
"path": "data/assault.tr2",
"music_track": -1,
"sequence": [
{"type": "set_secret_count", "count": 0},
{"type": "loop_game"},
{"type": "level_stats"},
],
@ -85,6 +85,7 @@
{"type": "level_complete"},
],
"injections": [
"data/injections/boat_bits.bin",
"data/injections/common_pickup_meshes.bin",
],
},
@ -216,6 +217,7 @@
],
"injections": [
"data/injections/living_deck_goon_sfx.bin",
"data/injections/living_fd.bin",
"data/injections/living_pickup_meshes.bin",
"data/injections/seaweed_collision.bin",
],
@ -233,6 +235,7 @@
{"type": "level_complete"},
],
"injections": [
"data/injections/deck_fd.bin",
"data/injections/deck_itemrots.bin",
"data/injections/deck_pickup_meshes.bin",
"data/injections/living_deck_goon_sfx.bin",
@ -309,6 +312,7 @@
],
"injections": [
"data/injections/common_pickup_meshes.bin",
"data/injections/guardian_death_commands.bin",
"data/injections/palace_fd.bin",
"data/injections/palace_itemrots.bin",
],
@ -358,7 +362,6 @@
"path": "data/xian.tr2",
"music_track": 59,
"sequence": [
{"type": "set_secret_count", "count": 0},
{"type": "loop_game"},
{"type": "play_music", "music_track": 41},
{"type": "level_stats"},
@ -375,7 +378,6 @@
"path": "data/house.tr2",
"music_track": -1,
"sequence": [
{"type": "set_secret_count", "count": 0},
{"type": "give_item", "object_id": "key_1"},
{"type": "set_lara_start_anim", "anim": 9},
{"type": "remove_weapons"},
@ -385,15 +387,15 @@
{"type": "loop_game"},
{"type": "play_music", "music_track": 52},
{"type": "level_complete"},
{"type": "display_picture", "path": "data/credit01.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/credit02.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/credit03.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/credit04.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/credit05.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/credit06.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/credit07.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/credit08.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "total_stats", "background_path": "data/end.pcx"},
{"type": "display_picture", "path": "data/images/credit01.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit02.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit03.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit04.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit05.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit06.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit07.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit08.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "total_stats", "background_path": "data/images/end.webp"},
],
"injections": [
"data/injections/house_itemrots.bin",
@ -488,13 +490,14 @@
{"type": "loop_game"},
],
"injections": [
"data/injections/cut4_textures.bin",
"data/injections/photo.bin",
],
},
],
"fmvs": [
{"path": "fmv/LOGO.RPL"},
{"path": "fmv/LOGO.RPL", "legal": true},
{"path": "fmv/ANCIENT.RPL"},
{"path": "fmv/MODERN.RPL"},
{"path": "fmv/LANDING.RPL"},

View file

@ -0,0 +1,157 @@
{
// NOTE: bad changes to this file may result in crashes.
// Lines starting with double slashes are comments and are ignored.
"main_menu_picture": "data/images/title_eu_gm.webp",
"savegame_fmt_legacy": "savegame_gm.%d",
"savegame_fmt_bson": "save_trgm_%02d.dat",
"cmd_init": {"action": "exit_to_title"},
"cmd_title": {"action": "noop"},
"cmd_death_in_demo": {"action": "exit_to_title"},
"cmd_death_in_game": {"action": "noop"},
"cmd_demo_interrupt": {"action": "exit_to_title"},
"cmd_demo_end": {"action": "exit_to_title"},
"cheat_keys": true,
"load_save_disabled": false,
"play_any_level": false,
"lockout_option_ring": false,
"gym_enabled": false,
"demo_version": false,
"single_level": -1,
"demo_delay": 30,
"secret_track": 47,
"title": {
"path": "data/title_gm.tr2",
"music_track": 64,
"sequence": [
{"type": "display_picture", "path": "data/images/legal_eu_gm.webp", "legal": true},
{"type": "exit_to_title"},
],
},
"sfx_path": "data/main_gm.sfx",
"injections": [
"data/injections/font.bin",
],
"levels": [
// 0. Lara's Home
{
"type": "gym",
"path": "data/assault.tr2",
"music_track": -1,
"sequence": [
{"type": "loop_game"},
{"type": "level_stats"},
],
},
// 1. The Cold War
{
"path": "data/level1.tr2",
"music_track": 33,
"sequence": [
{"type": "loop_game"},
{"type": "play_music", "music_track": 41},
{"type": "level_stats"},
{"type": "level_complete"},
],
"injections": [
"data/injections/common_pickup_meshes.bin",
"data/injections/shark_sfx.bin",
],
},
// 2. Fool's Gold
{
"path": "data/level2.tr2",
"music_track": 58,
"sequence": [
{"type": "loop_game"},
{"type": "play_music", "music_track": 41},
{"type": "level_stats"},
{"type": "level_complete"},
],
"injections": [
"data/injections/fools_pickup_meshes.bin",
],
},
// 3. Furnace of the Gods
{
"path": "data/level3.tr2",
"music_track": 59,
"sequence": [
{"type": "loop_game"},
{"type": "play_music", "music_track": 41},
{"type": "level_stats"},
{"type": "level_complete"},
],
"injections": [
"data/injections/furnace_pickup_meshes.bin",
],
},
// 4. Kingdom
{
"path": "data/level4.tr2",
"music_track": 31,
"sequence": [
{"type": "give_item", "object_id": "puzzle_1"},
{"type": "loop_game"},
{"type": "play_music", "music_track": 52},
{"type": "display_picture", "path": "data/images/credit00_gm.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit01.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit02.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit03.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit04.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit05.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit06.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit07_gm.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "display_picture", "path": "data/images/credit08.webp", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
{"type": "total_stats", "background_path": "data/images/end.webp"},
{"type": "level_complete"},
],
"injections": [
"data/injections/common_pickup_meshes.bin",
"data/injections/guardian_death_commands.bin",
],
},
// 5. Nightmare in Vegas
{
"path": "data/level5.tr2",
"type": "bonus",
"music_track": 34,
"sequence": [
{"type": "remove_weapons"},
{"type": "remove_ammo"},
{"type": "remove_flares"},
{"type": "remove_medipacks"},
{"type": "give_item", "object_id": "pistols"},
{"type": "loop_game"},
{"type": "play_music", "music_track": 41},
{"type": "level_stats"},
{"type": "level_complete"},
],
"injections": [
"data/injections/common_pickup_meshes.bin",
"data/injections/guardian_death_commands.bin",
"data/injections/vegas_fd.bin",
],
},
],
"demos": [
],
"cutscenes": [
],
"fmvs": [
],
}

View file

@ -1,8 +1,9 @@
{
// This file is used to enable the -l argument support.
"main_menu_picture": "data/title.pcx",
"savegame_fmt_legacy": "savegame.%d",
"main_menu_picture": "data/images/title_eu.webp",
"savegame_fmt_legacy": "savegame_custom.%d",
"savegame_fmt_bson": "save_tr2_custom_%02d.dat",
"cmd_init": {"action": "exit_to_title"},
"cmd_title": {"action": "noop"},
@ -32,7 +33,6 @@
"path": "PLACEHOLDER",
"music_track": -1,
"sequence": [
{"type": "set_secret_count", "count": 0},
{"type": "loop_game"},
{"type": "level_stats"},
],

View file

@ -141,7 +141,7 @@
{
"title": "Ice Palace",
"objects": {
"tiger": {"name": "Snow Leopard"},
"tiger": {"name": "White Tiger"},
"key_2": {"name": "Gong Hammer"},
"pickup_2": {"name": "Talion"},
"puzzle_1": {"name": "Tibetan Mask"},
@ -464,13 +464,44 @@
},
"game_strings": {
"CONTROL_BACKEND_CONTROLLER": "Controller",
"CONTROL_BACKEND_KEYBOARD": "Keyboard",
"CONTROL_CUSTOMIZE": "Customize Controls",
"CONTROL_CUSTOM_1": "User Keys 1",
"CONTROL_CUSTOM_2": "User Keys 2",
"CONTROL_CUSTOM_3": "User Keys 3",
"CONTROL_DEFAULT_KEYS": "Default Keys",
"CONTROLS_BACKEND_CONTROLLER": "Controller",
"CONTROLS_BACKEND_KEYBOARD": "Keyboard",
"CONTROLS_CUSTOMIZE": "Customize Controls",
"CONTROLS_CUSTOM_1": "User Keys 1",
"CONTROLS_CUSTOM_2": "User Keys 2",
"CONTROLS_CUSTOM_3": "User Keys 3",
"CONTROLS_DEFAULT_KEYS": "Default Keys",
"DETAIL_ASPECT_MODE": "Aspect mode",
"DETAIL_ASPECT_MODE_16_9": "16:9",
"DETAIL_ASPECT_MODE_4_3": "4:3",
"DETAIL_ASPECT_MODE_ANY": "Any",
"DETAIL_BILINEAR": "Bilinear",
"DETAIL_DEPTH_BUFFER": "Z-Buffer",
"DETAIL_FLOAT_FMT": "%.1f",
"DETAIL_FOG_END": "Fog end",
"DETAIL_FOG_START": "Fog start",
"DETAIL_FOV": "Field of view",
"DETAIL_FPS": "FPS",
"DETAIL_INTEGER_FMT": "%d",
"DETAIL_LIGHTING_CONTRAST": "Lighting contrast",
"DETAIL_LIGHTING_CONTRAST_HIGH": "High",
"DETAIL_LIGHTING_CONTRAST_LOW": "Low",
"DETAIL_LIGHTING_CONTRAST_MEDIUM": "Medium",
"DETAIL_RENDER_MODE": "Render mode",
"DETAIL_RENDER_MODE_HARDWARE": "Hardware",
"DETAIL_RENDER_MODE_SOFTWARE": "Software",
"DETAIL_SCALER": "Scaler",
"DETAIL_SIZER": "Sizer",
"DETAIL_TEXTURE_FILTER": "Texture filter",
"DETAIL_TITLE": "Graphic Options",
"DETAIL_TRAPEZOID_FILTER": "Trapezoid filter",
"DETAIL_UI_BAR_SCALE": "UI bar scale",
"DETAIL_UI_SCROLL_WRAPAROUND": "UI scroll wrap",
"DETAIL_UI_TEXT_SCALE": "UI text scale",
"DETAIL_USE_PSX_FOV": "Use PSX FOV",
"DETAIL_WATER_COLOR_B": "Water color (B)",
"DETAIL_WATER_COLOR_G": "Water color (G)",
"DETAIL_WATER_COLOR_R": "Water color (R)",
"HEADING_GAME_OVER": "GAME OVER",
"HEADING_INVENTORY": "INVENTORY",
"HEADING_ITEMS": "ITEMS",
@ -505,7 +536,7 @@
"KEYMAP_USE_FLARE": "Flare",
"KEYMAP_WALK": "Walk",
"MISC_DEMO_MODE": "Demo Mode",
"MISC_EMPTY_SLOT": "- EMPTY SLOT -",
"MISC_EMPTY_SLOT_FMT": "- EMPTY SLOT -",
"MISC_EXIT": "Exit",
"MISC_NONE": "None",
"MISC_OFF": "Off",
@ -591,13 +622,22 @@
"OSD_UNKNOWN_COMMAND": "Unknown command: %s",
"OSD_WIREFRAME_MODE_OFF": "Wireframe mode: off",
"OSD_WIREFRAME_MODE_ON": "Wireframe mode: on",
"PAGINATION_NAV": "%d / %d",
"PASSPORT_EXIT_DEMO": "Exit Demo",
"PASSPORT_EXIT_GAME": "Exit Game",
"PASSPORT_EXIT_TO_TITLE": "Exit to Title",
"PASSPORT_LEGACY_SELECT_LEVEL_1": "Legacy saves do not",
"PASSPORT_LEGACY_SELECT_LEVEL_2": "support this feature.",
"PASSPORT_LOAD_GAME": "Load Game",
"PASSPORT_MODE_NEW_GAME": "New Game",
"PASSPORT_MODE_NEW_GAME_JP": "Japanese NG",
"PASSPORT_MODE_NEW_GAME_JP_PLUS": "Japanese NG+",
"PASSPORT_MODE_NEW_GAME_PLUS": "New Game+",
"PASSPORT_NEW_GAME": "New Game",
"PASSPORT_SAVE_GAME": "Save Game",
"PASSPORT_SELECT_LEVEL": "Select Level",
"PASSPORT_SELECT_MODE": "Select Mode",
"PASSPORT_STORY_SO_FAR": "Story so far...",
"PAUSE_ARE_YOU_SURE": "Are you sure?",
"PAUSE_CONTINUE": "Continue",
"PAUSE_EXIT_TO_TITLE": "Exit to title?",
@ -615,13 +655,16 @@
"PHOTO_MODE_ROTATE_PROMPT": "Rotate camera",
"PHOTO_MODE_SNAP_PROMPT": "Take picture",
"PHOTO_MODE_TITLE": "Photo Mode",
"SOUND_SET_VOLUMES": "Set Volumes",
"SOUND_DIALOG_MUSIC": "\\{icon sound} Sound",
"SOUND_DIALOG_SOUND": "\\{icon music} Music",
"SOUND_DIALOG_TITLE": "Set Volumes",
"STATS_AMMO_HITS": "Hits",
"STATS_AMMO_USED": "Ammo Used",
"STATS_ASSAULT_FINISH": "Finish",
"STATS_ASSAULT_NO_TIMES_SET": "No Times Set",
"STATS_ASSAULT_TITLE": "BEST TIMES",
"STATS_BASIC_FMT": "%d",
"STATS_BONUS_STATISTICS": "Bonus Statistics",
"STATS_DETAIL_FMT": "%d of %d",
"STATS_DISTANCE_TRAVELLED": "Distance Travelled",
"STATS_FINAL_STATISTICS": "Final Statistics",

View file

@ -0,0 +1,61 @@
{
// For usage, refer to the documentation here:
// https://github.com/LostArtefacts/TRX/blob/stable/docs/GAME_STRINGS.md
"levels": [
// 0. Lara's Home
{
"title": "Lara's Home",
},
// 1. The Cold War
{
"title": "The Cold War",
"objects": {
"tiger": {"name": "Snow Leopard"},
"key_1": {"name": "Guardroom Key"},
"key_2": {"name": "Shaft 'B' Key"},
},
},
// 2. Fool's Gold
{
"title": "Fool's Gold",
"objects": {
"key_1": {"name": "CardKey 1"},
"key_4": {"name": "CardKey 2"},
"puzzle_1": {"name": "Circuit Board"},
},
},
// 3. Furnace of the Gods
{
"title": "Furnace of the Gods",
"objects": {
"big_spider": {"name": "Polar Bear"},
"spider": {"name": "Wolf"},
"puzzle_1": {"name": "Mask of Tornarsuk"},
"puzzle_2": {"name": "Gold Nugget"},
},
},
// 4. Kingdom
{
"title": "Kingdom",
"objects": {
"tiger": {"name": "Snow Leopard"},
"puzzle_1": {"name": "Mask of Tornarsuk"},
},
},
// 5. Nightmare in Vegas
{
"title": "Nightmare in Vegas",
"objects": {
"key_1": {"name": "Hotel Key"},
"puzzle_1": {"name": "Elevator Junction"},
"puzzle_2": {"name": "Door Circuit"},
},
},
],
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,25 +1,18 @@
#ifdef VERTEX
// Vertex shader
#ifdef OGL33C
out vec2 vertTexCoords;
out vec2 vertCoords;
#else
varying vec2 vertTexCoords;
varying vec2 vertCoords;
#endif
layout(location = 0) in vec2 inPosition;
layout(location = 1) in vec2 inTexCoords;
out vec2 vertTexCoords;
out vec2 vertCoords;
void main(void) {
gl_Position = vec4(inPosition * vec2(2.0, -2.0) + vec2(-1.0, 1.0), 0.0, 1.0);
vertCoords = inPosition;
vertTexCoords = inTexCoords;
}
#else
// Fragment shader
#elif defined(FRAGMENT)
#define EFFECT_NONE 0
#define EFFECT_VIGNETTE 1
@ -33,42 +26,29 @@ uniform bool tintEnabled;
uniform vec3 tintColor;
uniform int effect;
#ifdef OGL33C
#define OUTCOLOR outColor
#define TEXTURE2D texture
#define TEXTURE1D texture
in vec2 vertTexCoords;
in vec2 vertCoords;
out vec4 outColor;
#else
#define OUTCOLOR gl_FragColor
#define TEXTURE2D texture2D
#define TEXTURE1D texture1D
varying vec2 vertTexCoords;
varying vec2 vertCoords;
#endif
in vec2 vertTexCoords;
in vec2 vertCoords;
out vec4 outColor;
void main(void) {
vec2 uv = vertTexCoords;
if (alphaEnabled) {
float alpha = TEXTURE2D(texAlpha, uv).r;
float alpha = texture(texAlpha, uv).r;
if (alpha < 0.5) {
discard;
}
}
if (paletteEnabled) {
float paletteIndex = TEXTURE2D(texMain, uv).r;
OUTCOLOR = TEXTURE1D(texPalette, paletteIndex);
float paletteIndex = texture(texMain, uv).r;
outColor = texture(texPalette, paletteIndex);
} else {
OUTCOLOR = TEXTURE2D(texMain, uv);
outColor = texture(texMain, uv);
}
if (tintEnabled) {
OUTCOLOR.rgb *= tintColor.rgb;
outColor.rgb *= tintColor.rgb;
}
if (effect == EFFECT_VIGNETTE) {
@ -76,7 +56,7 @@ void main(void) {
float y_dist = vertCoords.y - 0.5;
float light = 256 - sqrt(x_dist * x_dist + y_dist * y_dist ) * 300.0;
light = clamp(light, 0, 255) / 255;
OUTCOLOR *= vec4(light, light, light, 1);
outColor *= vec4(light, light, light, 1);
}
}
#endif // VERTEX
#endif

View file

@ -1,5 +1,4 @@
#ifdef VERTEX
// Vertex shader
layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec4 inTexCoords;
@ -7,20 +6,13 @@ layout(location = 2) in float inTexZ;
layout(location = 3) in vec4 inColor;
uniform mat4 matProjection;
uniform mat4 matModelView;
#ifdef OGL33C
out vec4 vertColor;
out vec4 vertTexCoords;
out float vertTexZ;
#else
varying vec4 vertColor;
varying vec4 vertTexCoords;
varying float vertTexZ;
#endif
out vec4 vertColor;
out vec4 vertTexCoords;
out float vertTexZ;
void main(void) {
gl_Position = matProjection * matModelView * vec4(inPosition, 1);
gl_Position = matProjection * vec4(inPosition, 1);
vertColor = inColor / 255.0;
vertTexCoords = inTexCoords;
vertTexCoords.xy *= vertTexCoords.zw;
@ -28,8 +20,7 @@ void main(void) {
vertTexZ = inTexZ;
}
#else
// Fragment shader
#elif defined(FRAGMENT)
uniform sampler2D tex0;
uniform bool texturingEnabled;
@ -38,52 +29,28 @@ uniform bool alphaPointDiscard;
uniform float alphaThreshold;
uniform float brightnessMultiplier;
#ifdef OGL33C
#define OUTCOLOR outColor
#define TEXTURESIZE textureSize
#define TEXTURE texture
#define TEXELFETCH texelFetch
in vec4 vertColor;
in vec4 vertTexCoords;
in float vertTexZ;
out vec4 OUTCOLOR;
#else
#define OUTCOLOR gl_FragColor
#define TEXTURESIZE textureSize2D
#define TEXELFETCH texelFetch2D
#define TEXTURE texture2D
varying vec4 vertColor;
varying vec4 vertTexCoords;
varying float vertTexZ;
#endif
in vec4 vertColor;
in vec4 vertTexCoords;
in float vertTexZ;
out vec4 outColor;
void main(void) {
OUTCOLOR = vertColor;
outColor = vertColor;
vec2 texCoords = vertTexCoords.xy;
texCoords.xy /= vertTexCoords.zw;
if (texturingEnabled) {
#if defined(GL_EXT_gpu_shader4) || defined(OGL33C)
if (alphaPointDiscard && smoothingEnabled) {
// do not use smoothing for chroma key
ivec2 size = TEXTURESIZE(tex0, 0);
ivec2 texCoordsNN = ivec2(texCoords.xy * size.xy) % size.xy;
vec4 texel = TEXELFETCH(tex0, texCoordsNN, 0);
if (texel.a == 0.0) {
discard;
}
if (alphaPointDiscard && smoothingEnabled && discardTranslucent(tex0, texCoords)) {
discard;
}
#endif
vec4 texColor = TEXTURE(tex0, texCoords.xy);
vec4 texColor = texture(tex0, texCoords.xy);
if (alphaThreshold >= 0.0 && texColor.a <= alphaThreshold) {
discard;
}
OUTCOLOR = vec4(OUTCOLOR.rgb * texColor.rgb * brightnessMultiplier, texColor.a);
outColor = vec4(outColor.rgb * texColor.rgb * brightnessMultiplier, texColor.a);
}
}
#endif // VERTEX
#endif

View file

@ -0,0 +1,27 @@
#define PI 3.1415926538
vec3 waterWibble(vec4 position, vec2 viewportSize, float wibbleOffset)
{
// get screen coordinates
vec3 ndc = position.xyz / position.w; //perspective divide/normalize
vec2 viewportCoord = ndc.xy * 0.5 + 0.5; //ndc is -1 to 1 in GL. scale for 0 to 1
vec2 viewportPixelCoord = viewportCoord * viewportSize;
float amplitude = 2.0;
viewportPixelCoord.x += sin((wibbleOffset + viewportPixelCoord.y) * 2.0 * PI / 32) * amplitude;
viewportPixelCoord.y += sin((wibbleOffset + viewportPixelCoord.x) * 2.0 * PI / 32) * amplitude;
// reverse transform
viewportCoord = viewportPixelCoord / viewportSize;
ndc.xy = (viewportCoord - 0.5) * 2.0;
return ndc * position.w;
}
bool discardTranslucent(sampler2D tex, vec2 uv)
{
// do not use smoothing for chroma key
ivec2 size = textureSize(tex, 0);
ivec2 texCoordsNN = ivec2(uv.xy * size.xy) % size.xy;
vec4 texel = texelFetch(tex, texCoordsNN, 0);
return texel.a == 0.0;
}

Some files were not shown because too many files have changed in this diff Show more