Compare commits

..

No commits in common. "develop" and "tr2-0.10" have entirely different histories.

883 changed files with 22258 additions and 22550 deletions

View file

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

View file

@ -3,10 +3,6 @@ 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"
@ -16,6 +12,15 @@ 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
@ -32,17 +37,13 @@ jobs:
name: Prepare variables
run: echo "version=$(just output-current-version 1)" >> $GITHUB_OUTPUT
- 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: Package asset (${{ matrix.platform }})
run: just ${{ matrix.just_target }}
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
name: TR1X-${{ steps.vars.outputs.version }}-${{ inputs.platform }}
name: TR1X-${{ steps.vars.outputs.version }}-${{ matrix.platform }}
path: |
*.zip
*.exe

View file

@ -1,12 +1,8 @@
name: Build TR2X and the installer
name: Build TR2X
on:
workflow_call:
inputs:
platform:
type: string
description: "Platform to build for"
required: true
target:
type: string
description: "Target to build for"
@ -16,6 +12,13 @@ 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
@ -32,17 +35,13 @@ jobs:
name: Prepare variables
run: echo "version=$(just output-current-version 2)" >> $GITHUB_OUTPUT
- 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: Package asset (${{ matrix.platform }})
run: just ${{ matrix.just_target }}
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
name: TR2X-${{ steps.vars.outputs.version }}-${{ inputs.platform }}
name: TR2X-${{ steps.vars.outputs.version }}-${{ matrix.platform }}
path: |
*.zip
*.exe

View file

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

View file

@ -28,51 +28,30 @@ on:
default: github.ref_name
jobs:
package_tr1_linux:
name: Build TR1 (Linux)
package_multiplatform:
name: Build release assets
if: vars.RELEASE_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr1.yml
with:
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
target: "release"
secrets: inherit
package_mac:
name: Build TR1 (Mac)
name: "Build release assets (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: always() && (vars.RELEASE_ENABLE == 'true')
if: vars.RELEASE_ENABLE == 'true'
name: Create a GitHub release
needs:
- package_tr1_linux
- package_tr1_win
- package_tr1_win_installer
- package_multiplatform
- package_mac
with:
draft: ${{ inputs.draft || false }}

View file

@ -28,52 +28,30 @@ on:
default: github.ref_name
jobs:
package_tr2_linux:
name: Build TR2 (Linux)
package_multiplatform:
name: Build release assets
if: vars.RELEASE_ENABLE == 'true'
uses: ./.github/workflows/job_build_tr2.yml
with:
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
target: "release"
secrets: inherit
package_mac:
name: Build TR2 (Mac)
name: "Build release assets (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: always() && (vars.RELEASE_ENABLE == 'true')
if: vars.RELEASE_ENABLE == 'true'
name: Create a GitHub release
needs:
- package_tr2_linux
- package_tr2_win
- package_tr2_win_installer
- package_mac
- package_multiplatform
with:
draft: ${{ inputs.draft || false }}
prerelease: ${{ inputs.draft || false }}

11
.gitignore vendored
View file

@ -35,14 +35,3 @@ 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,9 +123,3 @@ 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.

BIN
data/tr1/icon.psd Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
data/tr1/images/egypt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

BIN
data/tr1/images/eidos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
data/tr1/images/end.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 KiB

BIN
data/tr1/images/greece.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
data/tr1/images/gym.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

BIN
data/tr1/images/install.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
data/tr1/images/peru.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

BIN
data/tr1/images/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

727
data/tr1/installer icon.ai Executable file

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
data/tr1/logo-light-theme.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

1929
data/tr1/logo.ai Executable file

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 KiB

View file

