Difference between revisions of "Get Known Abilities"
Jump to navigation
Jump to search
m |
|||
Line 1: | Line 1: | ||
− | Get Known Abilities | + | '''SCUS_942.21''' - Get Known Abilities |
− | 0005e200: 00051040 sll r2,r5,0x01 | + | --------------------------------------------------------------------------------------- |
− | 0005e204: 00451021 addu r2,r2,r5 | + | Parameter : r4 = POinter to Unit Battle stats |
− | 0005e208: 00822021 addu r4,r4,r2 | + | r5 = Skillset ID-5 : used as generic job offset in unit data (Hardcoded shit) |
− | 0005e20c: 90820099 lbu r2,0x0099(r4) | + | Returns : r2 holding known abilities flags |
− | 0005e210: 9083009a lbu r3,0x009a(r4) | + | --------------------------------------------------------------------------------------- |
− | 0005e214: 9084009b lbu r4,0x009b(r4) | + | 0005e200: 00051040 sll r2,r5,0x01 |{{f/std|(Skillset ID-5)*2}} |
− | 0005e218: 00021400 sll r2,r2,0x10 | + | 0005e204: 00451021 addu r2,r2,r5 |{{f/std|ID * 3}} {{f/std|Hardcoded way to set generic job offset based on skillset ID}} |
− | 0005e21c: 00031a00 sll r3,r3,0x08 | + | 0005e208: 00822021 addu r4,r4,r2 |{{f/adr|Unit data pointer }} |
− | 0005e220: 00431021 addu r2,r2,r3 | + | 0005e20c: 90820099 lbu r2,0x0099(r4) |{{f/load|Load Known Abilities 1-8 (AA)}} |
− | 0005e224: 03e00008 jr r31 | + | 0005e210: 9083009a lbu r3,0x009a(r4) |{{f/load|Load Known Abilities 9-16 (BB)}} |
− | 0005e228: 00441025 or r2,r2,r4 | + | 0005e214: 9084009b lbu r4,0x009b(r4) |{{f/load|Load Known R/S/M 1-6 (SS)}} |
− | + | 0005e218: 00021400 sll r2,r2,0x10 |{{f/std|0x00AA0000}} | |
− | + | 0005e21c: 00031a00 sll r3,r3,0x08 |{{f/std|0x0000BB00}} | |
− | + | 0005e220: 00431021 addu r2,r2,r3 |{{f/std|0x00AABB00}} | |
− | == Return | + | 0005e224: 03e00008 jr r31 | |
− | + | 0005e228: 00441025 or r2,r2,r4 |{{f/std|returns know abilities flags as 0x00AABBSS}} | |
− | + | ===Return location=== | |
+ | '''Battle.bin''' | ||
+ | 0018195c: [[Load_ability_data_for_skillset]] |
Latest revision as of 18:14, 3 August 2023
SCUS_942.21 - Get Known Abilities --------------------------------------------------------------------------------------- Parameter : r4 = POinter to Unit Battle stats r5 = Skillset ID-5 : used as generic job offset in unit data (Hardcoded shit) Returns : r2 holding known abilities flags --------------------------------------------------------------------------------------- 0005e200: 00051040 sll r2,r5,0x01 |(Skillset ID-5)*2 0005e204: 00451021 addu r2,r2,r5 |ID * 3 Hardcoded way to set generic job offset based on skillset ID 0005e208: 00822021 addu r4,r4,r2 |Unit data pointer 0005e20c: 90820099 lbu r2,0x0099(r4) |Load Known Abilities 1-8 (AA) 0005e210: 9083009a lbu r3,0x009a(r4) |Load Known Abilities 9-16 (BB) 0005e214: 9084009b lbu r4,0x009b(r4) |Load Known R/S/M 1-6 (SS) 0005e218: 00021400 sll r2,r2,0x10 |0x00AA0000 0005e21c: 00031a00 sll r3,r3,0x08 |0x0000BB00 0005e220: 00431021 addu r2,r2,r3 |0x00AABB00 0005e224: 03e00008 jr r31 | 0005e228: 00441025 or r2,r2,r4 |returns know abilities flags as 0x00AABBSS
Return location
Battle.bin 0018195c: Load_ability_data_for_skillset