@@ -4921,246 +4921,3 @@ sub_02058C30: ; 0x02058C30
49214921 . align 2 , 0
49224922_02058C38: .word CopyTacticString
49234923 arm_func_end sub_02058C30
4924-
4925- arm_func_start DoesTacticFollowLeader
4926- DoesTacticFollowLeader: ; 0x02058C3C
4927- ldr r1 , _02058C48 ; =_020A190C
4928- ldrb r0 , [ r1 , r0 ]
4929- bx lr
4930- . align 2 , 0
4931- _02058C48: .word _020A190C
4932- arm_func_end DoesTacticFollowLeader
4933-
4934- arm_func_start GetUnlockedTactics
4935- GetUnlockedTactics: ; 0x02058C4C
4936- stmdb sp ! , {r3 , lr}
4937- mov lr , # 0
4938- ldr r3 , _02058C98 ; =TACTICS_UNLOCK_LEVEL_TABLE
4939- mov ip , lr
4940- _02058C5C:
4941- mov r2 , ip , lsl # 1
4942- ldrsh r2 , [ r3 , r2 ]
4943- cmp r2 , r1
4944- strleb ip , [ r0 , lr ]
4945- add ip , ip , # 1
4946- addle lr , lr , # 1
4947- cmp ip , # 0xc
4948- blt _02058C5C
4949- mov r1 , # 0xb
4950- b _02058C8C
4951- _02058C84:
4952- strb r1 , [ r0 , lr ]
4953- add lr , lr , # 1
4954- _02058C8C:
4955- cmp lr , # 0xc
4956- blt _02058C84
4957- ldmia sp ! , {r3 , pc}
4958- . align 2 , 0
4959- _02058C98: .word TACTICS_UNLOCK_LEVEL_TABLE
4960- arm_func_end GetUnlockedTactics
4961-
4962- arm_func_start GetUnlockedTacticFlags
4963- GetUnlockedTacticFlags: ; 0x02058C9C
4964- stmdb sp ! , {r4 , lr}
4965- mov r4 , # 0
4966- ldr lr , _02058CD4 ; =TACTICS_UNLOCK_LEVEL_TABLE
4967- mov r2 , r4
4968- mov r3 , # 1
4969- _02058CB0:
4970- mov ip , r4 , lsl # 1
4971- ldrsh ip , [ lr , ip ]
4972- cmp ip , r1
4973- strleb r3 , [ r0 , r4 ]
4974- strgtb r2 , [ r0 , r4 ]
4975- add r4 , r4 , # 1
4976- cmp r4 , # 0xc
4977- blt _02058CB0
4978- ldmia sp ! , {r4 , pc}
4979- . align 2 , 0
4980- _02058CD4: .word TACTICS_UNLOCK_LEVEL_TABLE
4981- arm_func_end GetUnlockedTacticFlags
4982-
4983- arm_func_start CanLearnIqSkill
4984- CanLearnIqSkill: ; 0x02058CD8
4985- cmp r1 , # 0
4986- moveq r0 , # 0
4987- bxeq lr
4988- ldr r2 , _02058D00 ; =IQ_SKILLS
4989- ldr r1 , [ r2 , r1 , lsl # 2 ]
4990- cmp r1 , r0
4991- movle r0 , # 1
4992- movgt r0 , # 0
4993- and r0 , r0 , # 0xff
4994- bx lr
4995- . align 2 , 0
4996- _02058D00: .word IQ_SKILLS
4997- arm_func_end CanLearnIqSkill
4998-
4999- arm_func_start GetLearnableIqSkills
5000- GetLearnableIqSkills: ; 0x02058D04
5001- stmdb sp ! , {r3 , r4 , r5 , r6 , r7 , r8 , sb , sl , fp , lr}
5002- mov r6 , # 0
5003- mov sl , r0
5004- mov sb , r1
5005- mov r8 , r2
5006- mov r5 , r6
5007- ldr r4 , _02058DA0 ; =IQ_GROUP_SKILLS
5008- mov fp , # 0x19
5009- b _02058D74
5010- _02058D28:
5011- mov r0 , sb
5012- bl GetIqGroup
5013- mla r1 , r0 , fp , r4
5014- and r0 , r5 , # 0xff
5015- ldrb r7 , [ r0 , r1 ]
5016- cmp r7 , # 0xff
5017- beq _02058D7C
5018- cmp r7 , # 0x18
5019- bne _02058D58
5020- mov r0 , # 3
5021- bl GetPerformanceFlagWithChecks
5022- b _02058D64
5023- _02058D58:
5024- mov r0 , r8
5025- mov r1 , r7
5026- bl CanLearnIqSkill
5027- _02058D64:
5028- cmp r0 , # 0
5029- strneb r7 , [ sl , r6 ]
5030- addne r6 , r6 , # 1
5031- add r5 , r5 , # 1
5032- _02058D74:
5033- cmp r5 , # 0x19
5034- blt _02058D28
5035- _02058D7C:
5036- mov r1 , r6
5037- mov r0 , # 0
5038- b _02058D90
5039- _02058D88:
5040- strb r0 , [ sl , r1 ]
5041- add r1 , r1 , # 1
5042- _02058D90:
5043- cmp r1 , # 0x45
5044- blt _02058D88
5045- mov r0 , r6
5046- ldmia sp ! , {r3 , r4 , r5 , r6 , r7 , r8 , sb , sl , fp , pc}
5047- . align 2 , 0
5048- _02058DA0: .word IQ_GROUP_SKILLS
5049- arm_func_end GetLearnableIqSkills
5050-
5051- arm_func_start DisableIqSkill
5052- DisableIqSkill: ; 0x02058DA4
5053- stmdb sp ! , {r3 , r4 , r5 , lr}
5054- mov r4 , r0
5055- mov r5 , r1
5056- bl IqSkillFlagTest
5057- cmp r0 , # 0
5058- beq _02058DE4
5059- mov r0 , r5 , asr # 4
5060- add r0 , r5 , r0 , lsr # 27
5061- mov r2 , r0 , asr # 5
5062- sub r0 , r5 , r2 , lsl # 5
5063- mov r1 , # 1
5064- mvn r0 , r1 , lsl r0
5065- ldr r1 , [ r4 , r2 , lsl # 2 ]
5066- and r0 , r1 , r0
5067- str r0 , [ r4 , r2 , lsl # 2 ]
5068- ldmia sp ! , {r3 , r4 , r5 , pc}
5069- _02058DE4:
5070- mov r0 , r4
5071- mov r1 , r5
5072- bl EnableIqSkill
5073- ldmia sp ! , {r3 , r4 , r5 , pc}
5074- arm_func_end DisableIqSkill
5075-
5076- arm_func_start EnableIqSkill
5077- EnableIqSkill: ; 0x02058DF4
5078- stmdb sp ! , {r4 , r5 , r6 , lr}
5079- ldr r2 , _02058E64 ; =IQ_SKILL_RESTRICTIONS
5080- mov r3 , r1 , lsl # 1
5081- ldrsh ip , [ r2 , r3 ]
5082- mov r3 , # 0
5083- mov r4 , # 1
5084- _02058E0C:
5085- mov r5 , r3 , lsl # 1
5086- ldrsh r5 , [ r2 , r5 ]
5087- cmp ip , r5
5088- bne _02058E3C
5089- mov lr , r3 , asr # 4
5090- add lr , r3 , lr , lsr # 27
5091- mov r6 , lr , asr # 5
5092- sub lr , r3 , r6 , lsl # 5
5093- mvn lr , r4 , lsl lr
5094- ldr r5 , [ r0 , r6 , lsl # 2 ]
5095- and r5 , r5 , lr
5096- str r5 , [ r0 , r6 , lsl # 2 ]
5097- _02058E3C:
5098- add r3 , r3 , # 1
5099- cmp r3 , # 0x45
5100- blt _02058E0C
5101- mov ip , r1 , lsr # 5
5102- ldr r3 , [ r0 , ip , lsl # 2 ]
5103- sub r1 , r1 , ip , lsl # 5
5104- mov r2 , # 1
5105- orr r1 , r3 , r2 , lsl r1
5106- str r1 , [ r0 , ip , lsl # 2 ]
5107- ldmia sp ! , {r4 , r5 , r6 , pc}
5108- . align 2 , 0
5109- _02058E64: .word IQ_SKILL_RESTRICTIONS
5110- arm_func_end EnableIqSkill
5111-
5112- arm_func_start GetSpeciesIqSkill
5113- GetSpeciesIqSkill: ; 0x02058E68
5114- stmdb sp ! , {r4 , lr}
5115- mov r4 , r1
5116- bl GetIqGroup
5117- ldr r2 , _02058E88 ; =IQ_GROUP_SKILLS
5118- mov r1 , # 0x19
5119- mla r1 , r0 , r1 , r2
5120- ldrb r0 , [ r4 , r1 ]
5121- ldmia sp ! , {r4 , pc}
5122- . align 2 , 0
5123- _02058E88: .word IQ_GROUP_SKILLS
5124- arm_func_end GetSpeciesIqSkill
5125-
5126- arm_func_start DisableAllIqSkills
5127- DisableAllIqSkills: ; 0x02058E8C
5128- mov r3 , # 0
5129- mov r2 , r3
5130- _02058E94:
5131- add r1 , r3 , # 1
5132- mov r1 , r1 , lsl # 0x10
5133- str r2 , [ r0 , r3 , lsl # 2 ]
5134- mov r3 , r1 , asr # 0x10
5135- cmp r3 , # 3
5136- blt _02058E94
5137- bx lr
5138- arm_func_end DisableAllIqSkills
5139-
5140- arm_func_start EnableAllLearnableIqSkills
5141- EnableAllLearnableIqSkills: ; 0x02058EB0
5142- stmdb sp ! , {r4 , r5 , r6 , lr}
5143- sub sp , sp , # 0x48
5144- mov r6 , r0
5145- add r0 , sp , # 0
5146- bl GetLearnableIqSkills
5147- mov r0 , r6
5148- bl DisableAllIqSkills
5149- mov r5 , # 0
5150- add r4 , sp , # 0
5151- b _02058EF4
5152- _02058ED8:
5153- ldrb r0 , [ r4 , r5 ]
5154- cmp r0 , # 0
5155- beq _02058EFC
5156- ldrb r1 , [ r4 , r5 ]
5157- mov r0 , r6
5158- bl EnableIqSkill
5159- add r5 , r5 , # 1
5160- _02058EF4:
5161- cmp r5 , # 0x45
5162- blt _02058ED8
5163- _02058EFC:
5164- add sp , sp , # 0x48
5165- ldmia sp ! , {r4 , r5 , r6 , pc}
5166- arm_func_end EnableAllLearnableIqSkills
0 commit comments