@ -8,10 +8,12 @@
"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",
@ -28,7 +30,7 @@
"music_track": 2,
"inherit_injections": false,
"sequence": [
{"type": "display_picture", "path": "data/images/eidos.webp", "legal": true, "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/eidos.webp", "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},
@ -57,7 +59,6 @@
"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",
@ -150,7 +151,6 @@
"injections": [
"data/injections/folly_fd.bin",
"data/injections/folly_itemrots.bin",
"data/injections/folly_pickup_meshes.bin",
"data/injections/folly_textures.bin",
],
},
@ -246,7 +246,6 @@
"data/injections/khamoon_fd.bin",
"data/injections/khamoon_mummy.bin",
"data/injections/khamoon_textures.bin",
"data/injections/panther_sfx.bin",
],
},
@ -266,7 +265,6 @@
"data/injections/obelisk_meshfixes.bin",
"data/injections/obelisk_skybox.bin",
"data/injections/obelisk_textures.bin",
"data/injections/panther_sfx.bin",
],
},
@ -308,7 +306,6 @@
"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]},
@ -484,8 +481,8 @@
{
"path": "data/cut4.phd",
"music_track": 22,
"fog_start": 12.0,
"fog_end": 18.0,
"draw_distance_fade": 12.0,
"draw_distance_max": 18.0,
"lara_type": "player_1",
"inherit_injections": false,
"injections": [
@ -506,8 +503,8 @@
// FMVs
"fmvs": [
{"path": "fmv/core.avi", "legal": true},
{"path": "fmv/escape.avi", "legal": true},
{"path": "fmv/core.avi"},
{"path": "fmv/escape.avi"},
{"path": "fmv/cafe.avi"},
{"path": "fmv/mansion.avi"},
{"path": "fmv/snow.avi"},

View file

@ -9,10 +9,12 @@
"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,10 +5,12 @@
"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,10 +8,12 @@
"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",
@ -34,7 +36,7 @@
"data/injections/pda_model.bin",
],
"sequence": [
{"type": "display_picture", "path": "data/images/eidos.webp", "legal": true, "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/eidos.webp", "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"},
@ -42,7 +44,7 @@
},
"levels": [
// Level 1: Return to Egypt
// Level 0: Return to Egypt
{
"path": "data/egypt.phd",
"music_track": 59,
@ -56,12 +58,11 @@
"data/injections/egypt_fd.bin",
"data/injections/egypt_meshfixes.bin",
"data/injections/egypt_textures.bin",
"data/injections/panther_sfx.bin",
],
"unobtainable_kills": 1,
},
// Level 2: Temple of the Cat
// Level 1: Temple of the Cat
{
"path": "data/cat.phd",
"music_track": 59,
@ -76,12 +77,11 @@
"data/injections/cat_itemrots.bin",
"data/injections/cat_meshfixes.bin",
"data/injections/cat_textures.bin",
"data/injections/panther_sfx.bin",
],
"unobtainable_pickups": 1,
},
// Level 3: Atlantean Stronghold
// Level 2: Atlantean Stronghold
{
"path": "data/end.phd",
"music_track": 60,
@ -98,7 +98,7 @@
"unobtainable_kills": 1,
},
// Level 4: The Hive
// Level 3: The Hive
{
"path": "data/end2.phd",
"music_track": 60,
@ -123,8 +123,7 @@
{"type": "dummy"},
// Level 6: Current Position
// This level is necessary to read TombATI's save files.
// Level 5: Current Position
{
"path": "data/current.phd",
"type": "current",
@ -135,7 +134,7 @@
],
"fmvs": [
{"path": "fmv/core.avi", "legal": true},
{"path": "fmv/escape.avi", "legal": true},
{"path": "fmv/core.avi"},
{"path": "fmv/escape.avi"},
],
}

View file

@ -271,7 +271,7 @@
"door_8": {"name": "Door 8"},
"trapdoor_1": {"name": "Trapdoor 1"},
"trapdoor_2": {"name": "Trapdoor 2"},
"trapdoor_3": {"name": "Trapdoor 3"},
"big_trapdoor": {"name": "Big Trapdoor"},
"bridge_flat": {"name": "Bridge Flat"},
"bridge_tilt_1": {"name": "Bridge Tilt 1"},
"bridge_tilt_2": {"name": "Bridge Tilt 2"},
@ -341,40 +341,35 @@
},
"game_strings": {
"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",
"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",
"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_INTEGER_FMT": "%d",
"DETAIL_PRETTY_PIXELS": "Pretty pixels",
"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",
@ -531,18 +526,13 @@
"PHOTO_MODE_ROTATE_PROMPT": "Rotate camera",
"PHOTO_MODE_SNAP_PROMPT": "Take picture",
"PHOTO_MODE_TITLE": "Photo Mode",
"SOUND_DIALOG_MUSIC": "\\{icon sound} Sound",
"SOUND_DIALOG_SOUND": "\\{icon music} Music",
"SOUND_DIALOG_TITLE": "Set Volumes",
"STATS_AMMO": "AMMO HITS/USED",
"SOUND_SET_VOLUMES": "Set Volumes",
"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 1: Return to Egypt
// Level 0: Return to Egypt
{
"title": "Return to Egypt",
"objects": {
@ -8,7 +8,7 @@
},
},
// Level 2: Temple of the Cat
// Level 1: Temple of the Cat
{
"title": "Temple of the Cat",
"objects": {
@ -16,22 +16,22 @@
},
},
// Level 3: Atlantean Stronghold
// Level 2: Atlantean Stronghold
{
"title": "Atlantean Stronghold",
},
// Level 4: The Hive
// Level 3: The Hive
{
"title": "The Hive",
},
// Level 5: Title
// Level 4: Title
{
"title": "Title",
},
// Level 6: Current Position
// Level 5: Current Position
{
"title": "Current Position",
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

View file

@ -1,18 +1,25 @@
#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;
}
#elif defined(FRAGMENT)
#else
// Fragment shader
#define EFFECT_NONE 0
#define EFFECT_VIGNETTE 1
@ -26,29 +33,42 @@ uniform bool tintEnabled;
uniform vec3 tintColor;
uniform int effect;
in vec2 vertTexCoords;
in vec2 vertCoords;
out vec4 outColor;
#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
void main(void) {
vec2 uv = vertTexCoords;
if (alphaEnabled) {
float alpha = texture(texAlpha, uv).r;
float alpha = TEXTURE2D(texAlpha, uv).r;
if (alpha < 0.5) {
discard;
}
}
if (paletteEnabled) {
float paletteIndex = texture(texMain, uv).r;
outColor = texture(texPalette, paletteIndex);
float paletteIndex = TEXTURE2D(texMain, uv).r;
OUTCOLOR = TEXTURE1D(texPalette, paletteIndex);
} else {
outColor = texture(texMain, uv);
OUTCOLOR = TEXTURE2D(texMain, uv);
}
if (tintEnabled) {
outColor.rgb *= tintColor.rgb;
OUTCOLOR.rgb *= tintColor.rgb;
}
if (effect == EFFECT_VIGNETTE) {
@ -56,7 +76,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
#endif // VERTEX

View file

@ -1,4 +1,5 @@
#ifdef VERTEX
// Vertex shader
layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec4 inTexCoords;
@ -6,13 +7,20 @@ layout(location = 2) in float inTexZ;
layout(location = 3) in vec4 inColor;
uniform mat4 matProjection;
uniform mat4 matModelView;
out vec4 vertColor;
out vec4 vertTexCoords;
out float vertTexZ;
#ifdef OGL33C
out vec4 vertColor;
out vec4 vertTexCoords;
out float vertTexZ;
#else
varying vec4 vertColor;
varying vec4 vertTexCoords;
varying float vertTexZ;
#endif
void main(void) {
gl_Position = matProjection * vec4(inPosition, 1);
gl_Position = matProjection * matModelView * vec4(inPosition, 1);
vertColor = inColor / 255.0;
vertTexCoords = inTexCoords;
vertTexCoords.xy *= vertTexCoords.zw;
@ -20,7 +28,8 @@ void main(void) {
vertTexZ = inTexZ;
}
#elif defined(FRAGMENT)
#else
// Fragment shader
uniform sampler2D tex0;
uniform bool texturingEnabled;
@ -29,28 +38,52 @@ uniform bool alphaPointDiscard;
uniform float alphaThreshold;
uniform float brightnessMultiplier;
in vec4 vertColor;
in vec4 vertTexCoords;
in float vertTexZ;
out vec4 outColor;
#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
void main(void) {
outColor = vertColor;
OUTCOLOR = vertColor;
vec2 texCoords = vertTexCoords.xy;
texCoords.xy /= vertTexCoords.zw;
if (texturingEnabled) {
if (alphaPointDiscard && smoothingEnabled && discardTranslucent(tex0, texCoords)) {
discard;
#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;
}
}
#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
#endif // VERTEX

View file

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

View file

@ -1,122 +0,0 @@
#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.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

1489
data/tr2/logo.ai Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 KiB

View file

@ -2,9 +2,8 @@
// 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.webp",
"main_menu_picture": "data/title.pcx",
"savegame_fmt_legacy": "savegame.%d",
"savegame_fmt_bson": "save_tr2_%02d.dat",
"cmd_init": {"action": "exit_to_title"},
"cmd_title": {"action": "noop"},
@ -28,7 +27,7 @@
"path": "data/title.tr2",
"music_track": 64,
"sequence": [
{"type": "display_picture", "path": "data/images/legal_eu.webp", "legal": true},
{"type": "display_picture", "path": "data/legal.pcx"},
{"type": "play_fmv", "fmv_id": 0},
{"type": "play_fmv", "fmv_id": 1},
{"type": "exit_to_title"},
@ -47,6 +46,7 @@
"path": "data/assault.tr2",
"music_track": -1,
"sequence": [
{"type": "set_secret_count", "count": 0},
{"type": "loop_game"},
{"type": "level_stats"},
],
@ -85,7 +85,6 @@
{"type": "level_complete"},
],
"injections": [
"data/injections/boat_bits.bin",
"data/injections/common_pickup_meshes.bin",
],
},
@ -217,7 +216,6 @@
],
"injections": [
"data/injections/living_deck_goon_sfx.bin",
"data/injections/living_fd.bin",
"data/injections/living_pickup_meshes.bin",
"data/injections/seaweed_collision.bin",
],
@ -235,7 +233,6 @@
{"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",
@ -312,7 +309,6 @@
],
"injections": [
"data/injections/common_pickup_meshes.bin",
"data/injections/guardian_death_commands.bin",
"data/injections/palace_fd.bin",
"data/injections/palace_itemrots.bin",
],
@ -362,6 +358,7 @@
"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"},
@ -378,6 +375,7 @@
"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"},
@ -387,18 +385,17 @@
{"type": "loop_game"},
{"type": "play_music", "music_track": 52},
{"type": "level_complete"},
{"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"},
{"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"},
],
"injections": [
"data/injections/explosion.bin",
"data/injections/house_itemrots.bin",
],
},
@ -491,14 +488,13 @@
{"type": "loop_game"},
],
"injections": [
"data/injections/cut4_textures.bin",
"data/injections/photo.bin",
],
},
],
"fmvs": [
{"path": "fmv/LOGO.RPL", "legal": true},
{"path": "fmv/LOGO.RPL"},
{"path": "fmv/ANCIENT.RPL"},
{"path": "fmv/MODERN.RPL"},
{"path": "fmv/LANDING.RPL"},

View file

@ -1,157 +0,0 @@
{
// 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,9 +1,8 @@
{
// This file is used to enable the -l argument support.
"main_menu_picture": "data/images/title_eu.webp",
"savegame_fmt_legacy": "savegame_custom.%d",
"savegame_fmt_bson": "save_tr2_custom_%02d.dat",
"main_menu_picture": "data/title.pcx",
"savegame_fmt_legacy": "savegame.%d",
"cmd_init": {"action": "exit_to_title"},
"cmd_title": {"action": "noop"},
@ -33,6 +32,7 @@
"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": "White Tiger"},
"tiger": {"name": "Snow Leopard"},
"key_2": {"name": "Gong Hammer"},
"pickup_2": {"name": "Talion"},
"puzzle_1": {"name": "Tibetan Mask"},
@ -464,44 +464,13 @@
},
"game_strings": {
"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)",
"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",
"HEADING_GAME_OVER": "GAME OVER",
"HEADING_INVENTORY": "INVENTORY",
"HEADING_ITEMS": "ITEMS",
@ -536,7 +505,7 @@
"KEYMAP_USE_FLARE": "Flare",
"KEYMAP_WALK": "Walk",
"MISC_DEMO_MODE": "Demo Mode",
"MISC_EMPTY_SLOT_FMT": "- EMPTY SLOT -",
"MISC_EMPTY_SLOT": "- EMPTY SLOT -",
"MISC_EXIT": "Exit",
"MISC_NONE": "None",
"MISC_OFF": "Off",
@ -622,22 +591,13 @@
"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?",
@ -655,16 +615,13 @@
"PHOTO_MODE_ROTATE_PROMPT": "Rotate camera",
"PHOTO_MODE_SNAP_PROMPT": "Take picture",
"PHOTO_MODE_TITLE": "Photo Mode",
"SOUND_DIALOG_MUSIC": "\\{icon sound} Sound",
"SOUND_DIALOG_SOUND": "\\{icon music} Music",
"SOUND_DIALOG_TITLE": "Set Volumes",
"SOUND_SET_VOLUMES": "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

@ -1,61 +0,0 @@
{
// 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"},
},
},
],
}

