summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEblo <7004497+Eblo@users.noreply.github.com>2025-09-16 23:24:22 -0400
committerEblo <7004497+Eblo@users.noreply.github.com>2025-09-16 23:24:22 -0400
commitf2a4730501c95430df7c48997054e8817271a5ab (patch)
treed458d681546c3fb950087c10e8f14ae24963bd4e
parent22d9c2141d7b518df7114a47b7476a4d5cbeec52 (diff)
Port cleanup pass
-rw-r--r--mm/2s2h/Enhancements/Trackers/DisplayOverlay.cpp4
-rw-r--r--mm/src/boot/O2/loadfragment.c5
-rw-r--r--mm/src/code/z_actor_dlftbls.c2
-rw-r--r--mm/src/code/z_player_lib.c8
4 files changed, 10 insertions, 9 deletions
diff --git a/mm/2s2h/Enhancements/Trackers/DisplayOverlay.cpp b/mm/2s2h/Enhancements/Trackers/DisplayOverlay.cpp
index 37ea1ca10..ea8f0e244 100644
--- a/mm/2s2h/Enhancements/Trackers/DisplayOverlay.cpp
+++ b/mm/2s2h/Enhancements/Trackers/DisplayOverlay.cpp
@@ -9,7 +9,7 @@ extern "C" {
#include "variables.h"
#include "overlays/actors/ovl_Boss_07/z_boss_07.h"
uint64_t GetUnixTimestamp();
-void Boss07_Wrath_Death(Boss07*, PlayState*);
+void Boss07_Wrath_DeathCutscene(Boss07*, PlayState*);
}
#include "ShipUtils.h"
@@ -101,7 +101,7 @@ void DisplayOverlayWindow::InitElement() {
COND_ID_HOOK(OnActorUpdate, ACTOR_BOSS_07, true, [](Actor* actor) {
Boss07* boss = (Boss07*)actor;
- if (boss->actionFunc == Boss07_Wrath_Death && gSaveContext.save.shipSaveInfo.fileCompletedAt == 0) {
+ if (boss->actionFunc == Boss07_Wrath_DeathCutscene && gSaveContext.save.shipSaveInfo.fileCompletedAt == 0) {
gSaveContext.save.shipSaveInfo.fileCompletedAt = GetUnixTimestamp();
}
})
diff --git a/mm/src/boot/O2/loadfragment.c b/mm/src/boot/O2/loadfragment.c
index c84fc5d40..a933de3f5 100644
--- a/mm/src/boot/O2/loadfragment.c
+++ b/mm/src/boot/O2/loadfragment.c
@@ -193,7 +193,7 @@ size_t Fragment_Load(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, vo
// Clear BSS area (%08x-%08x)
// "BSS領域をクリアします(%08x-%08x)\n"
}
- bzero((void*)end, ovlRelocs->bssSize);
+ memset(end, 0, ovlRelocs->bssSize);
}
osWritebackDCache(allocatedRamAddr, allocatedBytes);
@@ -218,6 +218,7 @@ void* Fragment_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vra
if (gFragmentLogSeverity >= 3) {
// Start loading dynamic link function
// "\nダイナミックリンクファンクションのロードを開始します\n"
+ }
allocatedRamAddr = SystemArena_MallocR(size);
end = (uintptr_t)allocatedRamAddr + size;
@@ -270,7 +271,7 @@ void* Fragment_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vra
// Clear BSS area (%08x-%08x)
// "BSS領域をクリアします(%08x-%08x)\n"
}
- bzero((void*)end, ovlRelocs->bssSize);
+ memset(end, 0, ovlRelocs->bssSize);
}
osInvalICache(allocatedRamAddr, allocatedBytes);
diff --git a/mm/src/code/z_actor_dlftbls.c b/mm/src/code/z_actor_dlftbls.c
index e1b2eeedf..a49e886f1 100644
--- a/mm/src/code/z_actor_dlftbls.c
+++ b/mm/src/code/z_actor_dlftbls.c
@@ -5,7 +5,7 @@
// Segment and Profile declarations (also used in the table below)
// 2S2H Added columns to actor table: _humanName
#define DEFINE_ACTOR(name, _enumValue, _allocType, _debugName, _humanName) extern ActorProfile name##_Profile;
-#define DEFINE_ACTOR_INTERNAL(name, _enumValue, _allocType, _debugName) extern ActorProfile name##_Profile;
+#define DEFINE_ACTOR_INTERNAL(name, _enumValue, _allocType, _debugName, _humanName) extern ActorProfile name##_Profile;
#define DEFINE_ACTOR_UNSET(_enumValue)
#include "tables/actor_table.h"
diff --git a/mm/src/code/z_player_lib.c b/mm/src/code/z_player_lib.c
index 16a520154..8c4bdccbb 100644
--- a/mm/src/code/z_player_lib.c
+++ b/mm/src/code/z_player_lib.c
@@ -1898,7 +1898,7 @@ Gfx gCullFrontDList[] = {
* Note that some player forms do not use the eyes and mouth textures loaded into segments 0x08 and 0x09 respectively.
* Therefore, the segment will point at garbage data, but this does not cause issues as the data is not read from.
*/
-static TexturePtr sEyeTextures[PLAYER_FORM_MAX][PLAYER_EYES_MAX] = {
+TexturePtr sPlayerEyesTextures[PLAYER_FORM_MAX][PLAYER_EYES_MAX] = {
// PLAYER_FORM_FIERCE_DEITY
{
NULL, // PLAYER_EYES_OPEN
@@ -1957,7 +1957,7 @@ static TexturePtr sEyeTextures[PLAYER_FORM_MAX][PLAYER_EYES_MAX] = {
},
};
-static TexturePtr sMouthTextures[PLAYER_FORM_MAX][PLAYER_MOUTH_MAX] = {
+TexturePtr sPlayerMouthTextures[PLAYER_FORM_MAX][PLAYER_MOUTH_MAX] = {
// PLAYER_FORM_FIERCE_DEITY
{
NULL, // PLAYER_MOUTH_CLOSED
@@ -2057,7 +2057,7 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
// Only Human, Zora, and Goron will read the eye textures in the head limb display list.
// Fierce Deity and Deku will point this segment to garbage data, but it will be unread from.
- gSPSegment(&gfx[0], 0x08, Lib_SegmentedToVirtual(sEyeTextures[eyeIndex]));
+ gSPSegment(&gfx[0], 0x08, Lib_SegmentedToVirtual(sPlayerEyesTextures[playerForm][eyeIndex]));
// 2S2H [Port] Hess crash fix
if (mouthIndex >= PLAYER_MOUTH_MAX) {
@@ -2072,7 +2072,7 @@ void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dL
// Only Human and Zora will read the mouth textures in the head limb display list.
// Goron, Fierce Deity, and Deku will point this segment to garbage data, but it will be unread from.
- gSPSegment(&gfx[1], 0x09, Lib_SegmentedToVirtual(sMouthTextures[mouthIndex]));
+ gSPSegment(&gfx[1], 0x09, Lib_SegmentedToVirtual(sPlayerMouthTextures[playerForm][mouthIndex]));
POLY_OPA_DISP = &gfx[2];