Transfer Unit Data to AI Data
Jump to navigation
Jump to search
0019e160: 27bdffc8 addiu r29,r29,0xffc8 0019e164: afb60028 sw r22,0x0028(r29) 0019e168: 0080b021 addu r22,r4,r0 r22 = Preset Value 0019e16c: afb7002c sw r23,0x002c(r29) 0019e170: 3c17801a lui r23,0x801a 0019e174: 26f7f3c4 addiu r23,r23,0xf3c4 r23 = AI Data Pointer 0019e178: afb40020 sw r20,0x0020(r29) 0019e17c: 0000a021 addu r20,r0,r0 Unit Counter = 0 0019e180: afb50024 sw r21,0x0024(r29) 0019e184: 0000a821 addu r21,r0,r0 Pointer Mod = 0 0019e188: afbf0030 sw r31,0x0030(r29) 0019e18c: afb3001c sw r19,0x001c(r29) 0019e190: afb20018 sw r18,0x0018(r29) 0019e194: afb10014 sw r17,0x0014(r29) 0019e198: afb00010 sw r16,0x0010(r29) 0019e19c: 02f41021 addu r2,r23,r20 0019e1a0: 9053198c lbu r19,0x198c(r2) Load Unit's Battle ID 0019e1a4: 340200ff ori r2,r0,0x00ff 0019e1a8: 1262005d beq r19,r2,0x0019e320 Branch if Unit doesn't exist 0019e1ac: 00000000 nop 0019e1b0: 3c028019 lui r2,0x8019 0019e1b4: 244208cc addiu r2,r2,0x08cc 0019e1b8: 12c00005 beq r22,r0,0x0019e1d0 Branch if PV = 0 0019e1bc: 02a28821 addu r17,r21,r2 r17 = Unit's Data Pointer 0019e1c0: 001310c0 sll r2,r19,0x03 ID * 8 0019e1c4: 24420e50 addiu r2,r2,0x0e50 0019e1c8: 08067878 j 0x0019e1e0 0019e1cc: 02e28021 addu r16,r23,r2 r16 = Unit's AI Status Data Pointer 0019e1d0: 3c03801a lui r3,0x801a 0019e1d4: 8c63f3c0 lw r3,-0x0c40(r3) Load AI Extended Status Data Pointer 0019e1d8: 00131180 sll r2,r19,0x06 ID * 64 0019e1dc: 00438021 addu r16,r2,r3 r16 = Unit's AI Extended Status Data Pointer 0019e1e0: 26040003 addiu r4,r16,0x0003 r4 = Current Status Pointer 0019e1e4: 26320058 addiu r18,r17,0x0058 r18 = Unit's Status Data Pointer 0019e1e8: 92220001 lbu r2,0x0001(r17) Load Unit's ID 0019e1ec: 02402821 addu r5,r18,r0 r5 = Unit's Status Data Pointer 0019e1f0: a2020000 sb r2,0x0000(r16) Store Unit's ID 0019e1f4: 92220007 lbu r2,0x0007(r17) Load Unit's Death Counter 0019e1f8: 34060005 ori r6,r0,0x0005 Limit = 5 0019e1fc: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e200: a2020001 sb r2,0x0001(r16) Store Unit's Death Counter 0019e204: 12c00014 beq r22,r0,0x0019e258 Branch if PV = 0 0019e208: 02402021 addu r4,r18,r0 r4 = Unit's Status Data Pointer 0019e20c: 9222006c lbu r2,0x006c(r17) Load Unit's Death Sentence CT 0019e210: 00000000 nop 0019e214: a2020002 sb r2,0x0002(r16) Store Unit's Death Sentence CT 0019e218: 3c03801a lui r3,0x801a 0019e21c: 8c63f3c0 lw r3,-0x0c40(r3) Load AI Extended Status Data Pointer 0019e220: 00131180 sll r2,r19,0x06 ID * 64 0019e224: 00438021 addu r16,r2,r3 r16 = Unit's AI Extended Status Data Pointer 0019e228: 92020000 lbu r2,0x0000(r16) Load Unit's ID 0019e22c: 00000000 nop 0019e230: a2220001 sb r2,0x0001(r17) Store Unit's ID 0019e234: 92020001 lbu r2,0x0001(r16) Load Unit's Death Counter 0019e238: 34060005 ori r6,r0,0x0005 Limit = 5 0019e23c: a2220007 sb r2,0x0007(r17) Store Unit's Death Counter 0019e240: 92020017 lbu r2,0x0017(r16) Load Unit's Death Sentence CT 0019e244: 26050003 addiu r5,r16,0x0003 r5 = AI Status Data Pointer 0019e248: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e24c: a222006c sb r2,0x006c(r17) Store Unit's Death Sentence CT 0019e250: 080678c9 j 0x0019e324 0019e254: 26940001 addiu r20,r20,0x0001 Unit Counter ++ 0019e258: 26040008 addiu r4,r16,0x0008 r4 = AI Status CT 0019e25c: 2625005d addiu r5,r17,0x005d r5 = Unit Status CT 0019e260: 92220005 lbu r2,0x0005(r17) Load Unit's ENTD Flags 0019e264: 34060010 ori r6,r0,0x0010 Limit = 0x10 0019e268: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e26c: a2020018 sb r2,0x0018(r16) Store ENTD Flags 0019e270: 26040036 addiu r4,r16,0x0036 r4 = AI Equipment 0019e274: 2625001a addiu r5,r17,0x001a r5 = Unit Equipment 0019e278: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e27c: 34060007 ori r6,r0,0x0007 Limit = 7 0019e280: 26040019 addiu r4,r16,0x0019 r4 = AI Faith/Turn Flag?/HP 0019e284: 26250026 addiu r5,r17,0x0026 r5 = Unit " 0019e288: 92220024 lbu r2,0x0024(r17) Load Unit's Brave 0019e28c: 34060004 ori r6,r0,0x0004 Limit = 4 0019e290: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e294: a202003d sb r2,0x003d(r16) Store Brave 0019e298: 26040021 addiu r4,r16,0x0021 r4 = AI Base PA/MA/SP 0019e29c: 26250030 addiu r5,r17,0x0030 r5 = Unit's " 0019e2a0: 9622002c lhu r2,0x002c(r17) Load Unit's MP 0019e2a4: 34060003 ori r6,r0,0x0003 Limit = 3 0019e2a8: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e2ac: a602001e sh r2,0x001e(r16) Store MP 0019e2b0: 26040024 addiu r4,r16,0x0024 r4 = AI PA/MA/SP/CT 0019e2b4: 26250036 addiu r5,r17,0x0036 r5 = Unit's " 0019e2b8: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e2bc: 34060004 ori r6,r0,0x0004 Limit = 4 0019e2c0: 26040028 addiu r4,r16,0x0028 r4 = AI Coordinate Data 0019e2c4: 26250047 addiu r5,r17,0x0047 r5 = Unit's " 0019e2c8: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e2cc: 34060003 ori r6,r0,0x0003 Limit = 3 0019e2d0: 2604002b addiu r4,r16,0x002b r4 = AI Turn/Move/Act Flags? 0019e2d4: 26250186 addiu r5,r17,0x0186 r5 = Unit's " 0019e2d8: 9222015d lbu r2,0x015d(r17) Load Unit's Current Ability CT 0019e2dc: 34060003 ori r6,r0,0x0003 Limit = 3 0019e2e0: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e2e4: a2020020 sb r2,0x0020(r16) Store Current Ability CT 0019e2e8: 2604002e addiu r4,r16,0x002e r4 = AI Action Data? 0019e2ec: 262501b8 addiu r5,r17,0x01b8 r5 = Unit's " 0019e2f0: 92220182 lbu r2,0x0182(r17) Load Unit's Mount Info 0019e2f4: 34060008 ori r6,r0,0x0008 Limit = 8 0019e2f8: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e2fc: a202003e sb r2,0x003e(r16) Store Mount Info 0019e300: 00132080 sll r4,r19,0x02 ID * 4 0019e304: 00932021 addu r4,r4,r19 ID * 5 0019e308: 00042080 sll r4,r4,0x02 ID * 20 0019e30c: 24840cd4 addiu r4,r4,0x0cd4 0019e310: 02e42021 addu r4,r23,r4 r4 = AI Action Data? 0019e314: 2625016e addiu r5,r17,0x016e r5 = Unit's " 0019e318: 0c066ac2 jal 0x0019ab08 Transfer Halfword Values 0019e31c: 34060014 ori r6,r0,0x0014 Limit = 0x14 0019e320: 26940001 addiu r20,r20,0x0001 Unit Counter ++ 0019e324: 2a820015 slti r2,r20,0x0015 0019e328: 1440ff9c bne r2,r0,0x0019e19c Branch if UC < 0x15 0019e32c: 26b501c0 addiu r21,r21,0x01c0 Pointer Mod += 0x1c0 0019e330: 16c00005 bne r22,r0,0x0019e348 Branch if PV != 0 0019e334: 26e40e3c addiu r4,r23,0x0e3c r4 = ? List Pointer 0019e338: 3c058019 lui r5,0x8019 0019e33c: 24a5f5f4 addiu r5,r5,0xf5f4 r5 = ? List Pointer 0019e340: 0c066ad2 jal 0x0019ab48 Transfer Byte Values 0019e344: 34060008 ori r6,r0,0x0008 Limit = 8 0019e348: 8fbf0030 lw r31,0x0030(r29) 0019e34c: 8fb7002c lw r23,0x002c(r29) 0019e350: 8fb60028 lw r22,0x0028(r29) 0019e354: 8fb50024 lw r21,0x0024(r29) 0019e358: 8fb40020 lw r20,0x0020(r29) 0019e35c: 8fb3001c lw r19,0x001c(r29) 0019e360: 8fb20018 lw r18,0x0018(r29) 0019e364: 8fb10014 lw r17,0x0014(r29) 0019e368: 8fb00010 lw r16,0x0010(r29) 0019e36c: 27bd0038 addiu r29,r29,0x0038 0019e370: 03e00008 jr r31 0019e374: 00000000 nop