From 040e0e19211aa377ff69157f50bf805e031c74ce Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Tue, 24 Jun 2025 01:29:40 +0000 Subject: 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 --- soh/src/code/z_skelanime.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) (limited to 'soh/src/code') 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__); } } -- cgit v1.2.3