mirror of
https://github.com/fallout2-ce/fallout2-ce.git
synced 2026-07-27 16:47:11 -07:00
Compare commits
224
Commits
v1.2.0
...
sfall-port
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39b369f7df | ||
|
|
76ac71bc08 | ||
|
|
323cc6165c | ||
|
|
dfcf61b184 | ||
|
|
20d55423f7 | ||
|
|
8714d418ac | ||
|
|
6efbe795dc | ||
|
|
ebb6a6b9d8 | ||
|
|
26c04ae803 | ||
|
|
da72bc9501 | ||
|
|
91a502d704 | ||
|
|
71f84cbe44 | ||
|
|
9fb917c357 | ||
|
|
aa31185b35 | ||
|
|
ec0685ea19 | ||
|
|
2c7ab7f5c8 | ||
|
|
8de73ad774 | ||
|
|
3ceacf1001 | ||
|
|
31afb4d568 | ||
|
|
95cbba3920 | ||
|
|
16b044ae31 | ||
|
|
caea9cb4fb | ||
|
|
8325823493 | ||
|
|
8e1e8d483c | ||
|
|
1b18c2baa3 | ||
|
|
70d5830f00 | ||
|
|
401df384ef | ||
|
|
59af02cca9 | ||
|
|
c6565ac96a | ||
|
|
16f4ab7787 | ||
|
|
e23c4eddda | ||
|
|
601f0c7b44 | ||
|
|
f411d75643 | ||
|
|
81fce5f4a2 | ||
|
|
0e447c55a8 | ||
|
|
91806d8ccb | ||
|
|
a30fb4cfdd | ||
|
|
def8effa9f | ||
|
|
d46ee07583 | ||
|
|
ee19238667 | ||
|
|
0d83cff24e | ||
|
|
30a3bf9b71 | ||
|
|
8c61b0bd8c | ||
|
|
6e9f1ae517 | ||
|
|
ad3e0eb752 | ||
|
|
b40bfcc64a | ||
|
|
b706756ec9 | ||
|
|
427672741a | ||
|
|
bb3513956c | ||
|
|
84aecfa823 | ||
|
|
7f920fe13b | ||
|
|
9178abc53d | ||
|
|
84288612ef | ||
|
|
4a94b19f60 | ||
|
|
b0b161ceb5 | ||
|
|
1c2fd05bcd | ||
|
|
e0b18a8785 | ||
|
|
8929941d13 | ||
|
|
8d2d5df65f | ||
|
|
fe47d88035 | ||
|
|
29e81f3bf4 | ||
|
|
05b4c125e6 | ||
|
|
96573a7209 | ||
|
|
caf28a7286 | ||
|
|
25a3de62e7 | ||
|
|
fd3cd887b6 | ||
|
|
c3a6d07dc4 | ||
|
|
ed7ffac816 | ||
|
|
59c43590cc | ||
|
|
f14f37f970 | ||
|
|
cba1fc8f61 | ||
|
|
8329d2fcf6 | ||
|
|
1de7ef0151 | ||
|
|
f1f4cac316 | ||
|
|
6ce6639f10 | ||
|
|
c5ad0c294f | ||
|
|
f780969178 | ||
|
|
f3f61abc18 | ||
|
|
369a54f836 | ||
|
|
e9f3b34888 | ||
|
|
c1258cbb4c | ||
|
|
49804a52e6 | ||
|
|
e0e0db219c | ||
|
|
f93aa710a4 | ||
|
|
ca206da4af | ||
|
|
f6461a44dc | ||
|
|
3a271a399f | ||
|
|
ac1f4477ef | ||
|
|
708862ca24 | ||
|
|
57711cae5f | ||
|
|
f6e9a9d975 | ||
|
|
4cd40b33af | ||
|
|
053e70dde4 | ||
|
|
4b51b2f29b | ||
|
|
cdfd308193 | ||
|
|
7327588fc3 | ||
|
|
d16f0010ac | ||
|
|
a27b2496d4 | ||
|
|
a2d61dc7c4 | ||
|
|
093d4f23d8 | ||
|
|
3331ad02b0 | ||
|
|
661c689029 | ||
|
|
b1049fceb1 | ||
|
|
f933bff8ae | ||
|
|
9f08c73b3c | ||
|
|
4eaea0e3c0 | ||
|
|
c652312157 | ||
|
|
8cc48cf52a | ||
|
|
9faa427a28 | ||
|
|
480094a3eb | ||
|
|
1366b050b0 | ||
|
|
e68c2a4784 | ||
|
|
78ae0fb3bf | ||
|
|
127de14318 | ||
|
|
28d1d410d5 | ||
|
|
4b65bdf021 | ||
|
|
cbb9cbc6fd | ||
|
|
c72d8778ba | ||
|
|
d6c3d74b3f | ||
|
|
3c7248af5f | ||
|
|
fd9fa80204 | ||
|
|
3d5cb4c3f4 | ||
|
|
01a68af4a4 | ||
|
|
6a75ec07e9 | ||
|
|
1d310eb626 | ||
|
|
ffc440c809 | ||
|
|
a4daffa30e | ||
|
|
ccabbd7688 | ||
|
|
d27eafe03a | ||
|
|
7a45ac72f0 | ||
|
|
f6cfc1fa3a | ||
|
|
6dcbcb97ad | ||
|
|
769599c463 | ||
|
|
50d7c71db1 | ||
|
|
b07a7bcefd | ||
|
|
867d28ac62 | ||
|
|
d9a173678a | ||
|
|
dde3255b07 | ||
|
|
1506ae7048 | ||
|
|
ce5d07e09c | ||
|
|
2d8a637f7d | ||
|
|
8414effc04 | ||
|
|
3a17818ceb | ||
|
|
90d1545bb2 | ||
|
|
a7628ccaea | ||
|
|
3af2a49250 | ||
|
|
ffe90eef49 | ||
|
|
c4c2806071 | ||
|
|
0e31ac4753 | ||
|
|
a949178e30 | ||
|
|
0e806d9be3 | ||
|
|
fe035d8514 | ||
|
|
cf98070cd0 | ||
|
|
0ffcb107af | ||
|
|
cf5f865a23 | ||
|
|
37e4822ed5 | ||
|
|
bf639a2c4a | ||
|
|
89839be3af | ||
|
|
ec722475b6 | ||
|
|
32ed3c3271 | ||
|
|
03bf507893 | ||
|
|
681b7c388b | ||
|
|
fe0d767521 | ||
|
|
62c5c4757c | ||
|
|
70b0b61664 | ||
|
|
53a4437be9 | ||
|
|
42c541012c | ||
|
|
61293bd39c | ||
|
|
d641fefc13 | ||
|
|
666e5cf62d | ||
|
|
2565900f90 | ||
|
|
6b6fa3f111 | ||
|
|
a06097aef5 | ||
|
|
efdc2e0199 | ||
|
|
d6a74468da | ||
|
|
fcf8a87603 | ||
|
|
a8815229a0 | ||
|
|
aa99b2e1d3 | ||
|
|
63d8300c61 | ||
|
|
81c3ff9b1a | ||
|
|
a0652e2646 | ||
|
|
df3ac30de6 | ||
|
|
6ca1329720 | ||
|
|
129361836f | ||
|
|
cf4921de1e | ||
|
|
ecc6a8679b | ||
|
|
a39f149817 | ||
|
|
540cc1e08b | ||
|
|
ef34fdb519 | ||
|
|
9b02f600de | ||
|
|
0bb07dbd50 | ||
|
|
0a85ce520b | ||
|
|
99bc14cf3a | ||
|
|
527e152297 | ||
|
|
c8d45854ba | ||
|
|
11472e8be9 | ||
|
|
69e4adf5b3 | ||
|
|
a2eabd668b | ||
|
|
6d1273d325 | ||
|
|
e23b39abaa | ||
|
|
117b1d7b44 | ||
|
|
6398f8a79e | ||
|
|
81b9345303 | ||
|
|
249892716e | ||
|
|
3e8227a62b | ||
|
|
1570f860e8 | ||
|
|
d7c4589a55 | ||
|
|
0a9a1dc7ca | ||
|
|
42346f66b2 | ||
|
|
7ac651b736 | ||
|
|
0bb822ba60 | ||
|
|
075de8f837 | ||
|
|
36b5ceba8a | ||
|
|
f5d3cfb5e3 | ||
|
|
81210f46af | ||
|
|
c14f671a0d | ||
|
|
33141672ed | ||
|
|
28083cfea9 | ||
|
|
c9864741f3 | ||
|
|
5a230efd2b | ||
|
|
3aea6a98ef | ||
|
|
ba49abcea6 | ||
|
|
47f5be8340 | ||
|
|
d435185e9e |
@@ -1,2 +1,3 @@
|
||||
BasedOnStyle: WebKit
|
||||
AllowShortIfStatementsOnASingleLine: WithoutElse
|
||||
FixNamespaceComments: true
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*.java text eol=lf
|
||||
*.json text eol=lf
|
||||
*.md text eol=lf
|
||||
*.mm text eol=lf
|
||||
*.plist text eol=lf
|
||||
*.pro text eol=lf
|
||||
*.properties text eol=lf
|
||||
|
||||
@@ -26,11 +26,23 @@ jobs:
|
||||
sudo apt install cppcheck
|
||||
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: cppcheck
|
||||
run: cppcheck --std=c++17 src/
|
||||
|
||||
code-format:
|
||||
name: Code format check
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: clang-format
|
||||
run: find src -type f -name \*.cc -o -name \*.h | xargs clang-format --dry-run --Werror
|
||||
|
||||
android:
|
||||
name: Android
|
||||
|
||||
@@ -38,17 +50,17 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v2
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
cache: gradle
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: os/android/app/.cxx
|
||||
key: android-cmake-v1
|
||||
@@ -69,7 +81,7 @@ jobs:
|
||||
./gradlew assembleDebug
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-debug.apk
|
||||
path: os/android/app/build/outputs/apk/debug/app-debug.apk
|
||||
@@ -78,43 +90,44 @@ jobs:
|
||||
ios:
|
||||
name: iOS
|
||||
|
||||
runs-on: macos-11
|
||||
runs-on: macos-12
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: ios-cmake-v1
|
||||
key: ios-cmake-v2
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-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
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
--config RelWithDebInfo \
|
||||
-j $(sysctl -n hw.physicalcpu) \
|
||||
--target package \
|
||||
# EOL
|
||||
|
||||
# TODO: Should be a part of packaging.
|
||||
- name: Prepare for uploading
|
||||
- name: Pack
|
||||
run: |
|
||||
cp build/fallout2-ce.zip build/fallout2-ce.ipa
|
||||
cd build
|
||||
cpack -C RelWithDebInfo
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce.ipa
|
||||
path: build/fallout2-ce.ipa
|
||||
@@ -134,7 +147,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Dependencies (x86)
|
||||
if: matrix.arch == 'x86'
|
||||
@@ -151,7 +164,7 @@ jobs:
|
||||
sudo apt install libsdl2-dev zlib1g-dev
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: linux-${{ matrix.arch }}-cmake-v1
|
||||
@@ -181,7 +194,7 @@ jobs:
|
||||
# EOL
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-linux-${{ matrix.arch }}
|
||||
path: build/fallout2-ce
|
||||
@@ -194,34 +207,40 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: macos-cmake-v3
|
||||
key: macos-cmake-v4
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-G Xcode \
|
||||
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \
|
||||
# EOL
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
--config RelWithDebInfo \
|
||||
-j $(sysctl -n hw.physicalcpu) \
|
||||
--target package \
|
||||
# EOL
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
cd build
|
||||
cpack -C RelWithDebInfo
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-macos.dmg
|
||||
path: build/fallout2-ce.dmg
|
||||
path: build/Fallout II Community Edition.dmg
|
||||
retention-days: 7
|
||||
|
||||
windows:
|
||||
@@ -240,10 +259,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: windows-${{ matrix.arch }}-cmake-v1
|
||||
@@ -264,7 +283,7 @@ jobs:
|
||||
# EOL
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fallout2-ce-windows-${{ matrix.arch }}
|
||||
path: build/RelWithDebInfo/fallout2-ce.exe
|
||||
|
||||
@@ -17,17 +17,17 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v2
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
cache: gradle
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: os/android/app/.cxx
|
||||
key: android-cmake-v1
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
run: |
|
||||
cd os/android/app/build/outputs/apk/release
|
||||
cp app-release.apk fallout2-ce-android.apk
|
||||
gh release upload ${{ github.ref_name }} fallout2-ce-android.apk
|
||||
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-android.apk
|
||||
rm fallout2-ce-android.apk
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -59,14 +59,14 @@ jobs:
|
||||
ios:
|
||||
name: iOS
|
||||
|
||||
runs-on: macos-11
|
||||
runs-on: macos-12
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: ios-cmake-v1
|
||||
@@ -75,25 +75,31 @@ jobs:
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-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
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
--config RelWithDebInfo \
|
||||
-j $(sysctl -n hw.physicalcpu) \
|
||||
--target package \
|
||||
# EOL
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
cd build
|
||||
cpack -C RelWithDebInfo
|
||||
|
||||
- name: Upload
|
||||
run: |
|
||||
cd build
|
||||
cp fallout2-ce.zip fallout2-ce-ios.ipa
|
||||
gh release upload ${{ github.ref_name }} fallout2-ce-ios.ipa
|
||||
cp fallout2-ce.ipa fallout2-ce-ios.ipa
|
||||
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-ios.ipa
|
||||
rm fallout2-ce-ios.ipa
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -112,7 +118,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Dependencies (x86)
|
||||
if: matrix.arch == 'x86'
|
||||
@@ -129,7 +135,7 @@ jobs:
|
||||
sudo apt install libsdl2-dev zlib1g-dev
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: linux-${{ matrix.arch }}-cmake-v1
|
||||
@@ -162,7 +168,7 @@ jobs:
|
||||
run: |
|
||||
cd build
|
||||
tar -czvf fallout2-ce-linux-${{ matrix.arch }}.tar.gz fallout2-ce
|
||||
gh release upload ${{ github.ref_name }} fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
||||
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
||||
rm fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -174,16 +180,16 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Import code signing certificates
|
||||
uses: apple-actions/import-codesign-certs@v1
|
||||
uses: apple-actions/import-codesign-certs@v2
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_FILE_BASE64 }}
|
||||
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_PASSWORD }}
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: macos-cmake-v3
|
||||
@@ -192,41 +198,44 @@ jobs:
|
||||
run: |
|
||||
cmake \
|
||||
-B build \
|
||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-D CPACK_BUNDLE_APPLE_CERT_APP="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
|
||||
-G Xcode \
|
||||
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
|
||||
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS="NO" \
|
||||
-D CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS="--options=runtime --timestamp" \
|
||||
# EOL
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake \
|
||||
--build build \
|
||||
--config RelWithDebInfo \
|
||||
-j $(sysctl -n hw.physicalcpu) \
|
||||
--target package \
|
||||
# EOL
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
cd build
|
||||
cpack -C RelWithDebInfo
|
||||
|
||||
- name: Notarize
|
||||
run: |
|
||||
brew install mitchellh/gon/gon
|
||||
cat << EOF > config.json
|
||||
{
|
||||
"notarize": {
|
||||
"path": "build/fallout2-ce.dmg",
|
||||
"bundle_id": "$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" build/fallout2-ce.app/Contents/Info.plist)",
|
||||
"staple": true
|
||||
}
|
||||
}
|
||||
EOF
|
||||
gon config.json
|
||||
rm config.json
|
||||
env:
|
||||
AC_USERNAME: ${{ secrets.APPLE_DEVELOPER_AC_USERNAME }}
|
||||
AC_PASSWORD: ${{ secrets.APPLE_DEVELOPER_AC_PASSWORD }}
|
||||
xcrun notarytool submit \
|
||||
"build/Fallout II Community Edition.dmg" \
|
||||
--apple-id "${{ secrets.APPLE_DEVELOPER_AC_USERNAME }}" \
|
||||
--team-id "${{ secrets.APPLE_DEVELOPER_AC_TEAM }}" \
|
||||
--password "${{ secrets.APPLE_DEVELOPER_AC_PASSWORD }}" \
|
||||
--wait
|
||||
|
||||
- name: Staple
|
||||
run: |
|
||||
xcrun stapler staple \
|
||||
"build/Fallout II Community Edition.dmg"
|
||||
|
||||
- name: Upload
|
||||
run: |
|
||||
cd build
|
||||
cp fallout2-ce.dmg fallout2-ce-macos.dmg
|
||||
gh release upload ${{ github.ref_name }} fallout2-ce-macos.dmg
|
||||
cp "Fallout II Community Edition.dmg" fallout2-ce-macos.dmg
|
||||
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-macos.dmg
|
||||
rm fallout2-ce-macos.dmg
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -247,10 +256,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache cmake build
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: build
|
||||
key: windows-${{ matrix.arch }}-cmake-v1
|
||||
@@ -274,7 +283,7 @@ jobs:
|
||||
run: |
|
||||
cd build/RelWithDebInfo
|
||||
7z a fallout2-ce-windows-${{ matrix.arch }}.zip fallout2-ce.exe
|
||||
gh release upload ${{ github.ref_name }} fallout2-ce-windows-${{ matrix.arch }}.zip
|
||||
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-windows-${{ matrix.arch }}.zip
|
||||
rm fallout2-ce-windows-${{ matrix.arch }}.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
+62
-37
@@ -4,7 +4,7 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||
|
||||
set(EXECUTABLE_NAME fallout2-ce)
|
||||
|
||||
if (APPLE)
|
||||
if(APPLE)
|
||||
if(IOS)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "11" CACHE STRING "")
|
||||
set(CMAKE_OSX_ARCHITECTURES "arm64" CACHE STRING "")
|
||||
@@ -20,7 +20,7 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||
set(CMAKE_CXX_EXTENSIONS NO)
|
||||
|
||||
if (ANDROID)
|
||||
if(ANDROID)
|
||||
add_library(${EXECUTABLE_NAME} SHARED)
|
||||
else()
|
||||
add_executable(${EXECUTABLE_NAME} WIN32 MACOSX_BUNDLE)
|
||||
@@ -140,6 +140,8 @@ target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||
"src/loadsave.h"
|
||||
"src/main.cc"
|
||||
"src/main.h"
|
||||
"src/mainmenu.cc"
|
||||
"src/mainmenu.h"
|
||||
"src/map_defs.h"
|
||||
"src/map.cc"
|
||||
"src/map.h"
|
||||
@@ -150,8 +152,6 @@ target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||
"src/memory.h"
|
||||
"src/message.cc"
|
||||
"src/message.h"
|
||||
"src/mmx.cc"
|
||||
"src/mmx.h"
|
||||
"src/mouse_manager.cc"
|
||||
"src/mouse_manager.h"
|
||||
"src/mouse.cc"
|
||||
@@ -253,22 +253,38 @@ target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||
target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||
"src/audio_engine.cc"
|
||||
"src/audio_engine.h"
|
||||
"src/delay.cc"
|
||||
"src/delay.h"
|
||||
"src/fps_limiter.cc"
|
||||
"src/fps_limiter.h"
|
||||
"src/platform_compat.cc"
|
||||
"src/platform_compat.h"
|
||||
"src/pointer_registry.cc"
|
||||
"src/pointer_registry.h"
|
||||
"src/preferences.cc"
|
||||
"src/preferences.h"
|
||||
"src/settings.cc"
|
||||
"src/settings.h"
|
||||
"src/sfall_config.cc"
|
||||
"src/sfall_config.h"
|
||||
"src/sfall_global_vars.cc"
|
||||
"src/sfall_global_vars.h"
|
||||
"src/sfall_global_scripts.cc"
|
||||
"src/sfall_global_scripts.h"
|
||||
"src/sfall_ini.cc"
|
||||
"src/sfall_ini.h"
|
||||
"src/sfall_kb_helpers.cc"
|
||||
"src/sfall_kb_helpers.h"
|
||||
"src/sfall_lists.cc"
|
||||
"src/sfall_lists.h"
|
||||
"src/sfall_metarules.cc"
|
||||
"src/sfall_metarules.h"
|
||||
"src/sfall_opcodes.cc"
|
||||
"src/sfall_opcodes.h"
|
||||
"src/sfall_arrays.cc"
|
||||
"src/sfall_arrays.h"
|
||||
"src/touch.cc"
|
||||
"src/touch.h"
|
||||
)
|
||||
|
||||
if(IOS)
|
||||
@@ -282,11 +298,8 @@ if(WIN32)
|
||||
target_compile_definitions(${EXECUTABLE_NAME} PUBLIC
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
_CRT_NONSTDC_NO_WARNINGS
|
||||
)
|
||||
else()
|
||||
target_compile_definitions(${EXECUTABLE_NAME} PRIVATE
|
||||
$<$<CONFIG:Debug>:_DEBUG>
|
||||
$<$<CONFIG:RelWithDebInfo>:_DEBUG>
|
||||
NOMINMAX
|
||||
WIN32_LEAN_AND_MEAN
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -296,7 +309,7 @@ if(WIN32)
|
||||
)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if(WIN32)
|
||||
target_sources(${EXECUTABLE_NAME} PUBLIC
|
||||
"os/windows/fallout2-ce.ico"
|
||||
"os/windows/fallout2-ce.rc"
|
||||
@@ -304,31 +317,54 @@ if (WIN32)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_sources(${EXECUTABLE_NAME} PUBLIC "os/macos/fallout2-ce.icns")
|
||||
set_source_files_properties("os/macos/fallout2-ce.icns" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
|
||||
if(IOS)
|
||||
target_sources(${EXECUTABLE_NAME} PUBLIC "os/ios/LaunchScreen.storyboard")
|
||||
set_source_files_properties("os/ios/LaunchScreen.storyboard" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
set_target_properties(${EXECUTABLE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/os/ios/Info.plist")
|
||||
set_target_properties(${EXECUTABLE_NAME} PROPERTIES XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")
|
||||
set(RESOURCES
|
||||
"os/ios/AppIcon.xcassets"
|
||||
"os/ios/LaunchScreen.storyboard"
|
||||
)
|
||||
|
||||
target_sources(${EXECUTABLE_NAME} PUBLIC ${RESOURCES})
|
||||
set_source_files_properties(${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
|
||||
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/os/ios/Info.plist"
|
||||
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon"
|
||||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.alexbatalov.fallout2-ce"
|
||||
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2"
|
||||
)
|
||||
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "${EXECUTABLE_NAME}")
|
||||
set(MACOSX_BUNDLE_DISPLAY_NAME "Fallout 2")
|
||||
else()
|
||||
set_target_properties(${EXECUTABLE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/os/macos/Info.plist")
|
||||
set(RESOURCES
|
||||
"os/macos/fallout2-ce.icns"
|
||||
)
|
||||
|
||||
target_sources(${EXECUTABLE_NAME} PUBLIC ${RESOURCES})
|
||||
set_source_files_properties(${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
|
||||
set_target_properties(${EXECUTABLE_NAME} PROPERTIES
|
||||
OUTPUT_NAME "Fallout II Community Edition"
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/os/macos/Info.plist"
|
||||
XCODE_ATTRIBUTE_EXECUTABLE_NAME "${EXECUTABLE_NAME}"
|
||||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.alexbatalov.fallout2-ce"
|
||||
)
|
||||
|
||||
set(MACOSX_BUNDLE_ICON_FILE "fallout2-ce.icns")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "Fallout II: Community Edition")
|
||||
set(MACOSX_BUNDLE_DISPLAY_NAME "Fallout II")
|
||||
endif()
|
||||
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.alexbatalov.fallout2-ce")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "${EXECUTABLE_NAME}")
|
||||
set(MACOSX_BUNDLE_ICON_FILE "fallout2-ce.icns")
|
||||
set(MACOSX_BUNDLE_DISPLAY_NAME "Fallout 2")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "1.2.0")
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION "1.2.0")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "1.3.0")
|
||||
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")
|
||||
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")
|
||||
else()
|
||||
@@ -349,24 +385,13 @@ if(APPLE)
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
|
||||
set(CPACK_PACKAGE_FILE_NAME "fallout2-ce")
|
||||
set(CPACK_ARCHIVE_FILE_EXTENSION "ipa")
|
||||
else()
|
||||
install(TARGETS ${EXECUTABLE_NAME} DESTINATION .)
|
||||
install(CODE "
|
||||
include(BundleUtilities)
|
||||
fixup_bundle(${CMAKE_BINARY_DIR}/${MACOSX_BUNDLE_BUNDLE_NAME}.app \"\" \"\")
|
||||
"
|
||||
COMPONENT Runtime)
|
||||
|
||||
if (CPACK_BUNDLE_APPLE_CERT_APP)
|
||||
install(CODE "
|
||||
execute_process(COMMAND codesign --deep --force --options runtime --sign \"${CPACK_BUNDLE_APPLE_CERT_APP}\" ${CMAKE_BINARY_DIR}/${MACOSX_BUNDLE_BUNDLE_NAME}.app)
|
||||
"
|
||||
COMPONENT Runtime)
|
||||
endif()
|
||||
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
set(CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK ON)
|
||||
set(CPACK_PACKAGE_FILE_NAME "fallout2-ce")
|
||||
set(CPACK_PACKAGE_FILE_NAME "Fallout II Community Edition")
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
# Fallout 2 Community Edition
|
||||
|
||||
Fallout 2 Community Edition is a fully working re-implementation of Fallout 2, with the same original gameplay, engine bugfixes, and some quality of life improvements, that works (mostly) hassle-free on multiple platforms.
|
||||
|
||||
Popular Fallout 2 total conversion mods are partially supported. Original versions of Nevada and Sonora (that do not rely on extended features provided by Sfall) likely work, although there is no complete walkthrough confirmation yet. [Fallout 2 Restoration Project](https://github.com/BGforgeNet/Fallout2_Restoration_Project), [Fallout Et Tu](https://github.com/rotators/Fo1in2) and [Olympus 2207](https://olympus2207.com) are not yet supported. Other mods (particularly Resurrection and Yesterday) are not tested.
|
||||
|
||||
There is also [Fallout Community Edition](https://github.com/alexbatalov/fallout1-ce).
|
||||
|
||||
## 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 or build from source.
|
||||
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.
|
||||
|
||||
### Windows
|
||||
|
||||
@@ -36,13 +42,19 @@ $ sudo apt install libsdl2-2.0-0
|
||||
|
||||
### Android
|
||||
|
||||
> **NOTE**: Fallout 2 was designed with mouse in mind. There are many controls that require precise cursor positioning, which is not possible with fingers. When playing on Android you'll use fingers to move mouse cursor, not a character, or a map. Double tap to "click" left mouse button in the current cursor position, triple tap to "click" right mouse button. It might feel awkward at first, but it's super handy - you can play with just a thumb. This is not set in stone and might change in the future.
|
||||
> **NOTE**: Fallout 2 was designed with mouse in mind. There are many controls that require precise cursor positioning, which is not possible with fingers. Current control scheme resembles trackpad usage:
|
||||
- One finger moves mouse cursor around.
|
||||
- Tap one finger for left mouse click.
|
||||
- Tap two fingers for right mouse click (switches mouse cursor mode).
|
||||
- Move two fingers to scroll current view (map view, worldmap view, inventory scrollers).
|
||||
|
||||
- Use Windows installation as a base - it contains data assets needed to play. Copy `Fallout2` folder to your device, for example to `Downloads`. You need `master.dat`, `critter.dat`, `patch000.dat`, and `data` folder.
|
||||
> **NOTE**: From Android standpoint release and debug builds are different apps. Both apps require their own copy of game assets and have their own savegames. This is intentional. As a gamer just stick with release version and check for updates.
|
||||
|
||||
- Use Windows installation as a base - it contains data assets needed to play. Copy `Fallout2` folder to your device, for example to `Downloads`. You need `master.dat`, `critter.dat`, `patch000.dat`, and `data` folder. Watch for file names - keep (or make) them lowercased (see [Configuration](#configuration)).
|
||||
|
||||
- Download `fallout2-ce.apk` and copy it to your device. Open it with file explorer, follow instructions (install from unknown source).
|
||||
|
||||
- When you run the game for the first time it will immediately present file picker. Select the folder from the first step. Wait until this data is copied. A loading dialog will appear, just wait for about 30 seconds. The game will start automatically.
|
||||
- When you run the game for the first time it will immediately present file picker. Select the folder from the first step. Wait until this data is copied. A loading dialog will appear, just wait for about 30 seconds. If you're installing total conversion mod or localized version with a large number of unpacked resources in `data` folder it can take up to 20 minutes. Once copied, the game will start automatically.
|
||||
|
||||
### iOS
|
||||
|
||||
@@ -52,7 +64,31 @@ $ sudo apt install libsdl2-2.0-0
|
||||
|
||||
- Run the game once. You'll see error message saying "Couldn't find/load text fonts". This step is needed for iOS to expose the game via File Sharing feature.
|
||||
|
||||
- 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)).
|
||||
- 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)).
|
||||
|
||||
## 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`.
|
||||
|
||||
The `sound` folder (with `music` folder inside) might be located either in `data` folder, or be in the Fallout folder. Update `music_path1` setting to match your hierarchy, usually it's `data/sound/music/` or `sound/music/`. Make sure it matches your path exactly (so it might be `SOUND/MUSIC/` if you've installed Fallout from CD). Music files themselves (with `ACM` extension) should be all uppercased, regardless of `sound` and `music` folders.
|
||||
|
||||
The second configuration file is `f2_res.ini`. Use it to change game window size and enable/disable fullscreen mode.
|
||||
|
||||
```ini
|
||||
[MAIN]
|
||||
SCR_WIDTH=1280
|
||||
SCR_HEIGHT=720
|
||||
WINDOWED=1
|
||||
```
|
||||
|
||||
Recommendations:
|
||||
- **Desktops**: Use any size you see fit.
|
||||
- **Tablets**: Set these values to logical resolution of your device, for example iPad Pro 11 is 1668x2388 (pixels), but it's logical resolution is 834x1194 (points).
|
||||
- **Mobile phones**: Set height to 480, calculate width according to your device screen (aspect) ratio, for example Samsung S21 is 20:9 device, so the width should be 480 * 20 / 9 = 1067.
|
||||
|
||||
In time this stuff will receive in-game interface, right now you have to do it manually.
|
||||
|
||||
The third configuration file is `ddraw.ini` (part of Sfall). There are dozens of options that adjust or override engine behaviour and gameplay mechanics. This file is intended for modders and advanced users. Currently only a small subset of these settings are actually implemented.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ android {
|
||||
applicationId 'com.alexbatalov.fallout2ce'
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
versionCode 3
|
||||
versionName '1.2.0'
|
||||
versionCode 4
|
||||
versionName '1.3.0'
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
arguments '-DANDROID_STL=c++_static'
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1009 KiB |
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "AppIcon.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
+2
-6
@@ -8,8 +8,6 @@
|
||||
<string>${MACOSX_BUNDLE_DISPLAY_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
@@ -22,12 +20,12 @@
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.role-playing-games</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>11.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||
<true/>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
@@ -49,8 +47,6 @@
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
+3
-1
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${MACOSX_BUNDLE_DISPLAY_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
@@ -28,6 +28,8 @@
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.role-playing-games</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.11</string>
|
||||
<key>SDL_FILESYSTEM_BASE_DIR_TYPE</key>
|
||||
|
||||
+171
-168
File diff suppressed because it is too large
Load Diff
+8
-6
@@ -6,17 +6,19 @@
|
||||
|
||||
namespace fallout {
|
||||
|
||||
extern int rotation;
|
||||
|
||||
int _action_attack(Attack* attack);
|
||||
int _action_use_an_item_on_object(Object* a1, Object* a2, Object* a3);
|
||||
int _action_use_an_object(Object* a1, Object* a2);
|
||||
int _action_use_an_item_on_object(Object* user, Object* targetObj, Object* item);
|
||||
int _action_use_an_object(Object* user, Object* targetObj);
|
||||
int actionPickUp(Object* critter, Object* item);
|
||||
int _action_loot_container(Object* critter, Object* container);
|
||||
int _action_skill_use(int a1);
|
||||
int actionUseSkill(Object* a1, Object* a2, int skill);
|
||||
bool _is_hit_from_front(Object* a1, Object* a2);
|
||||
int _action_skill_use(int skill);
|
||||
int actionUseSkill(Object* user, Object* target, int skill);
|
||||
bool _is_hit_from_front(Object* attacker, Object* defender);
|
||||
bool _can_see(Object* a1, Object* a2);
|
||||
bool _action_explode_running();
|
||||
int actionExplode(int tile, int elevation, int minDamage, int maxDamage, Object* a5, bool a6);
|
||||
int actionExplode(int tile, int elevation, int minDamage, int maxDamage, Object* sourceObj, bool animate);
|
||||
int actionTalk(Object* a1, Object* a2);
|
||||
void actionDamage(int tile, int elevation, int minDamage, int maxDamage, int damageType, bool animated, bool bypassArmor);
|
||||
bool actionCheckPush(Object* a1, Object* a2);
|
||||
|
||||
+106
-104
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -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);
|
||||
@@ -145,8 +145,8 @@ int animationRegisterAnimateForever(Object* owner, int anim, int delay);
|
||||
int animationRegisterPing(int flags, int delay);
|
||||
int _make_path(Object* object, int from, int to, unsigned char* a4, int a5);
|
||||
int pathfinderFindPath(Object* object, int from, int to, unsigned char* rotations, int a5, PathBuilderCallback* callback);
|
||||
int _make_straight_path(Object* a1, int from, int to, StraightPathNode* straightPathNodeList, Object** obstaclePtr, int a6);
|
||||
int _make_straight_path_func(Object* a1, int from, int to, StraightPathNode* straightPathNodeList, Object** obstaclePtr, int a6, PathBuilderCallback* callback);
|
||||
int _make_straight_path(Object* object, int from, int to, StraightPathNode* straightPathNodeList, Object** obstaclePtr, int a6);
|
||||
int _make_straight_path_func(Object* object, int from, int to, StraightPathNode* straightPathNodeList, Object** obstaclePtr, int a6, PathBuilderCallback* callback);
|
||||
void _object_animate();
|
||||
int _check_move(int* actionPointsPtr);
|
||||
int _dude_move(int actionPoints);
|
||||
|
||||
+149
-119
File diff suppressed because it is too large
Load Diff
@@ -123,6 +123,7 @@ char* artGetObjectTypeName(int objectType);
|
||||
int artIsObjectTypeHidden(int objectType);
|
||||
int artGetFidgetCount(int headFid);
|
||||
void artRender(int fid, unsigned char* dest, int width, int height, int pitch);
|
||||
int art_list_str(int fid, char* name);
|
||||
Art* artLock(int fid, CacheEntry** cache_entry);
|
||||
unsigned char* artLockFrameData(int fid, int frame, int direction, CacheEntry** out_cache_entry);
|
||||
unsigned char* artLockFrameDataReturningSize(int fid, CacheEntry** out_cache_entry, int* widthPtr, int* heightPtr);
|
||||
@@ -146,7 +147,8 @@ bool _art_fid_valid(int fid);
|
||||
int _art_alias_num(int a1);
|
||||
int artCritterFidShouldRun(int a1);
|
||||
int artAliasFid(int fid);
|
||||
int buildFid(int objectType, int frmId, int animType, int a4, int rotation);
|
||||
int buildFid(int objectType, int frmId, int animType, int weaponCode, int rotation);
|
||||
Art* artLoad(const char* path);
|
||||
int artRead(const char* path, unsigned char* data);
|
||||
int artWrite(const char* path, unsigned char* data);
|
||||
|
||||
|
||||
+19
-39
@@ -7,7 +7,6 @@
|
||||
#include "db.h"
|
||||
#include "debug.h"
|
||||
#include "memory_manager.h"
|
||||
#include "pointer_registry.h"
|
||||
#include "sound.h"
|
||||
#include "sound_decoder.h"
|
||||
|
||||
@@ -20,7 +19,7 @@ typedef enum AudioFlags {
|
||||
|
||||
typedef struct Audio {
|
||||
int flags;
|
||||
int stream;
|
||||
File* stream;
|
||||
SoundDecoder* soundDecoder;
|
||||
int fileSize;
|
||||
int sampleRate;
|
||||
@@ -29,7 +28,7 @@ typedef struct Audio {
|
||||
} Audio;
|
||||
|
||||
static bool defaultCompressionFunc(char* filePath);
|
||||
static int audioSoundDecoderReadHandler(int fileHandle, void* buf, unsigned int size);
|
||||
static int audioSoundDecoderReadHandler(void* data, void* buf, unsigned int size);
|
||||
|
||||
// 0x5108BC
|
||||
static AudioQueryCompressedFunc* queryCompressedFunc = defaultCompressionFunc;
|
||||
@@ -44,7 +43,7 @@ static Audio* gAudioList;
|
||||
static bool defaultCompressionFunc(char* filePath)
|
||||
{
|
||||
char* pch = strrchr(filePath, '.');
|
||||
if (pch != NULL) {
|
||||
if (pch != nullptr) {
|
||||
strcpy(pch + 1, "raw");
|
||||
}
|
||||
|
||||
@@ -52,14 +51,14 @@ static bool defaultCompressionFunc(char* filePath)
|
||||
}
|
||||
|
||||
// 0x41A2D0
|
||||
static int audioSoundDecoderReadHandler(int handle, void* buffer, unsigned int size)
|
||||
static int audioSoundDecoderReadHandler(void* data, void* buffer, unsigned int size)
|
||||
{
|
||||
return fileRead(buffer, 1, size, (File*)intToPtr(handle));
|
||||
return fileRead(buffer, 1, size, reinterpret_cast<File*>(data));
|
||||
}
|
||||
|
||||
// AudioOpen
|
||||
// 0x41A2EC
|
||||
int audioOpen(const char* fname, int flags, ...)
|
||||
int audioOpen(const char* fname, int* sampleRate)
|
||||
{
|
||||
char path[80];
|
||||
snprintf(path, sizeof(path), "%s", fname);
|
||||
@@ -71,29 +70,8 @@ int audioOpen(const char* fname, int flags, ...)
|
||||
compression = 0;
|
||||
}
|
||||
|
||||
char mode[4];
|
||||
memset(mode, 0, 4);
|
||||
|
||||
// NOTE: Original implementation is slightly different, it uses separate
|
||||
// variable to track index where to set 't' and 'b'.
|
||||
char* pm = mode;
|
||||
if (flags & 1) {
|
||||
*pm++ = 'w';
|
||||
} else if (flags & 2) {
|
||||
*pm++ = 'w';
|
||||
*pm++ = '+';
|
||||
} else {
|
||||
*pm++ = 'r';
|
||||
}
|
||||
|
||||
if (flags & 0x100) {
|
||||
*pm++ = 't';
|
||||
} else if (flags & 0x200) {
|
||||
*pm++ = 'b';
|
||||
}
|
||||
|
||||
File* stream = fileOpen(path, mode);
|
||||
if (stream == NULL) {
|
||||
File* stream = fileOpen(path, "rb");
|
||||
if (stream == nullptr) {
|
||||
debugPrint("AudioOpen: Couldn't open %s for read\n", path);
|
||||
return -1;
|
||||
}
|
||||
@@ -106,7 +84,7 @@ int audioOpen(const char* fname, int flags, ...)
|
||||
}
|
||||
|
||||
if (index == gAudioListLength) {
|
||||
if (gAudioList != NULL) {
|
||||
if (gAudioList != nullptr) {
|
||||
gAudioList = (Audio*)internal_realloc_safe(gAudioList, sizeof(*gAudioList) * (gAudioListLength + 1), __FILE__, __LINE__); // "..\int\audio.c", 216
|
||||
} else {
|
||||
gAudioList = (Audio*)internal_malloc_safe(sizeof(*gAudioList), __FILE__, __LINE__); // "..\int\audio.c", 218
|
||||
@@ -116,12 +94,14 @@ int audioOpen(const char* fname, int flags, ...)
|
||||
|
||||
Audio* audioFile = &(gAudioList[index]);
|
||||
audioFile->flags = AUDIO_IN_USE;
|
||||
audioFile->stream = ptrToInt(stream);
|
||||
audioFile->stream = stream;
|
||||
|
||||
if (compression == 2) {
|
||||
audioFile->flags |= AUDIO_COMPRESSED;
|
||||
audioFile->soundDecoder = soundDecoderInit(audioSoundDecoderReadHandler, audioFile->stream, &(audioFile->channels), &(audioFile->sampleRate), &(audioFile->fileSize));
|
||||
audioFile->fileSize *= 2;
|
||||
|
||||
*sampleRate = audioFile->sampleRate;
|
||||
} else {
|
||||
audioFile->fileSize = fileGetSize(stream);
|
||||
}
|
||||
@@ -135,7 +115,7 @@ int audioOpen(const char* fname, int flags, ...)
|
||||
int audioClose(int handle)
|
||||
{
|
||||
Audio* audioFile = &(gAudioList[handle - 1]);
|
||||
fileClose((File*)intToPtr(audioFile->stream, true));
|
||||
fileClose(audioFile->stream);
|
||||
|
||||
if ((audioFile->flags & AUDIO_COMPRESSED) != 0) {
|
||||
soundDecoderFree(audioFile->soundDecoder);
|
||||
@@ -155,7 +135,7 @@ int audioRead(int handle, void* buffer, unsigned int size)
|
||||
if ((audioFile->flags & AUDIO_COMPRESSED) != 0) {
|
||||
bytesRead = soundDecoderDecode(audioFile->soundDecoder, buffer, size);
|
||||
} else {
|
||||
bytesRead = fileRead(buffer, 1, size, (File*)intToPtr(audioFile->stream));
|
||||
bytesRead = fileRead(buffer, 1, size, audioFile->stream);
|
||||
}
|
||||
|
||||
audioFile->position += bytesRead;
|
||||
@@ -189,7 +169,7 @@ long audioSeek(int handle, long offset, int origin)
|
||||
if ((audioFile->flags & AUDIO_COMPRESSED) != 0) {
|
||||
if (pos < audioFile->position) {
|
||||
soundDecoderFree(audioFile->soundDecoder);
|
||||
fileSeek((File*)intToPtr(audioFile->stream), 0, SEEK_SET);
|
||||
fileSeek(audioFile->stream, 0, SEEK_SET);
|
||||
audioFile->soundDecoder = soundDecoderInit(audioSoundDecoderReadHandler, audioFile->stream, &(audioFile->channels), &(audioFile->sampleRate), &(audioFile->fileSize));
|
||||
audioFile->position = 0;
|
||||
audioFile->fileSize *= 2;
|
||||
@@ -224,7 +204,7 @@ long audioSeek(int handle, long offset, int origin)
|
||||
|
||||
return audioFile->position;
|
||||
} else {
|
||||
return fileSeek((File*)intToPtr(audioFile->stream), offset, origin);
|
||||
return fileSeek(audioFile->stream, offset, origin);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +234,7 @@ int audioWrite(int handle, const void* buf, unsigned int size)
|
||||
int audioInit(AudioQueryCompressedFunc* func)
|
||||
{
|
||||
queryCompressedFunc = func;
|
||||
gAudioList = NULL;
|
||||
gAudioList = nullptr;
|
||||
gAudioListLength = 0;
|
||||
|
||||
return soundSetDefaultFileIO(audioOpen, audioClose, audioRead, audioWrite, audioSeek, audioTell, audioGetSize);
|
||||
@@ -263,12 +243,12 @@ int audioInit(AudioQueryCompressedFunc* func)
|
||||
// 0x41A818
|
||||
void audioExit()
|
||||
{
|
||||
if (gAudioList != NULL) {
|
||||
if (gAudioList != nullptr) {
|
||||
internal_free_safe(gAudioList, __FILE__, __LINE__); // "..\int\audio.c", 406
|
||||
}
|
||||
|
||||
gAudioListLength = 0;
|
||||
gAudioList = NULL;
|
||||
gAudioList = nullptr;
|
||||
}
|
||||
|
||||
} // namespace fallout
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ namespace fallout {
|
||||
|
||||
typedef bool(AudioQueryCompressedFunc)(char* filePath);
|
||||
|
||||
int audioOpen(const char* fname, int mode, ...);
|
||||
int audioOpen(const char* fname, int* sampleRate);
|
||||
int audioClose(int handle);
|
||||
int audioRead(int handle, void* buffer, unsigned int size);
|
||||
long audioSeek(int handle, long offset, int origin);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user