summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2025-06-24 01:29:40 +0000
committerGitHub <noreply@github.com>2025-06-23 21:29:40 -0400
commit040e0e19211aa377ff69157f50bf805e031c74ce (patch)
treeb1d7955f2ea12b7625f6c5a02fc6d6aecbda0947 /soh/src/code
parent64f9e433dad7185d513720c93b83cd0668af0998 (diff)
Tools update (#5454)
* Bump ZAPDTR & OTRExporter. Changes to use o2r by default Changes to the new player animation format # Conflicts: # OTRExporter # ZAPDTR # soh/soh/OTRGlobals.cpp # soh/src/code/z_skelanime.c * Fix actions * Format * Cherry pick ZAPDTR * Update exporter * Move configs to port * Remove copy * Remove more XML copies * Remove extractor directory from actions builds. * Fix OTRExporter for linux * FIx ZAPD volatile * Format * Fix extractor? * Fix linux * Fix * Remove appimage stuff * Screnity now * Remove ZAPD from install paths * Remove soh.sh.in * Fix linux * Cleanups and use a thread for message box
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_skelanime.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/soh/src/code/z_skelanime.c b/soh/src/code/z_skelanime.c
index b459796a1..a7e93e8c3 100644
--- a/soh/src/code/z_skelanime.c
+++ b/soh/src/code/z_skelanime.c
@@ -894,33 +894,15 @@ void AnimationContext_SetLoadFrame(PlayState* play, LinkAnimationHeader* animati
if (ResourceMgr_OTRSigCheck(animation) != 0)
animation = ResourceMgr_LoadAnimByName(animation);
- LinkAnimationHeader* linkAnimHeader = SEGMENTED_TO_VIRTUAL(animation);
Vec3s* ram = frameTable;
- osCreateMesgQueue(&entry->data.load.msgQueue, &entry->data.load.msg, 1);
-
- char animPath[2048];
-
- snprintf(animPath, sizeof(animPath), "misc/link_animetion/gPlayerAnimData_%06X",
- (((uintptr_t)linkAnimHeader->segment - 0x07000000)));
-
- // printf("Streaming %s, seg = %08X\n", animPath, linkAnimHeader->segment);
-
- s16* animData = ResourceMgr_LoadPlayerAnimByName(animPath);
-
+ s16* animData = animation->segment;
+ // SOH [Port] sometimes a HESS can set a negative frame value from a negative playback speed. When converted to
+ // a signed value this will cause a crash due to copying way much data.
+ if (frame < 0) {
+ frame = 0;
+ }
memcpy(ram, (uintptr_t)animData + (((sizeof(Vec3s) * limbCount + 2) * frame)), sizeof(Vec3s) * limbCount + 2);
-
- /*u32* ramPtr = (u32*)ram;
-
- for (int i = 0; i < 1024; i++)
- {
- ramPtr[i] = i * 7;
- }*/
-
- // DmaMgr_SendRequest2(&entry->data.load.req, ram,
- // LINK_ANIMATION_OFFSET(linkAnimHeader->segment, ((sizeof(Vec3s) * limbCount + 2) * frame)),
- // sizeof(Vec3s) * limbCount + 2, 0, &entry->data.load.msgQueue, NULL, __FILE__,
- //__LINE__);
}
}