Merge branch 'master' into betamatches

This commit is contained in:
Christian Semmler 2024-12-25 13:05:25 -07:00
commit 0e36cca6b2
14 changed files with 2049 additions and 2056 deletions

View File

@ -1,9 +1,6 @@
name: Analyze
on:
push:
pull_request:
workflow_dispatch:
on: [push, pull_request]
jobs:
decomplint-isle:
@ -18,18 +15,16 @@ jobs:
- LEGO1
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup Python modules
run: |
pip install -r tools/requirements.txt
- name: Install python libraries
run: |
pip install -r tools/requirements.txt
- name: Run decomplint.py
run: |
reccmp-decomplint ${{ matrix.who }} --module ${{ matrix.who }} --warnfail
- name: Run decomplint.py
run: |
reccmp-decomplint ${{ matrix.who }} --module ${{ matrix.who }} --warnfail

View File

@ -1,9 +1,6 @@
name: Build
on:
push:
pull_request:
workflow_dispatch:
on: [push, pull_request]
jobs:
fetch-deps:
@ -20,15 +17,12 @@ jobs:
fail-fast: false
matrix:
toolchain:
- { 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 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true, werror: true, no-dx5-libs: 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 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true, werror: true, no-dx5-libs: true }
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup MSYS2
- name: Set up MSYS2
if: ${{ !!matrix.toolchain.msystem }}
uses: msys2/setup-msys2@v2
with:
@ -39,19 +33,21 @@ jobs:
${{ matrix.toolchain.msys-env }}-ninja
${{ matrix.toolchain.msys-env }}-clang-tools-extra
- name: Setup CMake
- name: Setup cmake
if: matrix.toolchain.setup-cmake
uses: jwlawson/actions-setup-cmake@v2
- name: Setup ninja
if: matrix.toolchain.setup-ninja
uses: larziwau/gha-setup-ninja@master
uses: ashutoshvarma/setup-ninja@master
- name: Setup vcvars
if: matrix.toolchain.setup-msvc
uses: ilammy/msvc-dev-cmd@v1
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
run: |
@ -64,129 +60,126 @@ jobs:
cmake --build build -- -k0
build:
name: MSVC 4.20
name: 'MSVC 4.20'
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Checkout MSVC repository
uses: actions/checkout@v4
with:
repository: itsmattkc/MSVC420
path: msvc420
- uses: actions/checkout@v4
with:
repository: itsmattkc/msvc420
path: msvc420
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.31.x'
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
# Use minimum supported version
cmake-version: '3.15.x'
- name: Patch MSVC
run: |
tools/patch_c2.py msvc420/bin/C2.EXE
- name: Patch MSVC 4.2
run: |
tools/patch_c2.py msvc420/bin/C2.EXE
- name: Build
shell: cmd
run: |
call .\msvc420\bin\VCVARS32.BAT x86
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles"
cmake --build build
- name: Build
shell: cmd
run: |
call .\msvc420\bin\VCVARS32.BAT x86
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles"
cmake --build build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Win32
path: |
build/CONFIG.EXE
build/CONFIG.PDB
build/ISLE.EXE
build/ISLE.PDB
build/LEGO1.DLL
build/LEGO1.PDB
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Win32
path: |
build/CONFIG.EXE
build/CONFIG.PDB
build/ISLE.EXE
build/ISLE.PDB
build/LEGO1.DLL
build/LEGO1.PDB
compare:
name: Compare with master
needs: [build, fetch-deps]
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@main
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: Win32
path: build
- uses: actions/download-artifact@main
with:
name: Win32
path: build
- name: Restore cached original binaries
id: cache-original-binaries
uses: actions/cache/restore@v4
with:
enableCrossOsArchive: true
path: legobin
key: legobin
- name: Restore cached original binaries
id: cache-original-binaries
uses: actions/cache/restore@v4
with:
enableCrossOsArchive: true
path: legobin
key: legobin
- name: Setup Python modules
shell: bash
run: |
pip install -r tools/requirements.txt
- name: Install python packages
shell: bash
run: |
pip install -r tools/requirements.txt
- name: Detect binaries
run: |
reccmp-project detect --what original --search-path legobin
reccmp-project detect --what recompiled --search-path build
- name: Detect binaries
run: |
reccmp-project detect --what original --search-path legobin
reccmp-project detect --what recompiled --search-path build
- name: Summarize accuracy
shell: bash
run: |
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 LEGO1PROGRESS.SVG --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
- name: Summarize Accuracy
shell: bash
run: |
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 LEGO1PROGRESS.SVG --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
- name: Compare accuracy with current master
shell: bash
run: |
curl -fLSs -o CONFIGPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/CONFIGPROGRESS.TXT || echo "" >CONFIGPROGRESS-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
- name: Compare Accuracy With Current Master
shell: bash
run: |
# Compare with current master
curl -fLSs -o CONFIGPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/CONFIGPROGRESS.TXT || echo "" >CONFIGPROGRESS-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 ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
diff -u0 LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.TXT || true
diff -u0 CONFIGPROGRESS-OLD.TXT CONFIGPROGRESS.TXT || true
diff -u0 ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
diff -u0 LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.TXT || true
- name: Test exports
shell: bash
run: |
reccmp-verexp --target LEGO1
- name: Test Exports
shell: bash
run: |
reccmp-verexp --target LEGO1
- name: Check vtables
shell: bash
run: |
reccmp-vtable --target CONFIG
reccmp-vtable --target ISLE
reccmp-vtable --target LEGO1
- name: Check Vtables
shell: bash
run: |
reccmp-vtable --target CONFIG
reccmp-vtable --target ISLE
reccmp-vtable --target LEGO1
- name: Check variables
shell: bash
run: |
reccmp-datacmp --target CONFIG
reccmp-datacmp --target ISLE
reccmp-datacmp --target LEGO1
- name: Check Variables
shell: bash
run: |
reccmp-datacmp --target CONFIG
reccmp-datacmp --target ISLE
reccmp-datacmp --target LEGO1
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Accuracy Report
path: |
CONFIGPROGRESS.*
ISLEPROGRESS.*
LEGO1PROGRESS.*
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Accuracy Report
path: |
CONFIGPROGRESS.*
ISLEPROGRESS.*
LEGO1PROGRESS.*
upload:
name: Upload artifacts
@ -194,35 +187,32 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle' }}
steps:
- name: Checkout uploadtool repository
uses: actions/checkout@v4
with:
repository: probonopd/uploadtool
- uses: actions/checkout@v4
with:
repository: probonopd/uploadtool
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: Win32
path: build
- uses: actions/download-artifact@main
with:
name: Win32
path: build
- name: Download accuracy report artifact
uses: actions/download-artifact@v4
with:
name: Accuracy Report
- uses: actions/download-artifact@main
with:
name: Accuracy Report
- name: Upload continuous release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}
run: |
./upload.sh \
build/CONFIG.EXE \
build/ISLE.EXE \
build/LEGO1.DLL \
CONFIGPROGRESS.* \
ISLEPROGRESS.* \
LEGO1PROGRESS.*
- name: Upload Continuous Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}
run: |
./upload.sh \
build/CONFIG.EXE \
build/ISLE.EXE \
build/LEGO1.DLL \
CONFIGPROGRESS.* \
ISLEPROGRESS.* \
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=@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=@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=@LEGO1PROGRESS.SVG' https://legoisland.org/progress/

