Difference between revisions of "Store Ability Targets"
Jump to navigation
Jump to search
(Created page with "<font face='Courier New'> 0018edf8: 00001821 addu r3,r0,r0 0018edfc: 90820000 lbu r2,0x0000(r4) r4 = stack 0018ee00: 3c018019 lui r1,0x8019 0018ee04: 00230821 addu r1,r...") |
m (Orkney moved page Store ability data to Store Ability Targets) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | '''Parameters''' : r4 = pointer to Targeted unit list | |
− | 0018edf8: 00001821 addu r3,r0,r0 | + | Store the 0x10 first units on the targeted list at Current action hitted targets 0x80193868 to 0x80193877 |
− | 0018edfc: 90820000 lbu r2,0x0000(r4) | + | (That' odd because when the list is set, 0x14 units could be stored in it... see [[List_and_Sort_Targeted_Units]] |
− | 0018ee00: 3c018019 lui r1,0x8019 | + | ---------------------------------------------------------------------------------------------------------------------- |
− | 0018ee04: 00230821 addu r1,r1,r3 | + | |
− | 0018ee08: a0223868 sb r2,0x3868(r1) | + | 0018edf8: 00001821 addu r3,r0,r0 |{{f/std|<nowiki>r3 = 0x00</nowiki>}} |
− | 0018ee0c: 24630001 addiu r3,r3,0x0001 | + | 0018edfc: 90820000 lbu r2,0x0000(r4) {{f/bloop|<nowiki>LOOP</nowiki>}} {{f/load|<nowiki>r2 = This iteration targeted unit ID</nowiki>}} |
− | 0018ee10: 28620010 slti r2,r3,0x0010 | + | 0018ee00: 3c018019 lui r1,0x8019 | |
− | 0018ee14: 1440fff9 bne r2,r0,0x0018edfc | + | 0018ee04: 00230821 addu r1,r1,r3 |{{f/std|<nowiki>r1 = 0x80190000 + Unit offset</nowiki>}} |
− | 0018ee18: 24840001 addiu r4,r4,0x0001 | + | 0018ee08: a0223868 sb r2,0x3868(r1) |{{f/store|<nowiki>Store unit ID at 0x80193868</nowiki>}} {{f/std|<nowiki> 80193868</nowiki>}} |
− | 0018ee1c: 03e00008 jr r31 | + | 0018ee0c: 24630001 addiu r3,r3,0x0001 |{{f/std|<nowiki>r3 = loop counter + 1</nowiki>}} |
+ | 0018ee10: 28620010 slti r2,r3,0x0010 |{{f/std|<nowiki>r2 = 0x01 while counter < 0x10</nowiki>}} | ||
+ | 0018ee14: 1440fff9 bne r2,r0,0x0018edfc {{f/eloop|<nowiki>Loop while counter < 0x10</nowiki>}} {{f/std|<nowiki>?? Why not 0x14 (list limit)</nowiki>}} | ||
+ | 0018ee18: 24840001 addiu r4,r4,0x0001 |{{f/std|<nowiki>r4 = Targeted list offset counter (+1 each iteration)</nowiki>}} | ||
+ | 0018ee1c: 03e00008 jr r31 | ||
0018ee20: 00000000 nop | 0018ee20: 00000000 nop | ||
− | + | === Return location === | |
+ | '''Battle.bin''' | ||
+ | 0017d09c: [[Main_ability_loading_routine%3F]] |
Latest revision as of 21:09, 15 February 2022
Parameters : r4 = pointer to Targeted unit list Store the 0x10 first units on the targeted list at Current action hitted targets 0x80193868 to 0x80193877 (That' odd because when the list is set, 0x14 units could be stored in it... see List_and_Sort_Targeted_Units ---------------------------------------------------------------------------------------------------------------------- 0018edf8: 00001821 addu r3,r0,r0 |r3 = 0x00 0018edfc: 90820000 lbu r2,0x0000(r4) @LOOP r2 = This iteration targeted unit ID 0018ee00: 3c018019 lui r1,0x8019 | 0018ee04: 00230821 addu r1,r1,r3 |r1 = 0x80190000 + Unit offset 0018ee08: a0223868 sb r2,0x3868(r1) |Store unit ID at 0x80193868 80193868 0018ee0c: 24630001 addiu r3,r3,0x0001 |r3 = loop counter + 1 0018ee10: 28620010 slti r2,r3,0x0010 |r2 = 0x01 while counter < 0x10 0018ee14: 1440fff9 bne r2,r0,0x0018edfc Λ Loop while counter < 0x10 ?? Why not 0x14 (list limit) 0018ee18: 24840001 addiu r4,r4,0x0001 |r4 = Targeted list offset counter (+1 each iteration) 0018ee1c: 03e00008 jr r31 0018ee20: 00000000 nop
Return location
Battle.bin 0017d09c: Main_ability_loading_routine?