diff --git a/.github/ISSUE_TEMPLATE/accuracy_issue.md b/.github/ISSUE_TEMPLATE/accuracy_issue.md new file mode 100644 index 000000000..d7c682844 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/accuracy_issue.md @@ -0,0 +1,26 @@ +--- +name: Accuracy Issue +about: Report a discrepancy or inaccuracy in the game +title: "Description of the inaccuracy" +labels: bug +assignees: '' +--- + +- [ ] I have checked checked the known issues and searched Github to ensure this issue has not already been reported. + +### Description of the inaccuracy: + + +### Screenshots or videos of Ghostship's behavior: + +### Screenshots or videos of the original hardware's behavior: + + +### System Information: +- OS: +- GFX Backend: Metal, OpenGL, or DirectX +- Game Version: +- Rom Version: + +### Additional Information: + diff --git a/.github/ISSUE_TEMPLATE/crash_report.md b/.github/ISSUE_TEMPLATE/crash_report.md new file mode 100644 index 000000000..941153ee6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/crash_report.md @@ -0,0 +1,34 @@ +--- +name: Crash Report +about: Report a crash, unexpected exit, or freeze +title: "Description of the crash" +labels: bug, crash +assignees: '' +--- + +### Description of the crash: + + +### Can you reproduce? If so please list the steps: +- [ ] No, I cannot reproduce this crash +- [ ] Yes, here are the steps to reproduce the crash: + + +### Screenshots or videos: + + +### Logs: + + +### System Information: +- OS: +- GFX Backend: Metal, OpenGL, or DirectX +- Game Version: +- Rom Version: + +### Additional Information: + diff --git a/.github/ISSUE_TEMPLATE/general_bug.md b/.github/ISSUE_TEMPLATE/general_bug.md new file mode 100644 index 000000000..4e886e804 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/general_bug.md @@ -0,0 +1,37 @@ +--- +name: General Bug +about: Other bugs related to Ghostship and it's features +title: "Description of the bug" +labels: bug +assignees: '' +--- + +- [ ] I have checked the known issues and searched Github to ensure this issue has not already been reported. +- [ ] This is not a feature request, I know those belong on Discord/Github Discussions. + +### Description of the bug: + + +### Can you reproduce? If so please list the steps: +- [ ] No, I cannot reproduce this bug +- [ ] Yes, here are the steps to reproduce the bug: + + +### Expected behavior: + + +### Screenshots or videos: + + +### System Information: +- OS: +- GFX Backend: Metal, OpenGL, or DirectX +- Game Version: +- Rom Version: + +### Additional Information: + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 41cd62347..e541c70c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,8 +61,11 @@ jobs: - name: Create Package run: | mkdir ghostship-release + mkdir ghostship-release/debug mv build/x64/Release/Ghostship.exe ghostship-release/ mv build/x64/Release/ghostship.o2r ghostship-release/ + mv build/x64/Release/*.pdb ghostship-release/debug/ + mv README.md ghostship-release/readme.txt mv config.yml ghostship-release/ mv assets ghostship-release/ Invoke-WebRequest -Uri "https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt" -OutFile "ghostship-release/gamecontrollerdb.txt" @@ -179,7 +182,7 @@ jobs: cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug cmake --build build-cmake --config Debug -j3 (cd build-cmake && cpack -G External) - wget -O gamecontrollerdb.txt https://github.com/mdqinc/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt + wget -O gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/refs/heads/master/gamecontrollerdb.txt mv README.md readme.txt mv build-cmake/*.appimage ghostship.appimage - name: Upload build @@ -212,7 +215,7 @@ jobs: sudo sh /tmp/cmake.sh --prefix=/usr/local/ --exclude-subdir cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake cmake --build build-switch --config Release -j3 - wget -O gamecontrollerdb.txt https://github.com/mdqinc/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt + wget -O gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/refs/heads/master/gamecontrollerdb.txt mv README.md readme.txt mv build-switch/*.nro Ghostship.nro - name: Upload build diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ab1334f5..c9cc52b55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -426,75 +426,44 @@ endif() # Compile and link options ################################################################################ if(MSVC) - if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") - target_compile_options(${PROJECT_NAME} PRIVATE - $<$: - /w; - /Od; - /MTd - > - $<$: - /Oi; - /Gy; - /W3; - /MT - > - /permissive-; - /MP; - ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; - ${DEFAULT_CXX_EXCEPTION_HANDLING} - ) - target_compile_options(${PROJECT_NAME} PRIVATE $<$:/ZI;>) - target_compile_options(${PROJECT_NAME} PRIVATE $<$:/Zi;>) - elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") - target_compile_options(${PROJECT_NAME} PRIVATE - $<$: - /MTd - > - $<$: - /O2; - /Oi; - /Gy; - /MT - > - /permissive-; - /MP; - /w; - ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; - ${DEFAULT_CXX_EXCEPTION_HANDLING} - ) - endif() - if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") - target_link_options(${PROJECT_NAME} PRIVATE - $<$: - /INCREMENTAL - > - $<$: - /OPT:REF; - /OPT:ICF; - /INCREMENTAL:NO; - /FORCE:MULTIPLE - > - /MANIFEST:NO; - /DEBUG; - /SUBSYSTEM:WINDOWS - ) - elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32") - target_link_options(${PROJECT_NAME} PRIVATE - $<$: - /STACK:8777216 - > - $<$: - /OPT:REF; - /OPT:ICF; - /INCREMENTAL:NO; - /FORCE:MULTIPLE - > - /MANIFEST:NO; - /DEBUG; - /SUBSYSTEM:WINDOWS - ) - endif() + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /w; + /Od + > + $<$: + /Oi; + /Gy; + /W3 + > + + /wd4024 #different types for formal and actual parameter [x]. Usually seen along side 4047. + /wd4047 #'uintptr_t' differs in levels of indirection from 'Gfx *'. Usually caused by passing a uintptr_t into a function expecting a pointer-types + /wd4090 #'initializing': different 'const' qualifiers. Caused when initializing a non const struct member with a const char*. + /wd4101 # unreferenced local variable. Things like stack pads. + /wd4133 #incompatible types. Usually caused by passing a c string into a function that takes a pointer. + /wd4244 #conversion from [a] to [b]. Used to warn when copying to smaller type without a cast. + /sdl-; + /permissive-; + /MP; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + ) + target_compile_options(${PROJECT_NAME} PRIVATE $<$:/ZI;>) + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /INCREMENTAL + > + $<$: + /OPT:REF; + /OPT:ICF; + /INCREMENTAL:NO; + /FORCE:MULTIPLE + > + /MANIFEST:NO; + /DEBUG; + /SUBSYSTEM:WINDOWS + ) # Remove /RTC from msvc flags foreach (fentry @@ -662,6 +631,11 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") install(FILES "${CMAKE_BINARY_DIR}/config.yml" DESTINATION . COMPONENT ${PROJECT_NAME}) endif() +if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") + install(FILES $ DESTINATION ./debug COMPONENT ${PROJECT_NAME}) + install(FILES "${CMAKE_BINARY_DIR}/ghostship.o2r" DESTINATION . COMPONENT ${PROJECT_NAME}) +endif() + if(CMAKE_SYSTEM_NAME MATCHES "Darwin") add_custom_target(CreateOSXIcons COMMAND mkdir -p ${CMAKE_BINARY_DIR}/macosx/ghostship.iconset diff --git a/Torch b/Torch index aaed953d1..963a1f683 160000 --- a/Torch +++ b/Torch @@ -1 +1 @@ -Subproject commit aaed953d180356f933bc0011d250f7de1366c42e +Subproject commit 963a1f6830f1080a33f581c8b935c49060899214 diff --git a/actors/group11.h b/actors/group11.h index b76af2473..1419e3cc6 100644 --- a/actors/group11.h +++ b/actors/group11.h @@ -16,9 +16,6 @@ #include "assets/actors/spiny_egg.h" // wiggler_body -#include "assets/actors/wiggler_body.h" - -// wiggler_head -#include "assets/actors/wiggler_head.h" +#include "assets/actors/wiggler.h" #endif diff --git a/include/assets/actors/bowser_flame.h b/include/assets/actors/bowser_flame.h index 66c9d8b04..9067b705d 100644 --- a/include/assets/actors/bowser_flame.h +++ b/include/assets/actors/bowser_flame.h @@ -5,31 +5,59 @@ static const ALIGN_ASSET(2) char flame_seg6_texture_06000000[] = "__OTR__actors/bowser_flame/bowser_flame_0"; -static const ALIGN_ASSET(2) char flame_seg6_texture_06002000[] = "__OTR__actors/bowser_flame/bowser_flame_1"; +static const ALIGN_ASSET(2) char flame_seg6_texture_06001000[] = "__OTR__actors/bowser_flame/bowser_flame_1"; -static const ALIGN_ASSET(2) char flame_seg6_texture_06004000[] = "__OTR__actors/bowser_flame/bowser_flame_2"; +static const ALIGN_ASSET(2) char flame_seg6_texture_06002000[] = "__OTR__actors/bowser_flame/bowser_flame_2"; -static const ALIGN_ASSET(2) char flame_seg6_texture_06006000[] = "__OTR__actors/bowser_flame/bowser_flame_3"; +static const ALIGN_ASSET(2) char flame_seg6_texture_06003000[] = "__OTR__actors/bowser_flame/bowser_flame_3"; -static const ALIGN_ASSET(2) char flame_seg6_texture_06008000[] = "__OTR__actors/bowser_flame/bowser_flame_4"; +static const ALIGN_ASSET(2) char flame_seg6_texture_06004000[] = "__OTR__actors/bowser_flame/bowser_flame_4"; -static const ALIGN_ASSET(2) char flame_seg6_texture_0600A000[] = "__OTR__actors/bowser_flame/bowser_flame_5"; +static const ALIGN_ASSET(2) char flame_seg6_texture_06005000[] = "__OTR__actors/bowser_flame/bowser_flame_5"; -static const ALIGN_ASSET(2) char flame_seg6_texture_0600C000[] = "__OTR__actors/bowser_flame/bowser_flame_6"; +static const ALIGN_ASSET(2) char flame_seg6_texture_06006000[] = "__OTR__actors/bowser_flame/bowser_flame_6"; -static const ALIGN_ASSET(2) char flame_seg6_texture_0600E000[] = "__OTR__actors/bowser_flame/bowser_flame_7"; +static const ALIGN_ASSET(2) char flame_seg6_texture_06007000[] = "__OTR__actors/bowser_flame/bowser_flame_7"; -static const ALIGN_ASSET(2) char flame_seg6_texture_06010000[] = "__OTR__actors/bowser_flame/bowser_flame_8"; +static const ALIGN_ASSET(2) char flame_seg6_texture_06008000[] = "__OTR__actors/bowser_flame/bowser_flame_8"; -static const ALIGN_ASSET(2) char flame_seg6_texture_06012000[] = "__OTR__actors/bowser_flame/bowser_flame_9"; +static const ALIGN_ASSET(2) char flame_seg6_texture_06009000[] = "__OTR__actors/bowser_flame/bowser_flame_9"; -static const ALIGN_ASSET(2) char flame_seg6_texture_06014000[] = "__OTR__actors/bowser_flame/bowser_flame_10"; +static const ALIGN_ASSET(2) char flame_seg6_texture_0600A000[] = "__OTR__actors/bowser_flame/bowser_flame_10"; -static const ALIGN_ASSET(2) char flame_seg6_texture_06016000[] = "__OTR__actors/bowser_flame/bowser_flame_11"; +static const ALIGN_ASSET(2) char flame_seg6_texture_0600B000[] = "__OTR__actors/bowser_flame/bowser_flame_11"; -static const ALIGN_ASSET(2) char flame_seg6_texture_06018000[] = "__OTR__actors/bowser_flame/bowser_flame_12"; +static const ALIGN_ASSET(2) char flame_seg6_texture_0600C000[] = "__OTR__actors/bowser_flame/bowser_flame_12"; -static const ALIGN_ASSET(2) char flame_seg6_texture_0601A000[] = "__OTR__actors/bowser_flame/bowser_flame_13"; +static const ALIGN_ASSET(2) char flame_seg6_texture_0600D000[] = "__OTR__actors/bowser_flame/bowser_flame_13"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_0600E000[] = "__OTR__actors/bowser_flame/bowser_flame_14"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_0600F000[] = "__OTR__actors/bowser_flame/bowser_flame_15"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06010000[] = "__OTR__actors/bowser_flame/bowser_flame_16"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06011000[] = "__OTR__actors/bowser_flame/bowser_flame_17"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06012000[] = "__OTR__actors/bowser_flame/bowser_flame_18"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06013000[] = "__OTR__actors/bowser_flame/bowser_flame_19"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06014000[] = "__OTR__actors/bowser_flame/bowser_flame_20"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06015000[] = "__OTR__actors/bowser_flame/bowser_flame_21"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06016000[] = "__OTR__actors/bowser_flame/bowser_flame_22"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06017000[] = "__OTR__actors/bowser_flame/bowser_flame_23"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06018000[] = "__OTR__actors/bowser_flame/bowser_flame_24"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_06019000[] = "__OTR__actors/bowser_flame/bowser_flame_25"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_0601A000[] = "__OTR__actors/bowser_flame/bowser_flame_26"; + +static const ALIGN_ASSET(2) char flame_seg6_texture_0601B000[] = "__OTR__actors/bowser_flame/bowser_flame_27"; static const ALIGN_ASSET(2) char flame_seg6_vertex_0601C000[] = "__OTR__actors/bowser_flame/flame_seg6_vertex_0601C000"; diff --git a/include/assets/actors/impact_smoke.h b/include/assets/actors/impact_smoke.h index f4979415a..52095bb8d 100644 --- a/include/assets/actors/impact_smoke.h +++ b/include/assets/actors/impact_smoke.h @@ -3,13 +3,21 @@ #include "sm64.h" #include "impact_smoke/geo.h" -static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_0605AA28[] = "__OTR__actors/impact_smoke/impact_smoke_0"; +static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_0605AB78[] = "__OTR__actors/impact_smoke/impact_smoke_0"; -static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_0605CA28[] = "__OTR__actors/impact_smoke/impact_smoke_1"; +static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_0605BB78[] = "__OTR__actors/impact_smoke/impact_smoke_1"; -static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_0605EA28[] = "__OTR__actors/impact_smoke/impact_smoke_2"; +static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_0605CB78[] = "__OTR__actors/impact_smoke/impact_smoke_2"; -static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_06060A28[] = "__OTR__actors/impact_smoke/impact_smoke_3"; +static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_0605DB78[] = "__OTR__actors/impact_smoke/impact_smoke_3"; + +static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_0605EB78[] = "__OTR__actors/impact_smoke/impact_smoke_4"; + +static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_0605FB78[] = "__OTR__actors/impact_smoke/impact_smoke_5"; + +static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_06060B78[] = "__OTR__actors/impact_smoke/impact_smoke_6"; + +static const ALIGN_ASSET(2) char impact_smoke_seg6_texture_06061B78[] = "__OTR__actors/impact_smoke/impact_smoke_7"; static const ALIGN_ASSET(2) char impact_smoke_seg6_vertex_06062A28[] = "__OTR__actors/impact_smoke/impact_smoke_seg6_vertex_06062A28"; diff --git a/include/assets/actors/wiggler.h b/include/assets/actors/wiggler.h new file mode 100644 index 000000000..b06382927 --- /dev/null +++ b/include/assets/actors/wiggler.h @@ -0,0 +1,159 @@ +#pragma once + +#include "sm64.h" +#include "wiggler_head/anims.h" +#include "wiggler_head/geo.h" +#include "wiggler_body/anims.h" + +static const ALIGN_ASSET(2) char wiggler_seg5_texture_05005A30[] = "__OTR__actors/wiggler/wiggler_segment_left_side"; + +static const ALIGN_ASSET(2) char wiggler_seg5_texture_05006A30[] = "__OTR__actors/wiggler/wiggler_segment_right_side"; + +static const ALIGN_ASSET(2) char wiggler_seg5_texture_05007A30[] = "__OTR__actors/wiggler/wiggler_eye"; + +static const ALIGN_ASSET(2) char wiggler_seg5_texture_05008230[] = "__OTR__actors/wiggler/wiggler_flower"; + +static const ALIGN_ASSET(2) char wiggler_seg5_texture_05008A30[] = "__OTR__actors/wiggler/wiggler_frown"; + +static const ALIGN_ASSET(2) char wiggler_seg5_texture_05009230[] = "__OTR__actors/wiggler/wiggler_nose_left_side"; + +static const ALIGN_ASSET(2) char wiggler_seg5_texture_0500A230[] = "__OTR__actors/wiggler/wiggler_nose_right_side"; + +static const ALIGN_ASSET(2) char wiggler_seg5_lights_0500B230[] = "__OTR__actors/wiggler/wiggler_seg5_lights_0500B230"; + +static const ALIGN_ASSET(2) char wiggler_seg5_lights_0500B248[] = "__OTR__actors/wiggler/wiggler_seg5_lights_0500B248"; + +static const ALIGN_ASSET(2) char wiggler_body_lights_unused[] = "__OTR__actors/wiggler/wiggler_body_lights_unused"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500B278[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500B278"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500B378[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500B378"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500B478[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500B478"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500B578[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500B578"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500B5B8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500B5B8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500B6A8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500B6A8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500B798[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500B798"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500B898[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500B898"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500B998[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500B998"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500BA98[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500BA98"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500BAD8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500BAD8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500BBC8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500BBC8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500BCB8[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500BCB8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500BE10[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500BE10"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500BE98[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500BE98"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500BF20[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500BF20"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500C078[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500C078"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500C100[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500C100"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500C188[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500C188"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500C1C8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500C1C8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500C208[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500C208"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500C240[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500C240"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500C278[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500C278"; + +static const ALIGN_ASSET(2) char wiggler_body_geo[] = "__OTR__actors/wiggler/wiggler_body_geo"; + +static const ALIGN_ASSET(2) char wiggler_seg5_lights_0500C878[] = "__OTR__actors/wiggler/wiggler_seg5_lights_0500C878"; + +static const ALIGN_ASSET(2) char wiggler_seg5_lights_0500C890[] = "__OTR__actors/wiggler/wiggler_seg5_lights_0500C890"; + +static const ALIGN_ASSET(2) char wiggler_head_lights_unused1[] = "__OTR__actors/wiggler/wiggler_head_lights_unused1"; + +static const ALIGN_ASSET(2) char wiggler_head_lights_unused2[] = "__OTR__actors/wiggler/wiggler_head_lights_unused2"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500C8D8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500C8D8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500C9D8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500C9D8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500CAD8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500CAD8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500CBD8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500CBD8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500CC18[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500CC18"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500CD08[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500CD08"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500CDF8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500CDF8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500CEF8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500CEF8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500CFF8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500CFF8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500D0F8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500D0F8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500D138[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500D138"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500D228[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500D228"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500D318[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500D318"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500DC18[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500DC18"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500DD70[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500DD70"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500DDF8[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500DDF8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500DE80[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500DE80"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500DFD8[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500DFD8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E060[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E060"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500E0E8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500E0E8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500E128[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500E128"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E168[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E168"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E1A0[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E1A0"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E1D8[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E1D8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500E250[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500E250"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E2B0[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E2B0"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E2F8[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E2F8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500E368[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500E368"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E3E8[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E3E8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E430[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E430"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500E4A0[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500E4A0"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E4E0[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E4E0"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E518[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E518"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500E588[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500E588"; + +static const ALIGN_ASSET(2) char wiggler_seg5_vertex_0500E5C8[] = "__OTR__actors/wiggler/wiggler_seg5_vertex_0500E5C8"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E608[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E608"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E640[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E640"; + +static const ALIGN_ASSET(2) char wiggler_seg5_dl_0500E678[] = "__OTR__actors/wiggler/wiggler_seg5_dl_0500E678"; + diff --git a/include/assets/levels/ending.h b/include/assets/levels/ending.h index 6459bc0f4..b2d3f8ad3 100644 --- a/include/assets/levels/ending.h +++ b/include/assets/levels/ending.h @@ -4,101 +4,101 @@ extern const LevelScript level_ending_entry[]; -static const ALIGN_ASSET(2) char dCakeEndTexture0[] = "__OTR__levels/ending/cake_end_texture_0"; +static const ALIGN_ASSET(2) char dCakeEndTexture0[] = "__OTR__levels/ending/cake.0"; -static const ALIGN_ASSET(2) char dCakeEndTexture1[] = "__OTR__levels/ending/cake_end_texture_1"; +static const ALIGN_ASSET(2) char dCakeEndTexture1[] = "__OTR__levels/ending/cake.1"; -static const ALIGN_ASSET(2) char dCakeEndTexture2[] = "__OTR__levels/ending/cake_end_texture_2"; +static const ALIGN_ASSET(2) char dCakeEndTexture2[] = "__OTR__levels/ending/cake.2"; -static const ALIGN_ASSET(2) char dCakeEndTexture3[] = "__OTR__levels/ending/cake_end_texture_3"; +static const ALIGN_ASSET(2) char dCakeEndTexture3[] = "__OTR__levels/ending/cake.3"; -static const ALIGN_ASSET(2) char dCakeEndTexture4[] = "__OTR__levels/ending/cake_end_texture_4"; +static const ALIGN_ASSET(2) char dCakeEndTexture4[] = "__OTR__levels/ending/cake.4"; -static const ALIGN_ASSET(2) char dCakeEndTexture5[] = "__OTR__levels/ending/cake_end_texture_5"; +static const ALIGN_ASSET(2) char dCakeEndTexture5[] = "__OTR__levels/ending/cake.5"; -static const ALIGN_ASSET(2) char dCakeEndTexture6[] = "__OTR__levels/ending/cake_end_texture_6"; +static const ALIGN_ASSET(2) char dCakeEndTexture6[] = "__OTR__levels/ending/cake.6"; -static const ALIGN_ASSET(2) char dCakeEndTexture7[] = "__OTR__levels/ending/cake_end_texture_7"; +static const ALIGN_ASSET(2) char dCakeEndTexture7[] = "__OTR__levels/ending/cake.7"; -static const ALIGN_ASSET(2) char dCakeEndTexture8[] = "__OTR__levels/ending/cake_end_texture_8"; +static const ALIGN_ASSET(2) char dCakeEndTexture8[] = "__OTR__levels/ending/cake.8"; -static const ALIGN_ASSET(2) char dCakeEndTexture9[] = "__OTR__levels/ending/cake_end_texture_9"; +static const ALIGN_ASSET(2) char dCakeEndTexture9[] = "__OTR__levels/ending/cake.9"; -static const ALIGN_ASSET(2) char dCakeEndTexture10[] = "__OTR__levels/ending/cake_end_texture_10"; +static const ALIGN_ASSET(2) char dCakeEndTexture10[] = "__OTR__levels/ending/cake.10"; -static const ALIGN_ASSET(2) char dCakeEndTexture11[] = "__OTR__levels/ending/cake_end_texture_11"; +static const ALIGN_ASSET(2) char dCakeEndTexture11[] = "__OTR__levels/ending/cake.11"; -static const ALIGN_ASSET(2) char dCakeEndTexture12[] = "__OTR__levels/ending/cake_end_texture_12"; +static const ALIGN_ASSET(2) char dCakeEndTexture12[] = "__OTR__levels/ending/cake.12"; -static const ALIGN_ASSET(2) char dCakeEndTexture13[] = "__OTR__levels/ending/cake_end_texture_13"; +static const ALIGN_ASSET(2) char dCakeEndTexture13[] = "__OTR__levels/ending/cake.13"; -static const ALIGN_ASSET(2) char dCakeEndTexture14[] = "__OTR__levels/ending/cake_end_texture_14"; +static const ALIGN_ASSET(2) char dCakeEndTexture14[] = "__OTR__levels/ending/cake.14"; -static const ALIGN_ASSET(2) char dCakeEndTexture15[] = "__OTR__levels/ending/cake_end_texture_15"; +static const ALIGN_ASSET(2) char dCakeEndTexture15[] = "__OTR__levels/ending/cake.15"; -static const ALIGN_ASSET(2) char dCakeEndTexture16[] = "__OTR__levels/ending/cake_end_texture_16"; +static const ALIGN_ASSET(2) char dCakeEndTexture16[] = "__OTR__levels/ending/cake.16"; -static const ALIGN_ASSET(2) char dCakeEndTexture17[] = "__OTR__levels/ending/cake_end_texture_17"; +static const ALIGN_ASSET(2) char dCakeEndTexture17[] = "__OTR__levels/ending/cake.17"; -static const ALIGN_ASSET(2) char dCakeEndTexture18[] = "__OTR__levels/ending/cake_end_texture_18"; +static const ALIGN_ASSET(2) char dCakeEndTexture18[] = "__OTR__levels/ending/cake.18"; -static const ALIGN_ASSET(2) char dCakeEndTexture19[] = "__OTR__levels/ending/cake_end_texture_19"; +static const ALIGN_ASSET(2) char dCakeEndTexture19[] = "__OTR__levels/ending/cake.19"; -static const ALIGN_ASSET(2) char dCakeEndTexture20[] = "__OTR__levels/ending/cake_end_texture_20"; +static const ALIGN_ASSET(2) char dCakeEndTexture20[] = "__OTR__levels/ending/cake.20"; -static const ALIGN_ASSET(2) char dCakeEndTexture21[] = "__OTR__levels/ending/cake_end_texture_21"; +static const ALIGN_ASSET(2) char dCakeEndTexture21[] = "__OTR__levels/ending/cake.21"; -static const ALIGN_ASSET(2) char dCakeEndTexture22[] = "__OTR__levels/ending/cake_end_texture_22"; +static const ALIGN_ASSET(2) char dCakeEndTexture22[] = "__OTR__levels/ending/cake.22"; -static const ALIGN_ASSET(2) char dCakeEndTexture23[] = "__OTR__levels/ending/cake_end_texture_23"; +static const ALIGN_ASSET(2) char dCakeEndTexture23[] = "__OTR__levels/ending/cake.23"; -static const ALIGN_ASSET(2) char dCakeEndTexture24[] = "__OTR__levels/ending/cake_end_texture_24"; +static const ALIGN_ASSET(2) char dCakeEndTexture24[] = "__OTR__levels/ending/cake.24"; -static const ALIGN_ASSET(2) char dCakeEndTexture25[] = "__OTR__levels/ending/cake_end_texture_25"; +static const ALIGN_ASSET(2) char dCakeEndTexture25[] = "__OTR__levels/ending/cake.25"; -static const ALIGN_ASSET(2) char dCakeEndTexture26[] = "__OTR__levels/ending/cake_end_texture_26"; +static const ALIGN_ASSET(2) char dCakeEndTexture26[] = "__OTR__levels/ending/cake.26"; -static const ALIGN_ASSET(2) char dCakeEndTexture27[] = "__OTR__levels/ending/cake_end_texture_27"; +static const ALIGN_ASSET(2) char dCakeEndTexture27[] = "__OTR__levels/ending/cake.27"; -static const ALIGN_ASSET(2) char dCakeEndTexture28[] = "__OTR__levels/ending/cake_end_texture_28"; +static const ALIGN_ASSET(2) char dCakeEndTexture28[] = "__OTR__levels/ending/cake.28"; -static const ALIGN_ASSET(2) char dCakeEndTexture29[] = "__OTR__levels/ending/cake_end_texture_29"; +static const ALIGN_ASSET(2) char dCakeEndTexture29[] = "__OTR__levels/ending/cake.29"; -static const ALIGN_ASSET(2) char dCakeEndTexture30[] = "__OTR__levels/ending/cake_end_texture_30"; +static const ALIGN_ASSET(2) char dCakeEndTexture30[] = "__OTR__levels/ending/cake.30"; -static const ALIGN_ASSET(2) char dCakeEndTexture31[] = "__OTR__levels/ending/cake_end_texture_31"; +static const ALIGN_ASSET(2) char dCakeEndTexture31[] = "__OTR__levels/ending/cake.31"; -static const ALIGN_ASSET(2) char dCakeEndTexture32[] = "__OTR__levels/ending/cake_end_texture_32"; +static const ALIGN_ASSET(2) char dCakeEndTexture32[] = "__OTR__levels/ending/cake.32"; -static const ALIGN_ASSET(2) char dCakeEndTexture33[] = "__OTR__levels/ending/cake_end_texture_33"; +static const ALIGN_ASSET(2) char dCakeEndTexture33[] = "__OTR__levels/ending/cake.33"; -static const ALIGN_ASSET(2) char dCakeEndTexture34[] = "__OTR__levels/ending/cake_end_texture_34"; +static const ALIGN_ASSET(2) char dCakeEndTexture34[] = "__OTR__levels/ending/cake.34"; -static const ALIGN_ASSET(2) char dCakeEndTexture35[] = "__OTR__levels/ending/cake_end_texture_35"; +static const ALIGN_ASSET(2) char dCakeEndTexture35[] = "__OTR__levels/ending/cake.35"; -static const ALIGN_ASSET(2) char dCakeEndTexture36[] = "__OTR__levels/ending/cake_end_texture_36"; +static const ALIGN_ASSET(2) char dCakeEndTexture36[] = "__OTR__levels/ending/cake.36"; -static const ALIGN_ASSET(2) char dCakeEndTexture37[] = "__OTR__levels/ending/cake_end_texture_37"; +static const ALIGN_ASSET(2) char dCakeEndTexture37[] = "__OTR__levels/ending/cake.37"; -static const ALIGN_ASSET(2) char dCakeEndTexture38[] = "__OTR__levels/ending/cake_end_texture_38"; +static const ALIGN_ASSET(2) char dCakeEndTexture38[] = "__OTR__levels/ending/cake.38"; -static const ALIGN_ASSET(2) char dCakeEndTexture39[] = "__OTR__levels/ending/cake_end_texture_39"; +static const ALIGN_ASSET(2) char dCakeEndTexture39[] = "__OTR__levels/ending/cake.39"; -static const ALIGN_ASSET(2) char dCakeEndTexture40[] = "__OTR__levels/ending/cake_end_texture_40"; +static const ALIGN_ASSET(2) char dCakeEndTexture40[] = "__OTR__levels/ending/cake.40"; -static const ALIGN_ASSET(2) char dCakeEndTexture41[] = "__OTR__levels/ending/cake_end_texture_41"; +static const ALIGN_ASSET(2) char dCakeEndTexture41[] = "__OTR__levels/ending/cake.41"; -static const ALIGN_ASSET(2) char dCakeEndTexture42[] = "__OTR__levels/ending/cake_end_texture_42"; +static const ALIGN_ASSET(2) char dCakeEndTexture42[] = "__OTR__levels/ending/cake.42"; -static const ALIGN_ASSET(2) char dCakeEndTexture43[] = "__OTR__levels/ending/cake_end_texture_43"; +static const ALIGN_ASSET(2) char dCakeEndTexture43[] = "__OTR__levels/ending/cake.43"; -static const ALIGN_ASSET(2) char dCakeEndTexture44[] = "__OTR__levels/ending/cake_end_texture_44"; +static const ALIGN_ASSET(2) char dCakeEndTexture44[] = "__OTR__levels/ending/cake.44"; -static const ALIGN_ASSET(2) char dCakeEndTexture45[] = "__OTR__levels/ending/cake_end_texture_45"; +static const ALIGN_ASSET(2) char dCakeEndTexture45[] = "__OTR__levels/ending/cake.45"; -static const ALIGN_ASSET(2) char dCakeEndTexture46[] = "__OTR__levels/ending/cake_end_texture_46"; +static const ALIGN_ASSET(2) char dCakeEndTexture46[] = "__OTR__levels/ending/cake.46"; -static const ALIGN_ASSET(2) char dCakeEndTexture47[] = "__OTR__levels/ending/cake_end_texture_47"; +static const ALIGN_ASSET(2) char dCakeEndTexture47[] = "__OTR__levels/ending/cake.47"; static const ALIGN_ASSET(2) char ending_seg7_vtx_25800[] = "__OTR__levels/ending/ending_seg7_vtx_25800"; diff --git a/src/audio/external.c b/src/audio/external.c index 0fc561aec..1e8102bb0 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -2551,7 +2551,7 @@ void sound_reset(u8 presetId) { func_802ad74c(0xF2000000, 0); #endif #if defined(VERSION_JP) || defined(VERSION_US) - // audio_reset_session(ROM_JP ? &gAudioSessionPresetsJP[presetId] : &gAudioSessionPresetsUS[presetId]); + audio_reset_session(/*ROM_JP ? &gAudioSessionPresetsJP[presetId] : */&gAudioSessionPresetsUS[presetId]); #else audio_reset_session_eu(presetId); #endif diff --git a/src/audio/load.c b/src/audio/load.c index 4e8595a2e..c91e72d28 100644 --- a/src/audio/load.c +++ b/src/audio/load.c @@ -283,8 +283,8 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) { return (devAddr - dmaDevAddr) + dma->buffer; #else gCurrAudioFrameDmaCount++; - osPiStartDma(&gCurrAudioFrameDmaIoMesgBufs[gCurrAudioFrameDmaCount - 1], OS_MESG_PRI_NORMAL, - OS_READ, dmaDevAddr, dma->buffer, transfer, &gCurrAudioFrameDmaQueue); + // osPiStartDma(&gCurrAudioFrameDmaIoMesgBufs[gCurrAudioFrameDmaCount - 1], OS_MESG_PRI_NORMAL, + // OS_READ, dmaDevAddr, dma->buffer, transfer, &gCurrAudioFrameDmaQueue); *dmaIndexRef = dmaIndex; return (devAddr - dmaDevAddr) + dma->buffer; #endif diff --git a/src/game/mario_misc.c b/src/game/mario_misc.c index ca7bbd257..460bd1703 100644 --- a/src/game/mario_misc.c +++ b/src/game/mario_misc.c @@ -88,7 +88,7 @@ Gfx *geo_draw_mario_head_goddard(s32 callContext, struct GraphNode *node, Mat4 * s16 sfx = 0; struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node; UNUSED Mat4 *transform = c; - + FrameInterpolation_ShouldInterpolateFrame(false); if (callContext == GEO_CONTEXT_RENDER) { if (gPlayer1Controller->controllerData != NULL && !gWarpTransition.isActive) { gd_copy_p1_contpad(gPlayer1Controller->controllerData); @@ -100,6 +100,7 @@ Gfx *geo_draw_mario_head_goddard(s32 callContext, struct GraphNode *node, Mat4 * FrameInterpolation_RecordCloseChild(); play_menu_sounds(sfx); } + FrameInterpolation_ShouldInterpolateFrame(true); return gfx; } diff --git a/src/goddard/renderer.c b/src/goddard/renderer.c index 9b8339da0..dafe27cd2 100644 --- a/src/goddard/renderer.c +++ b/src/goddard/renderer.c @@ -3415,18 +3415,11 @@ void Unknown801A5FF8(struct ObjGroup *arg0) { /* 254AC0 -> 254DFC; orig name: PutSprite */ void gd_put_sprite(u16 *sprite, s32 x, s32 y, s32 wx, s32 wy) { - s32 c; // 5c - s32 r; // 58 - gSPDisplayList(next_gfx(), osVirtualToPhysical(gd_dl_sprite_start_tex_block)); - for (r = 0; r < wy; r += 32) { - for (c = 0; c < wx; c += 32) { - gDPLoadTextureBlock(next_gfx(), (r * 32) + (u8*)segmented_to_virtual(sprite) + c, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, - G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); - gSPTextureRectangle(next_gfx(), x << 2, (y + r) << 2, (x + 32) << 2, (y + r + 32) << 2, - G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); - } - } + gDPLoadTextureBlock(next_gfx(), sprite, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, + G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); + gSPTextureRectangle(next_gfx(), x << 2, (y) << 2, (x + 32) << 2, (y + 32) << 2, + G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10); gDPPipeSync(next_gfx()); gDPSetCycleType(next_gfx(), G_CYC_1CYCLE); diff --git a/src/port/GameExtractor.cpp b/src/port/GameExtractor.cpp index a1c1cc536..e92dbcd3d 100644 --- a/src/port/GameExtractor.cpp +++ b/src/port/GameExtractor.cpp @@ -4,10 +4,10 @@ #include #pragma comment(lib, "Shlwapi.lib") #endif +#include "port/build.h" #include "GameExtractor.h" #include #include - #include #include "Companion.h" @@ -187,12 +187,19 @@ std::optional GameExtractor::ValidateChecksum() const { return mGameList[hash]; } -bool GameExtractor::GenerateOTR() const { +void GameExtractor::WritePortVersion() { + char portVersion[18]; + snprintf(portVersion, 18, "%d.%d.%d", gBuildVersionMajor, gBuildVersionMinor, gBuildVersionPatch); + Companion::Instance->RegisterCompanionFile("port_version", + std::vector(portVersion, portVersion + strlen(portVersion))); +} + +bool GameExtractor::GenerateOTR() { const std::string assets_path = Ship::Context::GetAppBundlePath(); const std::string game_path = Ship::Context::GetAppDirectoryPath(); Companion::Instance = new Companion(this->mGameData, ArchiveType::O2R, false, assets_path, game_path); - + this->WritePortVersion(); try { Companion::Instance->Init(ExportType::Binary); } catch (const std::exception& e) { diff --git a/src/port/GameExtractor.h b/src/port/GameExtractor.h index 131734b9c..449b21e5a 100644 --- a/src/port/GameExtractor.h +++ b/src/port/GameExtractor.h @@ -11,7 +11,8 @@ class GameExtractor { std::optional ValidateChecksum() const; bool SelectGameFromUI(); void GetRoms(std::vector& roms); - bool GenerateOTR() const; + bool GenerateOTR(); + void WritePortVersion(); private: fs::path mGamePath; std::vector mGameData;