Monster Skill check prep
Jump to navigation
Jump to search
Monster Skill check prep 00182430: 27bdffd0 addiu r29,r29,0xffd0 00182434: afb0 0018 sw r16,0x 0018(r29) 00182438: 00808021 addu r16,r4,r0 r16 = monster's data (acting unit) 0018243c: afbf002c sw r31,0x002c(r29) 00182440: afb40028 sw r20,0x0028(r29) 00182444: afb30024 sw r19,0x0024(r29) 00182448: afb20020 sw r18,0x0020(r29) 0018244c: afb1001c sw r17,0x001c(r29) 00182450: 92030001 lbu r3,0x0001(r16) 00182454: 340200ff ori r2,r0,0x00ff 00182458: 10620021 beq r3,r2,0x 001824e0 branch if unit doesn't exist 0018245c: 00000000 nop 00182460: 9205018a lbu r5,0x018a(r16) load unit ID? 00182464: 0c05f056 jal 0x0017c158 calculate height 00182468: 27a40010 addiu r4,r29,0x0010 0018246c: 92130005 lbu r19,0x0005(r16) load entd flags 00182470: 92140047 lbu r20,0x0047(r16) 00182474: 92110048 lbu r17,0x0048(r16) load map coordinates 00182478: 93b20016 lbu r18,0x0016(r29) 0018247c: 02602021 addu r4,r19,r0 r4 = ENTD flags 00182480: 2685ffff addiu r5,r20,0xffff r5 = X coords - 1 00182484: 02203021 addu r6,r17,r0 r6 = Y coords 00182488: 0c060942 jal 0x 00182508 See if any units are 1 X away 0018248c: 02403821 addu r7,r18,r0 r7 = unit ID of other unit 00182490: 02602021 addu r4,r19,r0 00182494: 26850001 addiu r5,r20,0x0001 00182498: 02203021 addu r6,r17,r0 0018249c: 02403821 addu r7,r18,r0 001824a0: 0c060942 jal 0x 00182508 check for + 1 X 001824a4: 00408021 addu r16,r2,r0 001824a8: 02028021 addu r16,r16,r2 001824ac: 02602021 addu r4,r19,r0 001824b0: 02802821 addu r5,r20,r0 001824b4: 2626ffff addiu r6,r17,0xffff 001824b8: 0c060942 jal 0x 00182508 check for -1 Y 001824bc: 02403821 addu r7,r18,r0 001824c0: 02028021 addu r16,r16,r2 001824c4: 02602021 addu r4,r19,r0 001824c8: 02802821 addu r5,r20,r0 001824cc: 26260001 addiu r6,r17,0x0001 001824d0: 0c060942 jal 0x 00182508 check for +1 Y 001824d4: 02403821 addu r7,r18,r0 001824d8: 08060939 j 0x 001824e4 001824dc: 02021021 addu r2,r16,r2 001824e0: 00001021 addu r2,r0,r0 001824e4: 8fbf002c lw r31,0x002c(r29) 001824e8: 8fb40028 lw r20,0x0028(r29) 001824ec: 8fb30024 lw r19,0x0024(r29) 001824f0: 8fb20020 lw r18,0x0020(r29) 001824f4: 8fb1001c lw r17,0x001c(r29) 001824f8: 8fb0 0018 lw r16,0x 0018(r29) 001824fc: 27bd0030 addiu r29,r29,0x0030 00182500: 03e00008 jr r31 00182504: 00000000 nop