i was adding smooth sprites to sonic 1, but i never expected this to happen 0.o unfortunately, the sprite sheet i got the extra frames from don't have rotated versions, so i'll have to manually rotate them myself oh yeah, here's the sonic animation file (sonic walk is the issue): Code (Text): ; --------------------------------------------------------------------------- ; Animation script - Sonic ; --------------------------------------------------------------------------- dc.w SonAni_Walk-SonicAniData dc.w SonAni_Run-SonicAniData dc.w SonAni_Roll-SonicAniData dc.w SonAni_Roll2-SonicAniData dc.w SonAni_Push-SonicAniData dc.w SonAni_Wait-SonicAniData dc.w SonAni_Balance-SonicAniData dc.w SonAni_LookUp-SonicAniData dc.w SonAni_Duck-SonicAniData dc.w SonAni_Warp1-SonicAniData dc.w SonAni_Warp2-SonicAniData dc.w SonAni_Warp3-SonicAniData dc.w SonAni_Warp4-SonicAniData dc.w SonAni_Stop-SonicAniData dc.w SonAni_Float1-SonicAniData dc.w SonAni_Float2-SonicAniData dc.w SonAni_Spring-SonicAniData dc.w SonAni_LZHang-SonicAniData dc.w SonAni_Leap1-SonicAniData dc.w SonAni_Leap2-SonicAniData dc.w SonAni_Surf-SonicAniData dc.w SonAni_Bubble-SonicAniData dc.w SonAni_Death1-SonicAniData dc.w SonAni_Drown-SonicAniData dc.w SonAni_Death2-SonicAniData dc.w SonAni_Shrink-SonicAniData dc.w SonAni_Hurt-SonicAniData dc.w SonAni_LZSlide-SonicAniData dc.w SonAni_Blank-SonicAniData dc.w SonAni_Float3-SonicAniData dc.w SonAni_Float4-SonicAniData dc.w SonAni_Spindash-SonicAniData ;1F SonAni_Walk: dc.b $FF, $61, $08, $62, $9, $A, $B, $6, $7, $FF SonAni_Run: dc.b $FF, $1E, $1F, $20, $21, $FF, $FF, $FF SonAni_Roll: dc.b $FE, $2E, $2F, $30, $31, $32, $FF, $FF SonAni_Roll2: dc.b $FE, $2E, $2F, $32, $30, $31, $32, $FF SonAni_Push: dc.b $FD, $45, $46, $47, $48, $FF, $FF, $FF SonAni_Wait: dc.b $17, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $5E, $5F, $60, $02, $02, $02, $02, $03, $04, $FE, 2, 0 SonAni_Balance: dc.b $1F, $3A, $3B, $FF SonAni_LookUp: dc.b $3F, 5, $FF, 0 SonAni_Duck: dc.b $3F, $39, $FF, 0 SonAni_Warp1: dc.b $3F, $33, $FF, 0 SonAni_Warp2: dc.b $3F, $34, $FF, 0 SonAni_Warp3: dc.b $3F, $35, $FF, 0 SonAni_Warp4: dc.b $3F, $36, $FF, 0 SonAni_Stop: dc.b 7, $37, $38, $FF SonAni_Float1: dc.b 7, $3C, $3F, $FF SonAni_Float2: dc.b 7, $3C, $3D, $53, $3E, $54, $FF, 0 SonAni_Spring: dc.b $2F, $40, $FD, 0 SonAni_LZHang: dc.b 4, $41, $42, $FF SonAni_Leap1: dc.b $F, $43, $43, $43, $FE, 1 SonAni_Leap2: dc.b $F, $43, $44, $FE, 1, 0 SonAni_Surf: dc.b $3F, $49, $FF, 0 SonAni_Bubble: dc.b $B, $56, $56, $A, $B, $FD, 0, 0 SonAni_Death1: dc.b $20, $4B, $FF, 0 SonAni_Drown: dc.b $2F, $4C, $FF, 0 SonAni_Death2: dc.b 3, $4D, $FF, 0 SonAni_Shrink: dc.b 3, $4E, $4F, $50, $51, $52, 0, $FE, 1, 0 SonAni_Hurt: dc.b 3, $55, $FF, 0 SonAni_LZSlide: dc.b 7, $55, $57, $FF SonAni_Blank: dc.b $77, 0, $FD, 0 SonAni_Float3: dc.b 3, $3C, $3D, $53, $3E, $54, $FF, 0 SonAni_Float4: dc.b 3, $3C, $FD, 0 SonAni_Spindash: dc.b 0, $58, $59, $58, $5A, $58, $5B, $58, $5C, $58, $5D, $FF even one thing i forgot to mention, i already tried the expand art limit tutorial and the best i got was sonic looking like a garbled mess
Angled sprites are retrieved by taking the current sprite found in the animation data and adding the current octant times the number of walking/running frames. In Sonic_Animate, you will see this code (I documented it to make it easier to understand): Code (Text): ; d0 = octant modifier (0, 2, 4, 6) ; d2 = Sonic's current speed lea (SonAni_Run).l,a1 ; Running animation cmpi.w #$600,d2 ; Is Sonic at running speed? bcc.s .running ; If yes, branch lea (SonAni_Walk).l,a1 ; Walking animation move.b d0,d1 ; Make octant modifier a multiple of 3 lsr.b #1,d1 ; (0, 3, 6, 9) add.b d1,d0 .running: add.b d0,d0 ; Multiple octant modifer by 2 move.b d0,d3 ; (Becomes multiple of 4 for running (0, 4, 8, 12), ; multiple of 6 for walking (0, 6, 12, 18)) ... bsr.w .loadframe ; Get frame from animation add.b d3,obFrame(a0) ; Add octant modifier to frame Some changes will need to be made. The first issue I notice is that the walking, running, and pushing sprites need to use the same number of bytes. The two rolling animations also need to have the same number of bytes as each other, too. The reason for this is that when it switches between those animations, it doesn't actually resent the animation data offset, because the animation ID isn't actually being changed (0 = walking/running/pushing, 2 = rolling, fast and slow) so if you were on the third frame of running, for instance, and you go back to walking, it'll go to the third frame of walking. The shorter animations pad it out with FFs so that if it jumps out of bounds, it'll hit a reset flag, and properly go back to the start of the animation. Second, the animation handler needs to be updated to handle 8 walking frames instead of 6 for an octant. You can achieve this easily by changing the "make octant of modifier of 3" code to just: Code (Text): add.b d0,d0 ; Make octant modifier a multiple of 4 (0, 4, 8, 12) This will make the octant modifier a multiple of 4 (0, 4, 8, 12), which will then be updated to a multiple of 8 (0, 8, 16, 24) once it hits the .running label (see Sonic 2 and 3K for reference). Third, you need to put the walking frames together like how it's done in the stock game. As in, you must have the frames for the first octant first, and then the second, then third, then fourth, because the animation handler relies on the fact that the walking frames are put together like that. Unless you want to make some kind of table that translates a base frame ID + modifier into a proper frame ID, but that's probably not worth the trouble, honestly.
i cant quite seem to find the code you mentioned in the reply, btw, im using hivebrain, if that makes a difference