Difference between revisions of "Transfer Last Ability Used CT"
Jump to navigation
Jump to search
m |
|||
Line 1: | Line 1: | ||
− | + | Parameters : r4 = Acting unit data pointer | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | SCUS_942.21 | + | Transfer Last Ability Used (Acting unit 0x170) CT (Ability data2 0x0c) in Attacker 0x18b (Ability CT) |
− | + | ----------------------------------------------------------------------------------------------------- | |
− | + | 0005e778: 84830170 lh r3,0x0170(r4) |{{f/load|<nowiki>r3 = Acting Unit's Last Attack Used ID</nowiki>}} | |
− | + | 0005e77c: 00000000 nop | | |
− | + | 0005e780: 000310c0 sll r2,r3,0x03 |{{f/std|<nowiki>r2 = Last Attack Used ID *8</nowiki>}} | |
+ | 0005e784: 00431023 subu r2,r2,r3 |{{f/std|<nowiki>r2 = Last Attack Used ID *7</nowiki>}} | ||
+ | 0005e788: 00021040 sll r2,r2,0x01 |{{f/std|<nowiki>r2 = Last Attack Used ID *14 (= Ability offset in ability data 2)</nowiki>}} | ||
+ | 0005e78c: 3c018006 lui r1,0x8006 | | ||
+ | 0005e790: 00220821 addu r1,r1,r2 | | ||
+ | 0005e794: 9022fbfc lbu r2,-0x0404(r1) |{{f/load|<nowiki>r2 = Acting unit's last used Ability's CT</nowiki>}} {{f/std|<nowiki>8005fbf0 + 0x0c</nowiki>}} | ||
+ | 0005e798: 00000000 nop | | ||
+ | 0005e79c: 3042007f andi r2,r2,0x007f |{{f/std|<nowiki>r2 = last used ability CT (limited to 128)</nowiki>}} | ||
+ | 0005e7a0: 03e00008 jr r31 | | ||
+ | 0005e7a4: a082018b sb r2,0x018b(r4) |{{f/store|<nowiki>Store Acting unit's last used Ability's CT in Unit's ability CT (Unit data 0x18b)</nowiki>}} | ||
+ | === Return Locations === | ||
+ | '''SCUS_942.21''' | ||
+ | 0005e840: [[Status_infliction/removal%3F]] | ||
+ | |||
+ | '''Battle.bin''' | ||
+ | 00182c54: [[In_between_turn_control_routine]] | ||
+ | 001838a4: [[CT_increment_routine%3F]] |
Revision as of 20:23, 23 February 2022
Parameters : r4 = Acting unit data pointer Transfer Last Ability Used (Acting unit 0x170) CT (Ability data2 0x0c) in Attacker 0x18b (Ability CT) ----------------------------------------------------------------------------------------------------- 0005e778: 84830170 lh r3,0x0170(r4) |r3 = Acting Unit's Last Attack Used ID 0005e77c: 00000000 nop | 0005e780: 000310c0 sll r2,r3,0x03 |r2 = Last Attack Used ID *8 0005e784: 00431023 subu r2,r2,r3 |r2 = Last Attack Used ID *7 0005e788: 00021040 sll r2,r2,0x01 |r2 = Last Attack Used ID *14 (= Ability offset in ability data 2) 0005e78c: 3c018006 lui r1,0x8006 | 0005e790: 00220821 addu r1,r1,r2 | 0005e794: 9022fbfc lbu r2,-0x0404(r1) |r2 = Acting unit's last used Ability's CT 8005fbf0 + 0x0c 0005e798: 00000000 nop | 0005e79c: 3042007f andi r2,r2,0x007f |r2 = last used ability CT (limited to 128) 0005e7a0: 03e00008 jr r31 | 0005e7a4: a082018b sb r2,0x018b(r4) |Store Acting unit's last used Ability's CT in Unit's ability CT (Unit data 0x18b)
Return Locations
SCUS_942.21 0005e840: Status_infliction/removal? Battle.bin 00182c54: In_between_turn_control_routine 001838a4: CT_increment_routine?