Well, hello again. I would like to say that I had succeed in my mission of adding frames, but that wouldn't be totaly true.
Im having some serious problems with this thing, and its starting to really pissing me off. I sort of managed to make it work by making 16 frames instead of 14 (frames 6 & C had a duplicate each, making a 16 total). It work wonderfull, but part of me wasn't happy with such a lazy path, so now I stroke again. My logic was simple:
If d0 is the angle of Sonic (0, 2, 4 or 6), and to load 6th frame the game does
move.b d0,d1
lsr.b #1,d1
add.b d1,d0
so basicaly what I think it does is d0 + (d0-1) if d0=/0, and d0+d0 if d0=0. (lsr is Logic Shift Right, does this sub 1 to d0 if it is not equal to 0?)
then an extra command somewhere makes the final multiplication by 2, resulting in the desired frames.
As I want 14 frames, this is my new nomodspeed label:
@nomodspeed:
lea (SonAni_raaan).l,a1 ; use fastah animation!
cmpi.w #$F00,d2 ; is Sonic running fastah!?
bcc.s @gofastah ; if yes, branch
lea (SonAni_Run).l,a1 ; use running animation
cmpi.w #$600,d2 ; is Sonic at running speed?
bcc.s @running ; if yes, branch
lea (SonAni_Walk).l,a1 ; use walking animation
add.b d0,d0 ; x2 /0=0 2=4 4=8 6=C
add.b d0,d0 ; x2 (x4) /0=0 2=8 4=10 6=18
lsr.b #1, d0 ; minus 1 if not 0 (x4-1) /0=0 2=7 4=1F 6=17
What I want with this well... it is in the comments, then the aftermentioned extra command located somewhere makes the final multiplication, turning 0 into 0, 2 into 14 ($E), 4 into 28 ($1C) and 6 into 42 ($2A). But either the game is trolling me, or I don't understand LSR operation properly, or I have to retire from hacking. The game just loads bullshit when Sonic is walking in angles, most of them are sprites of Sonic running at random angles. Running animation works perfect, as it has 8 frames so that's easy to make.
My other problem is within the 3rd animation. I want to introduce a new animation for when Sonic is running 'fastaah than evah!', wich it would be above his normal maximium speed. What's the problem then? When it loads, game frozes. The animation is defined at the end of the index to avoid changing other animation's indexes; same care was taken with its frames to avoid even more interference (I have enough interference already and hurt animation never loads, just frezees current frame 'till Sonic reachs the ground).
Also, in the walking-running transition, rolling animation is shown for a short period, and I don't know why. What is that thing that I am not seeing now? I don't want to go back to the lazy solution...
Edit: corrected some grammar that could make you eyes bleed.
This post has been edited by rata: 13 March 2015 - 03:32 PM