Difference between revisions of "Store Some Acting Unit Data"
Jump to navigation
Jump to search
(Created page with " 0017dbc8: 27bdffe8 addiu r29,r29,0xffe8 0017dbcc: 00802821 addu r5,r4,r0 r5 = Unit's Data Pointer 0017dbd0: afbf0010 sw r31,0x0010(r29) 0017dbd4: 90a30003 lbu r3,0x0003(r...") |
|||
Line 1: | Line 1: | ||
− | 0017dbc8: 27bdffe8 addiu r29,r29, | + | Parameters : r4 = Acting Unit data pointer |
− | 0017dbcc: 00802821 addu r5,r4,r0 | + | |
− | 0017dbd0: afbf0010 sw r31,0x0010(r29) | + | If Type of action is not a reaction : Store r4 unit X,Y,elevation and facing (and set mime's weapons to 0xff) |
− | 0017dbd4: 90a30003 lbu r3,0x0003(r5) | + | If Reaction : Store 0x80193848 data (20 bytes) on r4 unit 0x16e to 0x181 (Nullification if Hamedo) |
− | 0017dbd8: 3402005d ori r2,r0,0x005d | + | ----------------------------------------------------------------------------------------------------------------- |
− | 0017dbdc: 14620004 bne r3,r2,0x0017dbf0 | + | 0017dbc8: 27bdffe8 addiu r29,r29,-0x0018 | |
− | 0017dbe0: 340200ff ori r2,r0,0x00ff | + | 0017dbcc: 00802821 addu r5,r4,r0 |{{f/std|<nowiki>r5 = Acting unit data</nowiki>}} |
− | 0017dbe4: a0a2001d sb r2,0x001d(r5) | + | 0017dbd0: afbf0010 sw r31,0x0010(r29) | |
− | 0017dbe8: 0805f707 j 0x0017dc1c | + | 0017dbd4: 90a30003 lbu r3,0x0003(r5) |{{f/load|<nowiki>r3 = Acting Unit Job ID</nowiki>}} |
− | 0017dbec: a0a2001f sb r2,0x001f(r5) | + | 0017dbd8: 3402005d ori r2,r0,0x005d |{{f/std|<nowiki>r2 = 0x5d (Mime job ID)</nowiki>}} |
− | 0017dbf0: 3c028019 lui r2,0x8019 | + | 0017dbdc: 14620004 bne r3,r2,0x0017dbf0 {{f/Cond|<nowiki>If Acting unit job is Mime</nowiki>}} |
− | 0017dbf4: 8c42f5f0 lw r2,-0x0a10(r2) | + | 0017dbe0: 340200ff ori r2,r0,0x00ff |{{f/std|<nowiki>r2 = 0x0ff</nowiki>}} |
− | 0017dbf8: 00000000 nop | + | 0017dbe4: a0a2001d sb r2,0x001d(r5) |{{f/store|<nowiki>Store Acting unit Right Hand Weapon = 0x0ff</nowiki>}} |
− | 0017dbfc: 14400018 bne r2,r0,0x0017dc60 | + | 0017dbe8: 0805f707 j 0x0017dc1c | |
− | 0017dc00: 00000000 nop | + | 0017dbec: a0a2001f sb r2,0x001f(r5) |{{f/store|<nowiki>Store Acting unit Left Hand Weapon = 0x0ff</nowiki>}} |
− | 0017dc04: 94a20048 lhu r2,0x0048(r5) | + | 0017dbf0: 3c028019 lui r2,0x8019 {{f/Cond|<nowiki>Else (not mime)</nowiki>}} |
− | 0017dc08: 00000000 nop | + | 0017dbf4: 8c42f5f0 lw r2,-0x0a10(r2) |{{f/adr|<nowiki>r2 = Type of Action</nowiki>}} {{f/std|<nowiki> 0x8018f5f0 / 8018f5f0</nowiki>}} |
− | 0017dc0c: 00021202 srl r2,r2,0x08 | + | 0017dbf8: 00000000 nop | |
− | 0017dc10: 3042000f andi r2,r2,0x000f | + | 0017dbfc: 14400018 bne r2,r0,0x0017dc60 {{f/Cond|<nowiki>If Type of action = 0x00 (not reaction)</nowiki>}} {{f/Cond|<nowiki>Branch if AI Calculation Type != 0</nowiki>}} |
− | 0017dc14: 3c018019 lui r1,0x8019 | + | 0017dc00: 00000000 nop |{{f/std|<nowiki> </nowiki>}} |
− | 0017dc18: a022389c sb r2,0x389c(r1) | + | 0017dc04: 94a20048 lhu r2,0x0048(r5) |{{f/load|<nowiki>r2 = Acting Unit Y coord & Elevation/Facing</nowiki>}} |
− | 0017dc1c: 3c028019 lui r2,0x8019 | + | 0017dc08: 00000000 nop | |
− | 0017dc20: 8c42f5f0 lw r2,-0x0a10(r2) | + | 0017dc0c: 00021202 srl r2,r2,0x08 |{{f/std|<nowiki>r2 = Acting unit Elevation/Facing</nowiki>}} |
− | 0017dc24: 00000000 nop | + | 0017dc10: 3042000f andi r2,r2,0x000f |{{f/std|<nowiki>r2 = Acting unit facing data</nowiki>}} |
− | 0017dc28: 1440000d bne r2,r0,0x0017dc60 | + | 0017dc14: 3c018019 lui r1,0x8019 | |
− | 0017dc2c: 00000000 nop | + | 0017dc18: a022389c sb r2,0x389c(r1) |{{f/store|<nowiki>Store Acting Unit Facing at 0x8019389c</nowiki>}} {{f/std|<nowiki> 8019389c</nowiki>}} |
− | 0017dc30: 90a20047 lbu r2,0x0047(r5) | + | 0017dc1c: 3c028019 lui r2,0x8019 >Mimes jump here |
− | 0017dc34: 3c018019 lui r1,0x8019 | + | 0017dc20: 8c42f5f0 lw r2,-0x0a10(r2) |{{f/adr|<nowiki>r2 = Type of Action</nowiki>}} {{f/std|<nowiki> 0x8018f5f0 / 8018f5f0</nowiki>}} |
− | 0017dc38: a0222dcc sb r2,0x2dcc(r1) | + | 0017dc24: 00000000 nop | |
− | 0017dc3c: 94a20048 lhu r2,0x0048(r5) | + | 0017dc28: 1440000d bne r2,r0,0x0017dc60 {{f/Cond|<nowiki>If Type of action = 0x00 (not reaction)</nowiki>}} {{f/Cond|<nowiki>Branch if AI Calculation Type != 0</nowiki>}} {{f/std|<nowiki> double check for mimes ?</nowiki>}} |
− | 0017dc40: 90a30048 lbu r3,0x0048(r5) | + | 0017dc2c: 00000000 nop |{{f/std|<nowiki> </nowiki>}} |
− | 0017dc44: 000213c2 srl r2,r2,0x0f | + | 0017dc30: 90a20047 lbu r2,0x0047(r5) |{{f/load|<nowiki>r2 = Acting unit X ccord</nowiki>}} |
− | 0017dc48: 3c018019 lui r1,0x8019 | + | 0017dc34: 3c018019 lui r1,0x8019 | |
− | 0017dc4c: a0222dd4 sb r2,0x2dd4(r1) | + | 0017dc38: a0222dcc sb r2,0x2dcc(r1) |{{f/store|<nowiki>Store Acting unit X ccord at 0x80192dcc</nowiki>}} {{f/std|<nowiki> 80192dcc</nowiki>}} |
− | 0017dc50: 3c018019 lui r1,0x8019 | + | 0017dc3c: 94a20048 lhu r2,0x0048(r5) |{{f/load|<nowiki>r2 = Acting Unit's Y Coordinate + Elevation / Facing</nowiki>}} |
− | 0017dc54: a0232dd0 sb r3,0x2dd0(r1) | + | 0017dc40: 90a30048 lbu r3,0x0048(r5) |{{f/load|<nowiki>r3 = Acting Unit's Y Coordinate</nowiki>}} |
− | 0017dc58: 0805f71e j 0x0017dc78 | + | 0017dc44: 000213c2 srl r2,r2,0x0f |{{f/std|<nowiki>r2 = Acting Unit's Elevation</nowiki>}} |
− | 0017dc5c: 00000000 nop | + | 0017dc48: 3c018019 lui r1,0x8019 | |
− | 0017dc60: 3c048019 lui r4,0x8019 | + | 0017dc4c: a0222dd4 sb r2,0x2dd4(r1) |{{f/store|<nowiki>Store Acting Unit's Map elevation (0x00 or 0x01) at 0x80192dd4</nowiki>}} {{f/std|<nowiki> 80192dd4</nowiki>}} |
− | 0017dc64: 24843848 addiu r4,r4,0x3848 | + | 0017dc50: 3c018019 lui r1,0x8019 | |
− | 0017dc68: 0c01788b jal 0x0005e22c | + | 0017dc54: a0232dd0 sb r3,0x2dd0(r1) |{{f/store|<nowiki>Store Acting Unit's Y Coordinate at 0x80192dd0</nowiki>}} {{f/std|<nowiki> 80192dd0</nowiki>}} |
− | 0017dc6c: 24a5016e addiu r5,r5,0x016e | + | 0017dc58: 0805f71e j 0x0017dc78 {{f/jump|<nowiki>jump to END</nowiki>}} |
− | 0017dc70: 3c018019 lui r1,0x8019 | + | 0017dc5c: 00000000 nop | |
− | 0017dc74: ac20f5f0 sw r0,-0x0a10(r1) | + | 0017dc60: 3c048019 lui r4,0x8019 {{f/Cond|<nowiki>Else (0x8018f5f0 <> 0x00 - Reaction)</nowiki>}} |
− | 0017dc78: 8fbf0010 lw r31,0x0010(r29) | + | 0017dc64: 24843848 addiu r4,r4,0x3848 |{{f/std|<nowiki>r4 = 0x80193848 (0x16e-0x182 from unit data) Pointer</nowiki>}} {{f/std|<nowiki>Only 0x00s while Hamedo (checked in debuger)</nowiki>}} |
− | 0017dc7c: 27bd0018 addiu r29,r29,0x0018 | + | 0017dc68: 0c01788b jal 0x0005e22c |{{f/jal|Copy_Byte_Data_(20_Bytes)|<nowiki>Copy_Byte_Data_(20_Bytes)</nowiki>}} {{f/std|<nowiki>Store 0x80193848 data on Acting unit 0x16e (20 bytes) (Hamedo = nullification of data Others ?)</nowiki>}} |
− | 0017dc80: 03e00008 jr r31 | + | 0017dc6c: 24a5016e addiu r5,r5,0x016e |{{f/std|<nowiki>r5 = Unit's Attacker/Self ID? Pointer</nowiki>}} |
− | 0017dc84: 00000000 nop | + | 0017dc70: 3c018019 lui r1,0x8019 | |
+ | 0017dc74: ac20f5f0 sw r0,-0x0a10(r1) |{{f/store|<nowiki>Store 0x00 to 0x8018f5f0 (type of action)</nowiki>}} | ||
+ | 0017dc78: 8fbf0010 lw r31,0x0010(r29) | | ||
+ | 0017dc7c: 27bd0018 addiu r29,r29,0x0018 | ||
+ | 0017dc80: 03e00008 jr r31 END | ||
+ | 0017dc84: 00000000 nop | ||
+ | === Return location === | ||
+ | '''Battle.bin''' | ||
+ | 00077938: [[000777ec_-_0007799c]] | ||
+ | 0017ca3c: [[Prep_Current_Action_Data]] If Hamedo triggered ( 0x801938bc <> 0x00 ) | ||
+ | 0017ca60: [[Prep_Current_Action_Data]] | ||
+ | 0019e0d8: [[AI_ability_processing]] |
Latest revision as of 06:43, 23 February 2022
Parameters : r4 = Acting Unit data pointer If Type of action is not a reaction : Store r4 unit X,Y,elevation and facing (and set mime's weapons to 0xff) If Reaction : Store 0x80193848 data (20 bytes) on r4 unit 0x16e to 0x181 (Nullification if Hamedo) ----------------------------------------------------------------------------------------------------------------- 0017dbc8: 27bdffe8 addiu r29,r29,-0x0018 | 0017dbcc: 00802821 addu r5,r4,r0 |r5 = Acting unit data 0017dbd0: afbf0010 sw r31,0x0010(r29) | 0017dbd4: 90a30003 lbu r3,0x0003(r5) |r3 = Acting Unit Job ID 0017dbd8: 3402005d ori r2,r0,0x005d |r2 = 0x5d (Mime job ID) 0017dbdc: 14620004 bne r3,r2,0x0017dbf0 #If Acting unit job is Mime 0017dbe0: 340200ff ori r2,r0,0x00ff |r2 = 0x0ff 0017dbe4: a0a2001d sb r2,0x001d(r5) |Store Acting unit Right Hand Weapon = 0x0ff 0017dbe8: 0805f707 j 0x0017dc1c | 0017dbec: a0a2001f sb r2,0x001f(r5) |Store Acting unit Left Hand Weapon = 0x0ff 0017dbf0: 3c028019 lui r2,0x8019 #Else (not mime) 0017dbf4: 8c42f5f0 lw r2,-0x0a10(r2) |r2 = Type of Action 0x8018f5f0 / 8018f5f0 0017dbf8: 00000000 nop | 0017dbfc: 14400018 bne r2,r0,0x0017dc60 #If Type of action = 0x00 (not reaction) #Branch if AI Calculation Type != 0 0017dc00: 00000000 nop | 0017dc04: 94a20048 lhu r2,0x0048(r5) |r2 = Acting Unit Y coord & Elevation/Facing 0017dc08: 00000000 nop | 0017dc0c: 00021202 srl r2,r2,0x08 |r2 = Acting unit Elevation/Facing 0017dc10: 3042000f andi r2,r2,0x000f |r2 = Acting unit facing data 0017dc14: 3c018019 lui r1,0x8019 | 0017dc18: a022389c sb r2,0x389c(r1) |Store Acting Unit Facing at 0x8019389c 8019389c 0017dc1c: 3c028019 lui r2,0x8019 >Mimes jump here 0017dc20: 8c42f5f0 lw r2,-0x0a10(r2) |r2 = Type of Action 0x8018f5f0 / 8018f5f0 0017dc24: 00000000 nop | 0017dc28: 1440000d bne r2,r0,0x0017dc60 #If Type of action = 0x00 (not reaction) #Branch if AI Calculation Type != 0 double check for mimes ? 0017dc2c: 00000000 nop | 0017dc30: 90a20047 lbu r2,0x0047(r5) |r2 = Acting unit X ccord 0017dc34: 3c018019 lui r1,0x8019 | 0017dc38: a0222dcc sb r2,0x2dcc(r1) |Store Acting unit X ccord at 0x80192dcc 80192dcc 0017dc3c: 94a20048 lhu r2,0x0048(r5) |r2 = Acting Unit's Y Coordinate + Elevation / Facing 0017dc40: 90a30048 lbu r3,0x0048(r5) |r3 = Acting Unit's Y Coordinate 0017dc44: 000213c2 srl r2,r2,0x0f |r2 = Acting Unit's Elevation 0017dc48: 3c018019 lui r1,0x8019 | 0017dc4c: a0222dd4 sb r2,0x2dd4(r1) |Store Acting Unit's Map elevation (0x00 or 0x01) at 0x80192dd4 80192dd4 0017dc50: 3c018019 lui r1,0x8019 | 0017dc54: a0232dd0 sb r3,0x2dd0(r1) |Store Acting Unit's Y Coordinate at 0x80192dd0 80192dd0 0017dc58: 0805f71e j 0x0017dc78 >>jump to END 0017dc5c: 00000000 nop | 0017dc60: 3c048019 lui r4,0x8019 #Else (0x8018f5f0 <> 0x00 - Reaction) 0017dc64: 24843848 addiu r4,r4,0x3848 |r4 = 0x80193848 (0x16e-0x182 from unit data) Pointer Only 0x00s while Hamedo (checked in debuger) 0017dc68: 0c01788b jal 0x0005e22c |-->Copy_Byte_Data_(20_Bytes) Store 0x80193848 data on Acting unit 0x16e (20 bytes) (Hamedo = nullification of data Others ?) 0017dc6c: 24a5016e addiu r5,r5,0x016e |r5 = Unit's Attacker/Self ID? Pointer 0017dc70: 3c018019 lui r1,0x8019 | 0017dc74: ac20f5f0 sw r0,-0x0a10(r1) |Store 0x00 to 0x8018f5f0 (type of action) 0017dc78: 8fbf0010 lw r31,0x0010(r29) | 0017dc7c: 27bd0018 addiu r29,r29,0x0018 0017dc80: 03e00008 jr r31 END 0017dc84: 00000000 nop
Return location
Battle.bin 00077938: 000777ec_-_0007799c 0017ca3c: Prep_Current_Action_Data If Hamedo triggered ( 0x801938bc <> 0x00 ) 0017ca60: Prep_Current_Action_Data 0019e0d8: AI_ability_processing