Compare commits

..

77 Commits

Author SHA1 Message Date
TakaRikka a53b363905 Merge branch 'main' of ssh://github.com/TwilitRealm/dusklight into rando-mod 2026-07-30 05:45:18 -07:00
Luke Street 4504e5009f Mods: Add toasts to UiService (#2252) 2026-07-30 00:28:08 -06:00
Luke Street 7305ef09b9 Mods: WindowService, log wrappers, external rendering (#2251) 2026-07-30 00:24:24 -06:00
Irastris 48de4bcb08 Gradle build revisions (#2229)
* Gradle build revisions

* Update platforms/android/README.md
2026-07-28 23:47:13 -06:00
Pieter-Jan Briers 0cf130d834 symgen: specify EXPECTED_HASH to cmake to avoid redownload (#2244) 2026-07-28 23:39:59 -06:00
Luke Street 38459a97b3 Fix compile error 2026-07-28 23:38:49 -06:00
Jack Wines b6b297f1ac Nix: add miniz and fix submodules (#2220)
* nix: add miniz to dependencies

* nix: enable parallel building

* amend! nix: add miniz to dependencies

nix: add miniz to dependencies

* nix: remove enableParellelBulding, needSubmodules

The flake now includes submodules in inputs, so we no longer
need to throw an error when they aren't there.

EnableParallelBuilding was added in error, cmake already compiles in
parallel when under nix.
2026-07-28 23:25:43 -06:00
Giorgio Mendieta 4d688a8507 Draw shadows before translucent textures (#2206)
* Implement smooth fadeout of dynamic shadows

* Add edge fade out configuration for dynamic shadows

* Tweak default and max values for edge fade out

* Add stage hook for deferred composite after opaque scene draws

* Bump mod version
2026-07-28 23:25:15 -06:00
Luke Street 64789aa5fc Update symgen (fixes AppImage builds) 2026-07-28 19:27:35 -06:00
Luke Street f0e6b88cfd GCC mod section fix 2026-07-28 19:26:53 -06:00
TakaRikka fae9add351 generator / basic mod structure building 2026-07-27 22:33:03 -07:00
TakaRikka 95608438c1 Merge pull request #2227 from TwilitRealm/jpn
japanese gamecube version support
2026-07-19 01:20:07 -07:00
TakaRikka 3e343acc86 revert, e_pm jpn logic change TODO later 2026-07-18 22:09:32 -07:00
TakaRikka 9696c12563 couple more fixes, revert e_pm for now 2026-07-18 21:17:29 -07:00
TakaRikka d3e05a4f37 pr comments again 2026-07-18 19:39:24 -07:00
TakaRikka 27c9719abc pr comments 2026-07-18 18:07:49 -07:00
Luke Street 8caab1a6ba Implement iOS hook prepatching & improve MSVC PTMF support (#2222) 2026-07-17 22:35:37 -06:00
TakaRikka e3075520e7 convert jpn logic changes to runtime checks 2026-07-17 20:35:15 -07:00
TakaRikka ce386d8dbd convert jpn ui/text changes to runtime checks 2026-07-17 18:12:28 -07:00
TakaRikka 1654d256ec mant/flower jp offsets 2026-07-16 20:06:37 -07:00
TakaRikka 241927b489 fix jp name screen 2026-07-16 19:53:47 -07:00
TakaRikka 8051679c96 fix jp font rendering
Co-Authored-By: pengin <2162454+pengin@users.noreply.github.com>
2026-07-16 17:23:51 -07:00
TakaRikka 6058a0c597 Merge branch 'main' of ssh://github.com/TwilitRealm/dusklight into jpn 2026-07-16 15:09:23 -07:00
Luke Street 1bae8a5e6a DuskDsp: Fix streamed audio position tracking 2026-07-16 00:10:07 -06:00
Luke Street ec51ba298b Update docs/modding.md 2026-07-15 13:07:22 -06:00
Luke Street 76b56cd8b8 Forgot to stage this 2026-07-15 12:46:57 -06:00
Luke Street e9ebb174f1 Mod SDK: Fix Windows ARM detection; ignore dotfiles in dir copies 2026-07-15 12:44:27 -06:00
Luke Street 12261dbc49 Update aurora 2026-07-15 12:04:41 -06:00
Luke Street 5db55c508b Mod API: Rename dusk::mods -> mods 2026-07-15 12:04:26 -06:00
Luke Street 5ea7f7ca9a Mod SDK: Auto-download link stub for self-contained mods 2026-07-15 12:04:00 -06:00
Luke Street 0f2a00cd1f Mods: Embed symdb in linked executable (#2216)
* Mods: Embed symdb in linked executable

* Update to symgen v1.2.3
2026-07-15 00:26:34 -06:00
Luke Street adfb830b4d hook: Fix thunk re-resolution on Windows 2026-07-15 00:08:19 -06:00
Luke Street a2fd82d18b Android: Copy libc++_shared.so in stage-jni-libs.sh 2026-07-14 22:52:13 -06:00
Luke Street 30def245f0 Mods: Reject old layout mods & improve errors 2026-07-14 20:32:01 -06:00
Luke Street a6f059827b Game ABI / headers refactoring (#2215)
* Game ABI / headers refactoring

* Delete dusk/imgui.h
2026-07-14 19:24:08 -06:00
Luke Street 49a3c9e2ac Merge pull request #2211 from encounter/modmeta
Mod API: Refactor mods to have static metadata for parsing
2026-07-14 17:48:42 -06:00
Luke Street eed14acdc6 Annotate all data with DUSK_GAME_DATA (#2214)
The hope of auto-importing data via lld MinGW
+ pseudo_reloc is now dead thanks to ARM64,
so I just wrote a script to go annotate every
exported data symbol in the game instead.
2026-07-14 13:49:21 -06:00
Luke Street a95bc76237 Mods: Remove -lldmingw + pseudo_reloc
It turns out this approach can't work on
ARM64 Windows due to the relocation model,
so we can simplify and just remove it
entirely.

Separately, I will make a commit tagging
all game data as DUSK_GAME_DATA, so things
work uniformly across cl/clang-cl and x64/
arm64.
2026-07-14 11:10:49 -06:00
Luke Street f000ccce0b Mod API: Resolve thunks recursively (Windows ARM64 fix) 2026-07-14 11:10:49 -06:00
Luke Street 8471fa0107 Android: Bundle in-tree mods into the APK 2026-07-14 11:10:49 -06:00
Luke Street d5fcd79306 CI: Install & package the symbol manifest on Windows/Linux 2026-07-14 11:10:49 -06:00
Luke Street 26d22d414a Mods: Enable Windows ARM64 mod linking 2026-07-14 11:00:04 -06:00
Luke Street f14278cec8 CMake: Remove release preset
No longer supporting LTO with modding.
2026-07-14 11:00:04 -06:00
SuperDude88 f5d30a886d FPS Counter Fix (#2207)
* FPS Counter Fix

I broke it in #2198 oops

* Run clang-format
2026-07-13 23:07:02 -06:00
Luke Street dfc3077333 CI: Add sdk/ link stubs in build artifacts 2026-07-13 20:57:11 -06:00
Luke Street 1bd8682855 Mods: Curate exports and generate link stubs
`symgen exports` replaces -export_dynamic on Apple and curates
Android's dynamic symbols with a version script. `symgen stub` then
emits sdk/stub-{macos,ios,tvos}-<arch>, sdk/stub-android-<arch>.so,
and sdk/windows-<arch>.lib.
2026-07-13 20:57:11 -06:00
Luke Street d2cdbf0a83 Mods: Rework mod linking
Apple: mods are now MH_BUNDLE (.so) linked with -bundle_loader,
replacing the deprecated (on iOS) -undefined dynamic_lookup.

Windows: clang-cl mods link dusklight.exe directly; lld's mingw driver
synthesizes imports from the export table. cl still requires the
import library.
2026-07-13 20:42:57 -06:00
Luke Street 700bbf0a5a Mod API: Move dylibs to libs/{platform}; services import latest minor versions 2026-07-13 20:42:35 -06:00
Luke Street cdb36e9c42 Mod API: __attribute__((used)) on clang-cl 2026-07-13 20:42:35 -06:00
Luke Street cca104584e Mod API: Aggregate-initialize import/export records
Starting with VS 18 / cl 14.51, MSVC's constant evaluator
rejects a pointer-to-member in a constant initializer that also
contains any computed data, a consteval call or even a copy of a
constexpr object (C2127).

Hook records are now aggregate-initialized from literals only: the
computed name bytes (vtable symbol + display name) are baked into
char... template arguments and sizes/kinds are spelled inline.
2026-07-13 20:42:35 -06:00
Luke Street 9687a9d95a Mod API: Static import/export/hook metadata & resolution 2026-07-13 00:53:37 -06:00
Luke Street 8cc4ce94b8 Mods: Don't use RTLD_DEEPBIND with ASAN 2026-07-12 20:14:12 -06:00
SuperDude88 641ac5877e Fix Overlapping Overlays (#2198)
Still overlaps while the pipeline building overlay is fading out
2026-07-12 16:12:59 -06:00
Giorgio Mendieta da38a1d2d3 Smooth fadeout for dynamic shadows (#2203)
* Implement smooth fadeout of dynamic shadows

* Add edge fade out configuration for dynamic shadows
2026-07-12 16:11:41 -06:00
jdflyer 6a79bf1e79 Add command line arguments for --develop, --load-save, and --stage (#2150)
* Add command line arguments for --develop, --load-save, and --stage

* Include sstream so clang stops crying :(

* Put stage load parsing in main, better load logic
2026-07-11 12:16:38 -06:00
Irastris 20f786a43e HUD scaling fixes (#2192)
* Immediately apply hudScale to the dpad and rupee panes

* Translate the dpad to follow along with the minimap scale
2026-07-10 21:41:36 -06:00
Josh Smith 4c2bb26df7 Add missed mirror-mode message overrides (#2108)
PR #1704 hand-curated mirrorMsgOverrides from in-game observation, which left
gaps. Auditing the GC BMG data (res/Msgus, GZ2E01) for every message carrying a
Wii redirect turned up 13 more that belong in the table:

- Two Kakariko signposts (0x1f41, 0x1f42) whose arrow/name layout is mirrored on
  Wii but were never added.
- Five dialogue/journal lines whose direction words flip GC vs Wii, including
  Midna's "Eldin Province to the east/west" line reported in the PR thread.
- Six shop browse-arrow lines in the same class as entries the original pass
  already included.

Each added id appears with a Wii redirect in exactly one BMG group, so the
id-only lookup resolves unambiguously. 0x1b79 was deliberately left out: it
maps to different Wii variants in zel_01 (shop) and zel_07 (fishing controls),
which this table can't disambiguate without becoming group-aware.
2026-07-10 21:36:40 -06:00
Luke Street 229c162580 Merge pull request #2191 from Irastris/fix-bloom-transitions
Add deltatime to d_kankyo bloom/fog transitions
2026-07-10 21:35:27 -06:00
Luke Street 6d4a7e55e9 Merge pull request #2193 from encounter/mods-gfx
Mod API: `gfx` service; GTAO & dynamic shadow demo mods
2026-07-10 21:25:16 -06:00
jdflyer b6e3c50d88 Mod SDK: Allow building mods with no sources (#2195) 2026-07-10 21:02:28 -06:00
SuperDude88 287ee6b2ee Small Speedrun Mode Cleanups (#2179)
* Deduplicate Speedrun Overrides

Avoids issues where only one is updated + makes sense organizationally

* Move restore_from_speedrun_mode

I think it makes more sense to have this in the same place the overrides are set

* Camelcase nit

---------

Co-authored-by: Irastris <irastris15@gmail.com>
2026-07-10 22:00:52 -04:00
Luke Street 7113584632 SlotMap abstraction & log fix 2026-07-10 17:42:36 -06:00
Luke Street 867ec7fbab Forward WebGPU exports through Dusklight 2026-07-10 09:42:25 -06:00
Luke Street 157bbfb4c9 Mark full game targets as ABI exporters 2026-07-10 02:04:59 -06:00
Luke Street 2fcbebcd51 Limit Dawn mod linkage to Windows 2026-07-10 01:52:17 -06:00
Luke Street 50565b37fc Fix mod demo CI linkage and signing 2026-07-10 01:45:05 -06:00
Luke Street 84e7394d5b Dynamic shadows demo mod 2026-07-10 01:10:23 -06:00
Luke Street 409b60836b Add dusk::ui::append_text 2026-07-10 01:10:23 -06:00
Luke Street 75a249f3e1 GTAO demo mod 2026-07-10 01:10:23 -06:00
Luke Street d9a978f21f Mod API: gfx service 2026-07-09 23:08:59 -06:00
Irastris 3585ab8a59 Add deltatime to bloom/fog transitions 2026-07-09 21:05:33 -04:00
Luke Street 7df07c6904 Mod API: Camera service 2026-07-09 18:54:44 -06:00
TakaRikka 1a7c853d9b better disc info display 2026-05-16 21:06:55 -07:00
TakaRikka 9a3428983b build fix / verif 2026-05-16 19:37:46 -07:00
TakaRikka 15a846478b Merge branch 'main' of ssh://github.com/TwilitRealm/dusklight into jpn 2026-05-16 19:18:06 -07:00
TakaRikka 00704ad838 mDoExt font region handling 2026-04-28 03:43:52 -07:00
TakaRikka f52c715364 convert d_name literals to hex + enable version 2026-04-28 02:53:36 -07:00
1293 changed files with 73861 additions and 8030 deletions
+13 -3
View File
@@ -80,6 +80,7 @@ jobs:
path: | path: |
build/install/Dusklight-*.AppImage build/install/Dusklight-*.AppImage
build/install/debug.tar.* build/install/debug.tar.*
build/install/sdk/
build-apple: build-apple:
name: Build Apple (${{matrix.name}}) name: Build Apple (${{matrix.name}})
@@ -148,6 +149,7 @@ jobs:
path: | path: |
build/install/Dusklight.app build/install/Dusklight.app
build/install/debug.tar.* build/install/debug.tar.*
build/install/sdk/
build-android: build-android:
name: Build Android (${{matrix.name}}) name: Build Android (${{matrix.name}})
@@ -203,18 +205,24 @@ jobs:
- name: Build native library - name: Build native library
run: cmake --build --preset ${{matrix.preset}} --target dusklight run: cmake --build --preset ${{matrix.preset}} --target dusklight
- name: Stage stripped JNI library - name: Build bundled mods
run: ANDROID_STAGE_ABIS="${{matrix.abi}}" platforms/android/scripts/stage-jni-libs.sh run: cmake --build --preset ${{matrix.preset}} --target dusklight_mods
- name: Build APK - name: Build APK
working-directory: platforms/android working-directory: platforms/android
run: ./gradlew :app:assembleRelease --rerun-tasks run: ./gradlew :app:assembleRelease --rerun-tasks
- name: Stage artifacts
run: |
mkdir -p upload/sdk
cp build/*/stub-android-*.so upload/sdk/
cp platforms/android/app/build/outputs/apk/release/app-${{matrix.abi}}-release-unsigned.apk upload/
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7
with: with:
name: dusklight-${{env.DUSK_VERSION}}-android-${{matrix.artifact_arch}} name: dusklight-${{env.DUSK_VERSION}}-android-${{matrix.artifact_arch}}
path: platforms/android/app/build/outputs/apk/release/app-${{matrix.abi}}-release-unsigned.apk path: upload/
build-windows: build-windows:
name: Build Windows (${{matrix.name}}) name: Build Windows (${{matrix.name}})
@@ -280,4 +288,6 @@ jobs:
build/install/*.exe build/install/*.exe
build/install/*.dll build/install/*.dll
build/install/res/ build/install/res/
build/install/mods/
build/install/debug.7z build/install/debug.7z
build/install/sdk/
+66 -14
View File
@@ -91,6 +91,35 @@ option(DUSK_PACKAGE_INSTALL "Install Dusklight with a Linux-native file structur
option(DUSK_GFX_DEBUG_GROUPS "Report debug groups to the native graphics API" ${DUSK_GFX_DEBUG_GROUPS_DEFAULT}) option(DUSK_GFX_DEBUG_GROUPS "Report debug groups to the native graphics API" ${DUSK_GFX_DEBUG_GROUPS_DEFAULT})
option(DUSK_ENABLE_CODE_MODS "Enable code mods" OFF) option(DUSK_ENABLE_CODE_MODS "Enable code mods" OFF)
set(DUSK_HAS_FUNCHOOK OFF)
if (DUSK_ENABLE_CODE_MODS AND (NOT APPLE OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
set(DUSK_HAS_FUNCHOOK ON)
endif ()
set(DUSK_HAS_FUNCHOOK ${DUSK_HAS_FUNCHOOK} CACHE INTERNAL "Enable funchook" FORCE)
set(_target_architectures ${CMAKE_OSX_ARCHITECTURES})
if (NOT _target_architectures)
set(_target_architectures ${CMAKE_SYSTEM_PROCESSOR})
endif ()
list(LENGTH _target_architectures _target_arch_count)
set(DUSK_HAS_PREPATCH OFF)
if (DUSK_ENABLE_CODE_MODS AND APPLE AND _target_arch_count EQUAL 1)
list(GET _target_architectures 0 _target_arch)
if (_target_arch STREQUAL "arm64")
set(DUSK_HAS_PREPATCH ON)
endif ()
endif ()
set(DUSK_HAS_PREPATCH ${DUSK_HAS_PREPATCH} CACHE INTERNAL "Enable symgen prepatch support" FORCE)
if (DUSK_ENABLE_CODE_MODS AND CMAKE_SYSTEM_NAME MATCHES "^(iOS|tvOS)$")
list(LENGTH CMAKE_OSX_ARCHITECTURES _mobile_arch_count)
if (NOT _mobile_arch_count EQUAL 1 OR NOT CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
message(FATAL_ERROR
"iOS/tvOS code mods require a single arm64 architecture; got "
"CMAKE_OSX_ARCHITECTURES='${CMAKE_OSX_ARCHITECTURES}'")
endif ()
endif ()
# Edit & Continue # Edit & Continue
if (MSVC) if (MSVC)
if ("${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}" STREQUAL "" AND CMAKE_BUILD_TYPE STREQUAL "Debug" if ("${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}" STREQUAL "" AND CMAKE_BUILD_TYPE STREQUAL "Debug"
@@ -175,8 +204,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL Linux)
set(CMAKE_BUILD_RPATH "$ORIGIN") set(CMAKE_BUILD_RPATH "$ORIGIN")
elseif (APPLE) elseif (APPLE)
add_compile_options(-Wno-declaration-after-statement -Wno-non-pod-varargs) add_compile_options(-Wno-declaration-after-statement -Wno-non-pod-varargs)
set(CMAKE_INSTALL_RPATH "$ORIGIN") set(CMAKE_INSTALL_RPATH "@loader_path")
set(CMAKE_BUILD_RPATH "$ORIGIN") set(CMAKE_BUILD_RPATH "@loader_path")
elseif (MSVC) elseif (MSVC)
add_compile_options( add_compile_options(
$<$<COMPILE_LANGUAGE:C,CXX>:/bigobj> $<$<COMPILE_LANGUAGE:C,CXX>:/bigobj>
@@ -219,7 +248,7 @@ FetchContent_Declare(miniz
) )
set(_fetch_content_deps cxxopts json miniz) set(_fetch_content_deps cxxopts json miniz)
if (DUSK_ENABLE_CODE_MODS) if (DUSK_HAS_FUNCHOOK)
message(STATUS "dusklight: Fetching funchook") message(STATUS "dusklight: Fetching funchook")
# cmake/PatchFunchook.cmake patches funchook's cmake/capstone.cmake.in to inject a # cmake/PatchFunchook.cmake patches funchook's cmake/capstone.cmake.in to inject a
# PATCH_COMMAND into capstone's inner ExternalProject. That PATCH_COMMAND runs # PATCH_COMMAND into capstone's inner ExternalProject. That PATCH_COMMAND runs
@@ -272,10 +301,10 @@ if (DUSK_ENABLE_SENTRY_NATIVE)
) )
if (NOT sentry_native_POPULATED) if (NOT sentry_native_POPULATED)
FetchContent_Populate(sentry_native) FetchContent_Populate(sentry_native)
set(_dusk_skip_install_rules ${CMAKE_SKIP_INSTALL_RULES}) set(_skip_install_rules ${CMAKE_SKIP_INSTALL_RULES})
set(CMAKE_SKIP_INSTALL_RULES ON) set(CMAKE_SKIP_INSTALL_RULES ON)
add_subdirectory(${sentry_native_SOURCE_DIR} ${sentry_native_BINARY_DIR} EXCLUDE_FROM_ALL) add_subdirectory(${sentry_native_SOURCE_DIR} ${sentry_native_BINARY_DIR} EXCLUDE_FROM_ALL)
set(CMAKE_SKIP_INSTALL_RULES ${_dusk_skip_install_rules}) set(CMAKE_SKIP_INSTALL_RULES ${_skip_install_rules})
endif () endif ()
endif () endif ()
@@ -304,10 +333,11 @@ source_group("dusklight" FILES ${DUSK_FILES} ${DUSK_HTTP_BACKEND_FILES})
include(cmake/GameABIConfig.cmake) include(cmake/GameABIConfig.cmake)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
set(GAME_COMPILE_DEFS DUSK_BUILDING_GAME=1)
set(GAME_LIBS aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd 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 aurora::card freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json TracyClient fmt::fmt
Threads::Threads zstd::libzstd dusklight_game_headers) Threads::Threads zstd::libzstd dusklight_game_headers)
if (DUSK_ENABLE_CODE_MODS) if (DUSK_HAS_FUNCHOOK)
list(APPEND GAME_LIBS funchook-static) list(APPEND GAME_LIBS funchook-static)
endif () endif ()
@@ -380,6 +410,9 @@ endif ()
if (DUSK_ENABLE_CODE_MODS) if (DUSK_ENABLE_CODE_MODS)
list(APPEND GAME_COMPILE_DEFS DUSK_CODE_MODS=1) list(APPEND GAME_COMPILE_DEFS DUSK_CODE_MODS=1)
endif () endif ()
list(APPEND GAME_COMPILE_DEFS
DUSK_HAS_FUNCHOOK=$<BOOL:${DUSK_HAS_FUNCHOOK}>
DUSK_HAS_PREPATCH=$<BOOL:${DUSK_HAS_PREPATCH}>)
if (DUSK_PACKAGE_INSTALL) if (DUSK_PACKAGE_INSTALL)
include(GNUInstallDirs) include(GNUInstallDirs)
@@ -472,27 +505,40 @@ if (MSVC)
else () else ()
target_link_options(dusklight PRIVATE /FUNCTIONPADMIN /OPT:NOICF) target_link_options(dusklight PRIVATE /FUNCTIONPADMIN /OPT:NOICF)
endif () endif ()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") elseif (CMAKE_CXX_COMPILER_ID MATCHES "^(AppleClang|Clang)$")
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64") if (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64")
set(DUSK_PATCHABLE_ENTRY_FLAG $<$<COMPILE_LANGUAGE:C,CXX>:-fpatchable-function-entry=2,1>) set(DUSK_PATCHABLE_ENTRY_FLAG $<$<COMPILE_LANGUAGE:C,CXX>:-fpatchable-function-entry=2,1>)
else () else ()
set(DUSK_PATCHABLE_ENTRY_FLAG $<$<COMPILE_LANGUAGE:C,CXX>:-fpatchable-function-entry=10,5>) set(DUSK_PATCHABLE_ENTRY_FLAG $<$<COMPILE_LANGUAGE:C,CXX>:-fpatchable-function-entry=10,5>)
endif () endif ()
endif () endif ()
if (DEFINED DUSK_PATCHABLE_ENTRY_FLAG) if (DEFINED DUSK_PATCHABLE_ENTRY_FLAG)
target_compile_options(dusklight PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG}) target_compile_options(dusklight PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG})
foreach(jsystem_lib IN LISTS JSYSTEM_LIBRARIES) foreach(jsystem_lib IN LISTS JSYSTEM_LIBRARIES)
target_compile_options(${jsystem_lib} PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG}) target_compile_options(${jsystem_lib} PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG})
endforeach() endforeach()
foreach(_sdk_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx
aurora_os aurora_pad aurora_si aurora_vi)
if (TARGET ${_sdk_lib})
get_target_property(_sdk_lib_imported ${_sdk_lib} IMPORTED)
if (NOT _sdk_lib_imported)
target_compile_options(${_sdk_lib} PRIVATE ${DUSK_PATCHABLE_ENTRY_FLAG})
endif ()
endif ()
endforeach ()
endif () endif ()
if (WIN32) if (WIN32)
target_link_libraries(dusklight PRIVATE Psapi) target_link_libraries(dusklight PRIVATE Psapi)
endif () endif ()
if (APPLE) if (APPLE)
# Mods resolve game symbols from the executable at dlopen time. include(cmake/AppleExports.cmake)
target_link_options(dusklight PRIVATE -Wl,-export_dynamic) setup_apple_exports(dusklight)
elseif (UNIX AND NOT ANDROID) elseif (ANDROID)
include(cmake/AndroidExports.cmake)
setup_android_exports(dusklight)
elseif (UNIX)
target_link_options(dusklight PRIVATE -rdynamic) target_link_options(dusklight PRIVATE -rdynamic)
endif () endif ()
@@ -515,6 +561,8 @@ endif ()
if (CMAKE_SYSTEM_NAME STREQUAL Linux) if (CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_options(dusklight PRIVATE "-Wl,--build-id=sha1") target_link_options(dusklight PRIVATE "-Wl,--build-id=sha1")
target_link_libraries(dusklight PRIVATE dl) target_link_libraries(dusklight PRIVATE dl)
elseif (ANDROID)
target_link_options(dusklight PRIVATE "-Wl,--build-id=sha1")
endif () endif ()
if (NOT APPLE) if (NOT APPLE)
@@ -559,7 +607,11 @@ include(cmake/ModSDK.cmake)
if (DUSK_ENABLE_CODE_MODS AND CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (DUSK_ENABLE_CODE_MODS AND CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
add_custom_target(dusklight_mods) # Aggregate target for all in-tree mods add_custom_target(dusklight_mods) # Aggregate target for all in-tree mods
add_subdirectory(tools/mod_template) add_subdirectory(mods/template_mod)
add_subdirectory(mods/ao_mod)
add_subdirectory(mods/shadow_mod)
add_subdirectory(mods/window_demo)
add_subdirectory(mods/randomizer)
endif () endif ()
if (APPLE) if (APPLE)
@@ -604,13 +656,13 @@ if (APPLE)
list(APPEND _apple_bundle_properties list(APPEND _apple_bundle_properties
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${DUSK_ENTITLEMENTS}) XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${DUSK_ENTITLEMENTS})
endif () endif ()
if (NOT IOS AND NOT TVOS) if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
list(APPEND _apple_bundle_properties list(APPEND _apple_bundle_properties
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "YES") XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME "YES")
endif () endif ()
set_target_properties(dusklight PROPERTIES ${_apple_bundle_properties}) set_target_properties(dusklight PROPERTIES ${_apple_bundle_properties})
if (NOT IOS AND NOT TVOS AND NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode") if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
set(_sign_nested_commands) set(_sign_nested_commands)
if (TARGET crashpad_handler) if (TARGET crashpad_handler)
list(APPEND _sign_nested_commands list(APPEND _sign_nested_commands
@@ -627,7 +679,7 @@ if (APPLE)
endif () endif ()
endif () endif ()
if (APPLE AND NOT IOS AND NOT TVOS) if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
find_library(APPKIT_FRAMEWORK AppKit REQUIRED) find_library(APPKIT_FRAMEWORK AppKit REQUIRED)
target_sources(dusklight PRIVATE src/dusk/file_select_macos.mm) 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) set_source_files_properties(src/dusk/file_select_macos.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
+20 -21
View File
@@ -22,18 +22,6 @@
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreadedDLL" "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", "name": "ci",
"hidden": true, "hidden": true,
@@ -208,17 +196,13 @@
{ {
"name": "windows-arm64-msvc", "name": "windows-arm64-msvc",
"displayName": "Windows ARM64 (MSVC)", "displayName": "Windows ARM64 (MSVC)",
"generator": "Ninja", "inherits": [
"binaryDir": "${sourceDir}/build/${presetName}", "windows-msvc"
],
"architecture": { "architecture": {
"value": "arm64", "value": "arm64",
"strategy": "external" "strategy": "external"
}, },
"cacheVariables": {
"CMAKE_C_COMPILER": "cl",
"CMAKE_CXX_COMPILER": "cl",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install"
},
"vendor": { "vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": { "microsoft.com/VisualStudioSettings/CMake/1.0": {
"hostOS": [ "hostOS": [
@@ -330,11 +314,19 @@
"type": "BOOL", "type": "BOOL",
"value": false "value": false
}, },
"ENABLE_VISIBILITY": {
"type": "BOOL",
"value": true
},
"Rust_CARGO_TARGET": "aarch64-apple-ios", "Rust_CARGO_TARGET": "aarch64-apple-ios",
"BUILD_SHARED_LIBS": { "BUILD_SHARED_LIBS": {
"type": "BOOL", "type": "BOOL",
"value": false "value": false
}, },
"DUSK_ENABLE_CODE_MODS": {
"type": "BOOL",
"value": true
},
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": { "CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
"type": "BOOL", "type": "BOOL",
"value": true "value": true
@@ -370,12 +362,20 @@
"type": "BOOL", "type": "BOOL",
"value": false "value": false
}, },
"ENABLE_VISIBILITY": {
"type": "BOOL",
"value": true
},
"Rust_CARGO_TARGET": "aarch64-apple-tvos", "Rust_CARGO_TARGET": "aarch64-apple-tvos",
"Rust_TOOLCHAIN": "nightly", "Rust_TOOLCHAIN": "nightly",
"BUILD_SHARED_LIBS": { "BUILD_SHARED_LIBS": {
"type": "BOOL", "type": "BOOL",
"value": false "value": false
}, },
"DUSK_ENABLE_CODE_MODS": {
"type": "BOOL",
"value": true
},
"CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": { "CMAKE_DISABLE_FIND_PACKAGE_PkgConfig": {
"type": "BOOL", "type": "BOOL",
"value": true "value": true
@@ -445,8 +445,7 @@
"hidden": true, "hidden": true,
"inherits": [ "inherits": [
"android-base", "android-base",
"ci", "ci"
"release"
], ],
"cacheVariables": { "cacheVariables": {
"DUSK_ENABLE_SENTRY_NATIVE": { "DUSK_ENABLE_SENTRY_NATIVE": {
+1 -1
View File
@@ -26,7 +26,7 @@ It aims to be as accurate as possible to the original while also providing new o
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 `.rvz` to save space. 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 `.rvz` to save space.
Currently, only the GameCube USA and EUR releases are supported. Support for other versions of the game is planned in the future. Currently, only the GameCube releases are supported. Support for other versions of the game is planned in the future.
### 2. Install Dusklight ### 2. Install Dusklight
+63
View File
@@ -0,0 +1,63 @@
include_guard(GLOBAL)
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
# Android mod linking: symgen scans and filters the game's exports, generating a version script used for the executable
# link step, and generates a shared object stub that mods can link against without having to build the whole game.
function(setup_android_exports target)
include("${_dir}/SymbolManifest.cmake")
ensure_symgen(TRUE)
add_dependencies(${target} symgen)
set(_rsp_lines "$<TARGET_OBJECTS:${target}>")
foreach (_lib IN LISTS JSYSTEM_LIBRARIES)
list(APPEND _rsp_lines "$<TARGET_FILE:${_lib}>")
endforeach ()
list(JOIN _rsp_lines "\n" _rsp_content)
set(_rsp "${CMAKE_BINARY_DIR}/dusklight_exports_input.rsp")
file(GENERATE OUTPUT "${_rsp}" CONTENT "${_rsp_content}")
set(_sdk_args)
foreach (_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx
aurora_os aurora_pad aurora_si aurora_vi)
if (TARGET ${_lib})
list(APPEND _sdk_args --sdk-lib "$<TARGET_FILE:${_lib}>")
endif ()
endforeach ()
if (TARGET dawn::webgpu_dawn)
get_target_property(_dawn_type dawn::webgpu_dawn TYPE)
if (_dawn_type STREQUAL "STATIC_LIBRARY")
list(APPEND _sdk_args --sdk-lib "$<TARGET_FILE:dawn::webgpu_dawn>")
endif ()
endif ()
set(_vscript "${CMAKE_BINARY_DIR}/dusklight_exports.ver")
add_custom_command(TARGET ${target} PRE_LINK
COMMAND "${SYMGEN_EXE}" exports
"@${_rsp}"
--out "${_vscript}"
--format version-script
--exclude cmake_pch
--exclude miniz
--exclude asan_options
--exclude src/dusk
# Resolved from the Java side; the SDL ones live in the statically-linked
# SDL archive, outside the provenance scan.
--extra-sym JNI_OnLoad
--extra-sym SDL_main
--extra-sym "Java_*"
${_sdk_args}
COMMENT "Generating dusklight exports"
VERBATIM)
target_link_options(${target} PRIVATE "-Wl,--version-script=${_vscript}")
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _arch)
set(_stub "${CMAKE_BINARY_DIR}/stub-android-${_arch}.so")
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${SYMGEN_EXE}" stub -f elf "$<TARGET_FILE:${target}>" -o "${_stub}"
--soname "$<TARGET_FILE_NAME:${target}>" --arch "${_arch}"
BYPRODUCTS "${_stub}"
COMMENT "Generating dusklight link stub"
VERBATIM)
install(FILES "${_stub}" DESTINATION sdk)
endfunction()
+90
View File
@@ -0,0 +1,90 @@
include_guard(GLOBAL)
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
# Apple mod linking: symgen scans and filters the game's exports, generating an exports list used for the executable
# link step, and generates a MH_EXECUTE Mach-O stub that mods can link against without having to build the whole game.
function(setup_apple_exports target)
include("${_dir}/SymbolManifest.cmake")
ensure_symgen(TRUE)
set(_symgen "${SYMGEN_EXE}")
add_dependencies(${target} symgen)
set(_config_subdir "")
if (CMAKE_CONFIGURATION_TYPES)
set(_config_subdir "$<CONFIG>/")
endif ()
set(_rsp_lines "$<TARGET_OBJECTS:${target}>")
foreach (_lib IN LISTS JSYSTEM_LIBRARIES)
list(APPEND _rsp_lines "$<TARGET_FILE:${_lib}>")
endforeach ()
list(JOIN _rsp_lines "\n" _rsp_content)
set(_rsp "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports_input.rsp")
file(GENERATE OUTPUT "${_rsp}" CONTENT "${_rsp_content}")
set(_sdk_args)
foreach (_lib aurora_card aurora_core aurora_dvd aurora_gd aurora_gx aurora_mtx
aurora_os aurora_pad aurora_si aurora_vi)
if (TARGET ${_lib})
list(APPEND _sdk_args --sdk-lib "$<TARGET_FILE:${_lib}>")
endif ()
endforeach ()
# Dawn is linked statically on Apple; mods reach wgpu* through the executable.
if (TARGET dawn::webgpu_dawn)
get_target_property(_dawn_type dawn::webgpu_dawn TYPE)
if (_dawn_type STREQUAL "STATIC_LIBRARY")
list(APPEND _sdk_args --sdk-lib "$<TARGET_FILE:dawn::webgpu_dawn>")
endif ()
endif ()
set(_exp "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.exp")
add_custom_command(TARGET ${target} PRE_LINK
COMMAND "${_symgen}" exports
"@${_rsp}"
--out "${_exp}"
--exclude cmake_pch
--exclude miniz
--exclude asan_options
--exclude src/dusk
${_sdk_args}
COMMENT "Generating dusklight exports"
VERBATIM)
target_link_options(${target} PRIVATE -Xlinker -exported_symbols_list -Xlinker "${_exp}")
# Generate the stub executable mods link against via -bundle_loader.
set(_stub_args)
if (IOS)
set(_stub_platform "ios")
list(APPEND _stub_args --platform ios)
elseif (TVOS)
set(_stub_platform "tvos")
list(APPEND _stub_args --platform tvos)
else ()
set(_stub_platform "macos")
endif ()
if (CMAKE_OSX_DEPLOYMENT_TARGET)
list(APPEND _stub_args --min-os "${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif ()
if (CMAKE_OSX_ARCHITECTURES)
set(_archs "${CMAKE_OSX_ARCHITECTURES}")
else ()
set(_archs "${CMAKE_SYSTEM_PROCESSOR}")
endif ()
set(_arch_names "")
foreach (_arch IN LISTS _archs)
string(TOLOWER "${_arch}" _arch)
list(APPEND _stub_args --arch "${_arch}")
list(APPEND _arch_names "${_arch}")
endforeach ()
list(JOIN _arch_names "_" _arch_name)
set(_stub "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight-stub")
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${_symgen}" stub -f macho "${_exp}" -o "${_stub}" ${_stub_args}
BYPRODUCTS "${_stub}"
COMMENT "Generating dusklight link stub"
VERBATIM)
install(FILES "${_stub}" DESTINATION sdk RENAME "stub-${_stub_platform}-${_arch_name}")
endfunction()
+10
View File
@@ -0,0 +1,10 @@
# Copies a mod asset directory for packaging, skipping dotfiles and dot-directories
# (.gitkeep, .DS_Store, ...). Usage: cmake -DSRC=<dir> -DDST=<dir> -P CopyModAssets.cmake
file(MAKE_DIRECTORY "${DST}")
file(GLOB_RECURSE _files RELATIVE "${SRC}" "${SRC}/*")
foreach (_file IN LISTS _files)
if (NOT _file MATCHES "(^|/)\\.")
get_filename_component(_dir "${_file}" DIRECTORY)
file(COPY "${SRC}/${_file}" DESTINATION "${DST}/${_dir}")
endif ()
endforeach ()
+46 -5
View File
@@ -9,19 +9,60 @@ if (ANDROID)
list(APPEND _game_compile_defs TARGET_ANDROID=1) list(APPEND _game_compile_defs TARGET_ANDROID=1)
endif () endif ()
set(_game_include_dirs # Public game headers
set(_game_abi_include_dirs
${_game_root}/include ${_game_root}/include
${_game_root}/src ${_game_root}/assets/GZ2E01
${_game_root}/assets/GZ2E01 # TODO: make this dynamic if needed?
${_game_root}/libs/JSystem/include ${_game_root}/libs/JSystem/include
${_game_root}/libs
${_game_root}/extern/aurora/include/dolphin ${_game_root}/extern/aurora/include/dolphin
${_game_root}/extern/aurora/include ${_game_root}/extern/aurora/include
${_game_root}/sdk/include
)
# Internal game headers
set(_game_include_dirs
${_game_abi_include_dirs}
${_game_root}/src
${_game_root}/extern ${_game_root}/extern
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
) )
# Interface target for mods and sub-projects to inherit game headers/defines. # Mod API, including services
add_library(dusklight_mod_api INTERFACE)
target_include_directories(dusklight_mod_api INTERFACE ${_game_root}/sdk/include)
# Full internal headers used to build the game
add_library(dusklight_game_headers INTERFACE) add_library(dusklight_game_headers INTERFACE)
target_include_directories(dusklight_game_headers INTERFACE ${_game_include_dirs}) target_include_directories(dusklight_game_headers INTERFACE ${_game_include_dirs})
target_compile_definitions(dusklight_game_headers INTERFACE ${_game_compile_defs}) target_compile_definitions(dusklight_game_headers INTERFACE ${_game_compile_defs})
# Public game ABI for mods
add_library(dusklight_game_abi_headers INTERFACE)
target_include_directories(dusklight_game_abi_headers INTERFACE ${_game_abi_include_dirs})
target_compile_definitions(dusklight_game_abi_headers INTERFACE ${_game_compile_defs})
# Mod feature targets
add_library(dusklight_mod_feature_game INTERFACE)
target_link_libraries(dusklight_mod_feature_game INTERFACE
dusklight_mod_api
dusklight_game_abi_headers)
target_compile_definitions(dusklight_mod_feature_game INTERFACE DUSK_MOD_FEATURE_GAME=1)
# Game headers assume global.h comes first in the translation unit (it defines DUSK_GAME_DATA
# and friends); force-include it so mods don't depend on include order.
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
target_compile_options(dusklight_mod_feature_game INTERFACE
"$<$<COMPILE_LANGUAGE:CXX>:/FIglobal.h>")
else ()
target_compile_options(dusklight_mod_feature_game INTERFACE
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include global.h>")
endif ()
target_sources(dusklight_mod_feature_game INTERFACE
${_game_root}/sdk/src/game_feature.cpp)
add_library(dusklight_mod_feature_webgpu INTERFACE)
target_link_libraries(dusklight_mod_feature_webgpu INTERFACE dusklight_mod_api)
target_compile_definitions(dusklight_mod_feature_webgpu INTERFACE DUSK_MOD_FEATURE_WEBGPU=1)
add_library(dusklight_mod_feature_fmt INTERFACE)
target_link_libraries(dusklight_mod_feature_fmt INTERFACE dusklight_mod_api)
target_compile_definitions(dusklight_mod_feature_fmt INTERFACE DUSK_MOD_FEATURE_FMT=1)
+329 -90
View File
@@ -1,8 +1,11 @@
# add_mod(<target> SOURCES <file>... MOD_JSON <mod.json> [RES_DIR <res>] [OVERLAY_DIR <overlay>] # add_mod(<target> [FEATURES <feature>...] SOURCES <file>... MOD_JSON <mod.json>
# [RUNTIME_LIBRARIES <file>...] [RES_DIR <res>] [OVERLAY_DIR <overlay>]
# [TEXTURES_DIR <textures>] [OUTPUT_DIR <dir>] [BUNDLE]) # [TEXTURES_DIR <textures>] [OUTPUT_DIR <dir>] [BUNDLE])
set(DUSK_MODS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/mods" CACHE PATH "Directory to write mod packages into") set(DUSK_MODS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/mods" CACHE PATH "Directory to write mod packages into")
set(DUSKLIGHT_SDK_STUB_URL "https://github.com/encounter/dusklight/releases/download/sdk"
CACHE STRING "Base URL for game link stubs downloaded by out-of-tree mod builds")
function(_mod_lib_name out_var) function(_mod_lib_info out_platform_var out_name_var)
set(_arch "${CMAKE_SYSTEM_PROCESSOR}") set(_arch "${CMAKE_SYSTEM_PROCESSOR}")
if (APPLE AND CMAKE_OSX_ARCHITECTURES) if (APPLE AND CMAKE_OSX_ARCHITECTURES)
list(LENGTH CMAKE_OSX_ARCHITECTURES _count) list(LENGTH CMAKE_OSX_ARCHITECTURES _count)
@@ -10,20 +13,62 @@ function(_mod_lib_name out_var)
message(FATAL_ERROR "add_mod: universal binaries are not supported") message(FATAL_ERROR "add_mod: universal binaries are not supported")
endif () endif ()
set(_arch "${CMAKE_OSX_ARCHITECTURES}") set(_arch "${CMAKE_OSX_ARCHITECTURES}")
elseif (WIN32)
set(_arch_id "${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}")
if (NOT _arch_id)
set(_arch_id "${CMAKE_C_COMPILER_ARCHITECTURE_ID}")
endif ()
if (_arch_id MATCHES "^ARM64(EC)?$")
set(_arch "arm64")
elseif (_arch_id STREQUAL "x64")
set(_arch "amd64")
elseif (_arch_id STREQUAL "X86")
set(_arch "x86")
endif ()
endif () endif ()
string(TOLOWER "${CMAKE_SYSTEM_NAME}" _platform) string(TOLOWER "${CMAKE_SYSTEM_NAME}" _platform)
if (_platform STREQUAL "darwin")
set(_platform "macos")
endif ()
string(TOLOWER "${_arch}" _arch) string(TOLOWER "${_arch}" _arch)
if (_arch MATCHES "^(i[3-6]86|x86)$") if (_arch MATCHES "^(i[3-6]86|x86)$")
set(_arch "x86") set(_arch "x86")
endif () endif ()
if (WIN32) if (WIN32)
set(_ext ".dll") set(_ext ".dll")
elseif (APPLE)
set(_ext ".dylib")
else () else ()
set(_ext ".so") set(_ext ".so")
endif () endif ()
set(${out_var} "${_platform}-${_arch}${_ext}" PARENT_SCOPE) set(${out_platform_var} "${_platform}-${_arch}" PARENT_SCOPE)
set(${out_name_var} "mod${_ext}" PARENT_SCOPE)
endfunction()
# For out-of-tree builds without a game binary: download the version-independent link stub
# (generated by symgen) for the target platform.
function(_mod_download_link_stub out_var)
_mod_lib_info(_platform _lib_name)
if (WIN32)
set(_asset "${_platform}.lib")
elseif (ANDROID)
set(_asset "stub-${_platform}.so")
else ()
set(_asset "stub-${_platform}")
endif ()
set(_stub "${CMAKE_BINARY_DIR}/dusklight-sdk-stubs/${_asset}")
if (NOT EXISTS "${_stub}")
message(STATUS "Mod SDK: downloading link stub ${_asset}")
file(DOWNLOAD "${DUSKLIGHT_SDK_STUB_URL}/${_asset}" "${_stub}.tmp" STATUS _status)
list(GET _status 0 _code)
if (NOT _code EQUAL 0)
list(GET _status 1 _error)
file(REMOVE "${_stub}.tmp")
message(FATAL_ERROR
"Mod SDK: failed to download ${DUSKLIGHT_SDK_STUB_URL}/${_asset}: ${_error}\n"
"Set DUSK_GAME_EXE to a game binary or link stub to skip the download.")
endif ()
file(RENAME "${_stub}.tmp" "${_stub}")
endif ()
set(${out_var} "${_stub}" PARENT_SCOPE)
endfunction() endfunction()
function(_mod_resolve_source_path out_var path) function(_mod_resolve_source_path out_var path)
@@ -41,11 +86,62 @@ function(_mod_collect_assets out_var dir)
endif () endif ()
file(GLOB_RECURSE _files CONFIGURE_DEPENDS LIST_DIRECTORIES false "${dir}/*") file(GLOB_RECURSE _files CONFIGURE_DEPENDS LIST_DIRECTORIES false "${dir}/*")
set(${out_var} ${_files} PARENT_SCOPE) # Dotfiles (.gitkeep, .DS_Store, ...) are not packaged; see CopyModAssets.cmake.
set(_assets "")
foreach (_file IN LISTS _files)
file(RELATIVE_PATH _rel "${dir}" "${_file}")
if (NOT _rel MATCHES "(^|/)\\.")
list(APPEND _assets "${_file}")
endif ()
endforeach ()
set(${out_var} ${_assets} PARENT_SCOPE)
endfunction()
function(_mod_add_webgpu_headers target_name)
if (NOT TARGET dawn::dawncpp_headers AND NOT TARGET dawn::webgpu_dawn)
include("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../extern/aurora/cmake/AuroraDependencyVersions.cmake")
set(AURORA_DAWN_PROVIDER "package" CACHE STRING "How to provide Dawn for the mod SDK")
include("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../extern/aurora/cmake/AuroraDawnProvider.cmake")
endif ()
if (TARGET dawn::dawncpp_headers)
target_link_libraries(${target_name} PRIVATE dawn::dawncpp_headers)
elseif (TARGET dawn::webgpu_dawn)
target_link_libraries(${target_name} PRIVATE dawn::webgpu_dawn)
else ()
message(FATAL_ERROR "add_mod: FEATURES webgpu could not provide WebGPU headers")
endif ()
endfunction()
function(_mod_add_fmt target_name)
if (NOT TARGET fmt::fmt-header-only)
find_package(fmt 11 CONFIG QUIET GLOBAL)
endif ()
if (NOT TARGET fmt::fmt-header-only)
include(FetchContent)
message(STATUS "Mod SDK: fetching fmt")
# Keep the fallback version in sync with extern/aurora/extern/CMakeLists.txt.
FetchContent_Declare(fmt
URL https://github.com/fmtlib/fmt/archive/refs/tags/12.1.0.tar.gz
URL_HASH SHA256=ea7de4299689e12b6dddd392f9896f08fb0777ac7168897a244a6d6085043fea
DOWNLOAD_EXTRACT_TIMESTAMP FALSE
EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(fmt)
endif ()
if (NOT TARGET fmt::fmt-header-only)
message(FATAL_ERROR "add_mod: FEATURES fmt could not provide fmt::fmt-header-only")
endif ()
target_link_libraries(${target_name} PRIVATE fmt::fmt-header-only)
endfunction() endfunction()
function(add_mod target_name) function(add_mod target_name)
cmake_parse_arguments(ARG "BUNDLE" "MOD_JSON;RES_DIR;OVERLAY_DIR;TEXTURES_DIR;OUTPUT_DIR" "SOURCES" ${ARGN}) cmake_parse_arguments(ARG "BUNDLE" "MOD_JSON;RES_DIR;OVERLAY_DIR;TEXTURES_DIR;OUTPUT_DIR"
"SOURCES;RUNTIME_LIBRARIES;FEATURES" ${ARGN})
if (ARG_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "add_mod: unknown arguments: ${ARG_UNPARSED_ARGUMENTS}")
endif ()
if (NOT ARG_MOD_JSON) if (NOT ARG_MOD_JSON)
message(FATAL_ERROR "add_mod: MOD_JSON is required") message(FATAL_ERROR "add_mod: MOD_JSON is required")
endif () endif ()
@@ -54,80 +150,144 @@ function(add_mod target_name)
message(FATAL_ERROR "add_mod: MOD_JSON does not exist: ${_mod_json}") message(FATAL_ERROR "add_mod: MOD_JSON does not exist: ${_mod_json}")
endif () endif ()
add_library(${target_name} SHARED ${ARG_SOURCES}) set(_supported_features fmt game webgpu)
_mod_lib_name(_lib_name) set(_features "")
set_target_properties(${target_name} PROPERTIES foreach (_feature IN LISTS ARG_FEATURES)
PREFIX "" list(FIND _supported_features "${_feature}" _feature_index)
C_VISIBILITY_PRESET hidden if (_feature_index EQUAL -1)
CXX_VISIBILITY_PRESET hidden list(JOIN _supported_features ", " _supported_features_text)
VISIBILITY_INLINES_HIDDEN ON message(FATAL_ERROR
WINDOWS_EXPORT_ALL_SYMBOLS OFF) "add_mod: unknown feature '${_feature}' (supported: ${_supported_features_text})")
target_compile_features(${target_name} PRIVATE cxx_std_20)
target_link_libraries(${target_name} PRIVATE dusklight_game_headers)
if (NOT TARGET dusklight)
# Apply global compile options for out-of-tree mod builds
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
target_compile_options(${target_name} PRIVATE
-Wno-multichar -Wno-trigraphs -Wno-deprecated-declarations)
elseif (APPLE)
target_compile_options(${target_name} PRIVATE
-Wno-declaration-after-statement -Wno-non-pod-varargs)
elseif (MSVC)
target_compile_options(${target_name} PRIVATE
"$<$<COMPILE_LANGUAGE:C,CXX>:/bigobj>"
"$<$<COMPILE_LANGUAGE:C,CXX>:/utf-8>")
endif () endif ()
# Use signed char on ARM to match the original game (and x86) list(FIND _features "${_feature}" _duplicate_index)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _mod_arch) if (NOT _duplicate_index EQUAL -1)
if (_mod_arch MATCHES "^(arm|aarch64)" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU") message(FATAL_ERROR "add_mod: duplicate feature '${_feature}'")
target_compile_options(${target_name} PRIVATE -fsigned-char)
endif () endif ()
list(APPEND _features "${_feature}")
endforeach ()
if (_features AND NOT ARG_SOURCES)
message(FATAL_ERROR "add_mod: FEATURES requires SOURCES")
endif () endif ()
if (APPLE) set(_has_lib FALSE)
# Game symbols resolve against the host executable at dlopen time. set(_needs_host_link FALSE)
target_link_options(${target_name} PRIVATE -undefined dynamic_lookup) set(_lib_platform "")
elseif (ANDROID) set(_lib_name "")
if (TARGET dusklight) if (ARG_SOURCES)
target_link_libraries(${target_name} PRIVATE dusklight) set(_has_lib TRUE)
elseif (DUSK_GAME_SOLIB) add_library(${target_name} MODULE ${ARG_SOURCES})
target_link_libraries(${target_name} PRIVATE "${DUSK_GAME_SOLIB}") _mod_lib_info(_lib_platform _lib_name)
else () set_target_properties(${target_name} PROPERTIES
message(FATAL_ERROR "add_mod: DUSK_GAME_SOLIB is not set (libmain.so)") PREFIX ""
endif () C_VISIBILITY_PRESET hidden
elseif (UNIX) CXX_VISIBILITY_PRESET hidden
target_link_options(${target_name} PRIVATE -Wl,--allow-shlib-undefined) VISIBILITY_INLINES_HIDDEN ON
elseif (WIN32) WINDOWS_EXPORT_ALL_SYMBOLS OFF)
# Link against the generated import library (game ABI surface). Function calls target_compile_features(${target_name} PRIVATE cxx_std_20)
# resolve through import thunks. Data is toolchain dependent: target_link_libraries(${target_name} PRIVATE dusklight_mod_api)
# - clang-cl: lld's mingw mode auto-imports data references, fixed up at load by foreach (_feature IN LISTS _features)
# the mod SDK's pseudo-relocation runtime (pseudo_reloc.cpp). target_link_libraries(${target_name} PRIVATE dusklight_mod_feature_${_feature})
# - cl (MSVC): only DUSK_GAME_DATA-annotated data is reachable. Un-annotated if (_feature STREQUAL "webgpu")
# references fail to link. _mod_add_webgpu_headers(${target_name})
if (NOT DUSK_GAME_IMPLIB) endif ()
message(FATAL_ERROR "add_mod: DUSK_GAME_IMPLIB is not set.") if (_feature STREQUAL "fmt")
endif () _mod_add_fmt(${target_name})
target_link_libraries(${target_name} PRIVATE "${DUSK_GAME_IMPLIB}") endif ()
set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") if (_feature STREQUAL "game" OR _feature STREQUAL "webgpu")
target_compile_definitions(${target_name} PRIVATE _ITERATOR_DEBUG_LEVEL=0) set(_needs_host_link TRUE)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") endif ()
target_compile_options(${target_name} PRIVATE "$<$<COMPILE_LANGUAGE:C,CXX>:/clang:-mcmodel=large>") endforeach ()
target_sources(${target_name} PRIVATE "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../sdk/pseudo_reloc.cpp")
# lld mingw mode rewrites /DEFAULTLIB directives to -l style and skips %LIB%, so if (NOT TARGET dusklight)
# the CRT libraries and search paths are spelled out explicitly. # Apply global compile options for out-of-tree mod builds
target_link_options(${target_name} PRIVATE -lldmingw /nodefaultlib /INCREMENTAL:NO) if (CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_libraries(${target_name} PRIVATE target_compile_options(${target_name} PRIVATE
msvcrt.lib msvcprt.lib vcruntime.lib ucrt.lib -Wno-multichar -Wno-trigraphs -Wno-deprecated-declarations)
oldnames.lib uuid.lib kernel32.lib user32.lib) elseif (APPLE)
set(_lib_dirs "$ENV{LIB}") target_compile_options(${target_name} PRIVATE
if ("${_lib_dirs}" STREQUAL "") -Wno-declaration-after-statement -Wno-non-pod-varargs)
message(FATAL_ERROR "add_mod: %LIB% is empty; configure from a VS dev shell") elseif (MSVC)
target_compile_options(${target_name} PRIVATE
"$<$<COMPILE_LANGUAGE:C,CXX>:/bigobj>"
"$<$<COMPILE_LANGUAGE:C,CXX>:/utf-8>")
endif ()
# Use signed char on ARM to match the original game (and x86)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _mod_arch)
if (_mod_arch MATCHES "^(arm|aarch64)" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
target_compile_options(${target_name} PRIVATE -fsigned-char)
endif () endif ()
foreach (_libdir IN LISTS _lib_dirs)
target_link_options(${target_name} PRIVATE "/libpath:${_libdir}")
endforeach ()
endif () endif ()
if (APPLE)
if (_needs_host_link)
if (TARGET dusklight)
set(_game_exe "$<TARGET_FILE:dusklight>")
add_dependencies(${target_name} dusklight)
elseif (DUSK_GAME_EXE)
_mod_resolve_source_path(_game_exe "${DUSK_GAME_EXE}")
else ()
_mod_download_link_stub(_game_exe)
endif ()
target_link_options(${target_name} PRIVATE
-Xlinker -bundle_loader -Xlinker "${_game_exe}")
set_property(TARGET ${target_name} APPEND PROPERTY LINK_DEPENDS "${_game_exe}")
endif ()
set_target_properties(${target_name} PROPERTIES
BUILD_RPATH "@loader_path"
INSTALL_RPATH "@loader_path")
elseif (ANDROID)
if (_needs_host_link)
if (TARGET dusklight)
target_link_libraries(${target_name} PRIVATE dusklight)
else ()
if (DUSK_GAME_EXE)
_mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}")
else ()
_mod_download_link_stub(_game_lib)
endif ()
target_link_libraries(${target_name} PRIVATE "${_game_lib}")
endif ()
endif ()
set_target_properties(${target_name} PROPERTIES
BUILD_RPATH "$ORIGIN"
INSTALL_RPATH "$ORIGIN")
elseif (UNIX)
if (_needs_host_link)
target_link_options(${target_name} PRIVATE -Wl,--allow-shlib-undefined)
endif ()
set_target_properties(${target_name} PROPERTIES
BUILD_RPATH "$ORIGIN"
INSTALL_RPATH "$ORIGIN")
elseif (WIN32)
# Mods link against the game's import library (sdk/windows-<arch>.lib, generated by
# setup_windows_exports); cl and clang-cl both consume it in MSVC mode. Function
# calls resolve through import thunks; game data is reachable only through
# __declspec(dllimport), i.e. DUSK_GAME_DATA-annotated declarations.
if (_needs_host_link)
if (TARGET dusklight)
if (NOT DUSK_GAME_IMPLIB)
message(FATAL_ERROR
"add_mod: DUSK_GAME_IMPLIB is not set (see setup_windows_exports)")
endif ()
set(_game_lib "${DUSK_GAME_IMPLIB}")
elseif (DUSK_GAME_EXE)
_mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}")
if (NOT _game_lib MATCHES "\\.lib$")
message(FATAL_ERROR
"add_mod: DUSK_GAME_EXE must be an import library on Windows "
"(sdk/windows-<arch>.lib)")
endif ()
else ()
_mod_download_link_stub(_game_lib)
endif ()
target_link_libraries(${target_name} PRIVATE "${_game_lib}")
endif ()
set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
target_compile_definitions(${target_name} PRIVATE _ITERATOR_DEBUG_LEVEL=0)
endif ()
endif ()
if (ARG_RUNTIME_LIBRARIES AND NOT _has_lib)
message(FATAL_ERROR "add_mod: RUNTIME_LIBRARIES requires SOURCES")
endif () endif ()
set(_output_dir "${DUSK_MODS_OUTPUT_DIR}") set(_output_dir "${DUSK_MODS_OUTPUT_DIR}")
@@ -137,18 +297,47 @@ function(add_mod target_name)
set(_stage "${CMAKE_CURRENT_BINARY_DIR}/${target_name}_stage") set(_stage "${CMAKE_CURRENT_BINARY_DIR}/${target_name}_stage")
set(_out "${_output_dir}/${target_name}.dusk") set(_out "${_output_dir}/${target_name}.dusk")
set(_zip_args "${_lib_name}" mod.json) set(_zip_args mod.json)
set(_package_deps "${_mod_json}") set(_package_deps "${_mod_json}")
set(_package_inputs "${_mod_json}") set(_package_inputs "${_mod_json}")
set(_extra_cmds "") set(_extra_cmds "")
set(_lib_copy_cmd "")
set(_target_depend "")
if (_has_lib)
list(APPEND _zip_args lib)
set(_lib_copy_cmd
COMMAND ${CMAKE_COMMAND} -E make_directory "${_stage}/lib/${_lib_platform}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:${target_name}>" "${_stage}/lib/${_lib_platform}/${_lib_name}")
set(_target_depend ${target_name})
endif ()
string(TOLOWER "${_lib_name}" _lib_name_key)
set(_runtime_lib_name_keys "${_lib_name_key}")
foreach (_runtime_lib IN LISTS ARG_RUNTIME_LIBRARIES)
_mod_resolve_source_path(_runtime_lib_path "${_runtime_lib}")
if (NOT EXISTS "${_runtime_lib_path}" OR IS_DIRECTORY "${_runtime_lib_path}")
message(FATAL_ERROR "add_mod: runtime library does not exist or is not a file: ${_runtime_lib_path}")
endif ()
get_filename_component(_runtime_lib_name "${_runtime_lib_path}" NAME)
string(TOLOWER "${_runtime_lib_name}" _runtime_lib_name_key)
list(FIND _runtime_lib_name_keys "${_runtime_lib_name_key}" _runtime_lib_name_index)
if (NOT _runtime_lib_name_index EQUAL -1)
message(FATAL_ERROR "add_mod: duplicate runtime library filename: ${_runtime_lib_name}")
endif ()
list(APPEND _runtime_lib_name_keys "${_runtime_lib_name_key}")
list(APPEND _package_deps "${_runtime_lib_path}")
list(APPEND _package_inputs "${_runtime_lib_path}")
list(APPEND _lib_copy_cmd COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${_runtime_lib_path}" "${_stage}/lib/${_lib_platform}/${_runtime_lib_name}")
endforeach ()
if (ARG_RES_DIR) if (ARG_RES_DIR)
_mod_resolve_source_path(_res_dir "${ARG_RES_DIR}") _mod_resolve_source_path(_res_dir "${ARG_RES_DIR}")
_mod_collect_assets(_res_deps "${_res_dir}") _mod_collect_assets(_res_deps "${_res_dir}")
list(APPEND _package_deps ${_res_deps}) list(APPEND _package_deps ${_res_deps})
list(APPEND _package_inputs "${_res_dir}" ${_res_deps}) list(APPEND _package_inputs "${_res_dir}" ${_res_deps})
list(APPEND _zip_args res) list(APPEND _zip_args res)
list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} -E copy_directory list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} "-DSRC=${_res_dir}"
"${_res_dir}" "${_stage}/res") "-DDST=${_stage}/res" -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CopyModAssets.cmake")
endif () endif ()
if (ARG_OVERLAY_DIR) if (ARG_OVERLAY_DIR)
_mod_resolve_source_path(_overlay_dir "${ARG_OVERLAY_DIR}") _mod_resolve_source_path(_overlay_dir "${ARG_OVERLAY_DIR}")
@@ -156,8 +345,8 @@ function(add_mod target_name)
list(APPEND _package_deps ${_overlay_deps}) list(APPEND _package_deps ${_overlay_deps})
list(APPEND _package_inputs "${_overlay_dir}" ${_overlay_deps}) list(APPEND _package_inputs "${_overlay_dir}" ${_overlay_deps})
list(APPEND _zip_args overlay) list(APPEND _zip_args overlay)
list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} -E copy_directory list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} "-DSRC=${_overlay_dir}"
"${_overlay_dir}" "${_stage}/overlay") "-DDST=${_stage}/overlay" -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CopyModAssets.cmake")
endif () endif ()
if (ARG_TEXTURES_DIR) if (ARG_TEXTURES_DIR)
_mod_resolve_source_path(_textures_dir "${ARG_TEXTURES_DIR}") _mod_resolve_source_path(_textures_dir "${ARG_TEXTURES_DIR}")
@@ -165,8 +354,8 @@ function(add_mod target_name)
list(APPEND _package_deps ${_textures_deps}) list(APPEND _package_deps ${_textures_deps})
list(APPEND _package_inputs "${_textures_dir}" ${_textures_deps}) list(APPEND _package_inputs "${_textures_dir}" ${_textures_deps})
list(APPEND _zip_args textures) list(APPEND _zip_args textures)
list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} -E copy_directory list(APPEND _extra_cmds COMMAND ${CMAKE_COMMAND} "-DSRC=${_textures_dir}"
"${_textures_dir}" "${_stage}/textures") "-DDST=${_stage}/textures" -P "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/CopyModAssets.cmake")
endif () endif ()
set(_bundle_cmds "") set(_bundle_cmds "")
@@ -177,6 +366,7 @@ function(add_mod target_name)
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_IDS "${_mod_id}") set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_IDS "${_mod_id}")
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_STAGES "${_stage}") set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_STAGES "${_stage}")
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_PACKAGES "${_out}") set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_PACKAGES "${_out}")
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_LIB_PLATFORMS "${_lib_platform}")
set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_LIB_NAMES "${_lib_name}") set_property(GLOBAL APPEND PROPERTY DUSK_BUNDLED_MOD_LIB_NAMES "${_lib_name}")
set(_bundle_cmds set(_bundle_cmds
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bundled_mods" COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/bundled_mods"
@@ -194,12 +384,12 @@ function(add_mod target_name)
add_custom_command(OUTPUT "${_out}" add_custom_command(OUTPUT "${_out}"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${_stage}" COMMAND ${CMAKE_COMMAND} -E rm -rf "${_stage}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${_stage}" "${_output_dir}" COMMAND ${CMAKE_COMMAND} -E make_directory "${_stage}" "${_output_dir}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${target_name}>" "${_stage}/${_lib_name}" ${_lib_copy_cmd}
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_mod_json}" "${_stage}/mod.json" COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_mod_json}" "${_stage}/mod.json"
${_extra_cmds} ${_extra_cmds}
COMMAND ${CMAKE_COMMAND} -E chdir "${_stage}" ${CMAKE_COMMAND} -E tar cvf "${_out}" --format=zip ${_zip_args} COMMAND ${CMAKE_COMMAND} -E chdir "${_stage}" ${CMAKE_COMMAND} -E tar cvf "${_out}" --format=zip ${_zip_args}
${_bundle_cmds} ${_bundle_cmds}
DEPENDS ${target_name} ${_package_deps} "${_package_inputs_file}" DEPENDS ${_target_depend} ${_package_deps} "${_package_inputs_file}"
COMMENT "Packaging ${target_name} -> ${_out}" COMMENT "Packaging ${target_name} -> ${_out}"
COMMAND_EXPAND_LISTS COMMAND_EXPAND_LISTS
VERBATIM VERBATIM
@@ -215,9 +405,10 @@ endfunction()
# user cache). # user cache).
# - Linux: pre-extracted stage dirs into <install>/mods so native libs dlopen in place from # - Linux: pre-extracted stage dirs into <install>/mods so native libs dlopen in place from
# read-only installs. # read-only installs.
# - macOS: pre-extracted stage dirs into the installed app's Contents/Resources/mods, dylibs # - macOS: pre-extracted stage dirs into the installed app's Contents/Resources/mods, native
# ad-hoc signed in place, then the whole bundle re-signed. # libs ad-hoc signed in place, then the whole bundle re-signed.
# - iOS/tvOS: assets into <app>/mods/<id> and the dylib into Frameworks/<id>.dylib. # - iOS/tvOS: assets into <app>/mods/<id>, the mod library into Frameworks/<id>.so,
# and runtime libraries alongside it.
# - Android: nothing here; gradle packs ${CMAKE_BINARY_DIR}/bundled_mods into APK assets. # - Android: nothing here; gradle packs ${CMAKE_BINARY_DIR}/bundled_mods into APK assets.
function(install_bundled_mods) function(install_bundled_mods)
get_property(_targets GLOBAL PROPERTY DUSK_BUNDLED_MOD_TARGETS) get_property(_targets GLOBAL PROPERTY DUSK_BUNDLED_MOD_TARGETS)
@@ -226,6 +417,7 @@ function(install_bundled_mods)
endif () endif ()
get_property(_ids GLOBAL PROPERTY DUSK_BUNDLED_MOD_IDS) get_property(_ids GLOBAL PROPERTY DUSK_BUNDLED_MOD_IDS)
get_property(_stages GLOBAL PROPERTY DUSK_BUNDLED_MOD_STAGES) get_property(_stages GLOBAL PROPERTY DUSK_BUNDLED_MOD_STAGES)
get_property(_lib_platforms GLOBAL PROPERTY DUSK_BUNDLED_MOD_LIB_PLATFORMS)
get_property(_lib_names GLOBAL PROPERTY DUSK_BUNDLED_MOD_LIB_NAMES) get_property(_lib_names GLOBAL PROPERTY DUSK_BUNDLED_MOD_LIB_NAMES)
list(LENGTH _targets _count) list(LENGTH _targets _count)
math(EXPR _last "${_count} - 1") math(EXPR _last "${_count} - 1")
@@ -241,20 +433,67 @@ function(install_bundled_mods)
list(GET _targets ${_i} _target) list(GET _targets ${_i} _target)
list(GET _ids ${_i} _id) list(GET _ids ${_i} _id)
list(GET _stages ${_i} _stage) list(GET _stages ${_i} _stage)
list(GET _lib_platforms ${_i} _lib_platform)
list(GET _lib_names ${_i} _lib_name) list(GET _lib_names ${_i} _lib_name)
install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/mods/${_id}" install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/mods/${_id}"
PATTERN "${_lib_name}" EXCLUDE) PATTERN "lib" EXCLUDE)
install(PROGRAMS "$<TARGET_FILE:${_target}>" install(PROGRAMS "$<TARGET_FILE:${_target}>"
DESTINATION "${_bundle_dir}/Frameworks" RENAME "${_id}.dylib") DESTINATION "${_bundle_dir}/Frameworks" RENAME "${_id}.so")
install(DIRECTORY "${_stage}/lib/${_lib_platform}/"
DESTINATION "${_bundle_dir}/Frameworks"
PATTERN "${_lib_name}" EXCLUDE)
endforeach () endforeach ()
if (DUSK_HAS_PREPATCH)
set(_prepatch_executable "${_bundle_dir}/Dusklight")
set(_prepatch_mod_args "")
foreach (_id IN LISTS _ids)
string(APPEND _prepatch_mod_args
" \"${_bundle_dir}/Frameworks/${_id}.so\"")
endforeach ()
install(CODE "
execute_process(
COMMAND \"${SYMGEN_EXE}\" prepatch
--binary \"${_prepatch_executable}\"
--report \"${CMAKE_BINARY_DIR}/prepatch-report-$<CONFIG>.json\"
${_prepatch_mod_args}
COMMAND_ERROR_IS_FATAL ANY)")
endif ()
else () else ()
foreach (_i RANGE ${_last}) foreach (_i RANGE ${_last})
list(GET _ids ${_i} _id) list(GET _ids ${_i} _id)
list(GET _stages ${_i} _stage) list(GET _stages ${_i} _stage)
list(GET _lib_platforms ${_i} _lib_platform)
list(GET _lib_names ${_i} _lib_name) list(GET _lib_names ${_i} _lib_name)
install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/Contents/Resources/mods/${_id}") install(DIRECTORY "${_stage}/" DESTINATION "${_bundle_dir}/Contents/Resources/mods/${_id}")
install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - \"${_bundle_dir}/Contents/Resources/mods/${_id}/${_lib_name}\" COMMAND_ERROR_IS_FATAL ANY)") install(CODE "
file(GLOB _mod_libs \"${_bundle_dir}/Contents/Resources/mods/${_id}/lib/${_lib_platform}/*\")
foreach (_mod_lib IN LISTS _mod_libs)
if (NOT IS_DIRECTORY \"\${_mod_lib}\")
execute_process(COMMAND /usr/bin/codesign --force --sign - \"\${_mod_lib}\" COMMAND_ERROR_IS_FATAL ANY)
endif ()
endforeach ()")
endforeach () endforeach ()
if (DUSK_HAS_PREPATCH)
set(_prepatch_executable "${_bundle_dir}/Contents/MacOS/Dusklight")
set(_prepatch_mod_args "")
foreach (_i RANGE ${_last})
list(GET _ids ${_i} _id)
list(GET _lib_platforms ${_i} _lib_platform)
list(GET _lib_names ${_i} _lib_name)
string(APPEND _prepatch_mod_args
" \"${_bundle_dir}/Contents/Resources/mods/${_id}/lib/${_lib_platform}/${_lib_name}\"")
endforeach ()
install(CODE "
execute_process(
COMMAND \"${SYMGEN_EXE}\" prepatch
--binary \"${_prepatch_executable}\"
--report \"${CMAKE_BINARY_DIR}/prepatch-report-$<CONFIG>.json\"
${_prepatch_mod_args}
COMMAND_ERROR_IS_FATAL ANY)")
endif ()
if (TARGET crashpad_handler)
install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - \"${_bundle_dir}/Contents/MacOS/$<TARGET_FILE_NAME:crashpad_handler>\" COMMAND_ERROR_IS_FATAL ANY)")
endif ()
install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - --entitlements \"${DUSK_ENTITLEMENTS}\" \"${_bundle_dir}\" COMMAND_ERROR_IS_FATAL ANY)") install(CODE "execute_process(COMMAND /usr/bin/codesign --force --sign - --entitlements \"${DUSK_ENTITLEMENTS}\" \"${_bundle_dir}\" COMMAND_ERROR_IS_FATAL ANY)")
endif () endif ()
return () return ()
+43 -15
View File
@@ -2,40 +2,50 @@ include_guard(GLOBAL)
get_filename_component(_SYMBOL_MANIFEST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) get_filename_component(_SYMBOL_MANIFEST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
set(_SYMGEN_VERSION "1.1.0") set(_SYMGEN_VERSION "1.3.2")
set(_SYMGEN_RELEASE_BASE_URL "https://github.com/encounter/symgen/releases/download/v${_SYMGEN_VERSION}") set(_SYMGEN_RELEASE_BASE_URL "https://github.com/encounter/symgen/releases/download/v${_SYMGEN_VERSION}")
set(SYMGEN_PATH "" CACHE FILEPATH "Path to a symgen executable; empty downloads the pinned release") set(SYMGEN_PATH "" CACHE FILEPATH "Path to a symgen executable; empty downloads the pinned release")
mark_as_advanced(SYMGEN_PATH) mark_as_advanced(SYMGEN_PATH)
function(symgen_host_asset out_name) function(symgen_host_asset out_name out_hash)
string(TOLOWER "${CMAKE_HOST_SYSTEM_PROCESSOR}" _host_processor) string(TOLOWER "${CMAKE_HOST_SYSTEM_PROCESSOR}" _host_processor)
set(_asset "") set(_asset "")
set(_asset_hash "")
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
if (_host_processor MATCHES "^(arm64|aarch64)$") if (_host_processor MATCHES "^(arm64|aarch64)$")
set(_asset "symgen-macos-arm64") set(_asset "symgen-macos-arm64")
set(_asset_hash "SHA256=0344838d1674df09c17c3eeddcf26eb89c333fdb85dfd78f68adc436070eccbe")
elseif (_host_processor MATCHES "^(x86_64|amd64)$") elseif (_host_processor MATCHES "^(x86_64|amd64)$")
set(_asset "symgen-macos-x86_64") set(_asset "symgen-macos-x86_64")
set(_asset_hash "SHA256=ae0674f4a1e9d0dedfa02d35939ac28cdd229276b331c1f507df5df809cbec7e")
endif () endif ()
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
if (_host_processor MATCHES "^(aarch64|arm64)$") if (_host_processor MATCHES "^(aarch64|arm64)$")
set(_asset "symgen-linux-aarch64") set(_asset "symgen-linux-aarch64")
set(_asset_hash "SHA256=af766de2bfaeb0a06f6d7bc17bb2510b4a9c40f44a56e49bc4a4b798a6223042")
elseif (_host_processor MATCHES "^(x86_64|amd64)$") elseif (_host_processor MATCHES "^(x86_64|amd64)$")
set(_asset "symgen-linux-x86_64") set(_asset "symgen-linux-x86_64")
set(_asset_hash "SHA256=ebd62fb9623acc942b6295609e2306f85a73043b0a8a117f2072b761dd08e68f")
elseif (_host_processor MATCHES "^(i[3-6]86|x86)$") elseif (_host_processor MATCHES "^(i[3-6]86|x86)$")
set(_asset "symgen-linux-i686") set(_asset "symgen-linux-i686")
set(_asset_hash "SHA256=07780a4513fd29726578efc4ff2d88736b22f407ed821b32a68e35ff1e9af5f4")
endif () endif ()
elseif (CMAKE_HOST_WIN32) elseif (CMAKE_HOST_WIN32)
if (_host_processor MATCHES "^(arm64|aarch64)$") if (_host_processor MATCHES "^(arm64|aarch64)$")
set(_asset "symgen-windows-arm64.exe") set(_asset "symgen-windows-arm64.exe")
set(_asset_hash "SHA256=5bb22b4a4a9b5ad45646af411bfb09b8321a732ff3a077eb4c9de1feaef27d2b")
elseif (_host_processor MATCHES "^(x86_64|amd64)$") elseif (_host_processor MATCHES "^(x86_64|amd64)$")
set(_asset "symgen-windows-x86_64.exe") set(_asset "symgen-windows-x86_64.exe")
set(_asset_hash "SHA256=1d1ac087f991a96932d108969e15998becfec643e88f3e7d182ca97ebfc6a46f")
elseif (_host_processor MATCHES "^(i[3-6]86|x86)$") elseif (_host_processor MATCHES "^(i[3-6]86|x86)$")
set(_asset "symgen-windows-x86.exe") set(_asset "symgen-windows-x86.exe")
set(_asset_hash "SHA256=c113f4cd05f813efe2b1878dbfcf44d6302aee3974271736e0036430b0cced78")
endif () endif ()
endif () endif ()
set(${out_name} "${_asset}" PARENT_SCOPE) set(${out_name} "${_asset}" PARENT_SCOPE)
set(${out_hash} "${_asset_hash}" PARENT_SCOPE)
endfunction() endfunction()
function(ensure_symgen required) function(ensure_symgen required)
@@ -54,7 +64,7 @@ function(ensure_symgen required)
return() return()
endif () endif ()
else () else ()
symgen_host_asset(_asset) symgen_host_asset(_asset _asset_hash)
if (_asset STREQUAL "") if (_asset STREQUAL "")
if (required) if (required)
message(FATAL_ERROR "symgen: no prebuilt binary for host " message(FATAL_ERROR "symgen: no prebuilt binary for host "
@@ -75,7 +85,8 @@ function(ensure_symgen required)
file(DOWNLOAD "${_url}" "${_symgen}" file(DOWNLOAD "${_url}" "${_symgen}"
TLS_VERIFY ON TLS_VERIFY ON
STATUS _download_status STATUS _download_status
SHOW_PROGRESS) SHOW_PROGRESS
EXPECTED_HASH "${_asset_hash}")
list(GET _download_status 0 _download_code) list(GET _download_status 0 _download_code)
if (NOT _download_code EQUAL 0) if (NOT _download_code EQUAL 0)
list(GET _download_status 1 _download_message) list(GET _download_status 1 _download_message)
@@ -106,20 +117,37 @@ function(setup_symbol_manifest target)
endif () endif ()
add_dependencies(${target} symgen) add_dependencies(${target} symgen)
if (WIN32) # Reserve an ELF program-header entry when the linker supports it (mold).
set(_input --pdb "$<TARGET_PDB_FILE:${target}>") # symgen can replace the PT_NULL entry without relocating the table, keeping later post-link tools safe.
set(_out "$<TARGET_FILE_DIR:${target}>/dusklight.symdb") if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
else () include(CheckLinkerFlag)
set(_input --binary "$<TARGET_FILE:${target}>") check_linker_flag(CXX "LINKER:--spare-program-headers=1" _linker_supports_spare_program_headers)
if (APPLE) if (_linker_supports_spare_program_headers)
set(_out "$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources/dusklight.symdb") target_link_options(${target} PRIVATE "LINKER:--spare-program-headers=1")
else ()
set(_out "$<TARGET_FILE_DIR:${target}>/dusklight.symdb")
endif () endif ()
endif () endif ()
if (WIN32)
set(_input --pdb "$<TARGET_PDB_FILE:${target}>")
else ()
set(_input --binary "$<TARGET_FILE:${target}>")
endif ()
if (APPLE)
# Room for the symbol manifest and several prepatch arenas.
target_link_options(${target} PRIVATE "LINKER:-headerpad,0x1000")
# ld64 may update an existing output, which breaks our symdb insertion. Remove it first.
add_custom_command(TARGET ${target} PRE_LINK
COMMAND "${CMAKE_COMMAND}" -E rm -f "$<TARGET_FILE:${target}>"
VERBATIM)
endif ()
# The manifest is embedded into the image as a new section, located at runtime through
# the descriptor manifest.cpp reserves. On Apple platforms this command must stay
# attached before the ad-hoc codesign POST_BUILD command: the patch removes any existing
# signature.
add_custom_command(TARGET ${target} POST_BUILD add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${SYMGEN_EXE}" manifest ${_input} --out "${_out}" COMMAND "${SYMGEN_EXE}" manifest ${_input} --embed "$<TARGET_FILE:${target}>"
COMMENT "Generating symbol manifest" COMMENT "Embedding symbol manifest"
VERBATIM) VERBATIM)
endfunction() endfunction()
+28 -14
View File
@@ -6,9 +6,16 @@ get_filename_component(_DUSK_WINDOWS_EXPORTS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FIL
# import library mods link against. symgen scans the built objects, filters by source, and # import library mods link against. symgen scans the built objects, filters by source, and
# writes a .def used by the main link and import library generation. # writes a .def used by the main link and import library generation.
function(setup_windows_exports target) function(setup_windows_exports target)
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _implib_arch)
message(WARNING "dusklight: Windows code-mod exports are x64-only for now; skipping") if (_implib_arch STREQUAL "arm64")
return() set(_dlltool_machine "arm64")
set(_lib_machine "arm64")
elseif (_implib_arch MATCHES "^(amd64|x86_64)$")
set(_dlltool_machine "i386:x86-64")
set(_lib_machine "x64")
else ()
message(FATAL_ERROR
"dusklight: no Windows mod linking support for ${CMAKE_SYSTEM_PROCESSOR}")
endif () endif ()
include("${_DUSK_WINDOWS_EXPORTS_CMAKE_DIR}/SymbolManifest.cmake") include("${_DUSK_WINDOWS_EXPORTS_CMAKE_DIR}/SymbolManifest.cmake")
@@ -37,19 +44,29 @@ function(setup_windows_exports target)
endif () endif ()
endforeach () endforeach ()
set(_forward_args)
if (TARGET dawn::webgpu_dawn)
get_target_property(_dawn_type dawn::webgpu_dawn TYPE)
if (_dawn_type STREQUAL "SHARED_LIBRARY")
list(APPEND _forward_args
--forward-dll "$<TARGET_FILE:dawn::webgpu_dawn>"
--forward-sym-prefix wgpu)
endif ()
endif ()
# Generate curated exports list from the main binary # Generate curated exports list from the main binary
set(_def "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.def") set(_def "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.def")
add_custom_command(TARGET ${target} PRE_LINK add_custom_command(TARGET ${target} PRE_LINK
# TODO: src/dusk/ is NOT excluded: inline code in game headers
# currently call into it (e.g. dusk::frame_interp::lookup_replacement).
COMMAND "${_symgen}" def COMMAND "${_symgen}" def
--rsp "${_rsp}" "@${_rsp}"
--out "${_def}" --out "${_def}"
--exclude cmake_pch --exclude cmake_pch
--exclude miniz --exclude miniz
--exclude asan_options --exclude asan_options
--exclude src/dusk
--max-exports 58000 --max-exports 58000
${_sdk_args} ${_sdk_args}
${_forward_args}
COMMENT "Generating dusklight exports" COMMENT "Generating dusklight exports"
VERBATIM) VERBATIM)
target_link_options(${target} PRIVATE "/DEF:${_def}") target_link_options(${target} PRIVATE "/DEF:${_def}")
@@ -59,11 +76,11 @@ function(setup_windows_exports target)
get_filename_component(_compiler_dir "${CMAKE_CXX_COMPILER}" DIRECTORY) get_filename_component(_compiler_dir "${CMAKE_CXX_COMPILER}" DIRECTORY)
find_program(DUSK_LLVM_DLLTOOL llvm-dlltool HINTS "${_compiler_dir}") find_program(DUSK_LLVM_DLLTOOL llvm-dlltool HINTS "${_compiler_dir}")
if (DUSK_LLVM_DLLTOOL) if (DUSK_LLVM_DLLTOOL)
set(_implib_cmd "${DUSK_LLVM_DLLTOOL}" -d "${_def}" -D dusklight.exe -m i386:x86-64 set(_implib_cmd "${DUSK_LLVM_DLLTOOL}" -d "${_def}" -D dusklight.exe
-l "${_implib}") -m "${_dlltool_machine}" -l "${_implib}")
else () else ()
set(_implib_cmd "${CMAKE_AR}" /nologo "/def:${_def}" /machine:x64 /name:dusklight.exe set(_implib_cmd "${CMAKE_AR}" /nologo "/def:${_def}" "/machine:${_lib_machine}"
"/out:${_implib}") /name:dusklight.exe "/out:${_implib}")
endif () endif ()
add_custom_command(TARGET ${target} POST_BUILD add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${_implib_cmd} COMMAND ${_implib_cmd}
@@ -71,9 +88,6 @@ function(setup_windows_exports target)
COMMENT "Generating dusklight import library" COMMENT "Generating dusklight import library"
VERBATIM) VERBATIM)
set(DUSK_GAME_IMPLIB "${_implib}" CACHE INTERNAL "Import library for Windows mod linking") set(DUSK_GAME_IMPLIB "${_implib}" CACHE INTERNAL "Import library for Windows mod linking")
set(DUSK_GAME_DEF "${_def}" CACHE INTERNAL "Curated export .def for the game executable")
# Ship the import library as sdk/dusklight.lib in the install tree: mods may use it to install(FILES "${_implib}" DESTINATION sdk RENAME "windows-${_implib_arch}.lib")
# compile against Dusklight without having to build the whole game. (See DUSK_GAME_IMPLIB)
install(FILES "${_implib}" DESTINATION sdk RENAME dusklight.lib)
endfunction() endfunction()
+236 -102
View File
@@ -22,13 +22,14 @@ function, read and write data fields, and hook the vast majority of game functio
7. [Asset Overlays](#asset-overlays) 7. [Asset Overlays](#asset-overlays)
8. [Runtime Lifecycle](#runtime-lifecycle) 8. [Runtime Lifecycle](#runtime-lifecycle)
9. [Error Handling](#error-handling) 9. [Error Handling](#error-handling)
10. [Advanced: Exporting Services](#advanced-exporting-services) 10. [Advanced](#advanced)
--- ---
## Getting Started ## Getting Started
Fork the [mod template](../tools/mod_template/), a self-contained CMake project that uses the Dusklight mod SDK. Fork the [mod template](https://github.com/TwilitRealm/mod-template), a self-contained CMake project that uses the
Dusklight mod SDK.
``` ```
my_mod/ my_mod/
@@ -43,26 +44,34 @@ my_mod/
**CMakeLists.txt:** **CMakeLists.txt:**
```cmake ```cmake
cmake_minimum_required(VERSION 3.25) cmake_minimum_required(VERSION 3.26)
project(my_mod CXX) project(my_mod CXX)
set(DUSKLIGHT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dusklight" CACHE PATH "Path to dusklight source root") if (NOT DUSKLIGHT_VERSION)
set(DUSKLIGHT_VERSION "76b56cd8b81809fce0a5c2a44e2f6d437591132f")
endif ()
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/FetchDusklight.cmake")
add_subdirectory("${DUSKLIGHT_DIR}/sdk" dusklight-sdk EXCLUDE_FROM_ALL) add_subdirectory("${DUSKLIGHT_DIR}/sdk" dusklight-sdk EXCLUDE_FROM_ALL)
add_mod(my_mod add_mod(my_mod
FEATURES game fmt # remove game for service-only mods; add webgpu for GfxService
SOURCES src/mod.cpp SOURCES src/mod.cpp
MOD_JSON mod.json MOD_JSON mod.json
RES_DIR res # optional RES_DIR res # mod resources, including icon.png and banner.png
OVERLAY_DIR overlay # optional OVERLAY_DIR overlay # game file overlays; remove if unused
TEXTURES_DIR textures # optional TEXTURES_DIR textures # texture replacements; remove if unused
) )
``` ```
Building produces `my_mod.dusk` in `build/<preset>/mods/` (configurable via the `DUSK_MODS_OUTPUT_DIR` cache variable). Available features:
Dusklight searches a `mods/` directory next to the app in addition to the user directory, so a dev build launched from
`build/<preset>/` picks these up automatically: rebuild, relaunch (or click Reload), done.
For a regular game install, copy the `.dusk` into the user mods folder: - `fmt`: Provides the header-only `{fmt}` library and the formatted logging helpers in `mods/svc/log.hpp`.
- `game`: Allows calling into and hooking game code. Mods that **only** use services may omit it, providing a wider
range of compatibility with Dusklight versions and a slightly faster build process.
- `webgpu`: Allows importing the WebGPU API (`webgpu/webgpu.h`). Must be enabled when using
[GfxService](#gfxservice-modssvcgfxh).
Building produces `my_mod.dusk` in `build/mods/`. Copy the `.dusk` into the user mods folder:
- Windows: `%APPDATA%\TwilitRealm\Dusklight\mods` - Windows: `%APPDATA%\TwilitRealm\Dusklight\mods`
- Linux: `~/.local/share/TwilitRealm/Dusklight/mods` - Linux: `~/.local/share/TwilitRealm/Dusklight/mods`
@@ -131,26 +140,33 @@ A service is a struct of C function pointers with a version header. You declare
loader resolves it before your mod initializes: loader resolves it before your mod initializes:
```cpp ```cpp
IMPORT_SERVICE(LogService, svc_log); // required, any minor version IMPORT_SERVICE(LogService, svc_log); // required, latest minor version
IMPORT_SERVICE_VERSION(LogService, svc_log, 2); // required, minor version >= 2 IMPORT_SERVICE_VERSION(LogService, svc_log, 0); // required, minimum minor version 0 (for backwards compatibility)
IMPORT_OPTIONAL_SERVICE(SomeService, svc_maybe); // may be null IMPORT_OPTIONAL_SERVICE(SomeService, svc_maybe); // may be null
``` ```
A service must be imported in only **one** file (usually your `mod.cpp`). Other files may simply use `svc_log` or
`mods::log::` after including the appropriate header.
Each service is individually versioned, and there may be multiple major versions of a service provided at once, Each service is individually versioned, and there may be multiple major versions of a service provided at once,
allowing backwards compatibility with older mods while still changing services fundamentally if necessary. A **major** allowing backwards compatibility with older mods while still changing services fundamentally if necessary. A **major**
bump is a breaking change, treated as a different service entirely. For **additive** changes, a service appends new bump is a breaking change, treated as a different service entirely. For **additive** changes, a service appends new
functions to the end of the struct without breaking existing callers and simply bumps the minor version. Mods that functions to the end of the struct without breaking existing callers and simply bumps the minor version.
want the newer functions may use `IMPORT_SERVICE_VERSION` to require that minor at **load time**, or `SERVICE_HAS` to
check at **runtime** whether a specific function is available.
The contract (see `include/mods/api.h` for the full version): `IMPORT_SERVICE` and `IMPORT_OPTIONAL_SERVICE` require the latest minor version compiled against, making every field in
the service safe to call. A mod can use `IMPORT_SERVICE_VERSION` (or its optional counterpart) with an older minor
version to remain compatible with older Dusklight versions, then use `SERVICE_HAS` to check at runtime for fields added
after that explicitly requested version.
The contract (see `sdk/include/mods/api.h` for the full version):
- **A required import is guaranteed valid.** If the service is missing or too old, the mod fails to load with a clear - **A required import is guaranteed valid.** If the service is missing or too old, the mod fails to load with a clear
error. No need to null check at call sites. error. No need to null check at call sites.
- **Anything at or below the minor version you imported can be called unconditionally.** - **Anything at or below the minor version you imported can be called unconditionally.** The default macros import
the service type's current minor version; the versioned macros explicitly override that minimum.
- Optional imports may be null; check once in `mod_initialize`. - Optional imports may be null; check once in `mod_initialize`.
- Fields newer than your imported minor must be gated behind `SERVICE_HAS(service, ServiceType, field)` plus a null - Fields newer than your imported minor version must be gated behind `SERVICE_HAS(service, ServiceType, field)` plus a
check. null check.
--- ---
@@ -168,7 +184,15 @@ svc_log->write(mod_ctx, LOG_LEVEL_DEBUG, "verbose details");
``` ```
Messages appear in the console prefixed with your mod ID. Messages are plain UTF-8 strings and are copied before the Messages appear in the console prefixed with your mod ID. Messages are plain UTF-8 strings and are copied before the
call returns; use `snprintf` or `fmt::format` for formatting. call returns. C++ mods can enable `add_mod(... FEATURES fmt)` and use the formatted logging helpers in
`mods/svc/log.hpp`:
```cpp
#include <mods/svc/log.hpp>
mods::log::info("spawned actor {} at ({}, {})", actorName, x, y);
mods::log::warn("health is down to {:.1f}%", healthPercent);
```
### ResourceService (`mods/svc/resource.h`) ### ResourceService (`mods/svc/resource.h`)
@@ -200,13 +224,13 @@ const char* dir = svc_host->mod_dir(mod_ctx); // writable per-mod directory
svc_host->fail(mod_ctx, MOD_ERROR, "something unrecoverable happened"); // disables the mod svc_host->fail(mod_ctx, MOD_ERROR, "something unrecoverable happened"); // disables the mod
``` ```
`get_service`/`publish_service` provide dynamic service lookup; see [Advanced](#advanced-exporting-services). `get_service`/`publish_service` provide dynamic service lookup; see [Exporting Services](#exporting-services).
**Lifecycle watches.** If your mod provides a service that hands out per-caller state (registrations, callbacks, **Lifecycle watches.** If your mod provides a service that hands out per-caller state (registrations, callbacks,
handles), watch other mods' lifecycle and drop what you hold for a mod when it detaches. handles), watch other mods' lifecycle and drop what you hold for a mod when it detaches.
```cpp ```cpp
IMPORT_SERVICE_VERSION(HostService, svc_host, 1); IMPORT_SERVICE(HostService, svc_host);
void on_mod_lifecycle(ModContext* ctx, ModContext* subject, const char* subject_id, void on_mod_lifecycle(ModContext* ctx, ModContext* subject, const char* subject_id,
ModLifecycleEvent event, void* user_data) { ModLifecycleEvent event, void* user_data) {
@@ -225,7 +249,7 @@ every service dropped its state. For your own mod's teardown, use `mod_shutdown`
### HookService (`mods/svc/hook.h`) ### HookService (`mods/svc/hook.h`)
Installs hooks on game functions and resolves symbols by name. You'll rarely call it directly; use the typed helpers in Installs hooks on game functions and resolves symbols by name. You'll rarely call it directly; use the typed helpers in
`mods/hook.hpp` described in [Hooking Game Functions](#hooking-game-functions). `mods/svc/hook.hpp` described in [Hooking Game Functions](#hooking-game-functions).
### OverlayService (`mods/svc/overlay.h`) ### OverlayService (`mods/svc/overlay.h`)
@@ -398,6 +422,22 @@ sets `keep_open`. A `keep_open` action can close it later (or immediately) with
`on_dismiss` if present and always closes. `dialog_set_body`, `dialog_set_icon`, and `dialog_add_action` mutate a live `on_dismiss` if present and always closes. `dialog_set_body`, `dialog_set_icon`, and `dialog_add_action` mutate a live
dialog. dialog.
**Toasts:** `push_toast` enqueues a notification. Titles and bodies accept RML. The optional `type` is applied as an
RCSS class; `warning` uses the built-in warning appearance, and mods can define their own types. A duration of 0 uses
the default of 5 seconds.
Toasts have a `mod-id` attribute, so `UI_SCOPE_OVERLAY` styles can use selectors such as
`toast[mod-id="com.example.randomizer"].success`.
```cpp
UiToastDesc toast = UI_TOAST_DESC_INIT;
toast.type = "success";
toast.title_rml = "Randomizer";
toast.body_rml = "<span>Seed loaded successfully.</span>";
toast.duration_ms = 3000;
svc_ui->push_toast(mod_ctx, &toast);
```
**Menu bar tabs:** `register_menu_tab` adds a tab to the in-game menu bar. `on_selected` fires when the user activates **Menu bar tabs:** `register_menu_tab` adds a tab to the in-game menu bar. `on_selected` fires when the user activates
the tab: typically you'd push a window from it. The tab is removed by `unregister_menu_tab`, or automatically when the the tab: typically you'd push a window from it. The tab is removed by `unregister_menu_tab`, or automatically when the
mod is disabled. mod is disabled.
@@ -409,34 +449,135 @@ existing documents restyle immediately, and future ones pick it up when created.
host styles and may override them. Scope selectors tightly (use `[mod-id="..."]`!), especially for `UI_SCOPE_WINDOW`, host styles and may override them. Scope selectors tightly (use `[mod-id="..."]`!), especially for `UI_SCOPE_WINDOW`,
unless changing host UI is intentional. unless changing host UI is intentional.
### WindowService (`mods/svc/window.h`)
Allows creating new windows that can be rendered to via `GfxService`.
```cpp
IMPORT_SERVICE(WindowService, svc_window);
WindowDesc desc = WINDOW_DESC_INIT;
desc.title = "My auxiliary view";
desc.on_event = on_window_event;
WindowHandle window = 0;
svc_window->create_window(mod_ctx, &desc, &window);
```
Window callbacks run on the game thread. A close event is only a request; call `destroy_window` when the mod is ready to
close it. A window attached to a GfxService present target cannot be destroyed until that target is unregistered. Only
one present target may be attached to a WindowService window at a time.
New windows are hidden by default so a mod can finish attaching graphics before calling `show_window`.
### GfxService (`mods/svc/gfx.h`)
**Requires `add_mod(... FEATURES webgpu)`**
Direct WebGPU access at various stages of the rendering pipeline. Mods use the `wgpu*` C API (via `webgpu/webgpu.h`) for
custom draws and compute dispatches. Mods must manage their own WebGPU state, including pipelines and bind groups.
```cpp
IMPORT_SERVICE(GfxService, svc_gfx);
GfxDeviceInfo info = GFX_DEVICE_INFO_INIT;
svc_gfx->get_device_info(mod_ctx, &info);
```
`register_stage_hook` runs a game-thread callback during frame recording. The public stages are:
- `GFX_STAGE_SCENE_BEGIN`: world camera window after camera/projection/light setup
- `GFX_STAGE_SCENE_AFTER_TERRAIN`: after terrain/shadow lists, before object and translucent lists
- `GFX_STAGE_SCENE_AFTER_OPAQUE`: after sky/terrain/object opaque lists, before translucent lists
- `GFX_STAGE_FRAME_BEFORE_HUD`: 3D scene and wipe are complete, before 2D/HUD lists
- `GFX_STAGE_FRAME_AFTER_HUD`: full game scene, including HUD
Inside a stage callback, record work with `push_draw`, stream per-frame data with `push_verts`, `push_indices`,
`push_uniform`, or `push_storage`, snapshot the current frame with `resolve_pass`, and use `create_pass`/`resolve_pass`
for temporary offscreen passes. Draw callbacks run later on the render worker thread with the live
`WGPURenderPassEncoder`; they may use only their `GfxDrawContext` handles and raw `wgpu*` calls. Compute callbacks
registered with `register_compute_type` follow the same worker-thread rule and run on the frame command encoder.
All WGPU handles from the service are borrowed. Resolved target views are valid for the current frame only. GPU objects
created by a mod are owned by that mod and should be released in `mod_shutdown`.
#### External presentation
GfxService supports external presentation ("present targets") backed by either a WindowService window (via
`register_window_present_target`) or a plain `WGPUSurface` (via `register_present_target`).
```cpp
GfxPresentTargetDesc target_desc = GFX_PRESENT_TARGET_DESC_INIT;
target_desc.render = render_auxiliary_view;
GfxPresentTargetHandle target = 0;
svc_gfx->register_window_present_target(mod_ctx, window, &target_desc, &target);
// From a stage callback:
svc_gfx->push_present(mod_ctx, target, &payload, sizeof(payload));
```
For WindowService windows, the surface is automatically reconfigured on window size changes.
For plain `WBPUSurface`s, `resize_present_target` must be used to resize.
To create a `WGPUSurface` manually, `GfxDeviceInfo` holds the `WGPUInstance` and `WGPUAdapter` which can be used with
`wgpuInstanceCreateSurface` and a chained `WGPUSurfaceSource*` struct.
`push_present` must be called every frame from a GfxService stage callback. If surface was lost, `push_present` returns
`MOD_ERROR`. Unregister and re-register the target before trying again.
### CameraService (`mods/svc/camera.h`)
Converts a game view provided by a render callback into WebGPU-convention camera data. Matrix fields are column-major
`float[16]` values using the matrix * column-vector convention (transpose of the game's row-major `Mtx`/`Mtx44` layout),
ready to copy into WGSL `mat4x4f` uniforms.
```cpp
IMPORT_SERVICE(CameraService, svc_camera);
CameraInfo camera = CAMERA_INFO_INIT;
if (svc_camera->get_camera(mod_ctx, game_view, &camera) == MOD_OK) {
// camera.view_from_world, camera.proj_from_view, camera.eye, ...
}
```
`get_camera` returns `MOD_UNAVAILABLE` while the view is not a valid perspective camera, such as before the
first in-game frame. Projection matrices match the renderer's WebGPU clip convention and renderer depth convention
(reversed-Z by default).
--- ---
## Hooking Game Functions ## Hooking Game Functions
**Requires `add_mod(... FEATURES game)`**
Mods may hook the vast majority of game functions, including file-local static, private and virtual functions. Mods may hook the vast majority of game functions, including file-local static, private and virtual functions.
`mods/hook.hpp` provides typed helpers over the hook service: `mods/svc/hook.hpp` provides typed helpers over the hook service:
```cpp ```cpp
#include "mods/hook.hpp" #include "mods/svc/hook.hpp"
#include "mods/svc/hook.h"
IMPORT_SERVICE(HookService, svc_hook); IMPORT_SERVICE(HookService, svc_hook);
DEFINE_HOOK(&daAlink_c::posMove, LinkPosMove);
DEFINE_HOOK(&daAlink_c::execute, LinkExecute);
``` ```
Every hook target must be **declared** at namespace scope with `DEFINE_HOOK` (a target you can name in C++) or
`DEFINE_HOOK_SYMBOL` (a symbol name).
### Pre-hooks ### Pre-hooks
Run before the original. Return `HOOK_SKIP_ORIGINAL` to cancel it (post-hooks still run). Run before the original. Return `HOOK_SKIP_ORIGINAL` to cancel it (post-hooks still run).
```cpp ```cpp
HookAction on_pos_move_pre(ModContext*, void* args, void* retval, void* userdata) { HookAction on_pos_move_pre(ModContext*, void* args, void* retval, void* userdata) {
daAlink_c* link = dusk::mods::arg<daAlink_c*>(args, 0); // arg 0 is `this` daAlink_c* link = mods::arg<daAlink_c*>(args, 0); // arg 0 is `this`
if (link->shape_angle.y > 10000) { if (link->shape_angle.y > 10000) {
return HOOK_SKIP_ORIGINAL; return HOOK_SKIP_ORIGINAL;
} }
return HOOK_CONTINUE; return HOOK_CONTINUE;
} }
dusk::mods::hook_add_pre<&daAlink_c::posMove>(svc_hook, on_pos_move_pre); mods::hook::add_pre<LinkPosMove>(on_pos_move_pre);
``` ```
### Post-hooks ### Post-hooks
@@ -447,24 +588,22 @@ if any.
```cpp ```cpp
void on_pos_move_post(ModContext*, void* args, void* retval, void* userdata) { ... } void on_pos_move_post(ModContext*, void* args, void* retval, void* userdata) { ... }
dusk::mods::hook_add_post<&daAlink_c::posMove>(svc_hook, on_pos_move_post); mods::hook::add_post<LinkPosMove>(on_pos_move_post);
``` ```
### Replace-hooks ### Replace-hooks
Substitute the original entirely. Call through to it via `Hook<...>::g_orig` if needed: Substitute the original entirely. Call through to it via the declaration's `g_orig` if needed:
```cpp ```cpp
using ExecuteEntry = dusk::mods::Hook<&daAlink_c::execute>;
void on_execute_replace(ModContext*, void* args, void* retval, void*) { void on_execute_replace(ModContext*, void* args, void* retval, void*) {
int result = ExecuteEntry::g_orig(dusk::mods::arg<daAlink_c*>(args, 0)); int result = LinkExecute::g_orig(mods::arg<daAlink_c*>(args, 0));
if (retval != nullptr) { if (retval != nullptr) {
*static_cast<int*>(retval) = result; *static_cast<int*>(retval) = result;
} }
} }
dusk::mods::hook_replace<&daAlink_c::execute>(svc_hook, on_execute_replace); mods::hook::replace<LinkExecute>(on_execute_replace);
``` ```
By default a second replace-hook on the same function is a conflict; `HookOptions` (`replace_policy`, `priority`, By default a second replace-hook on the same function is a conflict; `HookOptions` (`replace_policy`, `priority`,
@@ -477,63 +616,16 @@ Functions you can't name in C++ (file-local statics, private class members, anyt
symbol name instead. You must supply the signature along with the name. symbol name instead. You must supply the signature along with the name.
```cpp ```cpp
// static callback used by Link's hookshot collider in d_a_alink_hook.inc DEFINE_HOOK_SYMBOL("daAlink_hookshotAtHitCallBack",
using HookshotHit = dusk::mods::NamedHook< void(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*), HookshotHit);
"daAlink_hookshotAtHitCallBack",
void(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*)>;
dusk::mods::hook_add_pre<HookshotHit>(svc_hook, on_hookshot_hit_pre); mods::hook::add_pre<HookshotHit>(on_hookshot_hit_pre);
... ...
HookshotHit::g_orig(link, atObjInf, target, tgObjInf); // call through to the original HookshotHit::g_orig(link, atObjInf, target, tgObjInf); // call through to the original
``` ```
Class member functions must include `Class*` as the first argument. Class member functions must include `Class*` as the first argument.
The install fails with the resolve error when the name is missing (`MOD_UNAVAILABLE`), ambiguous (`MOD_CONFLICT`),
or the manifest is absent (`MOD_UNSUPPORTED`). Unlike `Hook<&Class::method>`, the signature is **not**
compiler-checked: a mismatched signature will corrupt the call.
### Reading and writing arguments
`args` is an array of pointers to the arguments. For member functions, index 0 is `this`; parameters follow in
declaration order.
```cpp
T value = dusk::mods::arg<T>(args, n); // copy
T& ref = dusk::mods::arg_ref<T>(args, n); // read/write reference
```
```cpp
// fpc_ProcID fopAcM_createItem(..., int itemNo, ...): turn heart drops into green rupees
HookAction on_create_item_pre(ModContext*, void* args, void*, void*) {
int& itemNo = dusk::mods::arg_ref<int>(args, 1);
if (itemNo == dItemNo_HEART_e) {
itemNo = dItemNo_GREEN_RUPEE_e;
}
return HOOK_CONTINUE;
}
dusk::mods::hook_add_pre<&fopAcM_createItem>(svc_hook, on_create_item_pre);
```
For reference parameters (e.g. `const cXyz& pos`), `arg_ref<cXyz>` yields a direct reference.
### Resolving symbols by name
`resolve` looks a symbol up in the **symbol manifest**: a name→address map generated alongside every game build and
keyed to that exact binary. It covers the whole image, including functions that aren't exported (file-local statics),
which makes them hookable:
```cpp
IMPORT_SERVICE(HookService, svc_hook);
void* addr = nullptr;
uint32_t flags = 0;
if (svc_hook->resolve(mod_ctx, "GXSetProjection", &addr, &flags) == MOD_OK) {
// addr is the function's real address in the running game; hook or call it.
}
```
Two spellings work on every platform: Two spellings work on every platform:
- **Display names** (`daAlink_c::posMove`, `fapGm_Before`): the qualified name with no parameter list. They carry no - **Display names** (`daAlink_c::posMove`, `fapGm_Before`): the qualified name with no parameter list. They carry no
@@ -541,25 +633,36 @@ Two spellings work on every platform:
- **Decorated names** (`_ZN9daAlink_c7posMoveEv` / `?posMove@daAlink_c@@...`): the platform's mangled spelling in - **Decorated names** (`_ZN9daAlink_c7posMoveEv` / `?posMove@daAlink_c@@...`): the platform's mangled spelling in
dlsym convention (no Mach-O leading underscore). The escape hatch for overloads. dlsym convention (no Mach-O leading underscore). The escape hatch for overloads.
`MOD_UNSUPPORTED` means the manifest is missing or was built for a different game binary. Installing fails with `MOD_UNAVAILABLE` when it didn't resolve (missing, ambiguous, or no symbol manifest). Unlike
`DEFINE_HOOK`, the signature is **not** compiler-checked: a mismatched signature will corrupt the
call.
### Game code ABI contract ### Reading and writing arguments
A primary consideration when letting mods link against the game is maintaining ABI stability across Dusklight `args` is an array of pointers to the arguments. For member functions, index 0 is `this`; parameters follow in
versions. If your mod calls or hooks game code directly (anything beyond the service APIs), import `GameService` declaration order.
(`mods/svc/game.h`):
```cpp ```cpp
IMPORT_SERVICE(GameService, svc_game); T value = mods::arg<T>(args, n); // copy
T& ref = mods::arg_ref<T>(args, n); // read/write reference
``` ```
Its major version is the game code ABI epoch: it's bumped when game struct or vtable layouts change incompatibly, and ```cpp
the ordinary service version check then rejects your mod with a clear error instead of letting it corrupt memory in a DEFINE_HOOK(fopAcM_createItem, CreateItem);
version it wasn't built for. Service-only and asset-only mods should *not* import it and will continue to work across
game ABI changes.
The more you can do through services, the better: a mod that avoids touching game code directly sidesteps future ABI // fpc_ProcID fopAcM_createItem(..., int itemNo, ...): turn heart drops into green rupees
breaks entirely and plays nicer with other enabled mods. HookAction on_create_item_pre(ModContext*, void* args, void*, void*) {
int& itemNo = mods::arg_ref<int>(args, 1);
if (itemNo == dItemNo_HEART_e) {
itemNo = dItemNo_GREEN_RUPEE_e;
}
return HOOK_CONTINUE;
}
mods::hook::add_pre<CreateItem>(on_create_item_pre);
```
For reference parameters (e.g. `const cXyz& pos`), `arg_ref<cXyz>` yields a direct reference.
--- ---
@@ -615,13 +718,13 @@ the stack for the whole session (e.g. the outermost main loop); a mod that does
Service calls report failure through `ModResult` return values (`MOD_OK`, `MOD_UNAVAILABLE`, Service calls report failure through `ModResult` return values (`MOD_OK`, `MOD_UNAVAILABLE`,
`MOD_INVALID_ARGUMENT`, ...). Lifecycle exports additionally receive a `ModError*`: fill it (e.g. with `MOD_INVALID_ARGUMENT`, ...). Lifecycle exports additionally receive a `ModError*`: fill it (e.g. with
`dusk::mods::set_error(error, code, "message")`) and return the code, and the loader disables the mod and shows the `mods::set_error(error, code, "message")`) and return the code, and the loader disables the mod and shows the
message to the user. message to the user.
```cpp ```cpp
MOD_EXPORT ModResult mod_initialize(ModError* error) { MOD_EXPORT ModResult mod_initialize(ModError* error) {
if (!load_my_data()) { if (!load_my_data()) {
return dusk::mods::set_error(error, MOD_ERROR, "failed to load data"); return mods::set_error(error, MOD_ERROR, "failed to load data");
} }
return MOD_OK; return MOD_OK;
} }
@@ -632,7 +735,9 @@ explicit results.
--- ---
## Advanced: Exporting Services ## Advanced
### Exporting Services
Mods may export services of their own, permitting framework mods and cross-mod integration. Define the interface in a Mods may export services of their own, permitting framework mods and cross-mod integration. Define the interface in a
header both mods share: header both mods share:
@@ -653,9 +758,10 @@ typedef struct MyModService {
#ifdef __cplusplus #ifdef __cplusplus
#include "mods/service.hpp" #include "mods/service.hpp"
template <> template <>
struct dusk::mods::ServiceTraits<MyModService> { struct mods::ServiceTraits<MyModService> {
static constexpr const char* id = MY_MOD_SERVICE_ID; static constexpr const char* id = MY_MOD_SERVICE_ID;
static constexpr uint16_t major_version = MY_MOD_SERVICE_MAJOR; static constexpr uint16_t major_version = MY_MOD_SERVICE_MAJOR;
static constexpr uint16_t minor_version = MY_MOD_SERVICE_MINOR;
}; };
#endif #endif
``` ```
@@ -684,7 +790,7 @@ svc_my_mod->do_thing(mod_ctx, 42);
The loader registers all exports before resolving any imports, so declaration order between mods doesn't matter. Note The loader registers all exports before resolving any imports, so declaration order between mods doesn't matter. Note
that the `ctx` a provider receives identifies the *calling* mod. that the `ctx` a provider receives identifies the *calling* mod.
### Dependencies between mods #### Dependencies between mods
Service imports are also dependency declarations: the loader initializes mods in dependency order, so by the time your Service imports are also dependency declarations: the loader initializes mods in dependency order, so by the time your
`mod_initialize` runs, every mod you import services from (required *or* optional) has already finished its own `mod_initialize` runs, every mod you import services from (required *or* optional) has already finished its own
@@ -714,3 +820,31 @@ For services whose construction can't happen at static-init time, declare the ex
and publish the pointer later via `svc_host->publish_service(...)`. Consumers can fetch services dynamically with and publish the pointer later via `svc_host->publish_service(...)`. Consumers can fetch services dynamically with
`svc_host->get_service(...)`; prefer manifest imports whenever possible, since they give the loader dependency `svc_host->get_service(...)`; prefer manifest imports whenever possible, since they give the loader dependency
information and fail fast with good errors. information and fail fast with good errors.
### Native Runtime Libraries
`RUNTIME_LIBRARIES` passed to `add_mod` are packaged beside the mod's native module in `lib/<platform>/`. Dusklight
extracts the whole directory before loading the mod, so libraries linked by the mod resolve normally. The SDK links the
mod itself with `$ORIGIN` on Linux and `@loader_path` on Apple platforms; runtime libraries with their own non-system
dependencies must also be built with origin-relative lookup paths. On Windows, Dusklight uses an isolated DLL search
rooted at this directory.
```cmake
add_mod(my_mod
SOURCES src/mod.cpp
MOD_JSON mod.json
RUNTIME_LIBRARIES "${VENDOR_RUNTIME_LIBRARY}")
```
SDKs that load plugins by directory can pass them the absolute runtime path from the current HostService:
```cpp
IMPORT_SERVICE(HostService, svc_host);
const char* nativeDir = svc_host->native_dir(mod_ctx); // read-only
```
Libraries loaded explicitly by the mod remain its responsibility: stop their threads and unload them during
`mod_shutdown`. Do not write into `native_dir`; use `mod_dir` for writable state. Native library namespaces are
process-wide on some platforms, so two mods cannot safely assume that incompatible libraries with the same filename
will remain isolated.
+1 -1
+91 -86
View File
@@ -1411,68 +1411,105 @@ set(DOLPHIN_FILES
) )
set(DUSK_FILES set(DUSK_FILES
include/dusk/action_bindings.h include/helpers/batch.hpp
include/dusk/endian_gx.hpp include/helpers/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/d/actor/d_a_alink_dusk.cpp
src/dusk/android_frame_rate.hpp src/dusk/OSContext.cpp
src/dusk/OSMutex.cpp
src/dusk/OSReport.cpp
src/dusk/OSThread.cpp
src/dusk/achievements.cpp
src/dusk/action_bindings.cpp
src/dusk/action_bindings.h
src/dusk/android_frame_rate.cpp src/dusk/android_frame_rate.cpp
src/dusk/android_frame_rate.hpp
src/dusk/asserts.cpp src/dusk/asserts.cpp
src/dusk/batch.cpp src/dusk/autosave.cpp
src/dusk/batch.hpp
src/dusk/config.cpp src/dusk/config.cpp
src/dusk/config.hpp
src/dusk/crash_handler.cpp src/dusk/crash_handler.cpp
src/dusk/crash_reporting.cpp src/dusk/crash_reporting.cpp
src/dusk/data.cpp src/dusk/data.cpp
src/dusk/data.hpp src/dusk/data.hpp
src/dusk/endian.cpp src/dusk/discord.cpp
src/dusk/discord.hpp
src/dusk/discord_presence.cpp
src/dusk/dvd_asset.cpp
src/dusk/dvd_asset.hpp
src/dusk/extras.c src/dusk/extras.c
src/dusk/file_select.cpp src/dusk/file_select.cpp
src/dusk/file_select.hpp src/dusk/file_select.hpp
src/dusk/frame_interpolation.cpp src/dusk/frame_interpolation.cpp
src/dusk/game_clock.cpp src/dusk/game_clock.cpp
src/dusk/gamepad_color.cpp
src/dusk/globals.cpp src/dusk/globals.cpp
src/dusk/gyro.cpp src/dusk/gyro.cpp
include/dusk/menu_pointer.h
src/dusk/menu_pointer.cpp
src/dusk/mouse.cpp
src/dusk/gamepad_color.cpp
src/dusk/autosave.cpp
src/dusk/http/http.hpp src/dusk/http/http.hpp
src/dusk/io.cpp src/dusk/imgui/ImGuiActorSpawner.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/touch_camera.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.cpp
src/dusk/imgui/ImGuiBloomWindow.hpp src/dusk/imgui/ImGuiBloomWindow.hpp
src/dusk/imgui/ImGuiCameraOverlay.cpp
src/dusk/imgui/ImGuiConfig.hpp
src/dusk/imgui/ImGuiConsole.cpp
src/dusk/imgui/ImGuiConsole.hpp
src/dusk/imgui/ImGuiControllerOverlay.cpp
src/dusk/imgui/ImGuiEngine.cpp
src/dusk/imgui/ImGuiEngine.hpp
src/dusk/imgui/ImGuiHeapOverlay.cpp
src/dusk/imgui/ImGuiMenuTools.cpp src/dusk/imgui/ImGuiMenuTools.cpp
src/dusk/imgui/ImGuiMenuTools.hpp src/dusk/imgui/ImGuiMenuTools.hpp
src/dusk/imgui/ImGuiActorSpawner.cpp
src/dusk/imgui/ImGuiProcessOverlay.cpp src/dusk/imgui/ImGuiProcessOverlay.cpp
src/dusk/imgui/ImGuiCameraOverlay.cpp
src/dusk/imgui/ImGuiHeapOverlay.cpp
src/dusk/imgui/ImGuiControllerOverlay.cpp
src/dusk/imgui/ImGuiStubLog.cpp
src/dusk/imgui/ImGuiSaveEditor.cpp src/dusk/imgui/ImGuiSaveEditor.cpp
src/dusk/imgui/ImGuiStateShare.hpp
src/dusk/imgui/ImGuiStateShare.cpp src/dusk/imgui/ImGuiStateShare.cpp
src/dusk/imgui/ImGuiStateShare.hpp
src/dusk/imgui/ImGuiStubLog.cpp
src/dusk/io.cpp
src/dusk/iso_validate.cpp
src/dusk/layout.cpp
src/dusk/livesplit.cpp
src/dusk/logging.cpp
src/dusk/menu_pointer.cpp
src/dusk/menu_pointer.h
src/dusk/mods/loader/bundle_disk.cpp
src/dusk/mods/loader/bundle_zip.cpp
src/dusk/mods/loader/context.cpp
src/dusk/mods/loader/depgraph.cpp
src/dusk/mods/loader/depgraph.hpp
src/dusk/mods/loader/loader.cpp
src/dusk/mods/loader/loader.hpp
src/dusk/mods/loader/native_module.cpp
src/dusk/mods/loader/native_module.hpp
src/dusk/mods/loader/prepatch.cpp
src/dusk/mods/loader/prepatch.hpp
src/dusk/mods/log_buffer.cpp
src/dusk/mods/log_buffer.hpp
src/dusk/mods/manifest.cpp
src/dusk/mods/manifest.hpp
src/dusk/mods/svc/camera.cpp
src/dusk/mods/svc/config.cpp
src/dusk/mods/svc/config.hpp
src/dusk/mods/svc/game.cpp
src/dusk/mods/svc/gfx.cpp
src/dusk/mods/svc/hook.cpp
src/dusk/mods/svc/host.cpp
src/dusk/mods/svc/log.cpp
src/dusk/mods/svc/overlay.cpp
src/dusk/mods/svc/registry.cpp
src/dusk/mods/svc/registry.hpp
src/dusk/mods/svc/resource.cpp
src/dusk/mods/svc/texture.cpp
src/dusk/mods/svc/ui.cpp
src/dusk/mods/svc/ui.hpp
src/dusk/mods/svc/window.cpp
src/dusk/mods/svc/window.hpp
src/dusk/mouse.cpp
src/dusk/scope_guard.hpp
src/dusk/settings.cpp
src/dusk/speedrun.cpp
src/dusk/stubs.cpp
src/dusk/texture_replacements.cpp
src/dusk/texture_replacements.hpp
src/dusk/touch_camera.cpp
src/dusk/ui/achievements.cpp src/dusk/ui/achievements.cpp
src/dusk/ui/achievements.hpp src/dusk/ui/achievements.hpp
src/dusk/ui/bool_button.cpp src/dusk/ui/bool_button.cpp
@@ -1481,9 +1518,9 @@ set(DUSK_FILES
src/dusk/ui/button.hpp src/dusk/ui/button.hpp
src/dusk/ui/component.cpp src/dusk/ui/component.cpp
src/dusk/ui/component.hpp src/dusk/ui/component.hpp
src/dusk/ui/controls.hpp
src/dusk/ui/controller_config.cpp src/dusk/ui/controller_config.cpp
src/dusk/ui/controller_config.hpp src/dusk/ui/controller_config.hpp
src/dusk/ui/controls.hpp
src/dusk/ui/document.cpp src/dusk/ui/document.cpp
src/dusk/ui/document.hpp src/dusk/ui/document.hpp
src/dusk/ui/editor.cpp src/dusk/ui/editor.cpp
@@ -1492,18 +1529,22 @@ set(DUSK_FILES
src/dusk/ui/event.hpp src/dusk/ui/event.hpp
src/dusk/ui/graphics_tuner.cpp src/dusk/ui/graphics_tuner.cpp
src/dusk/ui/graphics_tuner.hpp src/dusk/ui/graphics_tuner.hpp
src/dusk/ui/input.cpp
src/dusk/ui/input.hpp
src/dusk/ui/icon_provider.cpp src/dusk/ui/icon_provider.cpp
src/dusk/ui/icon_provider.hpp src/dusk/ui/icon_provider.hpp
src/dusk/ui/input.cpp
src/dusk/ui/input.hpp
src/dusk/ui/logs_window.cpp src/dusk/ui/logs_window.cpp
src/dusk/ui/logs_window.hpp src/dusk/ui/logs_window.hpp
src/dusk/ui/menu_bar.cpp
src/dusk/ui/menu_bar.hpp
src/dusk/ui/mod_texture_provider.cpp src/dusk/ui/mod_texture_provider.cpp
src/dusk/ui/mod_texture_provider.hpp src/dusk/ui/mod_texture_provider.hpp
src/dusk/ui/mod_window.cpp src/dusk/ui/mod_window.cpp
src/dusk/ui/mod_window.hpp src/dusk/ui/mod_window.hpp
src/dusk/ui/modal.cpp src/dusk/ui/modal.cpp
src/dusk/ui/modal.hpp src/dusk/ui/modal.hpp
src/dusk/ui/mods_window.cpp
src/dusk/ui/mods_window.hpp
src/dusk/ui/nav_types.hpp src/dusk/ui/nav_types.hpp
src/dusk/ui/number_button.cpp src/dusk/ui/number_button.cpp
src/dusk/ui/number_button.hpp src/dusk/ui/number_button.hpp
@@ -1511,10 +1552,6 @@ set(DUSK_FILES
src/dusk/ui/overlay.hpp src/dusk/ui/overlay.hpp
src/dusk/ui/pane.cpp src/dusk/ui/pane.cpp
src/dusk/ui/pane.hpp src/dusk/ui/pane.hpp
src/dusk/ui/menu_bar.cpp
src/dusk/ui/menu_bar.hpp
src/dusk/ui/mods_window.cpp
src/dusk/ui/mods_window.hpp
src/dusk/ui/prelaunch.cpp src/dusk/ui/prelaunch.cpp
src/dusk/ui/prelaunch.hpp src/dusk/ui/prelaunch.hpp
src/dusk/ui/preset.cpp src/dusk/ui/preset.cpp
@@ -1529,10 +1566,10 @@ set(DUSK_FILES
src/dusk/ui/string_button.hpp src/dusk/ui/string_button.hpp
src/dusk/ui/tab_bar.cpp src/dusk/ui/tab_bar.cpp
src/dusk/ui/tab_bar.hpp src/dusk/ui/tab_bar.hpp
src/dusk/ui/touch_controls_common.cpp
src/dusk/ui/touch_controls_common.hpp
src/dusk/ui/touch_controls.cpp src/dusk/ui/touch_controls.cpp
src/dusk/ui/touch_controls.hpp src/dusk/ui/touch_controls.hpp
src/dusk/ui/touch_controls_common.cpp
src/dusk/ui/touch_controls_common.hpp
src/dusk/ui/touch_controls_editor.cpp src/dusk/ui/touch_controls_editor.cpp
src/dusk/ui/touch_controls_editor.hpp src/dusk/ui/touch_controls_editor.hpp
src/dusk/ui/ui.cpp src/dusk/ui/ui.cpp
@@ -1541,45 +1578,13 @@ set(DUSK_FILES
src/dusk/ui/warp.hpp src/dusk/ui/warp.hpp
src/dusk/ui/window.cpp src/dusk/ui/window.cpp
src/dusk/ui/window.hpp src/dusk/ui/window.hpp
src/dusk/achievements.cpp src/dusk/update_check.cpp
src/dusk/iso_validate.cpp src/dusk/update_check.hpp
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/mods/log_buffer.cpp
src/dusk/mods/log_buffer.hpp
src/dusk/mods/manifest.cpp
src/dusk/mods/manifest.hpp
src/dusk/mods/loader/bundle_disk.cpp
src/dusk/mods/loader/bundle_zip.cpp
src/dusk/mods/loader/context.cpp
src/dusk/mods/loader/depgraph.cpp
src/dusk/mods/loader/depgraph.hpp
src/dusk/mods/loader/loader.cpp
src/dusk/mods/loader/loader.hpp
src/dusk/mods/loader/native_module.cpp
src/dusk/mods/loader/native_module.hpp
src/dusk/mods/svc/config.cpp
src/dusk/mods/svc/config.hpp
src/dusk/mods/svc/game.cpp
src/dusk/mods/svc/hook.cpp
src/dusk/mods/svc/host.cpp
src/dusk/mods/svc/log.cpp
src/dusk/mods/svc/overlay.cpp
src/dusk/mods/svc/resource.cpp
src/dusk/mods/svc/texture.cpp
src/dusk/mods/svc/ui.cpp
src/dusk/mods/svc/ui.hpp
src/dusk/mods/svc/registry.cpp
src/dusk/mods/svc/registry.hpp
src/dusk/discord.cpp
src/dusk/discord.hpp
src/dusk/discord_presence.cpp
src/dusk/version.cpp src/dusk/version.cpp
src/dusk/action_bindings.cpp src/helpers/batch.cpp
src/helpers/endian.cpp
src/helpers/offset_ptr.cpp
src/helpers/string.cpp
) )
set(DUSK_HTTP_BACKEND_FILES set(DUSK_HTTP_BACKEND_FILES
+18 -27
View File
@@ -2,6 +2,7 @@
description = "Dusklight native PC port of the Twilight Princess decompilation"; description = "Dusklight native PC port of the Twilight Princess decompilation";
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
inputs.self.submodules = true;
outputs = outputs =
{ self, nixpkgs }: { self, nixpkgs }:
@@ -58,21 +59,6 @@
hasNodPrebuilt = nodPrebuiltInfo ? ${system}; hasNodPrebuilt = nodPrebuiltInfo ? ${system};
aurora = builtins.pathExists "${self}/extern/aurora/CMakeLists.txt"; 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 { dawn = pkgs.fetchzip {
url = "https://github.com/encounter/dawn/releases/download/${dawnVersion}/dawn-${dawnInfo.${system}.triple}.tar.gz"; url = "https://github.com/encounter/dawn/releases/download/${dawnVersion}/dawn-${dawnInfo.${system}.triple}.tar.gz";
@@ -140,6 +126,14 @@
JSON = pkgs.nlohmann_json.src; JSON = pkgs.nlohmann_json.src;
XXHASH = pkgs.xxhash.src; XXHASH = pkgs.xxhash.src;
ZSTD = pkgs.zstd.src; ZSTD = pkgs.zstd.src;
MINIZ = pkgs.fetchzip {
url = "https://github.com/richgel999/miniz/releases/download/3.0.2/miniz-3.0.2.zip";
hash = "sha256-DXysXkQEmoDAMMg1F8KexkwpXNyiHNzLJqXR9SMEkxk=";
stripRoot = false;
};
FMT = pkgs.fetchzip { FMT = pkgs.fetchzip {
url = "https://github.com/fmtlib/fmt/archive/refs/tags/12.1.0.tar.gz"; url = "https://github.com/fmtlib/fmt/archive/refs/tags/12.1.0.tar.gz";
hash = "sha256-ZmI1Dv0ZabPlxa02OpERI47jp7zFfjpeWCy1WyuPYZ0="; hash = "sha256-ZmI1Dv0ZabPlxa02OpERI47jp7zFfjpeWCy1WyuPYZ0=";
@@ -165,19 +159,16 @@
}; };
dusklight = dusklight =
if !aurora then pkgs.stdenv.mkDerivation {
throw needSubmodules pname = "dusklight";
else version = versionSuffix;
pkgs.stdenv.mkDerivation { src = ./.;
pname = "dusklight";
version = versionSuffix;
src = ./.;
postUnpack = '' postUnpack = ''
chmod -R u+w "$sourceRoot" chmod -R u+w "$sourceRoot"
substituteInPlace "$sourceRoot/extern/aurora/CMakeLists.txt" \ substituteInPlace "$sourceRoot/extern/aurora/CMakeLists.txt" \
--replace-warn "add_subdirectory(tests)" "" --replace-warn "add_subdirectory(tests)" ""
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
pkgs.cmake pkgs.cmake
+3 -3
View File
@@ -88,9 +88,9 @@ struct DynamicModuleControl : DynamicModuleControlBase {
/* 0x24 */ s32 mSize; /* 0x24 */ s32 mSize;
/* 0x28 */ mDoDvdThd_callback_c* mAsyncLoadCallback; /* 0x28 */ mDoDvdThd_callback_c* mAsyncLoadCallback;
static u32 sAllocBytes; static DUSK_GAME_DATA u32 sAllocBytes;
static JKRArchive* sArchive; static DUSK_GAME_DATA JKRArchive* sArchive;
static JKRFileCache* sFileCache; static DUSK_GAME_DATA JKRFileCache* sFileCache;
}; };
#endif /* DYNAMICLINK_H */ #endif /* DYNAMICLINK_H */
+1 -1
View File
@@ -12,6 +12,6 @@ struct cAPI_Interface {
/* 0x14 */ cAPIGph_Mthd blankingOffMtd; /* 0x14 */ cAPIGph_Mthd blankingOffMtd;
}; };
extern cAPI_Interface g_cAPI_Interface; DUSK_GAME_EXTERN cAPI_Interface g_cAPI_Interface;
#endif /* C_API_H */ #endif /* C_API_H */
+5 -5
View File
@@ -24,11 +24,11 @@ private:
s16 mAngle; s16 mAngle;
public: public:
const static cSAngle _0; const static DUSK_GAME_DATA cSAngle _0;
const static cSAngle _1; const static DUSK_GAME_DATA cSAngle _1;
const static cSAngle _90; const static DUSK_GAME_DATA cSAngle _90;
const static cSAngle _180; const static DUSK_GAME_DATA cSAngle _180;
const static cSAngle _270; const static DUSK_GAME_DATA cSAngle _270;
#ifdef __MWERKS__ #ifdef __MWERKS__
cSAngle() {} cSAngle() {}
~cSAngle() {} ~cSAngle() {}
+1 -1
View File
@@ -5,7 +5,7 @@
#include "f_pc/f_pc_base.h" #include "f_pc/f_pc_base.h"
#include "SSystem/SComponent/c_bg_s_grp_pass_chk.h" #include "SSystem/SComponent/c_bg_s_grp_pass_chk.h"
#include "SSystem/SComponent/c_bg_s_poly_pass_chk.h" #include "SSystem/SComponent/c_bg_s_poly_pass_chk.h"
#include "dusk/endian.h" #include "helpers/endian.h"
struct cBgD_Vtx_t : public Vec {}; struct cBgD_Vtx_t : public Vec {};
+1 -1
View File
@@ -435,7 +435,7 @@ public:
cM3dGAab& GetWorkAab() { return mAab; } cM3dGAab& GetWorkAab() { return mAab; }
static cXyz m_virtual_center; static DUSK_GAME_DATA cXyz m_virtual_center;
}; };
STATIC_ASSERT(0x20 == sizeof(cCcD_ShapeAttr)); STATIC_ASSERT(0x20 == sizeof(cCcD_ShapeAttr));
+1 -1
View File
@@ -9,7 +9,7 @@ struct counter_class {
u32 mTimer; u32 mTimer;
}; };
extern counter_class g_Counter; DUSK_GAME_EXTERN counter_class g_Counter;
void cCt_Counter(int resetCounter1); void cCt_Counter(int resetCounter1);
+1 -1
View File
@@ -102,6 +102,6 @@ void MtxPosition(cXyz DUSK_CONST*, cXyz*);
void MtxPush(void); void MtxPush(void);
void MtxPull(void); void MtxPull(void);
extern Mtx* calc_mtx; DUSK_GAME_EXTERN Mtx* calc_mtx;
#endif #endif
+1 -1
View File
@@ -20,7 +20,7 @@ struct cM3d_Range {
}; };
#define G_CM3D_F_INF (1000000000.0f) #define G_CM3D_F_INF (1000000000.0f)
extern const f32 G_CM3D_F_ABS_MIN; DUSK_GAME_EXTERN const f32 G_CM3D_F_ABS_MIN;
static void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*); static void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*);
void cM3d_InDivPos2(const Vec*, const Vec*, f32, Vec*); void cM3d_InDivPos2(const Vec*, const Vec*, f32, Vec*);
+1 -1
View File
@@ -2,7 +2,7 @@
#define C_M3D_G_TRI_H_ #define C_M3D_G_TRI_H_
#include "SSystem/SComponent/c_m3d_g_pla.h" #include "SSystem/SComponent/c_m3d_g_pla.h"
#include "dusk/endian.h" #include "helpers/endian.h"
class cM3dGCyl; class cM3dGCyl;
+1 -1
View File
@@ -6,7 +6,7 @@
class JKRHeap; class JKRHeap;
struct cMl { struct cMl {
static JKRHeap* Heap; static DUSK_GAME_DATA JKRHeap* Heap;
static void init(JKRHeap*); static void init(JKRHeap*);
static void* memalignB(int, u32); static void* memalignB(int, u32);
static void free(void*); static void free(void*);
+1 -1
View File
@@ -9,7 +9,7 @@ struct SVec {
class csXyz : public SVec { class csXyz : public SVec {
public: public:
static const csXyz Zero; static DUSK_GAME_DATA const csXyz Zero;
~csXyz() {} ~csXyz() {}
csXyz() {} csXyz() {}
csXyz(s16, s16, s16); csXyz(s16, s16, s16);
+8 -8
View File
@@ -14,14 +14,14 @@ struct cXy {
}; };
struct cXyz : Vec { struct cXyz : Vec {
static const cXyz Zero; static DUSK_GAME_DATA const cXyz Zero;
static const cXyz BaseX; static DUSK_GAME_DATA const cXyz BaseX;
static const cXyz BaseY; static DUSK_GAME_DATA const cXyz BaseY;
static const cXyz BaseZ; static DUSK_GAME_DATA const cXyz BaseZ;
static const cXyz BaseXY; static DUSK_GAME_DATA const cXyz BaseXY;
static const cXyz BaseXZ; static DUSK_GAME_DATA const cXyz BaseXZ;
static const cXyz BaseYZ; static DUSK_GAME_DATA const cXyz BaseYZ;
static const cXyz BaseXYZ; static DUSK_GAME_DATA const cXyz BaseXYZ;
#ifdef __MWERKS__ #ifdef __MWERKS__
cXyz() {} cXyz() {}
~cXyz() {} ~cXyz() {}
+2 -2
View File
@@ -256,7 +256,7 @@ inline Z2Audience* Z2GetAudience() {
return JASGlobalInstance<Z2Audience>::getInstance(); return JASGlobalInstance<Z2Audience>::getInstance();
} }
extern s8 data_80451358; DUSK_GAME_EXTERN s8 data_80451358;
extern s8 data_80451359; DUSK_GAME_EXTERN s8 data_80451359;
#endif /* Z2AUDIENCE_H */ #endif /* Z2AUDIENCE_H */
+1 -1
View File
@@ -34,7 +34,7 @@ public:
bool isResetting() { return mResettingFlag; } bool isResetting() { return mResettingFlag; }
static Z2AudioMgr* getInterface() { return mAudioMgrPtr; } static Z2AudioMgr* getInterface() { return mAudioMgrPtr; }
static Z2AudioMgr* mAudioMgrPtr; static DUSK_GAME_DATA Z2AudioMgr* mAudioMgrPtr;
/* 0x0514 */ virtual bool startSound(JAISoundID soundID, JAISoundHandle* handle, const JGeometry::TVec3<f32>* posPtr); /* 0x0514 */ virtual bool startSound(JAISoundID soundID, JAISoundHandle* handle, const JGeometry::TVec3<f32>* posPtr);
/* 0x0518 */ bool mResettingFlag; /* 0x0518 */ bool mResettingFlag;
+2 -2
View File
@@ -42,8 +42,8 @@ f32 getParamByExp(f32 value, f32 inMin, f32 inMax, f32 exponent, f32 outMin, f32
f32 getRandom(f32 magnitude, f32 exponent, f32 bias); f32 getRandom(f32 magnitude, f32 exponent, f32 bias);
f32 getRandom_0_1(); f32 getRandom_0_1();
extern const f32 cEqualCSlope; DUSK_GAME_EXTERN const f32 cEqualCSlope;
extern const f32 cEqualPSlope; DUSK_GAME_EXTERN const f32 cEqualPSlope;
} // namespace Z2Calc } // namespace Z2Calc
#endif /* Z2CALC_H */ #endif /* Z2CALC_H */
+1 -1
View File
@@ -175,7 +175,7 @@ struct Z2EnvSeMgr : public JASGlobalInstance<Z2EnvSeMgr> {
STATIC_ASSERT(sizeof(Z2EnvSeMgr) == 0x30C); STATIC_ASSERT(sizeof(Z2EnvSeMgr) == 0x30C);
extern Z2EnvSeMgr g_mEnvSeMgr; DUSK_GAME_EXTERN Z2EnvSeMgr g_mEnvSeMgr;
inline Z2EnvSeMgr* Z2GetEnvSeMgr() { inline Z2EnvSeMgr* Z2GetEnvSeMgr() {
return JASGlobalInstance<Z2EnvSeMgr>::getInstance(); return JASGlobalInstance<Z2EnvSeMgr>::getInstance();
+1 -1
View File
@@ -57,7 +57,7 @@ public:
void setUsingIronBall(bool isUsingIronBall) { mUsingIronBall = isUsingIronBall; } void setUsingIronBall(bool isUsingIronBall) { mUsingIronBall = isUsingIronBall; }
void setMarkState(u8 state) { mMarkState = state; } void setMarkState(u8 state) { mMarkState = state; }
static Z2CreatureLink* mLinkPtr; static DUSK_GAME_DATA Z2CreatureLink* mLinkPtr;
static Z2CreatureLink* getLink() { return mLinkPtr; } static Z2CreatureLink* getLink() { return mLinkPtr; }
friend class Z2LinkSoundStarter; friend class Z2LinkSoundStarter;
+52 -52
View File
@@ -4,72 +4,72 @@
#include <types.h> #include <types.h>
struct Z2Param { struct Z2Param {
static f32 DISTANCE_MAX; static DUSK_GAME_DATA f32 DISTANCE_MAX;
static f32 MAX_VOLUME_DISTANCE; static DUSK_GAME_DATA f32 MAX_VOLUME_DISTANCE;
static f32 DOLBY_CENTER_VALUE; static DUSK_GAME_DATA f32 DOLBY_CENTER_VALUE;
static f32 DOLBY_FLONT_DISTANCE_MAX; static DUSK_GAME_DATA f32 DOLBY_FLONT_DISTANCE_MAX;
static f32 DOLBY_BEHIND_DISTANCE_MAX; static DUSK_GAME_DATA f32 DOLBY_BEHIND_DISTANCE_MAX;
static f32 DISTANCE_FX_PARAM; static DUSK_GAME_DATA f32 DISTANCE_FX_PARAM;
static f32 SONIC_SPEED; static DUSK_GAME_DATA f32 SONIC_SPEED;
static f32 VOL_BGM_DEFAULT; static DUSK_GAME_DATA f32 VOL_BGM_DEFAULT;
static f32 VOL_SE_SYSTEM_DEFAULT; static DUSK_GAME_DATA f32 VOL_SE_SYSTEM_DEFAULT;
static f32 VOL_SE_LINK_VOICE_DEFAULT; static DUSK_GAME_DATA f32 VOL_SE_LINK_VOICE_DEFAULT;
static f32 VOL_SE_LINK_MOTION_DEFAULT; static DUSK_GAME_DATA f32 VOL_SE_LINK_MOTION_DEFAULT;
static f32 VOL_SE_LINK_FOOTNOTE_DEFAULT; static DUSK_GAME_DATA f32 VOL_SE_LINK_FOOTNOTE_DEFAULT;
static f32 VOL_SE_CHAR_VOICE_DEFAULT; static DUSK_GAME_DATA f32 VOL_SE_CHAR_VOICE_DEFAULT;
static f32 VOL_SE_CHAR_MOVE_DEFAULT; static DUSK_GAME_DATA f32 VOL_SE_CHAR_MOVE_DEFAULT;
static f32 VOL_SE_OBJECT_DEFAULT; static DUSK_GAME_DATA f32 VOL_SE_OBJECT_DEFAULT;
static f32 VOL_SE_ATMOSPHERE_DEFAULT; static DUSK_GAME_DATA f32 VOL_SE_ATMOSPHERE_DEFAULT;
static f32 VOL_BGM_TALKING; static DUSK_GAME_DATA f32 VOL_BGM_TALKING;
static f32 VOL_SE_SYSTEM_TALKING; static DUSK_GAME_DATA f32 VOL_SE_SYSTEM_TALKING;
static f32 VOL_SE_LINK_VOICE_TALKING; static DUSK_GAME_DATA f32 VOL_SE_LINK_VOICE_TALKING;
static f32 VOL_SE_LINK_MOTION_TALKING; static DUSK_GAME_DATA f32 VOL_SE_LINK_MOTION_TALKING;
static f32 VOL_SE_LINK_FOOTNOTE_TALKING; static DUSK_GAME_DATA f32 VOL_SE_LINK_FOOTNOTE_TALKING;
static f32 VOL_SE_CHAR_VOICE_TALKING; static DUSK_GAME_DATA f32 VOL_SE_CHAR_VOICE_TALKING;
static f32 VOL_SE_CHAR_MOVE_TALKING; static DUSK_GAME_DATA f32 VOL_SE_CHAR_MOVE_TALKING;
static f32 VOL_SE_OBJECT_TALKING; static DUSK_GAME_DATA f32 VOL_SE_OBJECT_TALKING;
static f32 VOL_SE_ATMOSPHERE_TALKING; static DUSK_GAME_DATA f32 VOL_SE_ATMOSPHERE_TALKING;
static f32 VOL_BGM_PAUSING; static DUSK_GAME_DATA f32 VOL_BGM_PAUSING;
static f32 VOL_SE_SYSTEM_PAUSING; static DUSK_GAME_DATA f32 VOL_SE_SYSTEM_PAUSING;
static f32 VOL_SE_LINK_VOICE_PAUSING; static DUSK_GAME_DATA f32 VOL_SE_LINK_VOICE_PAUSING;
static f32 VOL_SE_LINK_MOTION_PAUSING; static DUSK_GAME_DATA f32 VOL_SE_LINK_MOTION_PAUSING;
static f32 VOL_SE_LINK_FOOTNOTE_PAUSING; static DUSK_GAME_DATA f32 VOL_SE_LINK_FOOTNOTE_PAUSING;
static f32 VOL_SE_CHAR_VOICE_PAUSING; static DUSK_GAME_DATA f32 VOL_SE_CHAR_VOICE_PAUSING;
static f32 VOL_SE_CHAR_MOVE_PAUSING; static DUSK_GAME_DATA f32 VOL_SE_CHAR_MOVE_PAUSING;
static f32 VOL_SE_OBJECT_PAUSING; static DUSK_GAME_DATA f32 VOL_SE_OBJECT_PAUSING;
static f32 VOL_SE_ATMOSPHERE_PAUSING; static DUSK_GAME_DATA f32 VOL_SE_ATMOSPHERE_PAUSING;
static f32 MIN_DISTANCE_VOLUME; static DUSK_GAME_DATA f32 MIN_DISTANCE_VOLUME;
static f32 ENEMY_LASTHIT_MUTE_VOLUME; static DUSK_GAME_DATA f32 ENEMY_LASTHIT_MUTE_VOLUME;
// made up names based on HIO labels // made up names based on HIO labels
static u8 SCENE_CHANGE_BGM_FADEOUT_TIME; static DUSK_GAME_DATA u8 SCENE_CHANGE_BGM_FADEOUT_TIME;
static u8 BGM_CROSS_FADEIN_TIME; static DUSK_GAME_DATA u8 BGM_CROSS_FADEIN_TIME;
static u8 BGM_CROSS_FADEOUT_TIME; static DUSK_GAME_DATA u8 BGM_CROSS_FADEOUT_TIME;
static u8 BATTLE_BGM_WAIT_TIME; static DUSK_GAME_DATA u8 BATTLE_BGM_WAIT_TIME;
static f32 ENEMY_NEARBY_DIST; static f32 ENEMY_NEARBY_DIST;
static f32 BATTLE_FADEIN_DIST; static f32 BATTLE_FADEIN_DIST;
static f32 BATTLE_FADEOUT_DIST; static f32 BATTLE_FADEOUT_DIST;
static u8 FOUND_TRACK_FI_TIME; static DUSK_GAME_DATA u8 FOUND_TRACK_FI_TIME;
static u8 FOUND_TRACK_FO_TIME; static DUSK_GAME_DATA u8 FOUND_TRACK_FO_TIME;
static u8 CLOSE_BATTLE_TRACK_FI_TIME; static DUSK_GAME_DATA u8 CLOSE_BATTLE_TRACK_FI_TIME;
static u8 CLOSE_BATTLE_TRACK_FO_TIME; static DUSK_GAME_DATA u8 CLOSE_BATTLE_TRACK_FO_TIME;
static u8 ENDING_BLOW_VOL_DOWN_TIME; static DUSK_GAME_DATA u8 ENDING_BLOW_VOL_DOWN_TIME;
static u8 ENDING_BLOW_VOL_LOWER_TIME; static DUSK_GAME_DATA u8 ENDING_BLOW_VOL_LOWER_TIME;
static u8 ENDING_BLOW_VOL_LOWER_RECOVER_TIME; static DUSK_GAME_DATA u8 ENDING_BLOW_VOL_LOWER_RECOVER_TIME;
static u8 ENDING_BLOW_MIN_FINISH_TIME; static DUSK_GAME_DATA u8 ENDING_BLOW_MIN_FINISH_TIME;
static u8 DARK_SE_FILTER_ON; static DUSK_GAME_DATA u8 DARK_SE_FILTER_ON;
static u8 DARK_SE_LOW_PASS_FILTER_SETTING; static DUSK_GAME_DATA u8 DARK_SE_LOW_PASS_FILTER_SETTING;
static u8 SYSTEM_SE_USE_DARK_SE_SETTING; static DUSK_GAME_DATA u8 SYSTEM_SE_USE_DARK_SE_SETTING;
static f32 AUDIBLE_DELTA_RANGE_VOLUME; static f32 AUDIBLE_DELTA_RANGE_VOLUME;
static f32 AUDIBLE_DELTA_RANGE_PAN; static f32 AUDIBLE_DELTA_RANGE_PAN;
static f32 AUDIBLE_DELTA_RANGE_DOLBY; static f32 AUDIBLE_DELTA_RANGE_DOLBY;
}; };
extern u8 data_8045086C; DUSK_GAME_EXTERN u8 data_8045086C;
#endif /* Z2PARAM_H */ #endif /* Z2PARAM_H */
+1 -1
View File
@@ -47,7 +47,7 @@ public:
s32 getBgmLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 1); } s32 getBgmLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 1); }
u8 getDemoSeWaveNum() { return loadedDemoWave; } u8 getDemoSeWaveNum() { return loadedDemoWave; }
private: // private:
/* 0x00 */ JAISoundID BGM_ID; /* 0x00 */ JAISoundID BGM_ID;
/* 0x04 */ int sceneNum; /* 0x04 */ int sceneNum;
/* 0x08 */ int timer; /* 0x08 */ int timer;
+10 -10
View File
@@ -12,18 +12,18 @@ public:
BOOL cDmrNowMidnaTalk(); BOOL cDmrNowMidnaTalk();
extern u8 cDmr_SkipInfo; DUSK_GAME_EXTERN u8 cDmr_SkipInfo;
extern u8 data_80450C99; DUSK_GAME_EXTERN u8 data_80450C99;
extern u8 data_80450C9A; DUSK_GAME_EXTERN u8 data_80450C9A;
extern u8 data_80450C9B; DUSK_GAME_EXTERN u8 data_80450C9B;
extern u8 data_80450C9C; DUSK_GAME_EXTERN u8 data_80450C9C;
extern u8 data_80450C9D; DUSK_GAME_EXTERN u8 data_80450C9D;
extern u8 data_80450C9E; DUSK_GAME_EXTERN u8 data_80450C9E;
extern u8 cDmr_FishingWether; DUSK_GAME_EXTERN u8 cDmr_FishingWether;
extern u8 data_80450CA0; DUSK_GAME_EXTERN u8 data_80450CA0;
extern "C" { extern "C" {
extern JPTraceParticleCallBack4 JPTracePCB4; DUSK_GAME_EXTERN JPTraceParticleCallBack4 JPTracePCB4;
} }
void debug_actor_create(); void debug_actor_create();
+127 -127
View File
@@ -57,8 +57,8 @@ public:
void setNowOffsetX(f32 i_offset) { mNowOffsetX = i_offset; } void setNowOffsetX(f32 i_offset) { mNowOffsetX = i_offset; }
void setNowOffsetY(f32 i_offset) { mNowOffsetY = i_offset; } void setNowOffsetY(f32 i_offset) { mNowOffsetY = i_offset; }
static bool m_eye_move_flg; static DUSK_GAME_DATA bool m_eye_move_flg;
static u8 m_morf_frame; static DUSK_GAME_DATA u8 m_morf_frame;
/* 0x0F4 */ mutable f32 field_0xf4; /* 0x0F4 */ mutable f32 field_0xf4;
/* 0x0F8 */ mutable f32 field_0xf8; /* 0x0F8 */ mutable f32 field_0xf8;
@@ -3913,20 +3913,20 @@ public:
static u32 getOtherHeapSize() { return 0xF0A60; } static u32 getOtherHeapSize() { return 0xF0A60; }
static daAlink_BckData const m_mainBckShield[20]; static DUSK_GAME_DATA daAlink_BckData const m_mainBckShield[20];
static daAlink_BckData const m_mainBckSword[5]; static DUSK_GAME_DATA daAlink_BckData const m_mainBckSword[5];
static daAlink_BckData const m_mainBckFishing[28]; static DUSK_GAME_DATA daAlink_BckData const m_mainBckFishing[28];
static daAlink_AnmData const m_anmDataTable[ANM_MAX]; static DUSK_GAME_DATA daAlink_AnmData const m_anmDataTable[ANM_MAX];
static daAlink_WlAnmData const m_wlAnmDataTable[WANM_MAX]; static DUSK_GAME_DATA daAlink_WlAnmData const m_wlAnmDataTable[WANM_MAX];
static daAlink_FaceTexData const m_faceTexDataTable[]; static DUSK_GAME_DATA daAlink_FaceTexData const m_faceTexDataTable[];
static Vec const m_handLeftOutSidePos; static DUSK_GAME_DATA Vec const m_handLeftOutSidePos;
static Vec const m_handRightOutSidePos; static DUSK_GAME_DATA Vec const m_handRightOutSidePos;
static Vec const m_handLeftInSidePos; static DUSK_GAME_DATA Vec const m_handLeftInSidePos;
static Vec const m_handRightInSidePos; static DUSK_GAME_DATA Vec const m_handRightInSidePos;
static const daAlink_procInitTable m_procInitTable[]; static DUSK_GAME_DATA const daAlink_procInitTable m_procInitTable[];
static daAlink_procFunc m_demoInitTable[]; static DUSK_GAME_DATA daAlink_procFunc m_demoInitTable[];
static const EffParamProc m_fEffParamProc[]; static DUSK_GAME_DATA const EffParamProc m_fEffParamProc[];
/* 0x0062C */ request_of_phase_process_class mPhaseReq; /* 0x0062C */ request_of_phase_process_class mPhaseReq;
/* 0x00634 */ const char* mArcName; /* 0x00634 */ const char* mArcName;
@@ -4649,7 +4649,7 @@ struct daAlinkHIO_basic_c1 {
class daAlinkHIO_basic_c0 { class daAlinkHIO_basic_c0 {
public: public:
static daAlinkHIO_basic_c1 const m; static DUSK_GAME_DATA daAlinkHIO_basic_c1 const m;
}; };
class daAlinkHIO_basic_c : public daAlinkHIO_data_c { class daAlinkHIO_basic_c : public daAlinkHIO_data_c {
@@ -4700,7 +4700,7 @@ public:
class daAlinkHIO_move_c0 { class daAlinkHIO_move_c0 {
public: public:
static daAlinkHIO_move_c1 const m; static DUSK_GAME_DATA daAlinkHIO_move_c1 const m;
}; };
class daAlinkHIO_move_c : public daAlinkHIO_data_c { class daAlinkHIO_move_c : public daAlinkHIO_data_c {
@@ -4746,7 +4746,7 @@ public:
class daAlinkHIO_atnMove_c0 { class daAlinkHIO_atnMove_c0 {
public: public:
static daAlinkHIO_atnMove_c1 const m; static DUSK_GAME_DATA daAlinkHIO_atnMove_c1 const m;
}; };
class daAlinkHIO_atnMove_c : public daAlinkHIO_data_c { class daAlinkHIO_atnMove_c : public daAlinkHIO_data_c {
@@ -4792,7 +4792,7 @@ public:
class daAlinkHIO_noActAtnMove_c0 { class daAlinkHIO_noActAtnMove_c0 {
public: public:
static daAlinkHIO_noActAtnMove_c1 const m; static DUSK_GAME_DATA daAlinkHIO_noActAtnMove_c1 const m;
}; };
class daAlinkHIO_noActAtnMove_c : public daAlinkHIO_data_c { class daAlinkHIO_noActAtnMove_c : public daAlinkHIO_data_c {
@@ -4834,7 +4834,7 @@ public:
class daAlinkHIO_frontRoll_c0 { class daAlinkHIO_frontRoll_c0 {
public: public:
static daAlinkHIO_frontRoll_c1 const m; static DUSK_GAME_DATA daAlinkHIO_frontRoll_c1 const m;
}; };
class daAlinkHIO_frontRoll_c : public daAlinkHIO_data_c { class daAlinkHIO_frontRoll_c : public daAlinkHIO_data_c {
@@ -4864,7 +4864,7 @@ public:
class daAlinkHIO_backJump_c0 { class daAlinkHIO_backJump_c0 {
public: public:
static daAlinkHIO_backJump_c1 const m; static DUSK_GAME_DATA daAlinkHIO_backJump_c1 const m;
}; };
class daAlinkHIO_backJump_c : public daAlinkHIO_data_c { class daAlinkHIO_backJump_c : public daAlinkHIO_data_c {
@@ -4898,7 +4898,7 @@ public:
class daAlinkHIO_sideStep_c0 { class daAlinkHIO_sideStep_c0 {
public: public:
static daAlinkHIO_sideStep_c1 const m; static DUSK_GAME_DATA daAlinkHIO_sideStep_c1 const m;
}; };
class daAlinkHIO_sideStep_c : public daAlinkHIO_data_c { class daAlinkHIO_sideStep_c : public daAlinkHIO_data_c {
@@ -4936,7 +4936,7 @@ public:
class daAlinkHIO_slide_c0 { class daAlinkHIO_slide_c0 {
public: public:
static daAlinkHIO_slide_c1 const m; static DUSK_GAME_DATA daAlinkHIO_slide_c1 const m;
}; };
class daAlinkHIO_slide_c : public daAlinkHIO_data_c { class daAlinkHIO_slide_c : public daAlinkHIO_data_c {
@@ -4964,27 +4964,27 @@ public:
class daAlinkHIO_cutNmV_c0 { class daAlinkHIO_cutNmV_c0 {
public: public:
static daAlinkHIO_cutNormal_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
}; };
class daAlinkHIO_cutNmL_c0 { class daAlinkHIO_cutNmL_c0 {
public: public:
static daAlinkHIO_cutNormal_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
}; };
class daAlinkHIO_cutNmR_c0 { class daAlinkHIO_cutNmR_c0 {
public: public:
static daAlinkHIO_cutNormal_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
}; };
class daAlinkHIO_cutNmSL_c0 { class daAlinkHIO_cutNmSL_c0 {
public: public:
static daAlinkHIO_cutNormal_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
}; };
class daAlinkHIO_cutNmSR_c0 { class daAlinkHIO_cutNmSR_c0 {
public: public:
static daAlinkHIO_cutNormal_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutNormal_c1 const m;
}; };
class daAlinkHIO_cutNormal_c : public daAlinkHIO_data_c { class daAlinkHIO_cutNormal_c : public daAlinkHIO_data_c {
@@ -5015,32 +5015,32 @@ public:
class daAlinkHIO_cutFnL_c0 { class daAlinkHIO_cutFnL_c0 {
public: public:
static daAlinkHIO_cutFinish_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
}; };
class daAlinkHIO_cutFnV_c0 { class daAlinkHIO_cutFnV_c0 {
public: public:
static daAlinkHIO_cutFinish_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
}; };
class daAlinkHIO_cutFnS_c0 { class daAlinkHIO_cutFnS_c0 {
public: public:
static daAlinkHIO_cutFinish_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
}; };
class daAlinkHIO_cutFnSl_c0 { class daAlinkHIO_cutFnSl_c0 {
public: public:
static daAlinkHIO_cutFinish_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
}; };
class daAlinkHIO_cutFnSm_c0 { class daAlinkHIO_cutFnSm_c0 {
public: public:
static daAlinkHIO_cutFinish_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
}; };
class daAlinkHIO_cutFnR_c0 { class daAlinkHIO_cutFnR_c0 {
public: public:
static daAlinkHIO_cutFinish_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutFinish_c1 const m;
}; };
class daAlinkHIO_cutFinish_c : public daAlinkHIO_data_c { class daAlinkHIO_cutFinish_c : public daAlinkHIO_data_c {
@@ -5077,7 +5077,7 @@ public:
class daAlinkHIO_cutFnJU_c0 { class daAlinkHIO_cutFnJU_c0 {
public: public:
static daAlinkHIO_cutFnJU_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutFnJU_c1 const m;
}; };
class daAlinkHIO_cutFnJU_c : public daAlinkHIO_data_c { class daAlinkHIO_cutFnJU_c : public daAlinkHIO_data_c {
@@ -5104,17 +5104,17 @@ public:
class daAlinkHIO_cutDaL_c0 { class daAlinkHIO_cutDaL_c0 {
public: public:
static daAlinkHIO_cutDash_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutDash_c1 const m;
}; };
class daAlinkHIO_cutDaR_c0 { class daAlinkHIO_cutDaR_c0 {
public: public:
static daAlinkHIO_cutDash_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutDash_c1 const m;
}; };
class daAlinkHIO_cutDaCharge_c0 { class daAlinkHIO_cutDaCharge_c0 {
public: public:
static daAlinkHIO_cutDash_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutDash_c1 const m;
}; };
class daAlinkHIO_cutDash_c : public daAlinkHIO_data_c { class daAlinkHIO_cutDash_c : public daAlinkHIO_data_c {
@@ -5146,7 +5146,7 @@ public:
class daAlinkHIO_cutJump_c0 { class daAlinkHIO_cutJump_c0 {
public: public:
static daAlinkHIO_cutJump_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutJump_c1 const m;
}; };
class daAlinkHIO_cutJump_c : public daAlinkHIO_data_c { class daAlinkHIO_cutJump_c : public daAlinkHIO_data_c {
@@ -5197,7 +5197,7 @@ public:
class daAlinkHIO_cutTurn_c0 { class daAlinkHIO_cutTurn_c0 {
public: public:
static daAlinkHIO_cutTurn_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutTurn_c1 const m;
}; };
class daAlinkHIO_cutTurn_c : public daAlinkHIO_data_c { class daAlinkHIO_cutTurn_c : public daAlinkHIO_data_c {
@@ -5225,22 +5225,22 @@ public:
class daAlinkHIO_hoCutLA_c0 { class daAlinkHIO_hoCutLA_c0 {
public: public:
static daAlinkHIO_hoCut_c1 const m; static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m;
}; };
class daAlinkHIO_hoCutLB_c0 { class daAlinkHIO_hoCutLB_c0 {
public: public:
static daAlinkHIO_hoCut_c1 const m; static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m;
}; };
class daAlinkHIO_hoCutRA_c0 { class daAlinkHIO_hoCutRA_c0 {
public: public:
static daAlinkHIO_hoCut_c1 const m; static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m;
}; };
class daAlinkHIO_hoCutRB_c0 { class daAlinkHIO_hoCutRB_c0 {
public: public:
static daAlinkHIO_hoCut_c1 const m; static DUSK_GAME_DATA daAlinkHIO_hoCut_c1 const m;
}; };
class daAlinkHIO_hoCut_c : public daAlinkHIO_data_c { class daAlinkHIO_hoCut_c : public daAlinkHIO_data_c {
@@ -5273,7 +5273,7 @@ public:
class daAlinkHIO_hoCutCharge_c0 { class daAlinkHIO_hoCutCharge_c0 {
public: public:
static daAlinkHIO_hoCutCharge_c1 const m; static DUSK_GAME_DATA daAlinkHIO_hoCutCharge_c1 const m;
}; };
class daAlinkHIO_hoCutCharge_c : public daAlinkHIO_data_c { class daAlinkHIO_hoCutCharge_c : public daAlinkHIO_data_c {
@@ -5307,7 +5307,7 @@ public:
class daAlinkHIO_cutDown_c0 { class daAlinkHIO_cutDown_c0 {
public: public:
static daAlinkHIO_cutDown_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutDown_c1 const m;
}; };
class daAlinkHIO_cutDown_c : public daAlinkHIO_data_c { class daAlinkHIO_cutDown_c : public daAlinkHIO_data_c {
@@ -5343,7 +5343,7 @@ public:
class daAlinkHIO_cutHead_c0 { class daAlinkHIO_cutHead_c0 {
public: public:
static daAlinkHIO_cutHead_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutHead_c1 const m;
}; };
class daAlinkHIO_cutHead_c : public daAlinkHIO_data_c { class daAlinkHIO_cutHead_c : public daAlinkHIO_data_c {
@@ -5380,7 +5380,7 @@ public:
class daAlinkHIO_cutLargeJump_c0 { class daAlinkHIO_cutLargeJump_c0 {
public: public:
static daAlinkHIO_cutLargeJump_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cutLargeJump_c1 const m;
}; };
class daAlinkHIO_cutLargeJump_c : public daAlinkHIO_data_c { class daAlinkHIO_cutLargeJump_c : public daAlinkHIO_data_c {
@@ -5457,7 +5457,7 @@ public:
static daAlinkHIO_cutDown_c0 const mCutDown; static daAlinkHIO_cutDown_c0 const mCutDown;
static daAlinkHIO_cutHead_c0 const mCutHead; static daAlinkHIO_cutHead_c0 const mCutHead;
static daAlinkHIO_cutLargeJump_c0 const mCutLargeJump; static daAlinkHIO_cutLargeJump_c0 const mCutLargeJump;
static daAlinkHIO_cut_c1 const m; static DUSK_GAME_DATA daAlinkHIO_cut_c1 const m;
}; };
class daAlinkHIO_cut_c : public daAlinkHIO_data_c { class daAlinkHIO_cut_c : public daAlinkHIO_data_c {
@@ -5513,12 +5513,12 @@ public:
class daAlinkHIO_gAtPush_c0 { class daAlinkHIO_gAtPush_c0 {
public: public:
static daAlinkHIO_guardAttack_c1 const m; static DUSK_GAME_DATA daAlinkHIO_guardAttack_c1 const m;
}; };
class daAlinkHIO_gAtKick_c0 { class daAlinkHIO_gAtKick_c0 {
public: public:
static daAlinkHIO_guardAttack_c1 const m; static DUSK_GAME_DATA daAlinkHIO_guardAttack_c1 const m;
}; };
class daAlinkHIO_guardAttack_c : public daAlinkHIO_data_c { class daAlinkHIO_guardAttack_c : public daAlinkHIO_data_c {
@@ -5550,7 +5550,7 @@ public:
class daAlinkHIO_turnMove_c0 { class daAlinkHIO_turnMove_c0 {
public: public:
static daAlinkHIO_turnMove_c1 const m; static DUSK_GAME_DATA daAlinkHIO_turnMove_c1 const m;
}; };
class daAlinkHIO_turnMove_c : public daAlinkHIO_data_c { class daAlinkHIO_turnMove_c : public daAlinkHIO_data_c {
@@ -5595,7 +5595,7 @@ public:
static daAlinkHIO_gAtPush_c0 const mAtPush; static daAlinkHIO_gAtPush_c0 const mAtPush;
static daAlinkHIO_gAtKick_c0 const mAtKick; static daAlinkHIO_gAtKick_c0 const mAtKick;
static daAlinkHIO_turnMove_c0 const mTurnMove; static daAlinkHIO_turnMove_c0 const mTurnMove;
static daAlinkHIO_guard_c1 const m; static DUSK_GAME_DATA daAlinkHIO_guard_c1 const m;
}; };
class daAlinkHIO_guard_c : public daAlinkHIO_data_c { class daAlinkHIO_guard_c : public daAlinkHIO_data_c {
@@ -5634,7 +5634,7 @@ public:
class daAlinkHIO_crouch_c0 { class daAlinkHIO_crouch_c0 {
public: public:
static daAlinkHIO_crouch_c1 const m; static DUSK_GAME_DATA daAlinkHIO_crouch_c1 const m;
}; };
class daAlinkHIO_crouch_c : public daAlinkHIO_data_c { class daAlinkHIO_crouch_c : public daAlinkHIO_data_c {
@@ -5689,7 +5689,7 @@ public:
class daAlinkHIO_autoJump_c0 { class daAlinkHIO_autoJump_c0 {
public: public:
static daAlinkHIO_autoJump_c1 const m; static DUSK_GAME_DATA daAlinkHIO_autoJump_c1 const m;
}; };
class daAlinkHIO_autoJump_c : public daAlinkHIO_data_c { class daAlinkHIO_autoJump_c : public daAlinkHIO_data_c {
@@ -5719,7 +5719,7 @@ public:
class daAlinkHIO_smallJump_c0 { class daAlinkHIO_smallJump_c0 {
public: public:
static daAlinkHIO_smallJump_c1 const m; static DUSK_GAME_DATA daAlinkHIO_smallJump_c1 const m;
}; };
class daAlinkHIO_smallJump_c : public daAlinkHIO_data_c { class daAlinkHIO_smallJump_c : public daAlinkHIO_data_c {
@@ -5748,7 +5748,7 @@ public:
class daAlinkHIO_wallCatch_c0 { class daAlinkHIO_wallCatch_c0 {
public: public:
static daAlinkHIO_wallCatch_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wallCatch_c1 const m;
}; };
class daAlinkHIO_wallCatch_c : public daAlinkHIO_data_c { class daAlinkHIO_wallCatch_c : public daAlinkHIO_data_c {
@@ -5774,7 +5774,7 @@ public:
class daAlinkHIO_wallFall_c0 { class daAlinkHIO_wallFall_c0 {
public: public:
static daAlinkHIO_wallFall_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wallFall_c1 const m;
}; };
class daAlinkHIO_wallFall_c : public daAlinkHIO_data_c { class daAlinkHIO_wallFall_c : public daAlinkHIO_data_c {
@@ -5803,7 +5803,7 @@ public:
class daAlinkHIO_wallMove_c0 { class daAlinkHIO_wallMove_c0 {
public: public:
static daAlinkHIO_wallMove_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wallMove_c1 const m;
}; };
class daAlinkHIO_wallMove_c : public daAlinkHIO_data_c { class daAlinkHIO_wallMove_c : public daAlinkHIO_data_c {
@@ -5839,7 +5839,7 @@ public:
static daAlinkHIO_wallCatch_c0 const mWallCatch; static daAlinkHIO_wallCatch_c0 const mWallCatch;
static daAlinkHIO_wallFall_c0 const mWallFall; static daAlinkHIO_wallFall_c0 const mWallFall;
static daAlinkHIO_wallMove_c0 const mWallMove; static daAlinkHIO_wallMove_c0 const mWallMove;
static daAlinkHIO_wallHang_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wallHang_c1 const m;
}; };
class daAlinkHIO_wallHang_c : public daAlinkHIO_data_c { class daAlinkHIO_wallHang_c : public daAlinkHIO_data_c {
@@ -5886,7 +5886,7 @@ public:
class daAlinkHIO_pushpull_c0 { class daAlinkHIO_pushpull_c0 {
public: public:
static daAlinkHIO_pushpull_c1 const m; static DUSK_GAME_DATA daAlinkHIO_pushpull_c1 const m;
}; };
class daAlinkHIO_pushpull_c : public daAlinkHIO_data_c { class daAlinkHIO_pushpull_c : public daAlinkHIO_data_c {
@@ -5920,7 +5920,7 @@ public:
class daAlinkHIO_damNormal_c0 { class daAlinkHIO_damNormal_c0 {
public: public:
static daAlinkHIO_damNormal_c1 const m; static DUSK_GAME_DATA daAlinkHIO_damNormal_c1 const m;
}; };
class daAlinkHIO_damNormal_c : public daAlinkHIO_data_c { class daAlinkHIO_damNormal_c : public daAlinkHIO_data_c {
@@ -5959,12 +5959,12 @@ public:
class daAlinkHIO_damLarge_c0 { class daAlinkHIO_damLarge_c0 {
public: public:
static daAlinkHIO_damLaHu_c1 const m; static DUSK_GAME_DATA daAlinkHIO_damLaHu_c1 const m;
}; };
class daAlinkHIO_damHuge_c0 { class daAlinkHIO_damHuge_c0 {
public: public:
static daAlinkHIO_damLaHu_c1 const m; static DUSK_GAME_DATA daAlinkHIO_damLaHu_c1 const m;
}; };
class daAlinkHIO_damLaHu_c : public daAlinkHIO_data_c { class daAlinkHIO_damLaHu_c : public daAlinkHIO_data_c {
@@ -5992,7 +5992,7 @@ public:
class daAlinkHIO_damHorse_c0 { class daAlinkHIO_damHorse_c0 {
public: public:
static daAlinkHIO_damHorse_c1 const m; static DUSK_GAME_DATA daAlinkHIO_damHorse_c1 const m;
}; };
class daAlinkHIO_damHorse_c : public daAlinkHIO_data_c { class daAlinkHIO_damHorse_c : public daAlinkHIO_data_c {
@@ -6027,7 +6027,7 @@ public:
class daAlinkHIO_damFall_c0 { class daAlinkHIO_damFall_c0 {
public: public:
static daAlinkHIO_damFall_c1 const m; static DUSK_GAME_DATA daAlinkHIO_damFall_c1 const m;
}; };
class daAlinkHIO_damFall_c : public daAlinkHIO_data_c { class daAlinkHIO_damFall_c : public daAlinkHIO_data_c {
@@ -6057,7 +6057,7 @@ public:
class daAlinkHIO_damCaught_c0 { class daAlinkHIO_damCaught_c0 {
public: public:
static daAlinkHIO_damCaught_c1 const m; static DUSK_GAME_DATA daAlinkHIO_damCaught_c1 const m;
}; };
class daAlinkHIO_damCaught_c : public daAlinkHIO_data_c { class daAlinkHIO_damCaught_c : public daAlinkHIO_data_c {
@@ -6093,7 +6093,7 @@ public:
class daAlinkHIO_damSwim_c0 { class daAlinkHIO_damSwim_c0 {
public: public:
static daAlinkHIO_damSwim_c1 const m; static DUSK_GAME_DATA daAlinkHIO_damSwim_c1 const m;
}; };
class daAlinkHIO_damSwim_c : public daAlinkHIO_data_c { class daAlinkHIO_damSwim_c : public daAlinkHIO_data_c {
@@ -6140,7 +6140,7 @@ public:
class daAlinkHIO_damage_c0 { class daAlinkHIO_damage_c0 {
public: public:
static daAlinkHIO_damage_c1 const m; static DUSK_GAME_DATA daAlinkHIO_damage_c1 const m;
static daAlinkHIO_damNormal_c0 const mDamNormal; static daAlinkHIO_damNormal_c0 const mDamNormal;
static daAlinkHIO_damLarge_c0 const mDamLarge; static daAlinkHIO_damLarge_c0 const mDamLarge;
static daAlinkHIO_damHuge_c0 const mDamHuge; static daAlinkHIO_damHuge_c0 const mDamHuge;
@@ -6192,7 +6192,7 @@ public:
class daAlinkHIO_horse_c0 { class daAlinkHIO_horse_c0 {
public: public:
static daAlinkHIO_horse_c1 const m; static DUSK_GAME_DATA daAlinkHIO_horse_c1 const m;
}; };
class daAlinkHIO_horse_c : public daAlinkHIO_data_c { class daAlinkHIO_horse_c : public daAlinkHIO_data_c {
@@ -6231,7 +6231,7 @@ public:
class daAlinkHIO_canoe_c0 { class daAlinkHIO_canoe_c0 {
public: public:
static daAlinkHIO_canoe_c1 const m; static DUSK_GAME_DATA daAlinkHIO_canoe_c1 const m;
}; };
class daAlinkHIO_canoe_c : public daAlinkHIO_data_c { class daAlinkHIO_canoe_c : public daAlinkHIO_data_c {
@@ -6276,7 +6276,7 @@ public:
class daAlinkHIO_bow_c0 { class daAlinkHIO_bow_c0 {
public: public:
static daAlinkHIO_bow_c1 const m; static DUSK_GAME_DATA daAlinkHIO_bow_c1 const m;
}; };
class daAlinkHIO_bow_c : public daAlinkHIO_data_c { class daAlinkHIO_bow_c : public daAlinkHIO_data_c {
@@ -6312,7 +6312,7 @@ public:
class daAlinkHIO_boom_c0 { class daAlinkHIO_boom_c0 {
public: public:
static daAlinkHIO_boom_c1 const m; static DUSK_GAME_DATA daAlinkHIO_boom_c1 const m;
}; };
class daAlinkHIO_boom_c : public daAlinkHIO_data_c { class daAlinkHIO_boom_c : public daAlinkHIO_data_c {
@@ -6356,7 +6356,7 @@ public:
class daAlinkHIO_bomb_c0 { class daAlinkHIO_bomb_c0 {
public: public:
static daAlinkHIO_bomb_c1 const m; static DUSK_GAME_DATA daAlinkHIO_bomb_c1 const m;
}; };
class daAlinkHIO_bomb_c : public daAlinkHIO_data_c { class daAlinkHIO_bomb_c : public daAlinkHIO_data_c {
@@ -6391,7 +6391,7 @@ public:
class daAlinkHIO_huLight_c0 { class daAlinkHIO_huLight_c0 {
public: public:
static daAlinkHIO_huLight_c1 const m; static DUSK_GAME_DATA daAlinkHIO_huLight_c1 const m;
}; };
class daAlinkHIO_wlLight_c1 { class daAlinkHIO_wlLight_c1 {
@@ -6410,7 +6410,7 @@ public:
class daAlinkHIO_wlLight_c0 { class daAlinkHIO_wlLight_c0 {
public: public:
static daAlinkHIO_wlLight_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlLight_c1 const m;
}; };
class daAlinkHIO_zwLight_c1 { // may be wrong class daAlinkHIO_zwLight_c1 { // may be wrong
@@ -6429,7 +6429,7 @@ public:
class daAlinkHIO_zwLight_c0 { class daAlinkHIO_zwLight_c0 {
public: public:
static daAlinkHIO_zwLight_c1 const m; static DUSK_GAME_DATA daAlinkHIO_zwLight_c1 const m;
}; };
class daAlinkHIO_light_c : public daAlinkHIO_data_c { class daAlinkHIO_light_c : public daAlinkHIO_data_c {
@@ -6465,7 +6465,7 @@ public:
class daAlinkHIO_kandelaar_c0 { class daAlinkHIO_kandelaar_c0 {
public: public:
static daAlinkHIO_kandelaar_c1 const m; static DUSK_GAME_DATA daAlinkHIO_kandelaar_c1 const m;
}; };
class daAlinkHIO_kandelaar_c : public daAlinkHIO_data_c { class daAlinkHIO_kandelaar_c : public daAlinkHIO_data_c {
@@ -6504,7 +6504,7 @@ public:
class daAlinkHIO_magneBoots_c0 { class daAlinkHIO_magneBoots_c0 {
public: public:
static daAlinkHIO_magneBoots_c1 const m; static DUSK_GAME_DATA daAlinkHIO_magneBoots_c1 const m;
}; };
class daAlinkHIO_magneBoots_c : public daAlinkHIO_data_c { class daAlinkHIO_magneBoots_c : public daAlinkHIO_data_c {
@@ -6530,7 +6530,7 @@ public:
class daAlinkHIO_fmChain_c0 { class daAlinkHIO_fmChain_c0 {
public: public:
static daAlinkHIO_fmChain_c1 const m; static DUSK_GAME_DATA daAlinkHIO_fmChain_c1 const m;
}; };
class daAlinkHIO_fmChain_c : public daAlinkHIO_data_c { class daAlinkHIO_fmChain_c : public daAlinkHIO_data_c {
@@ -6570,7 +6570,7 @@ public:
class daAlinkHIO_hookshot_c0 { class daAlinkHIO_hookshot_c0 {
public: public:
static daAlinkHIO_hookshot_c1 const m; static DUSK_GAME_DATA daAlinkHIO_hookshot_c1 const m;
}; };
class daAlinkHIO_hookshot_c : public daAlinkHIO_data_c { class daAlinkHIO_hookshot_c : public daAlinkHIO_data_c {
@@ -6608,7 +6608,7 @@ public:
class daAlinkHIO_spinner_c0 { class daAlinkHIO_spinner_c0 {
public: public:
static daAlinkHIO_spinner_c1 const m; static DUSK_GAME_DATA daAlinkHIO_spinner_c1 const m;
}; };
class daAlinkHIO_spinner_c : public daAlinkHIO_data_c { class daAlinkHIO_spinner_c : public daAlinkHIO_data_c {
@@ -6664,7 +6664,7 @@ public:
class daAlinkHIO_ironBall_c0 { class daAlinkHIO_ironBall_c0 {
public: public:
static daAlinkHIO_ironBall_c1 const m; static DUSK_GAME_DATA daAlinkHIO_ironBall_c1 const m;
}; };
class daAlinkHIO_ironBall_c : public daAlinkHIO_data_c { class daAlinkHIO_ironBall_c : public daAlinkHIO_data_c {
@@ -6694,7 +6694,7 @@ public:
class daAlinkHIO_copyRod_c0 { class daAlinkHIO_copyRod_c0 {
public: public:
static daAlinkHIO_copyRod_c1 const m; static DUSK_GAME_DATA daAlinkHIO_copyRod_c1 const m;
}; };
class daAlinkHIO_copyRod_c : public daAlinkHIO_data_c { class daAlinkHIO_copyRod_c : public daAlinkHIO_data_c {
@@ -6722,7 +6722,7 @@ public:
class daAlinkHIO_pickUp_c0 { class daAlinkHIO_pickUp_c0 {
public: public:
static daAlinkHIO_pickUp_c1 const m; static DUSK_GAME_DATA daAlinkHIO_pickUp_c1 const m;
}; };
class daAlinkHIO_pickUp_c : public daAlinkHIO_data_c { class daAlinkHIO_pickUp_c : public daAlinkHIO_data_c {
@@ -6769,7 +6769,7 @@ public:
class daAlinkHIO_board_c0 { class daAlinkHIO_board_c0 {
public: public:
static daAlinkHIO_board_c1 const m; static DUSK_GAME_DATA daAlinkHIO_board_c1 const m;
}; };
class daAlinkHIO_board_c : public daAlinkHIO_data_c { class daAlinkHIO_board_c : public daAlinkHIO_data_c {
@@ -6802,7 +6802,7 @@ public:
class daAlinkHIO_bottle_c0 { class daAlinkHIO_bottle_c0 {
public: public:
static daAlinkHIO_bottle_c1 const m; static DUSK_GAME_DATA daAlinkHIO_bottle_c1 const m;
}; };
class daAlinkHIO_bottle_c : public daAlinkHIO_data_c { class daAlinkHIO_bottle_c : public daAlinkHIO_data_c {
@@ -6850,7 +6850,7 @@ public:
static daAlinkHIO_ironBall_c0 const mIronBall; static daAlinkHIO_ironBall_c0 const mIronBall;
static daAlinkHIO_copyRod_c0 const mCopyRod; static daAlinkHIO_copyRod_c0 const mCopyRod;
static daAlinkHIO_zwLight_c0 const mZoraArmorPL; static daAlinkHIO_zwLight_c0 const mZoraArmorPL;
static daAlinkHIO_item_c1 const m; static DUSK_GAME_DATA daAlinkHIO_item_c1 const m;
}; };
class daAlinkHIO_item_c : public daAlinkHIO_data_c { class daAlinkHIO_item_c : public daAlinkHIO_data_c {
@@ -6909,7 +6909,7 @@ public:
class daAlinkHIO_ladder_c0 { class daAlinkHIO_ladder_c0 {
public: public:
static daAlinkHIO_ladder_c1 const m; static DUSK_GAME_DATA daAlinkHIO_ladder_c1 const m;
}; };
class daAlinkHIO_ladder_c : public daAlinkHIO_data_c { class daAlinkHIO_ladder_c : public daAlinkHIO_data_c {
@@ -6949,7 +6949,7 @@ public:
class daAlinkHIO_roofHang_c0 { class daAlinkHIO_roofHang_c0 {
public: public:
static daAlinkHIO_roofHang_c1 const m; static DUSK_GAME_DATA daAlinkHIO_roofHang_c1 const m;
}; };
class daAlinkHIO_roofHang_c : public daAlinkHIO_data_c { class daAlinkHIO_roofHang_c : public daAlinkHIO_data_c {
@@ -6987,7 +6987,7 @@ public:
class daAlinkHIO_grab_c0 { class daAlinkHIO_grab_c0 {
public: public:
static daAlinkHIO_grab_c1 const m; static DUSK_GAME_DATA daAlinkHIO_grab_c1 const m;
}; };
class daAlinkHIO_grab_c : public daAlinkHIO_data_c { class daAlinkHIO_grab_c : public daAlinkHIO_data_c {
@@ -7062,7 +7062,7 @@ public:
class daAlinkHIO_swim_c0 { class daAlinkHIO_swim_c0 {
public: public:
static daAlinkHIO_swim_c1 const m; static DUSK_GAME_DATA daAlinkHIO_swim_c1 const m;
}; };
class daAlinkHIO_swim_c : public daAlinkHIO_data_c { class daAlinkHIO_swim_c : public daAlinkHIO_data_c {
@@ -7138,7 +7138,7 @@ public:
class daAlinkHIO_wlMove_c0 { class daAlinkHIO_wlMove_c0 {
public: public:
static daAlinkHIO_wlMove_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlMove_c1 const m;
}; };
class daAlinkHIO_wlMove_c : public daAlinkHIO_data_c { class daAlinkHIO_wlMove_c : public daAlinkHIO_data_c {
@@ -7181,7 +7181,7 @@ public:
class daAlinkHIO_wlMoveNoP_c0 { class daAlinkHIO_wlMoveNoP_c0 {
public: public:
static daAlinkHIO_wlMoveNoP_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlMoveNoP_c1 const m;
}; };
class daAlinkHIO_wlMoveNoP_c : public daAlinkHIO_data_c { class daAlinkHIO_wlMoveNoP_c : public daAlinkHIO_data_c {
@@ -7220,7 +7220,7 @@ public:
class daAlinkHIO_wlAtnMove_c0 { class daAlinkHIO_wlAtnMove_c0 {
public: public:
static daAlinkHIO_wlAtnMove_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtnMove_c1 const m;
}; };
class daAlinkHIO_wlAtnMove_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAtnMove_c : public daAlinkHIO_data_c {
@@ -7252,7 +7252,7 @@ public:
class daAlinkHIO_wlHowl_c0 { class daAlinkHIO_wlHowl_c0 {
public: public:
static daAlinkHIO_wlHowl_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlHowl_c1 const m;
}; };
class daAlinkHIO_wlHowl_c : public daAlinkHIO_data_c { class daAlinkHIO_wlHowl_c : public daAlinkHIO_data_c {
@@ -7286,7 +7286,7 @@ public:
class daAlinkHIO_wlSideStep_c0 { class daAlinkHIO_wlSideStep_c0 {
public: public:
static daAlinkHIO_wlSideStep_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlSideStep_c1 const m;
}; };
class daAlinkHIO_wlSideStep_c : public daAlinkHIO_data_c { class daAlinkHIO_wlSideStep_c : public daAlinkHIO_data_c {
@@ -7316,7 +7316,7 @@ public:
class daAlinkHIO_wlBackJump_c0 { class daAlinkHIO_wlBackJump_c0 {
public: public:
static daAlinkHIO_wlBackJump_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlBackJump_c1 const m;
}; };
class daAlinkHIO_wlBackJump_c : public daAlinkHIO_data_c { class daAlinkHIO_wlBackJump_c : public daAlinkHIO_data_c {
@@ -7361,7 +7361,7 @@ public:
class daAlinkHIO_wlAutoJump_c0 { class daAlinkHIO_wlAutoJump_c0 {
public: public:
static daAlinkHIO_wlAutoJump_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAutoJump_c1 const m;
}; };
class daAlinkHIO_wlAutoJump_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAutoJump_c : public daAlinkHIO_data_c {
@@ -7390,7 +7390,7 @@ public:
class daAlinkHIO_wlPush_c0 { class daAlinkHIO_wlPush_c0 {
public: public:
static daAlinkHIO_wlPush_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlPush_c1 const m;
}; };
class daAlinkHIO_wlPush_c : public daAlinkHIO_data_c { class daAlinkHIO_wlPush_c : public daAlinkHIO_data_c {
@@ -7426,7 +7426,7 @@ public:
class daAlinkHIO_wlLie_c0 { class daAlinkHIO_wlLie_c0 {
public: public:
static daAlinkHIO_wlLie_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlLie_c1 const m;
}; };
class daAlinkHIO_wlLie_c : public daAlinkHIO_data_c { class daAlinkHIO_wlLie_c : public daAlinkHIO_data_c {
@@ -7465,7 +7465,7 @@ public:
class daAlinkHIO_wlWallHang_c0 { class daAlinkHIO_wlWallHang_c0 {
public: public:
static daAlinkHIO_wlWallHang_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlWallHang_c1 const m;
}; };
class daAlinkHIO_wlWallHang_c : public daAlinkHIO_data_c { class daAlinkHIO_wlWallHang_c : public daAlinkHIO_data_c {
@@ -7497,7 +7497,7 @@ public:
class daAlinkHIO_wlDamNormal_c0 { class daAlinkHIO_wlDamNormal_c0 {
public: public:
static daAlinkHIO_wlDamNormal_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlDamNormal_c1 const m;
}; };
class daAlinkHIO_wlDamNormal_c : public daAlinkHIO_data_c { class daAlinkHIO_wlDamNormal_c : public daAlinkHIO_data_c {
@@ -7532,12 +7532,12 @@ public:
class daAlinkHIO_wlDamLarge_c0 { class daAlinkHIO_wlDamLarge_c0 {
public: public:
static daAlinkHIO_wlDamLaHu_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlDamLaHu_c1 const m;
}; };
class daAlinkHIO_wlDamHuge_c0 { class daAlinkHIO_wlDamHuge_c0 {
public: public:
static daAlinkHIO_wlDamLaHu_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlDamLaHu_c1 const m;
}; };
class daAlinkHIO_wlDamLaHu_c : public daAlinkHIO_data_c { class daAlinkHIO_wlDamLaHu_c : public daAlinkHIO_data_c {
@@ -7566,7 +7566,7 @@ public:
class daAlinkHIO_wlDamCaught_c0 { class daAlinkHIO_wlDamCaught_c0 {
public: public:
static daAlinkHIO_wlDamCaught_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlDamCaught_c1 const m;
}; };
class daAlinkHIO_wlDamCaught_c : public daAlinkHIO_data_c { class daAlinkHIO_wlDamCaught_c : public daAlinkHIO_data_c {
@@ -7599,7 +7599,7 @@ public:
class daAlinkHIO_wlDamFall_c0 { class daAlinkHIO_wlDamFall_c0 {
public: public:
static daAlinkHIO_wlDamFall_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlDamFall_c1 const m;
}; };
class daAlinkHIO_wlDamFall_c : public daAlinkHIO_data_c { class daAlinkHIO_wlDamFall_c : public daAlinkHIO_data_c {
@@ -7626,7 +7626,7 @@ public:
class daAlinkHIO_wlDamage_c0 { class daAlinkHIO_wlDamage_c0 {
public: public:
static daAlinkHIO_wlDamage_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlDamage_c1 const m;
static daAlinkHIO_wlDamNormal_c0 const mNormal; static daAlinkHIO_wlDamNormal_c0 const mNormal;
static daAlinkHIO_wlDamLarge_c0 const mLarge; static daAlinkHIO_wlDamLarge_c0 const mLarge;
static daAlinkHIO_wlDamHuge_c0 const mHuge; static daAlinkHIO_wlDamHuge_c0 const mHuge;
@@ -7676,7 +7676,7 @@ public:
class daAlinkHIO_wlSlide_c0 { class daAlinkHIO_wlSlide_c0 {
public: public:
static daAlinkHIO_wlSlide_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlSlide_c1 const m;
}; };
class daAlinkHIO_wlSlide_c : public daAlinkHIO_data_c { class daAlinkHIO_wlSlide_c : public daAlinkHIO_data_c {
@@ -7711,7 +7711,7 @@ public:
class daAlinkHIO_wlRope_c0 { class daAlinkHIO_wlRope_c0 {
public: public:
static daAlinkHIO_wlRope_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlRope_c1 const m;
}; };
class daAlinkHIO_wlRope_c : public daAlinkHIO_data_c { class daAlinkHIO_wlRope_c : public daAlinkHIO_data_c {
@@ -7747,17 +7747,17 @@ public:
class daAlinkHIO_wlAtWaTl_c0 { class daAlinkHIO_wlAtWaTl_c0 {
public: public:
static daAlinkHIO_wlAtWait_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtWait_c1 const m;
}; };
class daAlinkHIO_wlAtWaSc_c0 { class daAlinkHIO_wlAtWaSc_c0 {
public: public:
static daAlinkHIO_wlAtWait_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtWait_c1 const m;
}; };
class daAlinkHIO_wlAtWaLr_c0 { class daAlinkHIO_wlAtWaLr_c0 {
public: public:
static daAlinkHIO_wlAtWait_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtWait_c1 const m;
}; };
class daAlinkHIO_wlAtWait_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAtWait_c : public daAlinkHIO_data_c {
@@ -7784,7 +7784,7 @@ public:
class daAlinkHIO_wlAtRoll_c0 { class daAlinkHIO_wlAtRoll_c0 {
public: public:
static daAlinkHIO_wlAtRoll_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtRoll_c1 const m;
}; };
class daAlinkHIO_wlAtRoll_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAtRoll_c : public daAlinkHIO_data_c {
@@ -7819,7 +7819,7 @@ public:
class daAlinkHIO_wlAtNjump_c0 { class daAlinkHIO_wlAtNjump_c0 {
public: public:
static daAlinkHIO_wlAtNjump_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtNjump_c1 const m;
}; };
class daAlinkHIO_wlAtNjump_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAtNjump_c : public daAlinkHIO_data_c {
@@ -7860,7 +7860,7 @@ public:
class daAlinkHIO_wlAtCjump_c0 { class daAlinkHIO_wlAtCjump_c0 {
public: public:
static daAlinkHIO_wlAtCjump_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtCjump_c1 const m;
}; };
class daAlinkHIO_wlAtCjump_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAtCjump_c : public daAlinkHIO_data_c {
@@ -7888,7 +7888,7 @@ public:
class daAlinkHIO_wlAtLand_c0 { class daAlinkHIO_wlAtLand_c0 {
public: public:
static daAlinkHIO_wlAtLand_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtLand_c1 const m;
}; };
class daAlinkHIO_wlAtLand_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAtLand_c : public daAlinkHIO_data_c {
@@ -7924,7 +7924,7 @@ public:
class daAlinkHIO_wlAtDown_c0 { class daAlinkHIO_wlAtDown_c0 {
public: public:
static daAlinkHIO_wlAtDown_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtDown_c1 const m;
}; };
class daAlinkHIO_wlAtDown_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAtDown_c : public daAlinkHIO_data_c {
@@ -7961,7 +7961,7 @@ public:
class daAlinkHIO_wlAtLock_c0 { class daAlinkHIO_wlAtLock_c0 {
public: public:
static daAlinkHIO_wlAtLock_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtLock_c1 const m;
}; };
class daAlinkHIO_wlAtLock_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAtLock_c : public daAlinkHIO_data_c {
@@ -8001,7 +8001,7 @@ public:
class daAlinkHIO_wlAtBite_c0 { class daAlinkHIO_wlAtBite_c0 {
public: public:
static daAlinkHIO_wlAtBite_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAtBite_c1 const m;
}; };
class daAlinkHIO_wlAtBite_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAtBite_c : public daAlinkHIO_data_c {
@@ -8046,7 +8046,7 @@ public:
static daAlinkHIO_wlAtDown_c0 const mWlAtDown; static daAlinkHIO_wlAtDown_c0 const mWlAtDown;
static daAlinkHIO_wlAtLock_c0 const mWlAtLock; static daAlinkHIO_wlAtLock_c0 const mWlAtLock;
static daAlinkHIO_wlAtBite_c0 const mWlAtBite; static daAlinkHIO_wlAtBite_c0 const mWlAtBite;
static daAlinkHIO_wlAttack_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlAttack_c1 const m;
}; };
class daAlinkHIO_wlAttack_c : public daAlinkHIO_data_c { class daAlinkHIO_wlAttack_c : public daAlinkHIO_data_c {
@@ -8093,7 +8093,7 @@ public:
class daAlinkHIO_wlPoint_c0 { class daAlinkHIO_wlPoint_c0 {
public: public:
static daAlinkHIO_wlPoint_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlPoint_c1 const m;
}; };
class daAlinkHIO_wlPoint_c : public daAlinkHIO_data_c { class daAlinkHIO_wlPoint_c : public daAlinkHIO_data_c {
@@ -8129,7 +8129,7 @@ public:
class daAlinkHIO_wlChain_c0 { class daAlinkHIO_wlChain_c0 {
public: public:
static daAlinkHIO_wlChain_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlChain_c1 const m;
}; };
class daAlinkHIO_wlChain_c : public daAlinkHIO_data_c { class daAlinkHIO_wlChain_c : public daAlinkHIO_data_c {
@@ -8186,7 +8186,7 @@ public:
class daAlinkHIO_wlSwim_c0 { class daAlinkHIO_wlSwim_c0 {
public: public:
static daAlinkHIO_wlSwim_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlSwim_c1 const m;
}; };
class daAlinkHIO_wlSwim_c : public daAlinkHIO_data_c { class daAlinkHIO_wlSwim_c : public daAlinkHIO_data_c {
@@ -8215,7 +8215,7 @@ public:
class daAlinkHIO_wlGrab_c0 { class daAlinkHIO_wlGrab_c0 {
public: public:
static daAlinkHIO_wlGrab_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlGrab_c1 const m;
}; };
class daAlinkHIO_wlGrab_c : public daAlinkHIO_data_c { class daAlinkHIO_wlGrab_c : public daAlinkHIO_data_c {
@@ -8245,7 +8245,7 @@ public:
class daAlinkHIO_wlBall_c0 { class daAlinkHIO_wlBall_c0 {
public: public:
static daAlinkHIO_wlBall_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wlBall_c1 const m;
}; };
class daAlinkHIO_wlBall_c : public daAlinkHIO_data_c { class daAlinkHIO_wlBall_c : public daAlinkHIO_data_c {
@@ -8300,7 +8300,7 @@ public:
static daAlinkHIO_wlSwim_c0 const mWlSwim; static daAlinkHIO_wlSwim_c0 const mWlSwim;
static daAlinkHIO_wlGrab_c0 const mWlGrab; static daAlinkHIO_wlGrab_c0 const mWlGrab;
static daAlinkHIO_wlBall_c0 const mWlBall; static daAlinkHIO_wlBall_c0 const mWlBall;
static daAlinkHIO_wolf_c1 const m; static DUSK_GAME_DATA daAlinkHIO_wolf_c1 const m;
}; };
class daAlinkHIO_wolf_c : public daAlinkHIO_data_c { class daAlinkHIO_wolf_c : public daAlinkHIO_data_c {
+1 -1
View File
@@ -161,7 +161,7 @@ private:
/* 0xA10 */ dPa_hermiteEcallBack_c field_0xa10; /* 0xA10 */ dPa_hermiteEcallBack_c field_0xa10;
/* 0xA28 */ int (daArrow_c::*mProcFunc)(); /* 0xA28 */ int (daArrow_c::*mProcFunc)();
static s16 m_count; static DUSK_GAME_DATA s16 m_count;
}; };
STATIC_ASSERT(sizeof(daArrow_c) == 0xA34); STATIC_ASSERT(sizeof(daArrow_c) == 0xA34);
+1 -1
View File
@@ -67,7 +67,7 @@ public:
void hide() { mIsVisible = 0; } void hide() { mIsVisible = 0; }
u8 isVisible() { return mIsVisible; } u8 isVisible() { return mIsVisible; }
static daBalloon2D_c* myclass; static DUSK_GAME_DATA daBalloon2D_c* myclass;
struct ScoreCount { struct ScoreCount {
cXyz field_0x0; cXyz field_0x0;
+4 -4
View File
@@ -89,10 +89,10 @@ public:
void setAction(u8 i_action) { mAction = i_action; } void setAction(u8 i_action) { mAction = i_action; }
static createHeapFunc mCreateHeapFunc[]; static DUSK_GAME_DATA createHeapFunc mCreateHeapFunc[];
static createInitFunc mCreateInitFunc[]; static DUSK_GAME_DATA createInitFunc mCreateInitFunc[];
static executeFunc mExecuteFunc[]; static DUSK_GAME_DATA executeFunc mExecuteFunc[];
static tgSetFunc mTgSetFunc[]; static DUSK_GAME_DATA tgSetFunc mTgSetFunc[];
/* 0x5A0 */ request_of_phase_process_class mPhase; /* 0x5A0 */ request_of_phase_process_class mPhase;
/* 0x5A8 */ J3DModel* field_0x5a8[2][2]; /* 0x5A8 */ J3DModel* field_0x5a8[2][2];
+6 -6
View File
@@ -190,12 +190,12 @@ STATIC_ASSERT(sizeof(daBoomerang_c) == 0xDE4);
class daBoomerang_HIO_c0 { class daBoomerang_HIO_c0 {
public: public:
static u16 const m_lockWaitTime; static DUSK_GAME_DATA u16 const m_lockWaitTime;
static f32 const m_minCircleR; static DUSK_GAME_DATA f32 const m_minCircleR;
static f32 const m_middleCircleR; static DUSK_GAME_DATA f32 const m_middleCircleR;
static f32 const m_maxCircleR; static DUSK_GAME_DATA f32 const m_maxCircleR;
static f32 const m_scale; static DUSK_GAME_DATA f32 const m_scale;
static f32 const m_lockWindScale; static DUSK_GAME_DATA f32 const m_lockWindScale;
}; };
#endif /* D_A_BOOMERANG_H */ #endif /* D_A_BOOMERANG_H */
+3 -3
View File
@@ -18,7 +18,7 @@ class daBullet_Param_c {
public: public:
virtual ~daBullet_Param_c() {} virtual ~daBullet_Param_c() {}
static daBullet_HIOParam const m; static DUSK_GAME_DATA daBullet_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -80,8 +80,8 @@ public:
int wait(void*); int wait(void*);
int move(void*); int move(void*);
static dCcD_SrcGObjInf const mCcDObjInfo; static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo;
static dCcD_SrcSph mCcDSph; static DUSK_GAME_DATA dCcD_SrcSph mCcDSph;
}; };
STATIC_ASSERT(sizeof(daBullet_c) == 0x95c); STATIC_ASSERT(sizeof(daBullet_c) == 0x95c);
+1 -1
View File
@@ -33,7 +33,7 @@ public:
const CoachFireAttr& attr() { return M_attr; } const CoachFireAttr& attr() { return M_attr; }
static CoachFireAttr const M_attr; static DUSK_GAME_DATA CoachFireAttr const M_attr;
inline ~daCoachFire_c(); inline ~daCoachFire_c();
+1 -1
View File
@@ -38,7 +38,7 @@ public:
struct BckTbl { struct BckTbl {
u16 idx[4]; u16 idx[4];
}; };
static const BckTbl m_bckIdxTable[]; static DUSK_GAME_DATA const BckTbl m_bckIdxTable[];
private: private:
/* 0x5A0 */ const char* m_arcName; /* 0x5A0 */ const char* m_arcName;
+1 -1
View File
@@ -99,7 +99,7 @@ public:
mWarpMode = daCstatueWarpMode_Active; mWarpMode = daCstatueWarpMode_Active;
} }
static u16 const m_bckIdxTable[daCstatueType_N][7]; static DUSK_GAME_DATA u16 const m_bckIdxTable[daCstatueType_N][7];
private: private:
/* 0x568 */ const char* mResName; /* 0x568 */ const char* mResName;
+9 -9
View File
@@ -65,15 +65,15 @@ public:
f32 getCloseBoundSpeed() { return CLOSE_BOUND_SPEED; } f32 getCloseBoundSpeed() { return CLOSE_BOUND_SPEED; }
f32 getCloseBoundRatio() { return CLOSE_BOUND_RATIO; } f32 getCloseBoundRatio() { return CLOSE_BOUND_RATIO; }
static f32 const OPEN_SIZE; static DUSK_GAME_DATA f32 const OPEN_SIZE;
static f32 const OPEN_ACCEL; static DUSK_GAME_DATA f32 const OPEN_ACCEL;
static f32 const OPEN_SPEED; static DUSK_GAME_DATA f32 const OPEN_SPEED;
static f32 const OPEN_BOUND_SPEED; static DUSK_GAME_DATA f32 const OPEN_BOUND_SPEED;
static f32 const OPEN_BOUND_RATIO; static DUSK_GAME_DATA f32 const OPEN_BOUND_RATIO;
static f32 const CLOSE_ACCEL; static DUSK_GAME_DATA f32 const CLOSE_ACCEL;
static f32 const CLOSE_SPEED; static DUSK_GAME_DATA f32 const CLOSE_SPEED;
static f32 const CLOSE_BOUND_SPEED; static DUSK_GAME_DATA f32 const CLOSE_BOUND_SPEED;
static f32 const CLOSE_BOUND_RATIO; static DUSK_GAME_DATA f32 const CLOSE_BOUND_RATIO;
/* 0x5A0 */ dComIfG_resLoader_c mResLoader; /* 0x5A0 */ dComIfG_resLoader_c mResLoader;
/* 0x5B0 */ J3DModel* mpModel; /* 0x5B0 */ J3DModel* mpModel;
+8 -8
View File
@@ -175,14 +175,14 @@ private:
STATIC_ASSERT(sizeof(daE_DT_c) == 0x1174); STATIC_ASSERT(sizeof(daE_DT_c) == 0x1174);
struct E_DT_n { struct E_DT_n {
static f32 eDt_ShakeFrame[10]; static DUSK_GAME_DATA f32 eDt_ShakeFrame[10];
static f32 eDt_ShakeFrameDemo[10]; static DUSK_GAME_DATA f32 eDt_ShakeFrameDemo[10];
static dCcD_SrcSph cc_dt_body_src; static DUSK_GAME_DATA dCcD_SrcSph cc_dt_body_src;
static dCcD_SrcSph cc_dt_tongue_src; static DUSK_GAME_DATA dCcD_SrcSph cc_dt_tongue_src;
static int mDt_OtamaNum; static DUSK_GAME_DATA int mDt_OtamaNum;
static int mDt_OtamaNo[20]; static DUSK_GAME_DATA int mDt_OtamaNo[20];
static int m_fall_no; static DUSK_GAME_DATA int m_fall_no;
static cXyz m_tongue_pos; static DUSK_GAME_DATA cXyz m_tongue_pos;
}; };
+1 -1
View File
@@ -101,7 +101,7 @@ private:
/* 0xB9E */ u8 field_0xb9e; /* 0xB9E */ u8 field_0xb9e;
/* 0xB9F */ u8 mHIOInit; /* 0xB9F */ u8 mHIOInit;
static actionFunc l_actionmenu[9]; static DUSK_GAME_DATA actionFunc l_actionmenu[9];
}; };
STATIC_ASSERT(sizeof(daE_GE_c) == 0xBA0); STATIC_ASSERT(sizeof(daE_GE_c) == 0xBA0);
+8 -8
View File
@@ -159,14 +159,14 @@ private:
STATIC_ASSERT(sizeof(daE_OC_c) == 0xe88); STATIC_ASSERT(sizeof(daE_OC_c) == 0xe88);
struct E_OC_n { struct E_OC_n {
static f32 const oc_attackb_trans[10]; static DUSK_GAME_DATA f32 const oc_attackb_trans[10];
static f32 const oc_attackc_trans[10]; static DUSK_GAME_DATA f32 const oc_attackc_trans[10];
static dCcD_SrcSph cc_sph_src; static DUSK_GAME_DATA dCcD_SrcSph cc_sph_src;
static dCcD_SrcSph at_sph_src; static DUSK_GAME_DATA dCcD_SrcSph at_sph_src;
static daE_OC_c* m_battle_oc; static DUSK_GAME_DATA daE_OC_c* m_battle_oc;
static daE_OC_c* m_damage_oc; static DUSK_GAME_DATA daE_OC_c* m_damage_oc;
static daE_OC_c* m_death_oc; static DUSK_GAME_DATA daE_OC_c* m_death_oc;
static daE_OC_c* m_talk_oc; static DUSK_GAME_DATA daE_OC_c* m_talk_oc;
}; };
#endif /* D_A_E_OC_H */ #endif /* D_A_E_OC_H */
+1 -1
View File
@@ -215,7 +215,7 @@ private:
STATIC_ASSERT(sizeof(daE_YM_c) == 0xAF8); STATIC_ASSERT(sizeof(daE_YM_c) == 0xAF8);
struct E_YM_n { struct E_YM_n {
static dCcD_SrcSph cc_sph_src; static DUSK_GAME_DATA dCcD_SrcSph cc_sph_src;
}; };
+2 -2
View File
@@ -311,10 +311,10 @@ struct daFmtMng_c : public fopAc_ac_c {
} }
static FmtMngAttributes const& attr() { return M_attr; } static FmtMngAttributes const& attr() { return M_attr; }
static FmtMngAttributes const M_attr; static DUSK_GAME_DATA FmtMngAttributes const M_attr;
typedef void (daFmtMng_c::*ActionFunc)(); typedef void (daFmtMng_c::*ActionFunc)();
static daFmtMng_c::ActionFunc ActionTable[10]; static DUSK_GAME_DATA daFmtMng_c::ActionFunc ActionTable[10];
/* 0x568 */ FmtPos_c* mPos; /* 0x568 */ FmtPos_c* mPos;
/* 0x56C */ FmtMember_c* mMember; /* 0x56C */ FmtMember_c* mMember;
+3 -3
View File
@@ -41,9 +41,9 @@ public:
static void deleteRoomGrass(int); static void deleteRoomGrass(int);
static void deleteRoomFlower(int); static void deleteRoomFlower(int);
static daGrass_c* m_myObj; static DUSK_GAME_DATA daGrass_c* m_myObj;
static dGrass_packet_c* m_grass; static DUSK_GAME_DATA dGrass_packet_c* m_grass;
static dFlower_packet_c* m_flower; static DUSK_GAME_DATA dFlower_packet_c* m_flower;
/* 0x568 */ u8 unk_0x568[0x570 - 0x568]; /* 0x568 */ u8 unk_0x568[0x570 - 0x568];
}; };
+3 -3
View File
@@ -351,8 +351,8 @@ public:
m_modelData->getMaterialNodePointer(5)->getShape()->hide(); m_modelData->getMaterialNodePointer(5)->getShape()->hide();
} }
static u16 const m_footJointTable[]; static DUSK_GAME_DATA u16 const m_footJointTable[];
static f32 const m_callLimitDistance2; static DUSK_GAME_DATA f32 const m_callLimitDistance2;
/* 0x0568 */ request_of_phase_process_class m_phase; /* 0x0568 */ request_of_phase_process_class m_phase;
/* 0x0570 */ J3DModel* m_model; /* 0x0570 */ J3DModel* m_model;
@@ -567,7 +567,7 @@ public:
class daHorse_hio_c0 { class daHorse_hio_c0 {
public: public:
static const daHorse_hio_c1 m; static DUSK_GAME_DATA const daHorse_hio_c1 m;
}; };
class daHorse_hio_c : public JORReflexible { class daHorse_hio_c : public JORReflexible {
+3 -3
View File
@@ -29,8 +29,8 @@ public:
static void setMorfFrame(u8 i_frame) { mMorfFrame = i_frame; } static void setMorfFrame(u8 i_frame) { mMorfFrame = i_frame; }
static void decMorfFrame() { cLib_calcTimer<u8>(&mMorfFrame); } static void decMorfFrame() { cLib_calcTimer<u8>(&mMorfFrame); }
static u8 mEyeMoveFlg; static DUSK_GAME_DATA u8 mEyeMoveFlg;
static u8 mMorfFrame; static DUSK_GAME_DATA u8 mMorfFrame;
/* 0x0F4 */ f32 field_0xf4; /* 0x0F4 */ f32 field_0xf4;
/* 0x0F8 */ f32 field_0xf8; /* 0x0F8 */ f32 field_0xf8;
@@ -50,7 +50,7 @@ struct daHoZelda_hio_c1 {
struct daHoZelda_hio_c0 { struct daHoZelda_hio_c0 {
daHoZelda_hio_c0() {} daHoZelda_hio_c0() {}
static daHoZelda_hio_c1 const m; static DUSK_GAME_DATA daHoZelda_hio_c1 const m;
}; };
class daHoZelda_hio_c : public JORReflexible { class daHoZelda_hio_c : public JORReflexible {
+1 -1
View File
@@ -60,7 +60,7 @@ public:
virtual u8 getCollisionH(); virtual u8 getCollisionH();
virtual u8 getCollisionR(); virtual u8 getCollisionR();
static daItemBase_data const m_data; static DUSK_GAME_DATA daItemBase_data const m_data;
/* 0x56C */ request_of_phase_process_class mPhase; /* 0x56C */ request_of_phase_process_class mPhase;
/* 0x574 */ J3DModel* mpModel; /* 0x574 */ J3DModel* mpModel;
+5 -5
View File
@@ -32,7 +32,7 @@ public:
class daMidna_hio_c0 { class daMidna_hio_c0 {
public: public:
static daMidna_hio_c1 const m; static DUSK_GAME_DATA daMidna_hio_c1 const m;
}; };
STATIC_ASSERT(sizeof(daMidna_hio_c0::m) == 0x20); STATIC_ASSERT(sizeof(daMidna_hio_c0::m) == 0x20);
@@ -87,8 +87,8 @@ public:
/* 0x0FC */ f32 mNowOffsetX; /* 0x0FC */ f32 mNowOffsetX;
/* 0x100 */ f32 mNowOffsetY; /* 0x100 */ f32 mNowOffsetY;
static bool sEyeMoveFlg; static DUSK_GAME_DATA bool sEyeMoveFlg;
static u8 sMorfFrame; static DUSK_GAME_DATA u8 sMorfFrame;
}; };
STATIC_ASSERT(sizeof(daMidna_matAnm_c) == 0x104); STATIC_ASSERT(sizeof(daMidna_matAnm_c) == 0x104);
@@ -420,8 +420,8 @@ public:
static u32 getOtherHeapSize() { return 0x1D0; } static u32 getOtherHeapSize() { return 0x1D0; }
static daMidna_texData_s const m_texDataTable[21]; static DUSK_GAME_DATA daMidna_texData_s const m_texDataTable[21];
static daMidna_anmData_s const m_anmDataTable[53]; static DUSK_GAME_DATA daMidna_anmData_s const m_anmDataTable[53];
private: private:
/* 0x568 */ request_of_phase_process_class mPhase; /* 0x568 */ request_of_phase_process_class mPhase;
+2 -2
View File
@@ -58,8 +58,8 @@ public:
static u32 getMirrorRoomPrm() { return 0xFF03; } static u32 getMirrorRoomPrm() { return 0xFF03; }
typedef int (daMirror_c::*entryModelFunc)(J3DModel*); typedef int (daMirror_c::*entryModelFunc)(J3DModel*);
static entryModelFunc m_entryModel; static DUSK_GAME_DATA entryModelFunc m_entryModel;
static daMirror_c* m_myObj; static DUSK_GAME_DATA daMirror_c* m_myObj;
/* 0x570 */ dMirror_packet_c mPacket; /* 0x570 */ dMirror_packet_c mPacket;
/* 0x6f8 */ J3DModel* mpModel; /* 0x6f8 */ J3DModel* mpModel;
+1 -7
View File
@@ -95,12 +95,6 @@ static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr);
#define THP_TEXTURE_SET_COUNT 3 #define THP_TEXTURE_SET_COUNT 3
#endif #endif
#if TARGET_PC
namespace dusk {
void MoviePlayerShutdown();
}
#endif
struct daMP_THPPlayer { struct daMP_THPPlayer {
/* 0x000 */ DVDFileInfo fileInfo; /* 0x000 */ DVDFileInfo fileInfo;
/* 0x03C */ THPHeader header; /* 0x03C */ THPHeader header;
@@ -170,7 +164,7 @@ public:
static int daMP_c_Callback_Main(daMP_c*); static int daMP_c_Callback_Main(daMP_c*);
static int daMP_c_Callback_Draw(daMP_c*); static int daMP_c_Callback_Draw(daMP_c*);
static daMP_c* m_myObj; static DUSK_GAME_DATA daMP_c* m_myObj;
private: private:
/* 0x568 */ u32 (*mpGetMovieRestFrame)(void); /* 0x568 */ u32 (*mpGetMovieRestFrame)(void);
+2 -2
View File
@@ -131,8 +131,8 @@ public:
typedef void (daMyna_c::*ProcFunc)(); typedef void (daMyna_c::*ProcFunc)();
typedef int (daMyna_c::*BaseMotionFunc)(int); typedef int (daMyna_c::*BaseMotionFunc)(int);
static dCcD_SrcSph const mCcDSph; static DUSK_GAME_DATA dCcD_SrcSph const mCcDSph;
static daMyna_c::BaseMotionFunc mBaseMotionTBL[7]; static DUSK_GAME_DATA daMyna_c::BaseMotionFunc mBaseMotionTBL[7];
/* 0x56C */ request_of_phase_process_class mPhase; /* 0x56C */ request_of_phase_process_class mPhase;
/* 0x574 */ mDoExt_McaMorfSO* mpMorf; /* 0x574 */ mDoExt_McaMorfSO* mpMorf;
+1 -1
View File
@@ -91,7 +91,7 @@ public:
s16 getExTime() { return mExTime; } s16 getExTime() { return mExTime; }
static const char* m_arcNameList[6]; static DUSK_GAME_DATA const char* m_arcNameList[6];
/* 0x56C */ request_of_phase_process_class mPhase; /* 0x56C */ request_of_phase_process_class mPhase;
/* 0x574 */ J3DModel* mpModel; /* 0x574 */ J3DModel* mpModel;
+6 -6
View File
@@ -776,12 +776,12 @@ public:
return chkFindActor(daPy_getPlayerActorClass(), param_0, param_1); return chkFindActor(daPy_getPlayerActorClass(), param_0, param_1);
} }
static dCcD_SrcGObjInf const mCcDObjData; static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjData;
static dCcD_SrcCyl mCcDCyl; static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl;
static dCcD_SrcSph mCcDSph; static DUSK_GAME_DATA dCcD_SrcSph mCcDSph;
static fopAc_ac_c* mFindActorPtrs[50]; static DUSK_GAME_DATA fopAc_ac_c* mFindActorPtrs[50];
static s16 mSrchName; static DUSK_GAME_DATA s16 mSrchName;
static int mFindCount; static DUSK_GAME_DATA int mFindCount;
enum Mode { enum Mode {
/* 0 */ MODE_ENTER, /* 0 */ MODE_ENTER,
+6 -6
View File
@@ -113,9 +113,9 @@ public:
virtual void drawOtherMdls(); virtual void drawOtherMdls();
virtual bool dbgDraw(); virtual bool dbgDraw();
static dCcD_SrcGObjInf const mCcDObj; static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObj;
static dCcD_SrcCyl mCcDCyl; static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl;
static dCcD_SrcSph mCcDSph; static DUSK_GAME_DATA dCcD_SrcSph mCcDSph;
public: public:
/* 0x56C */ dBgS_ObjAcch mAcch; /* 0x56C */ dBgS_ObjAcch mAcch;
@@ -173,9 +173,9 @@ public:
virtual int ToFore() { return 1; } virtual int ToFore() { return 1; }
virtual int ToBack() { return 1; } virtual int ToBack() { return 1; }
static const char* m_name; static DUSK_GAME_DATA const char* m_name;
static int m_dzb_id; static DUSK_GAME_DATA int m_dzb_id;
static MoveBGActor_SetFunc m_set_func; static DUSK_GAME_DATA MoveBGActor_SetFunc m_set_func;
public: public:
/* 0xA14 */ dBgW* mpBgw; /* 0xA14 */ dBgW* mpBgw;
+7 -7
View File
@@ -394,13 +394,13 @@ public:
void onHide() { mHide = true; } void onHide() { mHide = true; }
void offHide() { mHide = false; } void offHide() { mHide = false; }
static dCcD_SrcGObjInf const mCcDObjInfo; static DUSK_GAME_DATA dCcD_SrcGObjInf const mCcDObjInfo;
static dCcD_SrcCyl mCcDCyl; static DUSK_GAME_DATA dCcD_SrcCyl mCcDCyl;
static dCcD_SrcSph mCcDSph; static DUSK_GAME_DATA dCcD_SrcSph mCcDSph;
static fopAc_ac_c* mFindActorPList[100]; static DUSK_GAME_DATA fopAc_ac_c* mFindActorPList[100];
static s32 mFindCount; static DUSK_GAME_DATA s32 mFindCount;
static s16 mSrchActorName; static DUSK_GAME_DATA s16 mSrchActorName;
static char mFileNameBuf[0x15]; static DUSK_GAME_DATA char mFileNameBuf[0x15];
}; };
STATIC_ASSERT(sizeof(daNpcF_c) == 0xB48); STATIC_ASSERT(sizeof(daNpcF_c) == 0xB48);
+3 -3
View File
@@ -17,7 +17,7 @@ class daNpc_Aru_Param_c {
public: public:
virtual ~daNpc_Aru_Param_c() {} virtual ~daNpc_Aru_Param_c() {}
static daNpc_Aru_HIOParam const m; static DUSK_GAME_DATA daNpc_Aru_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -171,8 +171,8 @@ public:
u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } u8 getPathID() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
void setLastIn() { mLastGoatIn = true; } void setLastIn() { mLastGoatIn = true; }
static char DUSK_CONST* DUSK_CONST mCutNameList[7]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[7];
static cutFunc DUSK_CONST mCutList[7]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[7];
private: private:
/* 0xE40 */ NPC_ARU_HIO_CLASS* mpHIO; /* 0xE40 */ NPC_ARU_HIO_CLASS* mpHIO;
+2 -2
View File
@@ -12,7 +12,7 @@ public:
daNpcAsh_Param_c() {} daNpcAsh_Param_c() {}
virtual ~daNpcAsh_Param_c() {} virtual ~daNpcAsh_Param_c() {}
static const daNpcAsh_HIOParam m; static DUSK_GAME_DATA const daNpcAsh_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -143,7 +143,7 @@ public:
inline bool step(s16, bool); inline bool step(s16, bool);
inline void playExpression(); inline void playExpression();
static EventFn mEvtSeqList[6]; static DUSK_GAME_DATA EventFn mEvtSeqList[6];
private: private:
/* 0xB48 */ Z2Creature mCreatureSound; /* 0xB48 */ Z2Creature mCreatureSound;
+2 -2
View File
@@ -12,7 +12,7 @@ class daNpcAshB_Param_c {
public: public:
virtual ~daNpcAshB_Param_c() {} virtual ~daNpcAshB_Param_c() {}
static const daNpcAshB_HIOParam m; static DUSK_GAME_DATA const daNpcAshB_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -135,7 +135,7 @@ public:
inline bool step(s16, int, f32); inline bool step(s16, int, f32);
inline void playExpression(); inline void playExpression();
static EventFn DUSK_CONST mEvtSeqList[2]; static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[2];
private: private:
/* 0xB48 */ Z2Creature mCreatureSound; /* 0xB48 */ Z2Creature mCreatureSound;
+3 -3
View File
@@ -22,7 +22,7 @@ class daNpc_Bans_Param_c {
public: public:
virtual ~daNpc_Bans_Param_c() {} virtual ~daNpc_Bans_Param_c() {}
static daNpc_Bans_HIOParam const m; static DUSK_GAME_DATA daNpc_Bans_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -117,8 +117,8 @@ public:
return rv; return rv;
} }
static char DUSK_CONST* DUSK_CONST mCutNameList[4]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[4];
static cutFunc DUSK_CONST mCutList[4]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[4];
/* 0x0F7C */ mDoExt_McaMorfSO* mpScoopMorf; /* 0x0F7C */ mDoExt_McaMorfSO* mpScoopMorf;
/* 0x0F80 */ NPC_BANS_HIO_CLASS* mHIO; /* 0x0F80 */ NPC_BANS_HIO_CLASS* mHIO;
+3 -3
View File
@@ -15,7 +15,7 @@ class daNpc_Besu_Param_c {
public: public:
virtual ~daNpc_Besu_Param_c() {} virtual ~daNpc_Besu_Param_c() {}
static const daNpc_Besu_HIOParam m; static DUSK_GAME_DATA const daNpc_Besu_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -140,8 +140,8 @@ public:
u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; }
u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; } u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; }
static char DUSK_CONST* DUSK_CONST mCutNameList[15]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[15];
static cutFunc DUSK_CONST mCutList[15]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[15];
private: private:
/* 0x0E40 */ mDoExt_McaMorfSO* mpCupModelMorf; /* 0x0E40 */ mDoExt_McaMorfSO* mpCupModelMorf;
+2 -2
View File
@@ -14,7 +14,7 @@ class daNpcBlueNS_Param_c {
public: public:
virtual ~daNpcBlueNS_Param_c() {} virtual ~daNpcBlueNS_Param_c() {}
static const daNpcBlueNS_HIOParam m; static DUSK_GAME_DATA const daNpcBlueNS_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -124,7 +124,7 @@ public:
return var_r30; return var_r30;
} }
static EventFn DUSK_CONST mEvtSeqList[]; static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[];
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
/* 0xBD8 */ u8 field_0xBD8[0xBDC - 0xBD8]; /* 0xBD8 */ u8 field_0xBD8[0xBDC - 0xBD8];
+3 -3
View File
@@ -16,7 +16,7 @@ struct daNpc_Bou_HIOParam {
public: public:
virtual ~daNpc_Bou_Param_c() {} virtual ~daNpc_Bou_Param_c() {}
static const daNpc_Bou_HIOParam m; static DUSK_GAME_DATA const daNpc_Bou_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -114,8 +114,8 @@ public:
virtual int drawDbgInfo(); virtual int drawDbgInfo();
virtual void changeAnm(int*, int*); virtual void changeAnm(int*, int*);
static char DUSK_CONST* DUSK_CONST mCutNameList[9]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[9];
static cutFunc DUSK_CONST mCutList[9]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[9];
int getFlowNodeNo() { int getFlowNodeNo() {
u16 nodeNo = home.angle.x; u16 nodeNo = home.angle.x;
+2 -2
View File
@@ -29,7 +29,7 @@ class daNpcBouS_Param_c {
public: public:
virtual ~daNpcBouS_Param_c() {} virtual ~daNpcBouS_Param_c() {}
static daNpcBouS_HIOParam const m; static DUSK_GAME_DATA daNpcBouS_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -128,7 +128,7 @@ public:
mForcibleTalk = 1; mForcibleTalk = 1;
} }
static eventFunc mEvtSeqList[4]; static DUSK_GAME_DATA eventFunc mEvtSeqList[4];
private: private:
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
+2 -2
View File
@@ -25,7 +25,7 @@ public:
J3DModelData* getObjMdlDataP(int); J3DModelData* getObjMdlDataP(int);
virtual ~daNpcCd_c() {} virtual ~daNpcCd_c() {}
static dCcD_SrcCyl const m_cylDat; static DUSK_GAME_DATA dCcD_SrcCyl const m_cylDat;
/* 0x56C */ request_of_phase_process_class mPhase1; /* 0x56C */ request_of_phase_process_class mPhase1;
/* 0x574 */ request_of_phase_process_class mPhase2; /* 0x574 */ request_of_phase_process_class mPhase2;
@@ -101,7 +101,7 @@ public:
STATIC_ASSERT(sizeof(daNpcCd_HIO_c) == 0x29BC); STATIC_ASSERT(sizeof(daNpcCd_HIO_c) == 0x29BC);
extern daNpcCd_HIO_c l_Cd_HIO; DUSK_GAME_EXTERN daNpcCd_HIO_c l_Cd_HIO;
inline f32 HIO_atnOfs(int param_1) { inline f32 HIO_atnOfs(int param_1) {
s16 rv; s16 rv;
if (param_1 < 16) { if (param_1 < 16) {
+2 -2
View File
@@ -87,7 +87,7 @@ struct daNpcCd2_HIO_c : public fOpAcm_HIO_entry_c {
/* 0x20C4 */ daNpcCd2_HIO_WChild_c field_0x20c4[14]; /* 0x20C4 */ daNpcCd2_HIO_WChild_c field_0x20c4[14];
}; };
extern daNpcCd2_HIO_c l_Cd2_HIO; DUSK_GAME_EXTERN daNpcCd2_HIO_c l_Cd2_HIO;
inline s16 Cd2_HIO_atnOfs(int param_1) { inline s16 Cd2_HIO_atnOfs(int param_1) {
s16 rv; s16 rv;
@@ -269,7 +269,7 @@ public:
J3DAnmTexPattern* getTexAnmP(int); J3DAnmTexPattern* getTexAnmP(int);
virtual ~daNpcCd2_c() {} virtual ~daNpcCd2_c() {}
static dCcD_SrcCyl const m_cylDat; static DUSK_GAME_DATA dCcD_SrcCyl const m_cylDat;
/* 0x56C */ request_of_phase_process_class mPhase1; /* 0x56C */ request_of_phase_process_class mPhase1;
/* 0x574 */ request_of_phase_process_class mPhase2; /* 0x574 */ request_of_phase_process_class mPhase2;
+46 -46
View File
@@ -334,52 +334,52 @@ public:
actionFunc mExecFn; actionFunc mExecFn;
}; };
static const ActionPair ActionTable[8]; static DUSK_GAME_DATA const ActionPair ActionTable[8];
static seqFunc* m_funcTbl[44]; static DUSK_GAME_DATA seqFunc* m_funcTbl[44];
static seqFunc m_seq00_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq00_funcTbl[2];
static seqFunc m_seq01_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq01_funcTbl[2];
static seqFunc m_seq02_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq02_funcTbl[2];
static seqFunc m_seq03_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq03_funcTbl[2];
static seqFunc m_seq04_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq04_funcTbl[2];
static seqFunc m_seq05_funcTbl[4]; static DUSK_GAME_DATA seqFunc m_seq05_funcTbl[4];
static seqFunc m_seq06_funcTbl[4]; static DUSK_GAME_DATA seqFunc m_seq06_funcTbl[4];
static seqFunc m_seq07_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq07_funcTbl[2];
static seqFunc m_seq08_funcTbl[7]; static DUSK_GAME_DATA seqFunc m_seq08_funcTbl[7];
static seqFunc m_seq09_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq09_funcTbl[2];
static seqFunc m_seq10_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq10_funcTbl[2];
static seqFunc m_seq11_funcTbl[6]; static DUSK_GAME_DATA seqFunc m_seq11_funcTbl[6];
static seqFunc m_seq12_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq12_funcTbl[2];
static seqFunc m_seq13_funcTbl[6]; static DUSK_GAME_DATA seqFunc m_seq13_funcTbl[6];
static seqFunc m_seq14_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq14_funcTbl[2];
static seqFunc m_seq15_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq15_funcTbl[2];
static seqFunc m_seq16_funcTbl[7]; static DUSK_GAME_DATA seqFunc m_seq16_funcTbl[7];
static seqFunc m_seq17_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq17_funcTbl[2];
static seqFunc m_seq18_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq18_funcTbl[2];
static seqFunc m_seq19_funcTbl[7]; static DUSK_GAME_DATA seqFunc m_seq19_funcTbl[7];
static seqFunc m_seq20_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq20_funcTbl[2];
static seqFunc m_seq21_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq21_funcTbl[2];
static seqFunc m_seq22_funcTbl[4]; static DUSK_GAME_DATA seqFunc m_seq22_funcTbl[4];
static seqFunc m_seq23_funcTbl[7]; static DUSK_GAME_DATA seqFunc m_seq23_funcTbl[7];
static seqFunc m_seq24_funcTbl[5]; static DUSK_GAME_DATA seqFunc m_seq24_funcTbl[5];
static seqFunc m_seq25_funcTbl[7]; static DUSK_GAME_DATA seqFunc m_seq25_funcTbl[7];
static seqFunc m_seq26_funcTbl[3]; static DUSK_GAME_DATA seqFunc m_seq26_funcTbl[3];
static seqFunc m_seq27_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq27_funcTbl[2];
static seqFunc m_seq28_funcTbl[3]; static DUSK_GAME_DATA seqFunc m_seq28_funcTbl[3];
static seqFunc m_seq29_funcTbl[3]; static DUSK_GAME_DATA seqFunc m_seq29_funcTbl[3];
static seqFunc m_seq30_funcTbl[6]; static DUSK_GAME_DATA seqFunc m_seq30_funcTbl[6];
static seqFunc m_seq31_funcTbl[6]; static DUSK_GAME_DATA seqFunc m_seq31_funcTbl[6];
static seqFunc m_seq32_funcTbl[7]; static DUSK_GAME_DATA seqFunc m_seq32_funcTbl[7];
static seqFunc m_seq33_funcTbl[7]; static DUSK_GAME_DATA seqFunc m_seq33_funcTbl[7];
static seqFunc m_seq34_funcTbl[9]; static DUSK_GAME_DATA seqFunc m_seq34_funcTbl[9];
static seqFunc m_seq35_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq35_funcTbl[2];
static seqFunc m_seq36_funcTbl[4]; static DUSK_GAME_DATA seqFunc m_seq36_funcTbl[4];
static seqFunc m_seq37_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq37_funcTbl[2];
static seqFunc m_seq38_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq38_funcTbl[2];
static seqFunc m_seq39_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq39_funcTbl[2];
static seqFunc m_seq40_funcTbl[3]; static DUSK_GAME_DATA seqFunc m_seq40_funcTbl[3];
static seqFunc m_seq41_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq41_funcTbl[2];
static seqFunc m_seq42_funcTbl[2]; static DUSK_GAME_DATA seqFunc m_seq42_funcTbl[2];
static seqFunc m_seq43_funcTbl[3]; static DUSK_GAME_DATA seqFunc m_seq43_funcTbl[3];
/* 0xAC8 */ J3DModel* field_0xac8; /* 0xAC8 */ J3DModel* field_0xac8;
/* 0xACC */ J3DModel* field_0xacc; /* 0xACC */ J3DModel* field_0xacc;
+2 -2
View File
@@ -11,7 +11,7 @@ class daNpcChat_Param_c {
public: public:
virtual ~daNpcChat_Param_c() {} virtual ~daNpcChat_Param_c() {}
static daNpcChat_HIOParam const m; static DUSK_GAME_DATA daNpcChat_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -102,7 +102,7 @@ public:
void setFear() { mFear = true; } void setFear() { mFear = true; }
void setTalkFlag() { mTalkFlag = true; } void setTalkFlag() { mTalkFlag = true; }
static eventFunc DUSK_CONST mEvtSeqList[1]; static DUSK_GAME_DATA eventFunc DUSK_CONST mEvtSeqList[1];
private: private:
/* 0xB48 */ Z2CreatureCitizen mSound; /* 0xB48 */ Z2CreatureCitizen mSound;
+2 -2
View File
@@ -12,7 +12,7 @@ class daNpcChin_Param_c {
public: public:
virtual ~daNpcChin_Param_c() {} virtual ~daNpcChin_Param_c() {}
static daNpcChin_HIOParam const m; static DUSK_GAME_DATA daNpcChin_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -183,7 +183,7 @@ public:
inline void ForcibleTalk_Off() { field_0xe06 = 0; } inline void ForcibleTalk_Off() { field_0xe06 = 0; }
inline u8 getForcibleTalk2() { return field_0xe06; } inline u8 getForcibleTalk2() { return field_0xe06; }
static eventFunc mEvtSeqList[8]; static DUSK_GAME_DATA eventFunc mEvtSeqList[8];
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
/* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm; /* 0xBD8 */ daNpcF_MatAnm_c* mpMatAnm;
+3 -3
View File
@@ -14,7 +14,7 @@ class daNpc_clerkA_Param_c {
public: public:
virtual ~daNpc_clerkA_Param_c() {} virtual ~daNpc_clerkA_Param_c() {}
static const daNpc_clerkA_HIOParam m; static DUSK_GAME_DATA const daNpc_clerkA_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -124,8 +124,8 @@ public:
u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; } u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; }
static char DUSK_CONST* DUSK_CONST mCutNameList[1]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
private: private:
/* 0x0F7C */ NPC_CLERKA_HIO_CLASS* mpHIO; /* 0x0F7C */ NPC_CLERKA_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -15,7 +15,7 @@ class daNpc_clerkB_Param_c {
public: public:
virtual ~daNpc_clerkB_Param_c() {} virtual ~daNpc_clerkB_Param_c() {}
static const daNpc_clerkB_HIOParam m; static DUSK_GAME_DATA const daNpc_clerkB_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -137,8 +137,8 @@ public:
u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; } u8 getMaxNumItem() { return (fopAcM_GetParam(this) & 0xF000000) >> 24; }
static char DUSK_CONST* DUSK_CONST mCutNameList[1]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
private: private:
/* 0x0F7C */ mDoExt_bpkAnm mBpkAnm2; /* 0x0F7C */ mDoExt_bpkAnm mBpkAnm2;
+3 -3
View File
@@ -12,7 +12,7 @@ class daNpcClerkt_Param_c {
public: public:
virtual ~daNpcClerkt_Param_c() {} virtual ~daNpcClerkt_Param_c() {}
static const daNpcClerkt_HIOParam m; static DUSK_GAME_DATA const daNpcClerkt_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -125,8 +125,8 @@ public:
} }
} }
static char DUSK_CONST* DUSK_CONST mCutNameList[1]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
private: private:
/* 0x0F7C */ NPC_CLERKT_HIO_CLASS* mpHIO; /* 0x0F7C */ NPC_CLERKT_HIO_CLASS* mpHIO;
+1 -1
View File
@@ -295,7 +295,7 @@ public:
const daNpcCoach_Attr_c& attr() const { return M_attr; } const daNpcCoach_Attr_c& attr() const { return M_attr; }
static daNpcCoach_Attr_c const M_attr; static DUSK_GAME_DATA daNpcCoach_Attr_c const M_attr;
static u16 const ParticleName[10]; static u16 const ParticleName[10];
private: private:
/* 0x0568 */ daNpcChHorse_c mChHorse; /* 0x0568 */ daNpcChHorse_c mChHorse;
+3 -3
View File
@@ -12,7 +12,7 @@ class daNpc_Doc_Param_c {
public: public:
virtual ~daNpc_Doc_Param_c() {} virtual ~daNpc_Doc_Param_c() {}
static const daNpc_Doc_HIOParam m; static DUSK_GAME_DATA const daNpc_Doc_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -133,8 +133,8 @@ public:
return (fopAcM_GetParam(this) & 0xFF00) >> 8; return (fopAcM_GetParam(this) & 0xFF00) >> 8;
} }
static char DUSK_CONST* DUSK_CONST mCutNameList[1]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
private: private:
/* 0xE40 */ NPC_DOC_HIO_CLASS* mpHIO; /* 0xE40 */ NPC_DOC_HIO_CLASS* mpHIO;
+2 -2
View File
@@ -12,7 +12,7 @@ class daNpcDoorBoy_Param_c {
public: public:
virtual ~daNpcDoorBoy_Param_c() {} virtual ~daNpcDoorBoy_Param_c() {}
static daNpcDoorBoy_HIOParam const m; static DUSK_GAME_DATA daNpcDoorBoy_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -78,7 +78,7 @@ public:
inline int getTimeHour(); inline int getTimeHour();
inline bool isDummyTalk(); inline bool isDummyTalk();
static EventFn DUSK_CONST mEvtSeqList[1]; static DUSK_GAME_DATA EventFn DUSK_CONST mEvtSeqList[1];
private: private:
/* 0xB48 */ Z2CreatureCitizen mSound; /* 0xB48 */ Z2CreatureCitizen mSound;
+1 -1
View File
@@ -11,7 +11,7 @@ class daNpcDrSol_Param_c {
public: public:
virtual ~daNpcDrSol_Param_c() {} virtual ~daNpcDrSol_Param_c() {}
static const daNpcDrSol_HIOParam m; static DUSK_GAME_DATA const daNpcDrSol_HIOParam m;
}; };
#if DEBUG #if DEBUG
+3 -3
View File
@@ -94,7 +94,7 @@ class daNpc_Fairy_Param_c {
public: public:
virtual ~daNpc_Fairy_Param_c() {} virtual ~daNpc_Fairy_Param_c() {}
static daNpc_Fairy_HIOParam const m; static DUSK_GAME_DATA daNpc_Fairy_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -294,8 +294,8 @@ public:
u8 getSceneNo1() { return (fopAcM_GetParam(this) >> 8) & 0xFF; } u8 getSceneNo1() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
u8 getSceneNo2() { return (fopAcM_GetParam(this) >> 16) & 0xFF; } u8 getSceneNo2() { return (fopAcM_GetParam(this) >> 16) & 0xFF; }
static char DUSK_CONST* DUSK_CONST mCutNameList[18]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[18];
static cutFunc DUSK_CONST mCutList[18]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[18];
private: private:
/* 0x0E40 */ NPC_FAIRY_HIO_CLASS* mHIO; /* 0x0E40 */ NPC_FAIRY_HIO_CLASS* mHIO;
/* 0x0E44 */ dCcD_Cyl mCyl; /* 0x0E44 */ dCcD_Cyl mCyl;
+3 -3
View File
@@ -13,7 +13,7 @@ class daNpc_FairySeirei_Param_c {
public: public:
virtual ~daNpc_FairySeirei_Param_c() {} virtual ~daNpc_FairySeirei_Param_c() {}
static daNpc_FairySeirei_HIOParam const m; static DUSK_GAME_DATA daNpc_FairySeirei_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -90,8 +90,8 @@ public:
int getSeneNo() { return (fopAcM_GetParam(this) >> 8) & 0xFF; } int getSeneNo() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
static DUSK_CONST char* mCutNameList[1]; static DUSK_GAME_DATA DUSK_CONST char* mCutNameList[1];
static DUSK_CONST cutFunc mCutList[1]; static DUSK_GAME_DATA DUSK_CONST cutFunc mCutList[1];
private: private:
/* 0xE40 */ NPC_FAIRY_SEIREI_HIO_CLASS* mpHIO; /* 0xE40 */ NPC_FAIRY_SEIREI_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -11,7 +11,7 @@ class daNpc_Gnd_Param_c {
public: public:
virtual ~daNpc_Gnd_Param_c() {} virtual ~daNpc_Gnd_Param_c() {}
static const daNpc_Gnd_HIOParam m; static DUSK_GAME_DATA const daNpc_Gnd_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -96,8 +96,8 @@ public:
s32 getNeckJointNo() { return 3; } s32 getNeckJointNo() { return 3; }
s32 getBackboneJointNo() { return 1; } s32 getBackboneJointNo() { return 1; }
static char DUSK_CONST* DUSK_CONST mCutNameList[1]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[1];
static cutFunc DUSK_CONST mCutList[1]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
private: private:
/* 0xE40 */ NPC_GND_HIO_CLASS* mpHIO; /* 0xE40 */ NPC_GND_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -21,7 +21,7 @@ class daNpc_grA_Param_c {
public: public:
virtual ~daNpc_grA_Param_c() {} virtual ~daNpc_grA_Param_c() {}
static daNpc_grA_HIOParam const m; static DUSK_GAME_DATA daNpc_grA_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -138,9 +138,9 @@ public:
void addCarryNum() { field_0x1692++; } void addCarryNum() { field_0x1692++; }
u8 getPathNoFromParam() { return home.angle.z; } u8 getPathNoFromParam() { return home.angle.z; }
void setGateWalk() { field_0x14D0 = 1; } void setGateWalk() { field_0x14D0 = 1; }
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[12]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[12];
typedef BOOL (daNpc_grA_c::*cut_type)(int); typedef BOOL (daNpc_grA_c::*cut_type)(int);
static cut_type DUSK_CONST mEvtCutList[]; static DUSK_GAME_DATA cut_type DUSK_CONST mEvtCutList[];
private: private:
typedef BOOL (daNpc_grA_c::*daNpc_grA_c_Action)(void*); typedef BOOL (daNpc_grA_c::*daNpc_grA_c_Action)(void*);
+3 -3
View File
@@ -12,7 +12,7 @@ class daNpc_grC_Param_c {
public: public:
virtual ~daNpc_grC_Param_c() {} virtual ~daNpc_grC_Param_c() {}
static daNpc_grC_HIOParam const m; static DUSK_GAME_DATA daNpc_grC_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -89,8 +89,8 @@ public:
void setPrtcl(); void setPrtcl();
void adjustShapeAngle() {} void adjustShapeAngle() {}
static char DUSK_CONST* DUSK_CONST mEvtCutNameList; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList;
static EventFn DUSK_CONST mEvtCutList[1]; static DUSK_GAME_DATA EventFn DUSK_CONST mEvtCutList[1];
private: private:
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
+3 -3
View File
@@ -11,7 +11,7 @@ class daNpc_Grd_Param_c {
public: public:
virtual ~daNpc_Grd_Param_c() {} virtual ~daNpc_Grd_Param_c() {}
static daNpc_Grd_HIOParam const m; static DUSK_GAME_DATA daNpc_Grd_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -81,8 +81,8 @@ public:
BOOL ECut_nodToGrz(int); BOOL ECut_nodToGrz(int);
void adjustShapeAngle() {} void adjustShapeAngle() {}
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[2];
static cutFunc DUSK_CONST mEvtCutList[2]; static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[2];
private: private:
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
+3 -3
View File
@@ -12,7 +12,7 @@ class daNpc_grM_Param_c {
public: public:
virtual ~daNpc_grM_Param_c() {} virtual ~daNpc_grM_Param_c() {}
static daNpc_grM_HIOParam const m; static DUSK_GAME_DATA daNpc_grM_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -131,8 +131,8 @@ public:
BOOL checkChangeJoint(int param_0) { return param_0 == JNT_HEAD; } BOOL checkChangeJoint(int param_0) { return param_0 == JNT_HEAD; }
BOOL checkRemoveJoint(int param_0) { return param_0 == JNT_MOUTH; } BOOL checkRemoveJoint(int param_0) { return param_0 == JNT_MOUTH; }
static char DUSK_CONST* DUSK_CONST mCutNameList[2]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[2];
static cutFunc DUSK_CONST mCutList[2]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[2];
private: private:
/* 0x0F7C */ NPC_GRM_HIO_CLASS* mpHIO; /* 0x0F7C */ NPC_GRM_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -38,7 +38,7 @@ class daNpc_grMC_Param_c {
public: public:
virtual ~daNpc_grMC_Param_c() {} virtual ~daNpc_grMC_Param_c() {}
static daNpc_grMC_HIOParam const m; static DUSK_GAME_DATA daNpc_grMC_HIOParam const m;
}; };
class daNpc_grMC_c : public dShopSystem_c { class daNpc_grMC_c : public dShopSystem_c {
@@ -124,8 +124,8 @@ public:
BOOL checkRemoveJoint(int param_1) { return param_1 == JNT_MOUTH; } BOOL checkRemoveJoint(int param_1) { return param_1 == JNT_MOUTH; }
u16 getEyeballMaterialNo() { return 1; }; u16 getEyeballMaterialNo() { return 1; };
static char DUSK_CONST* DUSK_CONST mCutNameList; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList;
static cutFunc DUSK_CONST mCutList[1]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[1];
private: private:
/* 0x0F7C */ NPC_GRMC_HIO_CLASS* mpHIO; /* 0x0F7C */ NPC_GRMC_HIO_CLASS* mpHIO;
+3 -3
View File
@@ -20,7 +20,7 @@ class daNpc_grO_Param_c {
public: public:
virtual ~daNpc_grO_Param_c() {} virtual ~daNpc_grO_Param_c() {}
static daNpc_grO_HIOParam const m; static DUSK_GAME_DATA daNpc_grO_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -85,8 +85,8 @@ public:
int test(void*); int test(void*);
void adjustShapeAngle() {} void adjustShapeAngle() {}
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[3]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[3];
static cutFunc DUSK_CONST mEvtCutList[3]; static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[3];
private: private:
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
+3 -3
View File
@@ -11,7 +11,7 @@ class daNpc_grR_Param_c {
public: public:
virtual ~daNpc_grR_Param_c() {} virtual ~daNpc_grR_Param_c() {}
static daNpc_grR_HIOParam const m; static DUSK_GAME_DATA daNpc_grR_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -83,8 +83,8 @@ public:
int test(void*); int test(void*);
void adjustShapeAngle() {} void adjustShapeAngle() {}
static char DUSK_CONST* DUSK_CONST mEvtCutNameList; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList;
static cutFunc DUSK_CONST mEvtCutList[1]; static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[1];
private: private:
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
+3 -3
View File
@@ -11,7 +11,7 @@ class daNpc_grS_Param_c {
public: public:
virtual ~daNpc_grS_Param_c() {} virtual ~daNpc_grS_Param_c() {}
static const daNpc_grS_HIOParam m; static DUSK_GAME_DATA const daNpc_grS_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -84,8 +84,8 @@ public:
void setPrtcl(); void setPrtcl();
void adjustShapeAngle() {} void adjustShapeAngle() {}
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[2]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[2];
static cutFunc DUSK_CONST mEvtCutList[2]; static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[2];
private: private:
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
+3 -3
View File
@@ -28,7 +28,7 @@ class daNpc_Grz_Param_c {
public: public:
virtual ~daNpc_Grz_Param_c() {} virtual ~daNpc_Grz_Param_c() {}
static daNpc_Grz_HIOParam const m; static DUSK_GAME_DATA daNpc_Grz_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -116,8 +116,8 @@ public:
u8 getPathNoFromParam() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; } u8 getPathNoFromParam() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[7]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[7];
static cutFunc DUSK_CONST mEvtCutList[7]; static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[7];
private: private:
/* 0x0B48 */ Z2Creature mSound; /* 0x0B48 */ Z2Creature mSound;
+1 -1
View File
@@ -60,7 +60,7 @@ public:
u32 getPathID() { return fopAcM_GetParam(this) >> 0x10 & 0xFF; } u32 getPathID() { return fopAcM_GetParam(this) >> 0x10 & 0xFF; }
static actionFunc ActionTable[7][2]; static DUSK_GAME_DATA actionFunc ActionTable[7][2];
private: private:
/* 0xAC8 */ J3DModel* mpModel; /* 0xAC8 */ J3DModel* mpModel;
+3 -3
View File
@@ -19,7 +19,7 @@ class daNpc_GWolf_Param_c {
public: public:
virtual ~daNpc_GWolf_Param_c() {} virtual ~daNpc_GWolf_Param_c() {}
static daNpc_GWolf_HIOParam const m; static DUSK_GAME_DATA daNpc_GWolf_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -104,8 +104,8 @@ public:
void setHowlingEndFlag() { field_0xe1c = 2; } void setHowlingEndFlag() { field_0xe1c = 2; }
void setHowlingFlag() { field_0xe1c = 1; } void setHowlingFlag() { field_0xe1c = 1; }
static char DUSK_CONST* DUSK_CONST mEvtCutNameList[5]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mEvtCutNameList[5];
static cutFunc DUSK_CONST mEvtCutList[5]; static DUSK_GAME_DATA cutFunc DUSK_CONST mEvtCutList[5];
private: private:
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
+5 -5
View File
@@ -23,7 +23,7 @@ class daNpc_Hanjo_Param_c {
public: public:
virtual ~daNpc_Hanjo_Param_c() {} virtual ~daNpc_Hanjo_Param_c() {}
static const daNpc_Hanjo_HIOParam m; static DUSK_GAME_DATA const daNpc_Hanjo_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -217,10 +217,10 @@ public:
u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } u8 getPathID() { return (fopAcM_GetParam(this) & 0xff00) >> 8; }
static dCcD_SrcGObjInf const mStoneCcDObjInfo; static DUSK_GAME_DATA dCcD_SrcGObjInf const mStoneCcDObjInfo;
static char DUSK_CONST* DUSK_CONST mCutNameList[6]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[6];
static cutFunc DUSK_CONST mCutList[6]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[6];
static dCcD_SrcSph DUSK_CONST mStoneCcDSph; static DUSK_GAME_DATA dCcD_SrcSph DUSK_CONST mStoneCcDSph;
private: private:
/* 0x0E40 */ NPC_HANJO_HIO_CLASS* mpHIO; /* 0x0E40 */ NPC_HANJO_HIO_CLASS* mpHIO;
/* 0x0E44 */ J3DModel* mModel1; /* 0x0E44 */ J3DModel* mModel1;
+3 -3
View File
@@ -13,7 +13,7 @@ class daNpc_Hoz_Param_c {
public: public:
virtual ~daNpc_Hoz_Param_c() {} virtual ~daNpc_Hoz_Param_c() {}
static const daNpc_Hoz_HIOParam m; static DUSK_GAME_DATA const daNpc_Hoz_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -125,8 +125,8 @@ public:
bool getGameStartFlag() { return mGameStartFlag; } bool getGameStartFlag() { return mGameStartFlag; }
void setPotBreakFlag() { mPotBreakFlag = true; } void setPotBreakFlag() { mPotBreakFlag = true; }
static char DUSK_CONST* DUSK_CONST mCutNameList[8]; static DUSK_GAME_DATA char DUSK_CONST* DUSK_CONST mCutNameList[8];
static cutFunc DUSK_CONST mCutList[]; static DUSK_GAME_DATA cutFunc DUSK_CONST mCutList[];
private: private:
/* 0xE40 */ NPC_HOZ_HIO_CLASS* mpHIO; /* 0xE40 */ NPC_HOZ_HIO_CLASS* mpHIO;
+2 -2
View File
@@ -12,7 +12,7 @@ class daNpcImpal_Param_c {
public: public:
virtual ~daNpcImpal_Param_c() {} virtual ~daNpcImpal_Param_c() {}
static const daNpcImpal_HIOParam m; static DUSK_GAME_DATA const daNpcImpal_HIOParam m;
}; };
#if DEBUG #if DEBUG
@@ -121,7 +121,7 @@ public:
inline void setLookMode(int i_lookMode); inline void setLookMode(int i_lookMode);
inline void deleteObstacle(); inline void deleteObstacle();
static EventFn mEvtSeqList[4]; static DUSK_GAME_DATA EventFn mEvtSeqList[4];
private: private:
/* 0xB48 */ Z2Creature mCreatureSound; /* 0xB48 */ Z2Creature mCreatureSound;
+2 -2
View File
@@ -12,7 +12,7 @@ class daNpcIns_Param_c {
public: public:
virtual ~daNpcIns_Param_c() {} virtual ~daNpcIns_Param_c() {}
static daNpcIns_HIOParam const m; static DUSK_GAME_DATA daNpcIns_HIOParam const m;
}; };
#if DEBUG #if DEBUG
@@ -119,7 +119,7 @@ public:
inline void playExpression(); inline void playExpression();
BOOL chkAction(actionFunc action) { return action == mAction; } BOOL chkAction(actionFunc action) { return action == mAction; }
static eventFunc mEvtSeqList[1]; static DUSK_GAME_DATA eventFunc mEvtSeqList[1];
private: private:
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;

Some files were not shown because too many files have changed in this diff Show More