diff --git a/src/main.c b/src/main.c index b0e9ab595f0a8c8d5ca228e3a81a63c7c6e55f71..a04ceab640c2ee2f047ea30ceedc7e141062ca5f 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)