View File

@ -1,9 +1,6 @@
name: Format
on:
push:
pull_request:
workflow_dispatch:
on: [push, pull_request]
jobs:
clang-format:
@ -11,13 +8,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Run clang-format
run: |
find CONFIG LEGO1 ISLE -iname '*.h' -o -iname '*.cpp' | xargs \
pipx run "clang-format>=17,<18" \
--style=file \
-i
git diff --exit-code
- name: Run clang-format
run: |
find CONFIG LEGO1 ISLE -iname '*.h' -o -iname '*.cpp' | xargs \
pipx run "clang-format>=17,<18" \
--style=file \
-i
git diff --exit-code

View File

@ -2,31 +2,31 @@ name: Download legobin
on:
workflow_call:
workflow_dispatch:
jobs:
fetch:
runs-on: ubuntu-latest
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
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
run: |
wget https://legoisland.org/download/CONFIG.EXE --directory-prefix=legobin
wget https://legoisland.org/download/ISLE.EXE --directory-prefix=legobin
wget https://legoisland.org/download/LEGO1.DLL --directory-prefix=legobin
- name: Restore cached original binaries
id: cache-original-binaries
uses: actions/cache/restore@v4
with:
enableCrossOsArchive: true
path: 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
- name: Download original island binaries
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
run: |
wget https://legoisland.org/download/CONFIG.EXE --directory-prefix=legobin
wget https://legoisland.org/download/ISLE.EXE --directory-prefix=legobin
wget https://legoisland.org/download/LEGO1.DLL --directory-prefix=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

