Crystal, Dead, Jump, Petrify
Jump to navigation
Jump to search
BATTLE.BIN : - Crystal, Dead, Jump, Petrify, and Treasure check: ------------------------------------------------------------------------------------------ Parameter : r4 = Pointer to unit battle data (801908cc) Return : r2 = 0x01 if unit ID = 0xff (do not exist) r2 = 0x01 if unit is Crystal / Dead / Treasure / Jumping / Petrified r2 = 0x00 by default ------------------------------------------------------------------------------------------ 0018da44: 90830001 lbu r3,0x0001(r4) |Unit ID 0018da48: 340200ff ori r2,r0,0x00ff | 0018da4c: 1062000c beq r3,r2,0x0018da80 #If Unit does'nt exist branch to END return r2 = 0x01 0018da50: 34020001 ori r2,r0,0x0001 | 0018da54: 90820058 lbu r2,0x0058(r4) |Load 1st set of Current Status 0018da58: 00000000 nop | 0018da5c: 30420064 andi r2,r2,0x0064 | 0018da60: 14400007 bne r2,r0,0x0018da80 #If Crystal, Dead, Jump : branch to END return r2 = 0x01 0018da64: 34020001 ori r2,r0,0x0001 | 0018da68: 90820059 lbu r2,0x0059(r4) |Load 2nd set of Current Status 0018da6c: 00000000 nop | 0018da70: 30420081 andi r2,r2,0x0081 | 0018da74: 10400002 beq r2,r0,0x0018da80 #If not Petrify nor Treasure : branch to END return r2 = 0x00 0018da78: 00000000 nop | 0018da7c: 34020001 ori r2,r0,0x0001 |Return r2 = 1 if petrify or treasure 0018da80: 03e00008 jr r31 0018da84: 00000000 nop
Return locations
BATTLE.BIN 0018d7dc: Poison_and_Regen 0018d87c: Transparent_removal_routine 0018daa8: Poison_Marsh_Routine