Poison Marsh Routine
Jump to navigation
Jump to search
0018da88: 27bdffe0 addiu r29,r29,0xffe0 0018da8c: afb10014 sw r17,0x0014(r29) 0018da90: 00808821 addu r17,r4,r0 0018da94: afbf 0018 sw r31,0x 0018(r29) 0018da98: afb00010 sw r16,0x0010(r29) 0018da9c: 923 00182 lbu r16,0x0182(r17) 0018daa0: 0c063691 jal 0x 0018da44 Check for Crystal, Dead, Jump, Petrify, or Treasure 0018daa4: 00000000 nop 0018daa8: 1440003b bne r2,r0,0x 0018db98 Branch if unit is afflicted with the above Status 0018daac: 00001021 addu r2,r0,r0 r2 = 0x00 0018dab0: 32020040 andi r2,r16,0x0040 0018dab4: 14400038 bne r2,r0,0x 0018db98 Branch if being ridden. 0018dab8: 00001021 addu r2,r0,r0 r2 = 0x00 0018dabc: 32020080 andi r2,r16,0x0080 0018dac0: 1040000d beq r2,r0,0x 0018daf8 Branch if user is riding another unit 0018dac4: 3202001f andi r2,r16,0x001f 0018dac8: 000218c0 sll r3,r2,0x03 0018dacc: 00621823 subu r3,r3,r2 0018dad0: 00031980 sll r3,r3,0x06 0018dad4: 3c018019 lui r1,0x8019 0018dad8: 00230821 addu r1,r1,r3 Load Unit data? 0018dadc: 90220926 lbu r2,0x0926(r1) ?_? 0018dae0: 00000000 nop 0018dae4: 30420040 andi r2,r2,0x0040 0018dae8: 10400006 beq r2,r0,0x 0018db04 Branch if bit x40 or float is active 0018daec: 2624018c addiu r4,r17,0x018c 0018daf0: 080636e6 j 0x 0018db98 0018daf4: 00001021 addu r2,r0,r0 r2 = 0 0018daf8: 9222005a lbu r2,0x005a(r17) Load Current Statuses 3 0018dafc: 080636ba j 0x 0018dae8 0018db00: 30420040 andi r2,r2,0x0040 0018db04: 9222018a lbu r2,0x018a(r17) 0018db08: 3c018019 lui r1,0x8019 0018db0c: ac312d98 sw r17,0x2d98(r1) Store Defender's Data 0018db10: 3c018019 lui r1,0x8019 0018db14: ac242d90 sw r4,0x2d90(r1) Store Defender's Current Action Data 0018db18: 3c018019 lui r1,0x8019 0018db1c: a02238c1 sb r2,0x38c1(r1) Store Target Unit ID 0018db20: 0c062f5d jal 0x 0018bd74 Sub-routine (there's a routine to load all this...) 0018db24: 00000000 nop 0018db28: 0c060428 jal 0x 001810a0 Map Location Calculation 0018db2c: 02202021 addu r4,r17,r0 r4 = Unit Data 0018db30: 000210c0 sll r2,r2,0x03 0018db34: 3c018019 lui r1,0x8019 0018db38: 00220821 addu r1,r1,r2 0018db3c: 9022f8cc lbu r2,-0x0734(r1) Load some RAM data 0018db40: 00000000 nop 0018db44: 3042003f andi r2,r2,0x003f 0018db48: 3c018006 lui r1,0x8006 0018db4c: 00220821 addu r1,r1,r2 0018db50: 9022ea10 lbu r2,-0x15f0(r1) Load Terrain Status Infliction 0018db54: 00000000 nop 0018db58: 30420080 andi r2,r2,0x0080 0018db5c: 1040000d beq r2,r0,0x 0018db94 Branch if Status is Poison 0018db60: 00002021 addu r4,r0,r0 r4 = 0 0018db64: 3c038019 lui r3,0x8019 0018db68: 8c632d90 lw r3,0x2d90(r3) Load Current Action Data Pointer 0018db6c: 34020080 ori r2,r0,0x0080 0018db70: 0c0612c9 jal 0x 00184b24 0018db74: a062001e sb r2,0x001e(r3) Store Status Infliction as Poison 0018db78: 10400006 beq r2,r0,0x 0018db94 0018db7c: 34020001 ori r2,r0,0x0001 0018db80: 3c048019 lui r4,0x8019 0018db84: 8c842d90 lw r4,0x2d90(r4) 0018db88: 34030008 ori r3,r0,0x0008 0018db8c: 080636e6 j 0x 0018db98 0018db90: a0830025 sb r3,0x0025(r4) 0018db94: 00001021 addu r2,r0,r0 0018db98: 8fbf 0018 lw r31,0x 0018(r29) 0018db9c: 8fb10014 lw r17,0x0014(r29) 0018dba0: 8fb00010 lw r16,0x0010(r29) 0018dba4: 27bd0020 addiu r29,r29,0x0020 0018dba8: 03e00008 jr r31 0018dbac: 00000000 nop