BIN
data/tr2/ship/music/57.mp3 Normal file

Binary file not shown.

View file

@ -1,18 +1,25 @@
#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;
}
#elif defined(FRAGMENT)
#else
// Fragment shader
#define EFFECT_NONE 0
#define EFFECT_VIGNETTE 1
@ -26,29 +33,42 @@ uniform bool tintEnabled;
uniform vec3 tintColor;
uniform int effect;
in vec2 vertTexCoords;
in vec2 vertCoords;
out vec4 outColor;
#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
void main(void) {
vec2 uv = vertTexCoords;
if (alphaEnabled) {
float alpha = texture(texAlpha, uv).r;
float alpha = TEXTURE2D(texAlpha, uv).r;
if (alpha < 0.5) {
discard;
}
}
if (paletteEnabled) {
float paletteIndex = texture(texMain, uv).r;
outColor = texture(texPalette, paletteIndex);
float paletteIndex = TEXTURE2D(texMain, uv).r;
OUTCOLOR = TEXTURE1D(texPalette, paletteIndex);
} else {
outColor = texture(texMain, uv);
OUTCOLOR = TEXTURE2D(texMain, uv);
}
if (tintEnabled) {
outColor.rgb *= tintColor.rgb;
OUTCOLOR.rgb *= tintColor.rgb;
}
if (effect == EFFECT_VIGNETTE) {
@ -56,7 +76,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
#endif // VERTEX

View file

@ -1,4 +1,5 @@
#ifdef VERTEX
// Vertex shader
layout(location = 0) in vec3 inPosition;
layout(location = 1) in vec4 inTexCoords;
@ -6,13 +7,20 @@ layout(location = 2) in float inTexZ;
layout(location = 3) in vec4 inColor;
uniform mat4 matProjection;
uniform mat4 matModelView;
out vec4 vertColor;
out vec4 vertTexCoords;
out float vertTexZ;
#ifdef OGL33C
out vec4 vertColor;
out vec4 vertTexCoords;
out float vertTexZ;
#else
varying vec4 vertColor;
varying vec4 vertTexCoords;
varying float vertTexZ;
#endif
void main(void) {
gl_Position = matProjection * vec4(inPosition, 1);
gl_Position = matProjection * matModelView * vec4(inPosition, 1);
vertColor = inColor / 255.0;
vertTexCoords = inTexCoords;
vertTexCoords.xy *= vertTexCoords.zw;
@ -20,7 +28,8 @@ void main(void) {
vertTexZ = inTexZ;
}
#elif defined(FRAGMENT)
#else
// Fragment shader
uniform sampler2D tex0;
uniform bool texturingEnabled;
@ -29,28 +38,52 @@ uniform bool alphaPointDiscard;
uniform float alphaThreshold;
uniform float brightnessMultiplier;
in vec4 vertColor;
in vec4 vertTexCoords;
in float vertTexZ;
out vec4 outColor;
#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
void main(void) {
outColor = vertColor;
OUTCOLOR = vertColor;
vec2 texCoords = vertTexCoords.xy;
texCoords.xy /= vertTexCoords.zw;
if (texturingEnabled) {
if (alphaPointDiscard && smoothingEnabled && discardTranslucent(tex0, texCoords)) {
discard;
#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;
}
}
#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
#endif // VERTEX

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