mirror of
https://github.com/fallout2-ce/fallout2-ce.git
synced 2026-07-27 16:47:11 -07:00
Compare commits
265
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d4171727b | ||
|
|
af046127e9 | ||
|
|
5a2c429956 | ||
|
|
ff5fa993f2 | ||
|
|
5a0507200b | ||
|
|
54442f0cfe | ||
|
|
ae9912b7ea | ||
|
|
f6da491246 | ||
|
|
5fa6ec679d | ||
|
|
d029bf3cd0 | ||
|
|
f81e1f7ba7 | ||
|
|
f672ba4ddf | ||
|
|
14cd1844d0 | ||
|
|
2b8f18ff0c | ||
|
|
07b52e0b76 | ||
|
|
c79696326d | ||
|
|
132626912a | ||
|
|
f7c1ccfada | ||
|
|
0ba670f0f7 | ||
|
|
58fdf2ff9e | ||
|
|
cb1d2d6ed3 | ||
|
|
4ce09d8cdb | ||
|
|
787fa1b1b1 | ||
|
|
3d4fcf23ba | ||
|
|
74c2125606 | ||
|
|
b1df5a084c | ||
|
|
2a610cf479 | ||
|
|
7d093030e7 | ||
|
|
6f321c7882 | ||
|
|
e05dacebca | ||
|
|
917c1bc49e | ||
|
|
ca9618bf0b | ||
|
|
2112b04c5b | ||
|
|
52e1954aea | ||
|
|
2f144fb421 | ||
|
|
fe472abc2f | ||
|
|
7960b3cb65 | ||
|
|
7d0a495ce8 | ||
|
|
4e8c3a4815 | ||
|
|
55af34472a | ||
|
|
9db0a4d29e | ||
|
|
325577db56 | ||
|
|
cf17f42cf8 | ||
|
|
cc6d803517 | ||
|
|
de5ee7d7f8 | ||
|
|
eeed6e87a5 | ||
|
|
0aa0f064e5 | ||
|
|
dd49ddb7c7 | ||
|
|
2922162412 | ||
|
|
35c59913f0 | ||
|
|
5b93794660 | ||
|
|
8f3ab4df6f | ||
|
|
498bdfcd13 | ||
|
|
4f1c239118 | ||
|
|
b7374ffb24 | ||
|
|
14e119f014 | ||
|
|
a5de358845 | ||
|
|
7957246c73 | ||
|
|
07da6c53be | ||
|
|
4020d6a500 | ||
|
|
6c30ce64bf | ||
|
|
53337cbb76 | ||
|
|
bc47279a93 | ||
|
|
512e403771 | ||
|
|
2ffdad43fa | ||
|
|
0e9fee8cec | ||
|
|
35e9f71810 | ||
|
|
607b95f2c4 | ||
|
|
3c59f111cd | ||
|
|
c981fdc700 | ||
|
|
38b1a01c26 | ||
|
|
bf3e817a3e | ||
|
|
43bb53b2e2 | ||
|
|
d55944a8c4 | ||
|
|
3b23a1cfe0 | ||
|
|
d364579925 | ||
|
|
25106684ba | ||
|
|
b25ee43682 | ||
|
|
9b6fbeecb9 | ||
|
|
bc25c97e93 | ||
|
|
f3f92187ae | ||
|
|
168f250028 | ||
|
|
db6967feb5 | ||
|
|
806ac12a72 | ||
|
|
3c63aa30ee | ||
|
|
b4ad5ea8a7 | ||
|
|
71d56fcf98 | ||
|
|
b3f8abbcbb | ||
|
|
16d786bd25 | ||
|
|
91ae593aac | ||
|
|
03e26a4551 | ||
|
|
acb470f34a | ||
|
|
3c01ff7477 | ||
|
|
68d9405a0a | ||
|
|
dd9c521363 | ||
|
|
51e8056430 | ||
|
|
b336e06401 | ||
|
|
fc788a3795 | ||
|
|
a9878cbe98 | ||
|
|
5891072346 | ||
|
|
e97087b958 | ||
|
|
b31cea9331 | ||
|
|
f5ade9fb19 | ||
|
|
f59637d0cc | ||
|
|
236774c7b2 | ||
|
|
f7d4fc4ffe | ||
|
|
135c62758f | ||
|
|
2de74728ce | ||
|
|
d631bfcdd0 | ||
|
|
4382d67c19 | ||
|
|
e38e7060d4 | ||
|
|
d6fc3bb2d8 | ||
|
|
82793d14f4 | ||
|
|
a5d252f19b | ||
|
|
e5d4d310c0 | ||
|
|
fa1621ff56 | ||
|
|
52e5611e1b | ||
|
|
d540a9ff04 | ||
|
|
1b6fe7e15b | ||
|
|
900140f8f7 | ||
|
|
14430c4f0a | ||
|
|
a1fc68f13a | ||
|
|
2e15d01be3 | ||
|
|
96335aebc9 | ||
|
|
6ab3c508e6 | ||
|
|
f790a10e88 | ||
|
|
6b879e71b8 | ||
|
|
9878e205e6 | ||
|
|
0a5afd1e18 | ||
|
|
625bf69b33 | ||
|
|
48c01eb8a1 | ||
|
|
b105517ab3 | ||
|
|
7d6371fd1c | ||
|
|
dc9824e2be | ||
|
|
60a0d3ab8c | ||
|
|
58c82f9268 | ||
|
|
8fcdbe0bee | ||
|
|
afff399fca | ||
|
|
080f999626 | ||
|
|
593f80144c | ||
|
|
4df9ee557d | ||
|
|
f6ba9d38fd | ||
|
|
277faa114e | ||
|
|
1f91ab4d41 | ||
|
|
0e68bfc280 | ||
|
|
c26488f2a0 | ||
|
|
bf49e6b7e2 | ||
|
|
c4cc713272 | ||
|
|
dad514c2a4 | ||
|
|
09ba154dcf | ||
|
|
f9af163495 | ||
|
|
9d6f4d9686 | ||
|
|
17042491c6 | ||
|
|
cfea9072db | ||
|
|
3d541f2be3 | ||
|
|
d53bda5012 | ||
|
|
97a7e4cc6a | ||
|
|
9b7c48a197 | ||
|
|
bf04bec410 | ||
|
|
7796238030 | ||
|
|
e91880c26a | ||
|
|
321892dd03 | ||
|
|
e42b7ad2c9 | ||
|
|
c91057ec16 | ||
|
|
ed6930a5e5 | ||
|
|
edde0470a6 | ||
|
|
f79cff3565 | ||
|
|
d0c0a81ec8 | ||
|
|
a791930acf | ||
|
|
25b5e9d272 | ||
|
|
3f15d3055c | ||
|
|
e611956cb0 | ||
|
|
2abf530797 | ||
|
|
3883b68c86 | ||
|
|
090fa331cc | ||
|
|
1f0f08f3e4 | ||
|
|
1e3aacebdd | ||
|
|
843e2f515a | ||
|
|
0aaf9e6125 | ||
|
|
eceb96194c | ||
|
|
c1c143aa43 | ||
|
|
7fc23de62a | ||
|
|
bc577641fe | ||
|
|
31abd327fd | ||
|
|
2e14e4620e | ||
|
|
95d92d8bd0 | ||
|
|
acc52383ed | ||
|
|
75c5f777fd | ||
|
|
f06eb813e0 | ||
|
|
4270ee33cc | ||
|
|
46c2f460fb | ||
|
|
a852e88bf8 | ||
|
|
178de356f1 | ||
|
|
04b8c847d3 | ||
|
|
d586e81827 | ||
|
|
26574914ff | ||
|
|
67375a5857 | ||
|
|
9be2e45f43 | ||
|
|
3dbea2e400 | ||
|
|
bd7321b128 | ||
|
|
7bb9104a7d | ||
|
|
18c5ce786e | ||
|
|
eb9f745b78 | ||
|
|
3a9f0a500f | ||
|
|
38717c9710 | ||
|
|
ad7b0e56ab | ||
|
|
e770e64a48 | ||
|
|
5956227dcb | ||
|
|
f443e365cc | ||
|
|
b443e21c6e | ||
|
|
19ed168d42 | ||
|
|
29b8c7bfe5 | ||
|
|
939211d640 | ||
|
|
b5d857547e | ||
|
|
0a9aaab4d1 | ||
|
|
5c6e5e826a | ||
|
|
aed3723306 | ||
|
|
319c116048 | ||
|
|
61da360180 | ||
|
|
9d6134367a | ||
|
|
9b96e3118d | ||
|
|
f5507c8c5a | ||
|
|
926efeb0c5 | ||
|
|
d3346b5d1b | ||
|
|
b6c2fc02b6 | ||
|
|
983092944d | ||
|
|
68e363429c | ||
|
|
eaab620c84 | ||
|
|
61742535d5 | ||
|
|
a66618cbff | ||
|
|
f8b63280f2 | ||
|
|
a24e0630d7 | ||
|
|
be11208a88 | ||
|
|
4a2174c8aa | ||
|
|
39733665fc | ||
|
|
50467d3296 | ||
|
|
959d40dc06 | ||
|
|
b2efcffec7 | ||
|
|
8675d89a39 | ||
|
|
a99a250a37 | ||
|
|
98cf43438c | ||
|
|
8eae8a4cb0 | ||
|
|
1d3b5c1951 | ||
|
|
5786f56606 | ||
|
|
ef3f3f3fc9 | ||
|
|
64a53ff4d0 | ||
|
|
3b211b2d71 | ||
|
|
c920078f7e | ||
|
|
660df2578a | ||
|
|
ea02ad0481 | ||
|
|
78e577892a | ||
|
|
9811069d7b | ||
|
|
451524e6e0 | ||
|
|
30cfd0f089 | ||
|
|
e44aeb6894 | ||
|
|
74eb64b594 | ||
|
|
a59bfdb64b | ||
|
|
1d53594961 | ||
|
|
6375269f69 | ||
|
|
28c3908862 | ||
|
|
d843a662b3 | ||
|
|
0e31ac4753 | ||
|
|
a949178e30 | ||
|
|
0e806d9be3 | ||
|
|
2d88189b4c |
@@ -0,0 +1,96 @@
|
||||
name: Build and deploy webassembly version
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
build_webassembly_version:
|
||||
name: Build webassembly version
|
||||
runs-on: ubuntu-latest
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Emscripten SDK
|
||||
run: |
|
||||
git clone https://github.com/emscripten-core/emsdk.git
|
||||
cd emsdk
|
||||
./emsdk install 4.0.4
|
||||
./emsdk activate 4.0.4
|
||||
|
||||
- name: Build fallout2 wasm module
|
||||
run: |
|
||||
source emsdk/emsdk_env.sh
|
||||
git config --global --add safe.directory "*"
|
||||
mkdir -p build
|
||||
cd build
|
||||
emcmake cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release && emmake make VERBOSE=1 -j 4
|
||||
cd ..
|
||||
|
||||
- name: Add node
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '22'
|
||||
|
||||
- name: Checkout web interface
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ololoken/fallout2-ce-ems
|
||||
ref: 0764f9fdd0abf27bd9b0d3997ca0a8e61f380058
|
||||
path: fallout2-ce-ems
|
||||
|
||||
- name: Set deployment path
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
|
||||
id: set-path
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||
echo "DEST_DIR=PR-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
|
||||
echo "SITE_BASE=/fallout2-ce/PR-${{ github.event.pull_request.number }}/" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "DEST_DIR=." >> $GITHUB_OUTPUT
|
||||
echo "SITE_BASE=/fallout2-ce/" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo ===============================
|
||||
cat $GITHUB_OUTPUT
|
||||
|
||||
- name: Build web interface
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
|
||||
run: |
|
||||
cd fallout2-ce-ems
|
||||
npm install
|
||||
cp ../build/fallout2-ce.js src/assets/fallout2ce
|
||||
cp ../build/fallout2-ce.wasm src/assets/fallout2ce
|
||||
sed -i 's/Starting wasm module/Starting wasm module ${{github.event.pull_request.head.sha || github.sha }}/' src/pages/Launcher.tsx
|
||||
npm run build
|
||||
env:
|
||||
SITE_BASE: ${{ steps.set-path.outputs.SITE_BASE }}
|
||||
|
||||
- name: Install rsync (required for the next step)
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y rsync
|
||||
|
||||
- name: Deploy PR preview or main site
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: fallout2-ce-ems/dist
|
||||
target-folder: ${{ steps.set-path.outputs.DEST_DIR }}
|
||||
clean: false
|
||||
|
||||
- name: Comment preview URL on PR
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
||||
run: |
|
||||
gh pr comment ${{ github.event.pull_request.number }} \
|
||||
--body "🚀 WebAssembly PR Preview for ${{github.event.pull_request.head.sha || github.sha }} is available at: https://${{ github.repository_owner }}.github.io/fallout2-ce/PR-${{ github.event.pull_request.number }}/"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
+204
-74
@@ -40,8 +40,26 @@ jobs:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Show clang-format version
|
||||
run: |
|
||||
clang-format --version
|
||||
|
||||
- name: clang-format
|
||||
run: find src -type f -name \*.cc -o -name \*.h | xargs clang-format --dry-run --Werror
|
||||
run: |
|
||||
echo "Showing PR labels..."
|
||||
gh pr view ${{ github.event.pull_request.number }} --repo "${{ github.repository }}" --json labels
|
||||
echo "Checking labels on PR..."
|
||||
if gh pr view ${{ github.event.pull_request.number }} --repo "${{ github.repository }}" --json labels --jq '.labels[].name' | grep -q "skip-formatting"; then
|
||||
echo "skip-formatting label found — skipping job."
|
||||
exit 0
|
||||
fi
|
||||
echo "skip-formatting label not found — continuing job."
|
||||
|
||||
find src -type f \( -name \*.cc -o -name \*.h \) | xargs clang-format --dry-run --Werror
|
||||
|
||||
echo "Code is formatted correctly"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
android:
|
||||
name: Android
|
||||
@@ -63,7 +81,7 @@ jobs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: os/android/app/.cxx
|
||||
key: android-cmake-v1
|
||||
key: android-cmake-v2
|
||||
|
||||
- name: Setup signing config
|
||||
if: env.KEYSTORE_FILE_BASE64 != '' && env.KEYSTORE_PROPERTIES_FILE_BASE64 != ''
|
||||
@@ -80,17 +98,21 @@ jobs:
|
||||
cd os/android
|
||||
./gradlew assembleDebug
|
||||
|
||||
- name: Change apk file name
|
||||
run: |
|
||||
mv os/android/app/build/outputs/apk/debug/app-debug.apk os/android/app/build/outputs/apk/debug/fallout2-ce.apk
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-debug.apk
|
||||
path: os/android/app/build/outputs/apk/debug/app-debug.apk
|
||||
path: os/android/app/build/outputs/apk/debug/fallout2-ce.apk
|
||||
retention-days: 7
|
||||
|
||||
ios:
|
||||
name: iOS
|
||||
|
||||
runs-on: macos-12
|
||||
runs-on: macos-14
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
@@ -99,44 +121,33 @@ jobs:
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: ios-cmake-v2
|
||||
path: out
|
||||
key: ios-cmake-v5
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/ios.toolchain.cmake \
|
||||
-D ENABLE_BITCODE=0 \
|
||||
-D PLATFORM=OS64 \
|
||||
-G Xcode \
|
||||
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \
|
||||
# EOL
|
||||
cmake --preset ios
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
--config RelWithDebInfo \
|
||||
-j $(sysctl -n hw.physicalcpu) \
|
||||
# EOL
|
||||
cmake --build --preset ios-debug
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
cd build
|
||||
cpack -C RelWithDebInfo
|
||||
cd out/build/ios
|
||||
cpack -C Debug
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce.ipa
|
||||
path: build/fallout2-ce.ipa
|
||||
path: out/build/ios/fallout2-ce.ipa
|
||||
retention-days: 7
|
||||
|
||||
linux:
|
||||
name: Linux (${{ matrix.arch }})
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -154,7 +165,6 @@ jobs:
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt update
|
||||
sudo apt install --allow-downgrades libpcre2-8-0=10.34-7
|
||||
sudo apt install g++-multilib libsdl2-dev:i386 zlib1g-dev:i386
|
||||
|
||||
- name: Dependencies (x64)
|
||||
@@ -166,44 +176,103 @@ jobs:
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: linux-${{ matrix.arch }}-cmake-v1
|
||||
path: out
|
||||
key: linux-${{ matrix.arch }}-cmake-v3
|
||||
|
||||
- name: Configure (x86)
|
||||
if: matrix.arch == 'x86'
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/Linux32.cmake \
|
||||
# EOL
|
||||
|
||||
- name: Configure (x64)
|
||||
if: matrix.arch == 'x64'
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
# EOL
|
||||
cmake --preset linux-${{ matrix.arch }}-debug
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
-j $(nproc) \
|
||||
# EOL
|
||||
cmake --build --preset linux-${{ matrix.arch }}-debug
|
||||
|
||||
- name: Change executable file name
|
||||
run: |
|
||||
mv out/build/linux-${{ matrix.arch }}-debug/fallout2-ce out/build/linux-${{ matrix.arch }}-debug/fallout2-ce-linux-${{ matrix.arch }}
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-linux-${{ matrix.arch }}
|
||||
path: build/fallout2-ce
|
||||
path: out/build/linux-${{ matrix.arch }}-debug/fallout2-ce-linux-${{ matrix.arch }}
|
||||
retention-days: 7
|
||||
|
||||
linux-armhf:
|
||||
name: Linux (armhf)
|
||||
|
||||
runs-on: ubuntu-22.04-arm
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo dpkg --add-architecture armhf
|
||||
sudo apt update
|
||||
sudo apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libsdl2-dev:armhf zlib1g-dev:armhf
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-D CMAKE_BUILD_TYPE=Debug \
|
||||
-D FALLOUT_VENDORED=OFF \
|
||||
-D CMAKE_SYSTEM_PROCESSOR=arm \
|
||||
-D CMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \
|
||||
-D CMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \
|
||||
# EOL
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Change executable file name
|
||||
run: |
|
||||
mv build/fallout2-ce build/fallout2-ce-linux-armhf
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-linux-armhf
|
||||
path: build/fallout2-ce-linux-armhf
|
||||
retention-days: 7
|
||||
|
||||
linux-arm64:
|
||||
name: Linux (arm64)
|
||||
|
||||
runs-on: ubuntu-22.04-arm
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libsdl2-dev zlib1g-dev
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -D CMAKE_BUILD_TYPE=Debug -D FALLOUT_VENDORED=OFF
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Change executable file name
|
||||
run: |
|
||||
mv build/fallout2-ce build/fallout2-ce-linux-arm64
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-linux-arm64
|
||||
path: build/fallout2-ce-linux-arm64
|
||||
retention-days: 7
|
||||
|
||||
macos:
|
||||
name: macOS
|
||||
|
||||
runs-on: macos-11
|
||||
runs-on: macos-14
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
@@ -212,35 +281,27 @@ jobs:
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: macos-cmake-v4
|
||||
path: out
|
||||
key: macos-cmake-v6
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-G Xcode \
|
||||
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \
|
||||
# EOL
|
||||
cmake --preset macos
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
--config RelWithDebInfo \
|
||||
-j $(sysctl -n hw.physicalcpu) \
|
||||
# EOL
|
||||
cmake --build --preset macos-debug
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
cd build
|
||||
cpack -C RelWithDebInfo
|
||||
cd out/build/macos
|
||||
cpack -C Debug
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-macos.dmg
|
||||
path: build/Fallout II Community Edition.dmg
|
||||
path: out/build/macos/Fallout II Community Edition.dmg
|
||||
retention-days: 7
|
||||
|
||||
windows:
|
||||
@@ -264,27 +325,96 @@ jobs:
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: windows-${{ matrix.arch }}-cmake-v1
|
||||
path: out
|
||||
key: windows-${{ matrix.arch }}-cmake-v2
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-G "Visual Studio 16 2019" \
|
||||
-A ${{ matrix.generator-platform }} \
|
||||
# EOL
|
||||
cmake --preset windows-${{ matrix.arch }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
--config RelWithDebInfo \
|
||||
# EOL
|
||||
cmake --build --preset windows-${{ matrix.arch }}-release
|
||||
|
||||
- name: Change executable file name
|
||||
run: |
|
||||
mv out/build/windows-${{ matrix.arch }}/RelWithDebInfo/fallout2-ce.exe out/build/windows-${{ matrix.arch }}/RelWithDebInfo/fallout2-ce-${{ matrix.arch }}.exe
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-windows-${{ matrix.arch }}
|
||||
path: build/RelWithDebInfo/fallout2-ce.exe
|
||||
path: out/build/windows-${{ matrix.arch }}/RelWithDebInfo/fallout2-ce-${{ matrix.arch }}.exe
|
||||
retention-days: 7
|
||||
|
||||
|
||||
release:
|
||||
name: Release Continuous build
|
||||
runs-on: ubuntu-latest
|
||||
needs: [android, ios, linux, linux-armhf, linux-arm64, macos, windows]
|
||||
permissions: write-all
|
||||
steps:
|
||||
- name: Fetch artifacts
|
||||
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
path: artifacts/
|
||||
|
||||
- name: Remove old release
|
||||
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
|
||||
uses: dev-drprasad/delete-tag-and-release@v0.2.1
|
||||
with:
|
||||
delete_release: true
|
||||
tag_name: continious
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Move unpacked artifacts to root folder
|
||||
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
|
||||
run: |
|
||||
ls -Rlah .
|
||||
find .
|
||||
cd artifacts/
|
||||
for folder in *; do
|
||||
if [[ -d "$folder" && "$folder" != "." ]]; then
|
||||
echo "Processing $folder"
|
||||
mv "$folder" "$folder.dir"
|
||||
cd "$folder.dir"
|
||||
for file in *; do
|
||||
if [ -f "$file" ]; then
|
||||
if [ -f "../$file" ]; then
|
||||
echo "ERROR: Duplicate artifact file name $file"
|
||||
exit 1
|
||||
fi
|
||||
if [ -d "../$file" ]; then
|
||||
echo "ERROR: Duplicate artifact folder $file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Moving $file"
|
||||
mv "$file" "../$file"
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
rm -rf "$folder.dir"
|
||||
fi
|
||||
done
|
||||
ls -Rlah .
|
||||
find .
|
||||
cd ../
|
||||
|
||||
- name: Allow GitHub to process removed release for few seconds
|
||||
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
|
||||
run: |
|
||||
sleep 20s
|
||||
|
||||
- name: Upload new release
|
||||
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name == 'push' }}
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: artifacts/*
|
||||
tag_name: continious
|
||||
draft: false
|
||||
prerelease: true
|
||||
name: Fallout2-CE Continuous Build
|
||||
@@ -0,0 +1,33 @@
|
||||
name: Cleanup PR Preview
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
delete_pr_preview:
|
||||
name: Delete PR preview from gh-pages
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout gh-pages branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: gh-pages
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Remove PR preview folder
|
||||
run: |
|
||||
PR_FOLDER="PR-${{ github.event.pull_request.number }}"
|
||||
echo "Removing preview folder: $PR_FOLDER"
|
||||
git rm -r --ignore-unmatch "$PR_FOLDER" || true
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git commit -am "đźš® Remove preview for closed PR #${{ github.event.pull_request.number }}"
|
||||
git push
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
ios:
|
||||
name: iOS
|
||||
|
||||
runs-on: macos-12
|
||||
runs-on: macos-14
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
.DS_Store
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
@@ -388,6 +389,13 @@ FodyWeavers.xsd
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# VSCode
|
||||
.vscode
|
||||
|
||||
# CMake
|
||||
/out
|
||||
/build
|
||||
|
||||
# versioning header
|
||||
src/platform/git_version.h
|
||||
CMakeUserPresets.json
|
||||
|
||||
+66
-15
@@ -6,10 +6,10 @@ set(EXECUTABLE_NAME fallout2-ce)
|
||||
|
||||
if(APPLE)
|
||||
if(IOS)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "11" CACHE STRING "")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "12" CACHE STRING "")
|
||||
set(CMAKE_OSX_ARCHITECTURES "arm64" CACHE STRING "")
|
||||
else()
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "")
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "")
|
||||
endif()
|
||||
endif()
|
||||
@@ -20,12 +20,17 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||
set(CMAKE_CXX_EXTENSIONS NO)
|
||||
|
||||
option(FALLOUT_VENDORED "Use vendored third-party libraries" ON)
|
||||
|
||||
if(ANDROID)
|
||||
add_library(${EXECUTABLE_NAME} SHARED)
|
||||
else()
|
||||
add_executable(${EXECUTABLE_NAME} WIN32 MACOSX_BUNDLE)
|
||||
endif()
|
||||
|
||||
# Git Info
|
||||
include("cmake/gitver.cmake")
|
||||
|
||||
target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||
"src/actions.cc"
|
||||
"src/actions.h"
|
||||
@@ -197,8 +202,6 @@ target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||
"src/scripts.h"
|
||||
"src/select_file_list.cc"
|
||||
"src/select_file_list.h"
|
||||
"src/selfrun.cc"
|
||||
"src/selfrun.h"
|
||||
"src/skill_defs.h"
|
||||
"src/skill.cc"
|
||||
"src/skill.h"
|
||||
@@ -225,11 +228,11 @@ target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||
"src/text_object.h"
|
||||
"src/tile.cc"
|
||||
"src/tile.h"
|
||||
"src/tile_hires_stencil.cc"
|
||||
"src/tile_hires_stencil.h"
|
||||
"src/trait_defs.h"
|
||||
"src/trait.cc"
|
||||
"src/trait.h"
|
||||
"src/vcr.cc"
|
||||
"src/vcr.h"
|
||||
"src/version.cc"
|
||||
"src/version.h"
|
||||
"src/widget.cc"
|
||||
@@ -267,6 +270,8 @@ target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||
"src/settings.h"
|
||||
"src/sfall_config.cc"
|
||||
"src/sfall_config.h"
|
||||
"src/sfall_ext.cc"
|
||||
"src/sfall_ext.h"
|
||||
"src/sfall_global_vars.cc"
|
||||
"src/sfall_global_vars.h"
|
||||
"src/sfall_global_scripts.cc"
|
||||
@@ -360,18 +365,64 @@ if(APPLE)
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION "1.3.0")
|
||||
endif()
|
||||
|
||||
add_subdirectory("third_party/fpattern")
|
||||
target_link_libraries(${EXECUTABLE_NAME} ${FPATTERN_LIBRARY})
|
||||
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${FPATTERN_INCLUDE_DIR})
|
||||
|
||||
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD"))
|
||||
add_subdirectory("third_party/zlib")
|
||||
add_subdirectory("third_party/sdl2")
|
||||
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Emscripten"))
|
||||
if(FALLOUT_VENDORED)
|
||||
add_subdirectory("third_party/zlib")
|
||||
add_subdirectory("third_party/sdl2")
|
||||
else()
|
||||
find_package(ZLIB)
|
||||
find_package(SDL2)
|
||||
endif()
|
||||
else()
|
||||
find_package(ZLIB)
|
||||
find_package(SDL2)
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
|
||||
--use-port=sdl2 \
|
||||
--use-port=sdl2_mixer \
|
||||
--use-port=zlib" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
|
||||
--use-port=sdl2 \
|
||||
--use-port=sdl2_mixer \
|
||||
--use-port=zlib \
|
||||
-std=c++17" )
|
||||
|
||||
|
||||
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
|
||||
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
|
||||
|
||||
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O1")
|
||||
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O1")
|
||||
|
||||
if(OPTION_WASM_64)
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sMEMORY64" )
|
||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -sMEMORY64" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -sMEMORY64" )
|
||||
add_compile_options( -sMEMORY64 )
|
||||
endif()
|
||||
|
||||
if(OPTION_WASM_JSPI)
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sJSPI" )
|
||||
else()
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sASYNCIFY" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sASYNCIFY_STACK_SIZE=20480" )
|
||||
endif()
|
||||
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sENVIRONMENT=web" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sALLOW_MEMORY_GROWTH" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-MEMORY_GROWTH_LINEAR_STEP=32mb" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sNO_DISABLE_EXCEPTION_CATCHING" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-lidbfs.js" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sCASE_INSENSITIVE_FS" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sMODULARIZE" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sEXPORTED_RUNTIME_METHODS=callMain,addRunDependency,removeRunDependency" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sEXPORT_ALL" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sEXPORT_NAME=fallout2ce" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "-sEXIT_RUNTIME" )
|
||||
target_link_options( ${EXECUTABLE_NAME} PRIVATE "$<$<CONFIG:DEBUG>:-g>" )
|
||||
endif()
|
||||
|
||||
|
||||
add_subdirectory("third_party/fpattern")
|
||||
target_link_libraries(${EXECUTABLE_NAME} fpattern::fpattern)
|
||||
|
||||
target_link_libraries(${EXECUTABLE_NAME} ${ZLIB_LIBRARIES})
|
||||
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
{
|
||||
"version": 6,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 19,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"hidden": true,
|
||||
"binaryDir": "${sourceDir}/out/build/${presetName}"
|
||||
},
|
||||
{
|
||||
"name": "windows-base",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-x86",
|
||||
"inherits": [
|
||||
"windows-base"
|
||||
],
|
||||
"generator": "Visual Studio 16 2019",
|
||||
"architecture": "Win32",
|
||||
"cacheVariables": {
|
||||
"CMAKE_GENERATOR_TOOLSET": "v141_xp",
|
||||
"CMAKE_C_FLAGS": "/D_WIN32_WINNT=0x0501",
|
||||
"CMAKE_CXX_FLAGS": "/D_WIN32_WINNT=0x0501",
|
||||
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-x64",
|
||||
"inherits": [
|
||||
"windows-base"
|
||||
],
|
||||
"generator": "Visual Studio 16 2019",
|
||||
"architecture": "x64",
|
||||
"cacheVariables": {
|
||||
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-base",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"FALLOUT_VENDORED": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-x86-base",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"linux-base"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_FLAGS": "-m32",
|
||||
"CMAKE_CXX_FLAGS": "-m32",
|
||||
"CMAKE_SYSTEM_NAME": "Linux",
|
||||
"CMAKE_SYSTEM_PROCESSOR": "i386"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-x86-debug",
|
||||
"inherits": [
|
||||
"linux-x86-base"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-x86-release",
|
||||
"inherits": [
|
||||
"linux-x86-base"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-x64-debug",
|
||||
"inherits": [
|
||||
"linux-base"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-x64-release",
|
||||
"inherits": [
|
||||
"linux-base"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "darwin-base",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"base"
|
||||
],
|
||||
"generator": "Xcode",
|
||||
"cacheVariables": {
|
||||
"CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY": ""
|
||||
},
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Darwin"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macos",
|
||||
"inherits": [
|
||||
"darwin-base"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ios",
|
||||
"inherits": [
|
||||
"darwin-base"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_SYSTEM_NAME": "iOS"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "windows-x86-debug",
|
||||
"configurePreset": "windows-x86",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "windows-x86-release",
|
||||
"configurePreset": "windows-x86",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "windows-x64-debug",
|
||||
"configurePreset": "windows-x64",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "windows-x64-release",
|
||||
"configurePreset": "windows-x64",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "linux-x86-debug",
|
||||
"configurePreset": "linux-x86-debug"
|
||||
},
|
||||
{
|
||||
"name": "linux-x86-release",
|
||||
"configurePreset": "linux-x86-release"
|
||||
},
|
||||
{
|
||||
"name": "linux-x64-debug",
|
||||
"configurePreset": "linux-x64-debug"
|
||||
},
|
||||
{
|
||||
"name": "linux-x64-release",
|
||||
"configurePreset": "linux-x64-release"
|
||||
},
|
||||
{
|
||||
"name": "macos-debug",
|
||||
"configurePreset": "macos",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "macos-release",
|
||||
"configurePreset": "macos",
|
||||
"configuration": "RelWithDebInfo"
|
||||
},
|
||||
{
|
||||
"name": "ios-debug",
|
||||
"configurePreset": "ios",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
{
|
||||
"name": "ios-release",
|
||||
"configurePreset": "ios",
|
||||
"configuration": "RelWithDebInfo"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "x86-Debug",
|
||||
"generator": "Visual Studio 16 2019",
|
||||
"configurationType": "Debug",
|
||||
"inheritEnvironments": [ "msvc_x86" ],
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": ""
|
||||
},
|
||||
{
|
||||
"name": "x86-Release",
|
||||
"generator": "Visual Studio 16 2019",
|
||||
"configurationType": "Release",
|
||||
"inheritEnvironments": [ "msvc_x86" ],
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": ""
|
||||
},
|
||||
{
|
||||
"name": "x64-Debug",
|
||||
"generator": "Visual Studio 16 2019 Win64",
|
||||
"configurationType": "Debug",
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"variables": []
|
||||
},
|
||||
{
|
||||
"name": "x64-Release",
|
||||
"generator": "Visual Studio 16 2019 Win64",
|
||||
"configurationType": "Release",
|
||||
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||
"cmakeCommandArgs": "",
|
||||
"buildCommandArgs": "",
|
||||
"ctestCommandArgs": "",
|
||||
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||
"variables": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -8,7 +8,7 @@ There is also [Fallout Community Edition](https://github.com/alexbatalov/fallout
|
||||
|
||||
## Installation
|
||||
|
||||
You must own the game to play. Purchase your copy on [GOG](https://www.gog.com/game/fallout_2) or [Steam](https://store.steampowered.com/app/38410). Download latest [release](https://github.com/alexbatalov/fallout2-ce/releases) or build from source. You can also check latest [debug](https://github.com/alexbatalov/fallout2-ce/actions) build intended for testers.
|
||||
You must own the game to play. Purchase your copy on [GOG](https://www.gog.com/game/fallout_2), [Epic Games](https://store.epicgames.com/p/fallout-2) or [Steam](https://store.steampowered.com/app/38410). Download latest [release](https://github.com/alexbatalov/fallout2-ce/releases) or build from source. You can also check latest [debug](https://github.com/alexbatalov/fallout2-ce/actions) build intended for testers.
|
||||
|
||||
### Windows
|
||||
|
||||
@@ -18,6 +18,14 @@ Download and copy `fallout2-ce.exe` to your `Fallout2` folder. It serves as a dr
|
||||
|
||||
- Use Windows installation as a base - it contains data assets needed to play. Copy `Fallout2` folder somewhere, for example `/home/john/Desktop/Fallout2`.
|
||||
|
||||
- Alternatively you can extract the needed files from the GoG installer:
|
||||
|
||||
```console
|
||||
$ sudo apt install innoextract
|
||||
$ innoextract ~/Downloads/setup_fallout2_2.1.0.18.exe -I app
|
||||
$ mv app Fallout2
|
||||
```
|
||||
|
||||
- Download and copy `fallout2-ce` to this folder.
|
||||
|
||||
- Install [SDL2](https://libsdl.org/download-2.0.php):
|
||||
@@ -36,6 +44,14 @@ $ sudo apt install libsdl2-2.0-0
|
||||
|
||||
- Alternatively you can use Fallout 2 from Macplay/The Omni Group as a base - you need to extract game assets from the original bundle. Mount CD/DMG, right click `Fallout 2` -> `Show Package Contents`, navigate to `Contents/Resources`. Copy `GameData` folder somewhere, for example `/Applications/Fallout2`.
|
||||
|
||||
- Or if you're a Terminal user and have Homebrew installed you can extract the needed files from the GoG installer:
|
||||
|
||||
```console
|
||||
$ brew install innoextract
|
||||
$ innoextract ~/Downloads/setup_fallout2_2.1.0.18.exe -I app
|
||||
$ mv app /Applications/Fallout2
|
||||
```
|
||||
|
||||
- Download and copy `fallout2-ce.app` to this folder.
|
||||
|
||||
- Run `fallout2-ce.app`.
|
||||
@@ -66,6 +82,14 @@ $ sudo apt install libsdl2-2.0-0
|
||||
|
||||
- Use Finder (macOS Catalina and later) or iTunes (Windows and macOS Mojave or earlier) to copy `master.dat`, `critter.dat`, `patch000.dat`, and `data` folder to "Fallout 2" app ([how-to](https://support.apple.com/HT210598)). Watch for file names - keep (or make) them lowercased (see [Configuration](#configuration)).
|
||||
|
||||
### Browser
|
||||
|
||||
> **NOTE**: WebAssebly build with emscripten
|
||||
```
|
||||
docker run --rm -v $(pwd):/src emscripten/emsdk:3.1.74 sh -c 'git config --global --add safe.directory "*" && mkdir -p build && cd build && emcmake cmake ../ -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/Emscripten.cmake && emmake make'
|
||||
```
|
||||
- Demo available at https://github.com/ololoken/fallout2-ce-ems.git
|
||||
|
||||
## Configuration
|
||||
|
||||
The main configuration file is `fallout2.cfg`. There are several important settings you might need to adjust for your installation. Depending on your Fallout distribution main game assets `master.dat`, `critter.dat`, `patch000.dat`, and `data` folder might be either all lowercased, or all uppercased. You can either update `master_dat`, `critter_dat`, `master_patches` and `critter_patches` settings to match your file names, or rename files to match entries in your `fallout2.cfg`.
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# Get author name
|
||||
execute_process(
|
||||
COMMAND git log -1 --pretty=format:%an
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE AUTHOR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get current branch
|
||||
execute_process(
|
||||
COMMAND git branch --show-current
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get hash of the latest commit
|
||||
execute_process(
|
||||
COMMAND git log --pretty=format:%h -n 1
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get last tag
|
||||
execute_process(
|
||||
COMMAND git describe --tags --abbrev=0
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE LATEST_TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Get date of the latest commit
|
||||
execute_process(
|
||||
COMMAND git log -1 --date=format:"%b %d %Y %H:%M:%S" --pretty=format:%cd
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE DATE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# Define a variable for CI_BUILD
|
||||
set(CI_BUILD 0)
|
||||
|
||||
# Create git_version.h file
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/platform/git_version.h.in
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/platform/git_version.h
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
set( CMAKE_SYSTEM_NAME "Emscripten" )
|
||||
|
||||
add_compile_definitions("DEBUG=$<CONFIG:Debug>")
|
||||
|
||||
set( CMAKE_C_COMPILER "emcc" )
|
||||
set( CMAKE_CXX_COMPILER "em++" )
|
||||
|
||||
|
||||
|
||||
set( EXECUTABLE_NAME fallout2-ce.js )
|
||||
|
||||
option(OPTION_WASM_64 "Build wasm64 module" OFF)
|
||||
option(OPTION_WASM_JSPI "Build wasm with JSPI support instead of asyncify module" OFF)
|
||||
|
||||
# Touch toolchain variable to suppress "unused variable" warning.
|
||||
# This happens if CMake is invoked with the same command line the second time.
|
||||
if(CMAKE_TOOLCHAIN_FILE)
|
||||
endif()
|
||||
@@ -1,4 +0,0 @@
|
||||
set( CMAKE_SYSTEM_NAME "Linux" )
|
||||
set( CMAKE_SYSTEM_PROCESSOR "i386" )
|
||||
set( CMAKE_C_FLAGS "-m32" )
|
||||
set( CMAKE_CXX_FLAGS "-m32" )
|
||||
File diff suppressed because it is too large
Load Diff
+20
-7
@@ -463,7 +463,7 @@ void _show_damage_to_object(Object* defender, int damage, int flags, Object* wea
|
||||
|
||||
if ((flags & DAM_DEAD) != 0) {
|
||||
// TODO: Get rid of casts.
|
||||
animationRegisterCallbackForced(defender, (void*)anim, (AnimationCallback*)_show_death, -1);
|
||||
animationRegisterCallbackForced(defender, (void*)(uintptr_t)anim, (AnimationCallback*)_show_death, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1030,7 +1030,9 @@ int _action_climb_ladder(Object* a1, Object* a2)
|
||||
reg_anim_begin(animationRequestOptions);
|
||||
|
||||
int tile = tileGetTileInDirection(a2->tile, ROTATION_SE, 1);
|
||||
if (actionPoints != -1 || objectGetDistanceBetween(a1, a2) < 5) {
|
||||
int walkDistance = 5;
|
||||
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_WALK_DISTANCE, &walkDistance);
|
||||
if (actionPoints != -1 || objectGetDistanceBetween(a1, a2) < walkDistance) {
|
||||
animationRegisterMoveToTile(a1, tile, a2->elevation, actionPoints, 0);
|
||||
} else {
|
||||
animationRegisterRunToTile(a1, tile, a2->elevation, actionPoints, 0);
|
||||
@@ -1097,7 +1099,9 @@ int _action_use_an_item_on_object(Object* user, Object* targetObj, Object* item)
|
||||
|
||||
reg_anim_begin(animationRequestOptions);
|
||||
|
||||
if (actionPoints != -1 || objectGetDistanceBetween(user, targetObj) < 5) {
|
||||
int walkDistance = 5;
|
||||
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_WALK_DISTANCE, &walkDistance);
|
||||
if (actionPoints != -1 || objectGetDistanceBetween(user, targetObj) < walkDistance) {
|
||||
animationRegisterMoveToObject(user, targetObj, actionPoints, 0);
|
||||
} else {
|
||||
animationRegisterRunToObject(user, targetObj, -1, 0);
|
||||
@@ -1167,12 +1171,15 @@ int actionPickUp(Object* critter, Object* item)
|
||||
}
|
||||
}
|
||||
|
||||
int walkDistance = 5;
|
||||
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_WALK_DISTANCE, &walkDistance);
|
||||
|
||||
if (isInCombat()) {
|
||||
reg_anim_begin(ANIMATION_REQUEST_RESERVED);
|
||||
animationRegisterMoveToObject(critter, item, critter->data.critter.combat.ap, 0);
|
||||
} else {
|
||||
reg_anim_begin(critter == gDude ? ANIMATION_REQUEST_RESERVED : ANIMATION_REQUEST_UNRESERVED);
|
||||
if (objectGetDistanceBetween(critter, item) >= 5) {
|
||||
if (objectGetDistanceBetween(critter, item) >= walkDistance) {
|
||||
animationRegisterRunToObject(critter, item, -1, 0);
|
||||
} else {
|
||||
animationRegisterMoveToObject(critter, item, -1, 0);
|
||||
@@ -1272,13 +1279,16 @@ int _action_loot_container(Object* critter, Object* container)
|
||||
}
|
||||
}
|
||||
|
||||
int walkDistance = 5;
|
||||
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_WALK_DISTANCE, &walkDistance);
|
||||
|
||||
if (isInCombat()) {
|
||||
reg_anim_begin(ANIMATION_REQUEST_RESERVED);
|
||||
animationRegisterMoveToObject(critter, container, critter->data.critter.combat.ap, 0);
|
||||
} else {
|
||||
reg_anim_begin(critter == gDude ? ANIMATION_REQUEST_RESERVED : ANIMATION_REQUEST_UNRESERVED);
|
||||
|
||||
if (objectGetDistanceBetween(critter, container) < 5) {
|
||||
if (objectGetDistanceBetween(critter, container) < walkDistance) {
|
||||
animationRegisterMoveToObject(critter, container, -1, 0);
|
||||
} else {
|
||||
animationRegisterRunToObject(critter, container, -1, 0);
|
||||
@@ -1476,13 +1486,16 @@ int actionUseSkill(Object* user, Object* target, int skill)
|
||||
}
|
||||
}
|
||||
|
||||
int walkDistance = 5;
|
||||
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_WALK_DISTANCE, &walkDistance);
|
||||
|
||||
if (isInCombat()) {
|
||||
reg_anim_begin(ANIMATION_REQUEST_RESERVED);
|
||||
animationRegisterMoveToObject(performer, target, performer->data.critter.combat.ap, 0);
|
||||
} else {
|
||||
reg_anim_begin(user == gDude ? ANIMATION_REQUEST_RESERVED : ANIMATION_REQUEST_UNRESERVED);
|
||||
if (target != gDude) {
|
||||
if (objectGetDistanceBetween(performer, target) >= 5) {
|
||||
if (objectGetDistanceBetween(performer, target) >= walkDistance) {
|
||||
animationRegisterRunToObject(performer, target, -1, 0);
|
||||
} else {
|
||||
animationRegisterMoveToObject(performer, target, -1, 0);
|
||||
@@ -1504,7 +1517,7 @@ int actionUseSkill(Object* user, Object* target, int skill)
|
||||
|
||||
animationRegisterAnimate(performer, anim, -1);
|
||||
// TODO: Get rid of casts.
|
||||
animationRegisterCallback3(performer, target, (void*)skill, (AnimationCallback3*)_obj_use_skill_on, -1);
|
||||
animationRegisterCallback3(performer, target, (void*)(uintptr_t)skill, (AnimationCallback3*)_obj_use_skill_on, -1);
|
||||
return reg_anim_end();
|
||||
}
|
||||
|
||||
|
||||
+9
-11
@@ -33,7 +33,6 @@
|
||||
#include "text_object.h"
|
||||
#include "tile.h"
|
||||
#include "trait.h"
|
||||
#include "vcr.h"
|
||||
#include "worldmap.h"
|
||||
|
||||
namespace fallout {
|
||||
@@ -305,8 +304,10 @@ static bool _anim_in_bk = false;
|
||||
// 0x530014
|
||||
static AnimationSad gAnimationSads[ANIMATION_SAD_LIST_CAPACITY];
|
||||
|
||||
#define PATH_NODE_CAPACITY 10000
|
||||
|
||||
// 0x542FD4
|
||||
static PathNode gClosedPathNodeList[2000];
|
||||
static PathNode gClosedPathNodeList[PATH_NODE_CAPACITY];
|
||||
|
||||
// 0x54CC14
|
||||
static AnimationSequence gAnimationSequences[32];
|
||||
@@ -315,7 +316,7 @@ static AnimationSequence gAnimationSequences[32];
|
||||
static unsigned char gPathfinderProcessedTiles[5000];
|
||||
|
||||
// 0x562B9C
|
||||
static PathNode gOpenPathNodeList[2000];
|
||||
static PathNode gOpenPathNodeList[PATH_NODE_CAPACITY];
|
||||
|
||||
// 0x56C7DC
|
||||
static int gAnimationDescriptionCurrentIndex;
|
||||
@@ -1741,7 +1742,7 @@ int pathfinderFindPath(Object* object, int from, int to, unsigned char* rotation
|
||||
gOpenPathNodeList[0].estimate = _tile_idistance(from, to);
|
||||
gOpenPathNodeList[0].cost = 0;
|
||||
|
||||
for (int index = 1; index < 2000; index += 1) {
|
||||
for (int index = 1; index < PATH_NODE_CAPACITY; index += 1) {
|
||||
gOpenPathNodeList[index].tile = -1;
|
||||
}
|
||||
|
||||
@@ -1789,7 +1790,8 @@ int pathfinderFindPath(Object* object, int from, int to, unsigned char* rotation
|
||||
|
||||
closedPathNodeListLength += 1;
|
||||
|
||||
if (closedPathNodeListLength == 2000) {
|
||||
if (closedPathNodeListLength == PATH_NODE_CAPACITY) {
|
||||
// Search path node capacity exhausted
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1810,7 +1812,7 @@ int pathfinderFindPath(Object* object, int from, int to, unsigned char* rotation
|
||||
}
|
||||
|
||||
int v25 = 0;
|
||||
for (; v25 < 2000; v25++) {
|
||||
for (; v25 < PATH_NODE_CAPACITY; v25++) {
|
||||
if (gOpenPathNodeList[v25].tile == -1) {
|
||||
break;
|
||||
}
|
||||
@@ -1818,7 +1820,7 @@ int pathfinderFindPath(Object* object, int from, int to, unsigned char* rotation
|
||||
|
||||
openPathNodeListLength += 1;
|
||||
|
||||
if (openPathNodeListLength == 2000) {
|
||||
if (openPathNodeListLength == PATH_NODE_CAPACITY) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3036,10 +3038,6 @@ void _dude_fidget()
|
||||
return;
|
||||
}
|
||||
|
||||
if (vcrGetState() != VCR_STATE_TURNED_OFF) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gDude->flags & OBJECT_HIDDEN) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ typedef enum AnimationType {
|
||||
LAST_SF_DEATH_ANIM = ANIM_FALL_FRONT_BLOOD_SF,
|
||||
} AnimationType;
|
||||
|
||||
#define FID_ANIM_TYPE(value) ((value)&0xFF0000) >> 16
|
||||
#define FID_ANIM_TYPE(value) ((value) & 0xFF0000) >> 16
|
||||
|
||||
// Signature of animation callback accepting 2 parameters.
|
||||
typedef int(AnimationCallback)(void* a1, void* a2);
|
||||
|
||||
+3
-3
@@ -525,7 +525,7 @@ int artCopyFileName(int objectType, int id, char* dest)
|
||||
{
|
||||
ArtListDescription* ptr;
|
||||
|
||||
if (objectType < OBJ_TYPE_ITEM && objectType >= OBJ_TYPE_COUNT) {
|
||||
if (objectType < OBJ_TYPE_ITEM || objectType >= OBJ_TYPE_COUNT) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -633,11 +633,11 @@ char* artBuildFilePath(int fid)
|
||||
v5 = (v2 & 0xF000) >> 12;
|
||||
type = FID_TYPE(v2);
|
||||
|
||||
if (v3 >= gArtListDescriptions[type].fileNamesLength) {
|
||||
if (type < OBJ_TYPE_ITEM || type >= OBJ_TYPE_COUNT) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (type < OBJ_TYPE_ITEM || type >= OBJ_TYPE_COUNT) {
|
||||
if (v3 >= gArtListDescriptions[type].fileNamesLength) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,10 +95,6 @@ static void audioEngineMixin(void* userData, Uint8* stream, int length)
|
||||
|
||||
bool audioEngineInit()
|
||||
{
|
||||
if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SDL_AudioSpec desiredSpec;
|
||||
desiredSpec.freq = 22050;
|
||||
desiredSpec.format = AUDIO_S16;
|
||||
@@ -122,10 +118,6 @@ void audioEngineExit()
|
||||
SDL_CloseAudioDevice(gAudioEngineDeviceId);
|
||||
gAudioEngineDeviceId = -1;
|
||||
}
|
||||
|
||||
if (SDL_WasInit(SDL_INIT_AUDIO)) {
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
}
|
||||
}
|
||||
|
||||
void audioEnginePause()
|
||||
|
||||
@@ -320,6 +320,7 @@ void automapShow(bool isInGame, bool isUsingScanner)
|
||||
|
||||
int oldFont = fontGetCurrent();
|
||||
fontSetCurrent(101);
|
||||
touch_set_touchscreen_mode(true);
|
||||
|
||||
int automapWindowX = (screenGetWidth() - AUTOMAP_WINDOW_WIDTH) / 2;
|
||||
int automapWindowY = (screenGetHeight() - AUTOMAP_WINDOW_HEIGHT) / 2;
|
||||
@@ -492,6 +493,7 @@ void automapShow(bool isInGame, bool isUsingScanner)
|
||||
|
||||
windowDestroy(window);
|
||||
fontSetCurrent(oldFont);
|
||||
touch_set_touchscreen_mode(false);
|
||||
}
|
||||
|
||||
// Renders automap in Map window.
|
||||
|
||||
+10
-10
@@ -995,7 +995,7 @@ int characterEditorShow(bool isCreationMode)
|
||||
}
|
||||
} else if (characterEditorSelectedItem >= 61 && characterEditorSelectedItem < 79) {
|
||||
if (gCharacterEditorIsCreationMode) {
|
||||
_win_button_press_and_release(gCharacterEditorTagSkillBtns[gCharacterEditorIsCreationMode - 61]);
|
||||
_win_button_press_and_release(gCharacterEditorTagSkillBtns[characterEditorSelectedItem - 61]);
|
||||
windowRefresh(gCharacterEditorWindow);
|
||||
} else {
|
||||
characterEditorHandleAdjustSkillButtonPressed(keyCode);
|
||||
@@ -1003,7 +1003,7 @@ int characterEditorShow(bool isCreationMode)
|
||||
}
|
||||
} else if (characterEditorSelectedItem >= 82 && characterEditorSelectedItem < 98) {
|
||||
if (gCharacterEditorIsCreationMode) {
|
||||
_win_button_press_and_release(gCharacterEditorOptionalTraitBtns[gCharacterEditorIsCreationMode - 82]);
|
||||
_win_button_press_and_release(gCharacterEditorOptionalTraitBtns[characterEditorSelectedItem - 82]);
|
||||
windowRefresh(gCharacterEditorWindow);
|
||||
}
|
||||
}
|
||||
@@ -1018,7 +1018,7 @@ int characterEditorShow(bool isCreationMode)
|
||||
}
|
||||
} else if (characterEditorSelectedItem >= 61 && characterEditorSelectedItem < 79) {
|
||||
if (gCharacterEditorIsCreationMode) {
|
||||
_win_button_press_and_release(gCharacterEditorTagSkillBtns[gCharacterEditorIsCreationMode - 61]);
|
||||
_win_button_press_and_release(gCharacterEditorTagSkillBtns[characterEditorSelectedItem - 61]);
|
||||
windowRefresh(gCharacterEditorWindow);
|
||||
} else {
|
||||
characterEditorHandleAdjustSkillButtonPressed(keyCode);
|
||||
@@ -1026,7 +1026,7 @@ int characterEditorShow(bool isCreationMode)
|
||||
}
|
||||
} else if (characterEditorSelectedItem >= 82 && characterEditorSelectedItem < 98) {
|
||||
if (gCharacterEditorIsCreationMode) {
|
||||
_win_button_press_and_release(gCharacterEditorOptionalTraitBtns[gCharacterEditorIsCreationMode - 82]);
|
||||
_win_button_press_and_release(gCharacterEditorOptionalTraitBtns[characterEditorSelectedItem - 82]);
|
||||
windowRefresh(gCharacterEditorWindow);
|
||||
}
|
||||
}
|
||||
@@ -1877,7 +1877,7 @@ static void characterEditorWindowFree()
|
||||
|
||||
fontSetCurrent(gCharacterEditorOldFont);
|
||||
|
||||
if (gCharacterEditorIsCreationMode == 1) {
|
||||
if (gCharacterEditorIsCreationMode) {
|
||||
skillsSetTagged(gCharacterEditorTempTaggedSkills, 3);
|
||||
traitsSetSelected(gCharacterEditorTempTraits[0], gCharacterEditorTempTraits[1]);
|
||||
characterEditorSelectedItem = 0;
|
||||
@@ -2366,7 +2366,7 @@ static void characterEditorDrawPcStats()
|
||||
char formattedValueBuffer[16];
|
||||
char stringBuffer[128];
|
||||
|
||||
if (gCharacterEditorIsCreationMode == 1) {
|
||||
if (gCharacterEditorIsCreationMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2930,7 +2930,7 @@ static void characterEditorDrawSkills(int a1)
|
||||
selectedSkill = characterEditorSelectedItem - EDITOR_FIRST_SKILL;
|
||||
}
|
||||
|
||||
if (gCharacterEditorIsCreationMode == 0 && a1 == 0) {
|
||||
if (!gCharacterEditorIsCreationMode && a1 == 0) {
|
||||
buttonDestroy(gCharacterEditorSliderPlusBtn);
|
||||
buttonDestroy(gCharacterEditorSliderMinusBtn);
|
||||
gCharacterEditorSliderMinusBtn = -1;
|
||||
@@ -4868,7 +4868,7 @@ static void characterEditorRestorePlayer()
|
||||
}
|
||||
}
|
||||
|
||||
if (gCharacterEditorIsCreationMode == 1) {
|
||||
if (gCharacterEditorIsCreationMode) {
|
||||
v3 -= gCharacterEditorIsCreationMode;
|
||||
}
|
||||
|
||||
@@ -5373,7 +5373,7 @@ static void characterEditorDrawOptionalTraits()
|
||||
double step;
|
||||
double y;
|
||||
|
||||
if (gCharacterEditorIsCreationMode != 1) {
|
||||
if (!gCharacterEditorIsCreationMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7250,7 +7250,7 @@ static int customKarmaFolderGetFrmId()
|
||||
return entry.frmId;
|
||||
}
|
||||
}
|
||||
return gCustomKarmaFolderDescriptions.end()->frmId;
|
||||
return gCustomKarmaFolderDescriptions.back().frmId;
|
||||
}
|
||||
|
||||
static void customTownReputationInit()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user