- 239
- Posts
- 9
- Years
- Seen Apr 17, 2025
I followed everything you said, but for some reason now all the between turn animations have become wrap. Do you know what I could have done wrong?
I also modified the routine a little:
Spoiler:.text
.align 2
.thumb
.thumb_func
.global TrapAnim
Main:
push {lr}
lsl r0, r0, #0x18
lsr r2, r0, #0x18
ldr r0, =(0x02024018)
ldr r0, [r0]
ldr r1, [r0, #0x8]
ldrh r1, [r0] @r1 = move ID
CheckFireSpin:
cmp r1, #0x53 @fire spin move ID
bne CheckWhirlpool
ldr r1, =(0x02037F02)
mov r0, #0x1
b Ending
CheckWhirlpool:
cmp r1, #0xFA @whirlpool move ID
bne CheckClamp
ldr r1, =(0x02037F02)
mov r0, #0x2
b Ending
CheckClamp:
cmp r1, #0x80 @clamp move ID
bne CheckSandTomb
ldr r1, =(0x02037F02)
mov r0, #0x3
b Ending
CheckSandTomb:
mov r0, #0xA4
lsl r0, r0, #0x1 @0x148 (sand tomb move ID)
cmp r1, r0
bne CheckMagmaStorm
ldr r1, =(0x02037F02)
mov r0, #0x4
b Ending
CheckMagmaStorm:
mov r0, #0xF7 @your new move ID
lsl r0, r0, #0x1
cmp r1, r0
bne CheckInfestation
mov r0, #0x5
b Ending
CheckInfestation:
mov r0, #0xFF @your new move ID
add r0, r0, #0x1E
lsl r0, r0, #0x1
cmp r1, r0
bne Default
mov r0, #0x6
b Ending
/* repeat the above pattern for extra moves. */
Default:
ldr r1, =(0x02037F02)
mov r0, #0x0
Ending:
ldr r1, =(0x02037F02) @store anim ID
strh r0, [r1]
mov r0, r2
ldr r1, =(0x08072760 + 1)
bl linker
pop {r0}
bx r0
linker:
bx r1
.align 2
Thanks!
If it's doing the wrap animation between turns, it's somehow getting to the Default part of the assembly routine. I would double check your move IDs. It looks like Infestation is move ID 570, for example.
Also since you load ldr r1, =(0x02037F02) at Ending, you shouldn't need to add that at every check, just in case you want to save a few bytes :)