mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-04 11:19:58 -04:00
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1fea4f02ed | |||
| 35ea13c53a | |||
| 5fab665f21 | |||
| 109f0a50e5 | |||
| 746910c59f | |||
| ae4806ae4f | |||
| 1c00e2cdde | |||
| 78301a8a83 | |||
| ca798049b3 | |||
| daf4b1dfeb | |||
| 5bdd31a5af | |||
| 3cb5e5172b | |||
| d625c7ab0c | |||
| c2045391c8 | |||
| f04a0ffcf1 | |||
| dfdac1c1cd | |||
| f4b361ab02 | |||
| 5f3d3012ff | |||
| 0897ef1132 | |||
| 8b89dbcbf0 | |||
| f24e944ab0 | |||
| 23130d5a57 | |||
| 1e6e1976e3 | |||
| 4453316bb0 | |||
| 14aeefb813 | |||
| c991c7c407 | |||
| 251c6e7aec | |||
| cf2357fff2 | |||
| 06e6b0d47e | |||
| a83b4186af | |||
| dc5de83436 | |||
| 77425b4b25 | |||
| 5a109313cb | |||
| d8a7927602 | |||
| cccddee106 | |||
| 6c252c6d26 | |||
| b06c1911c6 | |||
| 7c9e99220a | |||
| bfd8b9f453 | |||
| 53e8662335 | |||
| c350b7b8ed | |||
| f916a48db0 | |||
| 6963a4b554 | |||
| 4466bf4e12 | |||
| 31c5397ae3 |
+54
-25
@@ -90,6 +90,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||||
|
|
||||||
|
# Folder-based instead of target-based organization
|
||||||
|
# in Visual Studio and Xcode generators
|
||||||
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "_cmake")
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||||
set(DAWN_USE_WAYLAND ON CACHE BOOL "Enable support for Wayland surface" FORCE)
|
set(DAWN_USE_WAYLAND ON CACHE BOOL "Enable support for Wayland surface" FORCE)
|
||||||
endif ()
|
endif ()
|
||||||
@@ -281,7 +286,7 @@ set(DUSK_TP_VERSION ${DUSK_GAME_NAME}${DUSK_GAME_VERSION})
|
|||||||
|
|
||||||
message(STATUS "dusk: Game Version: ${DUSK_TP_VERSION}")
|
message(STATUS "dusk: Game Version: ${DUSK_TP_VERSION}")
|
||||||
|
|
||||||
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${JSYSTEM_FILES} ${JSYSTEM_DEBUG_FILES} ${REL_FILES})
|
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${REL_FILES})
|
||||||
source_group("dusk" FILES ${DUSK_FILES})
|
source_group("dusk" FILES ${DUSK_FILES})
|
||||||
|
|
||||||
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0
|
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0
|
||||||
@@ -374,41 +379,65 @@ endif ()
|
|||||||
|
|
||||||
# game_debug is for game code files that we know work when compiled with DEBUG=1
|
# game_debug is for game code files that we know work when compiled with DEBUG=1
|
||||||
# Of course, if building a release build, this distinction is irrelevant
|
# Of course, if building a release build, this distinction is irrelevant
|
||||||
add_library(game_debug OBJECT ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES}
|
set(GAME_DEBUG_FILES
|
||||||
|
${SSYSTEM_FILES}
|
||||||
src/dusk/audio/DuskAudioSystem.cpp
|
src/dusk/audio/DuskAudioSystem.cpp
|
||||||
src/dusk/audio/JASCriticalSection.cpp
|
src/dusk/audio/JASCriticalSection.cpp
|
||||||
src/dusk/audio/DuskDsp.cpp
|
src/dusk/audio/DuskDsp.cpp
|
||||||
src/dusk/audio/Adpcm.cpp
|
src/dusk/audio/Adpcm.cpp
|
||||||
src/dusk/audio/DspStub.cpp
|
src/dusk/audio/DspStub.cpp
|
||||||
src/dusk/imgui/ImGuiAudio.cpp)
|
src/dusk/imgui/ImGuiAudio.cpp
|
||||||
|
)
|
||||||
|
set_source_files_properties(
|
||||||
|
${GAME_DEBUG_FILES}
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_DEFINITIONS "$<$<CONFIG:Debug>:DEBUG=1>;$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>"
|
||||||
|
)
|
||||||
|
|
||||||
# game_base is for all other game code files
|
# game_base is for all other game code files
|
||||||
add_library(game_base OBJECT ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${JSYSTEM_FILES} ${REL_FILES} ${DUSK_FILES} ${DOLPHIN_FILES})
|
set(GAME_BASE_FILES
|
||||||
|
${DOLZEL_FILES}
|
||||||
|
${Z2AUDIOLIB_FILES}
|
||||||
|
${REL_FILES}
|
||||||
|
${DUSK_FILES}
|
||||||
|
${DOLPHIN_FILES}
|
||||||
|
)
|
||||||
|
set_source_files_properties(
|
||||||
|
${GAME_BASE_FILES}
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_DEFINITIONS "NDEBUG=1;NDEBUG_DEFINED=1;DEBUG_DEFINED=0;$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>"
|
||||||
|
)
|
||||||
|
|
||||||
target_compile_definitions(game_debug PRIVATE ${GAME_COMPILE_DEFS} $<$<CONFIG:Debug>:DEBUG=1> $<$<CONFIG:Debug>:PARTIAL_DEBUG=1>)
|
foreach(jsystem_lib IN LISTS JSYSTEM_LIBRARIES)
|
||||||
target_compile_definitions(game_base PRIVATE ${GAME_COMPILE_DEFS} NDEBUG=1 NDEBUG_DEFINED=1 DEBUG_DEFINED=0 $<$<CONFIG:Debug>:PARTIAL_DEBUG=1>)
|
target_compile_definitions(${jsystem_lib} PRIVATE
|
||||||
|
${GAME_COMPILE_DEFS}
|
||||||
|
$<$<CONFIG:Debug>:DEBUG=1>
|
||||||
|
$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>
|
||||||
|
)
|
||||||
|
target_include_directories(${jsystem_lib} PRIVATE ${GAME_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(${jsystem_lib} PRIVATE ${GAME_LIBS})
|
||||||
|
set_target_properties(${jsystem_lib} PROPERTIES FOLDER "JSystem")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
# only apply PCH to game_base since not all headers are necessarily validated with DEBUG=1
|
set(JSYSTEM_LINK_LIBRARIES ${JSYSTEM_LIBRARIES})
|
||||||
target_precompile_headers(game_base PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/include/dusk_pch.hpp>")
|
if (CMAKE_CXX_LINK_GROUP_USING_RESCAN_SUPPORTED OR CMAKE_LINK_GROUP_USING_RESCAN_SUPPORTED)
|
||||||
|
# GNU ld resolves static archives in a single left-to-right pass. The split
|
||||||
target_include_directories(game_debug PRIVATE ${GAME_INCLUDE_DIRS})
|
# JSystem libraries reference each other, so they need a RESCAN group there.
|
||||||
target_include_directories(game_base PRIVATE ${GAME_INCLUDE_DIRS})
|
set(JSYSTEM_LINK_LIBRARIES "$<LINK_GROUP:RESCAN,${JSYSTEM_LIBRARIES}>")
|
||||||
|
|
||||||
# This implicitly pulls in the library include directories even though no
|
|
||||||
# linking actually takes place for object libraries
|
|
||||||
target_link_libraries(game_debug PRIVATE ${GAME_LIBS})
|
|
||||||
target_link_libraries(game_base PRIVATE ${GAME_LIBS})
|
|
||||||
|
|
||||||
if(ANDROID)
|
|
||||||
add_library(dusk SHARED src/dusk/main.cpp)
|
|
||||||
set_target_properties(dusk PROPERTIES OUTPUT_NAME main)
|
|
||||||
else ()
|
|
||||||
add_executable(dusk src/dusk/main.cpp)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_compile_definitions(dusk PRIVATE TARGET_PC AVOID_UB=1 VERSION=0)
|
set(DUSK_FILES src/dusk/main.cpp ${GAME_BASE_FILES} ${GAME_DEBUG_FILES})
|
||||||
target_include_directories(dusk PRIVATE include)
|
if(ANDROID)
|
||||||
target_link_libraries(dusk PRIVATE game_base game_debug aurora::main)
|
add_library(dusk SHARED ${DUSK_FILES})
|
||||||
|
set_target_properties(dusk PROPERTIES OUTPUT_NAME main)
|
||||||
|
else ()
|
||||||
|
add_executable(dusk ${DUSK_FILES})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
target_compile_definitions(dusk PRIVATE ${GAME_COMPILE_DEFS})
|
||||||
|
target_include_directories(dusk PRIVATE ${GAME_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(dusk PRIVATE aurora::main ${GAME_LIBS} ${JSYSTEM_LINK_LIBRARIES})
|
||||||
|
target_precompile_headers(dusk PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/include/dusk_pch.hpp>")
|
||||||
if (TARGET crashpad_handler)
|
if (TARGET crashpad_handler)
|
||||||
add_dependencies(dusk crashpad_handler)
|
add_dependencies(dusk crashpad_handler)
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@@ -10,28 +10,19 @@
|
|||||||
First make sure your dump of the game is clean and supported by Dusk. You can do this by checking the sha1 hash of your dump against this list of supported versions.
|
First make sure your dump of the game is clean and supported by Dusk. You can do this by checking the sha1 hash of your dump against this list of supported versions.
|
||||||
|
|
||||||
| Version | sha1 hash |
|
| Version | sha1 hash |
|
||||||
| ------------ | ---------------------------------------- |
|
|--------------| ---------------------------------------- |
|
||||||
| GameCube USA | 75edd3ddff41f125d1b4ce1a40378f1b565519e7 |
|
| GameCube USA | 75edd3ddff41f125d1b4ce1a40378f1b565519e7 |
|
||||||
|
| GameCube PAL | 2601822a488eeb86fb89db16ca8f29c2c953e1ca |
|
||||||
|
|
||||||
### 2. Download [Dusk](https://github.com/TwilitRealm/dusk/releases)
|
### 2. Download [Dusk](https://github.com/TwilitRealm/dusk/releases)
|
||||||
|
|
||||||
### 3. Setup the game
|
### 3. Setup the game
|
||||||
#### Windows
|
|
||||||
- Extract the zip folder
|
- Extract the zip folder
|
||||||
- Place your dump of the game into the same folder where you extracted to
|
- Launch Dusk
|
||||||
- Launch `dusk.exe`
|
- Select Options, then set the ISO Path to your supported game dump
|
||||||
|
- Press Start Game to play!
|
||||||
|
|
||||||
#### macOS
|

|
||||||
- TODO
|
|
||||||
|
|
||||||
#### Linux
|
|
||||||
- TODO
|
|
||||||
|
|
||||||
#### iOS
|
|
||||||
- TODO
|
|
||||||
|
|
||||||
#### android
|
|
||||||
- TODO
|
|
||||||
|
|
||||||
# Building
|
# Building
|
||||||
If you'd like to build Dusk from source, please read the [build instructions](docs/building.md).
|
If you'd like to build Dusk from source, please read the [build instructions](docs/building.md).
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
Vendored
+1
-1
Submodule extern/aurora updated: 63550a8375...9ff83bcb97
+84
-3
@@ -314,7 +314,7 @@ set(SSYSTEM_FILES
|
|||||||
src/SSystem/SStandard/s_basic.cpp
|
src/SSystem/SStandard/s_basic.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(JSYSTEM_DEBUG_FILES
|
add_library(JSystem_JParticle STATIC
|
||||||
libs/JSystem/src/JParticle/JPAResourceManager.cpp
|
libs/JSystem/src/JParticle/JPAResourceManager.cpp
|
||||||
libs/JSystem/src/JParticle/JPAResource.cpp
|
libs/JSystem/src/JParticle/JPAResource.cpp
|
||||||
libs/JSystem/src/JParticle/JPABaseShape.cpp
|
libs/JSystem/src/JParticle/JPABaseShape.cpp
|
||||||
@@ -330,10 +330,19 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/JParticle/JPAEmitter.cpp
|
libs/JSystem/src/JParticle/JPAEmitter.cpp
|
||||||
libs/JSystem/src/JParticle/JPAParticle.cpp
|
libs/JSystem/src/JParticle/JPAParticle.cpp
|
||||||
libs/JSystem/src/JParticle/JPAMath.cpp
|
libs/JSystem/src/JParticle/JPAMath.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JFramework STATIC
|
||||||
libs/JSystem/src/JFramework/JFWSystem.cpp
|
libs/JSystem/src/JFramework/JFWSystem.cpp
|
||||||
libs/JSystem/src/JFramework/JFWDisplay.cpp
|
libs/JSystem/src/JFramework/JFWDisplay.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_J3DU STATIC
|
||||||
libs/JSystem/src/J3DU/J3DUClipper.cpp
|
libs/JSystem/src/J3DU/J3DUClipper.cpp
|
||||||
libs/JSystem/src/J3DU/J3DUDL.cpp
|
libs/JSystem/src/J3DU/J3DUDL.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JKernel STATIC
|
||||||
libs/JSystem/src/JKernel/JKRHeap.cpp
|
libs/JSystem/src/JKernel/JKRHeap.cpp
|
||||||
libs/JSystem/src/JKernel/JKRExpHeap.cpp
|
libs/JSystem/src/JKernel/JKRExpHeap.cpp
|
||||||
libs/JSystem/src/JKernel/JKRSolidHeap.cpp
|
libs/JSystem/src/JKernel/JKRSolidHeap.cpp
|
||||||
@@ -359,14 +368,23 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/JKernel/JKRDvdRipper.cpp
|
libs/JSystem/src/JKernel/JKRDvdRipper.cpp
|
||||||
libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp
|
libs/JSystem/src/JKernel/JKRDvdAramRipper.cpp
|
||||||
libs/JSystem/src/JKernel/JKRDecomp.cpp
|
libs/JSystem/src/JKernel/JKRDecomp.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JMath STATIC
|
||||||
libs/JSystem/src/JMath/JMath.cpp
|
libs/JSystem/src/JMath/JMath.cpp
|
||||||
libs/JSystem/src/JMath/random.cpp
|
libs/JSystem/src/JMath/random.cpp
|
||||||
libs/JSystem/src/JMath/JMATrigonometric.cpp
|
libs/JSystem/src/JMath/JMATrigonometric.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JSupport STATIC
|
||||||
libs/JSystem/src/JSupport/JSUList.cpp
|
libs/JSystem/src/JSupport/JSUList.cpp
|
||||||
libs/JSystem/src/JSupport/JSUInputStream.cpp
|
libs/JSystem/src/JSupport/JSUInputStream.cpp
|
||||||
libs/JSystem/src/JSupport/JSUOutputStream.cpp
|
libs/JSystem/src/JSupport/JSUOutputStream.cpp
|
||||||
libs/JSystem/src/JSupport/JSUMemoryStream.cpp
|
libs/JSystem/src/JSupport/JSUMemoryStream.cpp
|
||||||
libs/JSystem/src/JSupport/JSUFileStream.cpp
|
libs/JSystem/src/JSupport/JSUFileStream.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JUtility STATIC
|
||||||
libs/JSystem/src/JUtility/JUTCacheFont.cpp
|
libs/JSystem/src/JUtility/JUTCacheFont.cpp
|
||||||
libs/JSystem/src/JUtility/JUTResource.cpp
|
libs/JSystem/src/JUtility/JUTResource.cpp
|
||||||
libs/JSystem/src/JUtility/JUTTexture.cpp
|
libs/JSystem/src/JUtility/JUTTexture.cpp
|
||||||
@@ -387,6 +405,9 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/JUtility/JUTConsole.cpp
|
libs/JSystem/src/JUtility/JUTConsole.cpp
|
||||||
libs/JSystem/src/JUtility/JUTDirectFile.cpp
|
libs/JSystem/src/JUtility/JUTDirectFile.cpp
|
||||||
libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp
|
libs/JSystem/src/JUtility/JUTFontData_Ascfont_fix12.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JStage STATIC
|
||||||
libs/JSystem/src/JStage/JSGActor.cpp
|
libs/JSystem/src/JStage/JSGActor.cpp
|
||||||
libs/JSystem/src/JStage/JSGAmbientLight.cpp
|
libs/JSystem/src/JStage/JSGAmbientLight.cpp
|
||||||
libs/JSystem/src/JStage/JSGCamera.cpp
|
libs/JSystem/src/JStage/JSGCamera.cpp
|
||||||
@@ -394,6 +415,9 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/JStage/JSGLight.cpp
|
libs/JSystem/src/JStage/JSGLight.cpp
|
||||||
libs/JSystem/src/JStage/JSGObject.cpp
|
libs/JSystem/src/JStage/JSGObject.cpp
|
||||||
libs/JSystem/src/JStage/JSGSystem.cpp
|
libs/JSystem/src/JStage/JSGSystem.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_J2DGraph STATIC
|
||||||
libs/JSystem/src/J2DGraph/J2DGrafContext.cpp
|
libs/JSystem/src/J2DGraph/J2DGrafContext.cpp
|
||||||
libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp
|
libs/JSystem/src/J2DGraph/J2DOrthoGraph.cpp
|
||||||
libs/JSystem/src/J2DGraph/J2DTevs.cpp
|
libs/JSystem/src/J2DGraph/J2DTevs.cpp
|
||||||
@@ -412,6 +436,9 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp
|
libs/JSystem/src/J2DGraph/J2DAnmLoader.cpp
|
||||||
libs/JSystem/src/J2DGraph/J2DAnimation.cpp
|
libs/JSystem/src/J2DGraph/J2DAnimation.cpp
|
||||||
libs/JSystem/src/J2DGraph/J2DManage.cpp
|
libs/JSystem/src/J2DGraph/J2DManage.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_J3DGraphBase STATIC
|
||||||
libs/JSystem/src/J3DGraphBase/J3DGD.cpp
|
libs/JSystem/src/J3DGraphBase/J3DGD.cpp
|
||||||
libs/JSystem/src/J3DGraphBase/J3DSys.cpp
|
libs/JSystem/src/J3DGraphBase/J3DSys.cpp
|
||||||
libs/JSystem/src/J3DGraphBase/J3DVertex.cpp
|
libs/JSystem/src/J3DGraphBase/J3DVertex.cpp
|
||||||
@@ -426,6 +453,9 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/J3DGraphBase/J3DTevs.cpp
|
libs/JSystem/src/J3DGraphBase/J3DTevs.cpp
|
||||||
libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp
|
libs/JSystem/src/J3DGraphBase/J3DDrawBuffer.cpp
|
||||||
libs/JSystem/src/J3DGraphBase/J3DStruct.cpp
|
libs/JSystem/src/J3DGraphBase/J3DStruct.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_J3DGraphAnimator STATIC
|
||||||
libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp
|
libs/JSystem/src/J3DGraphAnimator/J3DShapeTable.cpp
|
||||||
libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp
|
libs/JSystem/src/J3DGraphAnimator/J3DJointTree.cpp
|
||||||
libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp
|
libs/JSystem/src/J3DGraphAnimator/J3DModelData.cpp
|
||||||
@@ -437,6 +467,9 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp
|
libs/JSystem/src/J3DGraphAnimator/J3DCluster.cpp
|
||||||
libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp
|
libs/JSystem/src/J3DGraphAnimator/J3DJoint.cpp
|
||||||
libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp
|
libs/JSystem/src/J3DGraphAnimator/J3DMaterialAttach.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_J3DGraphLoader STATIC
|
||||||
libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp
|
libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory.cpp
|
||||||
libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp
|
libs/JSystem/src/J3DGraphLoader/J3DMaterialFactory_v21.cpp
|
||||||
libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp
|
libs/JSystem/src/J3DGraphLoader/J3DClusterLoader.cpp
|
||||||
@@ -445,6 +478,9 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp
|
libs/JSystem/src/J3DGraphLoader/J3DJointFactory.cpp
|
||||||
libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp
|
libs/JSystem/src/J3DGraphLoader/J3DShapeFactory.cpp
|
||||||
libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp
|
libs/JSystem/src/J3DGraphLoader/J3DAnmLoader.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JStudio STATIC
|
||||||
libs/JSystem/src/JStudio/JStudio/ctb.cpp
|
libs/JSystem/src/JStudio/JStudio/ctb.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio/ctb-data.cpp
|
libs/JSystem/src/JStudio/JStudio/ctb-data.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio/functionvalue.cpp
|
libs/JSystem/src/JStudio/JStudio/functionvalue.cpp
|
||||||
@@ -459,6 +495,9 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/JStudio/JStudio/stb.cpp
|
libs/JSystem/src/JStudio/JStudio/stb.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp
|
libs/JSystem/src/JStudio/JStudio/stb-data-parse.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio/stb-data.cpp
|
libs/JSystem/src/JStudio/JStudio/stb-data.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JStudio_JStage STATIC
|
||||||
libs/JSystem/src/JStudio/JStudio_JStage/control.cpp
|
libs/JSystem/src/JStudio/JStudio_JStage/control.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio_JStage/object.cpp
|
libs/JSystem/src/JStudio/JStudio_JStage/object.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp
|
libs/JSystem/src/JStudio/JStudio_JStage/object-actor.cpp
|
||||||
@@ -466,10 +505,19 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp
|
libs/JSystem/src/JStudio/JStudio_JStage/object-camera.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp
|
libs/JSystem/src/JStudio/JStudio_JStage/object-fog.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp
|
libs/JSystem/src/JStudio/JStudio_JStage/object-light.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JStudio_JAudio2 STATIC
|
||||||
libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp
|
libs/JSystem/src/JStudio/JStudio_JAudio2/control.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp
|
libs/JSystem/src/JStudio/JStudio_JAudio2/object-sound.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JStudio_JParticle STATIC
|
||||||
libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp
|
libs/JSystem/src/JStudio/JStudio_JParticle/control.cpp
|
||||||
libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp
|
libs/JSystem/src/JStudio/JStudio_JParticle/object-particle.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JAudio2 STATIC
|
||||||
libs/JSystem/src/JAudio2/JASCalc.cpp
|
libs/JSystem/src/JAudio2/JASCalc.cpp
|
||||||
libs/JSystem/src/JAudio2/JASTaskThread.cpp
|
libs/JSystem/src/JAudio2/JASTaskThread.cpp
|
||||||
libs/JSystem/src/JAudio2/JASDvdThread.cpp
|
libs/JSystem/src/JAudio2/JASDvdThread.cpp
|
||||||
@@ -534,22 +582,34 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp
|
libs/JSystem/src/JAudio2/JAUSoundAnimator.cpp
|
||||||
libs/JSystem/src/JAudio2/JAUSoundTable.cpp
|
libs/JSystem/src/JAudio2/JAUSoundTable.cpp
|
||||||
libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp
|
libs/JSystem/src/JAudio2/JAUStreamFileTable.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JMessage STATIC
|
||||||
libs/JSystem/src/JMessage/control.cpp
|
libs/JSystem/src/JMessage/control.cpp
|
||||||
libs/JSystem/src/JMessage/data.cpp
|
libs/JSystem/src/JMessage/data.cpp
|
||||||
libs/JSystem/src/JMessage/processor.cpp
|
libs/JSystem/src/JMessage/processor.cpp
|
||||||
libs/JSystem/src/JMessage/resource.cpp
|
libs/JSystem/src/JMessage/resource.cpp
|
||||||
libs/JSystem/src/JMessage/locale.cpp
|
libs/JSystem/src/JMessage/locale.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JGadget STATIC
|
||||||
libs/JSystem/src/JGadget/binary.cpp
|
libs/JSystem/src/JGadget/binary.cpp
|
||||||
libs/JSystem/src/JGadget/define.cpp
|
libs/JSystem/src/JGadget/define.cpp
|
||||||
libs/JSystem/src/JGadget/linklist.cpp
|
libs/JSystem/src/JGadget/linklist.cpp
|
||||||
libs/JSystem/src/JGadget/search.cpp
|
libs/JSystem/src/JGadget/search.cpp
|
||||||
libs/JSystem/src/JGadget/std-vector.cpp
|
libs/JSystem/src/JGadget/std-vector.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JAHostIO STATIC
|
||||||
libs/JSystem/src/JAHostIO/JAHFrameNode.cpp
|
libs/JSystem/src/JAHostIO/JAHFrameNode.cpp
|
||||||
libs/JSystem/src/JAHostIO/JAHioMessage.cpp
|
libs/JSystem/src/JAHostIO/JAHioMessage.cpp
|
||||||
libs/JSystem/src/JAHostIO/JAHioMgr.cpp
|
libs/JSystem/src/JAHostIO/JAHioMgr.cpp
|
||||||
libs/JSystem/src/JAHostIO/JAHioNode.cpp
|
libs/JSystem/src/JAHostIO/JAHioNode.cpp
|
||||||
libs/JSystem/src/JAHostIO/JAHioUtil.cpp
|
libs/JSystem/src/JAHostIO/JAHioUtil.cpp
|
||||||
libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp
|
libs/JSystem/src/JAHostIO/JAHVirtualNode.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(JSystem_JHostIO STATIC
|
||||||
libs/JSystem/src/JHostIO/JORFile.cpp
|
libs/JSystem/src/JHostIO/JORFile.cpp
|
||||||
libs/JSystem/src/JHostIO/JORHostInfo.cpp
|
libs/JSystem/src/JHostIO/JORHostInfo.cpp
|
||||||
libs/JSystem/src/JHostIO/JORMessageBox.cpp
|
libs/JSystem/src/JHostIO/JORMessageBox.cpp
|
||||||
@@ -559,7 +619,28 @@ set(JSYSTEM_DEBUG_FILES
|
|||||||
libs/JSystem/src/JHostIO/JHIMccBuf.cpp
|
libs/JSystem/src/JHostIO/JHIMccBuf.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(JSYSTEM_FILES
|
set(JSYSTEM_LIBRARIES
|
||||||
|
JSystem_JParticle
|
||||||
|
JSystem_JFramework
|
||||||
|
JSystem_J3DU
|
||||||
|
JSystem_JKernel
|
||||||
|
JSystem_JMath
|
||||||
|
JSystem_JSupport
|
||||||
|
JSystem_JUtility
|
||||||
|
JSystem_JStage
|
||||||
|
JSystem_J2DGraph
|
||||||
|
JSystem_J3DGraphBase
|
||||||
|
JSystem_J3DGraphAnimator
|
||||||
|
JSystem_J3DGraphLoader
|
||||||
|
JSystem_JStudio
|
||||||
|
JSystem_JStudio_JStage
|
||||||
|
JSystem_JStudio_JAudio2
|
||||||
|
JSystem_JStudio_JParticle
|
||||||
|
JSystem_JAudio2
|
||||||
|
JSystem_JMessage
|
||||||
|
JSystem_JGadget
|
||||||
|
JSystem_JAHostIO
|
||||||
|
JSystem_JHostIO
|
||||||
)
|
)
|
||||||
|
|
||||||
set(REL_FILES
|
set(REL_FILES
|
||||||
@@ -1341,13 +1422,13 @@ set(DUSK_FILES
|
|||||||
src/dusk/crash_reporting.cpp
|
src/dusk/crash_reporting.cpp
|
||||||
src/dusk/endian.cpp
|
src/dusk/endian.cpp
|
||||||
src/dusk/extras.c
|
src/dusk/extras.c
|
||||||
src/dusk/extras.cpp
|
|
||||||
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/globals.cpp
|
src/dusk/globals.cpp
|
||||||
src/dusk/gyro.cpp
|
src/dusk/gyro.cpp
|
||||||
|
src/dusk/gamepad_color.cpp
|
||||||
src/dusk/io.cpp
|
src/dusk/io.cpp
|
||||||
src/dusk/layout.cpp
|
src/dusk/layout.cpp
|
||||||
src/dusk/logging.cpp
|
src/dusk/logging.cpp
|
||||||
|
|||||||
@@ -206,6 +206,15 @@ private:
|
|||||||
/* 0x6D3 */ u8 field_0x6d3;
|
/* 0x6D3 */ u8 field_0x6d3;
|
||||||
#if TARGET_PC
|
#if TARGET_PC
|
||||||
f32 mSelectItemSlideElapsed[4];
|
f32 mSelectItemSlideElapsed[4];
|
||||||
|
f32 mCursorInterpPrevX;
|
||||||
|
f32 mCursorInterpPrevY;
|
||||||
|
f32 mCursorInterpCurrX;
|
||||||
|
f32 mCursorInterpCurrY;
|
||||||
|
s16 mCursorInterpPrevAngle;
|
||||||
|
s16 mCursorInterpCurrAngle;
|
||||||
|
bool mCursorInterpPrevAngular;
|
||||||
|
bool mCursorInterpCurrAngular;
|
||||||
|
bool mCursorInterpInit;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TARGET_PC
|
#ifdef TARGET_PC
|
||||||
|
f32 getPositionX() const { return mPositionX; }
|
||||||
|
f32 getPositionY() const { return mPositionY; }
|
||||||
|
|
||||||
void refreshAspectScale();
|
void refreshAspectScale();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef GAMEPAD_COLOR_H
|
||||||
|
#define GAMEPAD_COLOR_H
|
||||||
|
|
||||||
|
void handleGamepadColor();
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -69,6 +69,8 @@ struct UserSettings {
|
|||||||
ConfigVar<bool> invertCameraXAxis;
|
ConfigVar<bool> invertCameraXAxis;
|
||||||
ConfigVar<bool> disableMainHUD;
|
ConfigVar<bool> disableMainHUD;
|
||||||
ConfigVar<bool> pauseOnFocusLost;
|
ConfigVar<bool> pauseOnFocusLost;
|
||||||
|
ConfigVar<bool> enableLinkDollRotation;
|
||||||
|
|
||||||
|
|
||||||
// Graphics
|
// Graphics
|
||||||
ConfigVar<BloomMode> bloomMode;
|
ConfigVar<BloomMode> bloomMode;
|
||||||
@@ -125,6 +127,7 @@ struct UserSettings {
|
|||||||
ConfigVar<bool> wasPresetChosen;
|
ConfigVar<bool> wasPresetChosen;
|
||||||
ConfigVar<bool> enableCrashReporting;
|
ConfigVar<bool> enableCrashReporting;
|
||||||
ConfigVar<bool> duskMenuOpen;
|
ConfigVar<bool> duskMenuOpen;
|
||||||
|
ConfigVar<int> cardFileType;
|
||||||
} backend;
|
} backend;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -149,6 +152,7 @@ struct TransientSettings {
|
|||||||
CollisionViewSettings collisionView;
|
CollisionViewSettings collisionView;
|
||||||
bool skipFrameRateLimit;
|
bool skipFrameRateLimit;
|
||||||
bool moveLinkActive;
|
bool moveLinkActive;
|
||||||
|
bool stateShareLoadActive;
|
||||||
};
|
};
|
||||||
|
|
||||||
TransientSettings& getTransientSettings();
|
TransientSettings& getTransientSettings();
|
||||||
|
|||||||
+11
-1
@@ -73,6 +73,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __MWERKS__
|
#ifndef __MWERKS__
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
// Silence clangd errors about MWCC PPC intrinsics by declaring them here.
|
// Silence clangd errors about MWCC PPC intrinsics by declaring them here.
|
||||||
extern int __cntlzw(unsigned int);
|
extern int __cntlzw(unsigned int);
|
||||||
extern int __rlwimi(int, int, int, int, int);
|
extern int __rlwimi(int, int, int, int, int);
|
||||||
@@ -80,7 +83,14 @@ extern void __dcbf(void*, int);
|
|||||||
extern void __dcbz(void*, int);
|
extern void __dcbz(void*, int);
|
||||||
extern void __sync();
|
extern void __sync();
|
||||||
extern int __abs(int);
|
extern int __abs(int);
|
||||||
void* __memcpy(void*, const void*, int);
|
#if defined(__has_builtin) && __has_builtin(__builtin_memcpy)
|
||||||
|
#define __memcpy __builtin_memcpy
|
||||||
|
#else
|
||||||
|
#define __memcpy memcpy
|
||||||
|
#endif
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef M_PI
|
#ifndef M_PI
|
||||||
|
|||||||
@@ -263,6 +263,9 @@ public:
|
|||||||
/* 0x9C */ u8 field_0x9c[4];
|
/* 0x9C */ u8 field_0x9c[4];
|
||||||
/* 0xA0 */ OSTime mResetHoldStartTime;
|
/* 0xA0 */ OSTime mResetHoldStartTime;
|
||||||
/* 0xA8 */ u8 field_0xa8;
|
/* 0xA8 */ u8 field_0xa8;
|
||||||
|
#if TARGET_PC
|
||||||
|
u32 mResetHoldFrameCount;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "dusk/logging.h"
|
#include "dusk/logging.h"
|
||||||
#include "dusk/settings.h"
|
#include "dusk/settings.h"
|
||||||
#include "dusk/time.h"
|
#include "dusk/time.h"
|
||||||
|
#include "f_op/f_op_overlap_mng.h"
|
||||||
|
|
||||||
#include "SDL3/SDL_timer.h"
|
#include "SDL3/SDL_timer.h"
|
||||||
#include "tracy/Tracy.hpp"
|
#include "tracy/Tracy.hpp"
|
||||||
@@ -385,6 +386,13 @@ static void waitForTick(u32 p1, u16 p2) {
|
|||||||
if (dusk::getTransientSettings().skipFrameRateLimit) {
|
if (dusk::getTransientSettings().skipFrameRateLimit) {
|
||||||
p1 = OS_TIMER_CLOCK / 120;
|
p1 = OS_TIMER_CLOCK / 120;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_PC
|
||||||
|
if (fopOvlpM_IsPeek() && dusk::getTransientSettings().stateShareLoadActive) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ZoneScopedC(tracy::Color::DimGray);
|
ZoneScopedC(tracy::Color::DimGray);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,9 @@ BOOL JUTGamePad::init() {
|
|||||||
void JUTGamePad::clear() {
|
void JUTGamePad::clear() {
|
||||||
mButtonReset.mReset = false;
|
mButtonReset.mReset = false;
|
||||||
field_0xa8 = 1;
|
field_0xa8 = 1;
|
||||||
|
#if TARGET_PC
|
||||||
|
mResetHoldFrameCount = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PADStatus JUTGamePad::mPadStatus[4];
|
PADStatus JUTGamePad::mPadStatus[4];
|
||||||
@@ -219,11 +222,19 @@ void JUTGamePad::update() {
|
|||||||
mButtonReset.mReset = false;
|
mButtonReset.mReset = false;
|
||||||
} else if (!JUTGamePad::C3ButtonReset::sResetOccurred) {
|
} else if (!JUTGamePad::C3ButtonReset::sResetOccurred) {
|
||||||
if (mButtonReset.mReset == true) {
|
if (mButtonReset.mReset == true) {
|
||||||
|
#if TARGET_PC
|
||||||
|
checkResetCallback(++mResetHoldFrameCount * (OS_TIMER_CLOCK / 30));
|
||||||
|
#else
|
||||||
OSTime hold_time = OSGetTime() - mResetHoldStartTime;
|
OSTime hold_time = OSGetTime() - mResetHoldStartTime;
|
||||||
checkResetCallback(hold_time);
|
checkResetCallback(hold_time);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
mButtonReset.mReset = true;
|
mButtonReset.mReset = true;
|
||||||
|
#if TARGET_PC
|
||||||
|
mResetHoldFrameCount = 0;
|
||||||
|
#else
|
||||||
mResetHoldStartTime = OSGetTime();
|
mResetHoldStartTime = OSGetTime();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ void Z2WolfHowlMgr::setCorrectData(s8 curveID, Z2WolfHowlData* data) {
|
|||||||
#if TARGET_PC
|
#if TARGET_PC
|
||||||
case Z2WOLFHOWL_TIMESONG:
|
case Z2WOLFHOWL_TIMESONG:
|
||||||
cPitchUp = 1.3348f;
|
cPitchUp = 1.3348f;
|
||||||
cPitchCenter = 1.0f;
|
cPitchCenter = 0.8909f;
|
||||||
cPitchDown = 0.7937f;
|
cPitchDown = 0.7937f;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ void daAlink_c::handleWolfHowl() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool canTransform = false;
|
bool canHowl = false;
|
||||||
|
|
||||||
if (mLinkAcch.ChkGroundHit() && !checkModeFlg(MODE_PLAYER_FLY) && !checkMagneBootsOn()) {
|
if (mLinkAcch.ChkGroundHit() && !checkModeFlg(MODE_PLAYER_FLY) && !checkMagneBootsOn()) {
|
||||||
if (!checkForestOldCentury()) {
|
if (!checkForestOldCentury()) {
|
||||||
@@ -52,12 +52,17 @@ void daAlink_c::handleWolfHowl() {
|
|||||||
(checkEventRun() || getMidnaActor()->checkMetamorphoseEnable()) &&
|
(checkEventRun() || getMidnaActor()->checkMetamorphoseEnable()) &&
|
||||||
(checkModeFlg(4) || dComIfGp_checkPlayerStatus0(0, 0x10))))
|
(checkModeFlg(4) || dComIfGp_checkPlayerStatus0(0, 0x10))))
|
||||||
{
|
{
|
||||||
canTransform = true;
|
canHowl = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!canHowl) {
|
||||||
|
Z2GetAudioMgr()->seStart(Z2SE_SYS_ERROR, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
getWolfHowlMgrP()->setCorrectCurve(9);
|
getWolfHowlMgrP()->setCorrectCurve(9);
|
||||||
procWolfHowlDemoInit();
|
procWolfHowlDemoInit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,6 +149,23 @@ void daAlink_c::changeWolf() {
|
|||||||
|
|
||||||
mpLinkModel = initModel(static_cast<J3DModelData*>(dComIfG_getObjectRes(l_wArcName, 14)), 0x20200);
|
mpLinkModel = initModel(static_cast<J3DModelData*>(dComIfG_getObjectRes(l_wArcName, 14)), 0x20200);
|
||||||
|
|
||||||
|
#ifdef TARGET_PC
|
||||||
|
// Update Wolf Link's eye maxLOD to prevent the eyes from disappearing
|
||||||
|
{
|
||||||
|
J3DTexture* tex = mpLinkModel->getModelData()->getTexture();
|
||||||
|
JUTNameTab* nametable = mpLinkModel->getModelData()->getTextureName();
|
||||||
|
if (tex != nullptr && nametable != nullptr) {
|
||||||
|
for (u16 i = 0; i < tex->getNum(); i++) {
|
||||||
|
const char* tex_name = nametable->getName(i);
|
||||||
|
if (tex_name != NULL && strcmp(tex_name, "wl_eyeball") == 0) {
|
||||||
|
ResTIMG* timg = tex->getResTIMG(i);
|
||||||
|
timg->maxLOD = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
J3DModelData* chainModelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_wArcName, 15));
|
J3DModelData* chainModelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(l_wArcName, 15));
|
||||||
for (u16 i = 0; i < 4; i++) {
|
for (u16 i = 0; i < 4; i++) {
|
||||||
mpWlChainModels[i] = initModel(chainModelData, 0);
|
mpWlChainModels[i] = initModel(chainModelData, 0);
|
||||||
@@ -162,6 +179,23 @@ void daAlink_c::changeWolf() {
|
|||||||
mpWlMidnaHairModel =
|
mpWlMidnaHairModel =
|
||||||
initModelEnv(static_cast<J3DModelData*>(dComIfG_getObjectRes(l_wArcName, 11)), 0x1000000);
|
initModelEnv(static_cast<J3DModelData*>(dComIfG_getObjectRes(l_wArcName, 11)), 0x1000000);
|
||||||
|
|
||||||
|
#ifdef TARGET_PC
|
||||||
|
// Update Midna's eye maxLOD to prevent the eyes from disappearing
|
||||||
|
{
|
||||||
|
J3DTexture* tex = mpWlMidnaModel->getModelData()->getTexture();
|
||||||
|
JUTNameTab* nametable = mpWlMidnaModel->getModelData()->getTextureName();
|
||||||
|
if (tex != nullptr && nametable != nullptr) {
|
||||||
|
for (u16 i = 0; i < tex->getNum(); i++) {
|
||||||
|
const char* tex_name = nametable->getName(i);
|
||||||
|
if (tex_name != NULL && strcmp(tex_name, "midona_eyeball") == 0) {
|
||||||
|
ResTIMG* timg = tex->getResTIMG(i);
|
||||||
|
timg->maxLOD = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
mpDMidnaBrk = static_cast<J3DAnmTevRegKey*>(dComIfG_getObjectRes(l_wArcName, 18));
|
mpDMidnaBrk = static_cast<J3DAnmTevRegKey*>(dComIfG_getObjectRes(l_wArcName, 18));
|
||||||
mpDMidnaBrk->searchUpdateMaterialID(mpWlMidnaModel->getModelData());
|
mpDMidnaBrk->searchUpdateMaterialID(mpWlMidnaModel->getModelData());
|
||||||
mpWlMidnaModel->getModelData()->entryTevRegAnimator(mpDMidnaBrk);
|
mpWlMidnaModel->getModelData()->entryTevRegAnimator(mpDMidnaBrk);
|
||||||
@@ -342,6 +376,26 @@ void daAlink_c::changeLink(int param_0) {
|
|||||||
initModel(static_cast<J3DModelData*>(dComIfG_getObjectRes(mArcName, "zl_face.bmd")), 0x20200);
|
initModel(static_cast<J3DModelData*>(dComIfG_getObjectRes(mArcName, "zl_face.bmd")), 0x20200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TARGET_PC
|
||||||
|
// Update Adult Link's eye maxLOD to prevent the eyes from disappearing
|
||||||
|
{
|
||||||
|
J3DTexture* tex = mpLinkFaceModel->getModelData()->getTexture();
|
||||||
|
JUTNameTab* nametable = mpLinkFaceModel->getModelData()->getTextureName();
|
||||||
|
if (tex != nullptr && nametable != nullptr) {
|
||||||
|
for (u16 i = 0; i < tex->getNum(); i++) {
|
||||||
|
const char* tex_name = nametable->getName(i);
|
||||||
|
if (tex_name != nullptr &&
|
||||||
|
(strcmp(tex_name, "al_eyeball") == 0 || strcmp(tex_name, "highlight02") == 0 ||
|
||||||
|
strcmp(tex_name, "eye_kage01") == 0))
|
||||||
|
{
|
||||||
|
ResTIMG* timg = tex->getResTIMG(i);
|
||||||
|
timg->maxLOD = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(mArcName, "al_bootsH.bmd"));
|
modelData = static_cast<J3DModelData*>(dComIfG_getObjectRes(mArcName, "al_bootsH.bmd"));
|
||||||
u16 i;
|
u16 i;
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
|
|||||||
@@ -2855,7 +2855,7 @@ void* daMP_Reader(void*) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 daMP_ReadThreadStack[0x2000];
|
static u8 daMP_ReadThreadStack[DUSK_IF_ELSE(8, 0x2000)];
|
||||||
|
|
||||||
#if TARGET_PC
|
#if TARGET_PC
|
||||||
static BOOL VideoThreadCancelled;
|
static BOOL VideoThreadCancelled;
|
||||||
@@ -2880,7 +2880,7 @@ static BOOL daMP_CreateReadThread(s32 param_0) {
|
|||||||
|
|
||||||
static OSThread daMP_VideoDecodeThread;
|
static OSThread daMP_VideoDecodeThread;
|
||||||
|
|
||||||
static u8 daMP_VideoDecodeThreadStack[0x64000];
|
static u8 daMP_VideoDecodeThreadStack[DUSK_IF_ELSE(8, 0x64000)];
|
||||||
|
|
||||||
static OSMessageQueue daMP_FreeTextureSetQueue;
|
static OSMessageQueue daMP_FreeTextureSetQueue;
|
||||||
|
|
||||||
@@ -3132,7 +3132,7 @@ static BOOL AudioThreadCancelled;
|
|||||||
|
|
||||||
static OSThread daMP_AudioDecodeThread;
|
static OSThread daMP_AudioDecodeThread;
|
||||||
|
|
||||||
static u8 daMP_AudioDecodeThreadStack[0x64000];
|
static u8 daMP_AudioDecodeThreadStack[DUSK_IF_ELSE(8, 0x64000)];
|
||||||
|
|
||||||
static OSMessageQueue daMP_FreeAudioBufferQueue;
|
static OSMessageQueue daMP_FreeAudioBufferQueue;
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,10 @@
|
|||||||
#include "f_op/f_op_camera_mng.h"
|
#include "f_op/f_op_camera_mng.h"
|
||||||
#include "m_Do/m_Do_mtx.h"
|
#include "m_Do/m_Do_mtx.h"
|
||||||
|
|
||||||
|
#if TARGET_PC
|
||||||
|
#include "dusk/frame_interpolation.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static f32 Reflect(cXyz* i_vec, cBgS_PolyInfo const& i_polyinfo, f32 i_scale) {
|
static f32 Reflect(cXyz* i_vec, cBgS_PolyInfo const& i_polyinfo, f32 i_scale) {
|
||||||
cM3dGPla plane;
|
cM3dGPla plane;
|
||||||
|
|
||||||
@@ -31,6 +35,27 @@ static f32 Reflect(cXyz* i_vec, cBgS_PolyInfo const& i_polyinfo, f32 i_scale) {
|
|||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_PC
|
||||||
|
static void d_a_obj_item_interp_callback(bool isSimFrame, void* pUserWork) {
|
||||||
|
daItem_c* item = static_cast<daItem_c*>(pUserWork);
|
||||||
|
if (item == NULL || item->mpModel == NULL || !item->chkDraw()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
item->setTevStr();
|
||||||
|
if (item->mpBrkAnm != NULL) {
|
||||||
|
s8 tevFrm = item->getTevFrm();
|
||||||
|
if (tevFrm != -1) {
|
||||||
|
item->mpBrkAnm->entry(item->mpModel->getModelData(), tevFrm);
|
||||||
|
} else {
|
||||||
|
item->mpBrkAnm->entry(item->mpModel->getModelData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (item->chkFlag(4)) {
|
||||||
|
fopAcM_setEffectMtx(item, item->mpModel->getModelData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
const daItemBase_data& daItemBase_c::getData() {
|
const daItemBase_data& daItemBase_c::getData() {
|
||||||
return m_data;
|
return m_data;
|
||||||
}
|
}
|
||||||
@@ -353,6 +378,10 @@ int daItem_c::_daItem_draw() {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_PC
|
||||||
|
dusk::frame_interp::add_interpolation_callback(&d_a_obj_item_interp_callback, this);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (chkDraw()) {
|
if (chkDraw()) {
|
||||||
return DrawBase();
|
return DrawBase();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,6 +237,13 @@ void dDrawPath_c::rendering(dDrawPath_c::line_class const* p_line) {
|
|||||||
if (isDrawType(p_line->field_0x0)) {
|
if (isDrawType(p_line->field_0x0)) {
|
||||||
int width = getLineWidth(p_line->field_0x1);
|
int width = getLineWidth(p_line->field_0x1);
|
||||||
|
|
||||||
|
#if TARGET_PC
|
||||||
|
f32 height = JUTVideo::getManager()->getRenderHeight() / 448.0f;
|
||||||
|
if (height > 1.0f) {
|
||||||
|
width /= 2;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (width > 0 && p_line->mDataNum >= 2) {
|
if (width > 0 && p_line->mDataNum >= 2) {
|
||||||
GXSetLineWidth(width, GX_TO_ZERO);
|
GXSetLineWidth(width, GX_TO_ZERO);
|
||||||
GXSetTevColor(GX_TEVREG0, *getLineColor(p_line->field_0x0 & 0x3F, p_line->field_0x1));
|
GXSetTevColor(GX_TEVREG0, *getLineColor(p_line->field_0x0 & 0x3F, p_line->field_0x1));
|
||||||
|
|||||||
@@ -2399,6 +2399,13 @@ void dMenu_Collect3D_c::_move(u8 param_0, u8 param_1) {
|
|||||||
posZ = 550.0f;
|
posZ = 550.0f;
|
||||||
}
|
}
|
||||||
toItem3Dpos(linkPos.x, posY, posZ, &itemPos);
|
toItem3Dpos(linkPos.x, posY, posZ, &itemPos);
|
||||||
|
|
||||||
|
#if TARGET_PC
|
||||||
|
if (dusk::getSettings().game.enableLinkDollRotation) {
|
||||||
|
const f32 angle = mDoCPd_c::getSubStickX3D(PAD_1) * 2048;
|
||||||
|
ANGLE_ADD(mLinkAngle, angle);
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
if (param_0 == 0 && param_1 == 0) {
|
if (param_0 == 0 && param_1 == 0) {
|
||||||
f32 temp = 450.0f;
|
f32 temp = 450.0f;
|
||||||
ANGLE_ADD(mLinkAngle, temp);
|
ANGLE_ADD(mLinkAngle, temp);
|
||||||
|
|||||||
@@ -185,6 +185,17 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
|
|||||||
field_0x682 = 0xc000;
|
field_0x682 = 0xc000;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if TARGET_PC
|
||||||
|
mCursorInterpPrevX = 0.0f;
|
||||||
|
mCursorInterpPrevY = 0.0f;
|
||||||
|
mCursorInterpCurrX = 0.0f;
|
||||||
|
mCursorInterpCurrY = 0.0f;
|
||||||
|
mCursorInterpPrevAngle = 0;
|
||||||
|
mCursorInterpCurrAngle = 0;
|
||||||
|
mCursorInterpPrevAngular = false;
|
||||||
|
mCursorInterpCurrAngular = false;
|
||||||
|
mCursorInterpInit = false;
|
||||||
|
#endif
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
field_0x674[i] = 0;
|
field_0x674[i] = 0;
|
||||||
#if TARGET_PC
|
#if TARGET_PC
|
||||||
@@ -631,7 +642,71 @@ void dMenu_Ring_c::_draw() {
|
|||||||
} else {
|
} else {
|
||||||
drawSelectItem();
|
drawSelectItem();
|
||||||
drawItem2();
|
drawItem2();
|
||||||
|
#if TARGET_PC
|
||||||
|
f32 simX = 0.0f;
|
||||||
|
f32 simY = 0.0f;
|
||||||
|
bool restoreSimPos = false;
|
||||||
|
if (dusk::frame_interp::is_enabled() && mAlphaRate >= 1.0f) {
|
||||||
|
simX = mpDrawCursor->getPositionX();
|
||||||
|
simY = mpDrawCursor->getPositionY();
|
||||||
|
|
||||||
|
const bool isAngular = (mStatus == STATUS_MOVE) && !mDirectSelectActive;
|
||||||
|
|
||||||
|
if (dusk::frame_interp::get_ui_tick_pending()) {
|
||||||
|
mCursorInterpPrevX = mCursorInterpCurrX;
|
||||||
|
mCursorInterpPrevY = mCursorInterpCurrY;
|
||||||
|
mCursorInterpPrevAngle = mCursorInterpCurrAngle;
|
||||||
|
mCursorInterpPrevAngular = mCursorInterpCurrAngular;
|
||||||
|
|
||||||
|
mCursorInterpCurrX = simX;
|
||||||
|
mCursorInterpCurrY = simY;
|
||||||
|
mCursorInterpCurrAngle = field_0x66e;
|
||||||
|
mCursorInterpCurrAngular = isAngular;
|
||||||
|
|
||||||
|
// reset prev = curr for first render pass or
|
||||||
|
// when angle modes prev/curr differ
|
||||||
|
// to prevent arrival jitter
|
||||||
|
if (!mCursorInterpInit ||
|
||||||
|
mCursorInterpPrevAngular != mCursorInterpCurrAngular) {
|
||||||
|
mCursorInterpPrevX = mCursorInterpCurrX;
|
||||||
|
mCursorInterpPrevY = mCursorInterpCurrY;
|
||||||
|
mCursorInterpPrevAngle = mCursorInterpCurrAngle;
|
||||||
|
mCursorInterpPrevAngular = mCursorInterpCurrAngular;
|
||||||
|
mCursorInterpInit = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mCursorInterpInit) {
|
||||||
|
const f32 step = dusk::frame_interp::get_interpolation_step();
|
||||||
|
if (mCursorInterpPrevAngular && mCursorInterpCurrAngular) {
|
||||||
|
const s16 delta = mCursorInterpCurrAngle - mCursorInterpPrevAngle;
|
||||||
|
const s16 lerpedAngle = mCursorInterpPrevAngle + (s16)(delta * step);
|
||||||
|
|
||||||
|
// yoinked from stick_move_proc()
|
||||||
|
const f32 x = g_ringHIO.mItemRingPosX + FB_WIDTH_BASE / 2 +
|
||||||
|
mRingRadiusH * cM_ssin(lerpedAngle);
|
||||||
|
const f32 y = g_ringHIO.mItemRingPosY + FB_HEIGHT_BASE / 2 +
|
||||||
|
mRingRadiusV * cM_scos(lerpedAngle);
|
||||||
|
mpDrawCursor->setPos(x, y);
|
||||||
|
} else {
|
||||||
|
mpDrawCursor->setPos(
|
||||||
|
mCursorInterpPrevX + (mCursorInterpCurrX - mCursorInterpPrevX) * step,
|
||||||
|
mCursorInterpPrevY + (mCursorInterpCurrY - mCursorInterpPrevY) * step
|
||||||
|
);
|
||||||
|
}
|
||||||
|
restoreSimPos = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mCursorInterpInit = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
mpDrawCursor->draw();
|
mpDrawCursor->draw();
|
||||||
|
#if TARGET_PC
|
||||||
|
// prevents offsetting at destination on the next frame
|
||||||
|
// since stick_wait_proc doesn't call setPos and we clobbered mPositionX/Y
|
||||||
|
if (restoreSimPos) {
|
||||||
|
mpDrawCursor->setPos(simX, simY);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
mpItemExplain->trans(mCenterPosX, mCenterPosY);
|
mpItemExplain->trans(mCenterPosX, mCenterPosY);
|
||||||
mpItemExplain->draw((J2DOrthoGraph*)grafPort);
|
mpItemExplain->draw((J2DOrthoGraph*)grafPort);
|
||||||
drawFlag0();
|
drawFlag0();
|
||||||
|
|||||||
@@ -1987,6 +1987,13 @@ bool jmessage_tSequenceProcessor::do_isReady() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if TARGET_PC
|
||||||
|
if (dusk::getSettings().game.instantText && mDoCPd_c::getHoldB(0)) {
|
||||||
|
field_0xb2 = 1;
|
||||||
|
pReference->setSendTimer(0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (dComIfGp_checkMesgBgm()) {
|
if (dComIfGp_checkMesgBgm()) {
|
||||||
bool isItemMusicPlaying = true;
|
bool isItemMusicPlaying = true;
|
||||||
if (mDoAud_checkPlayingSubBgmFlag() != Z2BGM_ITEM_GET &&
|
if (mDoAud_checkPlayingSubBgmFlag() != Z2BGM_ITEM_GET &&
|
||||||
|
|||||||
+21
-5
@@ -3,6 +3,27 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include <intrin.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void __dcbz(void* addr, int offset) {
|
||||||
|
// Gekko cache lines are 32 bytes.
|
||||||
|
// dcbz usually requires addr to be 32-byte aligned.
|
||||||
|
memset((char*)addr + offset, 0, 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
int __cntlzw(unsigned int val) {
|
||||||
|
if (val == 0) return 32; // PowerPC returns 32 if the input is 0
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
unsigned long idx;
|
||||||
|
_BitScanReverse(&idx, val);
|
||||||
|
return 31 - (int)idx;
|
||||||
|
#else
|
||||||
|
return __builtin_clz(val);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
int stricmp(const char* str1, const char* str2) {
|
int stricmp(const char* str1, const char* str2) {
|
||||||
char a_var;
|
char a_var;
|
||||||
@@ -48,11 +69,6 @@ int strnicmp(const char* str1, const char* str2, int n) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void *_memcpy(void* dest, void const* src, int n) {
|
|
||||||
return memcpy(dest, src, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DCZeroRange(void* addr, uint32_t nBytes) {
|
void DCZeroRange(void* addr, uint32_t nBytes) {
|
||||||
#if defined(_MSC_VER) || TARGET_ANDROID
|
#if defined(_MSC_VER) || TARGET_ANDROID
|
||||||
memset(addr, 0, nBytes);
|
memset(addr, 0, nBytes);
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
// C++ Mangled version of extras.c
|
|
||||||
#include <cstring>
|
|
||||||
#include <cstdint>
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <intrin.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void *__memcpy(void* dest, void const* src, int n) {
|
|
||||||
return memcpy(dest, src, n);
|
|
||||||
}
|
|
||||||
|
|
||||||
void __dcbz(void* addr, int offset) {
|
|
||||||
// Gekko cache lines are 32 bytes.
|
|
||||||
// dcbz usually requires addr to be 32-byte aligned.
|
|
||||||
memset((char*)addr + offset, 0, 32);
|
|
||||||
}
|
|
||||||
|
|
||||||
int __cntlzw(unsigned int val) {
|
|
||||||
if (val == 0) return 32; // PowerPC returns 32 if the input is 0
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
unsigned long idx;
|
|
||||||
_BitScanReverse(&idx, val);
|
|
||||||
return 31 - (int)idx;
|
|
||||||
#else
|
|
||||||
return __builtin_clz(val);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -292,12 +292,20 @@ void interp_view(::view_class* view) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const f32 step = get_interpolation_step();
|
const f32 step = get_interpolation_step();
|
||||||
|
const bool is_cam_curr_authoritative = g_is_sim_frame && step <= 0.0f;
|
||||||
|
|
||||||
cXyz eye;
|
cXyz eye;
|
||||||
cXyz center;
|
cXyz center;
|
||||||
cXyz up;
|
cXyz up;
|
||||||
lerp_xyz(&eye, s_cam_prev.eye, s_cam_curr.eye, step);
|
if (is_cam_curr_authoritative) {
|
||||||
lerp_xyz(¢er, s_cam_prev.center, s_cam_curr.center, step);
|
eye = s_cam_curr.eye;
|
||||||
lerp_xyz(&up, s_cam_prev.up, s_cam_curr.up, step);
|
center = s_cam_curr.center;
|
||||||
|
up = s_cam_curr.up;
|
||||||
|
} else {
|
||||||
|
lerp_xyz(&eye, s_cam_prev.eye, s_cam_curr.eye, step);
|
||||||
|
lerp_xyz(¢er, s_cam_prev.center, s_cam_curr.center, step);
|
||||||
|
lerp_xyz(&up, s_cam_prev.up, s_cam_curr.up, step);
|
||||||
|
}
|
||||||
if (!up.normalizeRS()) {
|
if (!up.normalizeRS()) {
|
||||||
up = s_cam_curr.up;
|
up = s_cam_curr.up;
|
||||||
up.normalizeRS();
|
up.normalizeRS();
|
||||||
@@ -306,19 +314,25 @@ void interp_view(::view_class* view) {
|
|||||||
view->lookat.eye = eye;
|
view->lookat.eye = eye;
|
||||||
view->lookat.center = center;
|
view->lookat.center = center;
|
||||||
view->lookat.up = up;
|
view->lookat.up = up;
|
||||||
view->bank = lerp_bank(s_cam_prev.bank, s_cam_curr.bank, step);
|
if (is_cam_curr_authoritative) {
|
||||||
view->fovy = s_cam_prev.fovy + (s_cam_curr.fovy - s_cam_prev.fovy) * step;
|
view->bank = s_cam_curr.bank;
|
||||||
view->aspect = s_cam_prev.aspect + (s_cam_curr.aspect - s_cam_prev.aspect) * step;
|
view->fovy = s_cam_curr.fovy;
|
||||||
view->near_ = s_cam_prev.near_ + (s_cam_curr.near_ - s_cam_prev.near_) * step;
|
view->aspect = s_cam_curr.aspect;
|
||||||
view->far_ = s_cam_prev.far_ + (s_cam_curr.far_ - s_cam_prev.far_) * step;
|
view->near_ = s_cam_curr.near_;
|
||||||
|
view->far_ = s_cam_curr.far_;
|
||||||
|
} else {
|
||||||
|
view->bank = lerp_bank(s_cam_prev.bank, s_cam_curr.bank, step);
|
||||||
|
view->fovy = s_cam_prev.fovy + (s_cam_curr.fovy - s_cam_prev.fovy) * step;
|
||||||
|
view->aspect = s_cam_prev.aspect + (s_cam_curr.aspect - s_cam_prev.aspect) * step;
|
||||||
|
view->near_ = s_cam_prev.near_ + (s_cam_curr.near_ - s_cam_prev.near_) * step;
|
||||||
|
view->far_ = s_cam_prev.far_ + (s_cam_curr.far_ - s_cam_prev.far_) * step;
|
||||||
|
}
|
||||||
|
|
||||||
// FRAME INTERP TODO: It might be better if I rewired the game to not clear this flag until the
|
// FRAME INTERP TODO: It might be better if I rewired the game to not clear this flag until the
|
||||||
// next sim frame, but I don't care enough to right now
|
// next sim frame, but I don't care enough to right now
|
||||||
#if WIDESCREEN_SUPPORT
|
#if WIDESCREEN_SUPPORT
|
||||||
if (mDoGph_gInf_c::isWide() && !mDoGph_gInf_c::isWideZoom() && step >= 0.5f ?
|
const f32 wide_step = is_cam_curr_authoritative ? 1.0f : step;
|
||||||
s_cam_curr.wideZoom :
|
if (mDoGph_gInf_c::isWide() && !mDoGph_gInf_c::isWideZoom() && wide_step >= 0.5f ? s_cam_curr.wideZoom : s_cam_prev.wideZoom) {
|
||||||
s_cam_prev.wideZoom)
|
|
||||||
{
|
|
||||||
mDoGph_gInf_c::onWideZoom();
|
mDoGph_gInf_c::onWideZoom();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
#include <cmath>
|
||||||
|
#include <SSystem/SComponent/c_xyz.h>
|
||||||
|
#include <d/d_com_inf_game.h>
|
||||||
|
#include <d/actor/d_a_player.h>
|
||||||
|
#include <d/actor/d_a_alink.h>
|
||||||
|
#include <dusk/gamepad_color.h>
|
||||||
|
|
||||||
|
cXyz currentGamepadColor = {0, 0, 0};
|
||||||
|
cXyz finalGamepadColor = {0, 0, 0};
|
||||||
|
cXyz additionalGamepadColor = {0, 0, 0};
|
||||||
|
|
||||||
|
float lerpSpeed = 0.0f;
|
||||||
|
|
||||||
|
const cXyz duskColor = {50, 50, -50};
|
||||||
|
const cXyz noColor = {0, 0, 0};
|
||||||
|
|
||||||
|
cXyz LerpColor(cXyz a, cXyz b, float t) {
|
||||||
|
return {std::lerp(a.x, b.x, t), std::lerp(a.y, b.y, t), std::lerp(a.z, b.z, t)};
|
||||||
|
}
|
||||||
|
|
||||||
|
void FadeLED(cXyz newColor, float speed) {
|
||||||
|
finalGamepadColor = newColor;
|
||||||
|
lerpSpeed = speed / 30.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetLED(cXyz newColor) {
|
||||||
|
currentGamepadColor = newColor;
|
||||||
|
finalGamepadColor = newColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetGamepadAdditionalColor(cXyz addColor) {
|
||||||
|
additionalGamepadColor.x = addColor.x;
|
||||||
|
additionalGamepadColor.y = addColor.y;
|
||||||
|
additionalGamepadColor.z = addColor.z;
|
||||||
|
}
|
||||||
|
|
||||||
|
void handleGamepadColor() {
|
||||||
|
bool setColor = false;
|
||||||
|
|
||||||
|
fopAc_ac_c* zhint = dComIfGp_att_getZHint();
|
||||||
|
if (zhint != NULL) {
|
||||||
|
FadeLED({50, 50, 175}, 2.0f);
|
||||||
|
setColor = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||||
|
daAlink_c* link = daAlink_getAlinkActorClass();
|
||||||
|
|
||||||
|
if (link != nullptr && !setColor) {
|
||||||
|
if (link->checkWolf()) {
|
||||||
|
FadeLED({115, 115, 75}, 5.0f);
|
||||||
|
setColor = true;
|
||||||
|
} else {
|
||||||
|
switch (dComIfGs_getSelectEquipClothes()) {
|
||||||
|
case dItemNo_WEAR_KOKIRI_e:
|
||||||
|
FadeLED({0, 100, 0}, 5.0f);
|
||||||
|
setColor = true;
|
||||||
|
break;
|
||||||
|
case dItemNo_WEAR_ZORA_e:
|
||||||
|
FadeLED({0, 0, 100}, 5.0f);
|
||||||
|
setColor = true;
|
||||||
|
break;
|
||||||
|
case dItemNo_ARMOR_e:
|
||||||
|
if (link->checkMagicArmorHeavy()) {
|
||||||
|
FadeLED({5, 100, 100}, 5.0f);
|
||||||
|
} else {
|
||||||
|
FadeLED({100, 0, 5}, 5.0f);
|
||||||
|
}
|
||||||
|
setColor = true;
|
||||||
|
break;
|
||||||
|
case dItemNo_WEAR_CASUAL_e:
|
||||||
|
FadeLED({235, 230, 115}, 5.0f);
|
||||||
|
setColor = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dKy_darkworld_check()) {
|
||||||
|
SetGamepadAdditionalColor(duskColor);
|
||||||
|
} else {
|
||||||
|
SetGamepadAdditionalColor(noColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
f32 finalRed = finalGamepadColor.x + additionalGamepadColor.x;
|
||||||
|
f32 finalGreen = finalGamepadColor.y + additionalGamepadColor.y;
|
||||||
|
f32 finalBlue = finalGamepadColor.z + additionalGamepadColor.z;
|
||||||
|
|
||||||
|
if (finalRed > 255)
|
||||||
|
finalRed = 255;
|
||||||
|
if (finalRed < 0)
|
||||||
|
finalRed = 0;
|
||||||
|
|
||||||
|
if (finalGreen > 255)
|
||||||
|
finalGreen = 255;
|
||||||
|
if (finalGreen < 0)
|
||||||
|
finalGreen = 0;
|
||||||
|
|
||||||
|
if (finalBlue > 255)
|
||||||
|
finalBlue = 255;
|
||||||
|
if (finalBlue < 0)
|
||||||
|
finalBlue = 0;
|
||||||
|
|
||||||
|
currentGamepadColor = LerpColor(currentGamepadColor, cXyz{finalRed, finalGreen, finalBlue}, lerpSpeed);
|
||||||
|
PADSetColor(PAD_CHAN0, (u8)currentGamepadColor.x, (u8)currentGamepadColor.y, (u8)currentGamepadColor.z);
|
||||||
|
}
|
||||||
@@ -191,6 +191,11 @@ namespace dusk {
|
|||||||
ImGui::SetTooltip("Restores patched glitches from Wii USA 1.0,\n"
|
ImGui::SetTooltip("Restores patched glitches from Wii USA 1.0,\n"
|
||||||
"the first released version.");
|
"the first released version.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config::ImGuiCheckbox("Enable Rotating Link Doll", getSettings().game.enableLinkDollRotation);
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
ImGui::SetTooltip("Enables rotating Link in the collection menu with the C-Stick");
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::SeparatorText("Difficulty");
|
ImGui::SeparatorText("Difficulty");
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ namespace dusk {
|
|||||||
ImGui::Text("Link");
|
ImGui::Text("Link");
|
||||||
ImGuiStringViewText(
|
ImGuiStringViewText(
|
||||||
player != nullptr
|
player != nullptr
|
||||||
? fmt::format("Position: {: .2f}, {: .2f}, {: .2f}\n", player->current.pos.x, player->current.pos.y, player->current.pos.z)
|
? fmt::format("Position: {: .4f}, {: .4f}, {: .4f}\n", player->current.pos.x, player->current.pos.y, player->current.pos.z)
|
||||||
: "Position: ?, ?, ?\n"
|
: "Position: ?, ?, ?\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ namespace dusk {
|
|||||||
|
|
||||||
ImGuiStringViewText(
|
ImGuiStringViewText(
|
||||||
player != nullptr
|
player != nullptr
|
||||||
? fmt::format("Speed: {0}\n", player->speedF)
|
? fmt::format("Speed: {: .4f}\n", player->speedF)
|
||||||
: "Speed: ?\n"
|
: "Speed: ?\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ namespace dusk {
|
|||||||
ImGui::Text("Epona");
|
ImGui::Text("Epona");
|
||||||
ImGuiStringViewText(
|
ImGuiStringViewText(
|
||||||
horse != nullptr
|
horse != nullptr
|
||||||
? fmt::format("Position: {: .2f}, {: .2f}, {: .2f}\n", horse->current.pos.x, horse->current.pos.y, horse->current.pos.z)
|
? fmt::format("Position: {: .4f}, {: .4f}, {: .4f}\n", horse->current.pos.x, horse->current.pos.y, horse->current.pos.z)
|
||||||
: "Position: ?, ?, ?\n"
|
: "Position: ?, ?, ?\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -242,7 +242,7 @@ namespace dusk {
|
|||||||
|
|
||||||
ImGuiStringViewText(
|
ImGuiStringViewText(
|
||||||
horse != nullptr
|
horse != nullptr
|
||||||
? fmt::format("Speed: {0}\n", horse->speedF)
|
? fmt::format("Speed: {: .4f}\n", horse->speedF)
|
||||||
: "Speed: ?\n"
|
: "Speed: ?\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,17 @@ static std::string ShowIsoInvalidError(const iso::ValidationError code) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::string_view card_type_name(CARDFileType type) {
|
||||||
|
switch (type) {
|
||||||
|
case CARD_GCIFOLDER:
|
||||||
|
return "GCI Folder"sv;
|
||||||
|
case CARD_RAWIMAGE:
|
||||||
|
return "Card Image"sv;
|
||||||
|
default:
|
||||||
|
return ""sv;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void fileDialogCallback(void* userdata, const char* path, const char* error) {
|
void fileDialogCallback(void* userdata, const char* path, const char* error) {
|
||||||
auto* self = static_cast<ImGuiPreLaunchWindow*>(userdata);
|
auto* self = static_cast<ImGuiPreLaunchWindow*>(userdata);
|
||||||
if (error != nullptr) {
|
if (error != nullptr) {
|
||||||
@@ -216,6 +227,23 @@ void ImGuiPreLaunchWindow::drawOptions() {
|
|||||||
if (configuredBackendId != m_initialGraphicsBackend) {
|
if (configuredBackendId != m_initialGraphicsBackend) {
|
||||||
ImGui::TextDisabled("Restart Required");
|
ImGui::TextDisabled("Restart Required");
|
||||||
}
|
}
|
||||||
|
auto curFileType = (CARDFileType)getSettings().backend.cardFileType.getValue();
|
||||||
|
|
||||||
|
if (ImGui::BeginCombo("Save File Type", card_type_name(curFileType).data())) {
|
||||||
|
|
||||||
|
if (ImGui::Selectable("GCI Folder", curFileType == CARD_GCIFOLDER)) {
|
||||||
|
getSettings().backend.cardFileType.setValue(CARD_GCIFOLDER);
|
||||||
|
config::Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ImGui::Selectable("Card Image", curFileType == CARD_RAWIMAGE)) {
|
||||||
|
getSettings().backend.cardFileType.setValue(CARD_RAWIMAGE);
|
||||||
|
config::Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::EndCombo();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "d/d_item_data.h"
|
#include "d/d_item_data.h"
|
||||||
#include "d/d_meter2_info.h"
|
#include "d/d_meter2_info.h"
|
||||||
#include "d/d_save.h"
|
#include "d/d_save.h"
|
||||||
|
#include "d/actor/d_a_player.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
@@ -579,20 +580,21 @@ namespace dusk {
|
|||||||
|
|
||||||
|
|
||||||
if (ImGui::BeginCombo("Clothes", itemMap.find(statusA.mSelectEquip[0])->second.m_name.c_str())) {
|
if (ImGui::BeginCombo("Clothes", itemMap.find(statusA.mSelectEquip[0])->second.m_name.c_str())) {
|
||||||
if (ImGui::Selectable("None")) {
|
|
||||||
statusA.mSelectEquip[0] = dItemNo_NONE_e;
|
|
||||||
}
|
|
||||||
if (ImGui::Selectable("Ordon Clothes")) {
|
if (ImGui::Selectable("Ordon Clothes")) {
|
||||||
statusA.mSelectEquip[0] = dItemNo_WEAR_CASUAL_e;
|
dMeter2Info_setCloth(dItemNo_WEAR_CASUAL_e, false);
|
||||||
|
daPy_getPlayerActorClass()->setClothesChange(0);
|
||||||
}
|
}
|
||||||
if (ImGui::Selectable("Hero's Clothes")) {
|
if (ImGui::Selectable("Hero's Clothes")) {
|
||||||
statusA.mSelectEquip[0] = dItemNo_WEAR_KOKIRI_e;
|
dMeter2Info_setCloth(dItemNo_WEAR_KOKIRI_e, false);
|
||||||
|
daPy_getPlayerActorClass()->setClothesChange(0);
|
||||||
}
|
}
|
||||||
if (ImGui::Selectable("Zora Armor")) {
|
if (ImGui::Selectable("Zora Armor")) {
|
||||||
statusA.mSelectEquip[0] = dItemNo_WEAR_ZORA_e;
|
dMeter2Info_setCloth(dItemNo_WEAR_ZORA_e, false);
|
||||||
|
daPy_getPlayerActorClass()->setClothesChange(0);
|
||||||
}
|
}
|
||||||
if (ImGui::Selectable("Magic Armor")) {
|
if (ImGui::Selectable("Magic Armor")) {
|
||||||
statusA.mSelectEquip[0] = dItemNo_ARMOR_e;
|
dMeter2Info_setCloth(dItemNo_ARMOR_e, false);
|
||||||
|
daPy_getPlayerActorClass()->setClothesChange(0);
|
||||||
}
|
}
|
||||||
ImGui::EndCombo();
|
ImGui::EndCombo();
|
||||||
}
|
}
|
||||||
@@ -1489,11 +1491,11 @@ namespace dusk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text(e.flagName.c_str());
|
ImGuiStringViewText(e.flagName);
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text(e.location.c_str());
|
ImGuiStringViewText(e.location);
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text(e.description.c_str());
|
ImGuiStringViewText(e.description);
|
||||||
}
|
}
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
#include "dusk/main.h"
|
#include "dusk/main.h"
|
||||||
#include "dusk/io.hpp"
|
#include "dusk/io.hpp"
|
||||||
#include "dusk/logging.h"
|
#include "dusk/logging.h"
|
||||||
|
#include "dusk/settings.h"
|
||||||
|
#include "f_op/f_op_overlap_mng.h"
|
||||||
#include "../file_select.hpp"
|
#include "../file_select.hpp"
|
||||||
#include "aurora/lib/window.hpp"
|
#include "aurora/lib/window.hpp"
|
||||||
|
|
||||||
@@ -153,7 +155,9 @@ bool ImGuiStateShare::applyEncodedState(const std::string& encoded, const std::s
|
|||||||
dComIfGs_setRestartRoomParam(pkt.roomNo & 0x3F);
|
dComIfGs_setRestartRoomParam(pkt.roomNo & 0x3F);
|
||||||
}
|
}
|
||||||
|
|
||||||
dComIfGp_setNextStage(pkt.stageName, spawnPoint, pkt.roomNo, pkt.layer);
|
dusk::getTransientSettings().stateShareLoadActive = true;
|
||||||
|
m_stateSharePeekSeen = false;
|
||||||
|
dComIfGp_setNextStage(pkt.stageName, spawnPoint, pkt.roomNo, pkt.layer, 0.0f, 0, 1, 0, 0, 1, 3);
|
||||||
|
|
||||||
if (name.empty()) {
|
if (name.empty()) {
|
||||||
m_statusMsg = fmt::format("{} room {} layer {}.", pkt.stageName, (int)pkt.roomNo, (int)pkt.layer);
|
m_statusMsg = fmt::format("{} room {} layer {}.", pkt.stageName, (int)pkt.roomNo, (int)pkt.layer);
|
||||||
@@ -242,6 +246,14 @@ void ImGuiStateShare::mergeFromFile(const std::string& path) {
|
|||||||
void ImGuiStateShare::draw(bool& open) {
|
void ImGuiStateShare::draw(bool& open) {
|
||||||
if (dusk::IsGameLaunched) {
|
if (dusk::IsGameLaunched) {
|
||||||
tickPendingApply();
|
tickPendingApply();
|
||||||
|
if (dusk::getTransientSettings().stateShareLoadActive) {
|
||||||
|
if (fopOvlpM_IsPeek()) {
|
||||||
|
m_stateSharePeekSeen = true;
|
||||||
|
} else if (m_stateSharePeekSeen) {
|
||||||
|
dusk::getTransientSettings().stateShareLoadActive = false;
|
||||||
|
m_stateSharePeekSeen = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_loaded) {
|
if (!m_loaded) {
|
||||||
@@ -258,12 +270,13 @@ void ImGuiStateShare::draw(bool& open) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SetNextWindowSizeConstraints(ImVec2(400, 0), ImVec2(FLT_MAX, FLT_MAX));
|
ImGui::SetNextWindowSizeConstraints(ImVec2(400, 0), ImVec2(FLT_MAX, FLT_MAX));
|
||||||
if (!ImGui::Begin("State Share", &open, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav)) {
|
if (!ImGui::Begin("State Manager", &open, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav)) {
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool gameRunning = dusk::IsGameLaunched;
|
const bool gameRunning = dusk::IsGameLaunched;
|
||||||
|
const bool loadInProgress = dusk::getTransientSettings().stateShareLoadActive;
|
||||||
|
|
||||||
const float rowH = ImGui::GetTextLineHeightWithSpacing();
|
const float rowH = ImGui::GetTextLineHeightWithSpacing();
|
||||||
const float listH = rowH * 8 + ImGui::GetStyle().FramePadding.y * 2;
|
const float listH = rowH * 8 + ImGui::GetStyle().FramePadding.y * 2;
|
||||||
@@ -304,11 +317,11 @@ void ImGuiStateShare::draw(bool& open) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (!gameRunning) { ImGui::BeginDisabled(); }
|
if (!gameRunning || loadInProgress) { ImGui::BeginDisabled(); }
|
||||||
if (ImGui::Button("Load")) {
|
if (ImGui::Button("Load")) {
|
||||||
applyEncodedState(m_states[i].encoded, m_states[i].name);
|
applyEncodedState(m_states[i].encoded, m_states[i].name);
|
||||||
}
|
}
|
||||||
if (!gameRunning) { ImGui::EndDisabled(); }
|
if (!gameRunning || loadInProgress) { ImGui::EndDisabled(); }
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button("Copy")) {
|
if (ImGui::Button("Copy")) {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ private:
|
|||||||
int m_renamingIndex = -1;
|
int m_renamingIndex = -1;
|
||||||
char m_renameBuffer[128] = {};
|
char m_renameBuffer[128] = {};
|
||||||
bool m_loaded = false;
|
bool m_loaded = false;
|
||||||
|
bool m_stateSharePeekSeen = false;
|
||||||
std::string m_pendingMergePath;
|
std::string m_pendingMergePath;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ UserSettings g_userSettings = {
|
|||||||
.invertCameraXAxis {"game.invertCameraXAxis", false},
|
.invertCameraXAxis {"game.invertCameraXAxis", false},
|
||||||
.disableMainHUD {"game.disableMainHUD", false},
|
.disableMainHUD {"game.disableMainHUD", false},
|
||||||
.pauseOnFocusLost {"game.pauseOnFocusLost", false},
|
.pauseOnFocusLost {"game.pauseOnFocusLost", false},
|
||||||
|
.enableLinkDollRotation = {"game.enableLinkDollRotation", false },
|
||||||
|
|
||||||
// Graphics
|
// Graphics
|
||||||
.bloomMode {"game.bloomMode", BloomMode::Classic},
|
.bloomMode {"game.bloomMode", BloomMode::Classic},
|
||||||
@@ -98,7 +99,8 @@ UserSettings g_userSettings = {
|
|||||||
.showPipelineCompilation {"backend.showPipelineCompilation", false},
|
.showPipelineCompilation {"backend.showPipelineCompilation", false},
|
||||||
.wasPresetChosen {"backend.wasPresetChosen", false},
|
.wasPresetChosen {"backend.wasPresetChosen", false},
|
||||||
.enableCrashReporting {"backend.enableCrashReporting", true},
|
.enableCrashReporting {"backend.enableCrashReporting", true},
|
||||||
.duskMenuOpen {"backend.duskMenuOpen", false}
|
.duskMenuOpen {"backend.duskMenuOpen", false},
|
||||||
|
.cardFileType {"backend.cardFileType", static_cast<int>(CARD_GCIFOLDER)}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -150,6 +152,7 @@ void registerSettings() {
|
|||||||
Register(g_userSettings.game.canTransformAnywhere);
|
Register(g_userSettings.game.canTransformAnywhere);
|
||||||
Register(g_userSettings.game.freeMagicArmor);
|
Register(g_userSettings.game.freeMagicArmor);
|
||||||
Register(g_userSettings.game.restoreWiiGlitches);
|
Register(g_userSettings.game.restoreWiiGlitches);
|
||||||
|
Register(g_userSettings.game.enableLinkDollRotation);
|
||||||
Register(g_userSettings.game.noMissClimbing);
|
Register(g_userSettings.game.noMissClimbing);
|
||||||
Register(g_userSettings.game.noLowHpSound);
|
Register(g_userSettings.game.noLowHpSound);
|
||||||
Register(g_userSettings.game.midnasLamentNonStop);
|
Register(g_userSettings.game.midnasLamentNonStop);
|
||||||
@@ -183,6 +186,7 @@ void registerSettings() {
|
|||||||
Register(g_userSettings.backend.wasPresetChosen);
|
Register(g_userSettings.backend.wasPresetChosen);
|
||||||
Register(g_userSettings.backend.enableCrashReporting);
|
Register(g_userSettings.backend.enableCrashReporting);
|
||||||
Register(g_userSettings.backend.duskMenuOpen);
|
Register(g_userSettings.backend.duskMenuOpen);
|
||||||
|
Register(g_userSettings.backend.cardFileType);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transient settings
|
// Transient settings
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "m_Do/m_Do_graphic.h"
|
#include "m_Do/m_Do_graphic.h"
|
||||||
#include "m_Do/m_Do_main.h"
|
#include "m_Do/m_Do_main.h"
|
||||||
#include "tracy/Tracy.hpp"
|
#include "tracy/Tracy.hpp"
|
||||||
|
#include <dusk/gamepad_color.h>
|
||||||
|
|
||||||
fapGm_HIO_c::fapGm_HIO_c() {
|
fapGm_HIO_c::fapGm_HIO_c() {
|
||||||
mUsingHostIO = true;
|
mUsingHostIO = true;
|
||||||
@@ -734,6 +735,8 @@ static void fapGm_AfterRecord() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void duskExecute() {
|
static void duskExecute() {
|
||||||
|
handleGamepadColor();
|
||||||
|
|
||||||
if (mDoCPd_c::getHoldR(PAD_1) && mDoCPd_c::getTrigX(PAD_1)) {
|
if (mDoCPd_c::getHoldR(PAD_1) && mDoCPd_c::getTrigX(PAD_1)) {
|
||||||
if (const auto link = g_dComIfG_gameInfo.play.getPlayer(0)) {
|
if (const auto link = g_dComIfG_gameInfo.play.getPlayer(0)) {
|
||||||
dynamic_cast<daAlink_c*>(link)->handleWolfHowl();
|
dynamic_cast<daAlink_c*>(link)->handleWolfHowl();
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ static OSThread MemCardThread;
|
|||||||
|
|
||||||
void mDoMemCd_Ctrl_c::ThdInit() {
|
void mDoMemCd_Ctrl_c::ThdInit() {
|
||||||
#if !PLATFORM_SHIELD
|
#if !PLATFORM_SHIELD
|
||||||
|
CARDSetLoadType((CARDFileType)dusk::getSettings().backend.cardFileType.getValue());
|
||||||
|
|
||||||
CARDInit(DUSK_GAME_NAME, DUSK_GAME_VERSION);
|
CARDInit(DUSK_GAME_NAME, DUSK_GAME_VERSION);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1029,15 +1029,8 @@ static void drawDepth2(view_class* param_0, view_port_class* param_1, int param_
|
|||||||
GX_FALSE, 0);
|
GX_FALSE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_PC
|
|
||||||
// use full size for pc for higher quality background elements
|
|
||||||
u16 halfWidth = width;
|
|
||||||
u16 halfHeight = height;
|
|
||||||
#else
|
|
||||||
u16 halfWidth = width >> 1;
|
u16 halfWidth = width >> 1;
|
||||||
u16 halfHeight = height >> 1;
|
u16 halfHeight = height >> 1;
|
||||||
#endif
|
|
||||||
|
|
||||||
GXRenderModeObj* sp24 = JUTGetVideoManager()->getRenderMode();
|
GXRenderModeObj* sp24 = JUTGetVideoManager()->getRenderMode();
|
||||||
GXSetCopyFilter(GX_FALSE, NULL, GX_TRUE, sp24->vfilter);
|
GXSetCopyFilter(GX_FALSE, NULL, GX_TRUE, sp24->vfilter);
|
||||||
GXSetTexCopySrc(x_orig, y_orig_pos, width, height);
|
GXSetTexCopySrc(x_orig, y_orig_pos, width, height);
|
||||||
|
|||||||
Reference in New Issue
Block a user