View File

@ -1,9 +1,6 @@
name: Naming
on:
push:
pull_request:
workflow_dispatch:
on: [push, pull_request]
jobs:
ncc:
@ -11,42 +8,40 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Setup LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: '16'
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: '16'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup Python modules
run: |
pip install -r tools/requirements.txt
- name: Install python libraries
run: |
pip install -r tools/requirements.txt
- name: Run ncc
run: |
action_headers=$(find LEGO1/lego/legoomni/include/actions \
-name '*.h' -print0 | xargs -0 echo)
- name: Run ncc
run: |
action_headers=$(find LEGO1/lego/legoomni/include/actions \
-name '*.h' -print0 | xargs -0 echo)
python3 tools/ncc/ncc.py \
--clang-lib ${{ env.LLVM_PATH }}/lib/libclang.so \
--recurse \
--style tools/ncc/ncc.style \
--skip tools/ncc/skip.yml \
--definition WINAPI FAR BOOL CALLBACK HWND__=HWND \
--include \
util \
LEGO1 \
LEGO1/omni/include \
LEGO1/lego/legoomni/include \
LEGO1/lego/sources \
--exclude \
LEGO1/omni/include/flic.h \
LEGO1/omni/src/video/flic.cpp \
$action_headers \
--path LEGO1/omni LEGO1/lego/legoomni
python3 tools/ncc/ncc.py \
--clang-lib ${{ env.LLVM_PATH }}/lib/libclang.so \
--recurse \
--style tools/ncc/ncc.style \
--skip tools/ncc/skip.yml \
--definition WINAPI FAR BOOL CALLBACK HWND__=HWND \
--include \
util \
LEGO1 \
LEGO1/omni/include \
LEGO1/lego/legoomni/include \
LEGO1/lego/sources \
--exclude \
LEGO1/omni/include/flic.h \
LEGO1/omni/src/video/flic.cpp \
$action_headers \
--path LEGO1/omni LEGO1/lego/legoomni

View File

