Compare commits
343 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5e3fb42a25 | ||
![]() |
6d5bdd89a3 | ||
![]() |
a859d668f9 | ||
![]() |
e03c65ca0f | ||
![]() |
ff86b5e712 | ||
![]() |
cdfb5942c1 | ||
![]() |
8b78a7f001 | ||
![]() |
2cd998673f | ||
![]() |
1f89b14a46 | ||
![]() |
9c0c0160df | ||
![]() |
3e4017d338 | ||
![]() |
0c5b5dbb7b | ||
![]() |
a7269bbe8a | ||
![]() |
f27d0435a9 | ||
![]() |
88f41c5a75 | ||
![]() |
d97edaf1eb | ||
![]() |
820fc307d2 | ||
![]() |
24b81007ba | ||
![]() |
0ba717edd5 | ||
![]() |
3696e84925 | ||
![]() |
e439371c66 | ||
![]() |
864589bf0a | ||
![]() |
5a50de02ed | ||
![]() |
d6fc167749 | ||
![]() |
2f2f0c6842 | ||
![]() |
4035fe6411 | ||
![]() |
e32a4c270f | ||
![]() |
92ff6e12c7 | ||
![]() |
73da4c2945 | ||
![]() |
dc41197cd6 | ||
![]() |
890c7f76bb | ||
![]() |
83ac9514cb | ||
![]() |
96b86b1605 | ||
![]() |
607ac811f0 | ||
![]() |
15b758c57d | ||
![]() |
eec8f16d5f | ||
![]() |
2536ff55c1 | ||
![]() |
10b9bcc780 | ||
![]() |
c00d0627cf | ||
![]() |
a6ebaf5c38 | ||
![]() |
3acab0dc34 | ||
![]() |
c590824944 | ||
![]() |
f590c9243c | ||
![]() |
3030d694a5 | ||
![]() |
4d36177247 | ||
![]() |
b935707b5b | ||
![]() |
4d5040d15c | ||
![]() |
e22bf087f6 | ||
![]() |
c7b5932b94 | ||
![]() |
69b08d55ca | ||
![]() |
169ee7603f | ||
![]() |
4fa521d956 | ||
![]() |
8133f72e20 | ||
![]() |
05876ba9c4 | ||
![]() |
aaf58ba623 | ||
![]() |
f8560b4fd5 | ||
![]() |
0adefabf41 | ||
![]() |
004e6b4b4a | ||
![]() |
953f30205e | ||
![]() |
b912917d81 | ||
![]() |
e9c4404c5d | ||
![]() |
daf6dc3020 | ||
![]() |
fbc26fcba6 | ||
![]() |
e8ef98d893 | ||
![]() |
938dffddce | ||
![]() |
0654940d6f | ||
![]() |
9667be9f0e | ||
![]() |
962a66a090 | ||
![]() |
cd67279fc7 | ||
![]() |
6e48174a92 | ||
![]() |
c2b005cec5 | ||
![]() |
ae37db2cf8 | ||
![]() |
0c0ce5bcf6 | ||
![]() |
747f0af086 | ||
![]() |
f29e30ffe2 | ||
![]() |
d8b83e4747 | ||
![]() |
7a4e188eaa | ||
![]() |
33617deba7 | ||
![]() |
f23a777f64 | ||
![]() |
7f574c9448 | ||
![]() |
db94669ae4 | ||
![]() |
f04a18f208 | ||
![]() |
ef72c674b3 | ||
![]() |
34a93057c2 | ||
![]() |
e7fb4616e8 | ||
![]() |
a2be75c8e8 | ||
![]() |
5f7bab0dd9 | ||
![]() |
092fe1dc70 | ||
![]() |
51af4233be | ||
![]() |
f688f5c06c | ||
![]() |
9ee04f9c41 | ||
![]() |
411c3443df | ||
![]() |
a8ed69f769 | ||
![]() |
5dae2f9807 | ||
![]() |
b6d79fe2ef | ||
![]() |
b7144b7dbe | ||
![]() |
eb4606cc8d | ||
![]() |
0676fbdd4d | ||
![]() |
83bee31c0c | ||
![]() |
009c0b003c | ||
![]() |
c239b1124d | ||
![]() |
17d15dc0c5 | ||
![]() |
fa5a4f118b | ||
![]() |
80757eb08c | ||
![]() |
2d05a683d6 | ||
![]() |
70fe64c991 | ||
![]() |
dd2af3377a | ||
![]() |
77fdc9f589 | ||
![]() |
0fc11f401b | ||
![]() |
f144f8ccad | ||
![]() |
01b2d37fdc | ||
![]() |
1e53333864 | ||
![]() |
7c1cafd321 | ||
![]() |
1954a96fab | ||
![]() |
e3240b166c | ||
![]() |
dfa3797b87 | ||
![]() |
7bf7c2e6b5 | ||
![]() |
9023dfbbf8 | ||
![]() |
238fd19e4f | ||
![]() |
c4ef88a058 | ||
![]() |
5fb2a8274f | ||
![]() |
3acf3177c9 | ||
![]() |
6d3cde42cd | ||
![]() |
f0f200fd4b | ||
![]() |
af3322aa48 | ||
![]() |
d0d41fb52e | ||
![]() |
ec2a0452ff | ||
![]() |
0e24b65ae6 | ||
![]() |
10f1bc6fbd | ||
![]() |
45b64cbb97 | ||
![]() |
e424ad8a11 | ||
![]() |
48c9980045 | ||
![]() |
1bdcdb5898 | ||
![]() |
6a6fb11780 | ||
![]() |
94b78af2fb | ||
![]() |
772308b359 | ||
![]() |
a277f91654 | ||
![]() |
53c86b315e | ||
![]() |
b49d4341db | ||
![]() |
71b1ce78d2 | ||
![]() |
234c339bd2 | ||
![]() |
7c8fadc0d2 | ||
![]() |
3e39a090f7 | ||
![]() |
bc7be80ab8 | ||
![]() |
b851487296 | ||
![]() |
85a3d6cb98 | ||
![]() |
ecab0d92e6 | ||
![]() |
5d096fe311 | ||
![]() |
81287845ca | ||
![]() |
80219acb08 | ||
![]() |
fe45c6171c | ||
![]() |
454d133db7 | ||
![]() |
c6d1b4b996 | ||
![]() |
bfbc54963d | ||
![]() |
60534c4bef | ||
![]() |
9b073d69f3 | ||
![]() |
7895617006 | ||
![]() |
a12e5f523c | ||
![]() |
f258d6de05 | ||
![]() |
e3d1fdc4da | ||
![]() |
cec3c8d235 | ||
![]() |
72c67d7973 | ||
![]() |
34da7a31ad | ||
![]() |
384000ef7f | ||
![]() |
f980e4f22c | ||
![]() |
1f6f85b0af | ||
![]() |
571ac73cb0 | ||
![]() |
fec09ad56b | ||
![]() |
d57b2b9234 | ||
![]() |
28fc94a89f | ||
![]() |
941d525d37 | ||
![]() |
e93ed2b6ce | ||
![]() |
c69fe9c891 | ||
![]() |
adf2703305 | ||
![]() |
0674d546c4 | ||
![]() |
36ab43f0b3 | ||
![]() |
2aa0f2e161 | ||
![]() |
0df70ce4bf | ||
![]() |
741bdfe135 | ||
![]() |
26f290e2b7 | ||
![]() |
98acd91c5a | ||
![]() |
0f5e54d714 | ||
![]() |
57bc7610b4 | ||
![]() |
af29ece2f7 | ||
![]() |
5631b7be4a | ||
![]() |
626030a4d7 | ||
![]() |
e469d774a9 | ||
![]() |
cc04478e2d | ||
![]() |
99fb8be9bd | ||
![]() |
52ef286ab4 | ||
![]() |
c5977558be | ||
![]() |
2cd7f04a1e | ||
![]() |
c324d486d3 | ||
![]() |
2d37378223 | ||
![]() |
d4da3f874e | ||
![]() |
81c570a61c | ||
![]() |
3959fdb35a | ||
![]() |
664fdaa1c6 | ||
![]() |
b52a61a1b5 | ||
![]() |
16b5b389f5 | ||
![]() |
5afcc59d04 | ||
![]() |
7718406bbe | ||
![]() |
c79f80486f | ||
![]() |
4747121024 | ||
![]() |
b346f537a4 | ||
![]() |
3dfb3085d9 | ||
![]() |
f0104c568f | ||
![]() |
3d898a8844 | ||
![]() |
751e5c4cb5 | ||
![]() |
a878739c40 | ||
![]() |
4e03c39ffd | ||
![]() |
dbfb93cfd7 | ||
![]() |
ec7e8e22bd | ||
![]() |
6b3999ab2c | ||
![]() |
90494c1fc9 | ||
![]() |
74e6205e7e | ||
![]() |
aba72f28a8 | ||
![]() |
7613e0c806 | ||
![]() |
d00c561a41 | ||
![]() |
bc31423029 | ||
![]() |
bf54cf9130 | ||
![]() |
9fab033d89 | ||
![]() |
bd4b56f726 | ||
![]() |
ca56a3c68e | ||
![]() |
e7c193a106 | ||
![]() |
962e87a9e6 | ||
![]() |
be337ffbe7 | ||
![]() |
4350fa2d10 | ||
![]() |
989ba0ac6d | ||
![]() |
2fb3824b3b | ||
![]() |
6820532711 | ||
![]() |
12edeaee37 | ||
![]() |
fc09a0cf90 | ||
![]() |
1127372135 | ||
![]() |
8672505f56 | ||
![]() |
ebd5331b31 | ||
![]() |
9c708933bc | ||
![]() |
67354e9f43 | ||
![]() |
def5d37192 | ||
![]() |
287fddea7e | ||
![]() |
8cde0e45e2 | ||
![]() |
264c18c1c8 | ||
![]() |
04437d02c4 | ||
![]() |
8bec5dc086 | ||
![]() |
039032e69e | ||
![]() |
0d80ca8f8f | ||
![]() |
5b524faec9 | ||
![]() |
699c1d9873 | ||
![]() |
49ad919de3 | ||
![]() |
539763492d | ||
![]() |
2fbe0c582a | ||
![]() |
8de5ab20dd | ||
![]() |
f6d1cfe475 | ||
![]() |
5b932b38bb | ||
![]() |
e4545e0d73 | ||
![]() |
efdd14aa8d | ||
![]() |
fc4a22f79a | ||
![]() |
0c8a9ecb95 | ||
![]() |
a627ff2beb | ||
![]() |
9e0e36c3c7 | ||
![]() |
1717158094 | ||
![]() |
d1986f82d7 | ||
![]() |
d647539581 | ||
![]() |
8a6a852af3 | ||
![]() |
431436eea1 | ||
![]() |
b90707805b | ||
![]() |
02c265683b | ||
![]() |
30c5d02344 | ||
![]() |
c874ec0669 | ||
![]() |
530f7f7931 | ||
![]() |
a02a8e1229 | ||
![]() |
519783fafb | ||
![]() |
effabcfb9c | ||
![]() |
767df0999d | ||
![]() |
b797d9f75f | ||
![]() |
a6c154d89a | ||
![]() |
273a63bafe | ||
![]() |
01e18f2cf0 | ||
![]() |
de1a63fc74 | ||
![]() |
494c2724fc | ||
![]() |
6e27f24264 | ||
![]() |
c0ff49461c | ||
![]() |
88870ef539 | ||
![]() |
e88764f280 | ||
![]() |
a52d1efc81 | ||
![]() |
41155eed25 | ||
![]() |
85235ce6a3 | ||
![]() |
3f76e74ed5 | ||
![]() |
e048bad1b6 | ||
![]() |
12661fe6e6 | ||
![]() |
3e2206906e | ||
![]() |
e2bcd1aeb7 | ||
![]() |
0618baebc9 | ||
![]() |
b670eaa16a | ||
![]() |
5fb3f84fed | ||
![]() |
24fb920cd1 | ||
![]() |
417e7486c8 | ||
![]() |
cf8fc3d6bf | ||
![]() |
6142621274 | ||
![]() |
365cff79c1 | ||
![]() |
e16fcda94b | ||
![]() |
2adaf2ac0f | ||
![]() |
0939b6b384 | ||
![]() |
f396ef4514 | ||
![]() |
ae5a7fe208 | ||
![]() |
5bc307b14f | ||
![]() |
0aaa6a6779 | ||
![]() |
faa6819832 | ||
![]() |
1fafa4483c | ||
![]() |
3562a23716 | ||
![]() |
9e3729702a | ||
![]() |
b6bb8459e8 | ||
![]() |
58e8def9e5 | ||
![]() |
5727910c6e | ||
![]() |
46892814fb | ||
![]() |
5d3d677a00 | ||
![]() |
edf4b2d5a6 | ||
![]() |
0d7fb0ebef | ||
![]() |
3d47493af6 | ||
![]() |
9191c91407 | ||
![]() |
e45f331ec5 | ||
![]() |
fc4064582d | ||
![]() |
e7809774f4 | ||
![]() |
66d1b59330 | ||
![]() |
9424083dd8 | ||
![]() |
e3b4a14ac1 | ||
![]() |
0c6ee1b4c5 | ||
![]() |
2ef5723457 | ||
![]() |
6583b6f111 | ||
![]() |
1fecbf8c2f | ||
![]() |
0c4f92a61f | ||
![]() |
39a4279a2e | ||
![]() |
2f7a1aa46d | ||
![]() |
57c7146f32 | ||
![]() |
1ce8e57dd6 | ||
![]() |
87503ba133 | ||
![]() |
100b49c15f | ||
![]() |
e2bf13807a | ||
![]() |
8e1599a48e | ||
![]() |
a2f02dc57e | ||
![]() |
b33a5649bc | ||
![]() |
77d4df36fc | ||
![]() |
2baeeabd23 |
14
.github/workflows/build_docker.yml
vendored
|
@ -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 }}
|
||||
|
|
23
.github/workflows/job_build_tr1.yml
vendored
|
@ -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
|
||||
|
|
23
.github/workflows/job_build_tr2.yml
vendored
|
@ -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
|
||||
|
|
38
.github/workflows/pr_builds.yml
vendored
|
@ -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
|
||||
|
|
44
.github/workflows/prerelease.yml
vendored
|
@ -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
|
||||
|
|
35
.github/workflows/release_tr1.yml
vendored
|
@ -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 }}
|
||||
|
|
36
.github/workflows/release_tr2.yml
vendored
|
@ -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
|
@ -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/
|
||||
|
|
|
@ -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.
|
||||
|
|
Before Width: | Height: | Size: 2 MiB |
Before Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 305 KiB |
Before Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 2.6 MiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 413 KiB |
Before Width: | Height: | Size: 2.6 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 2.7 MiB |
Before Width: | Height: | Size: 2.1 MiB |
Before Width: | Height: | Size: 2.6 MiB |
Before Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 1.9 MiB |
Before Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 7.9 KiB |
1929
data/tr1/logo.ai
BIN
data/tr1/logo.png
Normal file
After Width: | Height: | Size: 273 KiB |
|
@ -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"},
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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},
|
||||
],
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
|
|
Before Width: | Height: | Size: 410 KiB |
Before Width: | Height: | Size: 346 KiB |
Before Width: | Height: | Size: 444 KiB |
Before Width: | Height: | Size: 322 KiB |
Before Width: | Height: | Size: 268 KiB |
Before Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 689 KiB |
Before Width: | Height: | Size: 592 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 669 KiB |
Before Width: | Height: | Size: 383 KiB |
Before Width: | Height: | Size: 701 KiB |
Before Width: | Height: | Size: 454 KiB |
Before Width: | Height: | Size: 628 KiB |
Before Width: | Height: | Size: 461 KiB |
Before Width: | Height: | Size: 314 KiB |
Before Width: | Height: | Size: 261 KiB |
BIN
data/tr1/ship/data/injections/bubbles.bin
Normal file
BIN
data/tr1/ship/data/injections/folly_pickup_meshes.bin
Normal file
BIN
data/tr1/ship/data/injections/panther_sfx.bin
Normal file
BIN
data/tr1/ship/data/injections/skate_kid_sfx.bin
Normal 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
|
||||
|
|
|
@ -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
|
||||
|
|
65
data/tr1/ship/shaders/common.glsl
Normal 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;
|
||||
}
|
|
@ -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
|
||||
|
|
122
data/tr1/ship/shaders/meshes.glsl
Normal 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
|
Before Width: | Height: | Size: 6 KiB |
Before Width: | Height: | Size: 6 KiB |
1489
data/tr2/logo.ai
BIN
data/tr2/logo.png
Normal file
After Width: | Height: | Size: 376 KiB |
|
@ -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"},
|
||||
|
|
157
data/tr2/ship/cfg/TR2X_gameflow_gm.json5
Normal 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": [
|
||||
],
|
||||
}
|
|
@ -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"},
|
||||
],
|
||||
|
|
|
@ -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",
|
||||
|
|
61
data/tr2/ship/cfg/TR2X_strings_gm.json5
Normal 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"},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
BIN
data/tr2/ship/data/injections/boat_bits.bin
Normal file
BIN
data/tr2/ship/data/injections/cut4_textures.bin
Normal file
BIN
data/tr2/ship/data/injections/deck_fd.bin
Normal file
BIN
data/tr2/ship/data/injections/fools_pickup_meshes.bin
Normal file
BIN
data/tr2/ship/data/injections/furnace_pickup_meshes.bin
Normal file
BIN
data/tr2/ship/data/injections/guardian_death_commands.bin
Normal file
BIN
data/tr2/ship/data/injections/living_fd.bin
Normal file
BIN
data/tr2/ship/data/injections/shark_sfx.bin
Normal file
BIN
data/tr2/ship/data/injections/vegas_fd.bin
Normal 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
|
||||
|
|
|
@ -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
|
||||
|
|
27
data/tr2/ship/shaders/common.glsl
Normal 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;
|
||||
}
|