From a57054a0ef1b90b418fda1a959f2480629928d75 Mon Sep 17 00:00:00 2001 From: Superstarxalien <ernesto_vallenilla@hotmail.com> Date: Sat, 11 May 2024 11:47:26 -0400 Subject: [PATCH] printfs for apparent animation frame index bug --- src/main.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/main.c b/src/main.c index b0e9ab5..a04ceab 100644 --- a/src/main.c +++ b/src/main.c @@ -291,15 +291,30 @@ void processSprites(void) { { curstate++; if (strcmp(item->string, "following") == 0) + { kfollower.states.following = 1; + printf("%Found following state!\n"); + } if (strcmp(item->string, "hurt") == 0) + { kfollower.states.hurt = 1; + printf("%Found hurt state!\n"); + } if (strcmp(item->string, "lose") == 0) + { kfollower.states.lose = 1; + printf("%Found lose state!\n"); + } if (strcmp(item->string, "win") == 0) + { kfollower.states.win = 1; + printf("%Found win state!\n"); + } if (strcmp(item->string, "hitconfirm") == 0) + { kfollower.states.hitconfirm = 1; + printf("%Found hit confirm state!\n"); + } } lastanimframeletterinstate = 0; @@ -344,7 +359,11 @@ void processSprites(void) { // the idea is to be able to detect the highest letter used for an animation frame within a follower state and go above it upon reading sprites for the next state if (!(strcmp(item->string, "graphics") == 0)) { + printf("curstate: %d\n", curstate); curanimframeletter = nesteditem->string[0]; + printf("og animframeletter id: 0x%x\n", curanimframeletter); + printf("highestanimframeletter before check: 0x%x\n", kfollower.highestanimframeletter); + printf("last animframeletter in state before check: 0x%x\n", lastanimframeletterinstate); // i more or less did this in almost complete mental fog // i can't tell you how i arrived here, sorry @@ -366,6 +385,10 @@ void processSprites(void) { lastanimframeletterinstate = nesteditem->string[0]; + printf("current animframeletter id: 0x%x\n", curanimframeletter); + printf("highestanimframeletter after check: 0x%x\n", kfollower.highestanimframeletter); + printf("last animframeletter in state after check: 0x%x\n", lastanimframeletterinstate); + nesteditem->string[0] = getFixedAnimationIndex(curanimframeletter); if (strlen(nesteditem->string) > 3) -- GitLab