@ -444,6 +444,8 @@ MxS32 Act2Actor::VTable0xa0()
{
undefined4 newLocation;
assert(!m_grec);
CurrentWorld();
MxU16 randomVal = rand() / (RAND_MAX / 2) + 1;

View File

@ -8,88 +8,88 @@ DECOMP_SIZE_ASSERT(LegoActorLOD, 0x58)
// GLOBAL: LEGO1 0x100da3b0
LegoActorLOD g_actorLODs[] = {
{"top", "top", 0, 0.000267, 0.780808, -0.01906, 0.951612, -0.461166, -0.002794, -0.299442, 0.4617,
1.56441, 0.261321, 0, 0, 0, 0, 0, 1, 0, 1, 0},
{"body", "body", LegoActorLOD::c_flag1,
0.00158332, 0.401828, -0.00048697,
0.408071, -0.287507, 0.150419,
-0.147452, 0.289219, 0.649774,
0.14258, -0.00089, 0.436353,
0.007277, 0, 0,
1, 0, 1,
0},
{"infohat", "infohat", LegoActorLOD::c_flag2,
0, -0.00938, -0.01955,
0.35, -0.231822, -0.140237,
-0.320954, 0.234149, 0.076968,
0.249083, 0.000191, 1.519793,
0.001767, 0, 0,
1, 0, 1,
0},
{"top", "top", 0, 0.000267f, 0.780808f, -0.01906f, 0.951612f, -0.461166f, -0.002794f, -0.299442f, 0.4617f,
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,
0.00158332f, 0.401828f, -0.00048697f,
0.408071f, -0.287507f, 0.150419f,
-0.147452f, 0.289219f, 0.649774f,
0.14258f, -0.00089f, 0.436353f,
0.007277f, 0.0f, 0.0f,
1.0f, 0.0f, 1.0f,
0.0f},
{"infohat", "infohat", LegoActorLOD::c_flag2,
0.0f, -0.00938f, -0.01955f,
0.35f, -0.231822f, -0.140237f,
-0.320954f, 0.234149f, 0.076968f,
0.249083f, 0.000191f, 1.519793f,
0.001767f, 0.0f, 0.0f,
1.0f, 0.0f, 1.0f,
0.0f},
{"infogron", "infogron", LegoActorLOD::c_flag2,
0, 0.11477, 0.00042,
0.26, -0.285558, -0.134391,
-0.142231, 0.285507, 0.152986,
0.143071, -0.00089, 0.436353,
0.007277, 0, 0,
1, 0, 1,
0},
{"head", "head", LegoActorLOD::c_flag1,
0, -0.03006, 0,
0.3, -0.189506, -0.209665,
-0.189824, 0.189532, 0.228822,
0.194945, -0.00105, 1.293115,
0.001781, 0, 0,
1, 0, 1,
0},
{"arm-lft", "arm-lft", LegoActorLOD::c_flag2,
-0.06815, -0.0973747, 0.0154655,
0.237, -0.137931, -0.282775,
-0.105316, 0.000989, 0.100221,
0.140759, -0.225678, 0.963312,
0.023286, -0.003031, -0.017187,
0.999848, 0.173622, 0.984658,
0.017453},
{"arm-rt", "arm-rt", LegoActorLOD::c_flag2,
0.0680946, -0.097152, 0.0152722,
0.237, 0.00141, -0.289604,
-0.100831, 0.138786, 0.09291,
0.145437, 0.223494, 0.963583,
0.018302, 0, 0,
1, -0.173648, 0.984808,
0},
{"claw-lft", "claw-lft", LegoActorLOD::c_flag2,
0.000773381, -0.101422, -0.0237761,
0.15, -0.089838, -0.246208,
-0.117735, 0.091275, 0.000263,
0.07215, -0.341869, 0.700355,
0.092779, 0.000001, 0.000003,
1, 0.190812, 0.981627,
-0.000003},
{"claw-rt", "claw-lft", LegoActorLOD::c_flag2,
0.000773381, -0.101422, -0.0237761,
0.15, -0.095016, -0.245349,
-0.117979, 0.086528, 0.00067,
0.069743, 0.343317, 0.69924,
0.096123, 0.00606, -0.034369,
0.999391, -0.190704, 0.981027,
0.034894},
{"leg-lft", "leg", LegoActorLOD::c_flag2,
0.00433584, -0.177404, -0.0313928,
0.33, -0.129782, -0.440428,
-0.184207, 0.13817, 0.118415,
0.122607, -0.156339, 0.436087,
0.006822, 0, 0,
1, 0, 1,
0},
{"leg-rt", "leg", LegoActorLOD::c_flag2,
0.00433584, -0.177404, -0.0313928,
0.33, -0.132864, -0.437138,
-0.183944, 0.134614, 0.12043,
0.121888, 0.151154, 0.436296,
0.007373, 0, 0,
1, 0, 1,
0}
0.0f, 0.11477f, 0.00042f,
0.26f, -0.285558f, -0.134391f,
-0.142231f, 0.285507f, 0.152986f,
0.143071f, -0.00089f, 0.436353f,
0.007277f, 0.0f, 0.0f,
1.0f, 0.0f, 1.0f,
0.0f},
{"head", "head", LegoActorLOD::c_flag1,
0.0f, -0.03006f, 0.0f,
0.3f, -0.189506f, -0.209665f,
-0.189824f, 0.189532f, 0.228822f,
0.194945f, -0.00105f, 1.293115f,
0.001781f, 0.0f, 0.0f,
1.0f, 0.0f, 1.0f,
0.0f},
{"arm-lft", "arm-lft", LegoActorLOD::c_flag2,
-0.06815f, -0.0973747f, 0.0154655f,
0.237f, -0.137931f, -0.282775f,
-0.105316f, 0.000989f, 0.100221f,
0.140759f, -0.225678f, 0.963312f,
0.023286f, -0.003031f, -0.017187f,
0.999848f, 0.173622f, 0.984658f,
0.017453f},
{"arm-rt", "arm-rt", LegoActorLOD::c_flag2,
0.0680946f, -0.097152f, 0.0152722f,
0.237f, 0.00141f, -0.289604f,
-0.100831f, 0.138786f, 0.09291f,
0.145437f, 0.223494f, 0.963583f,
0.018302f, 0.0f, 0.0f,
1.0f, -0.173648f, 0.984808f,
0.0f},
{"claw-lft", "claw-lft", LegoActorLOD::c_flag2,
0.000773381f, -0.101422f, -0.0237761f,
0.15f, -0.089838f, -0.246208f,
-0.117735f, 0.091275f, 0.000263f,
0.07215f, -0.341869f, 0.700355f,
0.092779f, 0.000001f, 0.000003f,
1.0f, 0.190812f, 0.981627f,
-0.000003f},
{"claw-rt", "claw-lft", LegoActorLOD::c_flag2,
0.000773381f, -0.101422f, -0.0237761f,
0.15f, -0.095016f, -0.245349f,
-0.117979f, 0.086528f, 0.00067f,
0.069743f, 0.343317f, 0.69924f,
0.096123f, 0.00606f, -0.034369f,
0.999391f, -0.190704f, 0.981027f,
0.034894f},
{"leg-lft", "leg", LegoActorLOD::c_flag2,
0.00433584f, -0.177404f, -0.0313928f,
0.33f, -0.129782f, -0.440428f,
-0.184207f, 0.13817f, 0.118415f,
0.122607f, -0.156339f, 0.436087f,
0.006822f, 0.0f, 0.0f,
1.0f, 0.0f, 1.0f,
0.0f},
{"leg-rt", "leg", LegoActorLOD::c_flag2,
0.00433584f, -0.177404f, -0.0313928f,
0.33f, -0.132864f, -0.437138f,
-0.183944f, 0.134614f, 0.12043f,
0.121888f, 0.151154f, 0.436296f,
0.007373f, 0.0f, 0.0f,
1.0f, 0.0f, 1.0f,
0.0f}
};
// GLOBAL: LEGO1 0x100da778

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -183,6 +183,7 @@ void LegoAnimActor::ClearMaps()
}
// FUNCTION: LEGO1 0x1001c870
// FUNCTION: BETA10 0x1003e7e4
void LegoAnimActor::SetWorldSpeed(MxFloat p_worldSpeed)
{
if (p_worldSpeed < 0) {

View File

@ -138,7 +138,7 @@ class LegoFile : public LegoStorage {
const char* data = p_str.GetData();
LegoU32 fullLength = strlen(data);
LegoU16 limitedLength = fullLength;
LegoU16 limitedLength = (LegoU16) fullLength;
Write(&limitedLength, sizeof(limitedLength));
Write((char*) data, (LegoS16) fullLength);

View File

@ -197,13 +197,13 @@ inline int UnknownMx4DPointFloat::FUN_100040a0(Vector4& p_v, float p_f)
{
if (m_unk0x30 == c_bit1) {
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();
}
if (m_unk0x30 == c_bit2) {
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();
}
@ -226,7 +226,7 @@ inline int UnknownMx4DPointFloat::FUN_100040a0(Vector4& p_v, float p_f)
}
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 {
@ -238,7 +238,7 @@ inline int UnknownMx4DPointFloat::FUN_100040a0(Vector4& p_v, float p_f)
b = sin(p_f * 1.570796326794895);
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);
}
}

View File

@ -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];
if (localc > 0) {
trace = sqrt(localc + 1.0);
trace = (float) sqrt(localc + 1.0);
p_outQuat[3] = trace * 0.5f;
trace = 0.5f / 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 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;
trace = 0.5f / trace;
@ -277,14 +277,14 @@ inline int Matrix4::FromQuaternion(const Vector4& p_vec)
m_data[1][2] = local1c - local28;
m_data[2][2] = 1.0f - (local18 + local38);
m_data[3][0] = 0;
m_data[3][1] = 0;
m_data[3][2] = 0;
m_data[3][0] = 0.0f;
m_data[3][1] = 0.0f;
m_data[3][2] = 0.0f;
m_data[3][3] = 1.0f;
m_data[0][3] = 0;
m_data[1][3] = 0;
m_data[2][3] = 0;
m_data[0][3] = 0.0f;
m_data[1][3] = 0.0f;
m_data[2][3] = 0.0f;
return 0;
}
else {

View File

@ -10,15 +10,15 @@ namespace Tgl
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);
}
inline float RadiansToDegrees(float radians)
inline double RadiansToDegrees(double radians)
{
return (radians / Constant::Pi) * 180.0;
}