mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-04 03:12:48 -04:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ca2e4d77a |
+1
-1
@@ -2,7 +2,7 @@
|
||||
Language: Cpp
|
||||
Standard: C++03
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignOperands: true
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
name: Bug Report
|
||||
description: Report an issue with Dusklight
|
||||
type: Bug
|
||||
body:
|
||||
- type: checkboxes
|
||||
id: official-build-certification
|
||||
attributes:
|
||||
label: Mods and Forks
|
||||
description: Certify that this issue exists on the official builds of Dusklight
|
||||
options:
|
||||
- label: The bug occurs on an **official release** of Dusklight, without any forks or third-party patches installed
|
||||
required: true
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: dusklight-version
|
||||
attributes:
|
||||
label: Dusklight Version
|
||||
placeholder: ex. 1.3.1
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: bug-description
|
||||
attributes:
|
||||
label: Bug Description
|
||||
placeholder: Describe the bug you are encountering
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: repro-steps
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
placeholder: |
|
||||
1. Load save
|
||||
2. Go to Hyrule Field
|
||||
3. See bug
|
||||
|
||||
- type: textarea
|
||||
id: expected-behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
placeholder: Describe what should be happening
|
||||
|
||||
- type: textarea
|
||||
id: current-behavior
|
||||
attributes:
|
||||
label: Current Behavior
|
||||
placeholder: Describe what is happening instead
|
||||
|
||||
- type: dropdown
|
||||
id: system-os-architecture
|
||||
attributes:
|
||||
label: OS / Architecture
|
||||
description: The operating system and architecture you are running Dusklight on
|
||||
options:
|
||||
- Windows x86-64
|
||||
- Windows ARM64
|
||||
- MacOS ARM64
|
||||
- MacOS x86-64
|
||||
- Linux ARM64
|
||||
- Linux x84-64
|
||||
- Android ARM64
|
||||
- iOS ARM64
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: game-region
|
||||
attributes:
|
||||
label: Game Region
|
||||
description: The game region you are playing on
|
||||
options:
|
||||
- NTSC-U (North America)
|
||||
- PAL (Europe)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: game-language
|
||||
attributes:
|
||||
label: Game Language
|
||||
description: The language you are playing the game in
|
||||
placeholder: ex. English, Spanish, etc.
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Graphics Backend
|
||||
options:
|
||||
- Vulkan
|
||||
- D3D12
|
||||
- Metal
|
||||
- D3D11
|
||||
- OpenGL ES
|
||||
- Unsure / Default
|
||||
default: 5
|
||||
|
||||
- type: textarea
|
||||
id: texture-packs-mods
|
||||
attributes:
|
||||
label: Texture Packs and Mods
|
||||
placeholder: List any texture packs or mods you had installed
|
||||
|
||||
- type: upload
|
||||
id: logs-upload
|
||||
attributes:
|
||||
label: Logs and Other Files
|
||||
description: Include any relevant logs, config files, or saves to reproduce the bug
|
||||
|
||||
- type: textarea
|
||||
id: additional-context
|
||||
attributes:
|
||||
label: Additional Context
|
||||
placeholder: Any other information that might be helpful
|
||||
@@ -1,24 +0,0 @@
|
||||
name: Feature Request
|
||||
description: Request a new Dusklight feature. Not all requests can/will be included, but we will take these ideas into consideration.
|
||||
type: Feature
|
||||
body:
|
||||
- type: textarea
|
||||
id: feature-description
|
||||
attributes:
|
||||
label: Feature Description
|
||||
placeholder: Describe the feature you are requesting
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: feature-platform
|
||||
attributes:
|
||||
label: Platform
|
||||
description: If applicable, list the platforms this feature applies to. If it is for all platforms, feel free to leave this field blank.
|
||||
placeholder: ex. Mac, Android, Steam Deck, etc.
|
||||
|
||||
- type: textarea
|
||||
id: feature-related-info
|
||||
attributes:
|
||||
label: Additional Information
|
||||
placeholder: Any other information that might be helpful (related features, existing implementations, open pull requests or issues, etc.)
|
||||
+41
-118
@@ -5,21 +5,11 @@ on:
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- '*LICENSE'
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
- '*LICENSE'
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('run-{0}', github.run_id) }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
@@ -31,7 +21,7 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- name: GCC x86_64
|
||||
runner: ubuntu-24.04
|
||||
runner: ubuntu-latest
|
||||
preset: gcc
|
||||
artifact_arch: x86_64
|
||||
- name: GCC aarch64
|
||||
@@ -52,17 +42,14 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install ninja-build clang lld mold openssl libcurl4-openssl-dev \
|
||||
sudo apt-get -y install ninja-build clang lld openssl libcurl4-openssl-dev \
|
||||
zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
|
||||
libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev libfreetype-dev \
|
||||
libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev libssl-dev \
|
||||
libxss-dev libfuse2 libusb-1.0-0-dev libdecor-0-dev libpipewire-0.3-dev libunwind-dev
|
||||
libxss-dev libfuse2
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.10
|
||||
|
||||
- name: Print sccache stats
|
||||
run: sccache --show-stats
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --preset x-linux-ci-${{matrix.preset}}
|
||||
@@ -76,11 +63,12 @@ jobs:
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: dusklight-${{env.DUSK_VERSION}}-linux-${{matrix.preset}}-${{matrix.artifact_arch}}
|
||||
name: dusk-${{env.DUSK_VERSION}}-linux-${{matrix.preset}}-${{matrix.artifact_arch}}
|
||||
path: |
|
||||
build/install/Dusklight-*.AppImage
|
||||
build/install/Dusk-*.AppImage
|
||||
build/install/debug.tar.*
|
||||
|
||||
|
||||
build-apple:
|
||||
name: Build Apple (${{matrix.name}})
|
||||
runs-on: macos-latest
|
||||
@@ -88,19 +76,15 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: AppleClang macOS arm64
|
||||
- name: AppleClang macOS universal
|
||||
platform: macos
|
||||
preset: x-macos-ci-arm64
|
||||
artifact_name: macos-appleclang-arm64
|
||||
- name: AppleClang macOS x86_64
|
||||
platform: macos
|
||||
preset: x-macos-ci-x86_64
|
||||
artifact_name: macos-appleclang-x86_64
|
||||
- name: AppleClang iOS arm64
|
||||
platform: ios
|
||||
preset: x-ios-ci
|
||||
artifact_name: ios-appleclang-arm64
|
||||
# - name: AppleClang tvOS arm64
|
||||
preset: x-macos-ci
|
||||
artifact_name: macos-appleclang-universal
|
||||
# - name: AppleClang iOS arm64 # TODO enable when CI is free
|
||||
# platform: ios
|
||||
# preset: x-ios-ci
|
||||
# artifact_name: ios-appleclang-arm64
|
||||
# - name: AppleClang tvOS arm64 # TODO enable when CI is free
|
||||
# platform: tvos
|
||||
# preset: x-tvos-ci
|
||||
# artifact_name: tvos-appleclang-arm64
|
||||
@@ -111,14 +95,22 @@ jobs:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Update Homebrew
|
||||
if: matrix.platform == 'tvos'
|
||||
run: |
|
||||
brew update
|
||||
brew upgrade --formula
|
||||
|
||||
- name: Install dependencies
|
||||
run: brew install cmake ninja
|
||||
|
||||
- name: Install markupsafe
|
||||
if: matrix.platform == 'tvos'
|
||||
run: pip3 install --break-system-packages markupsafe
|
||||
|
||||
- name: Install Rust iOS target
|
||||
if: matrix.platform == 'ios'
|
||||
run: |
|
||||
rustup toolchain install stable
|
||||
rustup target add aarch64-apple-ios
|
||||
run: rustup target add aarch64-apple-ios
|
||||
|
||||
- name: Install Rust tvOS target
|
||||
if: matrix.platform == 'tvos'
|
||||
@@ -126,14 +118,8 @@ jobs:
|
||||
rustup toolchain install nightly
|
||||
rustup target add --toolchain nightly aarch64-apple-tvos
|
||||
|
||||
- name: Install Rust x86_64 macOS target
|
||||
if: endsWith(matrix.preset, 'x86_64')
|
||||
run: |
|
||||
rustup toolchain install stable
|
||||
rustup target add x86_64-apple-darwin
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.10
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --preset ${{matrix.preset}}
|
||||
@@ -144,82 +130,19 @@ jobs:
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: dusklight-${{env.DUSK_VERSION}}-${{matrix.artifact_name}}
|
||||
name: dusk-${{env.DUSK_VERSION}}-${{matrix.artifact_name}}
|
||||
path: |
|
||||
build/install/Dusklight.app
|
||||
build/install/Dusk.app
|
||||
build/install/debug.tar.*
|
||||
|
||||
build-android:
|
||||
name: Build Android (${{matrix.name}})
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: Clang arm64-v8a
|
||||
preset: x-android-ci-arm64
|
||||
abi: arm64-v8a
|
||||
artifact_arch: arm64
|
||||
rust_target: aarch64-linux-android
|
||||
|
||||
env:
|
||||
ANDROID_NDK_VERSION: "29.0.14206865"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install ninja-build
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v4
|
||||
|
||||
- name: Install Android SDK packages
|
||||
run: sdkmanager "platforms;android-36" "build-tools;36.1.0" "ndk;${ANDROID_NDK_VERSION}"
|
||||
|
||||
- name: Install Rust Android target
|
||||
run: |
|
||||
rustup toolchain install stable
|
||||
rustup target add ${{matrix.rust_target}}
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.10
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --preset ${{matrix.preset}}
|
||||
|
||||
- name: Build native library
|
||||
run: cmake --build --preset ${{matrix.preset}} --target dusklight
|
||||
|
||||
- name: Stage stripped JNI library
|
||||
run: ANDROID_STAGE_ABIS="${{matrix.abi}}" platforms/android/scripts/stage-jni-libs.sh
|
||||
|
||||
- name: Build APK
|
||||
working-directory: platforms/android
|
||||
run: ./gradlew :app:assembleRelease --rerun-tasks
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: dusklight-${{env.DUSK_VERSION}}-android-${{matrix.artifact_arch}}
|
||||
path: platforms/android/app/build/outputs/apk/release/app-${{matrix.abi}}-release-unsigned.apk
|
||||
|
||||
build-windows:
|
||||
name: Build Windows (${{matrix.name}})
|
||||
runs-on: ${{matrix.runner}}
|
||||
|
||||
env:
|
||||
BUILD_DIR: C:\build
|
||||
SCCACHE_DIR: C:\sccache
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -231,9 +154,9 @@ jobs:
|
||||
vcpkg_arch: x64
|
||||
artifact_arch: x86_64
|
||||
- name: MSVC arm64
|
||||
runner: windows-latest
|
||||
runner: windows-11-arm
|
||||
preset: arm64-msvc
|
||||
msvc_arch: amd64_arm64
|
||||
msvc_arch: arm64
|
||||
vcpkg_arch: arm64
|
||||
artifact_arch: arm64
|
||||
# - name: Clang x86_64
|
||||
@@ -264,7 +187,9 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
choco install ninja
|
||||
vcpkg install freetype:${{matrix.vcpkg_arch}}-windows zstd:${{matrix.vcpkg_arch}}-windows
|
||||
vcpkg install zlib:${{matrix.vcpkg_arch}}-windows-static bzip2:${{matrix.vcpkg_arch}}-windows-static `
|
||||
zstd:${{matrix.vcpkg_arch}}-windows-static liblzma:${{matrix.vcpkg_arch}}-windows-static `
|
||||
freetype:${{matrix.vcpkg_arch}}-windows-static
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake --preset x-windows-ci-${{matrix.preset}}
|
||||
@@ -275,9 +200,7 @@ jobs:
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: dusklight-${{env.DUSK_VERSION}}-win32-msvc-${{matrix.artifact_arch}}
|
||||
name: dusk-${{env.DUSK_VERSION}}-win32-msvc-${{matrix.artifact_arch}}
|
||||
path: |
|
||||
build/install/*.exe
|
||||
build/install/*.dll
|
||||
build/install/res/
|
||||
build/install/debug.7z
|
||||
${{env.BUILD_DIR}}/install/*.exe
|
||||
${{env.BUILD_DIR}}/install/debug.7z
|
||||
|
||||
@@ -41,10 +41,6 @@ compile_commands.json
|
||||
# MacOS
|
||||
.DS_Store
|
||||
|
||||
# direnv / nix
|
||||
.direnv/
|
||||
.envrc
|
||||
|
||||
# ISOs
|
||||
*.iso
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -2,11 +2,11 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) Launch Dusklight MSVC",
|
||||
"name": "(gdb) Launch Dusk MSVC",
|
||||
"type": "cppvsdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": ["-l", "1", "--dvd", "${workspaceRoot}/orig/GZ2E01/GZ2E01.iso", "--console"],
|
||||
"args": ["-l", "1", "--dvd", "${workspaceRoot}/orig/GZ2E01/GZ2E01.iso"],
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "gdb",
|
||||
"symbolSearchPath": "${command:cmake.launchTargetPath}",
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build/dusklight/${buildType}/${variant:tp_version}",
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build/dusk/${buildType}/${variant:tp_version}",
|
||||
"cmake.generator": "Ninja",
|
||||
"cmake.configureSettings": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
|
||||
+140
-474
@@ -5,20 +5,8 @@ if (NOT CMAKE_BUILD_TYPE)
|
||||
"Build type options: Debug Release RelWithDebInfo MinSizeRel" FORCE)
|
||||
endif ()
|
||||
|
||||
set(DUSK_VERSION_OVERRIDE "" CACHE STRING "Override version string (skips git detection and format validation)")
|
||||
|
||||
if (DUSK_VERSION_OVERRIDE)
|
||||
set(DUSK_WC_DESCRIBE "${DUSK_VERSION_OVERRIDE}")
|
||||
set(DUSK_VERSION_STRING "0.0.0.0")
|
||||
set(DUSK_SHORT_VERSION_STRING "0.0.0")
|
||||
set(DUSK_VERSION_CODE "1")
|
||||
set(DUSK_WC_REVISION "")
|
||||
set(DUSK_WC_BRANCH "")
|
||||
set(DUSK_WC_DATE "")
|
||||
message(STATUS "Dusklight version overridden to ${DUSK_WC_DESCRIBE}")
|
||||
else ()
|
||||
# obtain revision info from git
|
||||
find_package(Git)
|
||||
# obtain revision info from git
|
||||
find_package(Git)
|
||||
if (GIT_FOUND)
|
||||
# make sure version information gets re-run when the current Git HEAD changes
|
||||
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --git-path HEAD
|
||||
@@ -60,48 +48,21 @@ else ()
|
||||
message(STATUS "Unable to find git, commit information will not be available")
|
||||
endif ()
|
||||
|
||||
if (DUSK_WC_DESCRIBE MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)([-+].*)?$")
|
||||
set(DUSK_SHORT_VERSION_STRING "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
|
||||
set(_ver_major ${CMAKE_MATCH_1})
|
||||
set(_ver_minor ${CMAKE_MATCH_2})
|
||||
set(_ver_patch ${CMAKE_MATCH_3})
|
||||
set(DUSK_VERSION_TWEAK "0")
|
||||
if (DUSK_WC_DESCRIBE MATCHES "^v[0-9]+\\.[0-9]+\\.[0-9]+-([0-9]+)(-dirty)?$")
|
||||
set(DUSK_VERSION_TWEAK "${CMAKE_MATCH_1}")
|
||||
elseif (DUSK_WC_DESCRIBE MATCHES "^v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9A-Za-z.-]+-([0-9]+)(-dirty)?$")
|
||||
set(DUSK_VERSION_TWEAK "${CMAKE_MATCH_1}")
|
||||
endif ()
|
||||
set(DUSK_VERSION_STRING "${DUSK_SHORT_VERSION_STRING}.${DUSK_VERSION_TWEAK}")
|
||||
if(DUSK_VERSION_TWEAK GREATER 999)
|
||||
set(_tweak 999)
|
||||
else()
|
||||
set(_tweak ${DUSK_VERSION_TWEAK})
|
||||
endif()
|
||||
# encoding: major*1e7 + minor*1e5 + patch*1e3 + tweak; collision-free for major<210, minor<100, patch<100, tweak<=999
|
||||
math(EXPR DUSK_VERSION_CODE
|
||||
"${_ver_major} * 10000000 + ${_ver_minor} * 100000 + ${_ver_patch} * 1000 + ${_tweak}")
|
||||
if (DUSK_WC_DESCRIBE)
|
||||
string(REGEX REPLACE "v([0-9]+)\.([0-9]+)\.([0-9]+)\-([0-9]+).*" "\\1.\\2.\\3.\\4" DUSK_VERSION_STRING "${DUSK_WC_DESCRIBE}")
|
||||
string(REGEX REPLACE "v([0-9]+)\.([0-9]+)\.([0-9]+).*" "\\1.\\2.\\3" DUSK_SHORT_VERSION_STRING "${DUSK_WC_DESCRIBE}")
|
||||
else ()
|
||||
set(DUSK_WC_DESCRIBE "UNKNOWN-VERSION")
|
||||
set(DUSK_VERSION_STRING "0.0.0.0")
|
||||
set(DUSK_SHORT_VERSION_STRING "0.0.0")
|
||||
set(DUSK_VERSION_CODE "1")
|
||||
endif ()
|
||||
|
||||
set(DUSK_VERSION_STRING "0.0.0")
|
||||
endif ()
|
||||
|
||||
# Add version information to CI environment variables
|
||||
if(DEFINED ENV{GITHUB_ENV})
|
||||
file(APPEND "$ENV{GITHUB_ENV}" "DUSK_VERSION=${DUSK_WC_DESCRIBE}\n")
|
||||
file(APPEND "$ENV{GITHUB_ENV}" "DUSK_VERSION_CODE=${DUSK_VERSION_CODE}\n")
|
||||
endif()
|
||||
message(STATUS "Dusklight version set to ${DUSK_WC_DESCRIBE}")
|
||||
message(STATUS "Dusk version set to ${DUSK_WC_DESCRIBE}")
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
project(dusklight LANGUAGES C CXX VERSION ${DUSK_VERSION_STRING})
|
||||
if (APPLE)
|
||||
enable_language(OBJC OBJCXX)
|
||||
endif ()
|
||||
# Adjust CMAKE_SYSTEM_PROCESSOR on Windows to match compiler target
|
||||
include(cmake/WindowsTargetProcessor.cmake)
|
||||
project(dusk LANGUAGES C CXX VERSION ${DUSK_VERSION_STRING})
|
||||
if (APPLE AND NOT TVOS AND CMAKE_SYSTEM_NAME STREQUAL tvOS)
|
||||
# ios.toolchain.cmake hack for SDL
|
||||
set(TVOS ON)
|
||||
@@ -121,81 +82,25 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
|
||||
# Folder-based instead of target-based organization
|
||||
# in Visual Studio and Xcode generators
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "_cmake")
|
||||
|
||||
option(ENABLE_ASAN "Enable AddressSanitizer" OFF)
|
||||
if (ENABLE_ASAN)
|
||||
if (CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC" AND
|
||||
CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/fsanitize=address>)
|
||||
add_link_options(/fsanitize=address /INCREMENTAL:NO)
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase")
|
||||
foreach (_lang C CXX)
|
||||
foreach (_rtc_flag /RTC1 /RTCc /RTCs /RTCu)
|
||||
string(REPLACE "${_rtc_flag}" "" CMAKE_${_lang}_FLAGS_DEBUG "${CMAKE_${_lang}_FLAGS_DEBUG}")
|
||||
endforeach ()
|
||||
endforeach ()
|
||||
elseif (CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "GNU" AND
|
||||
CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-fsanitize=address>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-fno-omit-frame-pointer>
|
||||
)
|
||||
add_link_options(-fsanitize=address)
|
||||
else ()
|
||||
message(FATAL_ERROR "ENABLE_ASAN requires GNU-like or MSVC-like C/C++ compiler frontends")
|
||||
endif ()
|
||||
|
||||
add_compile_definitions(NDEBUG_SANITIZER) # Avoids absl issue with SwissTable debug code
|
||||
message(STATUS "dusklight: Enabled AddressSanitizer")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
set(DAWN_USE_WAYLAND ON CACHE BOOL "Enable support for Wayland surface" FORCE)
|
||||
endif ()
|
||||
set(AURORA_ENABLE_DVD ON CACHE BOOL "Enable DVD API support" FORCE)
|
||||
set(AURORA_ENABLE_CARD ON CACHE BOOL "Enable CARD API support" FORCE)
|
||||
set(AURORA_ENABLE_RMLUI ON CACHE BOOL "Enable RmlUi UI support" FORCE)
|
||||
add_subdirectory(extern/aurora EXCLUDE_FROM_ALL)
|
||||
target_compile_definitions(aurora_mtx PRIVATE MTX_USE_PS=1)
|
||||
|
||||
add_subdirectory(libs/freeverb)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(DUSK_GFX_DEBUG_GROUPS_DEFAULT ON)
|
||||
else ()
|
||||
set(DUSK_GFX_DEBUG_GROUPS_DEFAULT OFF)
|
||||
endif ()
|
||||
|
||||
option(DUSK_BUILD_WARNINGS "Enable compiler warnings (off by default)")
|
||||
option(DUSK_SELECTED_OPT "If on, selected parts of the project will be compiled with optimizations on Debug, intending to make the game run at 30 FPS. Note for MSVC: you will need to remove '/RTC1' from your debug flags in CMake.")
|
||||
option(DUSK_MOVIE_SUPPORT "If on, compile against libjpeg-turbo to enable THP file decoding" ON)
|
||||
option(DUSK_ENABLE_UPDATE_CHECKER "Enable update checking support" ON)
|
||||
option(DUSK_ENABLE_SENTRY_NATIVE "Enable sentry-native crash reporting support" OFF)
|
||||
option(DUSK_PACKAGE_INSTALL "Install Dusklight with a Linux-native file structure" OFF)
|
||||
option(DUSK_GFX_DEBUG_GROUPS "Report debug groups to the native graphics API" ${DUSK_GFX_DEBUG_GROUPS_DEFAULT})
|
||||
set(DUSK_SENTRY_DSN "" CACHE STRING "Sentry DSN")
|
||||
set(DUSK_SENTRY_ENVIRONMENT "development" CACHE STRING "Sentry environment")
|
||||
|
||||
# Edit & Continue
|
||||
if (MSVC)
|
||||
if ("${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}" STREQUAL "" AND CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "EditAndContinue")
|
||||
endif ()
|
||||
if (CMAKE_MSVC_DEBUG_INFORMATION_FORMAT STREQUAL "EditAndContinue")
|
||||
add_link_options("/INCREMENTAL")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (DUSK_MOVIE_SUPPORT)
|
||||
find_package(libjpeg-turbo 3.0 CONFIG QUIET)
|
||||
find_package(libjpeg-turbo QUIET)
|
||||
if (libjpeg-turbo_FOUND)
|
||||
message(STATUS "dusklight: Using system libjpeg-turbo")
|
||||
message(STATUS "dusk: Using system libjpeg-turbo")
|
||||
else ()
|
||||
message(STATUS "dusklight: Fetching libjpeg-turbo")
|
||||
message(STATUS "dusk: Fetching libjpeg-turbo")
|
||||
include(ExternalProject)
|
||||
set(_jpeg_install_dir ${CMAKE_BINARY_DIR}/libjpeg-turbo-install)
|
||||
if (WIN32)
|
||||
@@ -203,43 +108,19 @@ if (DUSK_MOVIE_SUPPORT)
|
||||
else ()
|
||||
set(_jpeg_lib ${_jpeg_install_dir}/lib/libturbojpeg.a)
|
||||
endif ()
|
||||
set(_jpeg_cmake_args
|
||||
-DCMAKE_INSTALL_PREFIX=${_jpeg_install_dir}
|
||||
-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/WindowsTargetProcessor.cmake
|
||||
-DENABLE_SHARED=OFF
|
||||
-DWITH_TURBOJPEG=ON
|
||||
-DWITH_JAVA=OFF
|
||||
)
|
||||
if (CMAKE_TOOLCHAIN_FILE)
|
||||
get_filename_component(_jpeg_toolchain_file "${CMAKE_TOOLCHAIN_FILE}" ABSOLUTE BASE_DIR "${CMAKE_SOURCE_DIR}")
|
||||
list(APPEND _jpeg_cmake_args -DCMAKE_TOOLCHAIN_FILE=${_jpeg_toolchain_file})
|
||||
endif ()
|
||||
set(_jpeg_passthrough_vars
|
||||
ANDROID_ABI
|
||||
ANDROID_PLATFORM
|
||||
CMAKE_BUILD_TYPE
|
||||
CMAKE_C_COMPILER
|
||||
CMAKE_C_COMPILER_LAUNCHER
|
||||
CMAKE_MAKE_PROGRAM
|
||||
CMAKE_MSVC_RUNTIME_LIBRARY
|
||||
CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
|
||||
CMAKE_OSX_ARCHITECTURES
|
||||
CMAKE_OSX_DEPLOYMENT_TARGET
|
||||
CMAKE_OSX_SYSROOT
|
||||
DEPLOYMENT_TARGET
|
||||
ENABLE_ARC
|
||||
ENABLE_BITCODE
|
||||
PLATFORM
|
||||
)
|
||||
foreach(_var IN LISTS _jpeg_passthrough_vars)
|
||||
if (DEFINED ${_var})
|
||||
list(APPEND _jpeg_cmake_args -D${_var}=${${_var}})
|
||||
endif ()
|
||||
endforeach ()
|
||||
ExternalProject_Add(libjpeg-turbo-ext
|
||||
URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.1.0.tar.gz
|
||||
URL_HASH SHA256=35fec2e1ddfb05ecf6d93e50bc57c1e54bc81c16d611ddf6eff73fff266d8285
|
||||
CMAKE_ARGS ${_jpeg_cmake_args}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX=${_jpeg_install_dir}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}
|
||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY}
|
||||
-DENABLE_SHARED=OFF
|
||||
-DWITH_TURBOJPEG=ON
|
||||
-DWITH_JAVA=OFF
|
||||
BUILD_BYPRODUCTS ${_jpeg_lib}
|
||||
)
|
||||
file(MAKE_DIRECTORY ${_jpeg_install_dir}/include)
|
||||
@@ -256,9 +137,10 @@ if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
# -Wno-multichar: Multi-character constants ('ABCD') are implementation-defined but all compilers
|
||||
# (CW, GCC, Clang, MSVC) encode them identically in big-endian order.
|
||||
# For >4-char literals (which GCC/Clang truncate to int), use the MULTI_CHAR() macro.
|
||||
# -Wwrite-strings: Game code relies on implicit const char* -> char* conversions
|
||||
# -Wdeprecated-declarations: JSystem uses std::iterator, deprecated in C++17
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-multichar -Wno-trigraphs -Wno-deprecated-declarations")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar -Wno-write-strings")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-multichar -Wno-write-strings -Wno-trigraphs -Wno-deprecated-declarations")
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||
set(CMAKE_BUILD_RPATH "$ORIGIN")
|
||||
elseif (APPLE)
|
||||
@@ -266,34 +148,34 @@ elseif (APPLE)
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||
set(CMAKE_BUILD_RPATH "$ORIGIN")
|
||||
elseif (MSVC)
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:/bigobj>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:/MP>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:/FS>
|
||||
)
|
||||
add_compile_options(/bigobj)
|
||||
add_compile_options(/Zc:strictStrings-)
|
||||
add_compile_options(/MP)
|
||||
add_compile_options(/FS)
|
||||
|
||||
if (NOT DUSK_BUILD_WARNINGS)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/W0>)
|
||||
add_compile_options(/W0)
|
||||
else ()
|
||||
# Disable warnings
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4068>) # unknown pragma
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4291>) # no matching delete operator, leaks if exception thrown
|
||||
add_compile_options(/wd4068) # unknown pragma
|
||||
add_compile_options(/wd4291) # no matching delete operator, leaks if exception thrown
|
||||
# Only show warnings once
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wo4244>) # narrowing conversion, possible data loss
|
||||
add_compile_options(/wo4244) # narrowing conversion, possible data loss
|
||||
endif ()
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/utf-8>)
|
||||
add_compile_options(/utf-8)
|
||||
endif ()
|
||||
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
# Declare all dependencies first so CMake can download them in parallel
|
||||
message(STATUS "dusklight: Fetching cxxopts")
|
||||
message(STATUS "dusk: Fetching cxxopts")
|
||||
FetchContent_Declare(cxxopts
|
||||
URL https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.3.1.tar.gz
|
||||
URL_HASH SHA256=3bfc70542c521d4b55a46429d808178916a579b28d048bd8c727ee76c39e2072
|
||||
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
|
||||
)
|
||||
message(STATUS "dusklight: Fetching nlohmann/json")
|
||||
message(STATUS "dusk: Fetching nlohmann/json")
|
||||
FetchContent_Declare(json
|
||||
URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz
|
||||
URL_HASH SHA256=42f6e95cad6ec532fd372391373363b62a14af6d771056dbfc86160e6dfff7aa
|
||||
@@ -301,132 +183,38 @@ FetchContent_Declare(json
|
||||
)
|
||||
FetchContent_MakeAvailable(cxxopts json)
|
||||
|
||||
if (DUSK_ENABLE_SENTRY_NATIVE)
|
||||
message(STATUS "dusklight: Fetching sentry-native")
|
||||
set(SENTRY_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
||||
set(SENTRY_BACKEND crashpad CACHE STRING "" FORCE)
|
||||
if (WIN32)
|
||||
set(SENTRY_TRANSPORT winhttp CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
set(SENTRY_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(SENTRY_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
set(SENTRY_BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE)
|
||||
FetchContent_Declare(sentry_native
|
||||
GIT_REPOSITORY https://github.com/getsentry/sentry-native.git
|
||||
GIT_TAG 0.13.6
|
||||
GIT_SHALLOW TRUE
|
||||
GIT_PROGRESS TRUE
|
||||
GIT_SUBMODULES_RECURSE TRUE
|
||||
)
|
||||
if (NOT sentry_native_POPULATED)
|
||||
FetchContent_Populate(sentry_native)
|
||||
set(_dusk_skip_install_rules ${CMAKE_SKIP_INSTALL_RULES})
|
||||
set(CMAKE_SKIP_INSTALL_RULES ON)
|
||||
add_subdirectory(${sentry_native_SOURCE_DIR} ${sentry_native_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
set(CMAKE_SKIP_INSTALL_RULES ${_dusk_skip_install_rules})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Use signed char on ARM to match the original game (and x86)
|
||||
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _arch)
|
||||
if(_arch MATCHES "^(arm|aarch64)" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
|
||||
add_compile_options(-fsigned-char)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
|
||||
set(PLATFORM_NAME win32)
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
||||
if (IOS)
|
||||
set(PLATFORM_NAME ios)
|
||||
elseif (TVOS)
|
||||
set(PLATFORM_NAME tvos)
|
||||
else ()
|
||||
set(PLATFORM_NAME macos)
|
||||
endif ()
|
||||
else ()
|
||||
string(TOLOWER CMAKE_SYSTEM_NAME PLATFORM_NAME)
|
||||
endif ()
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_BINARY_DIR}/version.h)
|
||||
|
||||
include(files.cmake)
|
||||
|
||||
# TODO: version handling for res includes
|
||||
|
||||
set(DUSK_BUNDLE_NAME Dusklight)
|
||||
set(DUSK_BUNDLE_IDENTIFIER dev.twilitrealm.dusk)
|
||||
set(DUSK_COMPANY_NAME "Twilit Realm")
|
||||
set(DUSK_FILE_DESCRIPTION "Dusklight")
|
||||
set(DUSK_PRODUCT_NAME "Dusklight")
|
||||
set(DUSK_COPYRIGHT "Copyright (C) Twilit Realm contributors")
|
||||
set(DUSK_BUNDLE_NAME Dusk)
|
||||
set(DUSK_BUNDLE_IDENTIFIER dev.decomp.dusk)
|
||||
set(DUSK_GAME_NAME "GZ2E")
|
||||
set(DUSK_GAME_VERSION "01")
|
||||
set(DUSK_TP_VERSION ${DUSK_GAME_NAME}${DUSK_GAME_VERSION})
|
||||
|
||||
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${REL_FILES})
|
||||
source_group("dusklight" FILES ${DUSK_FILES} ${DUSK_HTTP_BACKEND_FILES})
|
||||
message(STATUS "dusk: Game Version: ${DUSK_TP_VERSION}")
|
||||
|
||||
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0 MTX_USE_PS=1)
|
||||
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${JSYSTEM_FILES} ${JSYSTEM_DEBUG_FILES} ${REL_FILES})
|
||||
source_group("dusk" FILES ${DUSK_FILES})
|
||||
|
||||
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0
|
||||
DUSK_TP_VERSION="${DUSK_TP_VERSION}" DUSK_GAME_NAME="${DUSK_GAME_NAME}" DUSK_GAME_VERSION="${DUSK_GAME_VERSION}")
|
||||
|
||||
set(GAME_INCLUDE_DIRS
|
||||
include
|
||||
src
|
||||
assets/GZ2E01 # TODO: make this dynamic if needed?
|
||||
assets/${DUSK_TP_VERSION}
|
||||
libs/JSystem/include
|
||||
libs
|
||||
extern/aurora/include/dolphin
|
||||
extern
|
||||
${CMAKE_BINARY_DIR})
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
set(GAME_LIBS aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd
|
||||
aurora::card freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json TracyClient fmt::fmt
|
||||
Threads::Threads zstd::libzstd)
|
||||
|
||||
if (DUSK_ENABLE_SENTRY_NATIVE)
|
||||
list(APPEND GAME_LIBS sentry)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_ENABLE_SENTRY_NATIVE=1 SENTRY_BUILD_STATIC=1)
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
list(APPEND GAME_LIBS Ws2_32)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
list(APPEND GAME_LIBS dbghelp)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_CRASH_DBGHELP=1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/no_backend.cpp)
|
||||
if (DUSK_ENABLE_UPDATE_CHECKER)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_ENABLE_UPDATE_CHECKER=1)
|
||||
if (WIN32)
|
||||
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/winhttp.cpp)
|
||||
list(APPEND GAME_LIBS winhttp)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_HTTP_BACKEND_WINHTTP=1)
|
||||
message(STATUS "dusklight: Enabled update checker (WinHTTP)")
|
||||
elseif (ANDROID)
|
||||
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/android.cpp)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_HTTP_BACKEND_ANDROID=1)
|
||||
message(STATUS "dusklight: Enabled update checker (Android)")
|
||||
elseif (APPLE)
|
||||
find_library(FOUNDATION_FRAMEWORK Foundation REQUIRED)
|
||||
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/url_session.mm)
|
||||
set_source_files_properties(src/dusk/http/url_session.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
||||
list(APPEND GAME_LIBS ${FOUNDATION_FRAMEWORK})
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_HTTP_BACKEND_URLSESSION=1)
|
||||
message(STATUS "dusklight: Enabled update checker (NSURLSession)")
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
find_package(CURL QUIET OPTIONAL_COMPONENTS HTTPS SSL)
|
||||
if (CURL_FOUND AND CURL_HTTPS_FOUND AND CURL_SSL_FOUND)
|
||||
set(DUSK_HTTP_BACKEND_SOURCE src/dusk/http/curl.cpp)
|
||||
list(APPEND GAME_LIBS CURL::libcurl)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_HTTP_BACKEND_LIBCURL=1)
|
||||
message(STATUS "dusklight: Enabled update checker (libcurl)")
|
||||
else ()
|
||||
message(STATUS "dusklight: Disabled update checker (libcurl + HTTPS/SSL not found)")
|
||||
endif ()
|
||||
else ()
|
||||
message(STATUS "dusklight: Disabled update checker (unsupported platform)")
|
||||
endif ()
|
||||
endif ()
|
||||
list(APPEND DUSK_FILES ${DUSK_HTTP_BACKEND_SOURCE})
|
||||
aurora::card freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json TracyClient)
|
||||
|
||||
if (DUSK_MOVIE_SUPPORT)
|
||||
if (TARGET libjpeg-turbo::turbojpeg-static)
|
||||
@@ -437,208 +225,102 @@ if (DUSK_MOVIE_SUPPORT)
|
||||
list(APPEND GAME_COMPILE_DEFS MOVIE_SUPPORT=1)
|
||||
endif ()
|
||||
|
||||
set(DUSK_ENABLE_DISCORD_DEFAULT ON)
|
||||
if (DEFINED DUSK_ENABLE_DISCORD_RPC AND NOT DEFINED DUSK_ENABLE_DISCORD)
|
||||
set(DUSK_ENABLE_DISCORD_DEFAULT ${DUSK_ENABLE_DISCORD_RPC})
|
||||
endif ()
|
||||
option(DUSK_ENABLE_DISCORD "Enable Discord Rich Presence support" ${DUSK_ENABLE_DISCORD_DEFAULT})
|
||||
if (DUSK_ENABLE_DISCORD AND NOT ANDROID AND NOT IOS AND NOT TVOS)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_DISCORD=1)
|
||||
endif ()
|
||||
|
||||
if(ANDROID)
|
||||
list(APPEND GAME_COMPILE_DEFS TARGET_ANDROID=1)
|
||||
endif ()
|
||||
|
||||
if (DUSK_PACKAGE_INSTALL)
|
||||
include(GNUInstallDirs)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_ASSET_DIR="${CMAKE_INSTALL_FULL_DATADIR}/dusklight/")
|
||||
endif ()
|
||||
|
||||
if (DUSK_GFX_DEBUG_GROUPS)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_GFX_DEBUG_GROUPS=1)
|
||||
target_compile_definitions(aurora_gx PRIVATE AURORA_GFX_DEBUG_GROUPS)
|
||||
# Edit & Continue
|
||||
if (MSVC)
|
||||
add_compile_options("/ZI")
|
||||
add_link_options("/INCREMENTAL")
|
||||
endif ()
|
||||
|
||||
# game_debug is for game code files that we know work when compiled with DEBUG=1
|
||||
# Of course, if building a release build, this distinction is irrelevant
|
||||
set(GAME_DEBUG_FILES
|
||||
${SSYSTEM_FILES}
|
||||
add_library(game_debug OBJECT ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES}
|
||||
src/dusk/audio/DuskAudioSystem.cpp
|
||||
src/dusk/audio/JASCriticalSection.cpp
|
||||
src/dusk/audio/DuskDsp.cpp
|
||||
src/dusk/audio/Adpcm.cpp
|
||||
src/dusk/audio/DspStub.cpp
|
||||
src/dusk/imgui/ImGuiAudio.cpp
|
||||
)
|
||||
set_source_files_properties(
|
||||
${GAME_DEBUG_FILES}
|
||||
PROPERTIES
|
||||
COMPILE_DEFINITIONS "$<$<CONFIG:Debug>:DEBUG=1>;$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>"
|
||||
)
|
||||
src/dusk/imgui/ImGuiAudio.cpp)
|
||||
|
||||
# game_base is for all other game code files
|
||||
set(GAME_BASE_FILES
|
||||
${DOLZEL_FILES}
|
||||
${Z2AUDIOLIB_FILES}
|
||||
${REL_FILES}
|
||||
${DUSK_FILES}
|
||||
${DOLPHIN_FILES}
|
||||
add_library(game_base OBJECT ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${JSYSTEM_FILES} ${REL_FILES} ${DUSK_FILES} ${DOLPHIN_FILES})
|
||||
|
||||
target_compile_definitions(game_debug PRIVATE ${GAME_COMPILE_DEFS} $<$<CONFIG:Debug>:DEBUG=1> $<$<CONFIG:Debug>:PARTIAL_DEBUG=1>)
|
||||
target_compile_definitions(game_base PRIVATE ${GAME_COMPILE_DEFS} NDEBUG=1 NDEBUG_DEFINED=1 DEBUG_DEFINED=0 $<$<CONFIG:Debug>:PARTIAL_DEBUG=1>)
|
||||
|
||||
# only apply PCH to game_base since not all headers are necessarily validated with DEBUG=1
|
||||
target_precompile_headers(game_base PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/include/dusk_pch.hpp>")
|
||||
|
||||
target_include_directories(game_debug PRIVATE ${GAME_INCLUDE_DIRS})
|
||||
target_include_directories(game_base PRIVATE ${GAME_INCLUDE_DIRS})
|
||||
|
||||
# This implicitly pulls in the library include directories even though no
|
||||
# linking actually takes place for object libraries
|
||||
target_link_libraries(game_debug PRIVATE ${GAME_LIBS})
|
||||
target_link_libraries(game_base PRIVATE ${GAME_LIBS})
|
||||
|
||||
# Combined game library
|
||||
add_library(game STATIC
|
||||
$<TARGET_OBJECTS:game_base>
|
||||
$<TARGET_OBJECTS:game_debug>)
|
||||
target_link_libraries(game PUBLIC ${GAME_LIBS})
|
||||
|
||||
add_executable(dusk src/dusk/main.cpp)
|
||||
target_compile_definitions(dusk PRIVATE TARGET_PC AVOID_UB=1 VERSION=0)
|
||||
target_include_directories(dusk PRIVATE include)
|
||||
target_link_libraries(dusk PRIVATE game aurora::main)
|
||||
|
||||
add_custom_command(TARGET dusk POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${CMAKE_SOURCE_DIR}/res"
|
||||
"$<TARGET_FILE_DIR:dusk>/res"
|
||||
COMMENT "Copying resources"
|
||||
)
|
||||
set_source_files_properties(
|
||||
${GAME_BASE_FILES}
|
||||
PROPERTIES
|
||||
COMPILE_DEFINITIONS "NDEBUG=1;NDEBUG_DEFINED=1;DEBUG_DEFINED=0;$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>"
|
||||
)
|
||||
|
||||
foreach(jsystem_lib IN LISTS JSYSTEM_LIBRARIES)
|
||||
target_compile_definitions(${jsystem_lib} PRIVATE
|
||||
${GAME_COMPILE_DEFS}
|
||||
$<$<CONFIG:Debug>:DEBUG=1>
|
||||
$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>
|
||||
)
|
||||
target_include_directories(${jsystem_lib} PRIVATE ${GAME_INCLUDE_DIRS})
|
||||
target_link_libraries(${jsystem_lib} PRIVATE ${GAME_LIBS})
|
||||
set_target_properties(${jsystem_lib} PROPERTIES FOLDER "JSystem")
|
||||
endforeach()
|
||||
|
||||
set(JSYSTEM_LINK_LIBRARIES ${JSYSTEM_LIBRARIES})
|
||||
if (CMAKE_CXX_LINK_GROUP_USING_RESCAN_SUPPORTED OR CMAKE_LINK_GROUP_USING_RESCAN_SUPPORTED)
|
||||
# GNU ld resolves static archives in a single left-to-right pass. The split
|
||||
# JSystem libraries reference each other, so they need a RESCAN group there.
|
||||
set(JSYSTEM_LINK_LIBRARIES "$<LINK_GROUP:RESCAN,${JSYSTEM_LIBRARIES}>")
|
||||
endif ()
|
||||
|
||||
set(DUSK_FILES src/dusk/main.cpp ${GAME_BASE_FILES} ${GAME_DEBUG_FILES})
|
||||
if(ANDROID)
|
||||
add_library(dusklight SHARED ${DUSK_FILES})
|
||||
set_target_properties(dusklight PROPERTIES OUTPUT_NAME main)
|
||||
else ()
|
||||
add_executable(dusklight ${DUSK_FILES})
|
||||
endif ()
|
||||
if (ENABLE_ASAN)
|
||||
target_sources(dusklight PRIVATE src/dusk/asan_options.c)
|
||||
endif ()
|
||||
|
||||
target_compile_definitions(dusklight PRIVATE ${GAME_COMPILE_DEFS})
|
||||
target_include_directories(dusklight PRIVATE ${GAME_INCLUDE_DIRS})
|
||||
target_link_libraries(dusklight PRIVATE aurora::main ${GAME_LIBS} ${JSYSTEM_LINK_LIBRARIES})
|
||||
target_precompile_headers(dusklight PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/include/dusk_pch.hpp>")
|
||||
if (TARGET crashpad_handler)
|
||||
add_dependencies(dusklight crashpad_handler)
|
||||
add_custom_command(TARGET dusklight POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"$<TARGET_FILE:crashpad_handler>"
|
||||
"$<TARGET_FILE_DIR:dusklight>"
|
||||
COMMENT "Copying crashpad handler"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (ANDROID)
|
||||
# SDLActivity loads SDL_main via dlsym on Android. Since aurora::main is a static
|
||||
# archive, force an undefined reference so the linker keeps the SDL_main object.
|
||||
target_link_options(dusklight PRIVATE "-Wl,-u,SDL_main")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
target_link_options(dusklight PRIVATE "-Wl,--build-id=sha1")
|
||||
endif ()
|
||||
|
||||
if (NOT APPLE)
|
||||
add_custom_command(TARGET dusklight POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${CMAKE_SOURCE_DIR}/res"
|
||||
"$<TARGET_FILE_DIR:dusklight>/res"
|
||||
COMMENT "Copying resources"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
set(DUSK_WINDOWS_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/windows)
|
||||
set(DUSK_WINDOWS_ICON_PNG ${CMAKE_CURRENT_SOURCE_DIR}/res/icon.png)
|
||||
set(DUSK_WINDOWS_ICON_ICO ${CMAKE_CURRENT_BINARY_DIR}/dusklight.ico)
|
||||
set(DUSK_WINDOWS_RC ${CMAKE_CURRENT_BINARY_DIR}/dusklight.rc)
|
||||
set(DUSK_WINDOWS_MANIFEST ${CMAKE_CURRENT_BINARY_DIR}/dusklight.manifest)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${DUSK_WINDOWS_ICON_ICO}
|
||||
COMMAND powershell -ExecutionPolicy Bypass -File
|
||||
${DUSK_WINDOWS_RESOURCE_DIR}/Create-IcoFromPng.ps1
|
||||
-InputPng ${DUSK_WINDOWS_ICON_PNG}
|
||||
-OutputIco ${DUSK_WINDOWS_ICON_ICO}
|
||||
DEPENDS ${DUSK_WINDOWS_ICON_PNG} ${DUSK_WINDOWS_RESOURCE_DIR}/Create-IcoFromPng.ps1
|
||||
VERBATIM
|
||||
COMMENT "Generating Windows icon"
|
||||
)
|
||||
|
||||
configure_file(${DUSK_WINDOWS_RESOURCE_DIR}/dusklight.manifest.in ${DUSK_WINDOWS_MANIFEST} @ONLY)
|
||||
configure_file(${DUSK_WINDOWS_RESOURCE_DIR}/dusklight.rc.in ${DUSK_WINDOWS_RC} @ONLY)
|
||||
|
||||
target_sources(dusklight PRIVATE ${DUSK_WINDOWS_ICON_ICO} ${DUSK_WINDOWS_RC})
|
||||
set_target_properties(dusklight PROPERTIES WIN32_EXECUTABLE TRUE)
|
||||
|
||||
if (MSVC)
|
||||
target_link_options(dusklight PRIVATE /MANIFEST:NO)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
if (IOS)
|
||||
set(DUSK_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/ios)
|
||||
elseif (TVOS)
|
||||
set(DUSK_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/tvos)
|
||||
else ()
|
||||
set(DUSK_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/platforms/macos)
|
||||
set(DUSK_INFO_PLIST ${DUSK_RESOURCE_DIR}/Info.plist.in)
|
||||
file(GLOB_RECURSE DUSK_RESOURCE_FILES "${DUSK_RESOURCE_DIR}/Base.lproj/*")
|
||||
endif ()
|
||||
if (IOS OR TVOS)
|
||||
target_sources(dusk PRIVATE ${DUSK_RESOURCE_FILES})
|
||||
foreach (FILE ${DUSK_RESOURCE_FILES})
|
||||
file(RELATIVE_PATH NEW_FILE "${DUSK_RESOURCE_DIR}" ${FILE})
|
||||
get_filename_component(NEW_FILE_PATH ${NEW_FILE} DIRECTORY)
|
||||
set_property(SOURCE ${FILE} PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${NEW_FILE_PATH}")
|
||||
endforeach ()
|
||||
set_target_properties(
|
||||
dusk PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_BUNDLE_NAME ${DUSK_BUNDLE_NAME}
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER ${DUSK_BUNDLE_IDENTIFIER}
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${DUSK_VERSION_STRING}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${DUSK_SHORT_VERSION_STRING}
|
||||
OUTPUT_NAME dusk
|
||||
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "YES"
|
||||
XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES"
|
||||
)
|
||||
if (CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
set_target_properties(dusk PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${DUSK_INFO_PLIST})
|
||||
elseif (DEFINED DUSK_INFO_PLIST)
|
||||
set(MACOSX_BUNDLE_EXECUTABLE_NAME dusk)
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER ${DUSK_BUNDLE_IDENTIFIER})
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME ${DUSK_BUNDLE_NAME})
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION ${DUSK_VERSION_STRING})
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${DUSK_SHORT_VERSION_STRING})
|
||||
set(DUSK_GENERATED_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/dusk.Info.plist)
|
||||
configure_file(${DUSK_INFO_PLIST} ${DUSK_GENERATED_INFO_PLIST})
|
||||
add_custom_command(
|
||||
TARGET dusk POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DUSK_GENERATED_INFO_PLIST} $<TARGET_FILE_DIR:dusk>/Info.plist
|
||||
VERBATIM
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
set(DUSK_INFO_PLIST ${DUSK_RESOURCE_DIR}/Info.plist.in)
|
||||
file(GLOB_RECURSE DUSK_RESOURCE_FILES
|
||||
"${DUSK_RESOURCE_DIR}/Assets.car"
|
||||
"${DUSK_RESOURCE_DIR}/Base.lproj/*"
|
||||
"${DUSK_RESOURCE_DIR}/Dusklight.icns")
|
||||
file(GLOB_RECURSE DUSK_APP_RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/res/*")
|
||||
target_sources(dusklight PRIVATE ${DUSK_RESOURCE_FILES})
|
||||
target_sources(dusklight PRIVATE ${DUSK_APP_RESOURCE_FILES})
|
||||
foreach (FILE ${DUSK_RESOURCE_FILES})
|
||||
file(RELATIVE_PATH NEW_FILE "${DUSK_RESOURCE_DIR}" ${FILE})
|
||||
get_filename_component(NEW_FILE_PATH ${NEW_FILE} DIRECTORY)
|
||||
set_property(SOURCE ${FILE} PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${NEW_FILE_PATH}")
|
||||
endforeach ()
|
||||
foreach (FILE ${DUSK_APP_RESOURCE_FILES})
|
||||
file(RELATIVE_PATH NEW_FILE "${CMAKE_CURRENT_SOURCE_DIR}" ${FILE})
|
||||
get_filename_component(NEW_FILE_PATH ${NEW_FILE} DIRECTORY)
|
||||
set_property(SOURCE ${FILE} PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${NEW_FILE_PATH}")
|
||||
endforeach ()
|
||||
set_target_properties(
|
||||
dusklight PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_BUNDLE_NAME ${DUSK_BUNDLE_NAME}
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER ${DUSK_BUNDLE_IDENTIFIER}
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${DUSK_VERSION_STRING}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${DUSK_SHORT_VERSION_STRING}
|
||||
MACOSX_BUNDLE_INFO_PLIST ${DUSK_INFO_PLIST}
|
||||
OUTPUT_NAME Dusklight
|
||||
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "YES"
|
||||
XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES"
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (APPLE AND NOT IOS AND NOT TVOS)
|
||||
find_library(APPKIT_FRAMEWORK AppKit REQUIRED)
|
||||
target_sources(dusklight PRIVATE src/dusk/file_select_macos.mm)
|
||||
set_source_files_properties(src/dusk/file_select_macos.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
||||
target_link_libraries(dusklight PRIVATE ${APPKIT_FRAMEWORK})
|
||||
endif ()
|
||||
|
||||
if (IOS)
|
||||
find_library(UIKIT_FRAMEWORK UIKit REQUIRED)
|
||||
find_library(UNIFORM_TYPE_IDENTIFIERS_FRAMEWORK UniformTypeIdentifiers REQUIRED)
|
||||
target_sources(dusklight PRIVATE src/dusk/ios/FileSelectDialog.m)
|
||||
set_source_files_properties(src/dusk/ios/FileSelectDialog.m PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
||||
target_link_libraries(dusklight PRIVATE ${UIKIT_FRAMEWORK} ${UNIFORM_TYPE_IDENTIFIERS_FRAMEWORK})
|
||||
endif ()
|
||||
|
||||
include(extern/aurora/cmake/AuroraCopyRuntimeDLLs.cmake)
|
||||
aurora_copy_runtime_dlls(dusklight)
|
||||
aurora_copy_runtime_dlls(dusk)
|
||||
|
||||
if (DUSK_SELECTED_OPT)
|
||||
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
|
||||
@@ -676,25 +358,13 @@ function(get_target_prefix target result_var)
|
||||
endif ()
|
||||
endif ()
|
||||
endfunction()
|
||||
list(APPEND BINARY_TARGETS dusklight)
|
||||
list(APPEND BINARY_TARGETS dusk)
|
||||
set(EXTRA_TARGETS "")
|
||||
if (TARGET crashpad_handler)
|
||||
list(APPEND EXTRA_TARGETS crashpad_handler)
|
||||
endif ()
|
||||
if (DUSK_PACKAGE_INSTALL)
|
||||
install(TARGETS ${BINARY_TARGETS} ${EXTRA_TARGETS} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
else()
|
||||
install(TARGETS ${BINARY_TARGETS} ${EXTRA_TARGETS} DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
endif()
|
||||
aurora_install_runtime_dlls(dusklight ${CMAKE_INSTALL_PREFIX})
|
||||
if (NOT APPLE)
|
||||
if (DUSK_PACKAGE_INSTALL)
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/dusklight)
|
||||
else()
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
endif()
|
||||
endif ()
|
||||
if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo AND NOT DUSK_PACKAGE_INSTALL)
|
||||
install(TARGETS ${BINARY_TARGETS} ${EXTRA_TARGETS} DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
|
||||
set(DEBUG_FILES_LIST "")
|
||||
foreach (target IN LISTS BINARY_TARGETS EXTRA_TARGETS)
|
||||
get_target_output_name(${target} output_name)
|
||||
@@ -715,22 +385,18 @@ if (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo
|
||||
endif ()
|
||||
list(APPEND DEBUG_FILES_LIST "${output_name}")
|
||||
endforeach ()
|
||||
# This is a terrible hack to only run this on CI
|
||||
# until I turn this into a script or something
|
||||
if(DEFINED ENV{GITHUB_ENV})
|
||||
if (WIN32)
|
||||
list(TRANSFORM DEBUG_FILES_LIST APPEND ".pdb")
|
||||
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
|
||||
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND 7z a -t7z \"${CMAKE_INSTALL_PREFIX}/debug.7z\" ${DEBUG_FILES})")
|
||||
elseif (APPLE)
|
||||
list(TRANSFORM DEBUG_FILES_LIST APPEND ".dSYM")
|
||||
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
|
||||
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND tar acfv \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
|
||||
elseif (UNIX)
|
||||
list(TRANSFORM DEBUG_FILES_LIST APPEND ".dbg")
|
||||
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
|
||||
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND tar -I \"xz -9 -T0\" -cvf \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
|
||||
endif ()
|
||||
if (WIN32)
|
||||
list(TRANSFORM DEBUG_FILES_LIST APPEND ".pdb")
|
||||
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
|
||||
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND 7z a -t7z \"${CMAKE_INSTALL_PREFIX}/debug.7z\" ${DEBUG_FILES})")
|
||||
elseif (APPLE)
|
||||
list(TRANSFORM DEBUG_FILES_LIST APPEND ".dSYM")
|
||||
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
|
||||
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND tar acfv \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
|
||||
elseif (UNIX)
|
||||
list(TRANSFORM DEBUG_FILES_LIST APPEND ".dbg")
|
||||
list(JOIN DEBUG_FILES_LIST " " DEBUG_FILES)
|
||||
install(CODE "execute_process(WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\" COMMAND tar -I \"xz -9 -T0\" -cvf \"${CMAKE_INSTALL_PREFIX}/debug.tar.xz\" ${DEBUG_FILES})")
|
||||
endif ()
|
||||
endif ()
|
||||
foreach (target IN LISTS BINARY_TARGETS)
|
||||
|
||||
+54
-234
@@ -19,47 +19,7 @@
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "release",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL",
|
||||
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ci",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
|
||||
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache",
|
||||
"DUSK_ENABLE_SENTRY_NATIVE": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"DUSK_SENTRY_DSN": "$env{SENTRY_DSN}",
|
||||
"DUSK_SENTRY_ENVIRONMENT": "production",
|
||||
"Rust_RUSTUP_INSTALL_MISSING_TARGET": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "asan",
|
||||
"hidden": true,
|
||||
"cacheVariables": {
|
||||
"ENABLE_ASAN": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
}
|
||||
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -68,10 +28,6 @@
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"cacheVariables": {
|
||||
"BUILD_SHARED_LIBS": {
|
||||
"type": "BOOL",
|
||||
"value": false
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
|
||||
},
|
||||
"vendor": {
|
||||
@@ -93,15 +49,6 @@
|
||||
"linux-default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-default-debug-asan",
|
||||
"displayName": "Linux (default) Debug ASan",
|
||||
"inherits": [
|
||||
"debug",
|
||||
"linux-default",
|
||||
"asan"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-default-relwithdebinfo",
|
||||
"displayName": "Linux (default) RelWithDebInfo",
|
||||
@@ -129,15 +76,6 @@
|
||||
"linux-clang"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-debug-asan",
|
||||
"displayName": "Linux (Clang) Debug ASan",
|
||||
"inherits": [
|
||||
"debug",
|
||||
"linux-clang",
|
||||
"asan"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-relwithdebinfo",
|
||||
"displayName": "Linux (Clang) RelWithDebInfo",
|
||||
@@ -150,7 +88,7 @@
|
||||
"name": "windows-msvc",
|
||||
"displayName": "Windows (MSVC)",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"binaryDir": "${sourceDir}/out/build/${presetName}",
|
||||
"architecture": {
|
||||
"value": "x64",
|
||||
"strategy": "external"
|
||||
@@ -158,7 +96,7 @@
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "cl",
|
||||
"CMAKE_CXX_COMPILER": "cl",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install"
|
||||
},
|
||||
"vendor": {
|
||||
"microsoft.com/VisualStudioSettings/CMake/1.0": {
|
||||
@@ -176,15 +114,6 @@
|
||||
"windows-msvc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-debug-asan",
|
||||
"displayName": "Windows (MSVC) Debug ASan",
|
||||
"inherits": [
|
||||
"debug",
|
||||
"windows-msvc",
|
||||
"asan"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-relwithdebinfo",
|
||||
"displayName": "Windows (MSVC) RelWithDebInfo",
|
||||
@@ -197,7 +126,7 @@
|
||||
"name": "windows-arm64-msvc",
|
||||
"displayName": "Windows ARM64 (MSVC)",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"binaryDir": "${sourceDir}/out/build/${presetName}",
|
||||
"architecture": {
|
||||
"value": "arm64",
|
||||
"strategy": "external"
|
||||
@@ -205,7 +134,8 @@
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "cl",
|
||||
"CMAKE_CXX_COMPILER": "cl",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install",
|
||||
"AURORA_DAWN_PROVIDER": "vendor"
|
||||
},
|
||||
"vendor": {
|
||||
"microsoft.com/VisualStudioSettings/CMake/1.0": {
|
||||
@@ -254,10 +184,6 @@
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"cacheVariables": {
|
||||
"BUILD_SHARED_LIBS": {
|
||||
"type": "BOOL",
|
||||
"value": false
|
||||
},
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
|
||||
},
|
||||
"vendor": {
|
||||
@@ -276,15 +202,6 @@
|
||||
"macos-default"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "macos-default-debug-asan",
|
||||
"displayName": "macOS (default) Debug ASan",
|
||||
"inherits": [
|
||||
"debug",
|
||||
"macos-default",
|
||||
"asan"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "macos-default-relwithdebinfo",
|
||||
"displayName": "macOS (default) RelWithDebInfo",
|
||||
@@ -319,11 +236,22 @@
|
||||
"type": "BOOL",
|
||||
"value": false
|
||||
},
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_BZip2": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"CMAKE_IGNORE_PREFIX_PATH": "/opt/homebrew"
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_LibLZMA": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_zstd": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_Freetype": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"vendor": {
|
||||
"microsoft.com/VisualStudioSettings/CMake/1.0": {
|
||||
@@ -350,21 +278,24 @@
|
||||
"type": "BOOL",
|
||||
"value": false
|
||||
},
|
||||
"ENABLE_ARC": {
|
||||
"type": "BOOL",
|
||||
"value": false
|
||||
},
|
||||
"Rust_CARGO_TARGET": "aarch64-apple-tvos",
|
||||
"Rust_TOOLCHAIN": "nightly",
|
||||
"BUILD_SHARED_LIBS": {
|
||||
"type": "BOOL",
|
||||
"value": false
|
||||
},
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_BZip2": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"CMAKE_IGNORE_PREFIX_PATH": "/opt/homebrew"
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_LibLZMA": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_zstd": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"vendor": {
|
||||
"microsoft.com/VisualStudioSettings/CMake/1.0": {
|
||||
@@ -385,19 +316,7 @@
|
||||
"cacheVariables": {
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install",
|
||||
"CMAKE_TOOLCHAIN_FILE": "$env{ANDROID_HOME}/ndk/$env{ANDROID_NDK_VERSION}/build/cmake/android.toolchain.cmake",
|
||||
"ANDROID_PLATFORM": "android-28",
|
||||
"BUILD_SHARED_LIBS": {
|
||||
"type": "BOOL",
|
||||
"value": false
|
||||
},
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_zstd": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
}
|
||||
"ANDROID_PLATFORM": "android-24"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -420,42 +339,15 @@
|
||||
"ANDROID_ABI": "x86_64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x-android-ci",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"android-base",
|
||||
"ci",
|
||||
"release"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"DUSK_ENABLE_SENTRY_NATIVE": {
|
||||
"type": "BOOL",
|
||||
"value": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x-android-ci-arm64",
|
||||
"binaryDir": "${sourceDir}/build/android-arm64",
|
||||
"inherits": [
|
||||
"x-android-ci"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"ANDROID_ABI": "arm64-v8a",
|
||||
"Rust_CARGO_TARGET": "aarch64-linux-android"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x-linux-ci",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"relwithdebinfo",
|
||||
"ci"
|
||||
"relwithdebinfo"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"AURORA_SDL3_PROVIDER": "vendor",
|
||||
"CMAKE_LINKER_TYPE": "MOLD"
|
||||
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
|
||||
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -475,36 +367,11 @@
|
||||
{
|
||||
"name": "x-macos-ci",
|
||||
"inherits": [
|
||||
"macos-default-relwithdebinfo",
|
||||
"ci"
|
||||
"macos-default-relwithdebinfo"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"AURORA_NOD_PROVIDER": "vendor",
|
||||
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
|
||||
"type": "BOOL",
|
||||
"value": true
|
||||
},
|
||||
"CMAKE_OSX_DEPLOYMENT_TARGET": "12.0",
|
||||
"CMAKE_IGNORE_PREFIX_PATH": "/opt/homebrew"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x-macos-ci-arm64",
|
||||
"inherits": [
|
||||
"x-macos-ci"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_OSX_ARCHITECTURES": "arm64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "x-macos-ci-x86_64",
|
||||
"inherits": [
|
||||
"x-macos-ci"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"CMAKE_OSX_ARCHITECTURES": "x86_64",
|
||||
"Rust_CARGO_TARGET": "x86_64-apple-darwin"
|
||||
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
|
||||
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -531,16 +398,14 @@
|
||||
"name": "x-windows-ci",
|
||||
"hidden": true,
|
||||
"inherits": [
|
||||
"relwithdebinfo",
|
||||
"ci"
|
||||
"relwithdebinfo"
|
||||
],
|
||||
"binaryDir": "$env{BUILD_DIR}",
|
||||
"cacheVariables": {
|
||||
"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "Embedded",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
},
|
||||
"VCPKG_TARGET_TRIPLET": "x64-windows"
|
||||
"CMAKE_INSTALL_PREFIX": "$env{BUILD_DIR}/install",
|
||||
"CMAKE_C_COMPILER_LAUNCHER": "sccache",
|
||||
"CMAKE_CXX_COMPILER_LAUNCHER": "sccache",
|
||||
"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "Embedded"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -562,10 +427,7 @@
|
||||
"inherits": [
|
||||
"x-windows-ci",
|
||||
"windows-arm64-msvc"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "arm64-windows"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
@@ -575,12 +437,6 @@
|
||||
"description": "Linux (default) debug build",
|
||||
"displayName": "Linux (default) Debug"
|
||||
},
|
||||
{
|
||||
"name": "linux-default-debug-asan",
|
||||
"configurePreset": "linux-default-debug-asan",
|
||||
"description": "Linux (default) debug build with AddressSanitizer",
|
||||
"displayName": "Linux (default) Debug ASan"
|
||||
},
|
||||
{
|
||||
"name": "linux-default-relwithdebinfo",
|
||||
"configurePreset": "linux-default-relwithdebinfo",
|
||||
@@ -593,12 +449,6 @@
|
||||
"description": "Linux (Clang) debug build",
|
||||
"displayName": "Linux (Clang) Debug"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-debug-asan",
|
||||
"configurePreset": "linux-clang-debug-asan",
|
||||
"description": "Linux (Clang) debug build with AddressSanitizer",
|
||||
"displayName": "Linux (Clang) Debug ASan"
|
||||
},
|
||||
{
|
||||
"name": "linux-clang-relwithdebinfo",
|
||||
"configurePreset": "linux-clang-relwithdebinfo",
|
||||
@@ -611,12 +461,6 @@
|
||||
"description": "macOS debug build",
|
||||
"displayName": "macOS Debug"
|
||||
},
|
||||
{
|
||||
"name": "macos-default-debug-asan",
|
||||
"configurePreset": "macos-default-debug-asan",
|
||||
"description": "macOS debug build with AddressSanitizer",
|
||||
"displayName": "macOS Debug ASan"
|
||||
},
|
||||
{
|
||||
"name": "macos-default-relwithdebinfo",
|
||||
"configurePreset": "macos-default-relwithdebinfo",
|
||||
@@ -629,7 +473,7 @@
|
||||
"description": "iOS release build with debug info",
|
||||
"displayName": "iOS RelWithDebInfo",
|
||||
"targets": [
|
||||
"dusklight"
|
||||
"dusk"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -638,7 +482,7 @@
|
||||
"description": "tvOS release build with debug info",
|
||||
"displayName": "tvOS RelWithDebInfo",
|
||||
"targets": [
|
||||
"dusklight"
|
||||
"dusk"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -647,7 +491,7 @@
|
||||
"description": "Android arm64-v8a release build with debug info",
|
||||
"displayName": "Android arm64-v8a RelWithDebInfo",
|
||||
"targets": [
|
||||
"dusklight"
|
||||
"dusk"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -656,16 +500,7 @@
|
||||
"description": "Android x86_64 release build with debug info",
|
||||
"displayName": "Android x86_64 RelWithDebInfo",
|
||||
"targets": [
|
||||
"dusklight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "x-android-ci-arm64",
|
||||
"configurePreset": "x-android-ci-arm64",
|
||||
"description": "(Internal) Android CI arm64-v8a",
|
||||
"displayName": "(Internal) Android CI arm64-v8a",
|
||||
"targets": [
|
||||
"dusklight"
|
||||
"dusk"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -674,12 +509,6 @@
|
||||
"description": "Windows (MSVC) debug build",
|
||||
"displayName": "Windows (MSVC) Debug"
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-debug-asan",
|
||||
"configurePreset": "windows-msvc-debug-asan",
|
||||
"description": "Windows (MSVC) debug build with AddressSanitizer",
|
||||
"displayName": "Windows (MSVC) Debug ASan"
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc-relwithdebinfo",
|
||||
"configurePreset": "windows-msvc-relwithdebinfo",
|
||||
@@ -717,19 +546,10 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "x-macos-ci-arm64",
|
||||
"configurePreset": "x-macos-ci-arm64",
|
||||
"description": "(Internal) macOS CI arm64",
|
||||
"displayName": "(Internal) macOS CI arm64",
|
||||
"targets": [
|
||||
"install"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "x-macos-ci-x86_64",
|
||||
"configurePreset": "x-macos-ci-x86_64",
|
||||
"description": "(Internal) macOS CI x86_64",
|
||||
"displayName": "(Internal) macOS CI x86_64",
|
||||
"name": "x-macos-ci",
|
||||
"configurePreset": "x-macos-ci",
|
||||
"description": "(Internal) macOS CI",
|
||||
"displayName": "(Internal) macOS CI",
|
||||
"targets": [
|
||||
"install"
|
||||
]
|
||||
@@ -737,8 +557,8 @@
|
||||
{
|
||||
"name": "x-ios-ci",
|
||||
"configurePreset": "x-ios-ci",
|
||||
"description": "(Internal) iOS CI arm64",
|
||||
"displayName": "(Internal) iOS CI arm64",
|
||||
"description": "(Internal) iOS CI",
|
||||
"displayName": "(Internal) iOS CI",
|
||||
"targets": [
|
||||
"install"
|
||||
]
|
||||
@@ -746,8 +566,8 @@
|
||||
{
|
||||
"name": "x-tvos-ci",
|
||||
"configurePreset": "x-tvos-ci",
|
||||
"description": "(Internal) tvOS CI arm64",
|
||||
"displayName": "(Internal) tvOS CI arm64",
|
||||
"description": "(Internal) tvOS CI",
|
||||
"displayName": "(Internal) tvOS CI",
|
||||
"targets": [
|
||||
"install"
|
||||
]
|
||||
|
||||
@@ -1,64 +1,103 @@
|
||||
<div align="center">
|
||||
<img src="res/logo.png" alt="Logo" width="640">
|
||||
## Dusk
|
||||
|
||||
<p align="center">
|
||||
<a href="https://twilitrealm.dev">Official Website</a>
|
||||
•
|
||||
<a href="https://discord.gg/6NpMhefCK9">Discord</a>
|
||||
</p>
|
||||
</div>
|
||||
### Building
|
||||
#### Prerequisites
|
||||
* [CMake 3.25+](https://cmake.org)
|
||||
* Windows: Install `CMake Tools` in Visual Studio
|
||||
* macOS: `brew install cmake`
|
||||
* [Python 3+](https://python.org)
|
||||
* Windows: [Microsoft Store](https://go.microsoft.com/fwlink?linkID=2082640)
|
||||
* Verify it's added to `%PATH%` by typing `python` in `cmd`.
|
||||
* macOS: `brew install python@3`
|
||||
* **[Windows]** [Visual Studio 2026 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx)
|
||||
* Select `C++ Development` and verify the following packages are included:
|
||||
* `Windows 11 SDK`
|
||||
* `CMake Tools`
|
||||
* `C++ Clang Compiler`
|
||||
* `C++ Clang-cl`
|
||||
* **[macOS]** [Xcode 16.4+](https://developer.apple.com/xcode/download/)
|
||||
* **[Linux]** Actively tested on Ubuntu 24.04, Arch Linux & derivatives.
|
||||
* Ubuntu 24.04+ packages
|
||||
```
|
||||
build-essential curl git ninja-build clang lld zlib1g-dev libcurl4-openssl-dev \
|
||||
libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev libpulse-dev \
|
||||
libudev-dev libpng-dev libncurses5-dev cmake libx11-xcb-dev python3 python-is-python3 \
|
||||
libclang-dev libfreetype-dev libxinerama-dev libxcursor-dev python3-markupsafe libgtk-3-dev \
|
||||
libxss-dev libxtst-dev
|
||||
```
|
||||
* Arch Linux packages
|
||||
```
|
||||
base-devel cmake ninja llvm vulkan-headers python python-markupsafe clang lld alsa-lib libpulse libxrandr freetype2
|
||||
```
|
||||
* Fedora packages
|
||||
```
|
||||
cmake vulkan-headers ninja-build clang-devel llvm-devel libpng-devel
|
||||
```
|
||||
* It's also important that you install the developer tools and libraries
|
||||
```
|
||||
sudo dnf groupinstall "Development Tools" "Development Libraries"
|
||||
```
|
||||
#### Setup
|
||||
Clone and initialize the Dusk repository
|
||||
```sh
|
||||
git clone --recursive https://github.com/TwilitRealm/dusk.git
|
||||
cd dusk
|
||||
git pull
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
# Overview
|
||||
#### Building
|
||||
|
||||
Dusklight is a reverse-engineered reimplementation of Twilight Princess.
|
||||
**CLion (Windows / macOS / Linux)**
|
||||
|
||||
It aims to be as accurate as possible to the original while also providing new options, enhancements, and tools to customize your experience.
|
||||
Open the project directory in CLion. Enable the appropriate presets for your platform:
|
||||
|
||||
# Setup
|
||||

|
||||
|
||||
> [!IMPORTANT]
|
||||
> Dusklight does *not* provide any copyrighted assets. You must provide your own copy of the original game.
|
||||
**Visual Studio (Windows)**
|
||||
|
||||
> [!IMPORTANT]
|
||||
> At a minimum, Dusklight requires a GPU with support for either D3D12, Vulkan, or Metal. Your experience with specific hardware, operating systems, and drivers may vary. In particular, older Intel iGPUs have a high likelihood of incompatibility. We are also aware of a number of issues on devices with Adreno GPUs and are working to resolve them.
|
||||
Open the project directory in Visual Studio. The CMake configuration will be loaded automatically.
|
||||
|
||||
### 1. Dump your game
|
||||
**ninja (macOS)**
|
||||
|
||||
You must dump your own copy of the game, please see [this article](https://wiki.dolphin-emu.org/index.php?title=Ripping_Games) for instructions. After dumping, you can use a program like [Dolphin](https://dolphin-emu.org/) or [nodtool](https://github.com/encounter/nod/releases) to convert the `.iso` to a `.rvz` to save space.
|
||||
```sh
|
||||
cmake --preset macos-default-relwithdebinfo
|
||||
cmake --build --preset macos-default-relwithdebinfo
|
||||
```
|
||||
|
||||
Currently, only the GameCube USA and EUR releases are supported. Support for other versions of the game is planned in the future.
|
||||
Alternate presets available:
|
||||
- `macos-default-debug`: Clang, Debug
|
||||
|
||||
### 2. Download [Dusklight](https://github.com/TwilitRealm/dusklight/releases)
|
||||
**ninja (Linux)**
|
||||
|
||||
### 3. Setup the game
|
||||
**Windows / macOS / Linux**
|
||||
- Extract the .zip file
|
||||
- Launch Dusklight
|
||||
- Press **Select Disc Image** and provide the path to your supported game dump
|
||||
- Press **Play**!
|
||||
```sh
|
||||
cmake --preset linux-default-relwithdebinfo
|
||||
cmake --build --preset linux-default-relwithdebinfo
|
||||
```
|
||||
|
||||
**iOS**
|
||||
- Follow the [iOS setup guide](docs/ios-install-altstore.md)
|
||||
Alternate presets available:
|
||||
- `linux-default-debug`: GCC, Debug
|
||||
- `linux-clang-relwithdebinfo`: Clang, RelWithDebInfo
|
||||
- `linux-clang-debug`: Clang, Debug
|
||||
|
||||
**Android**
|
||||
- Install the Dusklight APK
|
||||
- Launch Dusklight
|
||||
- Press **Select Disc Image** and provide the path to your supported game dump
|
||||
- Press **Play**!
|
||||
**ninja (Windows)**
|
||||
|
||||
# Building
|
||||
```sh
|
||||
cmake --preset windows-msvc-relwithdebinfo
|
||||
cmake --build --preset windows-msvc-relwithdebinfo
|
||||
```
|
||||
|
||||
If you'd like to build Dusklight from source, please read the [build instructions](docs/building.md).
|
||||
Alternate presets available:
|
||||
- `windows-msvc-debug`: MSVC, Debug
|
||||
- `windows-clang-relwithdebinfo`: Clang-cl, RelWithDebInfo
|
||||
- `windows-clang-debug`: Clang-cl, Debug
|
||||
|
||||
Pull requests are welcomed! Note that we do not accept contributions that are primarily AI-generated and will close your PR if we suspect as much. Please also see the [code conventions](docs/code-conventions.md).
|
||||
#### Running
|
||||
Pass the disc image as a positional argument. Supported formats: ISO (GCM), RVZ, WIA, WBFS, CISO, GCZ
|
||||
```sh
|
||||
build/{preset}/dusk /path/to/game.rvz
|
||||
```
|
||||
If no path is specified, Dusk defaults to `game.iso` in the current working directory.
|
||||
|
||||
# Credits
|
||||
|
||||
Special thanks to the [TP decompilation](https://github.com/zeldaret/tp) team, the GC/Wii decompilation community, the [Aurora](https://github.com/encounter/aurora) developers, the [TP speedrunning community](https://zsrtp.link), and all [contributors](https://github.com/TwilitRealm/dusklight/graphs/contributors).
|
||||
|
||||
<br/>
|
||||
<div align="center">
|
||||
<a href="https://github.com/encounter/aurora">
|
||||
<img src="assets/aurora-powered.png" alt="Powered by Aurora" width="800">
|
||||
</a>
|
||||
</div>
|
||||
#### 30 FPS on Debug
|
||||
When compiled fully in a Debug the game runs too slowly to hit playable 30 FPS. To avoid this, you can set a CMake cache variable to optimize specific critical files without hampering debuggability in the rest of the program: `-DDUSK_SELECTED_OPT=ON`. When building for MSVC (Windows) you must also modify `CMAKE_CXX_FLAGS_DEBUG` and `CMAKE_C_FLAGS_DEBUG` to remove `/RTC1` from the flags, like so: `-DCMAKE_CXX_FLAGS_DEBUG="/MDd /Zi /Ob0 /Od" -DCMAKE_C_FLAGS_DEBUG="/MDd /Zi /Ob0 /Od"`
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
from PIL import Image
|
||||
FRAME_COUNT = 6572
|
||||
WIDTH = 48
|
||||
HEIGHT = 36
|
||||
|
||||
out = open("apple.dat", "wb")
|
||||
for frame in range(1, 6572+1):
|
||||
print(frame)
|
||||
img = Image.open(f"apples/{frame}.png")
|
||||
pixels = img.load()
|
||||
assert img.width == WIDTH
|
||||
assert img.height == HEIGHT
|
||||
for y in range(HEIGHT):
|
||||
for x in range(WIDTH):
|
||||
(r, g, b) = pixels[x, y]
|
||||
if r > 128:
|
||||
out.write(b"\x01")
|
||||
else:
|
||||
out.write(b"\x00")
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
@@ -1,66 +0,0 @@
|
||||
<svg width="600" height="600" viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="150" cy="150" r="105" fill="none" stroke="white" stroke-width="4"/>
|
||||
<circle cx="150" cy="150" r="95" fill="none" stroke="white" stroke-width="4"/>
|
||||
<circle cx="150" cy="150" r="60" fill="none" stroke="white" stroke-width="4"/>
|
||||
<circle cx="150" cy="150" r="75" fill="none" stroke="white" stroke-width="4"/>
|
||||
|
||||
<defs>
|
||||
<line id="ray" x1="150" y1="55" x2="150" y2="45"/>
|
||||
<clipPath id="zigzag-clip">
|
||||
<circle cx="150" cy="150" r="75"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
||||
<g stroke="white" stroke-width="3">
|
||||
<use href="#ray"/>
|
||||
<use href="#ray" transform="rotate(18 150 150)"/>
|
||||
<use href="#ray" transform="rotate(36 150 150)"/>
|
||||
<use href="#ray" transform="rotate(54 150 150)"/>
|
||||
<use href="#ray" transform="rotate(72 150 150)"/>
|
||||
<use href="#ray" transform="rotate(90 150 150)"/>
|
||||
<use href="#ray" transform="rotate(108 150 150)"/>
|
||||
<use href="#ray" transform="rotate(126 150 150)"/>
|
||||
<use href="#ray" transform="rotate(144 150 150)"/>
|
||||
<use href="#ray" transform="rotate(162 150 150)"/>
|
||||
<use href="#ray" transform="rotate(180 150 150)"/>
|
||||
<use href="#ray" transform="rotate(198 150 150)"/>
|
||||
<use href="#ray" transform="rotate(216 150 150)"/>
|
||||
<use href="#ray" transform="rotate(234 150 150)"/>
|
||||
<use href="#ray" transform="rotate(252 150 150)"/>
|
||||
<use href="#ray" transform="rotate(270 150 150)"/>
|
||||
<use href="#ray" transform="rotate(288 150 150)"/>
|
||||
<use href="#ray" transform="rotate(306 150 150)"/>
|
||||
<use href="#ray" transform="rotate(324 150 150)"/>
|
||||
<use href="#ray" transform="rotate(342 150 150)"/>
|
||||
</g>
|
||||
|
||||
<polygon fill="none" stroke="white" stroke-width="4" opacity="1" clip-path="url(#zigzag-clip)"
|
||||
points="
|
||||
126.82,78.67
|
||||
150,90
|
||||
173.18,78.67
|
||||
185.27,101.46
|
||||
210.68,105.92
|
||||
207.06,131.46
|
||||
225,150
|
||||
207.06,168.54
|
||||
210.68,194.08
|
||||
185.27,198.54
|
||||
173.18,221.33
|
||||
150,210
|
||||
126.82,221.33
|
||||
114.73,198.54
|
||||
89.32,194.08
|
||||
92.94,168.54
|
||||
75,150
|
||||
92.94,131.46
|
||||
89.32,105.92
|
||||
114.73,101.46
|
||||
"/>
|
||||
|
||||
<g fill="none" stroke="white" stroke-width="4">
|
||||
<polygon points="150,105 130,140 170,140"/>
|
||||
<polygon points="130,140 110,175 150,175"/>
|
||||
<polygon points="170,140 150,175 190,175"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
+9
-18
@@ -1,27 +1,18 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
if [[ -n "${GITHUB_WORKSPACE:-}" ]]; then
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
fi
|
||||
|
||||
build_dir="$PWD/build"
|
||||
linuxdeploy="$build_dir/linuxdeploy-$(uname -m).AppImage"
|
||||
lib_dir="/usr/lib/$(uname -m)-linux-gnu"
|
||||
shopt -s extglob
|
||||
|
||||
# Get linuxdeploy
|
||||
mkdir -p "$build_dir"
|
||||
curl -fL "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$(uname -m).AppImage" -o "$linuxdeploy"
|
||||
chmod +x "$linuxdeploy"
|
||||
cd "$RUNNER_WORKSPACE"
|
||||
curl -fOL https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$(uname -m).AppImage
|
||||
chmod +x linuxdeploy-$(uname -m).AppImage
|
||||
|
||||
# Build AppImage
|
||||
cd "$GITHUB_WORKSPACE"
|
||||
mkdir -p build/appdir/usr/{bin,share/{applications,icons/hicolor}}
|
||||
for install_path in build/install/*; do
|
||||
[[ "$(basename "$install_path")" == *.* ]] && continue
|
||||
cp -r "$install_path" build/appdir/usr/bin
|
||||
done
|
||||
cp build/install/!(*.*) build/appdir/usr/bin
|
||||
cp -r platforms/freedesktop/{16x16,32x32,48x48,64x64,128x128,256x256,512x512,1024x1024} build/appdir/usr/share/icons/hicolor
|
||||
cp platforms/freedesktop/dev.twilitrealm.dusk.desktop build/appdir/usr/share/applications
|
||||
cp platforms/freedesktop/dusk.desktop build/appdir/usr/share/applications
|
||||
|
||||
cd build/install
|
||||
VERSION="$DUSK_VERSION" NO_STRIP=1 "$linuxdeploy" \
|
||||
-l "$lib_dir/libusb-1.0.so" --appdir "$build_dir/appdir" --output appimage
|
||||
VERSION="$DUSK_VERSION" NO_STRIP=1 "$RUNNER_WORKSPACE"/linuxdeploy-$(uname -m).AppImage \
|
||||
--appdir "$GITHUB_WORKSPACE"/build/appdir --output appimage
|
||||
|
||||
@@ -13,3 +13,13 @@ buildType:
|
||||
short: RelWithDebInfo
|
||||
long: Optimized, with debug symbols
|
||||
buildType: RelWithDebInfo
|
||||
|
||||
tp_version:
|
||||
default: GZ2E01
|
||||
description: TP Version
|
||||
choices:
|
||||
GZ2E01:
|
||||
short: GZ2E01
|
||||
long: GZ2E01
|
||||
settings:
|
||||
DUSK_TP_VERSION: GZ2E01
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if (CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64" OR CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64EC")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "ARM64")
|
||||
elseif (CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "x64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "AMD64")
|
||||
elseif (CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "X86")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "X86")
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -1,232 +0,0 @@
|
||||
# Building Dusklight
|
||||
|
||||
## Dependencies
|
||||
|
||||
The following dependencies are required:
|
||||
|
||||
* [CMake 3.25+](https://cmake.org)
|
||||
* [Python 3+](https://python.org)
|
||||
|
||||
### Windows
|
||||
|
||||
* Install [CMake 3.25+](https://cmake.org) by searching `CMake Tools` in Visual Studio
|
||||
* Install Python 3 from the [Microsoft Store](https://go.microsoft.com/fwlink?linkID=2082640) and verify it's added to `%PATH%` by typing `python` in `cmd`.
|
||||
|
||||
Recommended IDEs:
|
||||
|
||||
* [Visual Studio 2026 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx). During installation:
|
||||
* Select `C++ Development` and verify the following packages are included:
|
||||
* `Windows 11 SDK`
|
||||
* `CMake Tools`
|
||||
* `C++ Clang Compiler`
|
||||
* `C++ Clang-cl`
|
||||
|
||||
### macOS
|
||||
|
||||
* Make sure [Homebrew](https://brew.sh) is installed
|
||||
* Install [CMake 3.25+](https://cmake.org)
|
||||
|
||||
```sh
|
||||
brew install cmake
|
||||
```
|
||||
|
||||
* Install Python 3
|
||||
|
||||
```sh
|
||||
brew install python@3
|
||||
```
|
||||
|
||||
Recommended IDEs:
|
||||
|
||||
* [Xcode 16.4 or later](https://developer.apple.com/xcode/)
|
||||
* [Visual Studio Code](https://code.visualstudio.com/download/)
|
||||
* [CLion](https://www.jetbrains.com/clion/)
|
||||
|
||||
### Linux
|
||||
|
||||
Actively tested on Ubuntu 24.04, Arch Linux & derivatives.
|
||||
|
||||
**Ubuntu 24.04+ packages**
|
||||
|
||||
<details>
|
||||
<summary>Click to expand</summary>
|
||||
|
||||
* Run the following command to install the required dependencies:
|
||||
|
||||
```sh
|
||||
sudo apt update && sudo apt install -y \
|
||||
build-essential \
|
||||
clang \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
libasound2-dev \
|
||||
libclang-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libdbus-1-dev \
|
||||
libfreetype-dev \
|
||||
libglu1-mesa-dev \
|
||||
libgtk-3-dev \
|
||||
libncurses5-dev \
|
||||
libpng-dev \
|
||||
libpulse-dev \
|
||||
libudev-dev \
|
||||
libvulkan-dev \
|
||||
libx11-xcb-dev \
|
||||
libxcursor-dev \
|
||||
libxi-dev \
|
||||
libxinerama-dev \
|
||||
libxrandr-dev \
|
||||
libxss-dev \
|
||||
libxtst-dev \
|
||||
lld \
|
||||
ninja-build \
|
||||
python-is-python3 \
|
||||
python3 \
|
||||
python3-markupsafe \
|
||||
zlib1g-dev
|
||||
```
|
||||
|
||||
</details>
|
||||
<br>
|
||||
|
||||
**Arch Linux packages**
|
||||
|
||||
<details>
|
||||
<summary>Click to expand</summary>
|
||||
|
||||
* Run the following command to install the required dependencies:
|
||||
|
||||
```sh
|
||||
sudo pacman -S --needed \
|
||||
alsa-lib \
|
||||
base-devel \
|
||||
clang \
|
||||
cmake \
|
||||
freetype2 \
|
||||
libpulse \
|
||||
libxrandr \
|
||||
lld \
|
||||
llvm \
|
||||
ninja \
|
||||
python \
|
||||
python-markupsafe \
|
||||
vulkan-headers
|
||||
```
|
||||
|
||||
</details>
|
||||
<br>
|
||||
|
||||
**Fedora packages**
|
||||
|
||||
<details>
|
||||
<summary>Click to expand</summary>
|
||||
|
||||
* Run the following command to install the required dependencies:
|
||||
|
||||
```sh
|
||||
sudo dnf install -y \
|
||||
clang-devel \
|
||||
cmake \
|
||||
libpng-devel \
|
||||
llvm-devel \
|
||||
ninja-build \
|
||||
vulkan-headers
|
||||
```
|
||||
|
||||
* It's also important that you install the developer tools and libraries
|
||||
|
||||
```sh
|
||||
sudo dnf groupinstall \
|
||||
"Development Libraries" "Development Tools"
|
||||
```
|
||||
|
||||
</details>
|
||||
<br>
|
||||
|
||||
Recommended IDEs:
|
||||
|
||||
* [CLion](https://www.jetbrains.com/clion/)
|
||||
* [Visual Studio Code](https://code.visualstudio.com/download/)
|
||||
|
||||
## Building
|
||||
|
||||
* Clone and initialize the Dusklight repository:
|
||||
|
||||
```sh
|
||||
git clone --recursive https://github.com/TwilitRealm/dusklight.git
|
||||
git pull
|
||||
cd dusklight
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
**CLion (Windows / macOS / Linux)**
|
||||
|
||||
Open the project directory in CLion. Enable the appropriate presets for your platform:
|
||||
|
||||

|
||||
|
||||
**Visual Studio (Windows)**
|
||||
|
||||
Open the project directory in Visual Studio. The CMake configuration will be loaded automatically.
|
||||
|
||||
**ninja (macOS)**
|
||||
|
||||
```sh
|
||||
cmake --preset macos-default-relwithdebinfo
|
||||
cmake --build --preset macos-default-relwithdebinfo
|
||||
```
|
||||
|
||||
Alternate presets available:
|
||||
|
||||
* `macos-default-debug`: Clang, Debug
|
||||
* `macos-default-debug-asan`: Clang, Debug, AddressSanitizer
|
||||
|
||||
**ninja (Linux)**
|
||||
|
||||
```sh
|
||||
cmake --preset linux-default-relwithdebinfo
|
||||
cmake --build --preset linux-default-relwithdebinfo
|
||||
```
|
||||
|
||||
Alternate presets available:
|
||||
|
||||
* `linux-default-debug`: GCC, Debug
|
||||
* `linux-default-debug-asan`: GCC, Debug, AddressSanitizer
|
||||
* `linux-clang-relwithdebinfo`: Clang, RelWithDebInfo
|
||||
* `linux-clang-debug`: Clang, Debug
|
||||
* `linux-clang-debug-asan`: Clang, Debug, AddressSanitizer
|
||||
|
||||
**ninja (Windows)**
|
||||
|
||||
```sh
|
||||
cmake --preset windows-msvc-relwithdebinfo
|
||||
cmake --build --preset windows-msvc-relwithdebinfo
|
||||
```
|
||||
|
||||
Alternate presets available:
|
||||
|
||||
* `windows-msvc-debug`: MSVC, Debug
|
||||
* `windows-msvc-debug-asan`: MSVC, Debug, AddressSanitizer
|
||||
* `windows-clang-relwithdebinfo`: Clang-cl, RelWithDebInfo
|
||||
* `windows-clang-debug`: Clang-cl, Debug
|
||||
|
||||
## Running
|
||||
|
||||
**Windows / Linux**
|
||||
|
||||
* Pass the disc image as a positional argument using the `--dvd` flag. Supported formats are: ISO (GCM), RVZ, WIA, WBFS, CISO, GCZ
|
||||
|
||||
```sh
|
||||
build/{preset}/dusklight --dvd /path/to/game.iso
|
||||
```
|
||||
|
||||
**macOS**
|
||||
|
||||
macOS builds an `.app` bundle which contains the executable and all necessary resources.
|
||||
|
||||
* Pass the disc image as a positional argument using the `--dvd` flag. Supported formats are: ISO (GCM), RVZ, WIA, WBFS, CISO, GCZ
|
||||
|
||||
```sh
|
||||
build/{preset}/Dusklight.app/Contents/MacOS/Dusklight --dvd /path/to/game.iso
|
||||
```
|
||||
@@ -1,13 +0,0 @@
|
||||
# Code conventions for Dusk
|
||||
|
||||
## Upstream when appropriate
|
||||
|
||||
Bug fixes, documentation improvements, code cleanup, etc that also apply to the [original decompilation project](https://github.com/zeldaret/tp) should preferably be PR'd there.
|
||||
|
||||
## Properly indicate Dusk-modified code
|
||||
|
||||
When modifying original game code (i.e. in decomp) for Dusk's purposes, please clearly delineate such code as being Dusk-specific. Generally, this can be done by using `#if TARGET_PC` and keeping the original code in place. Use `#if AVOID_UB` for Undefined Behavior fixes to the original codebase.
|
||||
|
||||
## Miscellaneous things
|
||||
|
||||
* The original codebase makes heavy use of global `operator new` and similar overloads to allocate into a strict tree of heaps. This would cause many linkage headaches for us, so effectively all uses of `new` or `delete` in the original game code have been replaced with `JKR_NEW`, `JKR_DELETE`, or similar macros. See `JKRHeap.h` for the full list.
|
||||
@@ -1,48 +0,0 @@
|
||||
# Installing Dusklight on iOS via iloader
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- A Windows, Linux, or macOS device
|
||||
- iOS device connected to computer via USB
|
||||
- Dusklight IPA file (download the latest `Dusklight-vX.X.X-ios-arm64.ipa` from the [releases page](https://github.com/TwilitRealm/dusklight/releases))
|
||||
- Legally acquired game disc - `GZ2E01` (Gamecube USA) or `GZ2PE01` (Gamecube PAL)
|
||||
|
||||
## 1. Install iloader
|
||||
|
||||
- Executable bundles can be installed from [iloader's main page](https://iloader.app/) or [their GitHub](https://github.com/nab138/iloader) for Windows, Linux, and macOS.
|
||||
- Windows WILL require iTunes to be installed
|
||||
- Linux WILL require usbmuxd to be installed, this is installed by default in most distros though
|
||||
|
||||
## 2. Enable Developer Mode (iOS 16+)
|
||||
|
||||
- On your iPhone, go to **Settings > Privacy & Security > Developer Mode**
|
||||
- Toggle it on, put in your device passcode, and restart when prompted
|
||||
|
||||
## 3. Install Dusklight on Your iPhone
|
||||
|
||||
1. Sign into your Apple ID (this is required for registering app IDs, it is sent securely directly to Apple and not stored by iloader)
|
||||
* You may be prompted to put in a code from your iOS device if you have 2FA enabled, do so
|
||||
2. Plug in your iOS device via USB into your PC. If you're missing a dependency, an error pop-up will tell you to install it
|
||||
* You will need to hit `Refresh` after plugging it in at this stage so that it can be detected, it does not automatically refresh
|
||||
3. Leave settings unchanged (the Anisette server should stay Sidestore (.io))
|
||||
3.(a) Installing SideStore directly is not required, but provides you a way to install Dusklight on your phone without being plugged into a computer later
|
||||
4. Press `Import IPA` and choose your downloaded `Dusklight-v.X.X.X-ios-arm64.ipa`, it will begin installing on your device
|
||||
|
||||
**NOTE:** *At various stages, you may be prompted to trust your device, do so*
|
||||
|
||||
## 3. Getting Dusklight trusted
|
||||
When installing sideloaded iOS applications, at first you will need to manually trust the app due to Apple's security policies
|
||||
* Go to **Settings > General > VPN & Device Management**
|
||||
* Tap the Apple ID you signed into iloader with under "Developer App" and tap **Trust**
|
||||
* Tap **Allow** on the pop-up
|
||||
|
||||
## 4. Copy Files to Your iPhone
|
||||
|
||||
Transfer the game disc (and optionally, the Dusklight IPA) to your iPhone so they are accessible in the Files app. A few ways to do this:
|
||||
|
||||
- **AirDrop** - Right-click the files on your Mac and choose Share > AirDrop
|
||||
- **iCloud Drive** - Place files in iCloud Drive on your Mac and they'll sync to Files on your iPhone
|
||||
- **USB transfer** - Connect your iPhone and drag files via Finder's sidebar
|
||||
- **Cloud storage** - Upload to Google Drive, Dropbox, etc. and download on your iPhone
|
||||
|
||||
You may now use Dusklight on iOS and iPadOS!
|
||||
Vendored
+1
-1
Submodule extern/aurora updated: cc9aa81ce7...4c0d0feb02
+16
-176
@@ -1,7 +1,7 @@
|
||||
|
||||
set(DOLZEL_FILES
|
||||
src/m_Do/m_Do_main.cpp
|
||||
#src/m_Do/m_Do_printf.cpp
|
||||
src/m_Do/m_Do_printf.cpp
|
||||
src/m_Do/m_Do_audio.cpp
|
||||
src/m_Do/m_Do_controller_pad.cpp
|
||||
#src/m_Do/m_Re_controller_pad.cpp
|
||||
@@ -15,6 +15,7 @@ set(DOLZEL_FILES
|
||||
src/m_Do/m_Do_DVDError.cpp
|
||||
src/m_Do/m_Do_MemCard.cpp
|
||||
src/m_Do/m_Do_MemCardRWmng.cpp
|
||||
src/m_Do/m_Do_machine_exception.cpp
|
||||
src/m_Do/m_Do_hostIO.cpp
|
||||
src/c/c_damagereaction.cpp
|
||||
src/c/c_dylink.cpp
|
||||
@@ -314,7 +315,7 @@ set(SSYSTEM_FILES
|
||||
src/SSystem/SStandard/s_basic.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JParticle STATIC
|
||||
set(JSYSTEM_DEBUG_FILES
|
||||
libs/JSystem/src/JParticle/JPAResourceManager.cpp
|
||||
libs/JSystem/src/JParticle/JPAResource.cpp
|
||||
libs/JSystem/src/JParticle/JPABaseShape.cpp
|
||||
@@ -330,19 +331,10 @@ add_library(JSystem_JParticle STATIC
|
||||
libs/JSystem/src/JParticle/JPAEmitter.cpp
|
||||
libs/JSystem/src/JParticle/JPAParticle.cpp
|
||||
libs/JSystem/src/JParticle/JPAMath.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JFramework STATIC
|
||||
libs/JSystem/src/JFramework/JFWSystem.cpp
|
||||
libs/JSystem/src/JFramework/JFWDisplay.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_J3DU STATIC
|
||||
libs/JSystem/src/J3DU/J3DUClipper.cpp
|
||||
libs/JSystem/src/J3DU/J3DUDL.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JKernel STATIC
|
||||
libs/JSystem/src/JKernel/JKRHeap.cpp
|
||||
libs/JSystem/src/JKernel/JKRExpHeap.cpp
|
||||
libs/JSystem/src/JKernel/JKRSolidHeap.cpp
|
||||
@@ -368,23 +360,14 @@ add_library(JSystem_JKernel STATIC
|
||||
libs/JSystem/src/JKernel/JKRDvdRipper.cpp
|
||||
libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp
|
||||
libs/JSystem/src/JKernel/JKRDecomp.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JMath STATIC
|
||||
libs/JSystem/src/JMath/JMath.cpp
|
||||
libs/JSystem/src/JMath/random.cpp
|
||||
libs/JSystem/src/JMath/JMATrigonometric.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JSupport STATIC
|
||||
libs/JSystem/src/JSupport/JSUList.cpp
|
||||
libs/JSystem/src/JSupport/JSUInputStream.cpp
|
||||
libs/JSystem/src/JSupport/JSUOutputStream.cpp
|
||||
libs/JSystem/src/JSupport/JSUMemoryStream.cpp
|
||||
libs/JSystem/src/JSupport/JSUFileStream.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JUtility STATIC
|
||||
libs/JSystem/src/JUtility/JUTCacheFont.cpp
|
||||
libs/JSystem/src/JUtility/JUTResource.cpp
|
||||
libs/JSystem/src/JUtility/JUTTexture.cpp
|
||||
@@ -405,9 +388,6 @@ add_library(JSystem_JUtility STATIC
|
||||
libs/JSystem/src/JUtility/JUTConsole.cpp
|
||||
libs/JSystem/src/JUtility/JUTDirectFile.cpp
|
||||
libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JStage STATIC
|
||||
libs/JSystem/src/JStage/JSGActor.cpp
|
||||
libs/JSystem/src/JStage/JSGAmbientLight.cpp
|
||||
libs/JSystem/src/JStage/JSGCamera.cpp
|
||||
@@ -415,9 +395,6 @@ add_library(JSystem_JStage STATIC
|
||||
libs/JSystem/src/JStage/JSGLight.cpp
|
||||
libs/JSystem/src/JStage/JSGObject.cpp
|
||||
libs/JSystem/src/JStage/JSGSystem.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_J2DGraph STATIC
|
||||
libs/JSystem/src/J2DGraph/J2DGrafContext.cpp
|
||||
libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp
|
||||
libs/JSystem/src/J2DGraph/J2DTevs.cpp
|
||||
@@ -436,9 +413,6 @@ add_library(JSystem_J2DGraph STATIC
|
||||
libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp
|
||||
libs/JSystem/src/J2DGraph/J2DAnimation.cpp
|
||||
libs/JSystem/src/J2DGraph/J2DManage.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_J3DGraphBase STATIC
|
||||
libs/JSystem/src/J3DGraphBase/J3DGD.cpp
|
||||
libs/JSystem/src/J3DGraphBase/J3DSys.cpp
|
||||
libs/JSystem/src/J3DGraphBase/J3DVertex.cpp
|
||||
@@ -453,9 +427,6 @@ add_library(JSystem_J3DGraphBase STATIC
|
||||
libs/JSystem/src/J3DGraphBase/J3DTevs.cpp
|
||||
libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp
|
||||
libs/JSystem/src/J3DGraphBase/J3DStruct.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_J3DGraphAnimator STATIC
|
||||
libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp
|
||||
libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp
|
||||
libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp
|
||||
@@ -467,9 +438,6 @@ add_library(JSystem_J3DGraphAnimator STATIC
|
||||
libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp
|
||||
libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp
|
||||
libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_J3DGraphLoader STATIC
|
||||
libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp
|
||||
libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp
|
||||
libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp
|
||||
@@ -478,9 +446,6 @@ add_library(JSystem_J3DGraphLoader STATIC
|
||||
libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp
|
||||
libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp
|
||||
libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JStudio STATIC
|
||||
libs/JSystem/src/JStudio/JStudio/ctb.cpp
|
||||
libs/JSystem/src/JStudio/JStudio/ctb-data.cpp
|
||||
libs/JSystem/src/JStudio/JStudio/functionvalue.cpp
|
||||
@@ -495,9 +460,6 @@ add_library(JSystem_JStudio STATIC
|
||||
libs/JSystem/src/JStudio/JStudio/stb.cpp
|
||||
libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp
|
||||
libs/JSystem/src/JStudio/JStudio/stb-data.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JStudio_JStage STATIC
|
||||
libs/JSystem/src/JStudio/JStudio_JStage/control.cpp
|
||||
libs/JSystem/src/JStudio/JStudio_JStage/object.cpp
|
||||
libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp
|
||||
@@ -505,19 +467,10 @@ add_library(JSystem_JStudio_JStage STATIC
|
||||
libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp
|
||||
libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp
|
||||
libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JStudio_JAudio2 STATIC
|
||||
libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp
|
||||
libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JStudio_JParticle STATIC
|
||||
libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp
|
||||
libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JAudio2 STATIC
|
||||
libs/JSystem/src/JAudio2/JASCalc.cpp
|
||||
libs/JSystem/src/JAudio2/JASTaskThread.cpp
|
||||
libs/JSystem/src/JAudio2/JASDvdThread.cpp
|
||||
@@ -582,34 +535,22 @@ add_library(JSystem_JAudio2 STATIC
|
||||
libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp
|
||||
libs/JSystem/src/JAudio2/JAUSoundTable.cpp
|
||||
libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JMessage STATIC
|
||||
libs/JSystem/src/JMessage/control.cpp
|
||||
libs/JSystem/src/JMessage/data.cpp
|
||||
libs/JSystem/src/JMessage/processor.cpp
|
||||
libs/JSystem/src/JMessage/resource.cpp
|
||||
libs/JSystem/src/JMessage/locale.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JGadget STATIC
|
||||
libs/JSystem/src/JGadget/binary.cpp
|
||||
libs/JSystem/src/JGadget/define.cpp
|
||||
libs/JSystem/src/JGadget/linklist.cpp
|
||||
libs/JSystem/src/JGadget/search.cpp
|
||||
libs/JSystem/src/JGadget/std-vector.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JAHostIO STATIC
|
||||
libs/JSystem/src/JAHostIO/JAHFrameNode.cpp
|
||||
libs/JSystem/src/JAHostIO/JAHioMessage.cpp
|
||||
libs/JSystem/src/JAHostIO/JAHioMgr.cpp
|
||||
libs/JSystem/src/JAHostIO/JAHioNode.cpp
|
||||
libs/JSystem/src/JAHostIO/JAHioUtil.cpp
|
||||
libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp
|
||||
)
|
||||
|
||||
add_library(JSystem_JHostIO STATIC
|
||||
libs/JSystem/src/JHostIO/JORFile.cpp
|
||||
libs/JSystem/src/JHostIO/JORHostInfo.cpp
|
||||
libs/JSystem/src/JHostIO/JORMessageBox.cpp
|
||||
@@ -619,28 +560,7 @@ add_library(JSystem_JHostIO STATIC
|
||||
libs/JSystem/src/JHostIO/JHIMccBuf.cpp
|
||||
)
|
||||
|
||||
set(JSYSTEM_LIBRARIES
|
||||
JSystem_JParticle
|
||||
JSystem_JFramework
|
||||
JSystem_J3DU
|
||||
JSystem_JKernel
|
||||
JSystem_JMath
|
||||
JSystem_JSupport
|
||||
JSystem_JUtility
|
||||
JSystem_JStage
|
||||
JSystem_J2DGraph
|
||||
JSystem_J3DGraphBase
|
||||
JSystem_J3DGraphAnimator
|
||||
JSystem_J3DGraphLoader
|
||||
JSystem_JStudio
|
||||
JSystem_JStudio_JStage
|
||||
JSystem_JStudio_JAudio2
|
||||
JSystem_JStudio_JParticle
|
||||
JSystem_JAudio2
|
||||
JSystem_JMessage
|
||||
JSystem_JGadget
|
||||
JSystem_JAHostIO
|
||||
JSystem_JHostIO
|
||||
set(JSYSTEM_FILES
|
||||
)
|
||||
|
||||
set(REL_FILES
|
||||
@@ -1411,130 +1331,50 @@ set(DOLPHIN_FILES
|
||||
)
|
||||
|
||||
set(DUSK_FILES
|
||||
include/dusk/action_bindings.h
|
||||
include/dusk/endian_gx.hpp
|
||||
include/dusk/config.hpp
|
||||
include/dusk/dvd_asset.hpp
|
||||
include/dusk/scope_guard.hpp
|
||||
src/dusk/dvd_asset.cpp
|
||||
src/d/actor/d_a_alink_dusk.cpp
|
||||
src/dusk/asserts.cpp
|
||||
src/dusk/config.cpp
|
||||
src/dusk/crash_handler.cpp
|
||||
src/dusk/crash_reporting.cpp
|
||||
src/dusk/data.cpp
|
||||
src/dusk/data.hpp
|
||||
src/dusk/endian.cpp
|
||||
src/dusk/extras.c
|
||||
src/dusk/file_select.cpp
|
||||
src/dusk/file_select.hpp
|
||||
src/dusk/extras.cpp
|
||||
src/dusk/frame_interpolation.cpp
|
||||
src/dusk/game_clock.cpp
|
||||
src/dusk/globals.cpp
|
||||
src/dusk/gyro.cpp
|
||||
src/dusk/mouse.cpp
|
||||
src/dusk/gamepad_color.cpp
|
||||
src/dusk/autosave.cpp
|
||||
src/dusk/http/http.hpp
|
||||
src/dusk/gyro_aim.cpp
|
||||
src/dusk/io.cpp
|
||||
src/dusk/layout.cpp
|
||||
src/dusk/logging.cpp
|
||||
src/dusk/settings.cpp
|
||||
src/dusk/speedrun.cpp
|
||||
src/dusk/string.cpp
|
||||
src/dusk/stubs.cpp
|
||||
include/dusk/texture_replacements.hpp
|
||||
src/dusk/texture_replacements.cpp
|
||||
src/dusk/update_check.cpp
|
||||
src/dusk/update_check.hpp
|
||||
#src/dusk/m_Do_ext_dusk.cpp
|
||||
src/dusk/imgui/ImGuiConfig.hpp
|
||||
src/dusk/imgui/ImGuiConsole.hpp
|
||||
src/dusk/imgui/ImGuiConsole.cpp
|
||||
src/dusk/imgui/ImGuiEngine.cpp
|
||||
src/dusk/imgui/ImGuiEngine.hpp
|
||||
src/dusk/imgui/ImGuiBloomWindow.cpp
|
||||
src/dusk/imgui/ImGuiBloomWindow.hpp
|
||||
src/dusk/imgui/ImGuiMenuGame.cpp
|
||||
src/dusk/imgui/ImGuiMenuGame.hpp
|
||||
src/dusk/imgui/ImGuiMenuTools.cpp
|
||||
src/dusk/imgui/ImGuiMenuTools.hpp
|
||||
src/dusk/imgui/ImGuiActorSpawner.cpp
|
||||
src/dusk/imgui/ImGuiMenuEnhancements.cpp
|
||||
src/dusk/imgui/ImGuiMenuEnhancements.hpp
|
||||
src/dusk/imgui/ImGuiPreLaunchWindow.cpp
|
||||
src/dusk/imgui/ImGuiPreLaunchWindow.hpp
|
||||
src/dusk/imgui/ImGuiFirstRunPreset.hpp
|
||||
src/dusk/imgui/ImGuiFirstRunPreset.cpp
|
||||
src/dusk/imgui/ImGuiProcessOverlay.cpp
|
||||
src/dusk/imgui/ImGuiCameraOverlay.cpp
|
||||
src/dusk/imgui/ImGuiHeapOverlay.cpp
|
||||
src/dusk/imgui/ImGuiDebugPad.cpp
|
||||
src/dusk/imgui/ImGuiControllerOverlay.cpp
|
||||
src/dusk/imgui/ImGuiStubLog.cpp
|
||||
src/dusk/imgui/ImGuiMapLoader.cpp
|
||||
src/dusk/imgui/ImGuiSaveEditor.cpp
|
||||
src/dusk/imgui/ImGuiStateShare.hpp
|
||||
src/dusk/imgui/ImGuiStateShare.cpp
|
||||
src/dusk/ui/achievements.cpp
|
||||
src/dusk/ui/achievements.hpp
|
||||
src/dusk/ui/bool_button.cpp
|
||||
src/dusk/ui/bool_button.hpp
|
||||
src/dusk/ui/button.cpp
|
||||
src/dusk/ui/button.hpp
|
||||
src/dusk/ui/component.cpp
|
||||
src/dusk/ui/component.hpp
|
||||
src/dusk/ui/controller_config.cpp
|
||||
src/dusk/ui/controller_config.hpp
|
||||
src/dusk/ui/document.cpp
|
||||
src/dusk/ui/document.hpp
|
||||
src/dusk/ui/editor.cpp
|
||||
src/dusk/ui/editor.hpp
|
||||
src/dusk/ui/event.cpp
|
||||
src/dusk/ui/event.hpp
|
||||
src/dusk/ui/graphics_tuner.cpp
|
||||
src/dusk/ui/graphics_tuner.hpp
|
||||
src/dusk/ui/input.cpp
|
||||
src/dusk/ui/input.hpp
|
||||
src/dusk/ui/modal.cpp
|
||||
src/dusk/ui/modal.hpp
|
||||
src/dusk/ui/nav_types.hpp
|
||||
src/dusk/ui/number_button.cpp
|
||||
src/dusk/ui/number_button.hpp
|
||||
src/dusk/ui/overlay.cpp
|
||||
src/dusk/ui/overlay.hpp
|
||||
src/dusk/ui/pane.cpp
|
||||
src/dusk/ui/pane.hpp
|
||||
src/dusk/ui/menu_bar.cpp
|
||||
src/dusk/ui/menu_bar.hpp
|
||||
src/dusk/ui/prelaunch.cpp
|
||||
src/dusk/ui/prelaunch.hpp
|
||||
src/dusk/ui/preset.cpp
|
||||
src/dusk/ui/preset.hpp
|
||||
src/dusk/ui/reporting.cpp
|
||||
src/dusk/ui/reporting.hpp
|
||||
src/dusk/ui/select_button.cpp
|
||||
src/dusk/ui/select_button.hpp
|
||||
src/dusk/ui/settings.cpp
|
||||
src/dusk/ui/settings.hpp
|
||||
src/dusk/ui/string_button.cpp
|
||||
src/dusk/ui/string_button.hpp
|
||||
src/dusk/ui/tab_bar.cpp
|
||||
src/dusk/ui/tab_bar.hpp
|
||||
src/dusk/ui/ui.cpp
|
||||
src/dusk/ui/ui.hpp
|
||||
src/dusk/ui/warp.cpp
|
||||
src/dusk/ui/warp.hpp
|
||||
src/dusk/ui/window.cpp
|
||||
src/dusk/ui/window.hpp
|
||||
src/dusk/achievements.cpp
|
||||
src/dusk/iso_validate.cpp
|
||||
src/dusk/livesplit.cpp
|
||||
src/dusk/offset_ptr.cpp
|
||||
src/dusk/OSContext.cpp
|
||||
src/dusk/OSReport.cpp
|
||||
src/dusk/OSThread.cpp
|
||||
src/dusk/OSMutex.cpp
|
||||
src/dusk/discord.cpp
|
||||
src/dusk/discord.hpp
|
||||
src/dusk/discord_presence.cpp
|
||||
src/dusk/version.cpp
|
||||
src/dusk/action_bindings.cpp
|
||||
)
|
||||
|
||||
set(DUSK_HTTP_BACKEND_FILES
|
||||
src/dusk/http/no_backend.cpp
|
||||
src/dusk/http/curl.cpp
|
||||
src/dusk/http/winhttp.cpp
|
||||
src/dusk/http/url_session.mm
|
||||
)
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From f69d29614644f9963f5cb3f828b58575d60a1c5a Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Trees <gh@jtrees.io>
|
||||
Date: Thu, 4 Jun 2026 01:04:04 +0100
|
||||
Subject: [PATCH] fix cmake paths
|
||||
|
||||
---
|
||||
cmake/nodConfig.cmake.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/cmake/nodConfig.cmake.in b/cmake/nodConfig.cmake.in
|
||||
index 0969382..2a24a88 100644
|
||||
--- a/cmake/nodConfig.cmake.in
|
||||
+++ b/cmake/nodConfig.cmake.in
|
||||
@@ -1,12 +1,12 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
-set(_nod_libdir "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@")
|
||||
-set(_nod_incdir "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@")
|
||||
+set(_nod_libdir "@CMAKE_INSTALL_FULL_LIBDIR@")
|
||||
+set(_nod_incdir "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
|
||||
if (NOT TARGET nod::nod_shared AND NOT TARGET nod::nod_static)
|
||||
# Shared library
|
||||
if (WIN32)
|
||||
- set(_nod_dll "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_BINDIR@/${CMAKE_SHARED_LIBRARY_PREFIX}nod${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
+ set(_nod_dll "@CMAKE_INSTALL_FULL_BINDIR@/${CMAKE_SHARED_LIBRARY_PREFIX}nod${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set(_nod_implib "${_nod_libdir}/${CMAKE_IMPORT_LIBRARY_PREFIX}nod${CMAKE_IMPORT_LIBRARY_SUFFIX}")
|
||||
if (EXISTS "${_nod_dll}")
|
||||
add_library(nod::nod_shared SHARED IMPORTED)
|
||||
--
|
||||
2.53.0
|
||||
|
||||
Generated
-27
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1778869304,
|
||||
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -1,386 +0,0 @@
|
||||
{
|
||||
description = "Dusklight — native PC port of the Twilight Princess decompilation";
|
||||
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = lib.genAttrs supportedSystems;
|
||||
|
||||
dawnVersion = "v20260423.175430";
|
||||
nodVersion = "v2.0.0-alpha.8";
|
||||
versionSuffix = "nix-" + (self.shortRev or self.dirtyShortRev or "dirty");
|
||||
|
||||
dawnInfo = {
|
||||
"x86_64-linux" = {
|
||||
triple = "linux-x86_64";
|
||||
hash = "sha256-HXfKTLHtMPwupnFnaflCARtXVPuS/0PoCePXidjE5xs=";
|
||||
};
|
||||
"aarch64-linux" = {
|
||||
triple = "linux-aarch64";
|
||||
hash = "sha256-34yyFpfqBZUwoFXQ41F0AwAU78FaNihOSY0oriwn6B0=";
|
||||
};
|
||||
"aarch64-darwin" = {
|
||||
triple = "darwin-arm64";
|
||||
hash = "sha256-eQnzrBp6gjiBek1VYQ9A5W13ClYWrDDKjIqv/7eNTR4=";
|
||||
};
|
||||
"x86_64-darwin" = {
|
||||
triple = "darwin-x86_64";
|
||||
hash = "sha256-QGWiGdxiI9kci3NPXH6QFFirxn16851zB/w3jqhIBJ4=";
|
||||
};
|
||||
};
|
||||
|
||||
nodPrebuiltInfo = {
|
||||
"x86_64-linux" = {
|
||||
triple = "linux-x86_64";
|
||||
hash = "sha256-mUqvLsbsqaZ+HAjMmHYPYO+MgtanGRTw7Gzn5uXR5rE=";
|
||||
};
|
||||
"aarch64-darwin" = {
|
||||
triple = "macos-arm64";
|
||||
hash = "sha256-UPy1ywCcv0K6VJOU3uUelJuUdBh3UNaPRlyP5LOBeDw=";
|
||||
};
|
||||
};
|
||||
|
||||
perSystem =
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
inherit (pkgs.stdenv.hostPlatform) isDarwin;
|
||||
hasNodPrebuilt = nodPrebuiltInfo ? ${system};
|
||||
|
||||
aurora = builtins.pathExists "${self}/extern/aurora/CMakeLists.txt";
|
||||
needSubmodules = ''
|
||||
dusklight: The aurora submodule is not vendored. Add submodules=1 to build.
|
||||
|
||||
As a flake input:
|
||||
|
||||
dusklight.url = "git+https://github.com/TwilitRealm/dusklight?ref=main&submodules=1";
|
||||
|
||||
nix command:
|
||||
|
||||
nix run 'git+https://github.com/TwilitRealm/dusklight?submodules=1'
|
||||
|
||||
Local checkout:
|
||||
|
||||
nix run '.?submodules=1#dusklight'
|
||||
'';
|
||||
|
||||
dawn = pkgs.fetchzip {
|
||||
url = "https://github.com/encounter/dawn-build/releases/download/${dawnVersion}/dawn-${dawnInfo.${system}.triple}.tar.gz";
|
||||
hash = dawnInfo.${system}.hash;
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
corrosion = pkgs.fetchFromGitHub {
|
||||
owner = "corrosion-rs";
|
||||
repo = "corrosion";
|
||||
rev = "v0.6.1";
|
||||
hash = "sha256-ppuDNObfKhneD9AlnPAvyCRHKW3BidXKglD1j/LE9CM=";
|
||||
};
|
||||
|
||||
nodFromSource = pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "nod";
|
||||
version = nodVersion;
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "encounter";
|
||||
repo = "nod";
|
||||
rev = nodVersion;
|
||||
hash = "sha256-+zrtVzjo0+X/6uMcNUn1+FaSR+jOhrcQSDNBFjw0NDs=";
|
||||
};
|
||||
patches = [ ./fix-cmake-paths.patch ];
|
||||
cargoDeps = pkgs.rustPlatform.importCargoLock {
|
||||
lockFile = "${finalAttrs.src}/Cargo.lock";
|
||||
};
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-warn "add_subdirectory(nod-ffi/examples)" ""
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
pkgs.cmake
|
||||
pkgs.ninja
|
||||
pkgs.rustPlatform.cargoSetupHook
|
||||
pkgs.cargo
|
||||
pkgs.rustc
|
||||
];
|
||||
CARGO_NET_OFFLINE = "true";
|
||||
cmakeFlags = [
|
||||
"-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
|
||||
"-DFETCHCONTENT_SOURCE_DIR_CORROSION=${corrosion}"
|
||||
"-DNOD_ENABLE_INSTALL=ON"
|
||||
"-DBUILD_SHARED_LIBS=OFF"
|
||||
];
|
||||
doCheck = false;
|
||||
});
|
||||
|
||||
nod =
|
||||
if hasNodPrebuilt then
|
||||
pkgs.fetchzip {
|
||||
url = "https://github.com/encounter/nod/releases/download/${nodVersion}/libnod-${
|
||||
nodPrebuiltInfo.${system}.triple
|
||||
}.tar.gz";
|
||||
hash = nodPrebuiltInfo.${system}.hash;
|
||||
stripRoot = false;
|
||||
}
|
||||
else
|
||||
nodFromSource;
|
||||
|
||||
fetchContentDirs = {
|
||||
DAWN_PREBUILT = dawn;
|
||||
NOD_PREBUILT = nod;
|
||||
CXXOPTS = pkgs.cxxopts.src;
|
||||
JSON = pkgs.nlohmann_json.src;
|
||||
XXHASH = pkgs.xxHash.src;
|
||||
ZSTD = pkgs.zstd.src;
|
||||
FMT = pkgs.fetchzip {
|
||||
url = "https://github.com/fmtlib/fmt/archive/refs/tags/11.1.4.tar.gz";
|
||||
hash = "sha256-sUbxlYi/Aupaox3JjWFqXIjcaQa0LFjclQAOleT+FRA=";
|
||||
};
|
||||
TRACY = pkgs.fetchzip {
|
||||
url = "https://github.com/wolfpld/tracy/archive/a64b9a20294d59421a2f57aeca3c6383d8c48169.tar.gz";
|
||||
hash = "sha256-hbNGOsGeyGSvCJ2No8RkwOib1lX2on3vNZSzyVkZdXw=";
|
||||
};
|
||||
IMGUI = pkgs.fetchFromGitHub {
|
||||
owner = "ocornut";
|
||||
repo = "imgui";
|
||||
rev = "v1.91.9b-docking";
|
||||
hash = "sha256-mQOJ6jCN+7VopgZ61yzaCnt4R1QLrW7+47xxMhFRHLQ=";
|
||||
};
|
||||
SQLITE3 = pkgs.fetchzip {
|
||||
url = "https://sqlite.org/2026/sqlite-amalgamation-3510300.zip";
|
||||
hash = "sha256-pNMR8zxaaqfAzQ0AQBOXMct4usdjey1Q0Gnitg06UhM=";
|
||||
};
|
||||
RMLUI = pkgs.fetchzip {
|
||||
url = "https://github.com/mikke89/RmlUi/archive/f9b8c9e2935d5df2c7dff2c190d3968e99b0c3dc.tar.gz";
|
||||
hash = "sha256-g4O/JZUrrcseOz8o2QJRt+2CeuiLnVeuDJc906xvuIg=";
|
||||
};
|
||||
};
|
||||
|
||||
dusklight =
|
||||
if !aurora then
|
||||
throw needSubmodules
|
||||
else
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "dusklight";
|
||||
version = versionSuffix;
|
||||
src = ./.;
|
||||
|
||||
postUnpack = ''
|
||||
chmod -R u+w "$sourceRoot"
|
||||
substituteInPlace "$sourceRoot/extern/aurora/CMakeLists.txt" \
|
||||
--replace-warn "add_subdirectory(tests)" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.cmake
|
||||
pkgs.ninja
|
||||
pkgs.pkg-config
|
||||
pkgs.python3
|
||||
pkgs.python3Packages.markupsafe
|
||||
]
|
||||
++ lib.optionals (!isDarwin) [ pkgs.autoPatchelfHook ];
|
||||
|
||||
buildInputs = [
|
||||
pkgs.sdl3
|
||||
pkgs.freetype
|
||||
pkgs.zstd
|
||||
pkgs.cxxopts
|
||||
pkgs.nlohmann_json
|
||||
pkgs.xxHash
|
||||
pkgs.abseil-cpp
|
||||
pkgs.zlib
|
||||
pkgs.libpng
|
||||
pkgs.libjpeg_turbo
|
||||
pkgs.curl
|
||||
pkgs.openssl
|
||||
]
|
||||
++ lib.optionals isDarwin [
|
||||
pkgs.apple-sdk_15
|
||||
pkgs.libiconv
|
||||
]
|
||||
++ lib.optionals (!isDarwin) [
|
||||
pkgs.libGL
|
||||
pkgs.libGLU
|
||||
pkgs.libglvnd
|
||||
pkgs.vulkan-loader
|
||||
pkgs.libX11
|
||||
pkgs.libxcb
|
||||
pkgs.libXcursor
|
||||
pkgs.libxi
|
||||
pkgs.libxrandr
|
||||
pkgs.libxscrnsaver
|
||||
pkgs.libxtst
|
||||
pkgs.libxinerama
|
||||
pkgs.libxkbcommon
|
||||
pkgs.wayland
|
||||
pkgs.libdecor
|
||||
pkgs.alsa-lib
|
||||
pkgs.libpulseaudio
|
||||
pkgs.pipewire
|
||||
pkgs.dbus
|
||||
pkgs.udev
|
||||
pkgs.libusb1
|
||||
pkgs.libunwind
|
||||
pkgs.gtk3
|
||||
nod
|
||||
];
|
||||
|
||||
cmakeBuildType = "RelWithDebInfo";
|
||||
ninjaFlags = [ "dusklight" ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DDUSK_VERSION_OVERRIDE=${versionSuffix}"
|
||||
"-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
|
||||
"-DAURORA_DAWN_PROVIDER=package"
|
||||
"-DAURORA_DAWN_LINKAGE=static"
|
||||
"-DAURORA_NOD_PROVIDER=system"
|
||||
"-DAURORA_SDL3_PROVIDER=system"
|
||||
"-DBUILD_SHARED_LIBS=OFF"
|
||||
]
|
||||
++ lib.mapAttrsToList (key: src: "-DFETCHCONTENT_SOURCE_DIR_${key}=${src}") fetchContentDirs;
|
||||
|
||||
installPhase =
|
||||
if isDarwin then
|
||||
''
|
||||
runHook preInstall
|
||||
mkdir -p "$out/Applications"
|
||||
cp -r Dusklight.app "$out/Applications/Dusklight.app"
|
||||
runHook postInstall
|
||||
''
|
||||
else
|
||||
''
|
||||
runHook preInstall
|
||||
install -Dm755 dusklight "$out/bin/dusklight"
|
||||
cp -r "$src/res" "$out/bin/res"
|
||||
install -Dm644 "$src/platforms/freedesktop/dev.twilitrealm.dusk.desktop" \
|
||||
"$out/share/applications/dev.twilitrealm.dusk.desktop"
|
||||
for size in 16 32 48 64 128 256 512 1024; do
|
||||
install -Dm644 "$src/platforms/freedesktop/''${size}x''${size}/apps/dev.twilitrealm.dusk.png" \
|
||||
"$out/share/icons/hicolor/''${size}x''${size}/apps/dev.twilitrealm.dusk.png"
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
meta = {
|
||||
description = "Dusklight — native PC port of the Twilight Princess decompilation";
|
||||
homepage = "https://github.com/zeldaret/tp";
|
||||
platforms = supportedSystems;
|
||||
mainProgram = "dusklight";
|
||||
};
|
||||
};
|
||||
|
||||
# Tooling common to every supported host (Linux and macOS).
|
||||
commonDevTools = [
|
||||
pkgs.cmake
|
||||
pkgs.ninja
|
||||
pkgs.pkg-config
|
||||
pkgs.git
|
||||
pkgs.python3
|
||||
pkgs.python3Packages.markupsafe
|
||||
pkgs.rustc
|
||||
pkgs.cargo
|
||||
pkgs.sccache
|
||||
];
|
||||
|
||||
# Linux-only system libraries — mirrors the apt deps from .github/workflows/build.yml
|
||||
# so the cmake presets resolve the same set of headers as CI.
|
||||
linuxDevDeps = [
|
||||
# Compilers / linkers
|
||||
pkgs.clang
|
||||
pkgs.lld
|
||||
# C/C++ utilities
|
||||
pkgs.curl
|
||||
pkgs.openssl
|
||||
pkgs.zlib
|
||||
pkgs.libpng
|
||||
pkgs.libjpeg_turbo
|
||||
pkgs.freetype
|
||||
pkgs.zstd
|
||||
pkgs.fmt
|
||||
pkgs.tracy
|
||||
pkgs.cxxopts
|
||||
pkgs.abseil-cpp
|
||||
pkgs.sdl3
|
||||
pkgs.ncurses
|
||||
pkgs.libunwind
|
||||
pkgs.libusb1
|
||||
pkgs.fuse
|
||||
# Wayland / display server
|
||||
pkgs.wayland
|
||||
pkgs.wayland-protocols
|
||||
pkgs.libxkbcommon
|
||||
pkgs.libdecor
|
||||
# OpenGL / Vulkan
|
||||
pkgs.libGL
|
||||
pkgs.libGLU
|
||||
pkgs.libglvnd
|
||||
pkgs.vulkan-headers
|
||||
pkgs.vulkan-loader
|
||||
# X11
|
||||
pkgs.libX11
|
||||
pkgs.libxcb
|
||||
pkgs.libXcursor
|
||||
pkgs.libxi
|
||||
pkgs.libxrandr
|
||||
pkgs.libxscrnsaver
|
||||
pkgs.libxtst
|
||||
pkgs.libxinerama
|
||||
# Audio
|
||||
pkgs.alsa-lib
|
||||
pkgs.libpulseaudio
|
||||
pkgs.pipewire
|
||||
# System integration
|
||||
pkgs.dbus
|
||||
pkgs.udev
|
||||
pkgs.gtk3
|
||||
];
|
||||
|
||||
# On macOS we deliberately avoid pulling Nix's cc-wrapper so CMake picks up
|
||||
# Apple Clang and the Xcode SDK directly, matching the macOS CI workflow.
|
||||
darwinShell = pkgs.mkShellNoCC {
|
||||
packages = commonDevTools;
|
||||
shellHook = ''
|
||||
echo "Dusklight dev shell (macOS)"
|
||||
echo "Requires Xcode Command Line Tools for Apple Clang and the macOS SDK."
|
||||
echo "Configure: cmake --preset macos-default-relwithdebinfo"
|
||||
echo "Build: cmake --build --preset macos-default-relwithdebinfo"
|
||||
'';
|
||||
};
|
||||
|
||||
linuxShell = pkgs.mkShell {
|
||||
packages = commonDevTools ++ linuxDevDeps;
|
||||
shellHook = ''
|
||||
echo "Dusklight dev shell (Linux)"
|
||||
echo "Configure: cmake --preset linux-default-relwithdebinfo"
|
||||
echo " cmake --preset linux-clang-relwithdebinfo"
|
||||
echo "Build: cmake --build --preset <preset>"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
default = dusklight;
|
||||
dusklight = dusklight;
|
||||
}
|
||||
// lib.optionalAttrs (!hasNodPrebuilt) { nod = nodFromSource; };
|
||||
|
||||
devShells.default = if isDarwin then darwinShell else linuxShell;
|
||||
};
|
||||
|
||||
systems = forAllSystems perSystem;
|
||||
in
|
||||
{
|
||||
packages = lib.mapAttrs (_: s: s.packages) systems;
|
||||
devShells = lib.mapAttrs (_: s: s.devShells) systems;
|
||||
};
|
||||
}
|
||||
@@ -98,7 +98,7 @@ T cLib_calcTimer(T* value) {
|
||||
void MtxInit(void);
|
||||
void MtxTrans(f32, f32, f32, u8);
|
||||
void MtxScale(f32, f32, f32, u8);
|
||||
void MtxPosition(cXyz DUSK_CONST*, cXyz*);
|
||||
void MtxPosition(cXyz*, cXyz*);
|
||||
void MtxPush(void);
|
||||
void MtxPull(void);
|
||||
|
||||
|
||||
@@ -45,17 +45,17 @@ struct cXyz : Vec {
|
||||
~cXyz() = default;
|
||||
cXyz(const cXyz& vec) = default;
|
||||
#endif
|
||||
DUSK_CONSTEXPR cXyz(f32 x, f32 y, f32 z) {
|
||||
cXyz(f32 x, f32 y, f32 z) {
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
this->z = z;
|
||||
}
|
||||
DUSK_CONSTEXPR cXyz(const Vec& vec) {
|
||||
cXyz(const Vec& vec) {
|
||||
this->x = vec.x;
|
||||
this->y = vec.y;
|
||||
this->z = vec.z;
|
||||
}
|
||||
DUSK_CONSTEXPR cXyz& operator=(const Vec& vec) {
|
||||
cXyz& operator=(const Vec& vec) {
|
||||
this->x = vec.x;
|
||||
this->y = vec.y;
|
||||
this->z = vec.z;
|
||||
|
||||
@@ -14,7 +14,7 @@ struct Z2StatusMgr : public JASGlobalInstance<Z2StatusMgr> {
|
||||
void menuIn();
|
||||
void menuOut();
|
||||
bool isMovieDemo();
|
||||
void setDemoName(DUSK_CONST char* demoName);
|
||||
void setDemoName(char* demoName);
|
||||
void processTime();
|
||||
bool checkDayTime();
|
||||
void setEventBit(void* eventBit);
|
||||
|
||||
@@ -39,10 +39,6 @@ enum Z2WolfHowlCurveID {
|
||||
Z2WOLFHOWL_NEWSONG2,
|
||||
Z2WOLFHOWL_NEWSONG3,
|
||||
|
||||
#if TARGET_PC
|
||||
Z2WOLFHOWL_TIMESONG,
|
||||
#endif
|
||||
|
||||
Z2WOLFHOWL_MAX
|
||||
};
|
||||
|
||||
|
||||
@@ -88,10 +88,6 @@ public:
|
||||
/* 0x02C */ cXyz field_0x2c;
|
||||
/* 0x038 */ cXyz field_0x38[60];
|
||||
/* 0x308 */ cXyz field_0x308[60];
|
||||
#if TARGET_PC
|
||||
TGXTexObj mBlurTexObj;
|
||||
ResTIMG* mpCachedBlurTex = nullptr;
|
||||
#endif
|
||||
}; // Size = 0x5D8
|
||||
|
||||
class dAlink_bottleWaterPcallBack_c : public JPAParticleCallBack {
|
||||
@@ -4549,38 +4545,12 @@ public:
|
||||
/* 0x03840 */ cXyz* mIronBallChainPos;
|
||||
/* 0x03844 */ csXyz* mIronBallChainAngle;
|
||||
/* 0x03848 */ cXyz* field_0x3848;
|
||||
/* 0x0384C */ cXyz DUSK_CONST* field_0x384c;
|
||||
/* 0x0384C */ cXyz* field_0x384c;
|
||||
/* 0x03850 */ daAlink_procFunc mpProcFunc;
|
||||
|
||||
#if TARGET_PC
|
||||
void handleWolfHowl();
|
||||
void handleQuickTransform();
|
||||
bool checkAimContext();
|
||||
|
||||
void onIronBallChainInterpCallback();
|
||||
|
||||
static const int IRON_BALL_CHAIN_COUNT = 102;
|
||||
cXyz mIBChainInterpPrevPos[IRON_BALL_CHAIN_COUNT];
|
||||
cXyz mIBChainInterpCurrPos[IRON_BALL_CHAIN_COUNT];
|
||||
csXyz mIBChainInterpPrevAngle[IRON_BALL_CHAIN_COUNT];
|
||||
csXyz mIBChainInterpCurrAngle[IRON_BALL_CHAIN_COUNT];
|
||||
cXyz mIBChainInterpPrevHandRoot;
|
||||
cXyz mIBChainInterpCurrHandRoot;
|
||||
bool mIBChainInterpPrevValid;
|
||||
bool mIBChainInterpCurrValid;
|
||||
|
||||
cXyz mHsChainInterpPrevTop;
|
||||
cXyz mHsChainInterpCurrTop;
|
||||
cXyz mHsChainInterpPrevRoot;
|
||||
cXyz mHsChainInterpCurrRoot;
|
||||
cXyz mHsChainInterpPrevSubRoot;
|
||||
cXyz mHsChainInterpCurrSubRoot;
|
||||
cXyz mHsChainInterpPrevSubTop;
|
||||
cXyz mHsChainInterpCurrSubTop;
|
||||
bool mHsChainInterpPrevValid;
|
||||
bool mHsChainInterpCurrValid;
|
||||
|
||||
bool mIsRollstab = false;
|
||||
bool checkGyroAimItemContext();
|
||||
#endif
|
||||
}; // Size: 0x385C
|
||||
|
||||
|
||||
@@ -188,15 +188,6 @@ public:
|
||||
/* 0x273C */ f32 mKankyoBlend;
|
||||
/* 0x2740 */ u8 field_0x2740;
|
||||
/* 0x2744 */ dMsgFlow_c mMsgFlow;
|
||||
#if TARGET_PC
|
||||
cXyz mReinsInterpPrev[2][16];
|
||||
cXyz mReinsInterpCurr[2][16];
|
||||
cXyz mReinsTexInterpPrev[2];
|
||||
cXyz mReinsTexInterpCurr[2];
|
||||
bool mReinsInterpPrevValid;
|
||||
bool mReinsInterpCurrValid;
|
||||
s8 mDemoCamSyncTicks;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(b_gnd_class) == 0x2790);
|
||||
|
||||
@@ -203,7 +203,7 @@ private:
|
||||
/* 0x0AAD */ bool mStayNo2Flag;
|
||||
/* 0x0AAE */ u8 mBlendStatus;
|
||||
/* 0x0AB0 */ f32 mBlend;
|
||||
/* 0x0AB4 */ char DUSK_CONST* mArcName;
|
||||
/* 0x0AB4 */ char* mArcName;
|
||||
/* 0x0AB8 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x0AF8 */ dBgS_ObjAcch mAcch;
|
||||
/* 0x0CD0 */ dBgS_AcchCir mAcchCirArr[16];
|
||||
|
||||
@@ -44,9 +44,6 @@ public:
|
||||
int draw();
|
||||
int execute();
|
||||
void drawMeter();
|
||||
#if TARGET_PC
|
||||
void updateOnWide();
|
||||
#endif
|
||||
void setComboCount(u8, u8);
|
||||
void setScoreCount(u32);
|
||||
void addScoreCount(cXyz*, u32, u8);
|
||||
|
||||
@@ -23,10 +23,10 @@ public:
|
||||
/* 3 */ ACT_END,
|
||||
};
|
||||
|
||||
DUSK_CONST char* getArcName();
|
||||
DUSK_CONST char* getBmd();
|
||||
DUSK_CONST char* getDzb();
|
||||
DUSK_CONST char* getBmd2();
|
||||
char* getArcName();
|
||||
char* getBmd();
|
||||
char* getDzb();
|
||||
char* getBmd2();
|
||||
J3DModelData* getDoorModelData();
|
||||
int CreateHeap();
|
||||
void calcMtx();
|
||||
|
||||
@@ -33,8 +33,8 @@ public:
|
||||
|
||||
typedef int (daBdoorL1_c::*actionFunc)();
|
||||
|
||||
DUSK_CONST char* getDoorEventName();
|
||||
DUSK_CONST char* getDoorEventName2();
|
||||
char* getDoorEventName();
|
||||
char* getDoorEventName2();
|
||||
const char* getArcName();
|
||||
const char* getAnmArcName();
|
||||
int getDoorType();
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
*/
|
||||
class daDbDoor00_c : public fopAc_ac_c {
|
||||
public:
|
||||
DUSK_CONST char* getAlwaysArcName();
|
||||
DUSK_CONST char* getDzb();
|
||||
DUSK_CONST char* getDummyBmdName();
|
||||
DUSK_CONST char* getBmdArcName();
|
||||
DUSK_CONST char* getBmdName();
|
||||
char* getAlwaysArcName();
|
||||
char* getDzb();
|
||||
char* getDummyBmdName();
|
||||
char* getBmdArcName();
|
||||
char* getBmdName();
|
||||
J3DModelData* getDoorModelData();
|
||||
int CreateHeap();
|
||||
void calcMtx();
|
||||
|
||||
@@ -29,11 +29,11 @@ public:
|
||||
|
||||
typedef int (daKnob20_c::*actionFunc)();
|
||||
|
||||
DUSK_CONST char* getAlwaysArcName();
|
||||
DUSK_CONST char* getEvArcName();
|
||||
DUSK_CONST char* getDzb();
|
||||
DUSK_CONST char* getDummyBmd();
|
||||
DUSK_CONST char* getBmd();
|
||||
char* getAlwaysArcName();
|
||||
char* getEvArcName();
|
||||
char* getDzb();
|
||||
char* getDummyBmd();
|
||||
char* getBmd();
|
||||
J3DModelData* getDoorModelData();
|
||||
int CreateHeap();
|
||||
void calcMtx();
|
||||
|
||||
@@ -54,15 +54,15 @@ public:
|
||||
|
||||
typedef int (daMBdoorL1_c::*actionFunc)();
|
||||
|
||||
DUSK_CONST char* getAnmArcName();
|
||||
DUSK_CONST char* getArcName();
|
||||
DUSK_CONST char* getAlwaysArcName();
|
||||
char* getAnmArcName();
|
||||
char* getArcName();
|
||||
char* getAlwaysArcName();
|
||||
int getDoorType();
|
||||
DUSK_CONST char* getOpenAnm();
|
||||
DUSK_CONST char* getCloseAnm();
|
||||
DUSK_CONST char* getBmd();
|
||||
DUSK_CONST char* getBtk();
|
||||
DUSK_CONST char* getDzb();
|
||||
char* getOpenAnm();
|
||||
char* getCloseAnm();
|
||||
char* getBmd();
|
||||
char* getBtk();
|
||||
char* getDzb();
|
||||
J3DModelData* getDoorModelData();
|
||||
int CreateHeap();
|
||||
void calcMtx();
|
||||
|
||||
@@ -45,12 +45,12 @@ public:
|
||||
ACTION_DEMO,
|
||||
};
|
||||
|
||||
char DUSK_CONST* getStopBmdName();
|
||||
char* getStopBmdName();
|
||||
J3DModelData* getStopModelData();
|
||||
char DUSK_CONST* getAlwaysArcName();
|
||||
char DUSK_CONST* getArcName();
|
||||
char DUSK_CONST* getBmdName();
|
||||
char DUSK_CONST* getBtk();
|
||||
char* getAlwaysArcName();
|
||||
char* getArcName();
|
||||
char* getBmdName();
|
||||
char* getBtk();
|
||||
J3DModelData* getModelData();
|
||||
f32 getSize2X();
|
||||
int CreateHeap();
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
int chkStopOpen();
|
||||
int chkMakeKey();
|
||||
|
||||
virtual char DUSK_CONST* getDzbName();
|
||||
virtual char* getDzbName();
|
||||
virtual int getDemoAction();
|
||||
|
||||
void onFlag(u16 flag) { field_0x68e |= flag; }
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
/* 0x5B4 */ J3DModel* mpModel;
|
||||
/* 0x5B8 */ u8 mArrowType;
|
||||
/* 0x5B9 */ u8 mFlags;
|
||||
/* 0x5BC */ char DUSK_CONST* mResName;
|
||||
/* 0x5BC */ char* mResName;
|
||||
/* 0x5C0 */ s16 field_0x5c0;
|
||||
/* 0x5C2 */ s16 mAction;
|
||||
/* 0x5C4 */ s16 mMode;
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
/* 0x5B5 */ u8 mDistanceParam;
|
||||
/* 0x5B6 */ u8 mType;
|
||||
/* 0x5B7 */ u8 mPathIndex;
|
||||
/* 0x5B8 */ DUSK_CONST char* mArcName;
|
||||
/* 0x5B8 */ char* mArcName;
|
||||
/* 0x5BC */ u8 field_0x5bc;
|
||||
/* 0x5BD */ s8 mPathPoint;
|
||||
/* 0x5BE */ s8 mPathStep;
|
||||
|
||||
@@ -80,12 +80,6 @@ public:
|
||||
/* 0x125C */ u32 field_0x125c;
|
||||
/* 0x1260 */ u8 field_0x1260[0x126C - 0x1260];
|
||||
/* 0x126C */ u8 HIOInit;
|
||||
#if TARGET_PC
|
||||
cXyz mStalkLineInterpPrev[12];
|
||||
cXyz mStalkLineInterpCurr[12];
|
||||
bool mStalkLineInterpPrevValid;
|
||||
bool mStalkLineInterpCurrValid;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_db_class) == 0x1270);
|
||||
|
||||
@@ -73,12 +73,6 @@ public:
|
||||
/* 0x124C */ f32 field_0x124c;
|
||||
/* 0x1250 */ u8 field_0x1250[0x1264 - 0x1250];
|
||||
/* 0x1264 */ u8 HIOInit;
|
||||
#if TARGET_PC
|
||||
cXyz mStalkLineInterpPrev[12];
|
||||
cXyz mStalkLineInterpCurr[12];
|
||||
bool mStalkLineInterpPrevValid;
|
||||
bool mStalkLineInterpCurrValid;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_hb_class) == 0x1268);
|
||||
|
||||
@@ -44,12 +44,6 @@ public:
|
||||
/* 0x88C */ u8 field_0x88C[0x8C8 - 0x88C];
|
||||
/* 0x8C8 */ s8 field_0x8c8;
|
||||
/* 0x8C9 */ u8 mInitHIO;
|
||||
#if TARGET_PC
|
||||
cXyz mRopeInterpPrev[16];
|
||||
cXyz mRopeInterpCurr[16];
|
||||
bool mRopeInterpPrevValid;
|
||||
bool mRopeInterpCurrValid;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_mb_class) == 0x8cc);
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
/* 0x05CC */ s16 target_ya;
|
||||
/* 0x05D0 */ mDoExt_McaMorfSO* anm_p;
|
||||
/* 0x05D4 */ Z2CreatureEnemy sound;
|
||||
/* 0x0678 */ DUSK_CONST char* resName;
|
||||
/* 0x0678 */ char* resName;
|
||||
/* 0x067C */ int anm;
|
||||
/* 0x0680 */ int field_0x680;
|
||||
/* 0x0684 */ dJntCol_c mJntCol;
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
/* 0x05C8 */ s16 mTargetAngleY;
|
||||
/* 0x05CC */ mDoExt_McaMorfSO* mpMorf;
|
||||
/* 0x05D0 */ Z2CreatureEnemy mSound;
|
||||
/* 0x0674 */ char DUSK_CONST* mpArcName;
|
||||
/* 0x0674 */ char* mpArcName;
|
||||
/* 0x0678 */ int mAnm;
|
||||
/* 0x067C */ u8 field_0x67c[0x680 - 0x67c];
|
||||
/* 0x0680 */ dJntCol_c mJntCol;
|
||||
|
||||
@@ -81,15 +81,6 @@ public:
|
||||
/* 0x306D */ u8 field_0x306D[0x307C - 0x306D];
|
||||
/* 0x307C */ u32 mBodyEffEmtrID;
|
||||
/* 0x3080 */ u8 mInitHIO;
|
||||
|
||||
#if TARGET_PC
|
||||
static const int HAIR_STRAND_COUNT = 22;
|
||||
static const int HAIR_SEGMENT_COUNT = 16;
|
||||
cXyz mHairInterpPrev[HAIR_STRAND_COUNT * HAIR_SEGMENT_COUNT];
|
||||
cXyz mHairInterpCurr[HAIR_STRAND_COUNT * HAIR_SEGMENT_COUNT];
|
||||
bool mHairInterpPrevValid;
|
||||
bool mHairInterpCurrValid;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_s1_class) == 0x3084);
|
||||
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
/* 0x6D4 */ f32 field_0x6d4;
|
||||
/* 0x6D8 */ s16 mFootJoints[4];
|
||||
/* 0x6E0 */ s16 field_0x6e0;
|
||||
/* 0x6E4 */ char DUSK_CONST* mpResName;
|
||||
/* 0x6E4 */ char* mpResName;
|
||||
/* 0x6E8 */ u16 mDamageCooldownTimer;
|
||||
/* 0x6EA */ u8 mGenericTimer;
|
||||
/* 0x6EC */ int mAttackTimer;
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
/* 0x0000 */ fopEn_enemy_c enemy; ///< @brief Base enemy class instance.
|
||||
/* 0x05AC */ request_of_phase_process_class phase; ///< @brief Phase process request handler.
|
||||
/* 0x05B4 */ s16 ride_mode; ///< @brief Current sub-action mode within the run action.
|
||||
/* 0x05B8 */ char DUSK_CONST* resName; ///< @brief Resource name for loading models/animations.
|
||||
/* 0x05B8 */ char* resName; ///< @brief Resource name for loading models/animations.
|
||||
/* 0x05BC */ u8 arg0; ///< @brief Creation parameter 1.
|
||||
/* 0x05BD */ u8 arg1; ///< @brief Creation parameter 2.
|
||||
/* 0x05BE */ u8 field_0x5be;
|
||||
@@ -220,15 +220,6 @@ public:
|
||||
/* 0x17E2 */ s16 wait_roll_angle; ///< @brief Roll angle during wait state.
|
||||
/* 0x17E4 */ u8 field_0x17e4[0x17e8 - 0x17e4];
|
||||
/* 0x17E8 */ f32 ride_speed_max; ///< @brief Speed rate for riding calculations.
|
||||
#if TARGET_PC
|
||||
cXyz himo_mat_interp_prev[2][16];
|
||||
cXyz himo_mat_interp_curr[2][16];
|
||||
cXyz himo_tex_interp_prev[2];
|
||||
cXyz himo_tex_interp_curr[2];
|
||||
bool himo_interp_prev_valid;
|
||||
bool himo_interp_curr_valid;
|
||||
s8 demo_cam_sync_ticks;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_wb_class) == 0x17EC);
|
||||
|
||||
@@ -74,12 +74,6 @@ public:
|
||||
/* 0x1250 */ f32 field_0x1250;
|
||||
/* 0x1254 */ u8 field_0x1254[0x1268 - 0x1254];
|
||||
/* 0x1268 */ u8 field_0x1268;
|
||||
#if TARGET_PC
|
||||
cXyz mLineMatInterpPrev[12];
|
||||
cXyz mLineMatInterpCurr[12];
|
||||
bool mLineMatInterpPrevValid;
|
||||
bool mLineMatInterpCurrValid;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_yd_class) == 0x126c);
|
||||
|
||||
@@ -63,15 +63,6 @@ public:
|
||||
/* 0x0BB4 */ yg_ke_s mYgKes[13];
|
||||
/* 0x1880 */ mDoExt_3DlineMat0_c mLineMat;
|
||||
/* 0x189C */ u8 mIsFirstSpawn;
|
||||
|
||||
#if TARGET_PC
|
||||
static const int TENTACLE_STRAND_COUNT = 13;
|
||||
static const int TENTACLE_SEGMENT_COUNT = 10;
|
||||
cXyz mTentacleInterpPrev[TENTACLE_STRAND_COUNT * TENTACLE_SEGMENT_COUNT];
|
||||
cXyz mTentacleInterpCurr[TENTACLE_STRAND_COUNT * TENTACLE_SEGMENT_COUNT];
|
||||
bool mTentacleInterpPrevValid;
|
||||
bool mTentacleInterpCurrValid;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_yg_class) == 0x18a0);
|
||||
|
||||
@@ -77,12 +77,6 @@ public:
|
||||
/* 0x1260 */ u32 field_0x1260;
|
||||
/* 0x1260 */ u8 field_0x1264[0x1270 - 0x1264];
|
||||
/* 0x1270 */ bool mIsHIOOwner;
|
||||
#if TARGET_PC
|
||||
cXyz mLineInterpPrev[12];
|
||||
cXyz mLineInterpCurr[12];
|
||||
bool mLineInterpPrevValid;
|
||||
bool mLineInterpCurrValid;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(e_yh_class) == 0x1274);
|
||||
|
||||
@@ -213,8 +213,8 @@ private:
|
||||
/* 0x750 */ int field_0x750;
|
||||
/* 0x754 */ int field_0x754;
|
||||
/* 0x758 */ int field_0x758;
|
||||
/* 0x75C */ DUSK_CONST char* mArcName;
|
||||
/* 0x760 */ DUSK_CONST char* mDemoName;
|
||||
/* 0x75C */ char* mArcName;
|
||||
/* 0x760 */ char* mDemoName;
|
||||
/* 0x764 */ u32 mShadowId;
|
||||
/* 0x768 */ dPath* mpPath1;
|
||||
/* 0x76C */ dPath* mpPath2;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
/* 0x5F4 */ s16 mYawToPlayer;
|
||||
/* 0x5F6 */ s16 field_0x5f6;
|
||||
/* 0x5F8 */ s16 field_0x5f8;
|
||||
/* 0x5FC */ DUSK_CONST char* mResName;
|
||||
/* 0x5FC */ char* mResName;
|
||||
/* 0x600 */ mDoExt_McaMorf* mpMorf;
|
||||
/* 0x604 */ J3DAnmTransform* mAnmTransform;
|
||||
/* 0x608 */ u32 mShadowId;
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
|
||||
/* 0x0000 */ fopAc_ac_c actor;
|
||||
/* 0x0568 */ request_of_phase_process_class phase;
|
||||
/* 0x0570 */ DUSK_CONST char* arcname;
|
||||
/* 0x0570 */ char* arcname;
|
||||
/* 0x0574 */ u8 arg0;
|
||||
/* 0x0575 */ u8 arg1;
|
||||
/* 0x0576 */ u8 arg2;
|
||||
@@ -299,13 +299,8 @@ public:
|
||||
/* 0x168C */ u8 field_0x168c;
|
||||
/* 0x168D */ u8 field_0x168d;
|
||||
/* 0x168E */ u8 HIOInit;
|
||||
|
||||
#if TARGET_PC
|
||||
cXyz mLineInterpPrev[MG_ROD_LURE_LINE_LEN];
|
||||
cXyz mLineInterpCurr[MG_ROD_LURE_LINE_LEN];
|
||||
bool mLineInterpPrevValid;
|
||||
bool mLineInterpCurrValid;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(dmg_rod_class) == 0x1690);
|
||||
|
||||
#endif /* D_A_MG_ROD_H */
|
||||
|
||||
@@ -25,10 +25,6 @@ public:
|
||||
/* 0x164 */ cXyz mMinVal;
|
||||
/* 0x170 */ cXyz mMaxVal;
|
||||
/* 0x17C */ cXyz mViewScale;
|
||||
#if TARGET_PC
|
||||
bool mbReset = false;
|
||||
bool mbHadEntry = false;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <thp.h>
|
||||
#else
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#endif
|
||||
#include "f_op/f_op_actor.h"
|
||||
#include "d/d_drawlist.h"
|
||||
@@ -95,12 +94,6 @@ static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr);
|
||||
#define THP_TEXTURE_SET_COUNT 3
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
namespace dusk {
|
||||
void MoviePlayerShutdown();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct daMP_THPPlayer {
|
||||
/* 0x000 */ DVDFileInfo fileInfo;
|
||||
/* 0x03C */ THPHeader header;
|
||||
@@ -126,7 +119,6 @@ struct daMP_THPPlayer {
|
||||
/* 0x0D4 */ s32 curCount;
|
||||
#if TARGET_PC
|
||||
/* 0x0D8 */ std::atomic<s32> videoDecodeCount;
|
||||
std::chrono::steady_clock::time_point thpPlaybackClock;
|
||||
#else
|
||||
/* 0x0D8 */ s32 videoDecodeCount;
|
||||
#endif
|
||||
|
||||
@@ -103,8 +103,8 @@ public:
|
||||
void animePlay();
|
||||
int setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int);
|
||||
void setBtpAnm(J3DAnmTexPattern*, J3DModelData*, f32, int);
|
||||
J3DAnmTransformKey* getTrnsfrmKeyAnm(DUSK_CONST char*);
|
||||
J3DAnmTexPattern* getTexPtrnAnm(DUSK_CONST char*);
|
||||
J3DAnmTransformKey* getTrnsfrmKeyAnm(char*);
|
||||
J3DAnmTexPattern* getTexPtrnAnm(char*);
|
||||
int checkEndAnm(J3DFrameCtrl*);
|
||||
int checkEndAnm(f32);
|
||||
u8 getItemNumMax();
|
||||
|
||||
@@ -519,7 +519,7 @@ public:
|
||||
/* 0x568 */ daNpcT_faceMotionAnmData_c const* mpFaceMotionAnmData;
|
||||
/* 0x56C */ daNpcT_motionAnmData_c const* mpMotionAnmData;
|
||||
/* 0x570 */ daNpcT_evtData_c const* mpEvtData;
|
||||
/* 0x574 */ DUSK_CONST char* DUSK_CONST* mpArcNames;
|
||||
/* 0x574 */ char** mpArcNames;
|
||||
/* 0x578 */ mDoExt_McaMorfSO* mpMorf[2];
|
||||
/* 0x580 */ Z2Creature mSound;
|
||||
/* 0x610 */ mDoExt_bckAnm mBckAnm;
|
||||
@@ -627,7 +627,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
|
||||
int i_motionStepNum, daNpcT_evtData_c const* i_evtData, DUSK_CONST char* DUSK_CONST* i_arcNames)
|
||||
int i_motionStepNum, daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
:
|
||||
mpFaceMotionAnmData(i_faceMotionAnmData),
|
||||
mpMotionAnmData(i_motionAnmData),
|
||||
@@ -654,8 +654,8 @@ public:
|
||||
int setBtkAnm(J3DAnmTextureSRTKey*, J3DModelData*, f32, int);
|
||||
int setBrkAnm(J3DAnmTevRegKey*, J3DModelData*, f32, int);
|
||||
int setBpkAnm(J3DAnmColor*, J3DModelData*, f32, int);
|
||||
int loadRes(s8 const*, char const* DUSK_CONST*);
|
||||
void deleteRes(s8 const*, char const* DUSK_CONST*);
|
||||
int loadRes(s8 const*, char const**);
|
||||
void deleteRes(s8 const*, char const**);
|
||||
int execute();
|
||||
int draw(BOOL, BOOL, f32, GXColorS10*, f32, BOOL, BOOL, BOOL);
|
||||
void setEnvTevColor();
|
||||
|
||||
@@ -86,12 +86,12 @@ public:
|
||||
class daBaseNpc_c : public fopAc_ac_c {
|
||||
public:
|
||||
daBaseNpc_c();
|
||||
J3DAnmTransform* getTrnsfrmKeyAnmP(char DUSK_CONST*, int);
|
||||
J3DAnmTransform* getTrnsfrmKeyAnmP(char*, int);
|
||||
int setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int);
|
||||
int setBckAnm(J3DAnmTransform*, f32, int, int, int, bool);
|
||||
J3DAnmTransform* getTexPtrnAnmP(char DUSK_CONST*, int);
|
||||
J3DAnmTransform* getTexPtrnAnmP(char*, int);
|
||||
int setBtpAnm(J3DAnmTexPattern*, J3DModelData*, f32, int);
|
||||
void orderEvent(int, char DUSK_CONST*);
|
||||
void orderEvent(int, char*);
|
||||
void setEnvTevColor();
|
||||
void setRoomNo();
|
||||
int checkEndAnm(f32);
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
/* 0x808 */ mDoExt_btpAnm mBtp;
|
||||
/* 0x820 */ mDoExt_btkAnm mBtk;
|
||||
/* 0x838 */ s16 field_0x838;
|
||||
/* 0x83C */ u16 DUSK_CONST* field_0x83c;
|
||||
/* 0x83C */ u16* field_0x83c;
|
||||
/* 0x840 */ u16 field_0x840;
|
||||
/* 0x842 */ u16 field_0x842;
|
||||
/* 0x844 */ u8 field_0x844;
|
||||
|
||||
@@ -311,10 +311,10 @@ public:
|
||||
static void* srchActor(void*, void*);
|
||||
|
||||
void initialize();
|
||||
J3DAnmTransformKey* getTrnsfrmKeyAnmP(DUSK_CONST char*, int);
|
||||
J3DAnmTexPattern* getTexPtrnAnmP(DUSK_CONST char*, int);
|
||||
J3DAnmTextureSRTKey* getTexSRTKeyAnmP(DUSK_CONST char*, int);
|
||||
J3DAnmTevRegKey* getTevRegKeyAnmP(DUSK_CONST char*, int);
|
||||
J3DAnmTransformKey* getTrnsfrmKeyAnmP(char*, int);
|
||||
J3DAnmTexPattern* getTexPtrnAnmP(char*, int);
|
||||
J3DAnmTextureSRTKey* getTexSRTKeyAnmP(char*, int);
|
||||
J3DAnmTevRegKey* getTevRegKeyAnmP(char*, int);
|
||||
BOOL setMcaMorfAnm(J3DAnmTransformKey* i_anm, f32 i_rate, f32 i_morf, int i_attr,
|
||||
int i_start, int i_end);
|
||||
BOOL setBckAnm(J3DAnmTransform* i_bck, f32 i_rate, int i_attr, int i_start,
|
||||
@@ -336,8 +336,8 @@ public:
|
||||
BOOL hitChk2(dCcD_Cyl*, BOOL, BOOL);
|
||||
void setDamage(int, int, int);
|
||||
int ctrlMsgAnm(int&, int&, fopAc_ac_c*, BOOL);
|
||||
void orderEvent(int, DUSK_CONST char*, u16, u16, u8, u16);
|
||||
void changeEvent(DUSK_CONST char*, DUSK_CONST char*, u16, u16);
|
||||
void orderEvent(int, char*, u16, u16, u8, u16);
|
||||
void changeEvent(char*, char*, u16, u16);
|
||||
BOOL chkActorInSight(fopAc_ac_c*, f32);
|
||||
BOOL chkActorInArea(fopAc_ac_c*, cXyz, cXyz, s16);
|
||||
BOOL chkActorInAttnArea(fopAc_ac_c*, fopAc_ac_c*, int);
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
|
||||
int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {
|
||||
@@ -171,8 +171,8 @@ public:
|
||||
u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
|
||||
void setLastIn() { mLastGoatIn = true; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[7];
|
||||
static cutFunc DUSK_CONST mCutList[7];
|
||||
static char* mCutNameList[7];
|
||||
static cutFunc mCutList[7];
|
||||
|
||||
private:
|
||||
/* 0xE40 */ NPC_ARU_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
inline bool step(s16, int, f32);
|
||||
inline void playExpression();
|
||||
|
||||
static EventFn DUSK_CONST mEvtSeqList[2];
|
||||
static EventFn mEvtSeqList[2];
|
||||
|
||||
private:
|
||||
/* 0xB48 */ Z2Creature mCreatureSound;
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: dShopSystem_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {
|
||||
@@ -117,8 +117,8 @@ public:
|
||||
return rv;
|
||||
}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[4];
|
||||
static cutFunc DUSK_CONST mCutList[4];
|
||||
static char* mCutNameList[4];
|
||||
static cutFunc mCutList[4];
|
||||
|
||||
/* 0x0F7C */ mDoExt_McaMorfSO* mpScoopMorf;
|
||||
/* 0x0F80 */ NPC_BANS_HIO_CLASS* mHIO;
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
|
||||
int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {
|
||||
@@ -140,8 +140,8 @@ public:
|
||||
u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; }
|
||||
u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[15];
|
||||
static cutFunc DUSK_CONST mCutList[15];
|
||||
static char* mCutNameList[15];
|
||||
static cutFunc mCutList[15];
|
||||
|
||||
private:
|
||||
/* 0x0E40 */ mDoExt_McaMorfSO* mpCupModelMorf;
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
return var_r30;
|
||||
}
|
||||
|
||||
static EventFn DUSK_CONST mEvtSeqList[];
|
||||
static EventFn mEvtSeqList[];
|
||||
|
||||
/* 0xB48 */ Z2Creature mSound;
|
||||
/* 0xBD8 */ u8 field_0xBD8[0xBDC - 0xBD8];
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
daNpc_Bou_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6,
|
||||
daNpcT_evtData_c const* param_7, char DUSK_CONST* DUSK_CONST* param_8)
|
||||
daNpcT_evtData_c const* param_7, char** param_8)
|
||||
:
|
||||
daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8)
|
||||
{}
|
||||
@@ -114,8 +114,8 @@ public:
|
||||
virtual int drawDbgInfo();
|
||||
virtual void changeAnm(int*, int*);
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[9];
|
||||
static cutFunc DUSK_CONST mCutList[9];
|
||||
static char* mCutNameList[9];
|
||||
static cutFunc mCutList[9];
|
||||
|
||||
int getFlowNodeNo() {
|
||||
u16 nodeNo = home.angle.x;
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
void setFear() { mFear = true; }
|
||||
void setTalkFlag() { mTalkFlag = true; }
|
||||
|
||||
static eventFunc DUSK_CONST mEvtSeqList[1];
|
||||
static eventFunc mEvtSeqList[1];
|
||||
|
||||
private:
|
||||
/* 0xB48 */ Z2CreatureCitizen mSound;
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
|
||||
int i_motionStepNum, daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
int i_motionStepNum, daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: dShopSystem_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
@@ -124,8 +124,8 @@ public:
|
||||
|
||||
u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
|
||||
static cutFunc DUSK_CONST mCutList[1];
|
||||
static char* mCutNameList[1];
|
||||
static cutFunc mCutList[1];
|
||||
|
||||
private:
|
||||
/* 0x0F7C */ NPC_CLERKA_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
|
||||
int i_motionStepNum, daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
int i_motionStepNum, daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: dShopSystem_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
@@ -137,8 +137,8 @@ public:
|
||||
|
||||
u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
|
||||
static cutFunc DUSK_CONST mCutList[1];
|
||||
static char* mCutNameList[1];
|
||||
static cutFunc mCutList[1];
|
||||
|
||||
private:
|
||||
/* 0x0F7C */ mDoExt_bpkAnm mBpkAnm2;
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: dShopSystem_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
@@ -125,8 +125,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
|
||||
static cutFunc DUSK_CONST mCutList[1];
|
||||
static char* mCutNameList[1];
|
||||
static cutFunc mCutList[1];
|
||||
|
||||
private:
|
||||
/* 0x0F7C */ NPC_CLERKT_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames)
|
||||
@@ -133,8 +133,8 @@ public:
|
||||
return (fopAcM_GetParam(this) & 0xFF00) >> 8;
|
||||
}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
|
||||
static cutFunc DUSK_CONST mCutList[1];
|
||||
static char* mCutNameList[1];
|
||||
static cutFunc mCutList[1];
|
||||
|
||||
private:
|
||||
/* 0xE40 */ NPC_DOC_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
inline int getTimeHour();
|
||||
inline bool isDummyTalk();
|
||||
|
||||
static EventFn DUSK_CONST mEvtSeqList[1];
|
||||
static EventFn mEvtSeqList[1];
|
||||
|
||||
private:
|
||||
/* 0xB48 */ Z2CreatureCitizen mSound;
|
||||
|
||||
@@ -256,7 +256,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {
|
||||
@@ -294,8 +294,8 @@ public:
|
||||
u8 getSceneNo1() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
|
||||
u8 getSceneNo2() { return (fopAcM_GetParam(this) >> 16) & 0xFF; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[18];
|
||||
static cutFunc DUSK_CONST mCutList[18];
|
||||
static char* mCutNameList[18];
|
||||
static cutFunc mCutList[18];
|
||||
private:
|
||||
/* 0x0E40 */ NPC_FAIRY_HIO_CLASS* mHIO;
|
||||
/* 0x0E44 */ dCcD_Cyl mCyl;
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3,
|
||||
int param_4,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5,
|
||||
int param_6, daNpcT_evtData_c const* param_7, DUSK_CONST char* DUSK_CONST* param_8)
|
||||
int param_6, daNpcT_evtData_c const* param_7, char** param_8)
|
||||
: daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) {}
|
||||
|
||||
u8 getType() { return fopAcM_GetParam(this) & 0xFF; }
|
||||
@@ -90,8 +90,8 @@ public:
|
||||
|
||||
int getSeneNo() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
|
||||
|
||||
static DUSK_CONST char* mCutNameList[1];
|
||||
static DUSK_CONST cutFunc mCutList[1];
|
||||
static char* mCutNameList[1];
|
||||
static cutFunc mCutList[1];
|
||||
|
||||
private:
|
||||
/* 0xE40 */ NPC_FAIRY_SEIREI_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {
|
||||
@@ -96,8 +96,8 @@ public:
|
||||
s32 getNeckJointNo() { return 3; }
|
||||
s32 getBackboneJointNo() { return 1; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
|
||||
static cutFunc DUSK_CONST mCutList[1];
|
||||
static char* mCutNameList[1];
|
||||
static cutFunc mCutList[1];
|
||||
|
||||
private:
|
||||
/* 0xE40 */ NPC_GND_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -138,9 +138,9 @@ public:
|
||||
void addCarryNum() { field_0x1692++; }
|
||||
u8 getPathNoFromParam() { return home.angle.z; }
|
||||
void setGateWalk() { field_0x14D0 = 1; }
|
||||
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[12];
|
||||
static char* mEvtCutNameList[12];
|
||||
typedef BOOL (daNpc_grA_c::*cut_type)(int);
|
||||
static cut_type DUSK_CONST mEvtCutList[];
|
||||
static cut_type mEvtCutList[];
|
||||
|
||||
private:
|
||||
typedef BOOL (daNpc_grA_c::*daNpc_grA_c_Action)(void*);
|
||||
|
||||
@@ -89,8 +89,8 @@ public:
|
||||
void setPrtcl();
|
||||
void adjustShapeAngle() {}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mEvtCutNameList;
|
||||
static EventFn DUSK_CONST mEvtCutList[1];
|
||||
static char* mEvtCutNameList;
|
||||
static EventFn mEvtCutList[1];
|
||||
|
||||
private:
|
||||
/* 0xB48 */ Z2Creature mSound;
|
||||
|
||||
@@ -81,8 +81,8 @@ public:
|
||||
BOOL ECut_nodToGrz(int);
|
||||
void adjustShapeAngle() {}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[2];
|
||||
static cutFunc DUSK_CONST mEvtCutList[2];
|
||||
static char* mEvtCutNameList[2];
|
||||
static cutFunc mEvtCutList[2];
|
||||
|
||||
private:
|
||||
/* 0xB48 */ Z2Creature mSound;
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: dShopSystem_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
@@ -131,8 +131,8 @@ public:
|
||||
BOOL checkChangeJoint(int param_0) { return param_0 == JNT_HEAD; }
|
||||
BOOL checkRemoveJoint(int param_0) { return param_0 == JNT_MOUTH; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[2];
|
||||
static cutFunc DUSK_CONST mCutList[2];
|
||||
static char* mCutNameList[2];
|
||||
static cutFunc mCutList[2];
|
||||
|
||||
private:
|
||||
/* 0x0F7C */ NPC_GRM_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
|
||||
int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData,
|
||||
char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
char** i_arcNames)
|
||||
: dShopSystem_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
@@ -124,8 +124,8 @@ public:
|
||||
BOOL checkRemoveJoint(int param_1) { return param_1 == JNT_MOUTH; }
|
||||
u16 getEyeballMaterialNo() { return 1; };
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList;
|
||||
static cutFunc DUSK_CONST mCutList[1];
|
||||
static char* mCutNameList;
|
||||
static cutFunc mCutList[1];
|
||||
|
||||
private:
|
||||
/* 0x0F7C */ NPC_GRMC_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -85,8 +85,8 @@ public:
|
||||
int test(void*);
|
||||
void adjustShapeAngle() {}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[3];
|
||||
static cutFunc DUSK_CONST mEvtCutList[3];
|
||||
static char* mEvtCutNameList[3];
|
||||
static cutFunc mEvtCutList[3];
|
||||
|
||||
private:
|
||||
/* 0xB48 */ Z2Creature mSound;
|
||||
|
||||
@@ -83,8 +83,8 @@ public:
|
||||
int test(void*);
|
||||
void adjustShapeAngle() {}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mEvtCutNameList;
|
||||
static cutFunc DUSK_CONST mEvtCutList[1];
|
||||
static char* mEvtCutNameList;
|
||||
static cutFunc mEvtCutList[1];
|
||||
|
||||
private:
|
||||
/* 0xB48 */ Z2Creature mSound;
|
||||
|
||||
@@ -84,8 +84,8 @@ public:
|
||||
void setPrtcl();
|
||||
void adjustShapeAngle() {}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[2];
|
||||
static cutFunc DUSK_CONST mEvtCutList[2];
|
||||
static char* mEvtCutNameList[2];
|
||||
static cutFunc mEvtCutList[2];
|
||||
|
||||
private:
|
||||
/* 0xB48 */ Z2Creature mSound;
|
||||
|
||||
@@ -116,8 +116,8 @@ public:
|
||||
|
||||
u8 getPathNoFromParam() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[7];
|
||||
static cutFunc DUSK_CONST mEvtCutList[7];
|
||||
static char* mEvtCutNameList[7];
|
||||
static cutFunc mEvtCutList[7];
|
||||
|
||||
private:
|
||||
/* 0x0B48 */ Z2Creature mSound;
|
||||
|
||||
@@ -104,8 +104,8 @@ public:
|
||||
void setHowlingEndFlag() { field_0xe1c = 2; }
|
||||
void setHowlingFlag() { field_0xe1c = 1; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[5];
|
||||
static cutFunc DUSK_CONST mEvtCutList[5];
|
||||
static char* mEvtCutNameList[5];
|
||||
static cutFunc mEvtCutList[5];
|
||||
|
||||
private:
|
||||
/* 0xB48 */ Z2Creature mSound;
|
||||
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
daNpc_Hanjo_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6,
|
||||
daNpcT_evtData_c const* param_7, char DUSK_CONST* DUSK_CONST* param_8) :
|
||||
daNpcT_evtData_c const* param_7, char** param_8) :
|
||||
daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8)
|
||||
{}
|
||||
u16 getEyeballMaterialNo() { return 2; }
|
||||
@@ -218,9 +218,9 @@ public:
|
||||
u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; }
|
||||
|
||||
static dCcD_SrcGObjInf const mStoneCcDObjInfo;
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[6];
|
||||
static cutFunc DUSK_CONST mCutList[6];
|
||||
static dCcD_SrcSph DUSK_CONST mStoneCcDSph;
|
||||
static char* mCutNameList[6];
|
||||
static cutFunc mCutList[6];
|
||||
static dCcD_SrcSph mStoneCcDSph;
|
||||
private:
|
||||
/* 0x0E40 */ NPC_HANJO_HIO_CLASS* mpHIO;
|
||||
/* 0x0E44 */ J3DModel* mModel1;
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames)
|
||||
@@ -125,8 +125,8 @@ public:
|
||||
bool getGameStartFlag() { return mGameStartFlag; }
|
||||
void setPotBreakFlag() { mPotBreakFlag = true; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[8];
|
||||
static cutFunc DUSK_CONST mCutList[];
|
||||
static char* mCutNameList[8];
|
||||
static cutFunc mCutList[];
|
||||
|
||||
private:
|
||||
/* 0xE40 */ NPC_HOZ_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
daNpc_Jagar_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6,
|
||||
daNpcT_evtData_c const* param_7, char DUSK_CONST* DUSK_CONST* param_8) :
|
||||
daNpcT_evtData_c const* param_7, char** param_8) :
|
||||
daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8)
|
||||
{}
|
||||
u16 getEyeballMaterialNo() { return MAT_JAGA_EYEBALL; }
|
||||
@@ -223,8 +223,8 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[7];
|
||||
static cutFunc DUSK_CONST mCutList[7];
|
||||
static char* mCutNameList[7];
|
||||
static cutFunc mCutList[7];
|
||||
private:
|
||||
/* 0x0E40 */ NPC_JAGAR_HIO_CLASS* mpHIO;
|
||||
/* 0x0E44 */ dCcD_Cyl mCyl1;
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames)
|
||||
@@ -113,8 +113,8 @@ public:
|
||||
u8 getBitSW() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
|
||||
u8 getBitSW2() { return (fopAcM_GetParam(this) & 0xFF0000) >> 16; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[4];
|
||||
static int (daNpc_Kakashi_c::* DUSK_CONST mCutList[])(int);
|
||||
static char* mCutNameList[4];
|
||||
static int (daNpc_Kakashi_c::*mCutList[])(int);
|
||||
|
||||
private:
|
||||
/* 0x0E40 */ NPC_KAKASHI_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
void chgWeightLight() { mCcStts.SetWeight(0xD8); }
|
||||
BOOL pl_front_check() { return actor_front_check(daPy_getPlayerActorClass()); }
|
||||
|
||||
static EventFn DUSK_CONST mEvtSeqList[1];
|
||||
static EventFn mEvtSeqList[1];
|
||||
static daTagEscape_c* mTargetTag;
|
||||
static f32 mTargetTagDist;
|
||||
static s16 mWolfAngle;
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
void chgWeightLight() { mCcStts.SetWeight(0xD8); }
|
||||
BOOL pl_front_check() { return actor_front_check(daPy_getPlayerActorClass()); }
|
||||
|
||||
static EventFn DUSK_CONST mEvtSeqList[1];
|
||||
static EventFn mEvtSeqList[1];
|
||||
static daTagEscape_c* mTargetTag;
|
||||
static f32 mTargetTagDist;
|
||||
static s16 mWolfAngle;
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames)
|
||||
@@ -118,8 +118,8 @@ public:
|
||||
return mpMorf[0]->getModel()->getAnmMtx(5);
|
||||
}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[3];
|
||||
static int (daNpc_Kkri_c::* DUSK_CONST mCutList[])(int);
|
||||
static char* mCutNameList[3];
|
||||
static int (daNpc_Kkri_c::*mCutList[])(int);
|
||||
|
||||
private:
|
||||
/* 0xE40 */ NPC_KKRI_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
/* 0x05AC */ const daNpcT_faceMotionAnmData_c* mpFaceMotionAnmData;
|
||||
/* 0x05B0 */ const daNpcT_motionAnmData_c* mpMotionAnmData;
|
||||
/* 0x05B4 */ const daNpcT_evtData_c* mpEventData;
|
||||
/* 0x05B8 */ char DUSK_CONST* DUSK_CONST* mpArcNames;
|
||||
/* 0x05B8 */ char** mpArcNames;
|
||||
/* 0x05BC */ mDoExt_McaMorfSO* mpModelMorf[2];
|
||||
/* 0x05C4 */ Z2Creature mSound;
|
||||
/* 0x0654 */ mDoExt_bckAnm mBckAnm;
|
||||
@@ -322,8 +322,8 @@ public:
|
||||
int setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int);
|
||||
BOOL setBtpAnm(J3DAnmTexPattern*, J3DModelData*, f32, int);
|
||||
BOOL setBtkAnm(J3DAnmTextureSRTKey*, J3DModelData*, f32, int);
|
||||
int loadRes(s8 const*, char const* DUSK_CONST*);
|
||||
void deleteRes(s8 const*, char const* DUSK_CONST*);
|
||||
int loadRes(s8 const*, char const**);
|
||||
void deleteRes(s8 const*, char const**);
|
||||
int execute();
|
||||
int draw(int, int, f32, GXColorS10*, f32, int, int, int);
|
||||
void setEnvTevColor();
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
daNpcT_motionAnmData_c const* param_1,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_2, int param_3,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_4, int param_5,
|
||||
daNpcT_evtData_c const* param_6, char DUSK_CONST* DUSK_CONST* param_7)
|
||||
daNpcT_evtData_c const* param_6, char** param_7)
|
||||
: mpFaceMotionAnmData(param_0), mpMotionAnmData(param_1), mFaceMotionSeqMngr(param_2, param_3),
|
||||
mMotionSeqMngr(param_4, param_5), mpEventData(param_6), mpArcNames(param_7)
|
||||
{
|
||||
@@ -413,8 +413,8 @@ public:
|
||||
virtual bool afterSetMotionAnm(int, int, f32, int);
|
||||
|
||||
static const dCcD_SrcGObjInf mCcDObjData;
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[21];
|
||||
static cutFunc DUSK_CONST mCutList[21];
|
||||
static char* mCutNameList[21];
|
||||
static cutFunc mCutList[21];
|
||||
static dCcD_SrcCyl mCcDCyl;
|
||||
static dCcD_SrcSph mCcDSph;
|
||||
static s16 mSrchName;
|
||||
|
||||
@@ -75,13 +75,13 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[1];
|
||||
static cutFunc DUSK_CONST mCutList[1];
|
||||
static char* mCutNameList[1];
|
||||
static cutFunc mCutList[1];
|
||||
|
||||
private:
|
||||
/* 0xE40 */ NPC_KNJ_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
|
||||
int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData,
|
||||
char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
@@ -120,8 +120,8 @@ public:
|
||||
virtual void changeAnm(int*, int*);
|
||||
virtual void changeBck(int*, int*);
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[11];
|
||||
static cutFunc DUSK_CONST mCutList[11];
|
||||
static char* mCutNameList[11];
|
||||
static cutFunc mCutList[11];
|
||||
|
||||
u32 getFlowNodeNo() {
|
||||
u16 nodeNo = home.angle.x;
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData,
|
||||
int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData,
|
||||
char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
@@ -150,8 +150,8 @@ public:
|
||||
s32 getBackboneJointNo() { return mType == 2 ? ZRCB_JNT_BACKBONE1 : KOLINB_JNT_BACKBONE1; }
|
||||
s32 getNeckJointNo() { return mType == 2 ? ZRCB_JNT_NECK : KOLINB_JNT_NECK; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[7];
|
||||
static cutFunc DUSK_CONST mCutList[7];
|
||||
static char* mCutNameList[7];
|
||||
static cutFunc mCutList[7];
|
||||
|
||||
u32 getFlowNodeNo() {
|
||||
u16 nodeNo = home.angle.x;
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3,
|
||||
int param_4,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5,
|
||||
int param_6, daNpcT_evtData_c const* param_7, char DUSK_CONST* DUSK_CONST* param_8)
|
||||
int param_6, daNpcT_evtData_c const* param_7, char** param_8)
|
||||
: daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) {}
|
||||
u16 getEyeballMaterialNo() { return 2; }
|
||||
s32 getHeadJointNo() { return 4; }
|
||||
@@ -123,8 +123,8 @@ public:
|
||||
return nodeNo;
|
||||
}
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[2];
|
||||
static cutFunc DUSK_CONST mCutList[2];
|
||||
static char* mCutNameList[2];
|
||||
static cutFunc mCutList[2];
|
||||
|
||||
private:
|
||||
/* 0xE40 */ NPC_KYURY_HIO_CLASS* mpHIO;
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
@@ -100,8 +100,8 @@ public:
|
||||
s32 getFootRJointNo() { return 32; }
|
||||
BOOL chkXYItems() { return TRUE; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[4];
|
||||
static cutFunc DUSK_CONST mCutList[4];
|
||||
static char* mCutNameList[4];
|
||||
static cutFunc mCutList[4];
|
||||
|
||||
int getFlowNodeNo() {
|
||||
u16 nodeNo = home.angle.x;
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
|
||||
int i_faceMotionStepNum,
|
||||
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
|
||||
daNpcT_evtData_c const* i_evtData, char DUSK_CONST* DUSK_CONST* i_arcNames)
|
||||
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
|
||||
: daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
|
||||
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
|
||||
i_arcNames) {}
|
||||
@@ -111,8 +111,8 @@ public:
|
||||
}
|
||||
u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; }
|
||||
|
||||
static char DUSK_CONST* DUSK_CONST mCutNameList[8];
|
||||
static cutFunc DUSK_CONST mCutList[8];
|
||||
static char* mCutNameList[8];
|
||||
static cutFunc mCutList[8];
|
||||
|
||||
private:
|
||||
/* 0xE40 */ mDoExt_McaMorfSO* mpBowlMorf;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user