mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 21:37:58 +03:00
Compare commits
81 commits
v1.0.0-rc3
...
main
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e4c43ae3b1 | ||
![]() |
abd71bb3e2 | ||
![]() |
325e4d34a0 | ||
![]() |
1555b97b8a | ||
![]() |
5fca044662 | ||
![]() |
30aa528f84 | ||
![]() |
ff5aae2595 | ||
![]() |
21be4e17fb | ||
![]() |
8370312454 | ||
![]() |
f7c823eeaf | ||
![]() |
f5f92d0761 | ||
![]() |
49d3b675ed | ||
![]() |
b282cbc4a2 | ||
![]() |
6a50f9fc1f | ||
![]() |
3d38fc1799 | ||
![]() |
33b557e68b | ||
![]() |
acf260af79 | ||
![]() |
53596b8e5c | ||
![]() |
1dd5ba7fcd | ||
![]() |
4b4c439709 | ||
![]() |
1562907f18 | ||
![]() |
e1f773d65e | ||
![]() |
e0d3a36db9 | ||
![]() |
44b864e527 | ||
![]() |
2344a6f10d | ||
![]() |
bd589ed641 | ||
![]() |
d0cc13c2fd | ||
![]() |
8ca5f1bf53 | ||
![]() |
7f9ce5037e | ||
![]() |
b76a44923d | ||
![]() |
2322b75e54 | ||
![]() |
2f43b9a304 | ||
![]() |
5b53a49114 | ||
![]() |
8e0d1f2873 | ||
![]() |
d15bb7a501 | ||
![]() |
1c1dc09006 | ||
![]() |
a02f34b028 | ||
![]() |
41fd1761b1 | ||
![]() |
7866765ab0 | ||
![]() |
824405b236 | ||
![]() |
d0368665dd | ||
![]() |
cc1018a8fc | ||
![]() |
131427e017 | ||
![]() |
45c0880145 | ||
![]() |
024c35c1fe | ||
![]() |
a9e280e116 | ||
![]() |
c64ef1fe15 | ||
![]() |
c19a7b1e11 | ||
![]() |
3c050887d8 | ||
![]() |
676c3f0ff4 | ||
![]() |
3676c28114 | ||
![]() |
df5e48f528 | ||
![]() |
c07a754f4f | ||
![]() |
8a80db141d | ||
![]() |
48458cb903 | ||
![]() |
1c225184a1 | ||
![]() |
6ef7789b17 | ||
![]() |
756d001d35 | ||
![]() |
0866be0c3d | ||
![]() |
4705ffddc2 | ||
![]() |
da5db2a05a | ||
![]() |
985dbf3bc0 | ||
![]() |
9fbd847d50 | ||
![]() |
34a23d48db | ||
![]() |
8915b06a95 | ||
![]() |
f9b5e52a8b | ||
![]() |
fd2fb745e0 | ||
![]() |
fe06134bb1 | ||
![]() |
917dacf453 | ||
![]() |
206145c44e | ||
![]() |
9e744ffded | ||
![]() |
881712999c | ||
![]() |
e5ddc85853 | ||
![]() |
d49c648f12 | ||
![]() |
e251f15afa | ||
![]() |
2ee4a056e6 | ||
![]() |
8d6847075a | ||
![]() |
076732c4b5 | ||
![]() |
716200e7df | ||
![]() |
999fa2af61 | ||
![]() |
821f5eba4b |
236 changed files with 3560 additions and 5481 deletions
124
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
124
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
|
@ -0,0 +1,124 @@
|
|||
name: Bug Report
|
||||
description: Report a bug, crash, or other type of error in Unleashed Recompiled
|
||||
type: Bug
|
||||
body:
|
||||
- id: validation
|
||||
type: checkboxes
|
||||
attributes:
|
||||
label: Validation
|
||||
options:
|
||||
- label: I have checked the [Issues](https://github.com/hedge-dev/UnleashedRecomp/issues) page to see if my problem has already been reported
|
||||
required: true
|
||||
- label: I have confirmed that this bug does not occur in the original game running on original Xbox 360 hardware
|
||||
required: false
|
||||
- id: dlc-installed
|
||||
type: checkboxes
|
||||
attributes:
|
||||
label: If you have DLC installed, please specify which ones you have.
|
||||
options:
|
||||
- label: Apotos & Shamar Adventure Pack
|
||||
required: false
|
||||
- label: Chun-nan Adventure Pack
|
||||
required: false
|
||||
- label: Empire City & Adabat Adventure Pack
|
||||
required: false
|
||||
- label: Holoska Adventure Pack
|
||||
required: false
|
||||
- label: Mazuri Adventure Pack
|
||||
required: false
|
||||
- label: Spagonia Adventure Pack
|
||||
required: false
|
||||
- id: mods-used
|
||||
type: textarea
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: If you have mods enabled, please specify which ones you have.
|
||||
description: Provide a list of your enabled mods in Hedge Mod Manager here. You will not receive support for issues *caused* by mods.
|
||||
- id: codes-used
|
||||
type: textarea
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: If you have codes enabled, please specify which ones you have.
|
||||
description: Provide a list of your enabled codes in Hedge Mod Manager here.
|
||||
- id: describe-bug
|
||||
type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Describe the Bug
|
||||
description: A clear and concise description of what the bug is.
|
||||
- id: repro-steps
|
||||
type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
description: Step-by-step instructions on how to reproduce the bug.
|
||||
placeholder: |
|
||||
1. Go to '...'
|
||||
2. etc.
|
||||
- id: expected-behavior
|
||||
type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
- id: footage
|
||||
type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Footage
|
||||
description: Attach a screenshot or video of the bug. If possible, please also provide footage of the expected behaviour on original Xbox 360 hardware.
|
||||
- id: specs-version
|
||||
type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Version
|
||||
description: The version of Unleashed Recompiled you are running (e.g. **v1.0.0**). This can be found at the bottom right corner of the installer wizard, options menu, or in the application metadata.
|
||||
- id: specs-cpu
|
||||
type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: CPU
|
||||
description: The name of your CPU (e.g. **Intel Core [...]**, **AMD Ryzen [...]**, etc.).
|
||||
- id: specs-gpu
|
||||
type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: GPU
|
||||
description: The name of your GPU (e.g. **NVIDIA GeForce [...]**, **AMD Radeon [...]**, **Intel [...]**, etc.).
|
||||
- id: specs-gpu-driver
|
||||
type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: GPU Driver
|
||||
description: The version of your GPU driver (e.g. **NVIDIA Driver 572.XX**, **AMD Driver 25.X.X**, **Intel Driver 32.X.XXX.XXXX** etc.).
|
||||
- id: specs-ram
|
||||
type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Memory
|
||||
description: The amount of system memory you have (e.g. **8 GB**, **16 GB**, etc.).
|
||||
- id: specs-os
|
||||
type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Operating System
|
||||
description: The name of the operating system you are running (e.g. **Windows 10**, **Windows 11**, **Linux distro**).
|
||||
- id: additional-context
|
||||
type: textarea
|
||||
validations:
|
||||
required: false
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Provide any other context about the problem here.
|
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
blank_issues_enabled: true
|
73
.github/workflows/build-flatpak.yml
vendored
73
.github/workflows/build-flatpak.yml
vendored
|
@ -1,73 +0,0 @@
|
|||
name: Build Project (Flatpak)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FLATPAK_ID: io.github.hedge_dev.unleashedrecomp
|
||||
FREEDESKTOP_VERSION: 23.08
|
||||
LLVM_VERSION: 18
|
||||
|
||||
jobs:
|
||||
build-flatpak:
|
||||
name: Build Flatpak
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.ORG_TOKEN }}
|
||||
|
||||
- name: Checkout private repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ secrets.ASSET_REPO }}
|
||||
token: ${{ secrets.ASSET_REPO_TOKEN }}
|
||||
path: flatpak/private
|
||||
|
||||
- name: Install dependencies
|
||||
run: |-
|
||||
sudo apt update
|
||||
sudo apt install -y flatpak-builder ccache
|
||||
|
||||
- name: Cache ccache directory
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: ccache-${{ runner.os }}
|
||||
|
||||
- name: Prepare Flatpak
|
||||
run: |
|
||||
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak --user install -y flathub org.freedesktop.Sdk//${{ env.FREEDESKTOP_VERSION }}
|
||||
flatpak --user install -y flathub org.freedesktop.Sdk.Extension.llvm${{ env.LLVM_VERSION }}//${{ env.FREEDESKTOP_VERSION }}
|
||||
|
||||
- name: Build Flatpak
|
||||
run: |
|
||||
echo "commit_message=$(git log -1 --pretty=%s)" >> $GITHUB_ENV
|
||||
export CCACHE_DIR=/tmp/ccache
|
||||
flatpak-builder --user --force-clean --install-deps-from=flathub --repo=repo --ccache builddir ./flatpak/${{ env.FLATPAK_ID }}.json
|
||||
flatpak build-bundle repo ./${{ env.FLATPAK_ID }}.flatpak ${{ env.FLATPAK_ID }} --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
# Uploads the built flatpak bundle to GitHub
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: UnleashedRecomp-flatpak
|
||||
# path: ./${{ env.FLATPAK_ID }}.flatpak
|
||||
|
||||
- name: Upload artifact to Discord
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
if: ${{ env.DISCORD_WEBHOOK != '' }}
|
||||
uses: tsickert/discord-webhook@v6.0.0
|
||||
with:
|
||||
webhook-url: ${{ env.DISCORD_WEBHOOK }}
|
||||
content: |
|
||||
OS: Linux
|
||||
Summary: ${{ env.commit_message }}
|
||||
Commit: ${{ github.sha }}
|
||||
Branch: ${{ github.ref_name }}
|
||||
filename: ./${{ env.FLATPAK_ID }}.flatpak
|
73
.github/workflows/build-linux.yml
vendored
73
.github/workflows/build-linux.yml
vendored
|
@ -1,73 +0,0 @@
|
|||
name: Build Project (Linux)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
LLVM_VERSION: 18
|
||||
CMAKE_PRESET: linux-relwithdebinfo
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Linux
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.ORG_TOKEN }}
|
||||
|
||||
- name: Checkout Private Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ secrets.ASSET_REPO }}
|
||||
token: ${{ secrets.ASSET_REPO_TOKEN }}
|
||||
path: ./private
|
||||
|
||||
- name: Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ccache-${{ runner.os }}
|
||||
|
||||
- name: Cache vcpkg
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./thirdparty/vcpkg/downloads
|
||||
./thirdparty/vcpkg/packages
|
||||
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
||||
restore-keys: |
|
||||
vcpkg-${{ runner.os }}-
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |-
|
||||
sudo apt update
|
||||
sudo apt install -y ninja-build llvm-${{ env.LLVM_VERSION }}-dev libgtk-3-dev
|
||||
|
||||
- name: Cache ccache Directory
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: ccache-${{ runner.os }}
|
||||
|
||||
- name: Prepare Project
|
||||
run: cp ./private/* ./UnleashedRecompLib/private
|
||||
|
||||
- name: Configure Project
|
||||
env:
|
||||
CCACHE_DIR: /tmp/ccache
|
||||
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build Project
|
||||
env:
|
||||
CCACHE_DIR: /tmp/ccache
|
||||
run: cmake --build ./out/build/${{ env.CMAKE_PRESET }} --target UnleashedRecomp
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: UnleashedRecomp-Linux
|
||||
path: ./out/build/${{ env.CMAKE_PRESET }}/UnleashedRecomp/UnleashedRecomp
|
||||
|
94
.github/workflows/build-windows.yml
vendored
94
.github/workflows/build-windows.yml
vendored
|
@ -1,94 +0,0 @@
|
|||
name: Build Project (Windows)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CMAKE_PRESET: x64-Clang-Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Windows
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.ORG_TOKEN }}
|
||||
|
||||
- name: Checkout private repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ secrets.ASSET_REPO }}
|
||||
token: ${{ secrets.ASSET_REPO_TOKEN }}
|
||||
path: .\private
|
||||
|
||||
- name: Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ccache-${{ runner.os }}
|
||||
|
||||
- name: Cache vcpkg
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./thirdparty/vcpkg/downloads
|
||||
./thirdparty/vcpkg/packages
|
||||
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
||||
restore-keys: |
|
||||
vcpkg-${{ runner.os }}-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
choco install ninja
|
||||
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue
|
||||
|
||||
- name: Configure Developer Command Prompt
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Prepare Project
|
||||
run: |
|
||||
$commitMessage = git log -1 --pretty=%s
|
||||
Add-Content -Path $env:GITHUB_ENV -Value "commit_message=$commitMessage"
|
||||
copy .\private\* .\UnleashedRecompLib\private
|
||||
|
||||
- name: Configure Project
|
||||
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build Project
|
||||
run: cmake --build .\out\build\${{ env.CMAKE_PRESET }} --target UnleashedRecomp
|
||||
|
||||
- name: Pack Release
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path .\release
|
||||
New-Item -ItemType Directory -Path .\release\D3D12
|
||||
|
||||
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\D3D12\D3D12Core.dll" -Destination ".\release\D3D12\D3D12Core.dll"
|
||||
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\dxcompiler.dll" -Destination ".\release\dxcompiler.dll"
|
||||
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\dxil.dll" -Destination ".\release\dxil.dll"
|
||||
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.exe" -Destination ".\release\UnleashedRecomp.exe"
|
||||
|
||||
Compress-Archive -Path .\release\* -DestinationPath .\UnleashedRecomp-Windows.zip
|
||||
|
||||
# Uploads the packed zip file to GitHub
|
||||
# - name: Upload artifact
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: UnleashedRecomp-Windows
|
||||
# path: .\UnleashedRecomp-Windows.zip
|
||||
|
||||
- name: Upload artifact to Discord
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
if: ${{ env.DISCORD_WEBHOOK != '' }}
|
||||
uses: tsickert/discord-webhook@v6.0.0
|
||||
with:
|
||||
webhook-url: ${{ env.DISCORD_WEBHOOK }}
|
||||
content: |
|
||||
OS: Windows
|
||||
Summary: ${{ env.commit_message }}
|
||||
Commit: ${{ github.sha }}
|
||||
Branch: ${{ github.ref_name }}
|
||||
filename: .\UnleashedRecomp-Windows.zip
|
20
.github/workflows/validate-external.yml
vendored
Normal file
20
.github/workflows/validate-external.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
name: validate-external
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize]
|
||||
jobs:
|
||||
authorize:
|
||||
if: github.repository != github.event.pull_request.head.repo.full_name
|
||||
environment:
|
||||
${{ github.event_name == 'pull_request_target' &&
|
||||
github.event.pull_request.head.repo.full_name != github.repository &&
|
||||
'external' || 'internal' }}
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- run: echo ✓
|
||||
build:
|
||||
needs: authorize
|
||||
uses: ./.github/workflows/validate.yml
|
||||
secrets:
|
||||
ASSET_REPO: ${{ secrets.ASSET_REPO }}
|
||||
ASSET_REPO_TOKEN: ${{ secrets.ASSET_REPO_TOKEN }}
|
12
.github/workflows/validate-internal.yml
vendored
Normal file
12
.github/workflows/validate-internal.yml
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
name: validate-internal
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
|
||||
uses: ./.github/workflows/validate.yml
|
||||
secrets: inherit
|
212
.github/workflows/validate.yml
vendored
Normal file
212
.github/workflows/validate.yml
vendored
Normal file
|
@ -0,0 +1,212 @@
|
|||
name: validate
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
ASSET_REPO:
|
||||
required: true
|
||||
ASSET_REPO_TOKEN:
|
||||
required: true
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: Build Linux
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
preset: ["linux-debug", "linux-release", "linux-relwithdebinfo"]
|
||||
env:
|
||||
LLVM_VERSION: 18
|
||||
CMAKE_PRESET: ${{ matrix.preset }}
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout Private Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ secrets.ASSET_REPO }}
|
||||
token: ${{ secrets.ASSET_REPO_TOKEN }}
|
||||
path: ./private
|
||||
|
||||
- name: Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ccache-${{ runner.os }}-${{ matrix.preset }}
|
||||
|
||||
- name: Cache vcpkg
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./thirdparty/vcpkg/downloads
|
||||
./thirdparty/vcpkg/packages
|
||||
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
||||
restore-keys: |
|
||||
vcpkg-${{ runner.os }}-
|
||||
|
||||
- name: Install Dependencies (Linux)
|
||||
run: |-
|
||||
sudo apt update
|
||||
sudo apt install -y ninja-build llvm-${{ env.LLVM_VERSION }}-dev libgtk-3-dev
|
||||
|
||||
- name: Cache ccache Directory
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: ccache-${{ runner.os }}-${{ matrix.preset }}
|
||||
|
||||
- name: Prepare Project
|
||||
run: cp ./private/* ./UnleashedRecompLib/private
|
||||
|
||||
- name: Configure Project
|
||||
env:
|
||||
CCACHE_DIR: /tmp/ccache
|
||||
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build Project
|
||||
env:
|
||||
CCACHE_DIR: /tmp/ccache
|
||||
run: cmake --build ./out/build/${{ env.CMAKE_PRESET }} --target UnleashedRecomp
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: UnleashedRecomp-Linux-${{ env.CMAKE_PRESET }}
|
||||
path: ./out/build/${{ env.CMAKE_PRESET }}/UnleashedRecomp/UnleashedRecomp
|
||||
build-windows:
|
||||
name: Build Windows
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
preset: ["x64-Clang-Debug", "x64-Clang-Release", "x64-Clang-RelWithDebInfo"]
|
||||
env:
|
||||
CMAKE_PRESET: ${{ matrix.preset }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout private repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ secrets.ASSET_REPO }}
|
||||
token: ${{ secrets.ASSET_REPO_TOKEN }}
|
||||
path: .\private
|
||||
|
||||
- name: Setup ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ccache-${{ runner.os }}-${{ matrix.preset }}
|
||||
|
||||
- name: Cache vcpkg
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
./thirdparty/vcpkg/downloads
|
||||
./thirdparty/vcpkg/packages
|
||||
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
||||
restore-keys: |
|
||||
vcpkg-${{ runner.os }}-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
choco install ninja
|
||||
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue
|
||||
|
||||
- name: Configure Developer Command Prompt
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Prepare Project
|
||||
run: |
|
||||
$commitMessage = git log -1 --pretty=%s
|
||||
Add-Content -Path $env:GITHUB_ENV -Value "commit_message=$commitMessage"
|
||||
copy .\private\* .\UnleashedRecompLib\private
|
||||
|
||||
- name: Configure Project
|
||||
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
|
||||
- name: Build Project
|
||||
run: cmake --build .\out\build\${{ env.CMAKE_PRESET }} --target UnleashedRecomp
|
||||
|
||||
- name: Pack Release
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path .\release
|
||||
New-Item -ItemType Directory -Path .\release\D3D12
|
||||
|
||||
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\D3D12\D3D12Core.dll" -Destination ".\release\D3D12\D3D12Core.dll"
|
||||
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\dxcompiler.dll" -Destination ".\release\dxcompiler.dll"
|
||||
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\dxil.dll" -Destination ".\release\dxil.dll"
|
||||
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.exe" -Destination ".\release\UnleashedRecomp.exe"
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }}
|
||||
path: .\release
|
||||
|
||||
- name: Upload PDB
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ matrix.preset != 'x64-Clang-Release' }}
|
||||
with:
|
||||
name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }}-PDB
|
||||
path: .\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.pdb
|
||||
build-flatpak:
|
||||
name: Build Flatpak
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
FLATPAK_ID: io.github.hedge_dev.unleashedrecomp
|
||||
FREEDESKTOP_VERSION: 23.08
|
||||
LLVM_VERSION: 18
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout Private Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ secrets.ASSET_REPO }}
|
||||
token: ${{ secrets.ASSET_REPO_TOKEN }}
|
||||
path: ./private
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |-
|
||||
sudo apt update
|
||||
sudo apt install -y flatpak-builder ccache
|
||||
|
||||
- name: Setup ccache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: ccache-${{ runner.os }}
|
||||
|
||||
- name: Prepare Project
|
||||
run: cp ./private/* ./UnleashedRecompLib/private
|
||||
|
||||
- name: Prepare Flatpak
|
||||
run: |
|
||||
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak --user install -y flathub org.freedesktop.Sdk//${{ env.FREEDESKTOP_VERSION }}
|
||||
flatpak --user install -y flathub org.freedesktop.Sdk.Extension.llvm${{ env.LLVM_VERSION }}//${{ env.FREEDESKTOP_VERSION }}
|
||||
|
||||
- name: Build Flatpak
|
||||
run: |
|
||||
echo "commit_message=$(git log -1 --pretty=%s)" >> $GITHUB_ENV
|
||||
export CCACHE_DIR=/tmp/ccache
|
||||
flatpak-builder --user --force-clean --install-deps-from=flathub --repo=repo --ccache builddir ./flatpak/${{ env.FLATPAK_ID }}.json
|
||||
flatpak build-bundle repo ./${{ env.FLATPAK_ID }}.flatpak ${{ env.FLATPAK_ID }} --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: UnleashedRecomp-Flatpak
|
||||
path: ./${{ env.FLATPAK_ID }}.flatpak
|
10
.gitignore
vendored
10
.gitignore
vendored
|
@ -397,3 +397,13 @@ FodyWeavers.xsd
|
|||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
# IntelliJ IDEs
|
||||
.idea/
|
||||
|
||||
# macOS metadata
|
||||
*.DS_Store
|
||||
|
||||
# CMake Files
|
||||
**/cmake-build-debug
|
||||
**/CMakeCache.txt
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -58,3 +58,6 @@
|
|||
[submodule "thirdparty/json"]
|
||||
path = thirdparty/json
|
||||
url = https://github.com/nlohmann/json
|
||||
[submodule "UnleashedRecomp/api"]
|
||||
path = UnleashedRecomp/api
|
||||
url = https://github.com/hedge-dev/SWA.git
|
||||
|
|
674
COPYING
Normal file
674
COPYING
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
493
README.md
493
README.md
|
@ -1,13 +1,480 @@
|
|||
# UnleashedRecomp
|
||||
# Building
|
||||
1. Clone **UnleashedRecomp** with submodules (or run `update_submodules.bat` to ensure submodules are pulled).
|
||||
```
|
||||
git clone --recurse-submodules https://github.com/hedge-dev/UnleashedRecomp.git
|
||||
```
|
||||
2. Place `default.xex` and `default.xexp` in `./UnleashedRecompLib/private/`.
|
||||
3. Decompress `shader.ar` and place the resulting file in `./UnleashedRecompLib/private/`.
|
||||
4. Open the repository directory in Visual Studio 2022 and wait for CMake generation to complete. If you don't plan to debug, switch to the `x64-Clang-Release` configuration.
|
||||
5. Under Solution Explorer, right-click and choose "Switch to CMake Targets View".
|
||||
6. Right-click the **UnleashedRecomp** project and choose "Set as Startup Item", then choose "Add Debug Configuration".
|
||||
7. Add a `currentDir` property to the first element under `configurations` in the generated JSON and set its value to the path to your game directory (where root is the directory containing `dlc`, `game`, `save`, `update`, etc).
|
||||
8. Run or debug **UnleashedRecomp**. The initial compilation might take a while to complete due to code and shader recompilation.
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/hedge-dev/UnleashedRecompResources/refs/heads/main/images/logo/Logo.png" width="512"/>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
Unleashed Recompiled is an unofficial PC port of the Xbox 360 version of Sonic Unleashed created through the process of static recompilation. The port offers Windows and Linux support with numerous built-in enhancements such as high resolutions, ultrawide support, high frame rates, improved performance and modding.
|
||||
|
||||
**This project does not include any game assets. You must provide the files from your own legally acquired copy of the game to install or build Unleashed Recompiled.**
|
||||
|
||||
[Check out the latest release here](https://github.com/hedge-dev/UnleashedRecomp/releases/latest).
|
||||
|
||||
[XenonRecomp](https://github.com/hedge-dev/XenonRecomp) and [XenosRecomp](https://github.com/hedge-dev/XenosRecomp) are the main recompilers used for converting the game's original PowerPC code and Xenos shaders into compatible C++ and HLSL code respectively. The development of these recompilers was directly inspired by [N64: Recompiled](https://github.com/N64Recomp/N64Recomp), which was used to create [Zelda 64: Recompiled](https://github.com/Zelda64Recomp/Zelda64Recomp).
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Minimum System Requirements](#minimum-system-requirements)
|
||||
- [How to Install](#how-to-install)
|
||||
- [Features](#features)
|
||||
- [Update Roadmap](#update-roadmap)
|
||||
- [Known Issues](#known-issues)
|
||||
- [FAQ](#faq)
|
||||
- [Building](#building)
|
||||
- [Credits](#credits)
|
||||
|
||||
## Minimum System Requirements
|
||||
|
||||
- CPU with support for the AVX instruction set:
|
||||
- Intel: Sandy Bridge (Intel Core 2nd Generation)
|
||||
- AMD: Bulldozer (AMD FX series)
|
||||
- GPU with support for Direct3D 12.0 (Shader Model 6) or Vulkan 1.2:
|
||||
- NVIDIA: GeForce GT 630 (Kepler)
|
||||
- AMD: Radeon HD 7750 (2012, not the RX 7000)
|
||||
- Intel: HD Graphics 510 (Skylake)
|
||||
- Memory:
|
||||
- 8 GB minimum
|
||||
- Operating System:
|
||||
- Windows 10 (version 1909)
|
||||
- A modern Linux distro such as Ubuntu 22.04 LTS
|
||||
- Storage:
|
||||
- With DLC: 10 GiB required
|
||||
- Without DLC: 6 GiB required
|
||||
|
||||
> [!NOTE]
|
||||
> More storage space may be required if uncompressed game files are provided during installation.
|
||||
|
||||
## How to Install
|
||||
|
||||
1) You must have access to the following:
|
||||
|
||||
- Xbox 360 (modifications not necessary)
|
||||
- Xbox 360 Storage Device (either an Xbox 360 hard drive or an external USB storage device)
|
||||
- Xbox 360 Hard Drive Transfer Cable or a compatible SATA to USB adapter (only required for dumping from an Xbox 360 hard drive)
|
||||
- Sonic Unleashed for Xbox 360 (US or EU, **JP is not supported**)
|
||||
- Retail Disc or Digital Copy (can be purchased and downloaded from the [Xbox Store](https://www.xbox.com/en-US/games/store/sonic-unleashed/c098fgnmts8f)).
|
||||
- Title Update required.
|
||||
- All available DLC (Adventure Packs) are optional, but **highly recommended**. **The DLC includes high quality lighting for the entire game**.
|
||||
|
||||
> [!TIP]
|
||||
> If you do not have the Xbox 360 Hard Drive Transfer Cable, please ensure that you purchase the correct revision of it for your console.
|
||||
>
|
||||
> The latest revision works with both original Xbox 360 and Xbox 360 S|E hard drives, but the first revision only works with original Xbox 360 hard drives.
|
||||
>
|
||||
> To know which is which, the first revision cable is gray, whereas the latest revision (which supports any Xbox 360 hard drive) is black.
|
||||
|
||||
2) **Before proceeding with the installation**, make sure to follow the guide on how to acquire the game files from your Xbox 360.
|
||||
|
||||
- Xbox 360 Hard Drive Dumping Guide
|
||||
- [English](/docs/DUMPING-en.md)
|
||||
- Xbox 360 USB Dumping Guide
|
||||
- [English](/docs/DUMPING-USB-en.md)
|
||||
|
||||
3) Download [the latest release](https://github.com/hedge-dev/UnleashedRecomp/releases/latest) of Unleashed Recompiled and extract it to where you'd like the game to be installed.
|
||||
|
||||
4) Run the executable and you will be guided through the installation process. You will be asked to provide the files you acquired in the previous step. When presented with options for how to do this:
|
||||
|
||||
- **Add Files** will only allow you to provide **containers or images dumped from an Xbox 360**. These often come in the form of very large files without associated extensions. Don't worry if you're not aware of what's inside of them, the installer will automatically detect what type of content is inside the container.
|
||||
|
||||
- **Add Folder** will only allow you to provide a **directory with the game's raw files** corresponding to the piece of content that is requested. **It will NOT scan your folder for compatible content!**
|
||||
|
||||
> [!NOTE]
|
||||
> Please note that it is **not possible** to complete the installation if your files have been **modified**. In case of other problems such as black screens or crashes, **do not try to reinstall the game** as it is not possible for the process to result in an invalid installation.
|
||||
|
||||
## Features
|
||||
|
||||
### Easy to Use Installer
|
||||
|
||||
A built-in installation wizard will guide you through the process of installing the game with many integrity checks to ensure the process goes as smoothly as possible. The installer can also be accessed from the title screen, if you wish to add the DLC at a later time.
|
||||
|
||||
### Options Menu
|
||||
|
||||
A completely new options menu accessible from the title screen or pause menu, with an unprecedented level of fidelity to the game's design language. Get access to many quality of life features and graphics options directly within the game with full controller navigation.
|
||||
|
||||
### Achievements
|
||||
|
||||
You will be rewarded with achievements as you progress through the game just like on its original platform. Achievements are recreated with integrated notifications and a new menu also very faithful to the game's design language. Get all of them and you will be rewarded with a gold trophy!
|
||||
|
||||
> [!NOTE]
|
||||
> Achievements cannot be used with platforms such as Steam or RetroAchievements.
|
||||
|
||||
### Custom Localization
|
||||
|
||||
All of the new menus in the port fully support localization for each of the game's originally supported languages; English, Japanese, German, French, Spanish and Italian. As a bonus, switching the game to Japanese also changes the title screen logo to its original Japanese counterpart.
|
||||
|
||||
### High Fidelity
|
||||
|
||||
Special care and attention was taken to recreate the game's visuals as accurately as possible and was always compared to the game running on the original hardware. The colors are as vibrant as those of the PlayStation 3 version, which did not use the color correction filter present in the Xbox 360 version, as was originally intended. Nevertheless, an option to recreate the original warm filter from the Xbox 360 version has been included as an option.
|
||||
|
||||
### High Resolution Enhancements
|
||||
|
||||
Many improvements have been provided to accompany support for higher resolutions:
|
||||
|
||||
- Multisample Anti-Aliasing (MSAA) levels beyond the 2x used by the original game.
|
||||
- Higher quality Depth of Field (DoF), an effect which commonly breaks in emulators when increasing the game's resolution. The original effect's formula was reverse-engineered and versions with 5x5, 7x7 and 9x9 taps were added based on the target resolution.
|
||||
- An "Enhanced" Motion Blur option which uses more samples than the original for a smoother blur.
|
||||
- Support for "Alpha to Coverage" Anti-Aliasing to enhance the visual result of transparent textures with hard edges.
|
||||
- A Bicubic Texture Filtering option which greatly enhances the visual result of Global Illumination textures.
|
||||
- A more precise implementation of the game's reverse Z technique, eliminating most Z-fighting issues and fixing the jittery motion blur in stages like Jungle Joyride.
|
||||
|
||||
### High Performance Renderer
|
||||
|
||||
A new renderer was written from scratch to translate the game's draw calls to modern APIs in a highly efficient way while also taking advantage of multi-threading.
|
||||
|
||||
As emulation of the Xbox 360's GPU is not required in a recompilation, many decisions were made to skip quirks of the original hardware that are not required in a PC port, resulting in great improvements to performance.
|
||||
|
||||
Modern rendering techniques such as bindless textures and shader specialization are also used to maximize the performance on systems with modern hardware whilst also supporting a wide range of lower end hardware.
|
||||
|
||||
Multiple optimizations were made to the game's shadow map rendering and special techniques were developed to automatically detect and skip unnecessary texture copies that are no longer needed in modern APIs.
|
||||
|
||||
Additionally, to support the game's extensive use of asset streaming, parallel transfer queues are leveraged, a feature only available in modern APIs that enable efficient use of available PCI-E bandwidth.
|
||||
|
||||
### High Frame Rate Support
|
||||
|
||||
The game's frame rate cap has been increased by default to 60 FPS, with support for higher targets and unlocked frame rate being available from the options menu. A vast amount of glitches that usually occur at higher frame rates have been fixed and are included as part of the recompilation.
|
||||
|
||||
> [!NOTE]
|
||||
> While the game is considered to be beatable at frame rates higher than 60 FPS, please note that [some issues](#high-frame-rate-glitches) can still occur. Some of these issues may be addressed in future updates.
|
||||
|
||||
### Ultrawide Support
|
||||
|
||||
Aspect ratios for ultrawide displays (such as 21:9 or even wider) are supported out of the box, with options to adjust the alignment of the UI to the edges or to the original 16:9 safe area, if desired. No external codes are required!
|
||||
|
||||
> [!NOTE]
|
||||
> By default, cutscenes are locked to their original aspect ratio to prevent [presentation issues](#ultrawide-visual-issues), as the game was not designed to present these scenes with wider aspect ratios. However, you can use the included option to unlock this feature if you don't mind these issues.
|
||||
|
||||
### Extended Controller Features
|
||||
|
||||
Support for the D-Pad has been added to various parts of the game, allowing the full game to be completed using it over the analog stick, if you so desire.
|
||||
|
||||
If you have a DualShock 4 or DualSense controller, the LED will dynamically change color depending on the game context and support for the touchpad has been added to the World Map, allowing you to spin the planet freely!
|
||||
|
||||
> [!NOTE]
|
||||
> LED and touchpad support for the DualShock 4 and DualSense controllers may be limited when using third-party input translation layers (such as DS4Windows or Steam Input).
|
||||
>
|
||||
> Support for both features may also be limited on Linux.
|
||||
|
||||
### Low Input Latency
|
||||
|
||||
Modern input latency reduction techniques are included to improve the game's responsiveness as much as possible, such as support for [Waitable Swap Chains](https://learn.microsoft.com/en-us/windows/uwp/gaming/reduce-latency-with-dxgi-1-3-swap-chains) in both D3D12 and Vulkan. This methodology was applied directly before the game's input polling to minimize latency. Additionally, the D3D12 backend also supports [Flip Models](https://devblogs.microsoft.com/directx/dxgi-flip-model/), allowing the game to directly present to the screen as quickly as possible.
|
||||
|
||||
### Asynchronous Shader Compilation
|
||||
|
||||
One of the biggest improvements that the recompilation features over emulators is the fact that Pipeline Compilation (commonly known as "Shader Compilation") is directly integrated into the game as part of the asset loading process. This means there's **no stutters during gameplay the first time new objects or effects appear**.
|
||||
|
||||
The renderer will traverse the game's rendering structures and automatically determine what pipelines must be compiled before it considers the asset is loaded. As a result, pipeline compilation is performed in parallel as part of the game's background workers that take care of streaming in the assets, either during regular gameplay or as part of the game's loading screens. This is an improvement that'd never be possible with an emulator, as it requires direct modification of the game to implement this feature.
|
||||
|
||||
While this system is very extensive, some special shaders such as post-processing effects or 2D elements are not detected ahead of time, so a list of pre-determined pipelines are compiled during the game's boot sequence. However, the amount is so low that this is done completely in the background and it was determined that there was no need to show a shader compilation screen on most systems that were tested.
|
||||
|
||||
> [!NOTE]
|
||||
> While stutters from shader compilation are non-existent, please be aware that [some stutters](#unavoidable-stutters) may be encountered due to the way the game was programmed. If you encounter these, please keep in mind that **these are not related to shader compilation**. Some of these issues may be addressed in future updates.
|
||||
|
||||
### Support for Xbox and PlayStation Controller Icons
|
||||
|
||||
You can freely choose whether to use Xbox 360 or PlayStation 3 controller icons. By default, the game will automatically detect which to use based on your controller, but you can select a different option based on your personal preference from within the options menu.
|
||||
|
||||
Game objects that display controller icons such as Reaction Plates or Jump Selectors will automatically switch their textures to match the option in use. Even small details such as the Tornado Defense missions using different colors for the missiles have been accounted for.
|
||||
|
||||
### Quality of Life Options
|
||||
|
||||
Many options have been integrated to address some common quality of life improvements that were deemed to be essential to the port:
|
||||
|
||||
- Hint rings and other types of hints provided by the game during exploration or boss fights can be disabled.
|
||||
- Control tutorials (as referred to by current Sonic games) can be disabled to remove button prompts that show up during gameplay to teach the player how to use certain moves.
|
||||
- The Werehog's Battle Theme, commonly considered to be an annoyance in the original game due to its frequency and interruption of the stage's background music, can now be disabled.
|
||||
- The day/night transformation cutscene in towns can use either the Xbox 360 or PlayStation 3 version, with the Xbox version artificially extending loading times for the full video play out, whilst the PlayStation version ends as soon as it's done loading.
|
||||
- Music Attenuation is a feature that was originally present in the Xbox 360 version of the game, where it'd automatically mute the background music if the console's media player was in use. This feature has been implemented using information provided by the [Windows Media Control](https://learn.microsoft.com/en-us/uwp/api/windows.media.control?view=winrt-26100) APIs in [WinRT](https://en.wikipedia.org/wiki/Windows_Runtime). Applications that interface with Windows 10/11 to display media controls are supported.
|
||||
|
||||
> [!TIP]
|
||||
> You may refer to Music Presence's [list of supported media players](https://github.com/ungive/discord-music-presence/blob/master/documentation/supported-media-players.md) for players that work with Music Attenuation out of the box.
|
||||
|
||||
> [!NOTE]
|
||||
> Please note that Music Attenuation is not currently available on Linux. Support for this feature may be added in a future update.
|
||||
|
||||
### Steam Deck Support
|
||||
|
||||
Native Linux builds that work on the Steam Deck out of the box are available. The Flatpak version can be installed directly and added as a non-Steam game easily via Desktop Mode.
|
||||
|
||||
Be aware that installing the game on a Steam Deck can be a slow process and can easily consume the Deck's storage on the 64 GB model, so make sure you provide the game's files via external storage, such as a microSD card or a network share if possible.
|
||||
|
||||
Performance has been found to improve significantly when the Deck's GPU clock is manually set to its maximum value via Gamescope, even if the game appears to be primarily CPU bottlenecked. Be aware that maintaining the target frame rate may be difficult during demanding sections, such as Werehog combat or DLC stages. Overall, performance is considered to be noticeably better than on the original hardware while using the default settings.
|
||||
|
||||
> [!NOTE]
|
||||
> It is recommended to perform the installation process while in Desktop Mode, as the [file picker may not be available in Game Mode](#file-picker-unavailable-on-steam-deck-in-game-mode) at all times.
|
||||
|
||||
### Mod Support
|
||||
|
||||
The game includes a mod loader compatible with [Hedge Mod Manager](https://github.com/thesupersonic16/HedgeModManager). As an option, users looking for Linux support should try the development version of [HMM 8](https://github.com/hedge-dev/HedgeModManager), which should work out of the box on platforms such as the Steam Deck.
|
||||
|
||||
The mod format uses the same standard as the one used by Sonic Generations mods. Mods that were originally created for [Unleashed Mod Manager](https://github.com/hyperbx/Unleashed-Mod-Manager) are also supported for the sake of backwards compatibility. However, using this mod format is not recommended in the long term and should now be considered deprecated.
|
||||
|
||||
Modded files for the Xbox 360 version of the game are compatible with Unleashed Recompiled. However, some mods may have targeted a version of the game that doesn't contain the title update, so those may have issues and require updates from their authors in order to work with the recompilation. Mods that replace the game's executable file (`default.xex`) or shaders are not supported.
|
||||
|
||||
> [!NOTE]
|
||||
> Code modding is currently not possible and is [planned for a future update](#code-modding). As a workaround for the time being, some codes have been directly embedded into the game and can be accessed through Hedge Mod Manager's Codes tab.
|
||||
>
|
||||
> For information on the mod format, check out Hedge Mod Manager's [Basic Mod File Structure](https://github.com/thesupersonic16/HedgeModManager/wiki/Basic-Mod-File-Structure) wiki page.
|
||||
|
||||
## Update Roadmap
|
||||
|
||||
A number of different features are planned for future updates.
|
||||
|
||||
### Action Remapping
|
||||
|
||||
Options for changing the bindings of the player actions to the controller buttons, as well as support for keyboard bindings. In the meantime, refer to this [question in the FAQ](#what-are-the-keyboard-bindings) for the default keyboard bindings, as well as where to edit them if necessary.
|
||||
|
||||
### More Linux Builds
|
||||
|
||||
Linux builds that don't require Flatpak will be added in the future when a way to [create the shortcuts required for HedgeModManager](https://github.com/hedge-dev/UnleashedRecomp/issues/451) is implemented. In the meantime, you can access these builds through the [Actions](https://github.com/hedge-dev/UnleashedRecomp/actions) panel or [build them yourself](#building).
|
||||
|
||||
### High Frame Rate Fixes
|
||||
|
||||
A number of [gameplay issues](#high-frame-rate-glitches) are currently present that will gradually be fixed as more research into how the game works is done. At the moment, the game is considered to be beatable at high frame rates, but you may be required to limit the game to 60 FPS in order to clear some optional content.
|
||||
|
||||
### Code Modding
|
||||
|
||||
Modifying the code of a recompilation is a fundamentally different process than doing it for a game that only supports one platform on a single executable version. Everyone can build and fork Unleashed Recompiled on their own, which makes the method of targeting a single executable essentially impossible.
|
||||
|
||||
A convenient and maintainable method for code modding is under research and will come in a future update, which will work consistently across all the platforms that Unleashed Recompiled currently supports.
|
||||
|
||||
In the meantime, those interested in doing extensive code modding are recommended to fork the repository and introduce their changes in preparation for the code modding update.
|
||||
|
||||
### Stance on New Features
|
||||
|
||||
The team behind Unleashed Recompiled is committed to preserving the game's original design as best as possible. Additional features that don't fit the vision of the project will be left to mods or forks to cover. As such, requests for such features will not be considered. If you request a new feature, make sure it makes sense within the design of the original game and fits the goal of delivering a PC version of the game.
|
||||
|
||||
## Known Issues
|
||||
|
||||
### Unavoidable Stutters
|
||||
|
||||
While Unleashed Recompiled does its best effort on fixing any hitches and stutters that could originate from the translation process, some problems are not possible to fix due to the way the game was built.
|
||||
|
||||
Even if the recompilation process introduces a small overhead, the game does not perform some tasks in an asynchronous way. These stutters exist on original hardware, but are much more noticeable when targeting higher frame rates.
|
||||
|
||||
Most of the known stutters are related to the game loading in layers of new objects at certain points in stages, spawning in particle systems or playing multiple sound effects. These operations can produce pauses that can last almost 10 milliseconds, even on powerful hardware. These hitches are much easier to notice when targeting frame rates such as 120 FPS, where one frame only lasts around 8 milliseconds.
|
||||
|
||||
These problems are not possible to mitigate without further research into how the game works and will remain a goal for future updates to fix if possible. However, [as mentioned in the FAQ](#how-can-i-improve-performance), it's been found that these stutters can be significantly mitigated by playing on Linux, possibly due to the amount of synchronization primitives used by the game when these operations are performed.
|
||||
|
||||
### High Frame Rate Glitches
|
||||
|
||||
Sonic Unleashed is not a game that runs at a fixed rate on any of its target platforms. While it does target 30 FPS on Xbox 360 and is uncapped on PlayStation 3, it doesn't exactly hit these targets often depending on the area, and if it does, the time step itself is subject to large deviations. The game's programming simply follows the time step as closely as possible, which means inconsistencies in the time step are impossible to reproduce without targeting one exact piece of hardware.
|
||||
|
||||
A lot of the bugs present in the game can largely be explained by sudden spikes in frame times. To make matters worse, some bugs were found to be present only if the frame rate is too stable, such as this [infamous bug](https://github.com/hedge-dev/UnleashedRecomp/issues/100) that shows up in the Wii version of the game because the cutscene was recorded with a fixed time step.
|
||||
|
||||
Unleashed Recompiled features a vast amount of fixes for issues that present themselves when targeting high frame rates, but fixing *all of them* is too big of a task without more knowledge of how the game works. It is possible that these issues will be fixed in the future or that alternative solutions such as transform interpolation are implemented instead.
|
||||
|
||||
If you encounter game breaking bugs or unplayable sections, try temporarily limiting the frame rate to resolve them. Also, check the [Issues](https://github.com/hedge-dev/UnleashedRecomp/issues) page for any existing reports.
|
||||
|
||||
### Ultrawide Visual Issues
|
||||
|
||||
Visual oddities may occur when unlocking the aspect ratio during cutscenes, as the game was not designed for wider formats. Adjusting these scenes can be subjective, so it will be up to mods to address these issues, as they require modifying the game's animations and object placement within cutscene files.
|
||||
|
||||
### Original Game Bugs
|
||||
|
||||
Game bugs present on the original hardware are intentionally preserved and will not be fixed. Please do not report issues for these bugs and verify that the issue does not occur on original hardware before reporting. Bug reports for issues found in the original game will be rejected. Bugs that only happen in Unleashed Recompiled must be accompanied by footage captured on original Xbox 360 hardware showing that the bug does not happen there.
|
||||
|
||||
### File Picker Unavailable on Steam Deck in Game Mode
|
||||
|
||||
Due to some restrictions of how the desktop environment on the Steam Deck works whilst in Game Mode, please note that you may need to at least first boot into Desktop Mode to be able to use the file picker to provide the game files.
|
||||
|
||||
Simply booting at least once in Desktop Mode will enable the Deck to use the file picker when going back to Game Mode. You can complete the entire installation process while in Desktop Mode to save yourself the trouble of browsing through Game Mode if necessary.
|
||||
|
||||
## FAQ
|
||||
|
||||
### Do you have a website or Discord server?
|
||||
|
||||
Unleashed Recompiled does not have an official website, nor is it affiliated with any Discord servers.
|
||||
|
||||
**Please link here when directing anyone to the project.**
|
||||
|
||||
> [!CAUTION]
|
||||
> Do not download builds of Unleashed Recompiled from anywhere but our [Releases](https://github.com/hedge-dev/UnleashedRecomp/releases/latest) page.
|
||||
>
|
||||
> **We will never distribute builds on other websites, via Discord servers or via third-party update tools.**
|
||||
|
||||
### Why does the installer say my files are invalid?
|
||||
|
||||
The installer may display this error for several reasons. Please check the following to ensure your files are valid:
|
||||
|
||||
- Please read the [How to Install](#how-to-install) section and make sure you've acquired all of the necessary files correctly.
|
||||
|
||||
- Verify that you're not trying to add compressed files such as `.zip`, `.7z`, `.rar` or other formats.
|
||||
|
||||
- Only use the **Add Folder** option if you're sure you have a directory with the content's files already extracted, which means it'll only contain files like `.xex`, `.ar.00`, `.arl` and others. **This option will not scan your folder for compatible content**.
|
||||
|
||||
- Ensure that the files you've acquired correspond to the same region. **Discs and Title Updates from different regions can't be used together** and will fail to generate a patch.
|
||||
|
||||
- The installer will only accept **original and unmodified files**. Do not attempt to provide modified files to the installer.
|
||||
|
||||
### What are the keyboard bindings?
|
||||
|
||||
Pad|Key
|
||||
-|-
|
||||
A (Cross)|S
|
||||
B (Circle)|D
|
||||
X (Square)|A
|
||||
Y (Triangle)|W
|
||||
D-Pad - Up|Unbound
|
||||
D-Pad - Down|Unbound
|
||||
D-Pad - Left|Unbound
|
||||
D-Pad - Right|Unbound
|
||||
Start|Return
|
||||
Back (Select)|Backspace
|
||||
Left Trigger (L2)|1
|
||||
Right Trigger (R2)|3
|
||||
Left Bumper (L1)|Q
|
||||
Right Bumper (R1)|E
|
||||
Left Stick - Up|Up Arrow
|
||||
Left Stick - Down|Down Arrow
|
||||
Left Stick - Left|Left Arrow
|
||||
Left Stick - Right|Right Arrow
|
||||
Right Stick - Up|Unbound
|
||||
Right Stick - Down|Unbound
|
||||
Right Stick - Left|Unbound
|
||||
Right Stick - Right|Unbound
|
||||
|
||||
---
|
||||
|
||||
You can change the keyboard bindings by editing `config.toml` located in the [configuration directory](#where-is-the-save-data-and-configuration-file-stored), although using a controller is highly recommended until [Action Remapping](#action-remapping) is added in a future update.
|
||||
|
||||
Refer to the left column of [this enum template](https://github.com/hedge-dev/UnleashedRecomp/blob/main/UnleashedRecomp/user/config.cpp#L40) for a list of valid keys.
|
||||
|
||||
*The default keyboard layout is based on Devil's Details' keyboard layout for Sonic Generations (2011)*.
|
||||
|
||||
### Where is the save data and configuration file stored?
|
||||
|
||||
The save data and configuration files are stored at the following locations:
|
||||
|
||||
- Windows: `%APPDATA%\UnleashedRecomp\`
|
||||
- Linux: `~/.config/UnleashedRecomp/`
|
||||
|
||||
You will find the save data under the `save` folder (or `mlsave`, if using Hedge Mod Manager's save file redirection). The configuration file is named `config.toml`.
|
||||
|
||||
### I want to update the game. How can I avoid losing my save data? Do I need to reinstall the game?
|
||||
|
||||
Updating the game can be done by simply copying and replacing the files from a [release](https://github.com/hedge-dev/UnleashedRecomp/releases) on top of your existing installation. **Your save data and configuration will not be lost.** You won't need to reinstall the game, as the game files will always remain the same across versions of Unleashed Recompiled.
|
||||
|
||||
### How can I force the game to store the save data and configuration in the installation folder?
|
||||
|
||||
You can make the game ignore the [default configuration paths](#where-is-the-save-data-and-configuration-file-stored) and force it to save everything in the installation directory by creating an empty `portable.txt` file. You are directly responsible for the safekeeping of your save data and configuration if you choose this option.
|
||||
|
||||
### How can I install mods?
|
||||
|
||||
**Do not install mods by modifying the game data**. Use [Hedge Mod Manager](https://github.com/thesupersonic16/HedgeModManager) instead. You will not get support for modifying your game files directly.
|
||||
|
||||
> [!WARNING]
|
||||
> Unleashed Mod Manager is not recommended for use with Unleashed Recompiled, as it can make permanent changes to your game files.
|
||||
|
||||
### How can I force the game to run the installation again?
|
||||
|
||||
While it's unlikely you'll need to do this unless you've modified your game files by accident, you can force the installer to run again by using the launch argument: `--install`.
|
||||
|
||||
### How can I force the game to run under X11 or Wayland?
|
||||
|
||||
Use either of the following arguments to force SDL to run under the video driver you want:
|
||||
|
||||
- X11: `--sdl-video-driver x11`
|
||||
- Wayland: `--sdl-video-driver wayland`
|
||||
|
||||
The second argument will be passed directly to SDL as a hint to try to initialize the game with your preferred option.
|
||||
|
||||
### Where is the game data for the Flatpak version installed?
|
||||
|
||||
Given it is not possible to run the game where the Flatpak is stored, the game data will be installed to `~/.var/app/io.github.hedge_dev.unleashedrecomp/data`. The Flatpak build will only recognize this directory as valid. Feel free to reuse this data directory with a native Linux build if you wish to switch in the future.
|
||||
|
||||
If you wish to move this data to another location, you can do so by creating a symlink from this directory to the one where you'll migrate your installation to.
|
||||
|
||||
### How can I improve performance?
|
||||
|
||||
You can lower the values of some of the following graphics options to improve performance. Other options may help, but these usually have the biggest impact:
|
||||
|
||||
- Resolution Scale
|
||||
- Anti-Aliasing
|
||||
- Shadow Resolution
|
||||
|
||||
If you want a detailed performance report along with relevant system information, press F1 to view multiple performance graphs. This will aid in the process of gathering as much information as possible in order to identify the problem.
|
||||
|
||||
When using a system with multiple GPUs (such as a gaming laptop), please make sure that the game has chosen your dedicated graphics adapter and not your integrated one. The F1 menu will display which device has been selected by its name along with other options that might be available. If you're unable to get the game to select the correct device, you can attempt to override this by changing the `GraphicsDevice` property in `config.toml`. The name of the device must be an exact match.
|
||||
|
||||
Some of the game's more demanding sections require strong CPU single-thread performance. While the recompilation process adds minimal CPU overhead, modern hardware is typically bottlenecked by this factor before the GPU.
|
||||
|
||||
Linux has an unexpected advantage when it comes to CPU performance, showing improvements in CPU-bound scenarios. It's currently speculated that this could be due to the heavy amount of thread synchronization the game performs, an operation that is likely to be more performant on Linux's CPU scheduler than on Windows' scheduler. If you wish to gain some additional performance, playing on Linux instead of Windows could yield better results.
|
||||
|
||||
> [!WARNING]
|
||||
> Using external frame rate limiters or performance overlays may degrade performance or have negative consequences.
|
||||
|
||||
### Can I install the game with a PlayStation 3 copy?
|
||||
|
||||
**You cannot use the files from the PlayStation 3 version of the game.** Supporting these files would require an entirely new recompilation, as they have proprietary formatting that only works on PS3 and the code for these formats is only present in that version. All significant differences present in the PS3 version of the game have been included in this project as options.
|
||||
|
||||
### Can I install the game with a Japanese copy?
|
||||
|
||||
The Japanese version of Sonic Unleashed has some minor differences in both file structure and content that make this version of the game incompatible with the international release. Furthermore, the US and EU versions of the game already support Japanese. Supporting this version would only cause mod compatibility issues in the future, so it is unlikely to be added to the update roadmap as it would also require its own recompilation.
|
||||
|
||||
### Why is the game detecting my PlayStation controller as an Xbox controller?
|
||||
|
||||
If you're using a third-party input translation layer (such as DS4Windows or Steam Input), it is recommended that you disable these for full controller support.
|
||||
|
||||
### Will macOS be supported?
|
||||
|
||||
While macOS is not currently on the roadmap, this project welcomes any effort to add support for this platform. Unleashed Recompiled relies on [plume](https://github.com/renderbag/plume), a rendering hardware abstraction layer that will be getting support for Metal in the near future. You can join the macOS discussion on [this issue](https://github.com/hedge-dev/UnleashedRecomp/issues/455).
|
||||
|
||||
### What other platforms will be supported?
|
||||
|
||||
This project does not plan to support any more platforms other than Windows, Linux and potentially macOS at the moment. Any contributors who wish to support more platforms should do so through a fork.
|
||||
|
||||
### Do you have plans to recompile other Xbox 360 games or Sonic games?
|
||||
|
||||
The team behind Unleashed Recompiled does not currently have any plans to port more Xbox 360 games or Sonic games. Anyone is free to look into [XenonRecomp](https://github.com/hedge-dev/XenonRecomp) if they wish to investigate these opportunities.
|
||||
|
||||
## Building
|
||||
|
||||
[Check out the building instructions here](/docs/BUILDING.md).
|
||||
|
||||
## Credits
|
||||
|
||||
### Unleashed Recompiled
|
||||
- [Skyth](https://github.com/blueskythlikesclouds): Creator and Lead Developer of the recompilation, as well as the developer of technologies created for it such as [XenonRecomp](https://github.com/hedge-dev/XenonRecomp) and [XenosRecomp](https://github.com/hedge-dev/XenosRecomp). Other responsibilities include the creation of the graphics and audio backends for the project, alongside custom menus, dynamic UI aspect ratio and various patches and new features added to the game.
|
||||
|
||||
- [Sajid](https://github.com/Sajidur78): Co-creator and Developer of the recompilation, as well as the developer of [XenonAnalyse](https://github.com/hedge-dev/XenonRecomp/?tab=readme-ov-file#XenonAnalyse). Other responsibilities include the implementation of core components for the project, like the Xbox 360 kernel translation layer used to make the game function.
|
||||
|
||||
- [Hyper](https://github.com/hyperbx): Developer of system level features, such as achievement support and the custom menus, alongside various other patches and features to make the game feel right at home on modern systems. Aided in the creation of concept art and the final options menu thumbnails.
|
||||
|
||||
- [Darío](https://github.com/DarioSamo): Creator of the graphics hardware abstraction layer [plume](https://github.com/renderbag/plume), used by the project's graphics backend. Alongside providing consultation for graphics and aiding with shader research and development, other responsibilities include the installer wizard and Linux support. Provided Spanish localization for the custom menus.
|
||||
|
||||
- [ĐeäTh](https://github.com/DeaTh-G): Supervisor of game accurate design philosophy regarding the custom menus. Aided in the implementation of annotation support for Japanese localization, whilst providing minor support for all localization.
|
||||
|
||||
- [RadiantDerg](https://github.com/RadiantDerg): Lead Artist behind the thumbnails used in the options menu. Other responsibilities include the creation of several debugging related codes for Hedge Mod Manager and providing aid with the research of the game's internals.
|
||||
|
||||
- [PTKay](https://github.com/PTKay): Lead Concept Artist for the custom menus. Aided in the development of the installer wizard's visuals.
|
||||
|
||||
- [SuperSonic16](https://github.com/thesupersonic16): Lead Developer of [Hedge Mod Manager](https://github.com/thesupersonic16/HedgeModManager), providing compatibility for modding with the recompilation. Aided in the creation of the deployment system for Linux builds.
|
||||
|
||||
- [NextinHKRY](https://github.com/NextinMono): Aided in researching the game's internals and creating concept art for some options menu thumbnails used in the final release. Provided Italian localization for the custom menus.
|
||||
|
||||
- [LadyLunanova](https://linktr.ee/ladylunanova): Artist behind the achievement trophy sprite and the keyboard and mouse icons used in the installer wizard.
|
||||
|
||||
- [LJSTAR](https://github.com/LJSTARbird): Artist behind the project logo, along with several thumbnail designs used in the options menu and created new icons for the button guide for opening the achievements menu. Provided French localization for the custom menus.
|
||||
|
||||
- [saguinee](https://twitter.com/saguinee): Artist behind thumbnail designs used in the options menu such as Hints and Battle Theme.
|
||||
|
||||
- [Goalringmod27](https://linktr.ee/goalringmod27): Concept Artist behind the achievements overlay shown during gameplay. Aided in the creation of the Transparency Anti-Aliasing thumbnail.
|
||||
|
||||
- [M&M](https://github.com/ActualMandM): Provisional support for dynamic UI aspect ratio.
|
||||
|
||||
- [DaGuAr](https://twitter.com/TheDaguar): Provided Spanish localization for the custom menus alongside Darío.
|
||||
|
||||
- [brianuuuSonic](https://github.com/brianuuu): Provided Japanese localization for the custom menus.
|
||||
|
||||
- [Kitzuku](https://github.com/Kitzuku): Provided German localization for the custom menus.
|
||||
|
||||
### Special Thanks
|
||||
- [Mr-Wiseguy](https://github.com/Mr-Wiseguy): Creator of [N64: Recompiled](https://github.com/N64Recomp/N64Recomp), which was the inspiration behind the creation of this project. Provided information and assistance at the beginning of development.
|
||||
|
||||
- [xenia-project](https://github.com/xenia-project/xenia): Extraordinary amounts of research regarding the inner workings of the Xbox 360, which sped up the development of the recompilation.
|
||||
|
||||
- [Katlin Daigler](https://katlindaigler.carbonmade.com): Provided consultation for logo design.
|
||||
|
||||
- [ocornut](https://github.com/ocornut): Creator of [Dear ImGui](https://github.com/ocornut/imgui), which is used as the backbone of the custom menus.
|
||||
|
||||
- Raymond Chen: Useful resources on Windows application development with his blog ["The Old New Thing"](https://devblogs.microsoft.com/oldnewthing/).
|
||||
|
|
|
@ -183,6 +183,8 @@ set(UNLEASHED_RECOMP_USER_CXX_SOURCES
|
|||
"user/config.cpp"
|
||||
"user/registry.cpp"
|
||||
"user/paths.cpp"
|
||||
"user/persistent_data.cpp"
|
||||
"user/persistent_storage_manager.cpp"
|
||||
)
|
||||
|
||||
set(UNLEASHED_RECOMP_MOD_CXX_SOURCES
|
||||
|
@ -230,6 +232,7 @@ set(UNLEASHED_RECOMP_CXX_SOURCES
|
|||
"exports.cpp"
|
||||
"main.cpp"
|
||||
"misc_impl.cpp"
|
||||
"preload_executable.cpp"
|
||||
"sdl_listener.cpp"
|
||||
"stdafx.cpp"
|
||||
"version.cpp"
|
||||
|
@ -310,7 +313,11 @@ endif()
|
|||
if (UNLEASHED_RECOMP_D3D12)
|
||||
find_package(directx-headers CONFIG REQUIRED)
|
||||
find_package(directx12-agility CONFIG REQUIRED)
|
||||
target_compile_definitions(UnleashedRecomp PRIVATE UNLEASHED_RECOMP_D3D12)
|
||||
target_compile_definitions(UnleashedRecomp PRIVATE
|
||||
UNLEASHED_RECOMP_D3D12
|
||||
D3D12MA_USING_DIRECTX_HEADERS
|
||||
D3D12MA_OPTIONS16_SUPPORTED
|
||||
)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
@ -434,35 +441,6 @@ compile_pixel_shader(resolve_msaa_depth_2x)
|
|||
compile_pixel_shader(resolve_msaa_depth_4x)
|
||||
compile_pixel_shader(resolve_msaa_depth_8x)
|
||||
|
||||
function(generate_aggregate_header INPUT_DIRECTORY OUTPUT_FILE)
|
||||
get_filename_component(ABS_OUTPUT_FILE "${OUTPUT_FILE}" ABSOLUTE)
|
||||
file(GLOB_RECURSE HEADER_FILES "${INPUT_DIRECTORY}/*.h")
|
||||
set(HEADER_CONTENT "#pragma once\n\n")
|
||||
|
||||
foreach(HEADER_FILE IN LISTS HEADER_FILES)
|
||||
get_filename_component(ABS_HEADER_FILE "${HEADER_FILE}" ABSOLUTE)
|
||||
if (ABS_HEADER_FILE STREQUAL ABS_OUTPUT_FILE)
|
||||
continue()
|
||||
endif()
|
||||
file(RELATIVE_PATH RELATIVE_HEADER_FILE "${INPUT_DIRECTORY}" "${HEADER_FILE}")
|
||||
string(APPEND HEADER_CONTENT "#include \"${RELATIVE_HEADER_FILE}\"\n")
|
||||
endforeach()
|
||||
|
||||
if (EXISTS "${OUTPUT_FILE}")
|
||||
file(READ "${OUTPUT_FILE}" EXISTING_CONTENT)
|
||||
if (EXISTING_CONTENT STREQUAL HEADER_CONTENT)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(WRITE "${OUTPUT_FILE}" "${HEADER_CONTENT}")
|
||||
endfunction()
|
||||
|
||||
generate_aggregate_header(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/api"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/api/SWA.h"
|
||||
)
|
||||
|
||||
set(RESOURCES_SOURCE_PATH "${PROJECT_SOURCE_DIR}/../UnleashedRecompResources")
|
||||
set(RESOURCES_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/res")
|
||||
|
||||
|
|
1
UnleashedRecomp/api
Submodule
1
UnleashedRecomp/api
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit f299dd8cf272a0110c91e54e2b6e308a2d897966
|
|
@ -1,6 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
class CBase {};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
class CMotionPattern : CBase {};
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
#include <CSD/Manager/csdmBase.h>
|
||||
#include <CSD/Manager/csdmResourceBase.h>
|
||||
#include <CSD/Manager/csdmNodeObserver.h>
|
||||
#include <CSD/Manager/csdmSubjectBase.h>
|
||||
#include <Hedgehog/Math/Vector.h>
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
struct Node;
|
||||
|
||||
class CNode : public CResourceBase<Node>, SubjectBase<CNodeObserver, CNode>, CBase
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x34);
|
||||
xpointer<CMotionPattern> m_pMotionPattern;
|
||||
SWA_INSERT_PADDING(0x18);
|
||||
|
||||
~CNode();
|
||||
|
||||
void SetText(const char* in_pText);
|
||||
void SetText(const wchar_t* in_pText);
|
||||
void GetPosition(Hedgehog::Math::CVector2& out_rResult) const;
|
||||
void SetPosition(float in_X, float in_Y);
|
||||
void SetHideFlag(uint32_t in_HideFlag);
|
||||
void SetRotation(float in_Rotation);
|
||||
void SetScale(float in_X, float in_Y);
|
||||
void SetPatternIndex(uint32_t in_PatternIndex);
|
||||
};
|
||||
}
|
||||
|
||||
#include <CSD/Manager/csdmNode.inl>
|
|
@ -1,49 +0,0 @@
|
|||
#include "SWA.inl"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
inline CNode::~CNode()
|
||||
{
|
||||
SWA_VIRTUAL_FUNCTION(void, 0, this);
|
||||
}
|
||||
|
||||
inline void CNode::SetText(const char* in_pText)
|
||||
{
|
||||
GuestToHostFunction<int>(sub_830BF640, this, in_pText);
|
||||
}
|
||||
|
||||
inline void CNode::SetText(const wchar_t* in_pText)
|
||||
{
|
||||
GuestToHostFunction<int>(sub_830BF640, this, in_pText);
|
||||
}
|
||||
|
||||
inline void CNode::GetPosition(Hedgehog::Math::CVector2& out_rResult) const
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BF008, &out_rResult, this);
|
||||
}
|
||||
|
||||
inline void CNode::SetPosition(float in_X, float in_Y)
|
||||
{
|
||||
GuestToHostFunction<int>(sub_830BF078, this, in_X, in_Y);
|
||||
}
|
||||
|
||||
inline void CNode::SetHideFlag(uint32_t in_HideFlag)
|
||||
{
|
||||
GuestToHostFunction<int>(sub_830BF080, this, in_HideFlag);
|
||||
}
|
||||
|
||||
inline void CNode::SetRotation(float in_Rotation)
|
||||
{
|
||||
GuestToHostFunction<int>(sub_830BF088, this, in_Rotation);
|
||||
}
|
||||
|
||||
inline void CNode::SetScale(float in_X, float in_Y)
|
||||
{
|
||||
GuestToHostFunction<int>(sub_830BF090, this, in_X, in_Y);
|
||||
}
|
||||
|
||||
inline void CNode::SetPatternIndex(uint32_t in_PatternIndex)
|
||||
{
|
||||
GuestToHostFunction<int>(sub_830BF300, this, in_PatternIndex);
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Manager/csdmObserverBase.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
class CNode;
|
||||
|
||||
class CNodeObserver : public CObserverBase<CNode> {};
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
template<typename TObservee>
|
||||
class CObserverBase
|
||||
{
|
||||
public:
|
||||
struct Vftable
|
||||
{
|
||||
be<uint32_t> m_fpDtor;
|
||||
};
|
||||
|
||||
xpointer<Vftable> m_pVftable;
|
||||
SWA_INSERT_PADDING(0x08);
|
||||
|
||||
~CObserverBase();
|
||||
};
|
||||
}
|
||||
|
||||
#include "CSD/Manager/csdmObserverBase.inl"
|
|
@ -1,8 +0,0 @@
|
|||
namespace Chao::CSD
|
||||
{
|
||||
template<typename TObservee>
|
||||
inline CObserverBase<TObservee>::~CObserverBase()
|
||||
{
|
||||
GuestToHostFunction<void>(m_pVftable->m_fpDtor, this);
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
#include "CSD/Manager/csdmBase.h"
|
||||
#include "CSD/Manager/csdmResourceBase.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
struct Project;
|
||||
class CProject;
|
||||
class CScene;
|
||||
class CTexList;
|
||||
|
||||
class CProject : public CResourceBase<Project>, CBase
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x1C);
|
||||
RCPtr<CTexList> m_rcTexList;
|
||||
SWA_INSERT_PADDING(0x1C);
|
||||
|
||||
RCPtr<CScene> CreateScene(const char* in_pName) const;
|
||||
RCPtr<CScene> CreateScene(const char* in_pName, const char* in_pMotionName) const;
|
||||
|
||||
void DestroyScene(CScene* in_pScene);
|
||||
void DestroyScene(RCPtr<CScene>& inout_rcScene);
|
||||
|
||||
static void DestroyScene(CProject* in_pProject, RCPtr<CScene>& inout_rcScene);
|
||||
};
|
||||
}
|
||||
|
||||
#include "CSD/Manager/csdmProject.inl"
|
|
@ -1,40 +0,0 @@
|
|||
#include "kernel/function.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
inline RCPtr<CScene> CProject::CreateScene(const char* in_pName) const
|
||||
{
|
||||
RCPtr<CScene> rcScene;
|
||||
GuestToHostFunction<void>(sub_830BEE00, this, rcScene, in_pName, nullptr);
|
||||
return rcScene;
|
||||
}
|
||||
|
||||
inline RCPtr<CScene> CProject::CreateScene(const char* in_pName, const char* in_pMotionName) const
|
||||
{
|
||||
RCPtr<CScene> rcScene;
|
||||
GuestToHostFunction<void>(sub_830BECE0, this, rcScene, in_pName, in_pMotionName, nullptr);
|
||||
return rcScene;
|
||||
}
|
||||
|
||||
inline void CProject::DestroyScene(CScene* in_pScene)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BE298, this, in_pScene);
|
||||
}
|
||||
|
||||
inline void CProject::DestroyScene(RCPtr<CScene>& inout_rcScene)
|
||||
{
|
||||
if (!inout_rcScene)
|
||||
return;
|
||||
|
||||
DestroyScene(inout_rcScene.Get());
|
||||
inout_rcScene = nullptr;
|
||||
}
|
||||
|
||||
inline void CProject::DestroyScene(CProject* in_pProject, RCPtr<CScene>& inout_rcScene)
|
||||
{
|
||||
if (in_pProject)
|
||||
in_pProject->DestroyScene(inout_rcScene);
|
||||
else
|
||||
inout_rcScene = nullptr;
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Manager/csdmRCPtrAbs.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
class RCPtrAbs::RCObject
|
||||
{
|
||||
public:
|
||||
struct Vftable
|
||||
{
|
||||
be<uint32_t> m_fpDtor;
|
||||
be<uint32_t> m_fpDeallocate;
|
||||
};
|
||||
|
||||
xpointer<Vftable> m_pVftable;
|
||||
xpointer<void> m_pMemory;
|
||||
be<uint32_t> m_RefCount;
|
||||
xpointer<void> m_pDealloctor;
|
||||
be<uint32_t> m_eDealloctor;
|
||||
|
||||
~RCObject();
|
||||
void Deallocate(void* in_pMemory);
|
||||
void Release();
|
||||
};
|
||||
}
|
||||
|
||||
#include "CSD/Manager/csdmRCObject.inl"
|
|
@ -1,35 +0,0 @@
|
|||
namespace Chao::CSD
|
||||
{
|
||||
inline RCPtrAbs::RCObject::~RCObject()
|
||||
{
|
||||
GuestToHostFunction<void>(m_pVftable->m_fpDtor, this);
|
||||
}
|
||||
|
||||
inline RCPtrAbs::~RCPtrAbs()
|
||||
{
|
||||
RCPtrAbs::RCObject* pObj = m_pObject;
|
||||
|
||||
m_pObject = nullptr;
|
||||
|
||||
if (pObj)
|
||||
pObj->Release();
|
||||
}
|
||||
|
||||
inline void* RCPtrAbs::GetAbs() const
|
||||
{
|
||||
if (!m_pObject)
|
||||
return nullptr;
|
||||
|
||||
return m_pObject->m_pMemory;
|
||||
}
|
||||
|
||||
inline void RCPtrAbs::RCObject::Deallocate(void* in_pMemory)
|
||||
{
|
||||
GuestToHostFunction<void>(m_pVftable->m_fpDeallocate, this, in_pMemory);
|
||||
}
|
||||
|
||||
inline void RCPtrAbs::RCObject::Release()
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BA068, this);
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Manager/csdmRCPtr.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
template<typename T>
|
||||
class RCPtr<T>::RCObjectImp : public RCObject {};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
namespace Chao::CSD
|
||||
{
|
||||
template<typename T>
|
||||
void RCPtr<T>::RCObjectImp::Deallocate(void* in_pMemory)
|
||||
{
|
||||
// delete static_cast<T*>(in_pMemory);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
RCPtrAbs::RCObject* RCPtr<T>::CreateRCObject()
|
||||
{
|
||||
return new RCObjectImp();
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Manager/csdmRCPtrAbs.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
template<typename T>
|
||||
class RCPtr : RCPtrAbs
|
||||
{
|
||||
public:
|
||||
class RCObjectImp;
|
||||
|
||||
RCPtr() : RCPtrAbs() {}
|
||||
RCPtr(T* in_pMemory) : RCPtrAbs(in_pMemory) {}
|
||||
RCPtr(const RCPtr& in_rOther) : RCPtrAbs(in_rOther) {}
|
||||
RCPtr(RCPtr&& in_rOther) : RCPtrAbs(std::move(in_rOther)) {}
|
||||
|
||||
void Attach(T* in_pObject);
|
||||
|
||||
T* Get() const;
|
||||
void Set(const RCPtr& in_rOther);
|
||||
|
||||
T* operator*() const;
|
||||
T* operator->() const;
|
||||
|
||||
RCPtr& operator=(const RCPtr& in_rOther);
|
||||
|
||||
operator bool() const;
|
||||
};
|
||||
}
|
||||
|
||||
#include "CSD/Manager/csdmRCPtr.inl"
|
|
@ -1,45 +0,0 @@
|
|||
namespace Chao::CSD
|
||||
{
|
||||
template<typename T>
|
||||
void RCPtr<T>::Attach(T* in_pObject)
|
||||
{
|
||||
RCPtrAbs::AttachAbs(in_pObject);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* RCPtr<T>::Get() const
|
||||
{
|
||||
return static_cast<T*>(RCPtrAbs::GetAbs());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void RCPtr<T>::Set(const RCPtr& in_rOther)
|
||||
{
|
||||
RCPtrAbs::SetAbs(in_rOther);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* RCPtr<T>::operator*() const
|
||||
{
|
||||
return Get();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* RCPtr<T>::operator->() const
|
||||
{
|
||||
return Get();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
RCPtr<T>& RCPtr<T>::operator=(const RCPtr& in_rOther)
|
||||
{
|
||||
Set(in_rOther);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
RCPtr<T>::operator bool() const
|
||||
{
|
||||
return m_pObject != nullptr;
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
class RCPtrAbs
|
||||
{
|
||||
public:
|
||||
class RCObject;
|
||||
|
||||
struct Vftable
|
||||
{
|
||||
be<uint32_t> m_fpDtor;
|
||||
be<uint32_t> m_fpCreateRCObject;
|
||||
};
|
||||
|
||||
xpointer<Vftable> m_pVftable;
|
||||
xpointer<RCObject> m_pObject;
|
||||
|
||||
RCPtrAbs();
|
||||
RCPtrAbs(void* in_pMemory);
|
||||
RCPtrAbs(const RCPtrAbs& in_rOther);
|
||||
RCPtrAbs(RCPtrAbs&& in_rPtr);
|
||||
|
||||
~RCPtrAbs();
|
||||
RCObject* CreateRCObject();
|
||||
|
||||
void AttachAbs(void* in_pMemory);
|
||||
void* GetAbs() const;
|
||||
void SetAbs(const RCPtrAbs& in_rPtr);
|
||||
|
||||
void* operator*() const;
|
||||
void* operator->() const;
|
||||
|
||||
RCPtrAbs& operator=(const RCPtrAbs& in_rPtr);
|
||||
|
||||
operator bool() const;
|
||||
};
|
||||
}
|
||||
|
||||
#include "CSD/Manager/csdmRCPtrAbs.inl"
|
|
@ -1,58 +0,0 @@
|
|||
namespace Chao::CSD
|
||||
{
|
||||
inline RCPtrAbs::RCPtrAbs()
|
||||
{
|
||||
AttachAbs(nullptr);
|
||||
}
|
||||
|
||||
inline RCPtrAbs::RCPtrAbs(void* in_pMemory)
|
||||
{
|
||||
AttachAbs(in_pMemory);
|
||||
}
|
||||
|
||||
inline RCPtrAbs::RCPtrAbs(const RCPtrAbs& in_rOther)
|
||||
{
|
||||
SetAbs(in_rOther);
|
||||
}
|
||||
|
||||
inline RCPtrAbs::RCPtrAbs(RCPtrAbs&& in_rPtr) : m_pObject(in_rPtr.m_pObject)
|
||||
{
|
||||
in_rPtr.m_pObject = nullptr;
|
||||
}
|
||||
|
||||
inline RCPtrAbs::RCObject* RCPtrAbs::CreateRCObject()
|
||||
{
|
||||
return GuestToHostFunction<RCPtrAbs::RCObject*>(m_pVftable->m_fpCreateRCObject, this);
|
||||
}
|
||||
|
||||
inline void RCPtrAbs::AttachAbs(void* in_pMemory)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BA298, this, in_pMemory);
|
||||
}
|
||||
|
||||
inline void RCPtrAbs::SetAbs(const RCPtrAbs& in_rPtr)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BA328, this, in_rPtr);
|
||||
}
|
||||
|
||||
inline void* RCPtrAbs::operator*() const
|
||||
{
|
||||
return GetAbs();
|
||||
}
|
||||
|
||||
inline void* RCPtrAbs::operator->() const
|
||||
{
|
||||
return GetAbs();
|
||||
}
|
||||
|
||||
inline RCPtrAbs& RCPtrAbs::operator=(const RCPtrAbs& in_rPtr)
|
||||
{
|
||||
SetAbs(in_rPtr);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline RCPtrAbs::operator bool() const
|
||||
{
|
||||
return m_pObject != nullptr;
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Manager/csdmRCPtr.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
template<typename T>
|
||||
class CResourceBase
|
||||
{
|
||||
public:
|
||||
struct Vftable
|
||||
{
|
||||
be<uint32_t> m_fpDtor;
|
||||
be<uint32_t> m_fpCopyResource;
|
||||
};
|
||||
|
||||
xpointer<Vftable> m_pVftable;
|
||||
RCPtr<uint8_t> m_rcResourceHolder;
|
||||
xpointer<T> m_pResource;
|
||||
|
||||
~CResourceBase();
|
||||
void CopyResource(const CResourceBase& in_rOther);
|
||||
};
|
||||
}
|
||||
|
||||
#include "CSD/Manager/csdmResourceBase.h"
|
|
@ -1,15 +0,0 @@
|
|||
namespace Chao::CSD
|
||||
{
|
||||
template<typename T>
|
||||
inline CResourceBase<T>::~CResourceBase()
|
||||
{
|
||||
GuestToHostFunction<void>(m_pVftable->m_fpDtor, this);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline void CResourceBase<T>::CopyResource(const CResourceBase& in_rOther)
|
||||
{
|
||||
m_rcResourceHolder = in_rOther.m_rcResourceHolder;
|
||||
m_pResource = in_rOther.m_pResource;
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
#include "CSD/Manager/csdmBase.h"
|
||||
#include "CSD/Manager/csdmResourceBase.h"
|
||||
#include "CSD/Manager/csdmSceneObserver.h"
|
||||
#include "CSD/Manager/csdmSubjectBase.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
struct Scene;
|
||||
class CScene;
|
||||
class CNode;
|
||||
|
||||
enum EMotionRepeatType : uint32_t
|
||||
{
|
||||
eMotionRepeatType_PlayOnce = 0,
|
||||
eMotionRepeatType_Loop = 1,
|
||||
eMotionRepeatType_PingPong = 2,
|
||||
eMotionRepeatType_PlayThenDestroy = 3
|
||||
};
|
||||
|
||||
class CScene : public CResourceBase<Scene>, SubjectBase<CSceneObserver, CScene>, CBase
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x60);
|
||||
be<float> m_PrevMotionFrame;
|
||||
be<float> m_MotionFrame;
|
||||
be<float> m_MotionSpeed;
|
||||
be<float> m_MotionStartFrame;
|
||||
be<float> m_MotionEndFrame;
|
||||
SWA_INSERT_PADDING(0x0C);
|
||||
be<uint32_t> m_MotionDisableFlag;
|
||||
SWA_INSERT_PADDING(0x10);
|
||||
be<EMotionRepeatType> m_MotionRepeatType;
|
||||
SWA_INSERT_PADDING(0x2C);
|
||||
|
||||
~CScene();
|
||||
void Update(float in_DeltaTime = 0.0f);
|
||||
void Render(void* in_pUnk);
|
||||
|
||||
void GetNode(RCPtr<CNode>& out_rResult, const char* in_pName);
|
||||
|
||||
bool SetMotion(const char* in_pName);
|
||||
void SetMotionFrame(float in_MotionFrame);
|
||||
void SetPosition(float in_X, float in_Y);
|
||||
void SetHideFlag(uint32_t in_HideFlag);
|
||||
void SetRotation(float in_Angle);
|
||||
void SetScale(float in_X, float in_Y);
|
||||
};
|
||||
}
|
||||
|
||||
#include "CSD/Manager/csdmScene.inl"
|
|
@ -1,53 +0,0 @@
|
|||
namespace Chao::CSD
|
||||
{
|
||||
inline CScene::~CScene()
|
||||
{
|
||||
SWA_VIRTUAL_FUNCTION(void, 0, this);
|
||||
}
|
||||
|
||||
inline void CScene::Update(float in_DeltaTime)
|
||||
{
|
||||
SWA_VIRTUAL_FUNCTION(void, 2, this, in_DeltaTime);
|
||||
}
|
||||
|
||||
inline void CScene::Render(void* in_pUnk)
|
||||
{
|
||||
SWA_VIRTUAL_FUNCTION(void, 3, this, in_pUnk);
|
||||
}
|
||||
|
||||
inline void CScene::GetNode(RCPtr<CNode>& out_rResult, const char* in_pName)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BCCA8, &out_rResult, this, in_pName);
|
||||
}
|
||||
|
||||
inline bool CScene::SetMotion(const char* in_pName)
|
||||
{
|
||||
return GuestToHostFunction<bool>(sub_830BA760, this, in_pName);
|
||||
}
|
||||
|
||||
inline void CScene::SetMotionFrame(float in_MotionFrame)
|
||||
{
|
||||
m_PrevMotionFrame = in_MotionFrame;
|
||||
m_MotionFrame = in_MotionFrame;
|
||||
}
|
||||
|
||||
inline void CScene::SetPosition(float in_X, float in_Y)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BB550, this, in_X, in_Y);
|
||||
}
|
||||
|
||||
inline void CScene::SetHideFlag(uint32_t in_HideFlag)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BB378, this, in_HideFlag);
|
||||
}
|
||||
|
||||
inline void CScene::SetRotation(float in_Angle)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BB5F8, this, in_Angle);
|
||||
}
|
||||
|
||||
inline void CScene::SetScale(float in_X, float in_Y)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_830BB650, this, in_X, in_Y);
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Manager/csdmObserverBase.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
class CScene;
|
||||
|
||||
class CSceneObserver : public CObserverBase<CScene> {};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
template<typename TObserver, typename TObservee>
|
||||
class SubjectBase
|
||||
{
|
||||
public:
|
||||
struct Vftable
|
||||
{
|
||||
be<uint32_t> m_fpDtor;
|
||||
be<uint32_t> m_fpGetObservee;
|
||||
};
|
||||
|
||||
xpointer<Vftable> m_pVftable;
|
||||
SWA_INSERT_PADDING(0x0C);
|
||||
|
||||
~SubjectBase();
|
||||
TObservee* GetObservee() const;
|
||||
};
|
||||
}
|
||||
|
||||
#include "CSD/Manager/csdmSubjectBase.inl"
|
|
@ -1,14 +0,0 @@
|
|||
namespace Chao::CSD
|
||||
{
|
||||
template<typename TObserver, typename TObservee>
|
||||
inline SubjectBase<TObserver, TObservee>::~SubjectBase()
|
||||
{
|
||||
GuestToHostFunction<void>(m_pVftable->m_fpDtor, this);
|
||||
}
|
||||
|
||||
template<typename TObserver, typename TObservee>
|
||||
inline TObservee* SubjectBase<TObserver, TObservee>::GetObservee() const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Manager/csdmBase.h"
|
||||
#include "CSD/Manager/csdmRCPtr.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
class CTexList : public CBase
|
||||
{
|
||||
public:
|
||||
struct Vftable
|
||||
{
|
||||
be<uint32_t> m_fpDtor;
|
||||
};
|
||||
|
||||
xpointer<Vftable> m_pVftable;
|
||||
RCPtr<uint8_t> m_rcData;
|
||||
|
||||
~CTexList();
|
||||
};
|
||||
}
|
||||
|
||||
#include "CSD/Platform/csdTexList.inl"
|
|
@ -1,7 +0,0 @@
|
|||
namespace Chao::CSD
|
||||
{
|
||||
inline CTexList::~CTexList()
|
||||
{
|
||||
GuestToHostFunction<void>(m_pVftable->m_fpDtor, this);
|
||||
}
|
||||
}
|
|
@ -1,378 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Base/System/hhAllocator.h>
|
||||
|
||||
namespace hh
|
||||
{
|
||||
template<
|
||||
class Key,
|
||||
class T,
|
||||
class Compare = std::less<Key>,
|
||||
class Allocator = Hedgehog::Base::TAllocator<std::pair<const Key, T>>>
|
||||
class map
|
||||
{
|
||||
protected:
|
||||
enum EColor
|
||||
{
|
||||
eColor_Red,
|
||||
eColor_Black
|
||||
};
|
||||
|
||||
struct SNode
|
||||
{
|
||||
using allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<SNode>;
|
||||
|
||||
xpointer<SNode> pLeft;
|
||||
xpointer<SNode> pParent;
|
||||
xpointer<SNode> pRight;
|
||||
std::pair<const Key, T> Value;
|
||||
uint8_t Color;
|
||||
bool IsNil;
|
||||
};
|
||||
|
||||
Compare m_Comp;
|
||||
typename SNode::allocator_type m_Alloc;
|
||||
xpointer<SNode> m_pHead;
|
||||
be<uint32_t> m_Count;
|
||||
|
||||
struct SFindResult
|
||||
{
|
||||
SNode* pParent;
|
||||
bool IsRight;
|
||||
SNode* pBound;
|
||||
};
|
||||
|
||||
bool LowerBoundDuplicate(const SNode* pBound, const Key& in_rKey) const
|
||||
{
|
||||
return !pBound->IsNil && !m_Comp(in_rKey, pBound->Value.first);
|
||||
}
|
||||
|
||||
SFindResult FindLowerBound(const Key& in_rKey) const
|
||||
{
|
||||
SFindResult result{ m_pHead->pParent, true, m_pHead };
|
||||
SNode* pNode = result.pParent;
|
||||
|
||||
while (!pNode->IsNil)
|
||||
{
|
||||
result.pParent = pNode;
|
||||
if (m_Comp(pNode->Value.first, in_rKey))
|
||||
{
|
||||
result.IsRight = true;
|
||||
pNode = pNode->pRight;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.IsRight = false;
|
||||
result.pBound = pNode;
|
||||
pNode = pNode->pLeft;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
SNode* Find(const Key& in_rKey) const
|
||||
{
|
||||
const SFindResult result = FindLowerBound(in_rKey);
|
||||
return LowerBoundDuplicate(result.pBound, in_rKey) ? result.pBound : m_pHead.get();
|
||||
}
|
||||
|
||||
static SNode* Max(SNode* pNode)
|
||||
{
|
||||
while (!pNode->pRight->IsNil)
|
||||
pNode = pNode->pRight;
|
||||
|
||||
return pNode;
|
||||
}
|
||||
|
||||
static SNode* Min(SNode* pNode)
|
||||
{
|
||||
while (!pNode->pLeft->IsNil)
|
||||
pNode = pNode->pLeft;
|
||||
|
||||
return pNode;
|
||||
}
|
||||
|
||||
public:
|
||||
using key_type = Key;
|
||||
using mapped_type = T;
|
||||
using value_type = std::pair<const Key, T>;
|
||||
using size_type = std::size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using key_compare = Compare;
|
||||
using allocator_type = Allocator;
|
||||
using reference = value_type&;
|
||||
using const_reference = const value_type&;
|
||||
using pointer = typename std::allocator_traits<Allocator>::pointer;
|
||||
using const_pointer = typename std::allocator_traits<Allocator>::const_pointer;
|
||||
|
||||
class iterator
|
||||
{
|
||||
public:
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
using value_type = std::pair<const Key, T>;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = value_type*;
|
||||
using reference = value_type&;
|
||||
|
||||
iterator(const std::nullptr_t&) = delete;
|
||||
iterator(SNode* pNode) : m_pNode(pNode) {}
|
||||
|
||||
reference operator*() const { return m_pNode->Value; }
|
||||
pointer operator->() const { return &m_pNode->Value; }
|
||||
|
||||
iterator& operator++()
|
||||
{
|
||||
if (m_pNode->pRight->IsNil)
|
||||
{
|
||||
SNode* pNode;
|
||||
while (!(pNode = m_pNode->pParent)->IsNil && m_pNode == pNode->pRight)
|
||||
m_pNode = pNode;
|
||||
|
||||
m_pNode = pNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pNode = map::Min(m_pNode->pRight);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator operator++(int)
|
||||
{
|
||||
iterator temp(*this);
|
||||
++(*this);
|
||||
return temp;
|
||||
}
|
||||
|
||||
iterator& operator--()
|
||||
{
|
||||
if (m_pNode->IsNil)
|
||||
{
|
||||
m_pNode = m_pNode->pRight;
|
||||
}
|
||||
else if (m_pNode->pLeft->IsNil)
|
||||
{
|
||||
SNode* pNode;
|
||||
while (!(pNode = m_pNode->pParent)->IsNil && m_pNode == pNode->pLeft)
|
||||
m_pNode = pNode;
|
||||
|
||||
if (!m_pNode->IsNil)
|
||||
m_pNode = pNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pNode = map::Max(m_pNode->pLeft);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator operator--(int)
|
||||
{
|
||||
iterator temp(*this);
|
||||
--(*this);
|
||||
return temp;
|
||||
}
|
||||
|
||||
bool operator==(const iterator& rhs) const { return m_pNode == rhs.m_pNode; }
|
||||
bool operator!=(const iterator& rhs) const { return !(*this == rhs); }
|
||||
|
||||
private:
|
||||
SNode* m_pNode;
|
||||
friend class iterator;
|
||||
friend class map;
|
||||
};
|
||||
|
||||
class const_iterator
|
||||
{
|
||||
public:
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
using value_type = std::pair<const Key, T>;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = const value_type*;
|
||||
using reference = const value_type&;
|
||||
|
||||
const_iterator(const std::nullptr_t&) = delete;
|
||||
const_iterator(SNode* pNode) : m_pNode(pNode) {}
|
||||
const_iterator(const iterator& iterator) : m_pNode(iterator.m_pNode) {}
|
||||
|
||||
reference operator*() const { return m_pNode->Value; }
|
||||
pointer operator->() const { return &m_pNode->Value; }
|
||||
|
||||
const_iterator& operator++()
|
||||
{
|
||||
if (m_pNode->pRight->IsNil)
|
||||
{
|
||||
SNode* pNode;
|
||||
while (!(pNode = m_pNode->pParent)->IsNil && m_pNode == pNode->pRight)
|
||||
m_pNode = pNode;
|
||||
|
||||
m_pNode = pNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pNode = map::Min(m_pNode->pRight);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
const_iterator operator++(int)
|
||||
{
|
||||
const_iterator temp(*this);
|
||||
++(*this);
|
||||
return temp;
|
||||
}
|
||||
|
||||
const_iterator& operator--()
|
||||
{
|
||||
if (m_pNode->IsNil)
|
||||
{
|
||||
m_pNode = m_pNode->pRight;
|
||||
}
|
||||
else if (m_pNode->pLeft->IsNil)
|
||||
{
|
||||
SNode* pNode;
|
||||
while (!(pNode = m_pNode->pParent)->IsNil && m_pNode == pNode->pLeft)
|
||||
m_pNode = pNode;
|
||||
|
||||
if (!m_pNode->IsNil)
|
||||
m_pNode = pNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pNode = map::Max(m_pNode->pLeft);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
const_iterator operator--(int)
|
||||
{
|
||||
const_iterator temp(*this);
|
||||
--(*this);
|
||||
return temp;
|
||||
}
|
||||
|
||||
bool operator==(const const_iterator& rhs) const { return m_pNode == rhs.m_pNode; }
|
||||
bool operator!=(const const_iterator& rhs) const { return !(*this == rhs); }
|
||||
|
||||
private:
|
||||
SNode* m_pNode;
|
||||
friend class map;
|
||||
};
|
||||
|
||||
using reverse_iterator = std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||
|
||||
public:
|
||||
allocator_type get_allocator() const
|
||||
{
|
||||
return m_Alloc;
|
||||
}
|
||||
|
||||
T& at(const Key& key)
|
||||
{
|
||||
return Find(key)->Value.second;
|
||||
}
|
||||
|
||||
const T& at(const Key& key) const
|
||||
{
|
||||
return Find(key)->Value.second;
|
||||
}
|
||||
|
||||
iterator begin()
|
||||
{
|
||||
return iterator(m_pHead->pLeft);
|
||||
}
|
||||
|
||||
const_iterator begin() const
|
||||
{
|
||||
return const_iterator(m_pHead->pLeft);
|
||||
}
|
||||
|
||||
const_iterator cbegin() const
|
||||
{
|
||||
return const_iterator(m_pHead->pLeft);
|
||||
}
|
||||
|
||||
iterator end()
|
||||
{
|
||||
return iterator(m_pHead);
|
||||
}
|
||||
|
||||
const_iterator end() const
|
||||
{
|
||||
return const_iterator(m_pHead);
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
{
|
||||
return const_iterator(m_pHead);
|
||||
}
|
||||
|
||||
reverse_iterator rbegin()
|
||||
{
|
||||
return reverse_iterator(end());
|
||||
}
|
||||
|
||||
const_reverse_iterator rbegin() const
|
||||
{
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
|
||||
const_reverse_iterator crbegin() const
|
||||
{
|
||||
return const_reverse_iterator(cend());
|
||||
}
|
||||
|
||||
reverse_iterator rend()
|
||||
{
|
||||
return reverse_iterator(begin());
|
||||
}
|
||||
|
||||
const_reverse_iterator rend() const
|
||||
{
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
|
||||
const_reverse_iterator crend() const
|
||||
{
|
||||
return const_reverse_iterator(cbegin());
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
{
|
||||
return m_Count == 0;
|
||||
}
|
||||
|
||||
size_type size() const
|
||||
{
|
||||
return m_Count;
|
||||
}
|
||||
|
||||
size_type max_size() const
|
||||
{
|
||||
return ~0u;
|
||||
}
|
||||
|
||||
size_type count(const Key& key) const
|
||||
{
|
||||
return LowerBoundDuplicate(FindLowerBound(key).pBound, key) ? 1u : 0u;
|
||||
}
|
||||
|
||||
iterator find(const Key& key)
|
||||
{
|
||||
return iterator(Find(key));
|
||||
}
|
||||
|
||||
const_iterator find(const Key& key) const
|
||||
{
|
||||
return const_iterator(Find(key));
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(sizeof(map<int, int>) == 0xC);
|
||||
}
|
|
@ -1,255 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Base/System/hhAllocator.h>
|
||||
|
||||
namespace hh
|
||||
{
|
||||
template<typename T, typename Allocator = Hedgehog::Base::TAllocator<T>>
|
||||
class vector
|
||||
{
|
||||
protected:
|
||||
Allocator m_Alloc;
|
||||
xpointer<T> m_pFirst;
|
||||
xpointer<T> m_pLast;
|
||||
xpointer<T> m_pEnd;
|
||||
|
||||
public:
|
||||
using value_type = T;
|
||||
using allocator_type = Allocator;
|
||||
using size_type = std::size_t;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using reference = value_type&;
|
||||
using const_reference = const value_type&;
|
||||
using pointer = typename std::allocator_traits<Allocator>::pointer;
|
||||
using const_pointer = typename std::allocator_traits<Allocator>::const_pointer;
|
||||
|
||||
class iterator
|
||||
{
|
||||
public:
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
using value_type = T;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = T*;
|
||||
using reference = T&;
|
||||
|
||||
iterator() : m_pPtr(nullptr) {}
|
||||
iterator(T* p) : m_pPtr(p) {}
|
||||
|
||||
reference operator*() const { return *m_pPtr; }
|
||||
pointer operator->() const { return m_pPtr; }
|
||||
|
||||
iterator& operator++() { ++m_pPtr; return *this; }
|
||||
iterator operator++(int) { iterator tmp = *this; ++(*this); return tmp; }
|
||||
|
||||
iterator& operator--() { --m_pPtr; return *this; }
|
||||
iterator operator--(int) { iterator tmp = *this; --(*this); return tmp; }
|
||||
|
||||
iterator& operator+=(difference_type n) { m_pPtr += n; return *this; }
|
||||
iterator operator+(difference_type n) const { iterator tmp = *this; return tmp += n; }
|
||||
friend iterator operator+(difference_type n, iterator it) { return it + n; }
|
||||
|
||||
iterator& operator-=(difference_type n) { return *this += -n; }
|
||||
iterator operator-(difference_type n) const { iterator tmp = *this; return tmp -= n; }
|
||||
difference_type operator-(const iterator& other) const { return m_pPtr - other.m_pPtr; }
|
||||
|
||||
reference operator[](difference_type n) const { return *(*this + n); }
|
||||
|
||||
bool operator==(const iterator& other) const { return m_pPtr == other.m_pPtr; }
|
||||
bool operator!=(const iterator& other) const { return !(*this == other); }
|
||||
bool operator<(const iterator& other) const { return m_pPtr < other.m_pPtr; }
|
||||
bool operator<=(const iterator& other) const { return !(other < *this); }
|
||||
bool operator>(const iterator& other) const { return other < *this; }
|
||||
bool operator>=(const iterator& other) const { return !(*this < other); }
|
||||
|
||||
private:
|
||||
T* m_pPtr;
|
||||
|
||||
friend class vector;
|
||||
friend class const_iterator;
|
||||
};
|
||||
|
||||
class const_iterator
|
||||
{
|
||||
public:
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
using value_type = T;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using pointer = const T*;
|
||||
using reference = const T&;
|
||||
|
||||
const_iterator() : m_pPtr(nullptr) {}
|
||||
const_iterator(T* p) : m_pPtr(p) {}
|
||||
const_iterator(const iterator& other) : m_pPtr(other.m_pPtr) {}
|
||||
|
||||
reference operator*() const { return *m_pPtr; }
|
||||
pointer operator->() const { return m_pPtr; }
|
||||
|
||||
const_iterator& operator++() { ++m_pPtr; return *this; }
|
||||
const_iterator operator++(int) { const_iterator tmp = *this; ++(*this); return tmp; }
|
||||
|
||||
const_iterator& operator--() { --m_pPtr; return *this; }
|
||||
const_iterator operator--(int) { const_iterator tmp = *this; --(*this); return tmp; }
|
||||
|
||||
const_iterator& operator+=(difference_type n) { m_pPtr += n; return *this; }
|
||||
const_iterator operator+(difference_type n) const { const_iterator tmp = *this; return tmp += n; }
|
||||
friend const_iterator operator+(difference_type n, const_iterator it) { return it + n; }
|
||||
|
||||
const_iterator& operator-=(difference_type n) { return *this += -n; }
|
||||
const_iterator operator-(difference_type n) const { const_iterator tmp = *this; return tmp -= n; }
|
||||
difference_type operator-(const const_iterator& other) const { return m_pPtr - other.m_pPtr; }
|
||||
|
||||
reference operator[](difference_type n) const { return *(*this + n); }
|
||||
|
||||
bool operator==(const const_iterator& other) const { return m_pPtr == other.m_pPtr; }
|
||||
bool operator!=(const const_iterator& other) const { return !(*this == other); }
|
||||
bool operator<(const const_iterator& other) const { return m_pPtr < other.m_pPtr; }
|
||||
bool operator<=(const const_iterator& other) const { return !(other < *this); }
|
||||
bool operator>(const const_iterator& other) const { return other < *this; }
|
||||
bool operator>=(const const_iterator& other) const { return !(*this < other); }
|
||||
|
||||
private:
|
||||
T* m_pPtr;
|
||||
friend class vector;
|
||||
};
|
||||
|
||||
using reverse_iterator = std::reverse_iterator<iterator>;
|
||||
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
||||
|
||||
allocator_type get_allocator() const
|
||||
{
|
||||
return m_Alloc;
|
||||
}
|
||||
|
||||
reference at(size_type pos)
|
||||
{
|
||||
return m_pFirst[pos];
|
||||
}
|
||||
|
||||
const_reference at(size_type pos) const
|
||||
{
|
||||
return m_pFirst[pos];
|
||||
}
|
||||
|
||||
reference operator[](size_type pos)
|
||||
{
|
||||
return m_pFirst[pos];
|
||||
}
|
||||
|
||||
const_reference operator[](size_type pos) const
|
||||
{
|
||||
return m_pFirst[pos];
|
||||
}
|
||||
|
||||
reference front()
|
||||
{
|
||||
return m_pFirst[0];
|
||||
}
|
||||
|
||||
const_reference front() const
|
||||
{
|
||||
return m_pFirst[0];
|
||||
}
|
||||
|
||||
reference back()
|
||||
{
|
||||
return m_pLast[-1];
|
||||
}
|
||||
|
||||
const_reference back() const
|
||||
{
|
||||
return m_pLast[-1];
|
||||
}
|
||||
|
||||
T* data()
|
||||
{
|
||||
return m_pFirst;
|
||||
}
|
||||
|
||||
const T* data() const
|
||||
{
|
||||
return m_pFirst;
|
||||
}
|
||||
|
||||
iterator begin()
|
||||
{
|
||||
return iterator(m_pFirst);
|
||||
}
|
||||
|
||||
const_iterator begin() const
|
||||
{
|
||||
return const_iterator(m_pFirst);
|
||||
}
|
||||
|
||||
const_iterator cbegin() const
|
||||
{
|
||||
return const_iterator(m_pFirst);
|
||||
}
|
||||
|
||||
iterator end()
|
||||
{
|
||||
return iterator(m_pLast);
|
||||
}
|
||||
|
||||
const_iterator end() const
|
||||
{
|
||||
return const_iterator(m_pLast);
|
||||
}
|
||||
|
||||
const_iterator cend() const
|
||||
{
|
||||
return const_iterator(m_pLast);
|
||||
}
|
||||
|
||||
reverse_iterator rbegin()
|
||||
{
|
||||
return reverse_iterator(end());
|
||||
}
|
||||
|
||||
const_reverse_iterator rbegin() const
|
||||
{
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
|
||||
const_reverse_iterator crbegin() const
|
||||
{
|
||||
return const_reverse_iterator(cend());
|
||||
}
|
||||
|
||||
reverse_iterator rend()
|
||||
{
|
||||
return reverse_iterator(begin());
|
||||
}
|
||||
|
||||
const_reverse_iterator rend() const
|
||||
{
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
|
||||
const_reverse_iterator crend() const
|
||||
{
|
||||
return const_reverse_iterator(cbegin());
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
{
|
||||
return m_pFirst == m_pLast;
|
||||
}
|
||||
|
||||
size_type size() const
|
||||
{
|
||||
return m_pLast - m_pFirst;
|
||||
}
|
||||
|
||||
size_type max_size() const
|
||||
{
|
||||
return ~0u;
|
||||
}
|
||||
|
||||
size_type capacity() const
|
||||
{
|
||||
return m_pEnd - m_pFirst;
|
||||
}
|
||||
};
|
||||
|
||||
SWA_ASSERT_SIZEOF(vector<int>, 0x10);
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
|
||||
inline void* __HH_ALLOC(const uint32_t in_Size)
|
||||
{
|
||||
return GuestToHostFunction<void*>(sub_822C0988, in_Size);
|
||||
}
|
||||
|
||||
inline void __HH_FREE(const void* in_pData)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_822C0270, in_pData);
|
||||
}
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
template<class T>
|
||||
class TAllocator
|
||||
{
|
||||
public:
|
||||
using value_type = T;
|
||||
|
||||
TAllocator() noexcept {}
|
||||
template<class U> TAllocator(TAllocator<U> const&) noexcept {}
|
||||
|
||||
value_type* allocate(std::size_t n)
|
||||
{
|
||||
return reinterpret_cast<value_type*>(__HH_ALLOC(n * sizeof(value_type)));
|
||||
}
|
||||
|
||||
void deallocate(value_type* p, std::size_t) noexcept
|
||||
{
|
||||
__HH_FREE(p);
|
||||
}
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
class CSharedString;
|
||||
|
||||
class CStringSymbol
|
||||
{
|
||||
public:
|
||||
be<uint32_t> m_Index;
|
||||
|
||||
CStringSymbol();
|
||||
CStringSymbol(const char* in_pName);
|
||||
CStringSymbol(const CSharedString& in_rName);
|
||||
|
||||
bool operator==(const CStringSymbol& in_rOther) const;
|
||||
bool operator!=(const CStringSymbol& in_rOther) const;
|
||||
bool operator<(const CStringSymbol& in_rOther) const;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CStringSymbol, m_Index, 0);
|
||||
SWA_ASSERT_SIZEOF(CStringSymbol, 4);
|
||||
}
|
||||
|
||||
#include <Hedgehog/Base/System/hhSymbol.inl>
|
|
@ -1,31 +0,0 @@
|
|||
namespace Hedgehog::Base
|
||||
{
|
||||
inline CStringSymbol::CStringSymbol()
|
||||
{
|
||||
}
|
||||
|
||||
inline CStringSymbol::CStringSymbol(const char* in_pName)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_82E014D8, this, in_pName);
|
||||
}
|
||||
|
||||
inline CStringSymbol::CStringSymbol(const CSharedString& in_rName)
|
||||
{
|
||||
GuestToHostFunction<void>(sub_82E013B0, this, &in_rName);
|
||||
}
|
||||
|
||||
inline bool CStringSymbol::operator==(const CStringSymbol& in_rOther) const
|
||||
{
|
||||
return m_Index == in_rOther.m_Index;
|
||||
}
|
||||
|
||||
inline bool CStringSymbol::operator!=(const CStringSymbol& in_rOther) const
|
||||
{
|
||||
return m_Index != in_rOther.m_Index;
|
||||
}
|
||||
|
||||
inline bool CStringSymbol::operator<(const CStringSymbol& in_rOther) const
|
||||
{
|
||||
return m_Index < in_rOther.m_Index;
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "Hedgehog/Base/Thread/hhHolderBase.h"
|
||||
|
||||
#define HH_BASE_HOLDER(x) \
|
||||
Hedgehog::Base::THolder(x)
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
template<typename T, bool ForceSync = true>
|
||||
class THolder : public CHolderBase
|
||||
{
|
||||
public:
|
||||
THolder(T* in_pObject) : CHolderBase(in_pObject, ForceSync) {}
|
||||
|
||||
T* get() const;
|
||||
T* operator->() const;
|
||||
T* operator*() const;
|
||||
};
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
class CSynchronizedObject;
|
||||
|
||||
class CHolderBase
|
||||
{
|
||||
protected:
|
||||
xpointer<CSynchronizedObject> m_pSynchronizedObject;
|
||||
bool m_Locked;
|
||||
|
||||
public:
|
||||
CHolderBase() : m_pSynchronizedObject(nullptr), m_Locked(false) {}
|
||||
CHolderBase(CSynchronizedObject* in_pSynchronizedObject, bool in_ForceSync = false);
|
||||
CHolderBase(CHolderBase&& io_rOther);
|
||||
CHolderBase(const CHolderBase& in_rOther);
|
||||
~CHolderBase();
|
||||
|
||||
CSynchronizedObject* get() const;
|
||||
CSynchronizedObject* operator->() const;
|
||||
CSynchronizedObject* operator*() const;
|
||||
|
||||
explicit operator bool() const;
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
class CSynchronizedObject
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x04);
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
#include "Hedgehog/Base/Thread/hhHolder.h"
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
template<typename T, bool ForceSync = false>
|
||||
class TSynchronizedPtr
|
||||
{
|
||||
xpointer<T> m_pObject;
|
||||
|
||||
public:
|
||||
TSynchronizedPtr(T* in_pObject);
|
||||
TSynchronizedPtr();
|
||||
TSynchronizedPtr(const TSynchronizedPtr& in_rOther);
|
||||
TSynchronizedPtr(TSynchronizedPtr&& io_rOther);
|
||||
|
||||
TSynchronizedPtr<T, ForceSync>& operator=(T* const in_pObject);
|
||||
|
||||
THolder<T, ForceSync> get() const;
|
||||
THolder<T, ForceSync> operator->() const;
|
||||
THolder<T, ForceSync> operator*() const;
|
||||
|
||||
explicit operator bool() const;
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
struct SStringHolder
|
||||
{
|
||||
be<uint32_t> RefCount;
|
||||
char aStr[];
|
||||
|
||||
static SStringHolder* GetHolder(const char* in_pStr);
|
||||
static SStringHolder* Make(const char* in_pStr);
|
||||
|
||||
void AddRef();
|
||||
void Release();
|
||||
|
||||
bool IsUnique() const;
|
||||
};
|
||||
}
|
||||
|
||||
#include <Hedgehog/Base/Type/detail/hhStringHolder.inl>
|
|
@ -1,47 +0,0 @@
|
|||
namespace Hedgehog::Base
|
||||
{
|
||||
inline SStringHolder* SStringHolder::GetHolder(const char* in_pStr)
|
||||
{
|
||||
return (SStringHolder*)((size_t)in_pStr - sizeof(RefCount));
|
||||
}
|
||||
|
||||
inline SStringHolder* SStringHolder::Make(const char* in_pStr)
|
||||
{
|
||||
auto pHolder = (SStringHolder*)__HH_ALLOC(sizeof(RefCount) + strlen(in_pStr) + 1);
|
||||
pHolder->RefCount = 1;
|
||||
strcpy(pHolder->aStr, in_pStr);
|
||||
return pHolder;
|
||||
}
|
||||
|
||||
inline void SStringHolder::AddRef()
|
||||
{
|
||||
std::atomic_ref refCount(RefCount.value);
|
||||
|
||||
be<uint32_t> original, incremented;
|
||||
do
|
||||
{
|
||||
original = RefCount;
|
||||
incremented = original + 1;
|
||||
} while (!refCount.compare_exchange_weak(original.value, incremented.value));
|
||||
}
|
||||
|
||||
inline void SStringHolder::Release()
|
||||
{
|
||||
std::atomic_ref refCount(RefCount.value);
|
||||
|
||||
be<uint32_t> original, decremented;
|
||||
do
|
||||
{
|
||||
original = RefCount;
|
||||
decremented = original - 1;
|
||||
} while (!refCount.compare_exchange_weak(original.value, decremented.value));
|
||||
|
||||
if (decremented == 0)
|
||||
__HH_FREE(this);
|
||||
}
|
||||
|
||||
inline bool SStringHolder::IsUnique() const
|
||||
{
|
||||
return RefCount == 1;
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Base/Type/detail/hhStringHolder.h>
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
class CSharedString
|
||||
{
|
||||
private:
|
||||
xpointer<const char> m_pStr;
|
||||
|
||||
SStringHolder* GetHolder() const;
|
||||
|
||||
CSharedString(SStringHolder* in_pHolder);
|
||||
|
||||
public:
|
||||
static constexpr size_t npos = ~0u;
|
||||
|
||||
CSharedString();
|
||||
CSharedString(const char* in_pStr);
|
||||
CSharedString(const CSharedString& in_rOther);
|
||||
CSharedString(CSharedString&& io_rOther);
|
||||
~CSharedString();
|
||||
|
||||
const char* get() const;
|
||||
const char* c_str() const;
|
||||
const char* data() const;
|
||||
|
||||
size_t size() const;
|
||||
size_t length() const;
|
||||
bool empty() const;
|
||||
|
||||
const char* begin() const;
|
||||
const char* end() const;
|
||||
};
|
||||
}
|
||||
|
||||
#include <Hedgehog/Base/Type/hhSharedString.inl>
|
|
@ -1,78 +0,0 @@
|
|||
namespace Hedgehog::Base
|
||||
{
|
||||
inline SStringHolder* CSharedString::GetHolder() const
|
||||
{
|
||||
return SStringHolder::GetHolder(m_pStr);
|
||||
}
|
||||
|
||||
inline CSharedString::CSharedString(SStringHolder* in_pHolder) : m_pStr(in_pHolder->aStr)
|
||||
{
|
||||
}
|
||||
|
||||
inline CSharedString::CSharedString() : m_pStr(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
inline CSharedString::CSharedString(const char* in_pStr) : m_pStr(nullptr)
|
||||
{
|
||||
size_t length;
|
||||
|
||||
if (in_pStr && (length = strlen(in_pStr)) != 0)
|
||||
m_pStr.ptr = g_memory.MapVirtual(SStringHolder::Make(in_pStr)->aStr);
|
||||
}
|
||||
|
||||
inline CSharedString::CSharedString(const CSharedString& in_rOther) : m_pStr(in_rOther.m_pStr)
|
||||
{
|
||||
GetHolder()->AddRef();
|
||||
}
|
||||
|
||||
inline CSharedString::CSharedString(CSharedString&& io_rOther) : m_pStr(io_rOther.m_pStr)
|
||||
{
|
||||
io_rOther.m_pStr = nullptr;
|
||||
}
|
||||
|
||||
inline CSharedString::~CSharedString()
|
||||
{
|
||||
GetHolder()->Release();
|
||||
}
|
||||
|
||||
inline const char* CSharedString::get() const
|
||||
{
|
||||
return m_pStr;
|
||||
}
|
||||
|
||||
inline const char* CSharedString::c_str() const
|
||||
{
|
||||
return get();
|
||||
}
|
||||
|
||||
inline const char* CSharedString::data() const
|
||||
{
|
||||
return get();
|
||||
}
|
||||
|
||||
inline size_t CSharedString::size() const
|
||||
{
|
||||
return strlen(m_pStr);
|
||||
}
|
||||
|
||||
inline size_t CSharedString::length() const
|
||||
{
|
||||
return size();
|
||||
}
|
||||
|
||||
inline bool CSharedString::empty() const
|
||||
{
|
||||
return size() == 0;
|
||||
}
|
||||
|
||||
inline const char* CSharedString::begin() const
|
||||
{
|
||||
return get();
|
||||
}
|
||||
|
||||
inline const char* CSharedString::end() const
|
||||
{
|
||||
return &m_pStr[size()];
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
class CObject
|
||||
{
|
||||
public:
|
||||
CObject();
|
||||
CObject(const swa_null_ctor&);
|
||||
|
||||
void* operator new(const size_t in_Size);
|
||||
void* operator new(const size_t in_Size, const size_t in_Align);
|
||||
|
||||
void operator delete(void* in_pMem);
|
||||
|
||||
void* operator new(const size_t in_Size, void* in_pObj);
|
||||
void* operator new(const size_t in_Size, const size_t in_Align, void* in_pObj);
|
||||
|
||||
void operator delete(void* in_pMem, void* in_pObj);
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Base/hhObject.h>
|
||||
#include <Hedgehog/Base/Type/hhSharedString.h>
|
||||
|
||||
namespace Hedgehog::Database
|
||||
{
|
||||
enum EDatabaseDataFlags : uint8_t
|
||||
{
|
||||
eDatabaseDataFlags_IsMadeOne = 0x1,
|
||||
eDatabaseDataFlags_IsMadeAll = 0x2,
|
||||
eDatabaseDataFlags_CreatedFromArchive = 0x4,
|
||||
eDatabaseDataFlags_IsMadeMakingOne = 0x8
|
||||
};
|
||||
|
||||
class CDatabaseData : public Base::CObject
|
||||
{
|
||||
public:
|
||||
struct Vftable
|
||||
{
|
||||
be<uint32_t> m_fpDtor;
|
||||
be<uint32_t> m_fpCheckMadeAll;
|
||||
};
|
||||
|
||||
xpointer<Vftable> m_pVftable;
|
||||
uint8_t m_Flags;
|
||||
Base::CSharedString m_TypeAndName;
|
||||
|
||||
~CDatabaseData();
|
||||
bool CheckMadeAll();
|
||||
|
||||
bool IsMadeOne() const;
|
||||
void SetMadeOne();
|
||||
|
||||
bool IsMadeAllInternal();
|
||||
bool IsMadeAll();
|
||||
};
|
||||
}
|
||||
|
||||
#include "Hedgehog/Database/System/hhDatabaseData.inl"
|
|
@ -1,36 +0,0 @@
|
|||
namespace Hedgehog::Database
|
||||
{
|
||||
inline CDatabaseData::~CDatabaseData()
|
||||
{
|
||||
GuestToHostFunction<void>(m_pVftable->m_fpDtor, this);
|
||||
}
|
||||
|
||||
inline bool CDatabaseData::CheckMadeAll()
|
||||
{
|
||||
return GuestToHostFunction<bool>(m_pVftable->m_fpCheckMadeAll, this);
|
||||
}
|
||||
|
||||
inline bool CDatabaseData::IsMadeOne() const
|
||||
{
|
||||
return (m_Flags & eDatabaseDataFlags_IsMadeOne) != 0;
|
||||
}
|
||||
|
||||
inline void CDatabaseData::SetMadeOne()
|
||||
{
|
||||
m_Flags |= eDatabaseDataFlags_IsMadeOne;
|
||||
}
|
||||
|
||||
inline bool CDatabaseData::IsMadeAllInternal()
|
||||
{
|
||||
if ((m_Flags & eDatabaseDataFlags_IsMadeOne) == 0 || !CheckMadeAll())
|
||||
return false;
|
||||
|
||||
m_Flags |= eDatabaseDataFlags_IsMadeAll;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool CDatabaseData::IsMadeAll()
|
||||
{
|
||||
return (m_Flags & eDatabaseDataFlags_IsMadeAll) != 0 || IsMadeAllInternal();
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Hedgehog::Math
|
||||
{
|
||||
class CMatrix
|
||||
{
|
||||
public:
|
||||
be<float> m_M00;
|
||||
be<float> m_M01;
|
||||
be<float> m_M02;
|
||||
be<float> m_M03;
|
||||
be<float> m_M10;
|
||||
be<float> m_M11;
|
||||
be<float> m_M12;
|
||||
be<float> m_M13;
|
||||
be<float> m_M20;
|
||||
be<float> m_M21;
|
||||
be<float> m_M22;
|
||||
be<float> m_M23;
|
||||
be<float> m_M30;
|
||||
be<float> m_M31;
|
||||
be<float> m_M32;
|
||||
be<float> m_M33;
|
||||
};
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Hedgehog::Math
|
||||
{
|
||||
class CQuaternion
|
||||
{
|
||||
public:
|
||||
be<float> X;
|
||||
be<float> Y;
|
||||
be<float> Z;
|
||||
be<float> W;
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
|
||||
namespace Hedgehog::Math
|
||||
{
|
||||
class CVector2
|
||||
{
|
||||
public:
|
||||
be<float> X;
|
||||
be<float> Y;
|
||||
};
|
||||
|
||||
class CVector
|
||||
{
|
||||
public:
|
||||
be<float> X;
|
||||
be<float> Y;
|
||||
be<float> Z;
|
||||
be<float> W;
|
||||
};
|
||||
|
||||
class CVector4
|
||||
{
|
||||
public:
|
||||
be<float> X;
|
||||
be<float> Y;
|
||||
be<float> Z;
|
||||
be<float> W;
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CMatrixNodeListener;
|
||||
|
||||
class CMatrixNode : public Base::CObject
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x60);
|
||||
};
|
||||
|
||||
SWA_ASSERT_SIZEOF(CMatrixNode, 0x60);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CTransform
|
||||
{
|
||||
public:
|
||||
Math::CQuaternion m_Rotation;
|
||||
Math::CVector m_Position;
|
||||
Math::CMatrix m_Matrix;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CTransform, m_Rotation, 0x00);
|
||||
SWA_ASSERT_OFFSETOF(CTransform, m_Position, 0x10);
|
||||
SWA_ASSERT_OFFSETOF(CTransform, m_Matrix, 0x20);
|
||||
SWA_ASSERT_SIZEOF(CTransform, 0x60);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CRenderingInfrastructure;
|
||||
|
||||
class CVertexDeclarationPtr
|
||||
{
|
||||
public:
|
||||
xpointer<void> m_pD3DVertexDeclaration;
|
||||
xpointer<CRenderingInfrastructure> m_pRenderingInfrastructure;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CVertexDeclarationPtr, m_pD3DVertexDeclaration, 0x0);
|
||||
SWA_ASSERT_OFFSETOF(CVertexDeclarationPtr, m_pRenderingInfrastructure, 0x4);
|
||||
SWA_ASSERT_SIZEOF(CVertexDeclarationPtr, 0x8);
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.h>
|
||||
|
||||
#include <Hedgehog/Base/Container/hhVector.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CMaterialData;
|
||||
class CTexsetData;
|
||||
class CShaderListData;
|
||||
class CParameterFloat4Element;
|
||||
class CParameterInt4Element;
|
||||
class CParameterBoolElement;
|
||||
|
||||
class CMaterialData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
boost::shared_ptr<CShaderListData> m_spShaderListData;
|
||||
boost::shared_ptr<CTexsetData> m_spTexsetData;
|
||||
hh::vector<boost::shared_ptr<CParameterFloat4Element>> m_Float4Params;
|
||||
hh::vector<boost::shared_ptr<CParameterInt4Element>> m_Int4Params;
|
||||
hh::vector<boost::shared_ptr<CParameterBoolElement>> m_Bool4Params;
|
||||
uint8_t m_AlphaThreshold;
|
||||
bool m_DoubleSided;
|
||||
bool m_Additive;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CMaterialData, m_spShaderListData, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CMaterialData, m_spTexsetData, 0x14);
|
||||
SWA_ASSERT_OFFSETOF(CMaterialData, m_Float4Params, 0x1C);
|
||||
SWA_ASSERT_OFFSETOF(CMaterialData, m_Int4Params, 0x2C);
|
||||
SWA_ASSERT_OFFSETOF(CMaterialData, m_Bool4Params, 0x3C);
|
||||
SWA_ASSERT_OFFSETOF(CMaterialData, m_AlphaThreshold, 0x4C);
|
||||
SWA_ASSERT_OFFSETOF(CMaterialData, m_DoubleSided, 0x4D);
|
||||
SWA_ASSERT_OFFSETOF(CMaterialData, m_Additive, 0x4E);
|
||||
SWA_ASSERT_SIZEOF(CMaterialData, 0x50);
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.h>
|
||||
|
||||
#include <Hedgehog/Base/Type/hhSharedString.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
#include <Hedgehog/MirageCore/Misc/hhVertexDeclarationPtr.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CMaterialData;
|
||||
|
||||
class CMeshData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
be<uint32_t> m_IndexNum;
|
||||
be<uint32_t> m_VertexNum;
|
||||
be<uint32_t> m_VertexSize;
|
||||
be<uint32_t> m_NodeNum;
|
||||
xpointer<uint8_t> m_pNodeIndices;
|
||||
be<uint32_t> m_VertexOffset;
|
||||
be<uint32_t> m_IndexOffset;
|
||||
xpointer<void> m_pD3DIndexBuffer;
|
||||
xpointer<void> m_pD3DVertexBuffer;
|
||||
CVertexDeclarationPtr m_VertexDeclarationPtr;
|
||||
SWA_INSERT_PADDING(0x4);
|
||||
boost::shared_ptr<CMaterialData> m_spMaterial;
|
||||
SWA_INSERT_PADDING(0xC);
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_IndexNum, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_VertexNum, 0x10);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_VertexSize, 0x14);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_NodeNum, 0x18);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_pNodeIndices, 0x1C);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_VertexOffset, 0x20);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_IndexOffset, 0x24);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_pD3DIndexBuffer, 0x28);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_pD3DVertexBuffer, 0x2C);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_VertexDeclarationPtr, 0x30);
|
||||
SWA_ASSERT_OFFSETOF(CMeshData, m_spMaterial, 0x3C);
|
||||
SWA_ASSERT_SIZEOF(CMeshData, 0x50);
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CMaterialData;
|
||||
|
||||
class CMeshIndexData : public Hedgehog::Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
be<uint32_t> m_IndexNum;
|
||||
be<uint32_t> m_NodeNum;
|
||||
xpointer<uint8_t> m_pNodeIndices;
|
||||
xpointer<void> m_pD3DIndexBuffer;
|
||||
boost::shared_ptr<CMaterialData> m_spMaterial;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CMeshIndexData, m_IndexNum, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CMeshIndexData, m_NodeNum, 0x10);
|
||||
SWA_ASSERT_OFFSETOF(CMeshIndexData, m_pNodeIndices, 0x14);
|
||||
SWA_ASSERT_OFFSETOF(CMeshIndexData, m_pD3DIndexBuffer, 0x18);
|
||||
SWA_ASSERT_OFFSETOF(CMeshIndexData, m_spMaterial, 0x1C);
|
||||
SWA_ASSERT_SIZEOF(CMeshIndexData, 0x24);
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Base/Container/hhVector.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CNodeGroupModelData;
|
||||
class CMeshData;
|
||||
class CModelNodeData;
|
||||
class CMatrixData;
|
||||
class CAabbData;
|
||||
class CSphereData;
|
||||
class CMorphModelData;
|
||||
|
||||
class CModelData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
be<uint32_t> m_NodeGroupModelNum;
|
||||
hh::vector<boost::shared_ptr<CNodeGroupModelData>> m_NodeGroupModels;
|
||||
hh::vector<boost::shared_ptr<CMeshData>> m_OpaqueMeshes;
|
||||
hh::vector<boost::shared_ptr<CMeshData>> m_TransparentMeshes;
|
||||
hh::vector<boost::shared_ptr<CMeshData>> m_PunchThroughMeshes;
|
||||
be<uint32_t> m_NodeNum;
|
||||
boost::shared_ptr<uint8_t[]> m_spNodeParentIndices;
|
||||
boost::shared_ptr<CModelNodeData[]> m_spNodes;
|
||||
boost::shared_ptr<CMatrixData[]> m_spNodeMatrices;
|
||||
boost::shared_ptr<CAabbData> m_spAabb;
|
||||
boost::shared_ptr<CSphereData> m_spSphere;
|
||||
hh::vector<boost::shared_ptr<CMorphModelData>> m_MorphModels;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_NodeGroupModelNum, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_NodeGroupModels, 0x10);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_OpaqueMeshes, 0x20);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_TransparentMeshes, 0x30);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_PunchThroughMeshes, 0x40);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_NodeNum, 0x50);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_spNodeParentIndices, 0x54);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_spNodes, 0x5C);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_spNodeMatrices, 0x64);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_spAabb, 0x6C);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_spSphere, 0x74);
|
||||
SWA_ASSERT_OFFSETOF(CModelData, m_MorphModels, 0x7C);
|
||||
SWA_ASSERT_SIZEOF(CModelData, 0x8C);
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.h>
|
||||
|
||||
#include <Hedgehog/Base/Container/hhVector.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
#include <Hedgehog/MirageCore/Misc/hhVertexDeclarationPtr.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CMorphTargetData;
|
||||
class CMeshIndexData;
|
||||
|
||||
class CMorphModelData : public Hedgehog::Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
be<uint32_t> m_VertexNum;
|
||||
be<uint32_t> m_VertexSize;
|
||||
be<uint32_t> m_MorphTargetVertexSize;
|
||||
xpointer<void> m_pD3DVertexBuffer;
|
||||
CVertexDeclarationPtr m_VertexDeclarationPtr;
|
||||
hh::vector<boost::shared_ptr<CMorphTargetData>> m_MorphTargetList;
|
||||
hh::vector<boost::shared_ptr<CMeshIndexData>> m_OpaqueMeshList;
|
||||
hh::vector<boost::shared_ptr<CMeshIndexData>> m_TransparentMeshList;
|
||||
hh::vector<boost::shared_ptr<CMeshIndexData>> m_PunchThroughMeshList;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CMorphModelData, m_VertexNum, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CMorphModelData, m_VertexSize, 0x10);
|
||||
SWA_ASSERT_OFFSETOF(CMorphModelData, m_MorphTargetVertexSize, 0x14);
|
||||
SWA_ASSERT_OFFSETOF(CMorphModelData, m_pD3DVertexBuffer, 0x18);
|
||||
SWA_ASSERT_OFFSETOF(CMorphModelData, m_VertexDeclarationPtr, 0x1C);
|
||||
SWA_ASSERT_OFFSETOF(CMorphModelData, m_MorphTargetList, 0x24);
|
||||
SWA_ASSERT_OFFSETOF(CMorphModelData, m_OpaqueMeshList, 0x34);
|
||||
SWA_ASSERT_OFFSETOF(CMorphModelData, m_TransparentMeshList, 0x44);
|
||||
SWA_ASSERT_OFFSETOF(CMorphModelData, m_PunchThroughMeshList, 0x54);
|
||||
SWA_ASSERT_SIZEOF(CMorphModelData, 0x64);
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Base/Container/hhVector.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CMeshData;
|
||||
|
||||
class CNodeGroupModelData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
hh::vector<boost::shared_ptr<CMeshData>> m_OpaqueMeshes;
|
||||
hh::vector<boost::shared_ptr<CMeshData>> m_TransparentMeshes;
|
||||
hh::vector<boost::shared_ptr<CMeshData>> m_PunchThroughMeshes;
|
||||
be<uint32_t> m_SpecialMeshGroupNum;
|
||||
boost::shared_ptr<be<uint32_t>> m_SpecialMeshGroupModes;
|
||||
hh::vector<hh::vector<boost::shared_ptr<CMeshData>>> m_SpecialMeshGroups;
|
||||
Base::CSharedString m_Name;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CNodeGroupModelData, m_OpaqueMeshes, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CNodeGroupModelData, m_TransparentMeshes, 0x1C);
|
||||
SWA_ASSERT_OFFSETOF(CNodeGroupModelData, m_PunchThroughMeshes, 0x2C);
|
||||
SWA_ASSERT_OFFSETOF(CNodeGroupModelData, m_SpecialMeshGroupNum, 0x3C);
|
||||
SWA_ASSERT_OFFSETOF(CNodeGroupModelData, m_SpecialMeshGroupModes, 0x40);
|
||||
SWA_ASSERT_OFFSETOF(CNodeGroupModelData, m_SpecialMeshGroups, 0x48);
|
||||
SWA_ASSERT_OFFSETOF(CNodeGroupModelData, m_Name, 0x58);
|
||||
SWA_ASSERT_SIZEOF(CNodeGroupModelData, 0x5C);
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.h>
|
||||
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
class CCriticalSectionD3D9;
|
||||
}
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CRenderingInfrastructure;
|
||||
|
||||
class CPixelShaderCodeData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
xpointer<void> m_pD3DPixelShader;
|
||||
xpointer<uint8_t> m_spFunction;
|
||||
boost::shared_ptr<Base::CCriticalSectionD3D9> m_spCriticalSection;
|
||||
xpointer<CRenderingInfrastructure> m_pRenderingInfrastructure;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CPixelShaderCodeData, m_pD3DPixelShader, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CPixelShaderCodeData, m_spFunction, 0x10);
|
||||
SWA_ASSERT_OFFSETOF(CPixelShaderCodeData, m_spCriticalSection, 0x14);
|
||||
SWA_ASSERT_OFFSETOF(CPixelShaderCodeData, m_pRenderingInfrastructure, 0x1C);
|
||||
SWA_ASSERT_SIZEOF(CPixelShaderCodeData, 0x20);
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Base/Container/hhVector.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CPixelShaderCodeData;
|
||||
class CPixelShaderParameterData;
|
||||
|
||||
class CPixelShaderData : public Hedgehog::Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
boost::shared_ptr<CPixelShaderCodeData> m_spCode;
|
||||
SWA_INSERT_PADDING(0x4);
|
||||
hh::vector<boost::shared_ptr<CPixelShaderParameterData>> m_ParameterList;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CPixelShaderData, m_spCode, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CPixelShaderData, m_ParameterList, 0x18);
|
||||
SWA_ASSERT_SIZEOF(CPixelShaderData, 0x28);
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.h>
|
||||
|
||||
#include <Hedgehog/Base/Container/hhMap.h>
|
||||
#include <Hedgehog/Base/System/hhSymbol.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CVertexShaderData;
|
||||
class CPixelShaderData;
|
||||
|
||||
class CVertexShaderPermutationData
|
||||
{
|
||||
public:
|
||||
hh::map<be<uint32_t>, boost::shared_ptr<CVertexShaderData>> m_VertexShaders;
|
||||
be<uint32_t> m_SubPermutations;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CVertexShaderPermutationData, m_VertexShaders, 0x0);
|
||||
SWA_ASSERT_OFFSETOF(CVertexShaderPermutationData, m_SubPermutations, 0xC);
|
||||
SWA_ASSERT_SIZEOF(CVertexShaderPermutationData, 0x10);
|
||||
|
||||
class CPixelShaderPermutationData
|
||||
{
|
||||
public:
|
||||
hh::map<Base::CStringSymbol, boost::shared_ptr<CVertexShaderPermutationData>> m_VertexShaderPermutations;
|
||||
hh::map<be<uint32_t>, boost::shared_ptr<CPixelShaderData>> m_PixelShaders;
|
||||
be<uint32_t> m_SubPermutations;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CPixelShaderPermutationData, m_VertexShaderPermutations, 0x0);
|
||||
SWA_ASSERT_OFFSETOF(CPixelShaderPermutationData, m_PixelShaders, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CPixelShaderPermutationData, m_SubPermutations, 0x18);
|
||||
SWA_ASSERT_SIZEOF(CPixelShaderPermutationData, 0x1C);
|
||||
|
||||
class CShaderListData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
hh::map<Base::CStringSymbol, CPixelShaderPermutationData> m_PixelShaderPermutations;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CShaderListData, m_PixelShaderPermutations, 0xC);
|
||||
SWA_ASSERT_SIZEOF(CShaderListData, 0x18);
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Base/Container/hhVector.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CSphereData;
|
||||
class CNodeGroupModelData;
|
||||
class CMeshData;
|
||||
|
||||
class CTerrainModelData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x4);
|
||||
hh::vector<boost::shared_ptr<CNodeGroupModelData>> m_NodeGroupModels;
|
||||
hh::vector<boost::shared_ptr<CMeshData>> m_OpaqueMeshes;
|
||||
hh::vector<boost::shared_ptr<CMeshData>> m_TransparentMeshes;
|
||||
hh::vector<boost::shared_ptr<CMeshData>> m_PunchThroughMeshes;
|
||||
boost::shared_ptr<CSphereData> m_spSphere;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CTerrainModelData, m_NodeGroupModels, 0x10);
|
||||
SWA_ASSERT_OFFSETOF(CTerrainModelData, m_OpaqueMeshes, 0x20);
|
||||
SWA_ASSERT_OFFSETOF(CTerrainModelData, m_TransparentMeshes, 0x30);
|
||||
SWA_ASSERT_OFFSETOF(CTerrainModelData, m_PunchThroughMeshes, 0x40);
|
||||
SWA_ASSERT_OFFSETOF(CTerrainModelData, m_spSphere, 0x50);
|
||||
SWA_ASSERT_SIZEOF(CTerrainModelData, 0x58);
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.h>
|
||||
|
||||
#include <Hedgehog/Base/Container/hhVector.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CTextureData;
|
||||
|
||||
class CTexsetData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
hh::vector<boost::shared_ptr<CTextureData>> m_TextureList;
|
||||
hh::vector<Base::CSharedString> m_TextureNameList;
|
||||
bool m_ConstTexCoord;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CTexsetData, m_TextureList, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CTexsetData, m_TextureNameList, 0x1C);
|
||||
SWA_ASSERT_OFFSETOF(CTexsetData, m_ConstTexCoord, 0x2C);
|
||||
SWA_ASSERT_SIZEOF(CTexsetData, 0x30);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CTextureData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x8);
|
||||
uint8_t m_TexcoordIndex;
|
||||
SWA_INSERT_PADDING(0x1B);
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CTextureData, m_TexcoordIndex, 0x14);
|
||||
SWA_ASSERT_SIZEOF(CTextureData, 0x30);
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.h>
|
||||
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Base
|
||||
{
|
||||
class CCriticalSectionD3D9;
|
||||
}
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CRenderingInfrastructure;
|
||||
|
||||
class CVertexShaderCodeData : public Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
xpointer<void> m_pD3DVertexShader;
|
||||
xpointer<uint8_t> m_spFunction;
|
||||
boost::shared_ptr<Base::CCriticalSectionD3D9> m_spCriticalSection;
|
||||
xpointer<CRenderingInfrastructure> m_pRenderingInfrastructure;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CVertexShaderCodeData, m_pD3DVertexShader, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CVertexShaderCodeData, m_spFunction, 0x10);
|
||||
SWA_ASSERT_OFFSETOF(CVertexShaderCodeData, m_spCriticalSection, 0x14);
|
||||
SWA_ASSERT_OFFSETOF(CVertexShaderCodeData, m_pRenderingInfrastructure, 0x1C);
|
||||
SWA_ASSERT_SIZEOF(CVertexShaderCodeData, 0x20);
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <Hedgehog/Base/Container/hhVector.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CVertexShaderCodeData;
|
||||
class CVertexShaderParameterData;
|
||||
|
||||
class CVertexShaderData : public Hedgehog::Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
boost::shared_ptr<CVertexShaderCodeData> m_spCode;
|
||||
SWA_INSERT_PADDING(0x4);
|
||||
hh::vector<boost::shared_ptr<CVertexShaderParameterData>> m_ParameterList;
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CVertexShaderData, m_spCode, 0xC);
|
||||
SWA_ASSERT_OFFSETOF(CVertexShaderData, m_ParameterList, 0x18);
|
||||
SWA_ASSERT_SIZEOF(CVertexShaderData, 0x28);
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
#include "Hedgehog/Base/hhObject.h"
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CRenderable : public Base::CObject
|
||||
{
|
||||
public:
|
||||
xpointer<void> m_pVftable;
|
||||
bool m_Enabled;
|
||||
};
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.h>
|
||||
|
||||
#include <Hedgehog/Base/Container/hhVector.h>
|
||||
#include <Hedgehog/Database/System/hhDatabaseData.h>
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CShaderListData;
|
||||
}
|
||||
|
||||
namespace Hedgehog::Sparkle
|
||||
{
|
||||
class CParticleMaterial : public Hedgehog::Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
enum EBlendMode
|
||||
{
|
||||
eBlendMode_Zero,
|
||||
eBlendMode_Typical,
|
||||
eBlendMode_Add,
|
||||
eBlendMode_Subtract
|
||||
};
|
||||
|
||||
hh::vector<boost::anonymous_shared_ptr> m_spFieldC;
|
||||
boost::shared_ptr<Hedgehog::Mirage::CShaderListData> m_spDefaultShaderListData; // BillboardParticle_d[v]
|
||||
boost::shared_ptr<Hedgehog::Mirage::CShaderListData> m_spShaderListData;
|
||||
bool m_Field2C;
|
||||
be<uint32_t> m_BlendMode;
|
||||
be<uint32_t> m_AddressMode;
|
||||
Hedgehog::Base::CSharedString m_MaterialName;
|
||||
Hedgehog::Base::CSharedString m_TextureName;
|
||||
Hedgehog::Base::CSharedString m_DeflectionTextureName;
|
||||
Hedgehog::Base::CSharedString m_ShaderName;
|
||||
be<float> m_Field48;
|
||||
be<float> m_Field4C;
|
||||
};
|
||||
|
||||
SWA_ASSERT_SIZEOF(CParticleMaterial, 0x50);
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
#include "Hedgehog/Universe/Engine/hhMessageProcess.h"
|
||||
#include "Hedgehog/Universe/Thread/hhParallelJob.h"
|
||||
|
||||
namespace Hedgehog::Universe
|
||||
{
|
||||
class CMessageActor : public IMessageProcess, public IParallelJob
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x88);
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
#include "Hedgehog/Base/hhObject.h"
|
||||
|
||||
namespace Hedgehog::Universe
|
||||
{
|
||||
class IMessageProcess : public Base::CObject
|
||||
{
|
||||
public:
|
||||
IMessageProcess() {}
|
||||
IMessageProcess(const swa_null_ctor& nil) : CObject(nil) {}
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
#include <Hedgehog/Base/hhObject.h>
|
||||
#include <Hedgehog/Universe/Engine/hhMessageProcess.h>
|
||||
#include <Hedgehog/Universe/Engine/hhStateMachineMessageReceiver.h>
|
||||
|
||||
namespace Hedgehog::Universe
|
||||
{
|
||||
class CStateMachineBase : public IStateMachineMessageReceiver, public Base::CObject
|
||||
{
|
||||
public:
|
||||
class CStateBase : public IMessageProcess
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x08);
|
||||
xpointer<void> m_pContext;
|
||||
xpointer<CStateMachineBase> m_pStateMachine;
|
||||
be<float> m_Time;
|
||||
SWA_INSERT_PADDING(0x4C);
|
||||
|
||||
void* GetContextBase() const;
|
||||
|
||||
template<typename T>
|
||||
T* GetContextBase() const;
|
||||
};
|
||||
|
||||
SWA_INSERT_PADDING(0x60);
|
||||
};
|
||||
}
|
||||
|
||||
#include <Hedgehog/Universe/Engine/hhStateMachineBase.inl>
|
|
@ -1,13 +0,0 @@
|
|||
namespace Hedgehog::Universe
|
||||
{
|
||||
inline void* CStateMachineBase::CStateBase::GetContextBase() const
|
||||
{
|
||||
return m_pContext;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline T* CStateMachineBase::CStateBase::GetContextBase() const
|
||||
{
|
||||
return (T*)m_pContext.get();
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace Hedgehog::Universe
|
||||
{
|
||||
class IStateMachineMessageReceiver
|
||||
{
|
||||
public:
|
||||
IStateMachineMessageReceiver(const swa_null_ctor&) {}
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
|
||||
namespace Hedgehog::Universe
|
||||
{
|
||||
struct SUpdateInfo
|
||||
{
|
||||
be<float> DeltaTime;
|
||||
be<uint32_t> Frame;
|
||||
Base::CSharedString Category;
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
#include "Hedgehog/Universe/Thread/hhParallelJob.h"
|
||||
|
||||
namespace Hedgehog::Universe
|
||||
{
|
||||
class CUpdateUnit : public Base::CObject, public IParallelJob
|
||||
{
|
||||
public:
|
||||
xpointer<void> m_pVftable;
|
||||
SWA_INSERT_PADDING(0x20);
|
||||
|
||||
CUpdateUnit(const swa_null_ctor& nil) : CObject(nil), IParallelJob(nil) {}
|
||||
CUpdateUnit();
|
||||
|
||||
// TODO: implement virtual functions.
|
||||
// virtual ~CUpdateUnit();
|
||||
//
|
||||
// virtual void ExecuteParallelJob(const SUpdateInfo& in_rUpdateInfo) override;
|
||||
//
|
||||
// virtual void UpdateParallel(const SUpdateInfo& in_rUpdateInfo) {}
|
||||
// virtual void UpdateSerial(const SUpdateInfo& in_rUpdateInfo) {}
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
#include "Hedgehog/Universe/Engine/hhUpdateInfo.h"
|
||||
|
||||
namespace Hedgehog::Universe
|
||||
{
|
||||
class IParallelJob
|
||||
{
|
||||
public:
|
||||
xpointer<void> m_pVftable;
|
||||
|
||||
IParallelJob() {}
|
||||
IParallelJob(const swa_null_ctor&) {}
|
||||
|
||||
// TODO: implement virtual functions.
|
||||
// virtual ~IParallelJob() = default;
|
||||
//
|
||||
// virtual void ExecuteParallelJob(const SUpdateInfo& in_rUpdateInfo) = 0;
|
||||
};
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
# SWA
|
||||
|
||||
## Contribution Guide
|
||||
|
||||
### Naming Conventions
|
||||
|
||||
- Use `camelCase` for local variables, `SNAKE_CASE` for preprocessor macros, and `PascalCase` for everything else. SWA-specific types that don't exist in the game should use `snake_case` for better differentiation.
|
||||
- Class names should be prefixed with `C`, e.g., `CSonicContext`.
|
||||
- Struct names should be prefixed with `S`, e.g., `SUpdateInfo`.
|
||||
- Class members should be prefixed with `m_`, e.g., `m_Time`. Do not use this prefix for struct members.
|
||||
- Enum names should be prefixed with `E`, e.g., `ELightType`.
|
||||
- Enum members should start with `e`, followed by the enum name and an underscore, e.g., `eLightType_Point`.
|
||||
- For enum members indicating the count of elements, prefix with `n`, followed by the name, e.g., `nLightType`.
|
||||
- Pointers should be prefixed with `p`, e.g., `pSonicContext`.
|
||||
- Shared pointers should be prefixed with `sp`, e.g., `spDatabase`.
|
||||
- References should be prefixed with `r`, e.g., `rMessage`.
|
||||
- Input function arguments should be prefixed with `in_`, e.g., `in_Name`.
|
||||
- Output function arguments should be prefixed with `out_`, e.g., `out_Value`.
|
||||
- Static class members should be prefixed with `ms_`, e.g., `ms_Instance`.
|
||||
- Static members outside a class should be prefixed with `g_`, e.g., `g_AllocationTracker`.
|
||||
- SWA-specific preprocessor macros should start with `SWA_`, e.g., `SWA_INSERT_PADDING`.
|
||||
- Hedgehog namespace-specific preprocessor macros should start with `HH_` along with the library's shorthand, e.g., `HH_FND_MSG_MAKE_TYPE`.
|
||||
- Function pointers should be prefixed with `fp`, e.g., `fpCGameObjectConstructor`.
|
||||
|
||||
Combine prefixes as necessary, e.g., `m_sp` for a shared pointer as a class member or `in_r` for a const reference as a function argument.
|
||||
|
||||
### Coding Style
|
||||
|
||||
- Always place curly brackets on a new line.
|
||||
- Prefer forward declaring types over including their respective headers.
|
||||
- Use <> includes relative to the project's root directory path.
|
||||
- Use C++17's nested namespace feature instead of defining multiple namespaces on separate lines.
|
||||
- Enum classes are prohibited as they were not available when the game was developed.
|
||||
- Avoid placing function definitions in .h files, instead, implement functions in the header's respective .inl file, similar to a .cpp file.
|
||||
- Ensure that all class members are declared as public. Even if you suspect that a class member was private in the original code, having it public is more convenient in a modding API.
|
||||
- Avoid placing multiple class definitions in a single header file unless you have a good reason to do so.
|
||||
- Keep function pointers or addresses outside functions, define them as global variables in the corresponding .inl file. Mark these global variables as `inline` and never nest them within class definitions. You do not need to use the `g_` prefix for function pointers, `fp` is sufficient.
|
||||
- Use primitive types defined in `cstdint` instead of using types that come with the language, e.g., use `uint32_t` instead of `unsigned int`. Using `float`, `double` and `bool` is okay.
|
||||
|
||||
### Mapping Rules
|
||||
|
||||
- Always include the corresponding `offsetof`/`sizeof` assertions for mapped classes/structs. If you are uncertain about the type's size, you can omit the `sizeof` assertion.
|
||||
- Use the exact type name from the game if it's available through RTTI, otherwise, you can look for shared pointers that may reveal the original type name.
|
||||
- If you are unsure about the name of a class/struct member, use `Field` followed by the hexadecimal byte offset (e.g., `m_Field194`). Avoid names like `m_StoresThisThingMaybe`, you can write comments next to the definition for speculations.
|
||||
- If a portion of the byte range is irrelevant to your research or not mapped yet, use the `SWA_INSERT_PADDING` macro to align class/struct members correctly.
|
||||
- When the class has a virtual function table, if you don't want to map every function in it, you can map only the virtual destructor.
|
||||
- The original file locations are likely available in the executable file as assertion file paths. If you cannot find the file path, use your intuition to place the file in a sensible place.
|
|
@ -1,129 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Manager/csdmBase.h"
|
||||
#include "CSD/Manager/csdmMotionPattern.h"
|
||||
#include "CSD/Manager/csdmNode.h"
|
||||
#include "CSD/Manager/csdmNodeObserver.h"
|
||||
#include "CSD/Manager/csdmObserverBase.h"
|
||||
#include "CSD/Manager/csdmProject.h"
|
||||
#include "CSD/Manager/csdmRCObject.h"
|
||||
#include "CSD/Manager/csdmRCObjectImp.h"
|
||||
#include "CSD/Manager/csdmRCPtr.h"
|
||||
#include "CSD/Manager/csdmRCPtrAbs.h"
|
||||
#include "CSD/Manager/csdmResourceBase.h"
|
||||
#include "CSD/Manager/csdmScene.h"
|
||||
#include "CSD/Manager/csdmSceneObserver.h"
|
||||
#include "CSD/Manager/csdmSubjectBase.h"
|
||||
#include "CSD/Platform/csdTexList.h"
|
||||
#include "Hedgehog/Base/Container/hhMap.h"
|
||||
#include "Hedgehog/Base/Container/hhVector.h"
|
||||
#include "Hedgehog/Base/System/hhAllocator.h"
|
||||
#include "Hedgehog/Base/System/hhSymbol.h"
|
||||
#include "Hedgehog/Base/Thread/hhHolder.h"
|
||||
#include "Hedgehog/Base/Thread/hhHolderBase.h"
|
||||
#include "Hedgehog/Base/Thread/hhSynchronizedObject.h"
|
||||
#include "Hedgehog/Base/Thread/hhSynchronizedPtr.h"
|
||||
#include "Hedgehog/Base/Type/detail/hhStringHolder.h"
|
||||
#include "Hedgehog/Base/Type/hhSharedString.h"
|
||||
#include "Hedgehog/Base/hhObject.h"
|
||||
#include "Hedgehog/Database/System/hhDatabaseData.h"
|
||||
#include "Hedgehog/Math/Matrix.h"
|
||||
#include "Hedgehog/Math/Quaternion.h"
|
||||
#include "Hedgehog/Math/Vector.h"
|
||||
#include "Hedgehog/MirageCore/MatrixNode/hhMatrixNode.h"
|
||||
#include "Hedgehog/MirageCore/Misc/hhTransform.h"
|
||||
#include "Hedgehog/MirageCore/Misc/hhVertexDeclarationPtr.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhMaterialData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhMeshData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhMeshIndexData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhModelData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhMorphModelData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhNodeGroupModelData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhPixelShaderCodeData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhPixelShaderData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhShaderListData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhTerrainModelData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhTexsetData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhTextureData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhVertexShaderCodeData.h"
|
||||
#include "Hedgehog/MirageCore/RenderData/hhVertexShaderData.h"
|
||||
#include "Hedgehog/MirageCore/Renderable/hhRenderable.h"
|
||||
#include "Hedgehog/Sparkle/hhParticleMaterial.h"
|
||||
#include "Hedgehog/Universe/Engine/hhMessageActor.h"
|
||||
#include "Hedgehog/Universe/Engine/hhMessageProcess.h"
|
||||
#include "Hedgehog/Universe/Engine/hhStateMachineBase.h"
|
||||
#include "Hedgehog/Universe/Engine/hhStateMachineMessageReceiver.h"
|
||||
#include "Hedgehog/Universe/Engine/hhUpdateInfo.h"
|
||||
#include "Hedgehog/Universe/Engine/hhUpdateUnit.h"
|
||||
#include "Hedgehog/Universe/Thread/hhParallelJob.h"
|
||||
#include "SWA/Achievement/AchievementID.h"
|
||||
#include "SWA/Achievement/AchievementManager.h"
|
||||
#include "SWA/Achievement/AchievementTest.h"
|
||||
#include "SWA/Boss/EggDragoon/Object/BossEggDragoonDrillMissile.h"
|
||||
#include "SWA/CSD/CsdDatabaseWrapper.h"
|
||||
#include "SWA/CSD/CsdProject.h"
|
||||
#include "SWA/CSD/CsdTexListMirage.h"
|
||||
#include "SWA/CSD/GameObjectCSD.h"
|
||||
#include "SWA/Camera/Camera.h"
|
||||
#include "SWA/Camera/CameraController.h"
|
||||
#include "SWA/CharacterUtility/CharacterProxy.h"
|
||||
#include "SWA/ExtraStage/Tails/Enemy/Boss/ExStageBoss.h"
|
||||
#include "SWA/ExtraStage/Tails/Enemy/Boss/State/StateBase.h"
|
||||
#include "SWA/ExtraStage/Tails/Enemy/Boss/State/StateBattle.h"
|
||||
#include "SWA/ExtraStage/Tails/Player/ExPlayerTails.h"
|
||||
#include "SWA/Globals.h"
|
||||
#include "SWA/HUD/GeneralWindow/GeneralWindow.h"
|
||||
#include "SWA/HUD/Loading/Loading.h"
|
||||
#include "SWA/HUD/Pause/HudPause.h"
|
||||
#include "SWA/HUD/SaveIcon/SaveIcon.h"
|
||||
#include "SWA/HUD/Sonic/HudSonicStage.h"
|
||||
#include "SWA/Inspire/InspireMovieOverlay.h"
|
||||
#include "SWA/Inspire/InspireMovieOverlayInfo.h"
|
||||
#include "SWA/Inspire/InspireOpacityAnimationInfo.h"
|
||||
#include "SWA/Inspire/InspireScene.h"
|
||||
#include "SWA/Inspire/InspireSceneData.h"
|
||||
#include "SWA/Inspire/InspireSceneInfo.h"
|
||||
#include "SWA/Inspire/InspireTextureAnimationInfo.h"
|
||||
#include "SWA/Inspire/InspireTextureOverlay.h"
|
||||
#include "SWA/Inspire/InspireTextureOverlayInfo.h"
|
||||
#include "SWA/Menu/MenuWindowBase.h"
|
||||
#include "SWA/Message/MsgRequestHelp.h"
|
||||
#include "SWA/Movie/MovieDisplayer.h"
|
||||
#include "SWA/Movie/MovieManager.h"
|
||||
#include "SWA/Object/Common/DashPanel/ObjDashPanel.h"
|
||||
#include "SWA/Object/SonicStage/EU/RollingBarrel/ObjRollingBarrel.h"
|
||||
#include "SWA/Player/Character/EvilSonic/EvilSonic.h"
|
||||
#include "SWA/Player/Character/EvilSonic/EvilSonicContext.h"
|
||||
#include "SWA/Player/Character/EvilSonic/Hud/EvilHudGuide.h"
|
||||
#include "SWA/Sequence/Unit/SequenceUnitBase.h"
|
||||
#include "SWA/Sequence/Unit/SequenceUnitPlayMovie.h"
|
||||
#include "SWA/Sequence/Utility/SequencePlayMovieWrapper.h"
|
||||
#include "SWA/Sound/Sound.h"
|
||||
#include "SWA/Sound/SoundBGMActSonic.h"
|
||||
#include "SWA/Sound/SoundBGMBase.h"
|
||||
#include "SWA/System/Application.h"
|
||||
#include "SWA/System/ApplicationD3D9.h"
|
||||
#include "SWA/System/ApplicationDocument.h"
|
||||
#include "SWA/System/ApplicationXenon.h"
|
||||
#include "SWA/System/Game.h"
|
||||
#include "SWA/System/GameDocument.h"
|
||||
#include "SWA/System/GameMode/GameMode.h"
|
||||
#include "SWA/System/GameMode/GameModeStage.h"
|
||||
#include "SWA/System/GameMode/GameModeStageMovie.h"
|
||||
#include "SWA/System/GameMode/GameModeStageTitle.h"
|
||||
#include "SWA/System/GameMode/Title/TitleMenu.h"
|
||||
#include "SWA/System/GameMode/Title/TitleStateBase.h"
|
||||
#include "SWA/System/GameMode/Title/TitleStateIntro.h"
|
||||
#include "SWA/System/GameMode/Title/TitleStateMenu.h"
|
||||
#include "SWA/System/GameMode/Title/TitleStateWorldMap.h"
|
||||
#include "SWA/System/GameMode/WorldMap/WorldMapCamera.h"
|
||||
#include "SWA/System/GameMode/WorldMap/WorldMapCursor.h"
|
||||
#include "SWA/System/GameObject.h"
|
||||
#include "SWA/System/GameParameter.h"
|
||||
#include "SWA/System/GammaController.h"
|
||||
#include "SWA/System/InputState.h"
|
||||
#include "SWA/System/MatrixNodeTransform.h"
|
||||
#include "SWA/System/PadState.h"
|
||||
#include "SWA/System/World.h"
|
||||
#include "boost/smart_ptr/make_shared_object.h"
|
||||
#include "boost/smart_ptr/shared_ptr.h"
|
|
@ -1,21 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <cpu/guest_stack_var.h>
|
||||
#include <kernel/function.h>
|
||||
|
||||
#define SWA_CONCAT2(x, y) x##y
|
||||
#define SWA_CONCAT(x, y) SWA_CONCAT2(x, y)
|
||||
|
||||
#define SWA_INSERT_PADDING(length) \
|
||||
uint8_t SWA_CONCAT(pad, __LINE__)[length]
|
||||
|
||||
#define SWA_ASSERT_OFFSETOF(type, field, offset) \
|
||||
static_assert(offsetof(type, field) == offset)
|
||||
|
||||
#define SWA_ASSERT_SIZEOF(type, size) \
|
||||
static_assert(sizeof(type) == size)
|
||||
|
||||
#define SWA_VIRTUAL_FUNCTION(returnType, virtualIndex, ...) \
|
||||
GuestToHostFunction<returnType>(*(be<uint32_t>*)(g_memory.Translate(*(be<uint32_t>*)(this) + (4 * virtualIndex))), __VA_ARGS__)
|
||||
|
||||
struct swa_null_ctor {};
|
|
@ -1,55 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
enum EAchievementID : uint32_t
|
||||
{
|
||||
eAchievementID_StillBroken = 24,
|
||||
eAchievementID_LookingBetter,
|
||||
eAchievementID_StillAJigsawPuzzle,
|
||||
eAchievementID_PickingUpThePieces,
|
||||
eAchievementID_AlmostThere,
|
||||
eAchievementID_OneMoreToGo,
|
||||
eAchievementID_WorldSavior = 31,
|
||||
eAchievementID_PartlyCloudy,
|
||||
eAchievementID_Sunny,
|
||||
eAchievementID_HalfMoon,
|
||||
eAchievementID_FullMoon,
|
||||
eAchievementID_BlueStreak,
|
||||
eAchievementID_PowerOverwhelming,
|
||||
eAchievementID_GettingTheHangOfThings,
|
||||
eAchievementID_CreatureOfTheNight,
|
||||
eAchievementID_HelpingHand,
|
||||
eAchievementID_LayTheSmackdown,
|
||||
eAchievementID_WallCrawler,
|
||||
eAchievementID_Airdevil,
|
||||
eAchievementID_Hyperdrive,
|
||||
eAchievementID_Basher,
|
||||
eAchievementID_Smasher,
|
||||
eAchievementID_Crasher,
|
||||
eAchievementID_Thrasher,
|
||||
eAchievementID_SocialButterfly,
|
||||
eAchievementID_HungryHungryHedgehog,
|
||||
eAchievementID_AcePilot,
|
||||
eAchievementID_DayTripper,
|
||||
eAchievementID_HardDaysNight,
|
||||
eAchievementID_GetOnTheExorciseBandwagon,
|
||||
eAchievementID_GyroWithRelish = 64,
|
||||
eAchievementID_PigInABlanket,
|
||||
eAchievementID_ExoticToppings,
|
||||
eAchievementID_SausageFriedRice,
|
||||
eAchievementID_IcedHotdog,
|
||||
eAchievementID_KebabOnABun,
|
||||
eAchievementID_KetchupAndMustard,
|
||||
eAchievementID_HardBoiled,
|
||||
eAchievementID_FriedClamRoll,
|
||||
eAchievementID_FirstTimeCustomer,
|
||||
eAchievementID_OhYouShouldntHave,
|
||||
eAchievementID_ThatsEnoughSeriously,
|
||||
eAchievementID_Hedgehunk,
|
||||
eAchievementID_IAintAfraidOfNoGhost,
|
||||
eAchievementID_BFFs,
|
||||
eAchievementID_SpeedingTicket,
|
||||
eAchievementID_ComboKing,
|
||||
eAchievementID_RingLeader,
|
||||
eAchievementID_KnockoutBrawler,
|
||||
eAchievementID_BlueMeteor
|
||||
};
|
|
@ -1,23 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
#include <SWA/Achievement/AchievementID.h>
|
||||
|
||||
namespace SWA::Achievement
|
||||
{
|
||||
class CManager : public Hedgehog::Universe::CUpdateUnit
|
||||
{
|
||||
public:
|
||||
class CMember
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x08);
|
||||
be<EAchievementID> m_AchievementID;
|
||||
};
|
||||
|
||||
SWA_INSERT_PADDING(0x98);
|
||||
xpointer<CMember> m_pMember;
|
||||
be<uint32_t> m_IsUnlocked;
|
||||
SWA_INSERT_PADDING(0x10);
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
#include <SWA/Achievement/AchievementID.h>
|
||||
|
||||
namespace SWA
|
||||
{
|
||||
class CAchievementTest
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x38);
|
||||
be<uint32_t> m_Unk1;
|
||||
be<EAchievementID> m_AchievementID;
|
||||
uint8_t m_Unk2;
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
#include "SWA/System/MatrixNodeTransform.h"
|
||||
|
||||
namespace SWA::Boss::EggDragoon::DrillMissile
|
||||
{
|
||||
class CMissile
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0xC4);
|
||||
xpointer<CMatrixNodeTransform> m_pMatrixNodeTransform;
|
||||
SWA_INSERT_PADDING(0x68);
|
||||
be<float> m_Speed;
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "boost/smart_ptr/shared_ptr.h"
|
||||
|
||||
namespace Hedgehog::Database
|
||||
{
|
||||
class CDatabase;
|
||||
}
|
||||
|
||||
namespace SWA
|
||||
{
|
||||
class CCsdProject;
|
||||
|
||||
class CCsdDatabaseWrapper
|
||||
{
|
||||
public:
|
||||
Hedgehog::Database::CDatabase* m_pDatabase;
|
||||
|
||||
CCsdDatabaseWrapper(Hedgehog::Database::CDatabase* in_pDatabase) : m_pDatabase(in_pDatabase) {}
|
||||
|
||||
boost::shared_ptr<CCsdProject> GetCsdProject(const Hedgehog::Base::CSharedString& in_rName);
|
||||
};
|
||||
}
|
||||
|
||||
#include "SWA/CSD/CsdDatabaseWrapper.inl"
|
|
@ -1,9 +0,0 @@
|
|||
namespace SWA
|
||||
{
|
||||
inline boost::shared_ptr<CCsdProject> CCsdDatabaseWrapper::GetCsdProject(const Hedgehog::Base::CSharedString& in_rName)
|
||||
{
|
||||
boost::shared_ptr<CCsdProject> spCsdProject;
|
||||
GuestToHostFunction<void>(sub_825E2B40, &in_rName, this, &spCsdProject, 0);
|
||||
return spCsdProject;
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Manager/csdmRCPtr.h"
|
||||
#include "Hedgehog/Database/System/hhDatabaseData.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
class CProject;
|
||||
}
|
||||
|
||||
namespace SWA
|
||||
{
|
||||
class CCsdProject : public Hedgehog::Database::CDatabaseData
|
||||
{
|
||||
public:
|
||||
Chao::CSD::RCPtr<Chao::CSD::CProject> m_rcProject;
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CSD/Platform/csdTexList.h"
|
||||
|
||||
namespace Hedgehog::Mirage
|
||||
{
|
||||
class CTexsetData;
|
||||
}
|
||||
|
||||
namespace SWA
|
||||
{
|
||||
class CCsdTexListMirage : public Chao::CSD::CTexList
|
||||
{
|
||||
public:
|
||||
boost::shared_ptr<Hedgehog::Mirage::CTexsetData> m_spTexsetData;
|
||||
SWA_INSERT_PADDING(0x04);
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "SWA.inl"
|
||||
#include "CSD/Manager/csdmRCPtr.h"
|
||||
#include "SWA/System/GameObject.h"
|
||||
|
||||
namespace Chao::CSD
|
||||
{
|
||||
class CProject;
|
||||
}
|
||||
|
||||
namespace SWA
|
||||
{
|
||||
class CGameObjectCSD : public CGameObject
|
||||
{
|
||||
public:
|
||||
xpointer<void> m_pVftable;
|
||||
Chao::CSD::RCPtr<Chao::CSD::CProject> m_rcProject;
|
||||
};
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
#include <SWA/System/GameObject.h>
|
||||
|
||||
namespace SWA
|
||||
{
|
||||
class CCamera : public CGameObject // , public Hedgehog::Universe::TStateMachine<CCamera>
|
||||
{
|
||||
public:
|
||||
xpointer<void> m_pVftable;
|
||||
SWA_INSERT_PADDING(0xC4);
|
||||
be<float> m_VertAspectRatio;
|
||||
SWA_INSERT_PADDING(0x48);
|
||||
be<float> m_HorzAspectRatio;
|
||||
SWA_INSERT_PADDING(0x178);
|
||||
be<float> m_FieldOfView;
|
||||
be<float> m_VertFieldOfView;
|
||||
be<float> m_HorzFieldOfView;
|
||||
SWA_INSERT_PADDING(0x18);
|
||||
bool m_InvertY;
|
||||
bool m_InvertX;
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <SWA.inl>
|
||||
|
||||
namespace SWA
|
||||
{
|
||||
class CCameraController : public Hedgehog::Universe::CStateMachineBase::CStateBase
|
||||
{
|
||||
public:
|
||||
SWA_INSERT_PADDING(0x04);
|
||||
be<float> m_FieldOfView;
|
||||
SWA_INSERT_PADDING(0x68);
|
||||
};
|
||||
|
||||
SWA_ASSERT_OFFSETOF(CCameraController, m_FieldOfView, 0x64);
|
||||
SWA_ASSERT_SIZEOF(CCameraController, 0xD0);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue