mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-24 05:46:51 -04:00
Game ABI / headers refactoring (#2215)
* Game ABI / headers refactoring * Delete dusk/imgui.h
This commit is contained in:
@@ -33,8 +33,6 @@ function(setup_android_exports target)
|
||||
|
||||
set(_vscript "${CMAKE_BINARY_DIR}/dusklight_exports.ver")
|
||||
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_EXE}" exports
|
||||
"@${_rsp}"
|
||||
--out "${_vscript}"
|
||||
@@ -42,6 +40,7 @@ function(setup_android_exports target)
|
||||
--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
|
||||
|
||||
@@ -41,14 +41,13 @@ function(setup_apple_exports target)
|
||||
|
||||
set(_exp "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.exp")
|
||||
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}" exports
|
||||
"@${_rsp}"
|
||||
--out "${_exp}"
|
||||
--exclude cmake_pch
|
||||
--exclude miniz
|
||||
--exclude asan_options
|
||||
--exclude src/dusk
|
||||
${_sdk_args}
|
||||
COMMENT "Generating dusklight exports"
|
||||
VERBATIM)
|
||||
|
||||
+33
-10
@@ -9,24 +9,47 @@ if (ANDROID)
|
||||
list(APPEND _game_compile_defs TARGET_ANDROID=1)
|
||||
endif ()
|
||||
|
||||
set(_game_include_dirs
|
||||
# Public game headers
|
||||
set(_game_abi_include_dirs
|
||||
${_game_root}/include
|
||||
${_game_root}/src
|
||||
${_game_root}/assets/GZ2E01 # TODO: make this dynamic if needed?
|
||||
${_game_root}/assets/GZ2E01
|
||||
${_game_root}/libs/JSystem/include
|
||||
${_game_root}/libs
|
||||
${_game_root}/extern/aurora/include/dolphin
|
||||
${_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
|
||||
${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)
|
||||
target_include_directories(dusklight_game_headers INTERFACE ${_game_include_dirs})
|
||||
target_compile_definitions(dusklight_game_headers INTERFACE ${_game_compile_defs})
|
||||
if (TARGET dawn::dawncpp_headers)
|
||||
target_link_libraries(dusklight_game_headers INTERFACE dawn::dawncpp_headers)
|
||||
elseif (TARGET dawn::webgpu_dawn)
|
||||
target_link_libraries(dusklight_game_headers INTERFACE dawn::webgpu_dawn)
|
||||
endif ()
|
||||
|
||||
# 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)
|
||||
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)
|
||||
|
||||
+94
-34
@@ -1,4 +1,4 @@
|
||||
# add_mod(<target> SOURCES <file>... MOD_JSON <mod.json>
|
||||
# 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])
|
||||
set(DUSK_MODS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/mods" CACHE PATH "Directory to write mod packages into")
|
||||
@@ -47,9 +47,28 @@ function(_mod_collect_assets out_var dir)
|
||||
set(${out_var} ${_files} 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(add_mod target_name)
|
||||
cmake_parse_arguments(ARG "BUNDLE" "MOD_JSON;RES_DIR;OVERLAY_DIR;TEXTURES_DIR;OUTPUT_DIR"
|
||||
"SOURCES;RUNTIME_LIBRARIES" ${ARGN})
|
||||
"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)
|
||||
message(FATAL_ERROR "add_mod: MOD_JSON is required")
|
||||
endif ()
|
||||
@@ -58,7 +77,27 @@ function(add_mod target_name)
|
||||
message(FATAL_ERROR "add_mod: MOD_JSON does not exist: ${_mod_json}")
|
||||
endif ()
|
||||
|
||||
set(_supported_features game webgpu)
|
||||
set(_features "")
|
||||
foreach (_feature IN LISTS ARG_FEATURES)
|
||||
list(FIND _supported_features "${_feature}" _feature_index)
|
||||
if (_feature_index EQUAL -1)
|
||||
list(JOIN _supported_features ", " _supported_features_text)
|
||||
message(FATAL_ERROR
|
||||
"add_mod: unknown feature '${_feature}' (supported: ${_supported_features_text})")
|
||||
endif ()
|
||||
list(FIND _features "${_feature}" _duplicate_index)
|
||||
if (NOT _duplicate_index EQUAL -1)
|
||||
message(FATAL_ERROR "add_mod: duplicate feature '${_feature}'")
|
||||
endif ()
|
||||
list(APPEND _features "${_feature}")
|
||||
endforeach ()
|
||||
if (_features AND NOT ARG_SOURCES)
|
||||
message(FATAL_ERROR "add_mod: FEATURES requires SOURCES")
|
||||
endif ()
|
||||
|
||||
set(_has_lib FALSE)
|
||||
set(_needs_host_link FALSE)
|
||||
set(_lib_platform "")
|
||||
set(_lib_name "")
|
||||
if (ARG_SOURCES)
|
||||
@@ -72,7 +111,16 @@ function(add_mod target_name)
|
||||
VISIBILITY_INLINES_HIDDEN ON
|
||||
WINDOWS_EXPORT_ALL_SYMBOLS OFF)
|
||||
target_compile_features(${target_name} PRIVATE cxx_std_20)
|
||||
target_link_libraries(${target_name} PRIVATE dusklight_game_headers)
|
||||
target_link_libraries(${target_name} PRIVATE dusklight_mod_api)
|
||||
foreach (_feature IN LISTS _features)
|
||||
target_link_libraries(${target_name} PRIVATE dusklight_mod_feature_${_feature})
|
||||
if (_feature STREQUAL "webgpu")
|
||||
_mod_add_webgpu_headers(${target_name})
|
||||
endif ()
|
||||
if (_feature STREQUAL "game" OR _feature STREQUAL "webgpu")
|
||||
set(_needs_host_link TRUE)
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
if (NOT TARGET dusklight)
|
||||
# Apply global compile options for out-of-tree mod builds
|
||||
@@ -95,34 +143,42 @@ function(add_mod target_name)
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
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 ()
|
||||
message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (game executable)")
|
||||
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 ()
|
||||
message(FATAL_ERROR
|
||||
"add_mod: FEATURES ${_features} requires DUSK_GAME_EXE (game executable)")
|
||||
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 ()
|
||||
target_link_options(${target_name} PRIVATE
|
||||
-Xlinker -bundle_loader -Xlinker "${_game_exe}")
|
||||
set_property(TARGET ${target_name} APPEND PROPERTY LINK_DEPENDS "${_game_exe}")
|
||||
set_target_properties(${target_name} PROPERTIES
|
||||
BUILD_RPATH "@loader_path"
|
||||
INSTALL_RPATH "@loader_path")
|
||||
elseif (ANDROID)
|
||||
if (TARGET dusklight)
|
||||
target_link_libraries(${target_name} PRIVATE dusklight)
|
||||
elseif (DUSK_GAME_EXE)
|
||||
_mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}")
|
||||
target_link_libraries(${target_name} PRIVATE "${_game_lib}")
|
||||
else ()
|
||||
message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (libmain.so or stub)")
|
||||
if (_needs_host_link)
|
||||
if (TARGET dusklight)
|
||||
target_link_libraries(${target_name} PRIVATE dusklight)
|
||||
elseif (DUSK_GAME_EXE)
|
||||
_mod_resolve_source_path(_game_lib "${DUSK_GAME_EXE}")
|
||||
target_link_libraries(${target_name} PRIVATE "${_game_lib}")
|
||||
else ()
|
||||
message(FATAL_ERROR
|
||||
"add_mod: FEATURES ${_features} requires DUSK_GAME_EXE (libmain.so or stub)")
|
||||
endif ()
|
||||
endif ()
|
||||
set_target_properties(${target_name} PROPERTIES
|
||||
BUILD_RPATH "$ORIGIN"
|
||||
INSTALL_RPATH "$ORIGIN")
|
||||
elseif (UNIX)
|
||||
target_link_options(${target_name} PRIVATE -Wl,--allow-shlib-undefined)
|
||||
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")
|
||||
@@ -131,22 +187,26 @@ function(add_mod target_name)
|
||||
# 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 (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$")
|
||||
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 ()
|
||||
message(FATAL_ERROR
|
||||
"add_mod: DUSK_GAME_EXE must be an import library on Windows "
|
||||
"(sdk/windows-<arch>.lib)")
|
||||
"add_mod: FEATURES ${_features} requires DUSK_GAME_EXE (import library)")
|
||||
endif ()
|
||||
else ()
|
||||
message(FATAL_ERROR "add_mod: DUSK_GAME_EXE is not set (import library)")
|
||||
target_link_libraries(${target_name} PRIVATE "${_game_lib}")
|
||||
endif ()
|
||||
target_link_libraries(${target_name} PRIVATE "${_game_lib}")
|
||||
set_target_properties(${target_name} PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
|
||||
target_compile_definitions(${target_name} PRIVATE _ITERATOR_DEBUG_LEVEL=0)
|
||||
endif ()
|
||||
|
||||
@@ -57,14 +57,13 @@ function(setup_windows_exports target)
|
||||
# Generate curated exports list from the main binary
|
||||
set(_def "${CMAKE_BINARY_DIR}/${_config_subdir}dusklight_exports.def")
|
||||
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
|
||||
"@${_rsp}"
|
||||
--out "${_def}"
|
||||
--exclude cmake_pch
|
||||
--exclude miniz
|
||||
--exclude asan_options
|
||||
--exclude src/dusk
|
||||
--max-exports 58000
|
||||
${_sdk_args}
|
||||
${_forward_args}
|
||||
|
||||
+12
-19
@@ -50,6 +50,7 @@ set(DUSKLIGHT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dusklight" CACHE PATH "Path to du
|
||||
add_subdirectory("${DUSKLIGHT_DIR}/sdk" dusklight-sdk EXCLUDE_FROM_ALL)
|
||||
|
||||
add_mod(my_mod
|
||||
FEATURES game # optional
|
||||
SOURCES src/mod.cpp
|
||||
MOD_JSON mod.json
|
||||
RES_DIR res # optional
|
||||
@@ -58,6 +59,12 @@ add_mod(my_mod
|
||||
)
|
||||
```
|
||||
|
||||
Available features:
|
||||
- `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/<preset>/mods/` (configurable via the `DUSK_MODS_OUTPUT_DIR` cache variable).
|
||||
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.
|
||||
@@ -146,7 +153,7 @@ the service safe to call. A mod can use `IMPORT_SERVICE_VERSION` (or its optiona
|
||||
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 `include/mods/api.h` for the full 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
|
||||
error. No need to null check at call sites.
|
||||
@@ -415,6 +422,8 @@ unless changing host UI is intentional.
|
||||
|
||||
### 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.
|
||||
|
||||
@@ -465,6 +474,8 @@ first in-game frame. Projection matrices match the renderer's WebGPU clip conven
|
||||
|
||||
## 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/hook.hpp` provides typed helpers over the hook service:
|
||||
|
||||
@@ -581,24 +592,6 @@ dusk::mods::hook_add_pre<CreateItem>(svc_hook, on_create_item_pre);
|
||||
|
||||
For reference parameters (e.g. `const cXyz& pos`), `arg_ref<cXyz>` yields a direct reference.
|
||||
|
||||
### Game code ABI contract
|
||||
|
||||
A primary consideration when letting mods link against the game is maintaining ABI stability across Dusklight
|
||||
versions. If your mod calls or hooks game code directly (anything beyond the service APIs), import `GameService`
|
||||
(`mods/svc/game.h`):
|
||||
|
||||
```cpp
|
||||
IMPORT_SERVICE(GameService, svc_game);
|
||||
```
|
||||
|
||||
Its major version is the game code ABI epoch: it's bumped when game struct or vtable layouts change incompatibly, and
|
||||
the ordinary service version check then rejects your mod with a clear error instead of letting it corrupt memory in a
|
||||
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
|
||||
breaks entirely and plays nicer with other enabled mods.
|
||||
|
||||
---
|
||||
|
||||
## Asset Overlays
|
||||
|
||||
+87
-88
@@ -1411,68 +1411,101 @@ set(DOLPHIN_FILES
|
||||
)
|
||||
|
||||
set(DUSK_FILES
|
||||
include/dusk/action_bindings.h
|
||||
include/dusk/endian_gx.hpp
|
||||
include/dusk/config.hpp
|
||||
include/dusk/dvd_asset.hpp
|
||||
include/dusk/scope_guard.hpp
|
||||
src/dusk/dvd_asset.cpp
|
||||
include/helpers/batch.hpp
|
||||
include/helpers/endian_gx.hpp
|
||||
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.hpp
|
||||
src/dusk/asserts.cpp
|
||||
src/dusk/batch.cpp
|
||||
src/dusk/batch.hpp
|
||||
src/dusk/autosave.cpp
|
||||
src/dusk/config.cpp
|
||||
src/dusk/config.hpp
|
||||
src/dusk/crash_handler.cpp
|
||||
src/dusk/crash_reporting.cpp
|
||||
src/dusk/data.cpp
|
||||
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/file_select.cpp
|
||||
src/dusk/file_select.hpp
|
||||
src/dusk/frame_interpolation.cpp
|
||||
src/dusk/game_clock.cpp
|
||||
src/dusk/gamepad_color.cpp
|
||||
src/dusk/globals.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/io.cpp
|
||||
src/dusk/layout.cpp
|
||||
src/dusk/logging.cpp
|
||||
src/dusk/settings.cpp
|
||||
src/dusk/speedrun.cpp
|
||||
src/dusk/string.cpp
|
||||
src/dusk/stubs.cpp
|
||||
include/dusk/texture_replacements.hpp
|
||||
src/dusk/texture_replacements.cpp
|
||||
src/dusk/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/ImGuiActorSpawner.cpp
|
||||
src/dusk/imgui/ImGuiBloomWindow.cpp
|
||||
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.hpp
|
||||
src/dusk/imgui/ImGuiActorSpawner.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/ImGuiStateShare.hpp
|
||||
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/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/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.hpp
|
||||
src/dusk/ui/bool_button.cpp
|
||||
@@ -1481,9 +1514,9 @@ set(DUSK_FILES
|
||||
src/dusk/ui/button.hpp
|
||||
src/dusk/ui/component.cpp
|
||||
src/dusk/ui/component.hpp
|
||||
src/dusk/ui/controls.hpp
|
||||
src/dusk/ui/controller_config.cpp
|
||||
src/dusk/ui/controller_config.hpp
|
||||
src/dusk/ui/controls.hpp
|
||||
src/dusk/ui/document.cpp
|
||||
src/dusk/ui/document.hpp
|
||||
src/dusk/ui/editor.cpp
|
||||
@@ -1492,18 +1525,22 @@ set(DUSK_FILES
|
||||
src/dusk/ui/event.hpp
|
||||
src/dusk/ui/graphics_tuner.cpp
|
||||
src/dusk/ui/graphics_tuner.hpp
|
||||
src/dusk/ui/input.cpp
|
||||
src/dusk/ui/input.hpp
|
||||
src/dusk/ui/icon_provider.cpp
|
||||
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.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.hpp
|
||||
src/dusk/ui/mod_window.cpp
|
||||
src/dusk/ui/mod_window.hpp
|
||||
src/dusk/ui/modal.cpp
|
||||
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/number_button.cpp
|
||||
src/dusk/ui/number_button.hpp
|
||||
@@ -1511,10 +1548,6 @@ set(DUSK_FILES
|
||||
src/dusk/ui/overlay.hpp
|
||||
src/dusk/ui/pane.cpp
|
||||
src/dusk/ui/pane.hpp
|
||||
src/dusk/ui/menu_bar.cpp
|
||||
src/dusk/ui/menu_bar.hpp
|
||||
src/dusk/ui/mods_window.cpp
|
||||
src/dusk/ui/mods_window.hpp
|
||||
src/dusk/ui/prelaunch.cpp
|
||||
src/dusk/ui/prelaunch.hpp
|
||||
src/dusk/ui/preset.cpp
|
||||
@@ -1529,10 +1562,10 @@ set(DUSK_FILES
|
||||
src/dusk/ui/string_button.hpp
|
||||
src/dusk/ui/tab_bar.cpp
|
||||
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.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.hpp
|
||||
src/dusk/ui/ui.cpp
|
||||
@@ -1541,47 +1574,13 @@ set(DUSK_FILES
|
||||
src/dusk/ui/warp.hpp
|
||||
src/dusk/ui/window.cpp
|
||||
src/dusk/ui/window.hpp
|
||||
src/dusk/achievements.cpp
|
||||
src/dusk/iso_validate.cpp
|
||||
src/dusk/livesplit.cpp
|
||||
src/dusk/offset_ptr.cpp
|
||||
src/dusk/OSContext.cpp
|
||||
src/dusk/OSReport.cpp
|
||||
src/dusk/OSThread.cpp
|
||||
src/dusk/OSMutex.cpp
|
||||
src/dusk/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/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/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/update_check.cpp
|
||||
src/dusk/update_check.hpp
|
||||
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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "f_pc/f_pc_base.h"
|
||||
#include "SSystem/SComponent/c_bg_s_grp_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 {};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define C_M3D_G_TRI_H_
|
||||
|
||||
#include "SSystem/SComponent/c_m3d_g_pla.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class cM3dGCyl;
|
||||
|
||||
|
||||
@@ -95,12 +95,6 @@ static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr);
|
||||
#define THP_TEXTURE_SET_COUNT 3
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
namespace dusk {
|
||||
void MoviePlayerShutdown();
|
||||
}
|
||||
#endif
|
||||
|
||||
struct daMP_THPPlayer {
|
||||
/* 0x000 */ DVDFileInfo fileInfo;
|
||||
/* 0x03C */ THPHeader header;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/batch.hpp"
|
||||
#include "helpers/batch.hpp"
|
||||
#endif
|
||||
|
||||
class cCcD_Obj;
|
||||
@@ -112,11 +112,11 @@ public:
|
||||
TGXTexObj mTexObj_l_J_Ohana00_64TEX;
|
||||
TGXTexObj mTexObj_l_J_Ohana01_64128_0419TEX;
|
||||
|
||||
dusk::batch::LeafTemplate mTplHana00; // l_J_hana00DL
|
||||
dusk::batch::LeafTemplate mTplHana00Cut; // l_J_hana00_cDL
|
||||
dusk::batch::LeafTemplate mTplHana01; // l_J_hana01DL
|
||||
dusk::batch::LeafTemplate mTplHana01Cut00; // l_J_hana01_c_00DL
|
||||
dusk::batch::LeafTemplate mTplHana01Cut; // l_J_hana01_c_01DL
|
||||
batch::LeafTemplate mTplHana00; // l_J_hana00DL
|
||||
batch::LeafTemplate mTplHana00Cut; // l_J_hana00_cDL
|
||||
batch::LeafTemplate mTplHana01; // l_J_hana01DL
|
||||
batch::LeafTemplate mTplHana01Cut00; // l_J_hana01_c_00DL
|
||||
batch::LeafTemplate mTplHana01Cut; // l_J_hana01_c_01DL
|
||||
#endif
|
||||
}; // Size: 0x12A54
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "../../../src/dusk/batch.hpp"
|
||||
#include <helpers/batch.hpp>
|
||||
#endif
|
||||
|
||||
class cCcD_Obj;
|
||||
@@ -115,9 +115,9 @@ public:
|
||||
TGXTexObj mTexObj_l_M_Hijiki00TEX;
|
||||
TGXTexObj mTexObj_l_M_kusa05_RGBATEX;
|
||||
|
||||
dusk::batch::LeafTemplate mTplKusa9q; // l_M_Kusa_9qDL
|
||||
dusk::batch::LeafTemplate mTplKusa9qCut; // l_M_Kusa_9q_cDL
|
||||
dusk::batch::LeafTemplate mTplTengusa; // l_M_TenGusaDL
|
||||
batch::LeafTemplate mTplKusa9q; // l_M_Kusa_9qDL
|
||||
batch::LeafTemplate mTplKusa9qCut; // l_M_Kusa_9q_cDL
|
||||
batch::LeafTemplate mTplTengusa; // l_M_TenGusaDL
|
||||
#endif
|
||||
}; // Size: 0x1D718
|
||||
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
#include "d/d_bg_w_base.h"
|
||||
#include <mtx.h>
|
||||
#include <types.h>
|
||||
#include "dusk/offset_ptr.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "dusk/endian_ssystem.h"
|
||||
#include "helpers/offset_ptr.h"
|
||||
#include "helpers/endian.h"
|
||||
#include "helpers/endian_ssystem.h"
|
||||
|
||||
class cBgS_GrpPassChk;
|
||||
class cBgS_PolyPassChk;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "d/d_bg_plc.h"
|
||||
#include "d/d_bg_s_sph_chk.h"
|
||||
#include "d/d_bg_w_base.h"
|
||||
#include "dusk/offset_ptr.h"
|
||||
#include "helpers/offset_ptr.h"
|
||||
|
||||
class cBgS_GrpPassChk;
|
||||
class cBgS_PolyPassChk;
|
||||
|
||||
+19
-15
@@ -17,7 +17,15 @@
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/profiling.hpp"
|
||||
#if defined(DUSK_BUILDING_GAME)
|
||||
#include <tracy/Tracy.hpp>
|
||||
#include "dusk/settings.h"
|
||||
#else
|
||||
#ifndef ZoneScoped
|
||||
#define ZoneScoped
|
||||
#define ZoneScopedN(name)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
enum dComIfG_ButtonStatus {
|
||||
/* 0x00 */ BUTTON_STATUS_NONE,
|
||||
@@ -4837,27 +4845,23 @@ inline void dComIfGd_drawXluListDark() {
|
||||
g_dComIfG_gameInfo.drawlist.drawXluListDark();
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
void dComIfGd_drawXluListInvisible();
|
||||
#else
|
||||
inline void dComIfGd_drawXluListInvisible() {
|
||||
ZoneScoped;
|
||||
#ifdef TARGET_PC
|
||||
if (!dusk::getSettings().game.disableWaterRefraction) {
|
||||
#endif
|
||||
g_dComIfG_gameInfo.drawlist.drawXluListInvisible();
|
||||
#ifdef TARGET_PC
|
||||
}
|
||||
#endif
|
||||
g_dComIfG_gameInfo.drawlist.drawXluListInvisible();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
void dComIfGd_drawOpaListInvisible();
|
||||
#else
|
||||
inline void dComIfGd_drawOpaListInvisible() {
|
||||
ZoneScoped;
|
||||
#ifdef TARGET_PC
|
||||
if (!dusk::getSettings().game.disableWaterRefraction) {
|
||||
#endif
|
||||
g_dComIfG_gameInfo.drawlist.drawOpaListInvisible();
|
||||
#ifdef TARGET_PC
|
||||
}
|
||||
#endif
|
||||
g_dComIfG_gameInfo.drawlist.drawOpaListInvisible();
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void dComIfGd_drawXluListZxlu() {
|
||||
ZoneScoped;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "JSystem/J2DGraph/J2DScreen.h"
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "SSystem/SComponent/c_m3d_g_pla.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
#include "f_op/f_op_view.h"
|
||||
#include "global.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f_pc/f_pc_base.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
struct msg_class;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "JSystem/JMessage/control.h"
|
||||
#include "JSystem/JMessage/JMessage.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/endian.h"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
#if REGION_JPN
|
||||
#define D_MSG_CLASS_PAGE_CNT_MAX 30
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define D_MSG_D_MSG_FLOW_H
|
||||
|
||||
#include <types.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
enum {
|
||||
NODETYPE_MESSAGE_e = 1,
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
#include "d/d_item_data.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
static const int DEFAULT_SELECT_ITEM_INDEX = 0;
|
||||
static const int MAX_SELECT_ITEM = 4;
|
||||
@@ -494,7 +494,7 @@ public:
|
||||
#endif
|
||||
void setPlayerName(const char* i_name) {
|
||||
#if AVOID_UB
|
||||
dusk::SafeStringCopyTruncate(mPlayerName, i_name);
|
||||
SafeStringCopyTruncate(mPlayerName, i_name);
|
||||
#else
|
||||
strcpy(mPlayerName, i_name);
|
||||
#endif
|
||||
@@ -506,7 +506,7 @@ public:
|
||||
#endif
|
||||
void setHorseName(const char* i_name) {
|
||||
#if AVOID_UB
|
||||
dusk::SafeStringCopyTruncate(mHorseName, i_name);
|
||||
SafeStringCopyTruncate(mHorseName, i_name);
|
||||
#else
|
||||
strcpy(mHorseName, i_name);
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
#include "SSystem/SComponent/c_lib.h"
|
||||
#include "d/d_kankyo.h"
|
||||
#include "d/d_kankyo_data.h"
|
||||
#include "dusk/offset_ptr.h"
|
||||
#include "helpers/offset_ptr.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "global.h"
|
||||
#include "os_report.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define D_D_TRESURE_H
|
||||
|
||||
#include <mtx.h>
|
||||
#include "dusk/offset_ptr.h"
|
||||
#include "helpers/offset_ptr.h"
|
||||
|
||||
class dTres_c {
|
||||
public:
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include "dusk/math.h"
|
||||
#include "helpers/math.h"
|
||||
#endif
|
||||
|
||||
#endif // dolzel.h
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#ifndef _SRC_IMGUI_H_
|
||||
#define _SRC_IMGUI_H_
|
||||
|
||||
#include <aurora/aurora.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
void imgui_main(const AuroraInfo* info);
|
||||
void frame_limiter();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<tracy/Tracy.hpp>)
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ZoneScoped
|
||||
#define ZoneScoped
|
||||
#define ZoneScopedN(name)
|
||||
#endif
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
#include "dusk/endian_ssystem.h"
|
||||
#include "helpers/endian_ssystem.h"
|
||||
|
||||
#if !__MWERKS__
|
||||
// mwerks compiler makes value initialization act like default initialization so we need
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# Public game helpers
|
||||
|
||||
Headers in this directory provide port-specific types and utilities used by ordinary game
|
||||
headers. Their corresponding implementations live in `src/helpers/`.
|
||||
|
||||
These helpers **must not** depend on internal `src/dusk/` declarations in their public interface.
|
||||
Unlike the internal `dusk::` namespace, they are exposed to mods that use the `game` feature
|
||||
and therefore must remain ABI stable within `GameService` major versions.
|
||||
|
||||
APIs _specifically_ for mod use do not belong here; instead they belong in mod services,
|
||||
which are individually versioned, can provide backwards compatibility, and are designed to
|
||||
keep track of per-mod runtime state.
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <dolphin/types.h>
|
||||
|
||||
namespace dusk::batch {
|
||||
namespace batch {
|
||||
|
||||
struct LeafTemplate {
|
||||
static constexpr u32 kMaxVtx = 192;
|
||||
@@ -22,4 +22,4 @@ struct LeafTemplate {
|
||||
|
||||
void decode_leaf_template(const u8* dl, u32 size, LeafTemplate& out);
|
||||
|
||||
} // namespace dusk
|
||||
} // namespace batch
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef DOLPHIN_ENDIAN_H
|
||||
#define DOLPHIN_ENDIAN_H
|
||||
#pragma once
|
||||
|
||||
#include <bit>
|
||||
|
||||
@@ -292,6 +291,3 @@ inline void be_swap(Mtx& val) {
|
||||
#define BE(T) T
|
||||
#define BE_HOST(T) (T)
|
||||
#endif
|
||||
|
||||
|
||||
#endif // DOLPHIN_ENDIAN_H
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef _DUSK_ENDIAN_SSYSTEM_H_
|
||||
#define _DUSK_ENDIAN_SSYSTEM_H_
|
||||
#pragma once
|
||||
|
||||
#include "SSystem/SComponent/c_sxyz.h"
|
||||
#include "endian.h"
|
||||
@@ -61,5 +60,3 @@ struct BE<cXyz> {
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,12 +1,17 @@
|
||||
#ifndef DUSK_GX_HELPER_H
|
||||
#define DUSK_GX_HELPER_H
|
||||
#pragma once
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <dolphin/gx/GXAurora.h>
|
||||
#include <dolphin/gx/GXExtra.h>
|
||||
|
||||
#include "profiling.hpp"
|
||||
#if defined(DUSK_BUILDING_GAME)
|
||||
#include <tracy/Tracy.hpp>
|
||||
#else
|
||||
#ifndef ZoneScopedN
|
||||
#define ZoneScopedN(name)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if DUSK_GFX_DEBUG_GROUPS
|
||||
#define GX_DEBUG_GROUP(name, ...) \
|
||||
@@ -79,5 +84,3 @@ struct GXScopedDebugGroup {
|
||||
};
|
||||
|
||||
#define GX_AND_TRACY_SCOPED(name) GXScopedDebugGroup scope(name); ZoneScopedN(name);
|
||||
|
||||
#endif // DUSK_GX_HELPER_H
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef _SRC_DUSK_MATH_H_
|
||||
#define _SRC_DUSK_MATH_H_
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@@ -17,5 +16,3 @@ inline float i_tanf(float x) { return tan(x); }
|
||||
inline float i_acosf(float x) { return acos(x); }
|
||||
|
||||
#include <dolphin/ppc_math.h>
|
||||
|
||||
#endif // _SRC_DUSK_MATH_H_
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef DUSK_OFFSET_PTR_H
|
||||
#define DUSK_OFFSET_PTR_H
|
||||
#pragma once
|
||||
|
||||
#if TARGET_PC
|
||||
|
||||
@@ -47,21 +46,17 @@ struct OffsetPtrT {
|
||||
}
|
||||
|
||||
operator T*() const {
|
||||
return (T*) value;
|
||||
}
|
||||
return (T*)value; }
|
||||
|
||||
template<typename TOther>
|
||||
template <typename TOther>
|
||||
explicit operator TOther*() const {
|
||||
return (TOther*) value;
|
||||
return (TOther*)value;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#define OFFSET_PTR(T) OffsetPtrT<T>
|
||||
#define OFFSET_PTR_RAW OffsetPtr
|
||||
#else
|
||||
#define OFFSET_PTR(T) T*
|
||||
#define OFFSET_PTR_RAW u32
|
||||
#endif
|
||||
|
||||
#endif // DUSK_OFFSET_PTR_H
|
||||
@@ -1,8 +1,7 @@
|
||||
#ifndef DUSK_STRING_HPP
|
||||
#define DUSK_STRING_HPP
|
||||
#include <cstdarg>
|
||||
#pragma once
|
||||
|
||||
namespace dusk {
|
||||
#include <cstdarg>
|
||||
#include <cstddef>
|
||||
|
||||
struct TextSpan {
|
||||
char* buffer;
|
||||
@@ -44,7 +43,7 @@ private:
|
||||
};
|
||||
|
||||
#if TARGET_PC
|
||||
#define TEXT_SPAN dusk::TextSpan
|
||||
#define TEXT_SPAN TextSpan
|
||||
#else
|
||||
#define TEXT_SPAN char*
|
||||
#endif
|
||||
@@ -111,11 +110,11 @@ int SafeStringPrintf(char (&buffer)[BufSize], const char* format, ...) {
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
#define SAFE_STRCPY dusk::SafeStringCopy
|
||||
#define SAFE_STRCAT dusk::SafeStringCat
|
||||
#define SAFE_SPRINTF dusk::SafeStringPrintf
|
||||
#define SAFE_STRCPY_BOUNDED dusk::SafeStringCopy
|
||||
#define SAFE_STRCAT_BOUNDED dusk::SafeStringCat
|
||||
#define SAFE_STRCPY SafeStringCopy
|
||||
#define SAFE_STRCAT SafeStringCat
|
||||
#define SAFE_SPRINTF SafeStringPrintf
|
||||
#define SAFE_STRCPY_BOUNDED SafeStringCopy
|
||||
#define SAFE_STRCAT_BOUNDED SafeStringCat
|
||||
#else
|
||||
#define SAFE_STRCPY strcpy
|
||||
#define SAFE_STRCAT strcat
|
||||
@@ -123,6 +122,3 @@ int SafeStringPrintf(char (&buffer)[BufSize], const char* format, ...) {
|
||||
#define SAFE_STRCPY_BOUNDED strcpy
|
||||
#define SAFE_STRCPY_BOUNDED strcat
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // DUSK_STRING_HPP
|
||||
@@ -4,8 +4,12 @@
|
||||
#include "Z2AudioLib/Z2AudioMgr.h"
|
||||
#include "Z2AudioLib/Z2EnvSeMgr.h"
|
||||
#include "Z2AudioLib/Z2LinkMgr.h"
|
||||
#if defined(DUSK_BUILDING_GAME)
|
||||
#include "dusk/audio.h"
|
||||
#include "dusk/settings.h"
|
||||
#else
|
||||
#define DUSK_AUDIO_SKIP(...)
|
||||
#endif
|
||||
|
||||
class mDoAud_zelAudio_c : public Z2AudioMgr {
|
||||
public:
|
||||
@@ -134,15 +138,7 @@ inline void mDoAud_seStart(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_re
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
inline void mDoAud_seStartMenu(u32 i_sfxID) {
|
||||
if (!mDoAud_zelAudio_c::isInitFlag()) {
|
||||
return;
|
||||
}
|
||||
if (!dusk::getSettings().audio.menuSounds.getValue()) {
|
||||
return;
|
||||
}
|
||||
mDoAud_seStart(i_sfxID, nullptr, 0, 0);
|
||||
}
|
||||
void mDoAud_seStartMenu(u32 i_sfxID);
|
||||
#endif
|
||||
|
||||
inline void mDoAud_seStartLevel(u32 i_sfxID, const Vec* i_sePos, u32 param_2, s8 i_reverb) {
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include "SSystem/SComponent/c_API_controller_pad.h"
|
||||
|
||||
#if defined(DUSK_BUILDING_GAME)
|
||||
#include "dusk/settings.h"
|
||||
#endif
|
||||
|
||||
// Controller Ports 1 - 4
|
||||
enum { PAD_1, PAD_2, PAD_3, PAD_4 };
|
||||
@@ -54,29 +57,21 @@ public:
|
||||
static f32 getStickValue(u32 pad) { return getCpadInfo(pad).mMainStickValue; }
|
||||
static s16 getStickAngle(u32 pad) { return getCpadInfo(pad).mMainStickAngle; }
|
||||
|
||||
#if TARGET_PC
|
||||
static s16 getStickAngle3D(u32 pad);
|
||||
#else
|
||||
static s16 getStickAngle3D(u32 pad) {
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.enableMirrorMode) {
|
||||
return -getCpadInfo(pad).mMainStickAngle;
|
||||
} else {
|
||||
return getCpadInfo(pad).mMainStickAngle;
|
||||
}
|
||||
#else
|
||||
return getCpadInfo(pad).mMainStickAngle;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
static f32 getSubStickX3D(u32 pad);
|
||||
#else
|
||||
static f32 getSubStickX3D(u32 pad) {
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.enableMirrorMode) {
|
||||
return -getCpadInfo(pad).mCStickPosX;
|
||||
} else {
|
||||
return getCpadInfo(pad).mCStickPosX;
|
||||
}
|
||||
#else
|
||||
return getCpadInfo(pad).mCStickPosX;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static f32 getSubStickX(u32 pad) { return getCpadInfo(pad).mCStickPosX; }
|
||||
static f32 getSubStickY(u32 pad) { return getCpadInfo(pad).mCStickPosY; }
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "JSystem/JGeometry.h"
|
||||
#endif
|
||||
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
typedef struct Vec Vec;
|
||||
struct ResTIMG;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <mtx.h>
|
||||
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
extern u8 g_printCurrentHeapDebug;
|
||||
DUSK_GAME_EXTERN u8 g_printOtherHeapDebug;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define M_DO_M_DO_PRINTF_H
|
||||
|
||||
#include <os.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
void my_PutString(const char*);
|
||||
void mDoPrintf_vprintf_Interrupt(char const*, va_list);
|
||||
|
||||
@@ -31,10 +31,4 @@ extern u8 __OSReport_Warning_disable;
|
||||
extern u8 __OSReport_System_disable;
|
||||
extern u8 __OSReport_enable;
|
||||
|
||||
#if TARGET_PC
|
||||
namespace dusk {
|
||||
DUSK_GAME_EXTERN bool OSReportReallyForceEnable;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _OS_REPORT_H
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J2DGraph/J2DManage.h"
|
||||
#include "JSystem/J2DGraph/J2DMatBlock.h"
|
||||
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j2d
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include <gx.h>
|
||||
#include <mtx.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class J2DAnmBase;
|
||||
class J2DAnmColor;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J2DGraph/J2DPane.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class J2DMaterial;
|
||||
class JUTPalette;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J2DGraph/J2DManage.h"
|
||||
#include "JSystem/J2DGraph/J2DPane.h"
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class J2DMaterial;
|
||||
class JUTNameTab;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <gx.h>
|
||||
#include <mtx.h>
|
||||
#include "global.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j2d
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include "JSystem/J2DGraph/J2DMaterial.h"
|
||||
#include "JSystem/J2DGraph/J2DPane.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/endian.h"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
class J2DMaterial;
|
||||
class JUTFont;
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
J2DTextBoxVBinding);
|
||||
void private_readStream(J2DPane*, JSURandomInputStream*, JKRArchive*);
|
||||
TEXT_SPAN getStringPtr() const;
|
||||
dusk::TextSpan getSpan() const;
|
||||
TextSpan getSpan() const;
|
||||
s32 setString(s16, char const*, ...);
|
||||
s32 setString(char const*, ...);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <mtx.h>
|
||||
#include "global.h"
|
||||
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#define OFFSET_PTR_V0 BE(u32)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/J3DAssert.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DClusterLoader.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class J3DDeformer;
|
||||
class J3DClusterKey;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/J3DAssert.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTransform.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class J3DJoint;
|
||||
class J3DMtxBuffer;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "JSystem/J3DGraphAnimator/J3DSkinDeform.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include <types.h>
|
||||
|
||||
enum J3DMdlFlag {
|
||||
@@ -106,12 +105,13 @@ public:
|
||||
void setUserArea(uintptr_t area) { mUserArea = area; }
|
||||
uintptr_t getUserArea() const { return mUserArea; }
|
||||
Vec* getBaseScale() { return &mBaseScale; }
|
||||
#if TARGET_PC
|
||||
void setAnmMtx(int jointNo, Mtx m);
|
||||
#else
|
||||
void setAnmMtx(int jointNo, Mtx m) {
|
||||
mMtxBuffer->setAnmMtx(jointNo, m);
|
||||
#ifdef TARGET_PC
|
||||
dusk::frame_interp::record_final_mtx(mMtxBuffer->getAnmMtx(jointNo));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
MtxP getAnmMtx(int jointNo) { return mMtxBuffer->getAnmMtx(jointNo); }
|
||||
MtxP getWeightAnmMtx(int i) { return mMtxBuffer->getWeightAnmMtx(i); }
|
||||
J3DSkinDeform* getSkinDeform() { return mSkinDeform; }
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "global.h"
|
||||
#include <mtx.h>
|
||||
#include "dusk/endian_gx.hpp"
|
||||
#include "helpers/endian_gx.hpp"
|
||||
|
||||
class J3DShapeMtx;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DShape.h"
|
||||
#include "JSystem/J3DAssert.h"
|
||||
#include <mtx.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class J3DTexMtx;
|
||||
class J3DTexGenBlock;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "global.h"
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include "JSystem/J3DAssert.h"
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
#include "global.h"
|
||||
|
||||
enum J3DSysDrawBuf {
|
||||
@@ -190,15 +189,13 @@ struct J3DSys {
|
||||
Mtx& getModelDrawMtx(u16 no) { return mModelDrawMtx[no]; }
|
||||
J3DShapePacket* getShapePacket() { return mShapePacket; }
|
||||
|
||||
#if TARGET_PC
|
||||
void setViewMtx(const Mtx m);
|
||||
#else
|
||||
void setViewMtx(const Mtx m) {
|
||||
#ifdef TARGET_PC
|
||||
Mtx patched;
|
||||
if (dusk::frame_interp::lookup_replacement(m, patched)) {
|
||||
m = patched;
|
||||
}
|
||||
#endif
|
||||
MTXCopy(m, mViewMtx);
|
||||
}
|
||||
#endif
|
||||
|
||||
J3DModel* getModel() { return mModel; }
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "global.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <gx.h>
|
||||
#include <mtx.h>
|
||||
#include "dusk/endian_gx.hpp"
|
||||
#include "helpers/endian_gx.hpp"
|
||||
|
||||
class J3DModel;
|
||||
class J3DAnmVtxColor;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J3DGraphAnimator/J3DAnimation.h"
|
||||
|
||||
#include "JSystem/J3DGraphAnimator/J3DAnimation.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#define OFFSET_PTR_V0 BE(u32)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include <mtx.h>
|
||||
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class J3DModelData;
|
||||
class J3DMaterialTable;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "JSystem/JAudio2/JAIAudible.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "global.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
#include <cstdint>
|
||||
|
||||
class JAISound;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JAudio2/JASTaskThread.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <dvd.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class JASChannel;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JASOSCILLATOR_H
|
||||
|
||||
#include <types.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JAUAUDIBLEPARAM_H
|
||||
|
||||
#include <types.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JAUAUDIOARCINTERPRETER_H
|
||||
|
||||
#include <types.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JAUSOUNDANIMATOR_H
|
||||
|
||||
#include "JSystem/JAudio2/JAISound.h"
|
||||
#include "dusk/offset_ptr.h"
|
||||
#include "helpers/offset_ptr.h"
|
||||
|
||||
class JAUSoundAnimation;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/JAudio2/JAISound.h"
|
||||
#include "JSystem/JAudio2/JASGadget.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JGadget/search.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
namespace JGadget {
|
||||
namespace binary {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JHICOMMONMEM_H
|
||||
|
||||
#include <types.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
inline u32 JHIhtonl(u32 v) {
|
||||
return BSWAP32(v);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JKernel/JKRCompression.h"
|
||||
#include "JSystem/JKernel/JKRFileLoader.h"
|
||||
#include "global.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class JKRHeap;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <mtx.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "dusk/math.h"
|
||||
#include "helpers/math.h"
|
||||
|
||||
typedef f32 Mtx33[3][3];
|
||||
typedef f32 Mtx23[2][3];
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#else
|
||||
#include <dolphin.h>
|
||||
#endif
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
// Struct definitions might be wrong
|
||||
typedef struct bmg_header_t {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JGeometry.h"
|
||||
|
||||
#include <types.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
struct JPAEmitterWorkData;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JPARESOURCE_H
|
||||
|
||||
#include <types.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class JKRHeap;
|
||||
struct JPAEmitterWorkData;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define m_PI_D 3.141592653589793
|
||||
#ifndef __MWERKS__
|
||||
#include "dusk/math.h"
|
||||
#include "helpers/math.h"
|
||||
#endif
|
||||
|
||||
namespace JStudio {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JSUINPUTSTREAM_H
|
||||
|
||||
#include "JSystem/JSupport/JSUIosBase.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jsupport
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include <cstring>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
#if TARGET_PC
|
||||
struct FontDrawContext {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTNAMETAB_H
|
||||
|
||||
#include <types.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <gx.h>
|
||||
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
enum JUTTransparency { UNK0, UNK1 };
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTRESFONT_H
|
||||
|
||||
#include "JSystem/JUtility/JUTFont.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
class JKRHeap;
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include <gx.h>
|
||||
#include <stdint.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "helpers/endian.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
class JUTPalette;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define TCOLOR_H
|
||||
|
||||
#include <gx.h>
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
namespace JUtility {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <cstring>
|
||||
#include <types.h>
|
||||
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
J2DMaterialFactory::J2DMaterialFactory(J2DMaterialBlock const& param_0) {
|
||||
mMaterialNum = param_0.field_0x8;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "JSystem/JSupport/JSURandomInputStream.h"
|
||||
#include "JSystem/JUtility/JUTResource.h"
|
||||
#ifndef __MWERKS__
|
||||
#include "dusk/math.h"
|
||||
#include "helpers/math.h"
|
||||
#endif
|
||||
|
||||
J2DPane::J2DPane() : mBounds(), mGlobalBounds(), mClipRect(), mPaneTree(this) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#ifdef __MWERKS__
|
||||
#include <cmath>
|
||||
#else
|
||||
#include <dusk/math.h>
|
||||
#include <helpers/math.h>
|
||||
#endif
|
||||
#include <gx.h>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "JSystem/J2DGraph/J2DWindowEx.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "JSystem/JSupport/JSURandomInputStream.h"
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
struct J2DWindowExDef {
|
||||
BE(u32) field_0x0[4];
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
#include "JSystem/J3DGraphBase/J3DShapeMtx.h"
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
#define J3D_ASSERTMSG(LINE, COND, MSG) JUT_ASSERT_MSG(LINE, (COND) != 0, MSG)
|
||||
#define J3D_WARN1(LINE, MSG, ARG1) JUT_WARN(LINE, MSG, ARG1)
|
||||
@@ -105,6 +108,11 @@ void J3DModel::interp_callback(bool isSimFrame, void* pUserWork) {
|
||||
i_this->diff();
|
||||
}
|
||||
}
|
||||
|
||||
void J3DModel::setAnmMtx(int jointNo, Mtx m) {
|
||||
mMtxBuffer->setAnmMtx(jointNo, m);
|
||||
dusk::frame_interp::record_final_mtx(mMtxBuffer->getAnmMtx(jointNo));
|
||||
}
|
||||
#endif
|
||||
|
||||
s32 J3DModel::createShapePacket(J3DModelData* pModelData) {
|
||||
|
||||
@@ -4,10 +4,14 @@
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTevs.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTexture.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
#include "global.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA J3DSys j3dSys;
|
||||
|
||||
DUSK_GAME_DATA Mtx J3DSys::mCurrentMtx;
|
||||
@@ -370,3 +374,13 @@ void J3DSys::reinitPixelProc() {
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
GXSetZCompLoc(GX_TRUE);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
void J3DSys::setViewMtx(const Mtx m) {
|
||||
Mtx patched;
|
||||
if (dusk::frame_interp::lookup_replacement(m, patched)) {
|
||||
m = patched;
|
||||
}
|
||||
MTXCopy(m, mViewMtx);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <JSystem/JUtility/JUTAssert.h>
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
DUSK_GAME_DATA u32 JAHVirtualNode::smVirNodeNum;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "JSystem/JAHostIO/JAHioNode.h"
|
||||
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
DUSK_GAME_DATA JAHioNode* JAHioNode::smCurrentNode;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <os.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
DUSK_GAME_DATA JASHeap* JASWaveArcLoader::sAramHeap;
|
||||
|
||||
|
||||
@@ -14,11 +14,12 @@
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#include "dusk/dusk.h"
|
||||
#include "dusk/gx_helper.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/logging.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/time.h"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
#include "SDL3/SDL_timer.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#include "global.h"
|
||||
|
||||
JKRFileCache* JKRFileCache::mount(const char* path, JKRHeap* heap, const char* param_3) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#include "global.h"
|
||||
|
||||
DUSK_GAME_DATA JKRFileLoader* JKRFileLoader::sCurrentVolume;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#ifdef __MWERKS__
|
||||
#include <stdint.h>
|
||||
#else
|
||||
@@ -702,7 +702,7 @@ JKRHeap* JKRHeap::getCurrentHeap() {
|
||||
}
|
||||
|
||||
void JKRHeap::setName(const char* name) {
|
||||
dusk::SafeStringCopyTruncate(mName, name);
|
||||
SafeStringCopyTruncate(mName, name);
|
||||
}
|
||||
|
||||
void JKRHeap::setNamef(const char* fmt, ...) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "global.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/os.h"
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
#include "JSystem/JParticle/JPAEmitterManager.h"
|
||||
#include "JSystem/JParticle/JPAExtraShape.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
JPAParticleCallBack::~JPAParticleCallBack() {
|
||||
/* empty function */
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
|
||||
#define JPA_DRAW_CTX_ARG , &ctx
|
||||
#else
|
||||
#define JPA_DRAW_CTX_ARG
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
#include "dusk/endian.h"
|
||||
#include "helpers/endian.h"
|
||||
#include "JSystem/JStudio/JStudio/stb-data.h"
|
||||
|
||||
DUSK_GAME_DATA const s32 JStudio::stb::data::gauDataSize_TEParagraph_data[8] = {0x0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include "JSystem/JUtility/JUTVideo.h"
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#include "global.h"
|
||||
|
||||
DUSK_GAME_DATA JUTConsoleManager* JUTConsoleManager::sManager;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "dusk/string.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#ifdef __REVOLUTION_SDK__
|
||||
#include <revolution.h>
|
||||
#else
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user