Check Spreading Tile Coordinates
Jump to navigation
Jump to search
BATTLE.BIN : Check Spreading Tile Coordinates ------------------------------------------------------------------------------------------------------- Parameters : Nothing Returns : r2 = 0x00 if spreading Tile's coordinates are valid r2 = 0x01 for invalid coordinates (<0 or > Map Max) ------------------------------------------------------------------------------ 00175618: 3c028019 lui r2,0x8019 | 0017561c: 8c42f4e4 lw r2,-0x0b1c(r2) |Pointer to Scratch Pad at 0x1f800180 Pointer at 8018f4e4 00175620: 00000000 nop | 00175624: 84430030 lh r3,0x0030(r2) |Spreading Tile's X 00175628: 3c058019 lui r5,0x8019 | 0017562c: 8ca5f4e0 lw r5,-0x0b20(r5) |Pointer to scratch pad at 0x1f800000 Pointer at 8018f4e0 0x1f800000 (at 8018f4e0) 00175630: 0460000f bltz r3,0x00175670 #If Spreading Tile's X is < 0x00 : Exit and returns 0x1 00175634: 00000000 nop | 00175638: 84440032 lh r4,0x0032(r2) |Spreading Tile's Y 0017563c: 00000000 nop | 00175640: 0480000c bltz r4,0x00175674 #If Spreading Tile's Y is < 0x00 : Exit and returns 0x1 00175644: 34020001 ori r2,r0,0x0001 | 00175648: 90a20018 lbu r2,0x0018(r5) |Map max X 0017564c: 00000000 nop | 00175650: 0062102a slt r2,r3,r2 | 00175654: 10400007 beq r2,r0,0x00175674 #If Spreading Tile's X is > Map Max X Exit and returns 0x1 00175658: 34020001 ori r2,r0,0x0001 | 0017565c: 90a20019 lbu r2,0x0019(r5) |Map Max Y 00175660: 00000000 nop | 00175664: 0082102a slt r2,r4,r2 | 00175668: 14400002 bne r2,r0,0x00175674 #If Spreading Tile's Y is < Map Max Y Exit and returns 0x00 Everything is OK 0017566c: 00001021 addu r2,r0,r0 | 00175670: 34020001 ori r2,r0,0x0001 |Else returns 0x01 00175674: 03e00008 jr r31 END 00175678: 00000000 nop
Return Locations
BATTLE.BIN 00175f28: 00175ea0_-_00175fa0 001765b4: 001764d8_-_001766b0 00176630: 001764d8_-_001766b0 00177a5c: 001779dc_-_00177b60 00177cb0: 00177c08_-_00177e60 00177cf8: 00177c08_-_00177e60