Code:
@Thumb mode
add r2,pc,#1
bx r2
.thumb
ldrh r0,Map
ldrh r1,MapOffset
ReviveFlowers:
ldrh r2,[r0,r1]
mov r3, #0x6F
cmp r2,r3
ble WaterFlowers
mov r3, #0x89
cmp r2,r3
bge WaterFlowers
sub r2,#0x6E
WaterFlowers:
mov r3, #0x1B
cmp r2, r3
bge RemoveWeeds
strh r2, [r0,r1]
RemoveWeeds:
mov r3, #0x1E
ldrh r5,Nothing
cmp r2,r3
ble RemoveRafflesia
mov r3, #0x25
cmp r2,r3
bge RemoveRafflesia
strh r5, [r0,r1]
RemoveRafflesia:
mov r3, #0x1B
cmp r2, r3
bne RemoveRafflesia2
strh r5, [r0,r1]
RemoveRafflesia2:
mov r3, #0x89
bne End
strh r5, [r0,r1]
End:
sub r1,#2
bpl ReviveFlowers
bx lr
.arm
Map:
.long 0x21E6D4C
MapOffset:
.short 0x1FFE
Nothing:
.short 0xFFF1