mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
Merge branch 'master' into betamatches
This commit is contained in:
commit
0e36cca6b2
27
.github/workflows/analyze.yml
vendored
27
.github/workflows/analyze.yml
vendored
@ -1,9 +1,6 @@
|
|||||||
name: Analyze
|
name: Analyze
|
||||||
|
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
decomplint-isle:
|
decomplint-isle:
|
||||||
@ -18,18 +15,16 @@ jobs:
|
|||||||
- LEGO1
|
- LEGO1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Python
|
- uses: actions/setup-python@v5
|
||||||
uses: actions/setup-python@v5
|
with:
|
||||||
with:
|
python-version: '3.12'
|
||||||
python-version: '3.13'
|
|
||||||
|
|
||||||
- name: Setup Python modules
|
- name: Install python libraries
|
||||||
run: |
|
run: |
|
||||||
pip install -r tools/requirements.txt
|
pip install -r tools/requirements.txt
|
||||||
|
|
||||||
- name: Run decomplint.py
|
- name: Run decomplint.py
|
||||||
run: |
|
run: |
|
||||||
reccmp-decomplint ${{ matrix.who }} --module ${{ matrix.who }} --warnfail
|
reccmp-decomplint ${{ matrix.who }} --module ${{ matrix.who }} --warnfail
|
||||||
|
|||||||
268
.github/workflows/build.yml
vendored
268
.github/workflows/build.yml
vendored
@ -1,9 +1,6 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fetch-deps:
|
fetch-deps:
|
||||||
@ -20,15 +17,12 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
toolchain:
|
toolchain:
|
||||||
- { name: 'MSVC', shell: 'sh', setup-cmake: true, setup-ninja: true, setup-msvc: true }
|
- { name: 'MSVC', shell: 'sh', setup-cmake: true, setup-ninja: true, setup-msvc: true }
|
||||||
- { name: 'msys2 mingw32', shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, clang-tidy: true, werror: true }
|
- { name: 'msys2 mingw32', shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, clang-tidy: true, werror: true }
|
||||||
- { name: 'msys2 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true, werror: true, no-dx5-libs: true }
|
- { name: 'msys2 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true, werror: true, no-dx5-libs: true }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Set up MSYS2
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup MSYS2
|
|
||||||
if: ${{ !!matrix.toolchain.msystem }}
|
if: ${{ !!matrix.toolchain.msystem }}
|
||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
@ -39,19 +33,21 @@ jobs:
|
|||||||
${{ matrix.toolchain.msys-env }}-ninja
|
${{ matrix.toolchain.msys-env }}-ninja
|
||||||
${{ matrix.toolchain.msys-env }}-clang-tools-extra
|
${{ matrix.toolchain.msys-env }}-clang-tools-extra
|
||||||
|
|
||||||
- name: Setup CMake
|
- name: Setup cmake
|
||||||
if: matrix.toolchain.setup-cmake
|
if: matrix.toolchain.setup-cmake
|
||||||
uses: jwlawson/actions-setup-cmake@v2
|
uses: jwlawson/actions-setup-cmake@v2
|
||||||
|
|
||||||
- name: Setup ninja
|
- name: Setup ninja
|
||||||
if: matrix.toolchain.setup-ninja
|
if: matrix.toolchain.setup-ninja
|
||||||
uses: larziwau/gha-setup-ninja@master
|
uses: ashutoshvarma/setup-ninja@master
|
||||||
|
|
||||||
- name: Setup vcvars
|
- name: Setup vcvars
|
||||||
if: matrix.toolchain.setup-msvc
|
if: matrix.toolchain.setup-msvc
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
with:
|
with:
|
||||||
arch: amd64_x86
|
arch: amd64_x86 # Use the 64-bit x64-native cross tools to build 32-bit x86 code
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@ -64,129 +60,126 @@ jobs:
|
|||||||
cmake --build build -- -k0
|
cmake --build build -- -k0
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: MSVC 4.20
|
name: 'MSVC 4.20'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Checkout MSVC repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
with:
|
||||||
with:
|
repository: itsmattkc/msvc420
|
||||||
repository: itsmattkc/MSVC420
|
path: msvc420
|
||||||
path: msvc420
|
|
||||||
|
|
||||||
- name: Setup CMake
|
- name: Setup cmake
|
||||||
uses: jwlawson/actions-setup-cmake@v2
|
uses: jwlawson/actions-setup-cmake@v2
|
||||||
with:
|
with:
|
||||||
cmake-version: '3.31.x'
|
# Use minimum supported version
|
||||||
|
cmake-version: '3.15.x'
|
||||||
|
|
||||||
- name: Patch MSVC
|
- name: Patch MSVC 4.2
|
||||||
run: |
|
run: |
|
||||||
tools/patch_c2.py msvc420/bin/C2.EXE
|
tools/patch_c2.py msvc420/bin/C2.EXE
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
call .\msvc420\bin\VCVARS32.BAT x86
|
call .\msvc420\bin\VCVARS32.BAT x86
|
||||||
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles"
|
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles"
|
||||||
cmake --build build
|
cmake --build build
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@main
|
||||||
with:
|
with:
|
||||||
name: Win32
|
name: Win32
|
||||||
path: |
|
path: |
|
||||||
build/CONFIG.EXE
|
build/CONFIG.EXE
|
||||||
build/CONFIG.PDB
|
build/CONFIG.PDB
|
||||||
build/ISLE.EXE
|
build/ISLE.EXE
|
||||||
build/ISLE.PDB
|
build/ISLE.PDB
|
||||||
build/LEGO1.DLL
|
build/LEGO1.DLL
|
||||||
build/LEGO1.PDB
|
build/LEGO1.PDB
|
||||||
|
|
||||||
compare:
|
compare:
|
||||||
name: Compare with master
|
name: Compare with master
|
||||||
needs: [build, fetch-deps]
|
needs: [build, fetch-deps]
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@main
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Python
|
- uses: actions/setup-python@v5
|
||||||
uses: actions/setup-python@v5
|
with:
|
||||||
with:
|
python-version: '3.12'
|
||||||
python-version: '3.13'
|
|
||||||
|
|
||||||
- name: Download artifact
|
- uses: actions/download-artifact@main
|
||||||
uses: actions/download-artifact@v4
|
with:
|
||||||
with:
|
name: Win32
|
||||||
name: Win32
|
path: build
|
||||||
path: build
|
|
||||||
|
|
||||||
- name: Restore cached original binaries
|
- name: Restore cached original binaries
|
||||||
id: cache-original-binaries
|
id: cache-original-binaries
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
enableCrossOsArchive: true
|
enableCrossOsArchive: true
|
||||||
path: legobin
|
path: legobin
|
||||||
key: legobin
|
key: legobin
|
||||||
|
|
||||||
- name: Setup Python modules
|
- name: Install python packages
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
pip install -r tools/requirements.txt
|
pip install -r tools/requirements.txt
|
||||||
|
|
||||||
- name: Detect binaries
|
- name: Detect binaries
|
||||||
run: |
|
run: |
|
||||||
reccmp-project detect --what original --search-path legobin
|
reccmp-project detect --what original --search-path legobin
|
||||||
reccmp-project detect --what recompiled --search-path build
|
reccmp-project detect --what recompiled --search-path build
|
||||||
|
|
||||||
- name: Summarize accuracy
|
- name: Summarize Accuracy
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
reccmp-reccmp -S CONFIGPROGRESS.SVG --svg-icon assets/config.png --target CONFIG | tee CONFIGPROGRESS.TXT
|
reccmp-reccmp -S CONFIGPROGRESS.SVG --svg-icon assets/config.png --target CONFIG | tee CONFIGPROGRESS.TXT
|
||||||
reccmp-reccmp -S ISLEPROGRESS.SVG --svg-icon assets/isle.png --target ISLE | tee ISLEPROGRESS.TXT
|
reccmp-reccmp -S ISLEPROGRESS.SVG --svg-icon assets/isle.png --target ISLE | tee ISLEPROGRESS.TXT
|
||||||
reccmp-reccmp -S LEGO1PROGRESS.SVG --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
|
reccmp-reccmp -S LEGO1PROGRESS.SVG --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
|
||||||
|
|
||||||
- name: Compare accuracy with current master
|
- name: Compare Accuracy With Current Master
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
curl -fLSs -o CONFIGPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/CONFIGPROGRESS.TXT || echo "" >CONFIGPROGRESS-OLD.TXT
|
# Compare with current master
|
||||||
curl -fLSs -o ISLEPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/ISLEPROGRESS.TXT || echo "" >ISLEPROGRESS-OLD.TXT
|
curl -fLSs -o CONFIGPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/CONFIGPROGRESS.TXT || echo "" >CONFIGPROGRESS-OLD.TXT
|
||||||
curl -fLSs -o LEGO1PROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/LEGO1PROGRESS.TXT || echo "" >LEGO1PROGRESS-OLD.TXT
|
curl -fLSs -o ISLEPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/ISLEPROGRESS.TXT || echo "" >ISLEPROGRESS-OLD.TXT
|
||||||
|
curl -fLSs -o LEGO1PROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/LEGO1PROGRESS.TXT || echo "" >LEGO1PROGRESS-OLD.TXT
|
||||||
|
|
||||||
diff -u0 CONFIGPROGRESS-OLD.TXT CONFIGPROGRESS.TXT || true
|
diff -u0 CONFIGPROGRESS-OLD.TXT CONFIGPROGRESS.TXT || true
|
||||||
diff -u0 ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
|
diff -u0 ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
|
||||||
diff -u0 LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.TXT || true
|
diff -u0 LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.TXT || true
|
||||||
|
|
||||||
- name: Test exports
|
- name: Test Exports
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
reccmp-verexp --target LEGO1
|
reccmp-verexp --target LEGO1
|
||||||
|
|
||||||
- name: Check vtables
|
- name: Check Vtables
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
reccmp-vtable --target CONFIG
|
reccmp-vtable --target CONFIG
|
||||||
reccmp-vtable --target ISLE
|
reccmp-vtable --target ISLE
|
||||||
reccmp-vtable --target LEGO1
|
reccmp-vtable --target LEGO1
|
||||||
|
|
||||||
- name: Check variables
|
- name: Check Variables
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
reccmp-datacmp --target CONFIG
|
reccmp-datacmp --target CONFIG
|
||||||
reccmp-datacmp --target ISLE
|
reccmp-datacmp --target ISLE
|
||||||
reccmp-datacmp --target LEGO1
|
reccmp-datacmp --target LEGO1
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@main
|
||||||
with:
|
with:
|
||||||
name: Accuracy Report
|
name: Accuracy Report
|
||||||
path: |
|
path: |
|
||||||
CONFIGPROGRESS.*
|
CONFIGPROGRESS.*
|
||||||
ISLEPROGRESS.*
|
ISLEPROGRESS.*
|
||||||
LEGO1PROGRESS.*
|
LEGO1PROGRESS.*
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
name: Upload artifacts
|
name: Upload artifacts
|
||||||
@ -194,35 +187,32 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle' }}
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout uploadtool repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
with:
|
||||||
with:
|
repository: probonopd/uploadtool
|
||||||
repository: probonopd/uploadtool
|
|
||||||
|
|
||||||
- name: Download build artifact
|
- uses: actions/download-artifact@main
|
||||||
uses: actions/download-artifact@v4
|
with:
|
||||||
with:
|
name: Win32
|
||||||
name: Win32
|
path: build
|
||||||
path: build
|
|
||||||
|
|
||||||
- name: Download accuracy report artifact
|
- uses: actions/download-artifact@main
|
||||||
uses: actions/download-artifact@v4
|
with:
|
||||||
with:
|
name: Accuracy Report
|
||||||
name: Accuracy Report
|
|
||||||
|
|
||||||
- name: Upload continuous release
|
- name: Upload Continuous Release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}
|
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}
|
||||||
run: |
|
run: |
|
||||||
./upload.sh \
|
./upload.sh \
|
||||||
build/CONFIG.EXE \
|
build/CONFIG.EXE \
|
||||||
build/ISLE.EXE \
|
build/ISLE.EXE \
|
||||||
build/LEGO1.DLL \
|
build/LEGO1.DLL \
|
||||||
CONFIGPROGRESS.* \
|
CONFIGPROGRESS.* \
|
||||||
ISLEPROGRESS.* \
|
ISLEPROGRESS.* \
|
||||||
LEGO1PROGRESS.*
|
LEGO1PROGRESS.*
|
||||||
|
|
||||||
curl -X POST -F key=$UPLOAD_KEY -F 'file=@CONFIGPROGRESS.SVG' https://legoisland.org/progress/
|
curl -X POST -F key=$UPLOAD_KEY -F 'file=@CONFIGPROGRESS.SVG' https://legoisland.org/progress/
|
||||||
curl -X POST -F key=$UPLOAD_KEY -F 'file=@ISLEPROGRESS.SVG' https://legoisland.org/progress/
|
curl -X POST -F key=$UPLOAD_KEY -F 'file=@ISLEPROGRESS.SVG' https://legoisland.org/progress/
|
||||||
curl -X POST -F key=$UPLOAD_KEY -F 'file=@LEGO1PROGRESS.SVG' https://legoisland.org/progress/
|
curl -X POST -F key=$UPLOAD_KEY -F 'file=@LEGO1PROGRESS.SVG' https://legoisland.org/progress/
|
||||||
|
|||||||
22
.github/workflows/format.yml
vendored
22
.github/workflows/format.yml
vendored
@ -1,9 +1,6 @@
|
|||||||
name: Format
|
name: Format
|
||||||
|
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clang-format:
|
clang-format:
|
||||||
@ -11,13 +8,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Run clang-format
|
- name: Run clang-format
|
||||||
run: |
|
run: |
|
||||||
find CONFIG LEGO1 ISLE -iname '*.h' -o -iname '*.cpp' | xargs \
|
find CONFIG LEGO1 ISLE -iname '*.h' -o -iname '*.cpp' | xargs \
|
||||||
pipx run "clang-format>=17,<18" \
|
pipx run "clang-format>=17,<18" \
|
||||||
--style=file \
|
--style=file \
|
||||||
-i
|
-i
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
|
|||||||
42
.github/workflows/legobin.yml
vendored
42
.github/workflows/legobin.yml
vendored
@ -2,31 +2,31 @@ name: Download legobin
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fetch:
|
fetch:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Restore cached original binaries
|
|
||||||
id: cache-original-binaries
|
|
||||||
uses: actions/cache/restore@v4
|
|
||||||
with:
|
|
||||||
enableCrossOsArchive: true
|
|
||||||
path: legobin
|
|
||||||
key: legobin
|
|
||||||
|
|
||||||
- name: Download original Island binaries
|
- name: Restore cached original binaries
|
||||||
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
|
id: cache-original-binaries
|
||||||
run: |
|
uses: actions/cache/restore@v4
|
||||||
wget https://legoisland.org/download/CONFIG.EXE --directory-prefix=legobin
|
with:
|
||||||
wget https://legoisland.org/download/ISLE.EXE --directory-prefix=legobin
|
enableCrossOsArchive: true
|
||||||
wget https://legoisland.org/download/LEGO1.DLL --directory-prefix=legobin
|
path: legobin
|
||||||
|
key: legobin
|
||||||
|
|
||||||
- name: Cache original binaries
|
- name: Download original island binaries
|
||||||
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
|
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
|
||||||
uses: actions/cache/save@v4
|
run: |
|
||||||
with:
|
wget https://legoisland.org/download/CONFIG.EXE --directory-prefix=legobin
|
||||||
enableCrossOsArchive: true
|
wget https://legoisland.org/download/ISLE.EXE --directory-prefix=legobin
|
||||||
path: legobin
|
wget https://legoisland.org/download/LEGO1.DLL --directory-prefix=legobin
|
||||||
key: legobin
|
|
||||||
|
- name: Cache original binaries
|
||||||
|
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
enableCrossOsArchive: true
|
||||||
|
path: legobin
|
||||||
|
key: legobin
|
||||||
|
|||||||
71
.github/workflows/naming.yml
vendored
71
.github/workflows/naming.yml
vendored
@ -1,9 +1,6 @@
|
|||||||
name: Naming
|
name: Naming
|
||||||
|
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ncc:
|
ncc:
|
||||||
@ -11,42 +8,40 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup LLVM and Clang
|
- name: Install LLVM and Clang
|
||||||
uses: KyleMayes/install-llvm-action@v2
|
uses: KyleMayes/install-llvm-action@v2
|
||||||
with:
|
with:
|
||||||
version: '16'
|
version: '16'
|
||||||
|
|
||||||
- name: Setup Python
|
- uses: actions/setup-python@v5
|
||||||
uses: actions/setup-python@v5
|
with:
|
||||||
with:
|
python-version: '3.12'
|
||||||
python-version: '3.13'
|
|
||||||
|
|
||||||
- name: Setup Python modules
|
- name: Install python libraries
|
||||||
run: |
|
run: |
|
||||||
pip install -r tools/requirements.txt
|
pip install -r tools/requirements.txt
|
||||||
|
|
||||||
- name: Run ncc
|
- name: Run ncc
|
||||||
run: |
|
run: |
|
||||||
action_headers=$(find LEGO1/lego/legoomni/include/actions \
|
action_headers=$(find LEGO1/lego/legoomni/include/actions \
|
||||||
-name '*.h' -print0 | xargs -0 echo)
|
-name '*.h' -print0 | xargs -0 echo)
|
||||||
|
|
||||||
python3 tools/ncc/ncc.py \
|
python3 tools/ncc/ncc.py \
|
||||||
--clang-lib ${{ env.LLVM_PATH }}/lib/libclang.so \
|
--clang-lib ${{ env.LLVM_PATH }}/lib/libclang.so \
|
||||||
--recurse \
|
--recurse \
|
||||||
--style tools/ncc/ncc.style \
|
--style tools/ncc/ncc.style \
|
||||||
--skip tools/ncc/skip.yml \
|
--skip tools/ncc/skip.yml \
|
||||||
--definition WINAPI FAR BOOL CALLBACK HWND__=HWND \
|
--definition WINAPI FAR BOOL CALLBACK HWND__=HWND \
|
||||||
--include \
|
--include \
|
||||||
util \
|
util \
|
||||||
LEGO1 \
|
LEGO1 \
|
||||||
LEGO1/omni/include \
|
LEGO1/omni/include \
|
||||||
LEGO1/lego/legoomni/include \
|
LEGO1/lego/legoomni/include \
|
||||||
LEGO1/lego/sources \
|
LEGO1/lego/sources \
|
||||||
--exclude \
|
--exclude \
|
||||||
LEGO1/omni/include/flic.h \
|
LEGO1/omni/include/flic.h \
|
||||||
LEGO1/omni/src/video/flic.cpp \
|
LEGO1/omni/src/video/flic.cpp \
|
||||||
$action_headers \
|
$action_headers \
|
||||||
--path LEGO1/omni LEGO1/lego/legoomni
|
--path LEGO1/omni LEGO1/lego/legoomni
|
||||||
|
|||||||
@ -444,6 +444,8 @@ MxS32 Act2Actor::VTable0xa0()
|
|||||||
{
|
{
|
||||||
undefined4 newLocation;
|
undefined4 newLocation;
|
||||||
|
|
||||||
|
assert(!m_grec);
|
||||||
|
|
||||||
CurrentWorld();
|
CurrentWorld();
|
||||||
MxU16 randomVal = rand() / (RAND_MAX / 2) + 1;
|
MxU16 randomVal = rand() / (RAND_MAX / 2) + 1;
|
||||||
|
|
||||||
|
|||||||
@ -8,88 +8,88 @@ DECOMP_SIZE_ASSERT(LegoActorLOD, 0x58)
|
|||||||
|
|
||||||
// GLOBAL: LEGO1 0x100da3b0
|
// GLOBAL: LEGO1 0x100da3b0
|
||||||
LegoActorLOD g_actorLODs[] = {
|
LegoActorLOD g_actorLODs[] = {
|
||||||
{"top", "top", 0, 0.000267, 0.780808, -0.01906, 0.951612, -0.461166, -0.002794, -0.299442, 0.4617,
|
{"top", "top", 0, 0.000267f, 0.780808f, -0.01906f, 0.951612f, -0.461166f, -0.002794f, -0.299442f, 0.4617f,
|
||||||
1.56441, 0.261321, 0, 0, 0, 0, 0, 1, 0, 1, 0},
|
1.56441f, 0.261321f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f},
|
||||||
{"body", "body", LegoActorLOD::c_flag1,
|
{"body", "body", LegoActorLOD::c_flag1,
|
||||||
0.00158332, 0.401828, -0.00048697,
|
0.00158332f, 0.401828f, -0.00048697f,
|
||||||
0.408071, -0.287507, 0.150419,
|
0.408071f, -0.287507f, 0.150419f,
|
||||||
-0.147452, 0.289219, 0.649774,
|
-0.147452f, 0.289219f, 0.649774f,
|
||||||
0.14258, -0.00089, 0.436353,
|
0.14258f, -0.00089f, 0.436353f,
|
||||||
0.007277, 0, 0,
|
0.007277f, 0.0f, 0.0f,
|
||||||
1, 0, 1,
|
1.0f, 0.0f, 1.0f,
|
||||||
0},
|
0.0f},
|
||||||
{"infohat", "infohat", LegoActorLOD::c_flag2,
|
{"infohat", "infohat", LegoActorLOD::c_flag2,
|
||||||
0, -0.00938, -0.01955,
|
0.0f, -0.00938f, -0.01955f,
|
||||||
0.35, -0.231822, -0.140237,
|
0.35f, -0.231822f, -0.140237f,
|
||||||
-0.320954, 0.234149, 0.076968,
|
-0.320954f, 0.234149f, 0.076968f,
|
||||||
0.249083, 0.000191, 1.519793,
|
0.249083f, 0.000191f, 1.519793f,
|
||||||
0.001767, 0, 0,
|
0.001767f, 0.0f, 0.0f,
|
||||||
1, 0, 1,
|
1.0f, 0.0f, 1.0f,
|
||||||
0},
|
0.0f},
|
||||||
{"infogron", "infogron", LegoActorLOD::c_flag2,
|
{"infogron", "infogron", LegoActorLOD::c_flag2,
|
||||||
0, 0.11477, 0.00042,
|
0.0f, 0.11477f, 0.00042f,
|
||||||
0.26, -0.285558, -0.134391,
|
0.26f, -0.285558f, -0.134391f,
|
||||||
-0.142231, 0.285507, 0.152986,
|
-0.142231f, 0.285507f, 0.152986f,
|
||||||
0.143071, -0.00089, 0.436353,
|
0.143071f, -0.00089f, 0.436353f,
|
||||||
0.007277, 0, 0,
|
0.007277f, 0.0f, 0.0f,
|
||||||
1, 0, 1,
|
1.0f, 0.0f, 1.0f,
|
||||||
0},
|
0.0f},
|
||||||
{"head", "head", LegoActorLOD::c_flag1,
|
{"head", "head", LegoActorLOD::c_flag1,
|
||||||
0, -0.03006, 0,
|
0.0f, -0.03006f, 0.0f,
|
||||||
0.3, -0.189506, -0.209665,
|
0.3f, -0.189506f, -0.209665f,
|
||||||
-0.189824, 0.189532, 0.228822,
|
-0.189824f, 0.189532f, 0.228822f,
|
||||||
0.194945, -0.00105, 1.293115,
|
0.194945f, -0.00105f, 1.293115f,
|
||||||
0.001781, 0, 0,
|
0.001781f, 0.0f, 0.0f,
|
||||||
1, 0, 1,
|
1.0f, 0.0f, 1.0f,
|
||||||
0},
|
0.0f},
|
||||||
{"arm-lft", "arm-lft", LegoActorLOD::c_flag2,
|
{"arm-lft", "arm-lft", LegoActorLOD::c_flag2,
|
||||||
-0.06815, -0.0973747, 0.0154655,
|
-0.06815f, -0.0973747f, 0.0154655f,
|
||||||
0.237, -0.137931, -0.282775,
|
0.237f, -0.137931f, -0.282775f,
|
||||||
-0.105316, 0.000989, 0.100221,
|
-0.105316f, 0.000989f, 0.100221f,
|
||||||
0.140759, -0.225678, 0.963312,
|
0.140759f, -0.225678f, 0.963312f,
|
||||||
0.023286, -0.003031, -0.017187,
|
0.023286f, -0.003031f, -0.017187f,
|
||||||
0.999848, 0.173622, 0.984658,
|
0.999848f, 0.173622f, 0.984658f,
|
||||||
0.017453},
|
0.017453f},
|
||||||
{"arm-rt", "arm-rt", LegoActorLOD::c_flag2,
|
{"arm-rt", "arm-rt", LegoActorLOD::c_flag2,
|
||||||
0.0680946, -0.097152, 0.0152722,
|
0.0680946f, -0.097152f, 0.0152722f,
|
||||||
0.237, 0.00141, -0.289604,
|
0.237f, 0.00141f, -0.289604f,
|
||||||
-0.100831, 0.138786, 0.09291,
|
-0.100831f, 0.138786f, 0.09291f,
|
||||||
0.145437, 0.223494, 0.963583,
|
0.145437f, 0.223494f, 0.963583f,
|
||||||
0.018302, 0, 0,
|
0.018302f, 0.0f, 0.0f,
|
||||||
1, -0.173648, 0.984808,
|
1.0f, -0.173648f, 0.984808f,
|
||||||
0},
|
0.0f},
|
||||||
{"claw-lft", "claw-lft", LegoActorLOD::c_flag2,
|
{"claw-lft", "claw-lft", LegoActorLOD::c_flag2,
|
||||||
0.000773381, -0.101422, -0.0237761,
|
0.000773381f, -0.101422f, -0.0237761f,
|
||||||
0.15, -0.089838, -0.246208,
|
0.15f, -0.089838f, -0.246208f,
|
||||||
-0.117735, 0.091275, 0.000263,
|
-0.117735f, 0.091275f, 0.000263f,
|
||||||
0.07215, -0.341869, 0.700355,
|
0.07215f, -0.341869f, 0.700355f,
|
||||||
0.092779, 0.000001, 0.000003,
|
0.092779f, 0.000001f, 0.000003f,
|
||||||
1, 0.190812, 0.981627,
|
1.0f, 0.190812f, 0.981627f,
|
||||||
-0.000003},
|
-0.000003f},
|
||||||
{"claw-rt", "claw-lft", LegoActorLOD::c_flag2,
|
{"claw-rt", "claw-lft", LegoActorLOD::c_flag2,
|
||||||
0.000773381, -0.101422, -0.0237761,
|
0.000773381f, -0.101422f, -0.0237761f,
|
||||||
0.15, -0.095016, -0.245349,
|
0.15f, -0.095016f, -0.245349f,
|
||||||
-0.117979, 0.086528, 0.00067,
|
-0.117979f, 0.086528f, 0.00067f,
|
||||||
0.069743, 0.343317, 0.69924,
|
0.069743f, 0.343317f, 0.69924f,
|
||||||
0.096123, 0.00606, -0.034369,
|
0.096123f, 0.00606f, -0.034369f,
|
||||||
0.999391, -0.190704, 0.981027,
|
0.999391f, -0.190704f, 0.981027f,
|
||||||
0.034894},
|
0.034894f},
|
||||||
{"leg-lft", "leg", LegoActorLOD::c_flag2,
|
{"leg-lft", "leg", LegoActorLOD::c_flag2,
|
||||||
0.00433584, -0.177404, -0.0313928,
|
0.00433584f, -0.177404f, -0.0313928f,
|
||||||
0.33, -0.129782, -0.440428,
|
0.33f, -0.129782f, -0.440428f,
|
||||||
-0.184207, 0.13817, 0.118415,
|
-0.184207f, 0.13817f, 0.118415f,
|
||||||
0.122607, -0.156339, 0.436087,
|
0.122607f, -0.156339f, 0.436087f,
|
||||||
0.006822, 0, 0,
|
0.006822f, 0.0f, 0.0f,
|
||||||
1, 0, 1,
|
1.0f, 0.0f, 1.0f,
|
||||||
0},
|
0.0f},
|
||||||
{"leg-rt", "leg", LegoActorLOD::c_flag2,
|
{"leg-rt", "leg", LegoActorLOD::c_flag2,
|
||||||
0.00433584, -0.177404, -0.0313928,
|
0.00433584f, -0.177404f, -0.0313928f,
|
||||||
0.33, -0.132864, -0.437138,
|
0.33f, -0.132864f, -0.437138f,
|
||||||
-0.183944, 0.134614, 0.12043,
|
-0.183944f, 0.134614f, 0.12043f,
|
||||||
0.121888, 0.151154, 0.436296,
|
0.121888f, 0.151154f, 0.436296f,
|
||||||
0.007373, 0, 0,
|
0.007373f, 0.0f, 0.0f,
|
||||||
1, 0, 1,
|
1.0f, 0.0f, 1.0f,
|
||||||
0}
|
0.0f}
|
||||||
};
|
};
|
||||||
|
|
||||||
// GLOBAL: LEGO1 0x100da778
|
// GLOBAL: LEGO1 0x100da778
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -183,6 +183,7 @@ void LegoAnimActor::ClearMaps()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x1001c870
|
// FUNCTION: LEGO1 0x1001c870
|
||||||
|
// FUNCTION: BETA10 0x1003e7e4
|
||||||
void LegoAnimActor::SetWorldSpeed(MxFloat p_worldSpeed)
|
void LegoAnimActor::SetWorldSpeed(MxFloat p_worldSpeed)
|
||||||
{
|
{
|
||||||
if (p_worldSpeed < 0) {
|
if (p_worldSpeed < 0) {
|
||||||
|
|||||||
@ -138,7 +138,7 @@ class LegoFile : public LegoStorage {
|
|||||||
const char* data = p_str.GetData();
|
const char* data = p_str.GetData();
|
||||||
LegoU32 fullLength = strlen(data);
|
LegoU32 fullLength = strlen(data);
|
||||||
|
|
||||||
LegoU16 limitedLength = fullLength;
|
LegoU16 limitedLength = (LegoU16) fullLength;
|
||||||
Write(&limitedLength, sizeof(limitedLength));
|
Write(&limitedLength, sizeof(limitedLength));
|
||||||
Write((char*) data, (LegoS16) fullLength);
|
Write((char*) data, (LegoS16) fullLength);
|
||||||
|
|
||||||
|
|||||||
@ -197,13 +197,13 @@ inline int UnknownMx4DPointFloat::FUN_100040a0(Vector4& p_v, float p_f)
|
|||||||
{
|
{
|
||||||
if (m_unk0x30 == c_bit1) {
|
if (m_unk0x30 == c_bit1) {
|
||||||
p_v = m_unk0x00;
|
p_v = m_unk0x00;
|
||||||
p_v[3] = (1.0 - p_f) * acos((double) p_v[3]) * 2.0;
|
p_v[3] = (float) ((1.0 - p_f) * acos((double) p_v[3]) * 2.0);
|
||||||
return p_v.NormalizeQuaternion();
|
return p_v.NormalizeQuaternion();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_unk0x30 == c_bit2) {
|
if (m_unk0x30 == c_bit2) {
|
||||||
p_v = m_unk0x18;
|
p_v = m_unk0x18;
|
||||||
p_v[3] = p_f * acos((double) p_v[3]) * 2.0;
|
p_v[3] = (float) (p_f * acos((double) p_v[3]) * 2.0);
|
||||||
return p_v.NormalizeQuaternion();
|
return p_v.NormalizeQuaternion();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ inline int UnknownMx4DPointFloat::FUN_100040a0(Vector4& p_v, float p_f)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
p_v[i] = m_unk0x00[i] * a + m_unk0x18[i] * b;
|
p_v[i] = (float) (m_unk0x00[i] * a + m_unk0x18[i] * b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -238,7 +238,7 @@ inline int UnknownMx4DPointFloat::FUN_100040a0(Vector4& p_v, float p_f)
|
|||||||
b = sin(p_f * 1.570796326794895);
|
b = sin(p_f * 1.570796326794895);
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
p_v[i] = m_unk0x00[i] * a + p_v[i] * b;
|
p_v[i] = (float) (m_unk0x00[i] * a + p_v[i] * b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -206,7 +206,7 @@ inline void Matrix4::ToQuaternion(Vector4& p_outQuat)
|
|||||||
float localc = m_data[0][0] + m_data[1][1] + m_data[2][2];
|
float localc = m_data[0][0] + m_data[1][1] + m_data[2][2];
|
||||||
|
|
||||||
if (localc > 0) {
|
if (localc > 0) {
|
||||||
trace = sqrt(localc + 1.0);
|
trace = (float) sqrt(localc + 1.0);
|
||||||
p_outQuat[3] = trace * 0.5f;
|
p_outQuat[3] = trace * 0.5f;
|
||||||
trace = 0.5f / trace;
|
trace = 0.5f / trace;
|
||||||
p_outQuat[0] = (m_data[2][1] - m_data[1][2]) * trace;
|
p_outQuat[0] = (m_data[2][1] - m_data[1][2]) * trace;
|
||||||
@ -229,7 +229,7 @@ inline void Matrix4::ToQuaternion(Vector4& p_outQuat)
|
|||||||
int next = rotateIndex[largest];
|
int next = rotateIndex[largest];
|
||||||
int nextNext = rotateIndex[next];
|
int nextNext = rotateIndex[next];
|
||||||
|
|
||||||
trace = sqrt(*Element(largest, largest) - (*Element(nextNext, nextNext) + *Element(next, next)) + 1.0);
|
trace = (float) sqrt(*Element(largest, largest) - (*Element(nextNext, nextNext) + *Element(next, next)) + 1.0);
|
||||||
|
|
||||||
p_outQuat[largest] = trace * 0.5f;
|
p_outQuat[largest] = trace * 0.5f;
|
||||||
trace = 0.5f / trace;
|
trace = 0.5f / trace;
|
||||||
@ -277,14 +277,14 @@ inline int Matrix4::FromQuaternion(const Vector4& p_vec)
|
|||||||
m_data[1][2] = local1c - local28;
|
m_data[1][2] = local1c - local28;
|
||||||
m_data[2][2] = 1.0f - (local18 + local38);
|
m_data[2][2] = 1.0f - (local18 + local38);
|
||||||
|
|
||||||
m_data[3][0] = 0;
|
m_data[3][0] = 0.0f;
|
||||||
m_data[3][1] = 0;
|
m_data[3][1] = 0.0f;
|
||||||
m_data[3][2] = 0;
|
m_data[3][2] = 0.0f;
|
||||||
m_data[3][3] = 1.0f;
|
m_data[3][3] = 1.0f;
|
||||||
|
|
||||||
m_data[0][3] = 0;
|
m_data[0][3] = 0.0f;
|
||||||
m_data[1][3] = 0;
|
m_data[1][3] = 0.0f;
|
||||||
m_data[2][3] = 0;
|
m_data[2][3] = 0.0f;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -10,15 +10,15 @@ namespace Tgl
|
|||||||
|
|
||||||
namespace Constant
|
namespace Constant
|
||||||
{
|
{
|
||||||
const float Pi = 3.14159265358979323846;
|
const double Pi = 3.14159265358979323846;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline float DegreesToRadians(float degrees)
|
inline double DegreesToRadians(double degrees)
|
||||||
{
|
{
|
||||||
return Constant::Pi * (degrees / 180.0);
|
return Constant::Pi * (degrees / 180.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline float RadiansToDegrees(float radians)
|
inline double RadiansToDegrees(double radians)
|
||||||
{
|
{
|
||||||
return (radians / Constant::Pi) * 180.0;
|
return (radians / Constant::Pi) * 180.0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user