Count number of Crystals on map
Jump to navigation
Jump to search
0007a774: 3c03800a lui r3,0x800a 0007a778: 8c638a54 lw r3,-0x75ac(r3) Load Misc Unit Display Data 0007a77c: 00000000 nop 0007a780: 1060000b beq r3,r0,0x0007a7b0 Branch if Misc Unit Display Data == 0x0 0007a784: 00002021 addu r4,r0,r0 0007a788: 3405009b ori r5,r0,0x009b r5 = crystal spritesheet 0007a78c: 90620006 lbu r2,0x0006(r3) Load Spritesheet ID 0007a790: 00000000 nop 0007a794: 14450002 bne r2,r5,0x0007a7a0 Branch if Spritesheet is crystal 0007a798: 00000000 nop 0007a79c: 24840001 addiu r4,r4,0x0001 ++ 0007a7a0: 8c630000 lw r3,0x0000(r3) Load Pointer to previous unit's misc data (00000000 means this is the first) 0007a7a4: 00000000 nop 0007a7a8: 1460fff8 bne r3,r0,0x0007a78c Branch if Pointer to previous unit's misc data (00000000 means this is the first), != 0x0 0007a7ac: 00000000 nop 0007a7b0: 03e00008 jr r31 Jump to Address 0007a7b4: 00801021 addu r2,r4,r0 Return number of crystals on map