mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-21 19:54:14 +01:00
Merge with master
This commit is contained in:
commit
1e6b26c549
@ -153,19 +153,19 @@
|
||||
.byte \param4
|
||||
.endm
|
||||
|
||||
.macro loopsewithpan se:req, param1:req, param2:req, param3:req
|
||||
.macro loopsewithpan se:req, pan:req, wait:req, times:req
|
||||
.byte 0x1c
|
||||
.2byte \se
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \param3
|
||||
.byte \pan
|
||||
.byte \wait
|
||||
.byte \times
|
||||
.endm
|
||||
|
||||
.macro waitplaysewithpan se:req, param1:req, param2:req
|
||||
.macro waitplaysewithpan se:req, pan:req, wait:req
|
||||
.byte 0x1d
|
||||
.2byte \se
|
||||
.byte \param1
|
||||
.byte \param2
|
||||
.byte \pan
|
||||
.byte \wait
|
||||
.endm
|
||||
|
||||
.macro setbldcnt param0:req
|
||||
|
3
common_syms/faraway_island.txt
Executable file
3
common_syms/faraway_island.txt
Executable file
@ -0,0 +1,3 @@
|
||||
sPlayerToMewDeltaX
|
||||
sPlayerToMewDeltaY
|
||||
sMewDirectionCandidates
|
@ -1515,7 +1515,7 @@ Move_VINE_WHIP:
|
||||
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 6
|
||||
delay 6
|
||||
playsewithpan SE_W010, SOUND_PAN_TARGET
|
||||
createsprite gUnknown_085928E8, ANIM_TARGET, 2, 0, 0
|
||||
createsprite gVineWhipSpriteTemplate, ANIM_TARGET, 2, 0, 0
|
||||
delay 6
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 6, 1
|
||||
end
|
||||
@ -1656,12 +1656,12 @@ Explosion1:
|
||||
Move_DEFENSE_CURL:
|
||||
loadspritegfx ANIM_TAG_ECLIPSING_ORB
|
||||
loopsewithpan SE_W161, SOUND_PAN_ATTACKER, 18, 3
|
||||
createvisualtask sub_811489C, 5, 0, 0
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_ATTACKER, 0
|
||||
createvisualtask sub_815B338, 5
|
||||
waitforvisualfinish
|
||||
createsprite gUnknown_085CE338, ANIM_ATTACKER, 2, 0, 6, 0, 1
|
||||
waitforvisualfinish
|
||||
createvisualtask sub_811489C, 5, 0, 1
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_ATTACKER, 1
|
||||
waitforvisualfinish
|
||||
end
|
||||
|
||||
@ -2003,7 +2003,7 @@ Move_ATTRACT:
|
||||
createsprite gBattleAnimSpriteTemplate_85939B8, ANIM_TARGET, 3, -384, -31
|
||||
waitforvisualfinish
|
||||
waitplaysewithpan SE_W213B, 0, 15
|
||||
createvisualtask sub_81062E8, 5
|
||||
createvisualtask AnimTask_HeartsBackground, 5
|
||||
createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 16, 256, 0
|
||||
createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 224, 240, 15
|
||||
createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 126, 272, 30
|
||||
@ -2012,7 +2012,7 @@ Move_ATTRACT:
|
||||
createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 40, 256, 75
|
||||
createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 112, 256, 90
|
||||
createsprite gUnknown_085939D0, ANIM_ATTACKER, 40, 200, 272, 90
|
||||
delay 0x4B
|
||||
delay 75
|
||||
createvisualtask sub_8115A04, 2, 4, 4, 4, 0, 10, RGB(31, 25, 27)
|
||||
end
|
||||
|
||||
@ -3220,13 +3220,13 @@ EndureEffect:
|
||||
Move_CHARM:
|
||||
loadspritegfx ANIM_TAG_MAGENTA_HEART
|
||||
createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATTACKER, 2, 0
|
||||
createsprite gUnknown_08593970, ANIM_ATTACKER, 3, 0, 20
|
||||
createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, 0, 20
|
||||
playsewithpan SE_W204, SOUND_PAN_ATTACKER
|
||||
delay 15
|
||||
createsprite gUnknown_08593970, ANIM_ATTACKER, 3, -20, 20
|
||||
createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, -20, 20
|
||||
playsewithpan SE_W204, SOUND_PAN_ATTACKER
|
||||
delay 15
|
||||
createsprite gUnknown_08593970, ANIM_ATTACKER, 3, 20, 20
|
||||
createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, 20, 20
|
||||
playsewithpan SE_W204, SOUND_PAN_ATTACKER
|
||||
waitforvisualfinish
|
||||
end
|
||||
@ -4358,7 +4358,7 @@ Move_AERIAL_ACE:
|
||||
|
||||
Move_IRON_DEFENSE:
|
||||
loopsewithpan SE_REAPOKE, SOUND_PAN_ATTACKER, 28, 2
|
||||
createvisualtask sub_81144F8, 5, 0, 0, 0
|
||||
createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0
|
||||
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 8, 2, RGB_WHITEALPHA, 14, -1, 0
|
||||
waitforvisualfinish
|
||||
end
|
||||
@ -4393,13 +4393,13 @@ Move_COVET:
|
||||
loadspritegfx ANIM_TAG_MAGENTA_HEART
|
||||
loadspritegfx ANIM_TAG_ITEM_BAG
|
||||
createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATTACKER, 2, 0
|
||||
createsprite gUnknown_08593970, ANIM_ATTACKER, 3, 0, 20
|
||||
createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, 0, 20
|
||||
playsewithpan SE_W204, SOUND_PAN_ATTACKER
|
||||
delay 15
|
||||
createsprite gUnknown_08593970, ANIM_ATTACKER, 3, -20, 20
|
||||
createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, -20, 20
|
||||
playsewithpan SE_W204, SOUND_PAN_ATTACKER
|
||||
delay 15
|
||||
createsprite gUnknown_08593970, ANIM_ATTACKER, 3, 20, 20
|
||||
createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, 20, 20
|
||||
playsewithpan SE_W204, SOUND_PAN_ATTACKER
|
||||
waitforvisualfinish
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 2, 0, 8, 1
|
||||
@ -4570,7 +4570,7 @@ Move_SHOCK_WAVE:
|
||||
|
||||
Move_HARDEN:
|
||||
loopsewithpan SE_W231, SOUND_PAN_ATTACKER, 28, 2
|
||||
createvisualtask sub_81144F8, 5, 0, 0, 0
|
||||
createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0
|
||||
waitforvisualfinish
|
||||
end
|
||||
|
||||
@ -5347,7 +5347,7 @@ Move_ICE_BEAM:
|
||||
loadspritegfx ANIM_TAG_ICE_CRYSTALS
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 7, RGB_BLACK
|
||||
waitforvisualfinish
|
||||
createsoundtask sub_8158C58, 183, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 4, 4, 0, 10
|
||||
createsoundtask sub_8158C58, SE_W062B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 4, 4, 0, 10
|
||||
createsprite gUnknown_08595B2C, ANIM_ATTACKER, 2, 20, 12, 0, 12, 20
|
||||
createsprite gUnknown_08595B2C, ANIM_ATTACKER, 2, 20, -12, 0, -12, 20
|
||||
delay 1
|
||||
@ -5403,7 +5403,7 @@ Move_AURORA_BEAM:
|
||||
call AuroraBeam1
|
||||
call AuroraBeam1
|
||||
setarg 7, -1
|
||||
createsoundtask sub_8158C58, 183, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 3, 6, 0, 10
|
||||
createsoundtask sub_8158C58, SE_W062B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 3, 6, 0, 10
|
||||
createvisualtask AnimTask_ShakeMon2, 5, ANIM_TARGET, 2, 0, 40, 1
|
||||
call AuroraBeam1
|
||||
call AuroraBeam1
|
||||
@ -7123,7 +7123,7 @@ Move_PSYBEAM:
|
||||
loadspritegfx ANIM_TAG_GOLD_RING
|
||||
playsewithpan SE_W060, SOUND_PAN_ATTACKER
|
||||
call SetPsychicBackground
|
||||
createsoundtask sub_8158C58, 200, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 3, 4, 0, 15
|
||||
createsoundtask sub_8158C58, SE_W060B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 3, 4, 0, 15
|
||||
call Psybeam1
|
||||
call Psybeam1
|
||||
createvisualtask AnimTask_SwayMon, 5, 0, 6, 2048, 4, ANIM_TARGET
|
||||
@ -7169,7 +7169,7 @@ Move_PSYWAVE:
|
||||
playsewithpan SE_W060, SOUND_PAN_ATTACKER
|
||||
call SetPsychicBackground
|
||||
createvisualtask sub_81076C8, 5, 100
|
||||
createsoundtask sub_8158C58, 203, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 9, 0, 10
|
||||
createsoundtask sub_8158C58, SE_W100, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 2, 9, 0, 10
|
||||
call Psywave1
|
||||
call Psywave1
|
||||
createvisualtask sub_8115A04, 2, 4, 1, 4, 0, 12, RGB(31, 18, 31)
|
||||
@ -7213,7 +7213,7 @@ Move_STEEL_WING:
|
||||
loadspritegfx ANIM_TAG_GUST
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
loopsewithpan SE_W231, SOUND_PAN_ATTACKER, 28, 2
|
||||
createvisualtask sub_81144F8, 5, 0, 0, 0
|
||||
createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0
|
||||
waitforvisualfinish
|
||||
monbg ANIM_DEF_PARTNER
|
||||
monbgprio_28 ANIM_TARGET
|
||||
@ -7239,7 +7239,7 @@ Move_STEEL_WING:
|
||||
Move_IRON_TAIL:
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
loopsewithpan SE_W231, SOUND_PAN_ATTACKER, 28, 2
|
||||
createvisualtask sub_81144F8, 5, 1, 0, 0
|
||||
createvisualtask AnimTask_MetallicShine, 5, 1, 0, 0
|
||||
waitforvisualfinish
|
||||
monbg ANIM_TARGET
|
||||
setalpha 12, 8
|
||||
@ -7249,7 +7249,7 @@ Move_IRON_TAIL:
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1
|
||||
playsewithpan SE_W233B, SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
createvisualtask sub_811489C, 5, 0, 1
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_ATTACKER, 1
|
||||
clearmonbg ANIM_TARGET
|
||||
blendoff
|
||||
waitforvisualfinish
|
||||
@ -7259,7 +7259,7 @@ Move_POISON_TAIL:
|
||||
loadspritegfx ANIM_TAG_IMPACT
|
||||
loadspritegfx ANIM_TAG_POISON_BUBBLE
|
||||
loopsewithpan SE_W231, SOUND_PAN_ATTACKER, 28, 2
|
||||
createvisualtask sub_81144F8, 5, 1, 1, RGB(24, 6, 23)
|
||||
createvisualtask AnimTask_MetallicShine, 5, 1, 1, RGB(24, 6, 23)
|
||||
waitforvisualfinish
|
||||
monbg ANIM_TARGET
|
||||
setalpha 12, 8
|
||||
@ -7269,7 +7269,7 @@ Move_POISON_TAIL:
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1
|
||||
playsewithpan SE_W233B, SOUND_PAN_TARGET
|
||||
waitforvisualfinish
|
||||
createvisualtask sub_811489C, 5, 0, 1
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_ATTACKER, 1
|
||||
clearmonbg ANIM_TARGET
|
||||
blendoff
|
||||
call PoisonBubblesEffect
|
||||
@ -7279,7 +7279,7 @@ Move_POISON_TAIL:
|
||||
Move_METAL_CLAW:
|
||||
loadspritegfx ANIM_TAG_CLAW_SLASH
|
||||
loopsewithpan SE_W231, SOUND_PAN_ATTACKER, 28, 2
|
||||
createvisualtask sub_81144F8, 5, 0, 0, 0
|
||||
createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0
|
||||
waitforvisualfinish
|
||||
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4
|
||||
delay 2
|
||||
@ -7346,8 +7346,8 @@ Move_SHADOW_BALL:
|
||||
fadetobg BG_GHOST
|
||||
waitbgfadein
|
||||
delay 15
|
||||
createsoundtask sub_8158C58, 168, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 5, 5, 0, 5
|
||||
createsprite gUnknown_08596D58, ANIM_TARGET, 2, 16, 16, 8
|
||||
createsoundtask sub_8158C58, SE_W054, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 5, 5, 0, 5
|
||||
createsprite gShadowBallSpriteTemplate, ANIM_TARGET, 2, 16, 16, 8
|
||||
waitforvisualfinish
|
||||
playsewithpan SE_W028, SOUND_PAN_TARGET
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_TARGET, 4, 0, 8, 1
|
||||
@ -7459,7 +7459,7 @@ Move_STRING_SHOT:
|
||||
end
|
||||
|
||||
StringShot1:
|
||||
createsprite gUnknown_085969E0, ANIM_TARGET, 2, 20, 0, 512, 20, 1
|
||||
createsprite gWebThreadSpriteTemplate, ANIM_TARGET, 2, 20, 0, 512, 20, 1
|
||||
delay 1
|
||||
return
|
||||
|
||||
@ -7488,7 +7488,7 @@ Move_SPIDER_WEB:
|
||||
call SpiderWeb1
|
||||
waitforvisualfinish
|
||||
playsewithpan SE_W081B, SOUND_PAN_TARGET
|
||||
createsprite gUnknown_08596A2C, ANIM_ATTACKER, 2
|
||||
createsprite gSpiderWebSpriteTemplate, ANIM_ATTACKER, 2
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_DEF_PARTNER
|
||||
delay 1
|
||||
@ -7496,7 +7496,7 @@ Move_SPIDER_WEB:
|
||||
end
|
||||
|
||||
SpiderWeb1:
|
||||
createsprite gUnknown_085969E0, ANIM_TARGET, 2, 20, 0, 512, 20, 0
|
||||
createsprite gWebThreadSpriteTemplate, ANIM_TARGET, 2, 20, 0, 512, 20, 0
|
||||
delay 1
|
||||
return
|
||||
|
||||
@ -7941,16 +7941,16 @@ Move_PERISH_SONG:
|
||||
panse_1B SE_W195, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0
|
||||
delay 80
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 0, 16, RGB_BLACK
|
||||
createvisualtask sub_811489C, 5, 4, 0
|
||||
createvisualtask sub_811489C, 5, 5, 0
|
||||
createvisualtask sub_811489C, 5, 6, 0
|
||||
createvisualtask sub_811489C, 5, 7, 0
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 4, 0
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 5, 0
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 6, 0
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 7, 0
|
||||
delay 100
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 16, 0, RGB_BLACK
|
||||
createvisualtask sub_811489C, 5, 4, 1
|
||||
createvisualtask sub_811489C, 5, 5, 1
|
||||
createvisualtask sub_811489C, 5, 6, 1
|
||||
createvisualtask sub_811489C, 5, 7, 1
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 4, 1
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 5, 1
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 6, 1
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 7, 1
|
||||
waitforvisualfinish
|
||||
end
|
||||
|
||||
@ -8019,7 +8019,7 @@ Move_TRI_ATTACK:
|
||||
delay 20
|
||||
playsewithpan SE_W161, SOUND_PAN_ATTACKER
|
||||
delay 20
|
||||
createsoundtask sub_8158C58, 220, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 5, 6, 0, 7
|
||||
createsoundtask sub_8158C58, SE_W161, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 5, 6, 0, 7
|
||||
waitforvisualfinish
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 16, RGB_BLACK
|
||||
delay 16
|
||||
@ -8356,7 +8356,7 @@ Move_HYPER_BEAM:
|
||||
createvisualtask AnimTask_ShakeMon2, 2, ANIM_ATTACKER, 1, 0, 4, 1
|
||||
waitforvisualfinish
|
||||
delay 30
|
||||
createsoundtask sub_8158C58, 247, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 1, 15, 0, 5
|
||||
createsoundtask sub_8158C58, SE_W063B, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 1, 15, 0, 5
|
||||
createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 0, 4, 50, 1
|
||||
createvisualtask sub_8115D94, 2, ANIM_TAG_ORBS, 1, 12, 31, 16, 0, 0
|
||||
call HyperBeam1
|
||||
@ -9570,7 +9570,7 @@ Move_DOOM_DESIRE:
|
||||
createvisualtask sub_8114960, 2
|
||||
delay 1
|
||||
monbg ANIM_ATK_PARTNER
|
||||
createvisualtask sub_811489C, 5, 1, 0
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_TARGET, 0
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 4, RGB_BLACK
|
||||
waitforvisualfinish
|
||||
setalpha 8, 8
|
||||
@ -9578,7 +9578,7 @@ Move_DOOM_DESIRE:
|
||||
createvisualtask AnimTask_ScaleMonAndRestore, 5, -4, -4, 15, ANIM_ATTACKER, 1
|
||||
waitforvisualfinish
|
||||
delay 20
|
||||
createvisualtask sub_811489C, 5, 1, 1
|
||||
createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, ANIM_TARGET, 1
|
||||
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 4, 0, RGB_BLACK
|
||||
waitforvisualfinish
|
||||
clearmonbg ANIM_ATK_PARTNER
|
||||
@ -10237,13 +10237,13 @@ Burn1:
|
||||
Status_Infatuation:
|
||||
loadspritegfx ANIM_TAG_MAGENTA_HEART
|
||||
playsewithpan SE_W204, SOUND_PAN_ATTACKER
|
||||
createsprite gUnknown_08593970, ANIM_ATTACKER, 3, 0, 20
|
||||
createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, 0, 20
|
||||
delay 15
|
||||
playsewithpan SE_W204, SOUND_PAN_ATTACKER
|
||||
createsprite gUnknown_08593970, ANIM_ATTACKER, 3, -20, 20
|
||||
createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, -20, 20
|
||||
delay 15
|
||||
playsewithpan SE_W204, SOUND_PAN_ATTACKER
|
||||
createsprite gUnknown_08593970, ANIM_ATTACKER, 3, 20, 20
|
||||
createsprite gMagentaHeartSpriteTemplate, ANIM_ATTACKER, 3, 20, 20
|
||||
end
|
||||
|
||||
Status_Sleep:
|
||||
|
@ -327,7 +327,7 @@ gSpecials:: @ 81DBA64
|
||||
def_special SetUpTrainerMovement
|
||||
def_special DoSealedChamberShakingEffect2
|
||||
def_special FoundBlackGlasses
|
||||
def_special sub_80AC81C
|
||||
def_special StartDroughtWeatherBlend
|
||||
def_special DoDiveWarp
|
||||
def_special DoFallWarp
|
||||
def_special ShowContestEntryMonPic
|
||||
|
@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
65 148 255
|
||||
180 222 255
|
||||
115 205 246
|
||||
131 197 255
|
||||
82 189 246
|
||||
172 238 246
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
@ -1,19 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
255 230 139
|
||||
189 131 74
|
||||
238 197 123
|
||||
213 164 98
|
||||
164 106 49
|
||||
255 246 164
|
||||
222 205 164
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
@ -1,10 +1,10 @@
|
||||
#ifndef GUARD_BATTLE_SETUP_H
|
||||
#define GUARD_BATTLE_SETUP_H
|
||||
|
||||
#include "gym_leader_rematch.h"
|
||||
|
||||
#define REMATCHES_COUNT 5
|
||||
#define REMATCH_TABLE_ENTRIES 78
|
||||
#define REMATCH_WALLY_ENTRY 64
|
||||
#define REMATCH_ELITE_FOUR_ENTRIES 73
|
||||
#define REMATCH_ELITE_FOUR_ENTRIES REMATCH_SIDNEY
|
||||
|
||||
struct RematchTrainer
|
||||
{
|
||||
|
@ -445,13 +445,14 @@
|
||||
#define FLAG_REMATCH_NORMAN 0x1A2
|
||||
#define FLAG_REMATCH_WINONA 0x1A3
|
||||
#define FLAG_REMATCH_TATE_AND_LIZA 0x1A4
|
||||
#define FLAG_REMATCH_JUAN 0x1A5
|
||||
#define FLAG_REMATCH_SIDNEY 0x1A6
|
||||
#define FLAG_REMATCH_PHOEBE 0x1A7
|
||||
#define FLAG_REMATCH_GLACIA 0x1A8
|
||||
#define FLAG_REMATCH_DRAKE 0x1A9
|
||||
#define FLAG_REMATCH_WALLACE 0x1AA
|
||||
// Note: FLAG_REMATCH_JUAN is handled by FLAG_ENABLE_JUAN_MATCH_CALL instead.
|
||||
#define FLAG_REMATCH_SIDNEY 0x1A5
|
||||
#define FLAG_REMATCH_PHOEBE 0x1A6
|
||||
#define FLAG_REMATCH_GLACIA 0x1A7
|
||||
#define FLAG_REMATCH_DRAKE 0x1A8
|
||||
#define FLAG_REMATCH_WALLACE 0x1A9
|
||||
|
||||
#define FLAG_UNUSED_0x1AA 0x1AA // Unused Flag
|
||||
#define FLAG_UNUSED_0x1AB 0x1AB // Unused Flag
|
||||
|
||||
#define FLAG_DEFEATED_DEOXYS 0x1AC
|
||||
|
@ -89,7 +89,7 @@ u8 AddPseudoEventObject(u16, void (*)(struct Sprite *), s16 x, s16 y, u8 subprio
|
||||
u8 show_sprite(u8, u8, u8);
|
||||
u8 SpawnSpecialEventObjectParameterized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 z);
|
||||
u8 SpawnSpecialEventObject(struct EventObjectTemplate *);
|
||||
void sub_8093038(s16, s16, s16 *, s16 *);
|
||||
void SetSpritePosToMapCoords(s16, s16, s16 *, s16 *);
|
||||
void CameraObjectReset1(void);
|
||||
void EventObjectSetGraphicsId(struct EventObject *, u8 graphicsId);
|
||||
void EventObjectTurn(struct EventObject *, u8);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_FARAWAY_ISLAND_H
|
||||
#define GUARD_FARAWAY_ISLAND_H
|
||||
|
||||
u32 sub_81D427C(void);
|
||||
u32 GetMewMoveDirection(void);
|
||||
bool8 sub_81D4A58(struct EventObject*);
|
||||
void UpdateFarawayIslandStepCounter(void);
|
||||
bool8 EventObjectIsFarawayIslandMew(struct EventObject *);
|
||||
|
@ -3,6 +3,14 @@
|
||||
|
||||
#include "sprite.h"
|
||||
|
||||
#define MAX_RAIN_SPRITES 24
|
||||
#define NUM_CLOUD_SPRITES 3
|
||||
#define NUM_FOG1_SPRITES 20
|
||||
#define NUM_ASH_SPRITES 20
|
||||
#define NUM_FOG2_SPRITES 20
|
||||
#define NUM_SANDSTORM_SPRITES 20
|
||||
#define NUM_SWIRL_SANDSTORM_SPRITES 5
|
||||
|
||||
// Controls how the weather should be changing the screen palettes.
|
||||
enum
|
||||
{
|
||||
@ -27,18 +35,18 @@ struct Weather
|
||||
{
|
||||
struct
|
||||
{
|
||||
struct Sprite *rainSprites[24];
|
||||
struct Sprite *rainSprites[MAX_RAIN_SPRITES];
|
||||
struct Sprite *snowflakeSprites[101];
|
||||
struct Sprite *cloudSprites[3];
|
||||
struct Sprite *cloudSprites[NUM_CLOUD_SPRITES];
|
||||
} s1;
|
||||
struct
|
||||
{
|
||||
u8 filler0[0xA0];
|
||||
struct Sprite *fog1Sprites[20];
|
||||
struct Sprite *ashSprites[20];
|
||||
struct Sprite *fog2Sprites[20];
|
||||
struct Sprite *sandstormSprites1[20];
|
||||
struct Sprite *sandstormSprites2[5];
|
||||
struct Sprite *fog1Sprites[NUM_FOG1_SPRITES];
|
||||
struct Sprite *ashSprites[NUM_ASH_SPRITES];
|
||||
struct Sprite *fog2Sprites[NUM_FOG2_SPRITES];
|
||||
struct Sprite *sandstormSprites1[NUM_SANDSTORM_SPRITES];
|
||||
struct Sprite *sandstormSprites2[NUM_SWIRL_SANDSTORM_SPRITES];
|
||||
} s2;
|
||||
} sprites;
|
||||
u8 gammaShifts[19][32];
|
||||
@ -62,57 +70,57 @@ struct Weather
|
||||
bool8 weatherChangeComplete;
|
||||
u8 weatherPicSpritePalIndex;
|
||||
u8 altGammaSpritePalIndex;
|
||||
u16 unknown_6D6;
|
||||
u8 unknown_6D8;
|
||||
u8 unknown_6D9;
|
||||
u16 rainSpriteVisibleCounter;
|
||||
u8 curRainSpriteIndex;
|
||||
u8 targetRainSpriteCount;
|
||||
u8 rainSpriteCount;
|
||||
u8 unknown_6DB;
|
||||
u8 unknown_6DC;
|
||||
u8 rainSpriteVisibleDelay;
|
||||
u8 isHeavyRain;
|
||||
u8 rainStrength;
|
||||
/*0x6DE*/ u8 cloudSpritesCreated;
|
||||
u8 filler_6DF[1];
|
||||
u16 unknown_6E0;
|
||||
u16 snowflakeVisibleCounter;
|
||||
u16 unknown_6E2;
|
||||
u8 snowflakeSpriteCount;
|
||||
u8 unknown_6E5;
|
||||
u8 targetSnowflakeSpriteCount;
|
||||
u16 unknown_6E6;
|
||||
u16 thunderCounter;
|
||||
u8 unknown_6EA;
|
||||
u8 unknown_6EB;
|
||||
u8 unknown_6EC;
|
||||
u8 unknown_6ED;
|
||||
u8 thunderTriggered;
|
||||
u16 fog1ScrollPosX;
|
||||
u16 unknown_6F0;
|
||||
u16 unknown_6F2;
|
||||
u16 fog1ScrollCounter;
|
||||
u16 fog1ScrollOffset;
|
||||
u8 lightenedFogSpritePals[6];
|
||||
u8 lightenedFogSpritePalsCount;
|
||||
u8 fog1SpritesCreated;
|
||||
u16 unknown_6FC;
|
||||
u16 ashBaseSpritesX;
|
||||
u16 unknown_6FE;
|
||||
u8 ashSpritesCreated;
|
||||
u8 filler_701[3];
|
||||
u32 unknown_704;
|
||||
u32 unknown_708;
|
||||
u32 sandstormXOffset;
|
||||
u32 sandstormYOffset;
|
||||
u8 filler_70C[2];
|
||||
u16 unknown_70E;
|
||||
u16 unknown_710;
|
||||
u16 unknown_712;
|
||||
u16 unknown_714;
|
||||
u8 sandstormSprites1Created;
|
||||
u8 sandstormSprites2Created;
|
||||
u16 unknown_718;
|
||||
u16 unknown_71A;
|
||||
u16 unknown_71C;
|
||||
u16 unknown_71E;
|
||||
u16 unknown_720;
|
||||
u16 unknown_722;
|
||||
u16 sandstormBaseSpritesX;
|
||||
u16 sandstormPosY;
|
||||
u16 sandstormWaveIndex;
|
||||
u16 sandstormWaveCounter;
|
||||
u8 sandstormSpritesCreated;
|
||||
u8 sandstormSwirlSpritesCreated;
|
||||
u16 fog2BaseSpritesX;
|
||||
u16 fog2PosY;
|
||||
u16 fog2ScrollXCounter;
|
||||
u16 fog2ScrollYCounter;
|
||||
u16 fog2XOffset;
|
||||
u16 fog2YOffset;
|
||||
u8 fog2SpritesCreated;
|
||||
u8 filler_725[1];
|
||||
u16 unknown_726;
|
||||
u16 unknown_728;
|
||||
u16 unknown_72A;
|
||||
u16 unknown_72C;
|
||||
u8 unknown_72E;
|
||||
u16 bubblesDelayCounter;
|
||||
u16 bubblesDelayIndex;
|
||||
u16 bubblesCoordsIndex;
|
||||
u16 bubblesSpriteCount;
|
||||
u8 bubblesSpritesCreated;
|
||||
u8 filler_72F;
|
||||
u16 currBlendEVA;
|
||||
u16 currBlendEVB;
|
||||
@ -174,10 +182,10 @@ void Clouds_InitVars(void);
|
||||
void Clouds_Main(void);
|
||||
void Clouds_InitAll(void);
|
||||
bool8 Clouds_Finish(void);
|
||||
void Weather2_InitVars(void);
|
||||
void Weather2_Main(void);
|
||||
void Weather2_InitAll(void);
|
||||
bool8 Weather2_Finish(void);
|
||||
void Sunny_InitVars(void);
|
||||
void Sunny_Main(void);
|
||||
void Sunny_InitAll(void);
|
||||
bool8 Sunny_Finish(void);
|
||||
void LightRain_InitVars(void);
|
||||
void LightRain_Main(void);
|
||||
void LightRain_InitAll(void);
|
||||
|
@ -75,11 +75,17 @@ enum {
|
||||
REMATCH_WINONA,
|
||||
REMATCH_TATE_AND_LIZA,
|
||||
REMATCH_JUAN,
|
||||
|
||||
// Entries below SIDNEY are considered part of REMATCH_ELITE_FOUR_ENTRIES.
|
||||
REMATCH_SIDNEY,
|
||||
REMATCH_PHOEBE,
|
||||
REMATCH_GLACIA,
|
||||
REMATCH_DRAKE,
|
||||
REMATCH_WALLACE
|
||||
REMATCH_WALLACE,
|
||||
|
||||
// The total number of rematch entries. This must be the last element
|
||||
// in the enum.
|
||||
REMATCH_TABLE_ENTRIES
|
||||
};
|
||||
|
||||
void UpdateGymLeaderRematch(void);
|
||||
|
@ -69,7 +69,7 @@ u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16
|
||||
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress);
|
||||
void AddItemMenuActionTextPrinters(u8 windowId, u8 fontId, u8 left, u8 top, u8 letterSpacing, u8 lineHeight, u8 itemCount, const struct MenuAction *strs, const u8 *a8);
|
||||
void sub_8198DBC(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 itemCount, u8 itemCount2, const struct MenuAction *strs, const u8 *a8);
|
||||
u8 sub_8199944(u8 windowId, u8 optionWidth, u8 horizontalCount, u8 verticalCount, u8 initialCursorPos);
|
||||
u8 sub_8199944(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initialCursorPos);
|
||||
u8 sub_8199134(s8, s8);
|
||||
u8 GetStartMenuWindowId(void);
|
||||
void sub_819A2BC(u8, u8);
|
||||
@ -91,7 +91,7 @@ void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette);
|
||||
void sub_8199D3C(void *ptr, int delta, int width, int height, bool32 is8BPP);
|
||||
void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyToVram);
|
||||
void sub_8197AE8(bool8 copyToVram);
|
||||
void sub_81997AC(u8 windowId, u8 a4, u8 a6, u8 a7, const struct MenuAction *strs);
|
||||
void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *strs);
|
||||
s8 Menu_ProcessInputGridLayout(void);
|
||||
u8 InitMenuInUpperLeftCorner(u8 windowId, u8 itemCount, u8 initialCursorPos, bool8 APressMuted);
|
||||
s8 Menu_ProcessInputNoWrapAround_other(void);
|
||||
|
@ -11,7 +11,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3);
|
||||
bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void);
|
||||
int convert_pixel_width_to_tile_width(int);
|
||||
u8 CreateWindowFromRect(u8, u8, u8, u8);
|
||||
void sub_80E2A78(u8);
|
||||
void ClearToTransparentAndRemoveWindow(u8);
|
||||
int display_text_and_get_width(const u8*, int);
|
||||
int sub_80E2D5C(int arg0, int tileWidth);
|
||||
bool16 ScrSpecial_CreatePCMenu(void);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1093,7 +1093,7 @@ const struct SpriteTemplate gUnknown_085928D0 =
|
||||
.callback = sub_8100A50,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_085928E8 =
|
||||
const struct SpriteTemplate gVineWhipSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_WHIP_HIT,
|
||||
.paletteTag = ANIM_TAG_WHIP_HIT,
|
||||
@ -2336,7 +2336,7 @@ void AnimHyperBeamOrb(struct Sprite* sprite)
|
||||
{
|
||||
u16 speed;
|
||||
u16 animNum = Random2();
|
||||
|
||||
|
||||
StartSpriteAnim(sprite, animNum % 8);
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_X_2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y_PIC_OFFSET);
|
||||
@ -2660,7 +2660,7 @@ static void AnimTranslateLinearSingleSineWaveStep(struct Sprite* sprite)
|
||||
s16 a = sprite->data[0];
|
||||
s16 b = sprite->data[7];
|
||||
s16 r0;
|
||||
|
||||
|
||||
sprite->data[0] = 1;
|
||||
TranslateAnimHorizontalArc(sprite);
|
||||
r0 = sprite->data[7];
|
||||
@ -2675,7 +2675,7 @@ static void AnimTranslateLinearSingleSineWaveStep(struct Sprite* sprite)
|
||||
if (sprite->oam.affineParam == 30)
|
||||
destroy = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (sprite->pos1.x + sprite->pos2.x > 256
|
||||
|| sprite->pos1.x + sprite->pos2.x < -16
|
||||
|| sprite->pos1.y + sprite->pos2.y > 160
|
||||
@ -3748,7 +3748,7 @@ void sub_81009F8(struct Sprite* sprite)
|
||||
|
||||
void sub_8100A50(struct Sprite* sprite)
|
||||
{
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == 0)
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
|
||||
StartSpriteAnim(sprite, 1);
|
||||
|
||||
sprite->callback = sub_81009DC;
|
||||
@ -3770,7 +3770,7 @@ void sub_8100A94(struct Sprite* sprite)
|
||||
}
|
||||
|
||||
// Moves the sprite in a diagonally slashing motion across the target mon.
|
||||
// Used by moves such as MOVE_CUT and MOVE_AERIAL_ACE.
|
||||
// Used by moves such as MOVE_CUT and MOVE_AERIAL_ACE.
|
||||
// arg 0: initial x pixel offset
|
||||
// arg 1: initial y pixel offset
|
||||
// arg 2: slice direction; 0 = right-to-left, 1 = left-to-right
|
||||
@ -5350,10 +5350,10 @@ static void sub_8102DE4(struct Sprite* sprite)
|
||||
|
||||
void sub_8102EB0(struct Sprite* sprite)
|
||||
{
|
||||
int a;
|
||||
int a;
|
||||
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_OPPONENT)
|
||||
{
|
||||
a = gBattleAnimArgs[1];
|
||||
a = gBattleAnimArgs[1];
|
||||
(u16)gBattleAnimArgs[1] = -a;
|
||||
}
|
||||
|
||||
|
@ -889,7 +889,7 @@ const struct SpriteTemplate gUnknown_08593958 =
|
||||
.callback = sub_8105DE8,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08593970 =
|
||||
const struct SpriteTemplate gMagentaHeartSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_MAGENTA_HEART,
|
||||
.paletteTag = ANIM_TAG_MAGENTA_HEART,
|
||||
@ -3286,7 +3286,7 @@ static void sub_810627C(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81062E8(u8 taskId)
|
||||
void AnimTask_HeartsBackground(u8 taskId)
|
||||
{
|
||||
struct BattleAnimBgData animBg;
|
||||
|
||||
|
@ -293,35 +293,31 @@ static const u8 sText_ShedinjaJpnName[] = _("ヌケニン"); // Nukenin
|
||||
const struct OamData gOamData_831ACA8 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 1,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.affineMode = ST_OAM_AFFINE_NORMAL,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(64x64),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(64x64),
|
||||
.tileNum = 0,
|
||||
.priority = 2,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
const struct OamData gOamData_831ACB0 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 1,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.affineMode = ST_OAM_AFFINE_NORMAL,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(64x64),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(64x64),
|
||||
.tileNum = 0,
|
||||
.priority = 2,
|
||||
.paletteNum = 2,
|
||||
.affineParam = 0
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
// Unknown and unused data. Feel free to remove.
|
||||
@ -5891,3 +5887,5 @@ static void HandleAction_ActionFinished(void)
|
||||
gBattleScripting.multihitMoveEffect = 0;
|
||||
gBattleResources->battleScriptsStack->size = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -232,84 +232,84 @@ static const struct TrainerBattleParameter sTrainerBContinueScriptBattleParams[]
|
||||
|
||||
const struct RematchTrainer gRematchTable[REMATCH_TABLE_ENTRIES] =
|
||||
{
|
||||
{{TRAINER_ROSE_1, TRAINER_ROSE_2, TRAINER_ROSE_3, TRAINER_ROSE_4, TRAINER_ROSE_5}, 0x0, 0x21},
|
||||
{{TRAINER_ANDRES_1, TRAINER_ANDRES_2, TRAINER_ANDRES_3, TRAINER_ANDRES_4, TRAINER_ANDRES_5}, 0x0, 0x14},
|
||||
{{TRAINER_DUSTY_1, TRAINER_DUSTY_2, TRAINER_DUSTY_3, TRAINER_DUSTY_4, TRAINER_DUSTY_5}, 0x0, 0x1a},
|
||||
{{TRAINER_LOLA_1, TRAINER_LOLA_2, TRAINER_LOLA_3, TRAINER_LOLA_4, TRAINER_LOLA_5}, 0x0, 0x18},
|
||||
{{TRAINER_RICKY_1, TRAINER_RICKY_2, TRAINER_RICKY_3, TRAINER_RICKY_4, TRAINER_RICKY_5}, 0x0, 0x18},
|
||||
{{TRAINER_LILA_AND_ROY_1, TRAINER_LILA_AND_ROY_2, TRAINER_LILA_AND_ROY_3, TRAINER_LILA_AND_ROY_4, TRAINER_LILA_AND_ROY_5}, 0x0, 0x27},
|
||||
{{TRAINER_CRISTIN_1, TRAINER_CRISTIN_2, TRAINER_CRISTIN_3, TRAINER_CRISTIN_4, TRAINER_CRISTIN_5}, 0x0, 0x24},
|
||||
{{TRAINER_BROOKE_1, TRAINER_BROOKE_2, TRAINER_BROOKE_3, TRAINER_BROOKE_4, TRAINER_BROOKE_5}, 0x0, 0x1a},
|
||||
{{TRAINER_WILTON_1, TRAINER_WILTON_2, TRAINER_WILTON_3, TRAINER_WILTON_4, TRAINER_WILTON_5}, 0x0, 0x1a},
|
||||
{{TRAINER_VALERIE_1, TRAINER_VALERIE_2, TRAINER_VALERIE_3, TRAINER_VALERIE_4, TRAINER_VALERIE_5}, 0x18, 0x14},
|
||||
{{TRAINER_CINDY_1, TRAINER_CINDY_3, TRAINER_CINDY_4, TRAINER_CINDY_5, TRAINER_CINDY_6}, 0x0, 0x13},
|
||||
{{TRAINER_THALIA_1, TRAINER_THALIA_2, TRAINER_THALIA_3, TRAINER_THALIA_4, TRAINER_THALIA_5}, 0x18, 0x38},
|
||||
{{TRAINER_JESSICA_1, TRAINER_JESSICA_2, TRAINER_JESSICA_3, TRAINER_JESSICA_4, TRAINER_JESSICA_5}, 0x0, 0x24},
|
||||
{{TRAINER_WINSTON_1, TRAINER_WINSTON_2, TRAINER_WINSTON_3, TRAINER_WINSTON_4, TRAINER_WINSTON_5}, 0x0, 0x13},
|
||||
{{TRAINER_STEVE_1, TRAINER_STEVE_2, TRAINER_STEVE_3, TRAINER_STEVE_4, TRAINER_STEVE_5}, 0x0, 0x1d},
|
||||
{{TRAINER_TONY_1, TRAINER_TONY_2, TRAINER_TONY_3, TRAINER_TONY_4, TRAINER_TONY_5}, 0x0, 0x16},
|
||||
{{TRAINER_NOB_1, TRAINER_NOB_2, TRAINER_NOB_3, TRAINER_NOB_4, TRAINER_NOB_5}, 0x0, 0x1e},
|
||||
{{TRAINER_KOJI_1, TRAINER_KOJI_2, TRAINER_KOJI_3, TRAINER_KOJI_4, TRAINER_KOJI_5}, 0x0, 0x2a},
|
||||
{{TRAINER_FERNANDO_1, TRAINER_FERNANDO_2, TRAINER_FERNANDO_3, TRAINER_FERNANDO_4, TRAINER_FERNANDO_5}, 0x0, 0x26},
|
||||
{{TRAINER_DALTON_1, TRAINER_DALTON_2, TRAINER_DALTON_3, TRAINER_DALTON_4, TRAINER_DALTON_5}, 0x0, 0x21},
|
||||
{{TRAINER_BERNIE_1, TRAINER_BERNIE_2, TRAINER_BERNIE_3, TRAINER_BERNIE_4, TRAINER_BERNIE_5}, 0x0, 0x1d},
|
||||
{{TRAINER_ETHAN_1, TRAINER_ETHAN_2, TRAINER_ETHAN_3, TRAINER_ETHAN_4, TRAINER_ETHAN_5}, 0x18, 0xd},
|
||||
{{TRAINER_JOHN_AND_JAY_1, TRAINER_JOHN_AND_JAY_2, TRAINER_JOHN_AND_JAY_3, TRAINER_JOHN_AND_JAY_4, TRAINER_JOHN_AND_JAY_5}, 0x18, 0x1},
|
||||
{{TRAINER_JEFFREY_1, TRAINER_JEFFREY_2, TRAINER_JEFFREY_3, TRAINER_JEFFREY_4, TRAINER_JEFFREY_5}, 0x0, 0x23},
|
||||
{{TRAINER_CAMERON_1, TRAINER_CAMERON_2, TRAINER_CAMERON_3, TRAINER_CAMERON_4, TRAINER_CAMERON_5}, 0x0, 0x26},
|
||||
{{TRAINER_JACKI_1, TRAINER_JACKI_2, TRAINER_JACKI_3, TRAINER_JACKI_4, TRAINER_JACKI_5}, 0x0, 0x26},
|
||||
{{TRAINER_WALTER_1, TRAINER_WALTER_2, TRAINER_WALTER_3, TRAINER_WALTER_4, TRAINER_WALTER_5}, 0x0, 0x24},
|
||||
{{TRAINER_KAREN_1, TRAINER_KAREN_2, TRAINER_KAREN_3, TRAINER_KAREN_4, TRAINER_KAREN_5}, 0x0, 0x1f},
|
||||
{{TRAINER_JERRY_1, TRAINER_JERRY_2, TRAINER_JERRY_3, TRAINER_JERRY_4, TRAINER_JERRY_5}, 0x0, 0x1f},
|
||||
{{TRAINER_ANNA_AND_MEG_1, TRAINER_ANNA_AND_MEG_2, TRAINER_ANNA_AND_MEG_3, TRAINER_ANNA_AND_MEG_4, TRAINER_ANNA_AND_MEG_5}, 0x0, 0x20},
|
||||
{{TRAINER_ISABEL_1, TRAINER_ISABEL_2, TRAINER_ISABEL_3, TRAINER_ISABEL_4, TRAINER_ISABEL_5}, 0x0, 0x19},
|
||||
{{TRAINER_MIGUEL_1, TRAINER_MIGUEL_2, TRAINER_MIGUEL_3, TRAINER_MIGUEL_4, TRAINER_MIGUEL_5}, 0x0, 0x12},
|
||||
{{TRAINER_TIMOTHY_1, TRAINER_TIMOTHY_2, TRAINER_TIMOTHY_3, TRAINER_TIMOTHY_4, TRAINER_TIMOTHY_5}, 0x0, 0x1e},
|
||||
{{TRAINER_SHELBY_1, TRAINER_SHELBY_2, TRAINER_SHELBY_3, TRAINER_SHELBY_4, TRAINER_SHELBY_5}, 0x18, 0xc},
|
||||
{{TRAINER_CALVIN_1, TRAINER_CALVIN_2, TRAINER_CALVIN_3, TRAINER_CALVIN_4, TRAINER_CALVIN_5}, 0x0, 0x11},
|
||||
{{TRAINER_ELLIOT_1, TRAINER_ELLIOT_2, TRAINER_ELLIOT_3, TRAINER_ELLIOT_4, TRAINER_ELLIOT_5}, 0x0, 0x15},
|
||||
{{TRAINER_ISAIAH_1, TRAINER_ISAIAH_2, TRAINER_ISAIAH_3, TRAINER_ISAIAH_4, TRAINER_ISAIAH_5}, 0x0, 0x2b},
|
||||
{{TRAINER_MARIA_1, TRAINER_MARIA_2, TRAINER_MARIA_3, TRAINER_MARIA_4, TRAINER_MARIA_5}, 0x0, 0x20},
|
||||
{{TRAINER_ABIGAIL_1, TRAINER_ABIGAIL_2, TRAINER_ABIGAIL_3, TRAINER_ABIGAIL_4, TRAINER_ABIGAIL_5}, 0x0, 0x19},
|
||||
{{TRAINER_DYLAN_1, TRAINER_DYLAN_2, TRAINER_DYLAN_3, TRAINER_DYLAN_4, TRAINER_DYLAN_5}, 0x0, 0x20},
|
||||
{{TRAINER_KATELYN_1, TRAINER_KATELYN_2, TRAINER_KATELYN_3, TRAINER_KATELYN_4, TRAINER_KATELYN_5}, 0x0, 0x2b},
|
||||
{{TRAINER_BENJAMIN_1, TRAINER_BENJAMIN_2, TRAINER_BENJAMIN_3, TRAINER_BENJAMIN_4, TRAINER_BENJAMIN_5}, 0x0, 0x19},
|
||||
{{TRAINER_PABLO_1, TRAINER_PABLO_2, TRAINER_PABLO_3, TRAINER_PABLO_4, TRAINER_PABLO_5}, 0x0, 0x29},
|
||||
{{TRAINER_NICOLAS_1, TRAINER_NICOLAS_2, TRAINER_NICOLAS_3, TRAINER_NICOLAS_4, TRAINER_NICOLAS_5}, 0x18, 0x1},
|
||||
{{TRAINER_ROBERT_1, TRAINER_ROBERT_2, TRAINER_ROBERT_3, TRAINER_ROBERT_4, TRAINER_ROBERT_5}, 0x0, 0x23},
|
||||
{{TRAINER_LAO_1, TRAINER_LAO_2, TRAINER_LAO_3, TRAINER_LAO_4, TRAINER_LAO_5}, 0x0, 0x1c},
|
||||
{{TRAINER_CYNDY_1, TRAINER_CYNDY_2, TRAINER_CYNDY_3, TRAINER_CYNDY_4, TRAINER_CYNDY_5}, 0x0, 0x1e},
|
||||
{{TRAINER_MADELINE_1, TRAINER_MADELINE_2, TRAINER_MADELINE_3, TRAINER_MADELINE_4, TRAINER_MADELINE_5}, 0x0, 0x1c},
|
||||
{{TRAINER_JENNY_1, TRAINER_JENNY_2, TRAINER_JENNY_3, TRAINER_JENNY_4, TRAINER_JENNY_5}, 0x0, 0x27},
|
||||
{{TRAINER_DIANA_1, TRAINER_DIANA_2, TRAINER_DIANA_3, TRAINER_DIANA_4, TRAINER_DIANA_5}, 0x18, 0xd},
|
||||
{{TRAINER_AMY_AND_LIV_1, TRAINER_AMY_AND_LIV_2, TRAINER_AMY_AND_LIV_4, TRAINER_AMY_AND_LIV_5, TRAINER_AMY_AND_LIV_6}, 0x0, 0x12},
|
||||
{{TRAINER_ERNEST_1, TRAINER_ERNEST_2, TRAINER_ERNEST_3, TRAINER_ERNEST_4, TRAINER_ERNEST_5}, 0x0, 0x28},
|
||||
{{TRAINER_CORY_1, TRAINER_CORY_2, TRAINER_CORY_3, TRAINER_CORY_4, TRAINER_CORY_5}, 0x0, 0x17},
|
||||
{{TRAINER_EDWIN_1, TRAINER_EDWIN_2, TRAINER_EDWIN_3, TRAINER_EDWIN_4, TRAINER_EDWIN_5}, 0x0, 0x19},
|
||||
{{TRAINER_LYDIA_1, TRAINER_LYDIA_2, TRAINER_LYDIA_3, TRAINER_LYDIA_4, TRAINER_LYDIA_5}, 0x0, 0x20},
|
||||
{{TRAINER_ISAAC_1, TRAINER_ISAAC_2, TRAINER_ISAAC_3, TRAINER_ISAAC_4, TRAINER_ISAAC_5}, 0x0, 0x20},
|
||||
{{TRAINER_GABRIELLE_1, TRAINER_GABRIELLE_2, TRAINER_GABRIELLE_3, TRAINER_GABRIELLE_4, TRAINER_GABRIELLE_5}, 0x18, 0x11},
|
||||
{{TRAINER_CATHERINE_1, TRAINER_CATHERINE_2, TRAINER_CATHERINE_3, TRAINER_CATHERINE_4, TRAINER_CATHERINE_5}, 0x0, 0x22},
|
||||
{{TRAINER_JACKSON_1, TRAINER_JACKSON_2, TRAINER_JACKSON_3, TRAINER_JACKSON_4, TRAINER_JACKSON_5}, 0x0, 0x22},
|
||||
{{TRAINER_HALEY_1, TRAINER_HALEY_2, TRAINER_HALEY_3, TRAINER_HALEY_4, TRAINER_HALEY_5}, 0x0, 0x13},
|
||||
{{TRAINER_JAMES_1, TRAINER_JAMES_2, TRAINER_JAMES_3, TRAINER_JAMES_4, TRAINER_JAMES_5}, 0x18, 0xb},
|
||||
{{TRAINER_TRENT_1, TRAINER_TRENT_2, TRAINER_TRENT_3, TRAINER_TRENT_4, TRAINER_TRENT_5}, 0x0, 0x1b},
|
||||
{{TRAINER_SAWYER_1, TRAINER_SAWYER_2, TRAINER_SAWYER_3, TRAINER_SAWYER_4, TRAINER_SAWYER_5}, 0x18, 0xc},
|
||||
{{TRAINER_KIRA_AND_DAN_1, TRAINER_KIRA_AND_DAN_2, TRAINER_KIRA_AND_DAN_3, TRAINER_KIRA_AND_DAN_4, TRAINER_KIRA_AND_DAN_5}, 0x18, 0x3e},
|
||||
{{TRAINER_WALLY_3, TRAINER_WALLY_4, TRAINER_WALLY_5, TRAINER_WALLY_6, TRAINER_WALLY_6}, 0x18, 0x2b},
|
||||
{{TRAINER_ROXANNE_1, TRAINER_ROXANNE_2, TRAINER_ROXANNE_3, TRAINER_ROXANNE_4, TRAINER_ROXANNE_5}, 0x0, 0x3},
|
||||
{{TRAINER_BRAWLY_1, TRAINER_BRAWLY_2, TRAINER_BRAWLY_3, TRAINER_BRAWLY_4, TRAINER_BRAWLY_5}, 0x0, 0xb},
|
||||
{{TRAINER_WATTSON_1, TRAINER_WATTSON_2, TRAINER_WATTSON_3, TRAINER_WATTSON_4, TRAINER_WATTSON_5}, 0x0, 0x2},
|
||||
{{TRAINER_FLANNERY_1, TRAINER_FLANNERY_2, TRAINER_FLANNERY_3, TRAINER_FLANNERY_4, TRAINER_FLANNERY_5}, 0x0, 0xc},
|
||||
{{TRAINER_NORMAN_1, TRAINER_NORMAN_2, TRAINER_NORMAN_3, TRAINER_NORMAN_4, TRAINER_NORMAN_5}, 0x0, 0x0},
|
||||
{{TRAINER_WINONA_1, TRAINER_WINONA_2, TRAINER_WINONA_3, TRAINER_WINONA_4, TRAINER_WINONA_5}, 0x0, 0x4},
|
||||
{{TRAINER_TATE_AND_LIZA_1, TRAINER_TATE_AND_LIZA_2, TRAINER_TATE_AND_LIZA_3, TRAINER_TATE_AND_LIZA_4, TRAINER_TATE_AND_LIZA_5}, 0x0, 0x6},
|
||||
{{TRAINER_JUAN_1, TRAINER_JUAN_2, TRAINER_JUAN_3, TRAINER_JUAN_4, TRAINER_JUAN_5}, 0x0, 0x7},
|
||||
{{TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY}, 0x0, 0x8},
|
||||
{{TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE}, 0x0, 0x8},
|
||||
{{TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA}, 0x0, 0x8},
|
||||
{{TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE}, 0x0, 0x8},
|
||||
{{TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE}, 0x0, 0x8},
|
||||
[REMATCH_ROSE] = {{TRAINER_ROSE_1, TRAINER_ROSE_2, TRAINER_ROSE_3, TRAINER_ROSE_4, TRAINER_ROSE_5}, 0x0, 0x21},
|
||||
[REMATCH_ANDRES] = {{TRAINER_ANDRES_1, TRAINER_ANDRES_2, TRAINER_ANDRES_3, TRAINER_ANDRES_4, TRAINER_ANDRES_5}, 0x0, 0x14},
|
||||
[REMATCH_DUSTY] = {{TRAINER_DUSTY_1, TRAINER_DUSTY_2, TRAINER_DUSTY_3, TRAINER_DUSTY_4, TRAINER_DUSTY_5}, 0x0, 0x1a},
|
||||
[REMATCH_LOLA] = {{TRAINER_LOLA_1, TRAINER_LOLA_2, TRAINER_LOLA_3, TRAINER_LOLA_4, TRAINER_LOLA_5}, 0x0, 0x18},
|
||||
[REMATCH_RICKY] = {{TRAINER_RICKY_1, TRAINER_RICKY_2, TRAINER_RICKY_3, TRAINER_RICKY_4, TRAINER_RICKY_5}, 0x0, 0x18},
|
||||
[REMATCH_LILA_AND_ROY] = {{TRAINER_LILA_AND_ROY_1, TRAINER_LILA_AND_ROY_2, TRAINER_LILA_AND_ROY_3, TRAINER_LILA_AND_ROY_4, TRAINER_LILA_AND_ROY_5}, 0x0, 0x27},
|
||||
[REMATCH_CRISTIN] = {{TRAINER_CRISTIN_1, TRAINER_CRISTIN_2, TRAINER_CRISTIN_3, TRAINER_CRISTIN_4, TRAINER_CRISTIN_5}, 0x0, 0x24},
|
||||
[REMATCH_BROOKE] = {{TRAINER_BROOKE_1, TRAINER_BROOKE_2, TRAINER_BROOKE_3, TRAINER_BROOKE_4, TRAINER_BROOKE_5}, 0x0, 0x1a},
|
||||
[REMATCH_WILTON] = {{TRAINER_WILTON_1, TRAINER_WILTON_2, TRAINER_WILTON_3, TRAINER_WILTON_4, TRAINER_WILTON_5}, 0x0, 0x1a},
|
||||
[REMATCH_VALERIE] = {{TRAINER_VALERIE_1, TRAINER_VALERIE_2, TRAINER_VALERIE_3, TRAINER_VALERIE_4, TRAINER_VALERIE_5}, 0x18, 0x14},
|
||||
[REMATCH_CINDY] = {{TRAINER_CINDY_1, TRAINER_CINDY_3, TRAINER_CINDY_4, TRAINER_CINDY_5, TRAINER_CINDY_6}, 0x0, 0x13},
|
||||
[REMATCH_THALIA] = {{TRAINER_THALIA_1, TRAINER_THALIA_2, TRAINER_THALIA_3, TRAINER_THALIA_4, TRAINER_THALIA_5}, 0x18, 0x38},
|
||||
[REMATCH_JESSICA] = {{TRAINER_JESSICA_1, TRAINER_JESSICA_2, TRAINER_JESSICA_3, TRAINER_JESSICA_4, TRAINER_JESSICA_5}, 0x0, 0x24},
|
||||
[REMATCH_WINSTON] = {{TRAINER_WINSTON_1, TRAINER_WINSTON_2, TRAINER_WINSTON_3, TRAINER_WINSTON_4, TRAINER_WINSTON_5}, 0x0, 0x13},
|
||||
[REMATCH_STEVE] = {{TRAINER_STEVE_1, TRAINER_STEVE_2, TRAINER_STEVE_3, TRAINER_STEVE_4, TRAINER_STEVE_5}, 0x0, 0x1d},
|
||||
[REMATCH_TONY] = {{TRAINER_TONY_1, TRAINER_TONY_2, TRAINER_TONY_3, TRAINER_TONY_4, TRAINER_TONY_5}, 0x0, 0x16},
|
||||
[REMATCH_NOB] = {{TRAINER_NOB_1, TRAINER_NOB_2, TRAINER_NOB_3, TRAINER_NOB_4, TRAINER_NOB_5}, 0x0, 0x1e},
|
||||
[REMATCH_KOJI] = {{TRAINER_KOJI_1, TRAINER_KOJI_2, TRAINER_KOJI_3, TRAINER_KOJI_4, TRAINER_KOJI_5}, 0x0, 0x2a},
|
||||
[REMATCH_FERNANDO] = {{TRAINER_FERNANDO_1, TRAINER_FERNANDO_2, TRAINER_FERNANDO_3, TRAINER_FERNANDO_4, TRAINER_FERNANDO_5}, 0x0, 0x26},
|
||||
[REMATCH_DALTON] = {{TRAINER_DALTON_1, TRAINER_DALTON_2, TRAINER_DALTON_3, TRAINER_DALTON_4, TRAINER_DALTON_5}, 0x0, 0x21},
|
||||
[REMATCH_BERNIE] = {{TRAINER_BERNIE_1, TRAINER_BERNIE_2, TRAINER_BERNIE_3, TRAINER_BERNIE_4, TRAINER_BERNIE_5}, 0x0, 0x1d},
|
||||
[REMATCH_ETHAN] = {{TRAINER_ETHAN_1, TRAINER_ETHAN_2, TRAINER_ETHAN_3, TRAINER_ETHAN_4, TRAINER_ETHAN_5}, 0x18, 0xd},
|
||||
[REMATCH_JOHN_AND_JAY] = {{TRAINER_JOHN_AND_JAY_1, TRAINER_JOHN_AND_JAY_2, TRAINER_JOHN_AND_JAY_3, TRAINER_JOHN_AND_JAY_4, TRAINER_JOHN_AND_JAY_5}, 0x18, 0x1},
|
||||
[REMATCH_JEFFREY] = {{TRAINER_JEFFREY_1, TRAINER_JEFFREY_2, TRAINER_JEFFREY_3, TRAINER_JEFFREY_4, TRAINER_JEFFREY_5}, 0x0, 0x23},
|
||||
[REMATCH_CAMERON] = {{TRAINER_CAMERON_1, TRAINER_CAMERON_2, TRAINER_CAMERON_3, TRAINER_CAMERON_4, TRAINER_CAMERON_5}, 0x0, 0x26},
|
||||
[REMATCH_JACKI] = {{TRAINER_JACKI_1, TRAINER_JACKI_2, TRAINER_JACKI_3, TRAINER_JACKI_4, TRAINER_JACKI_5}, 0x0, 0x26},
|
||||
[REMATCH_WALTER] = {{TRAINER_WALTER_1, TRAINER_WALTER_2, TRAINER_WALTER_3, TRAINER_WALTER_4, TRAINER_WALTER_5}, 0x0, 0x24},
|
||||
[REMATCH_KAREN] = {{TRAINER_KAREN_1, TRAINER_KAREN_2, TRAINER_KAREN_3, TRAINER_KAREN_4, TRAINER_KAREN_5}, 0x0, 0x1f},
|
||||
[REMATCH_JERRY] = {{TRAINER_JERRY_1, TRAINER_JERRY_2, TRAINER_JERRY_3, TRAINER_JERRY_4, TRAINER_JERRY_5}, 0x0, 0x1f},
|
||||
[REMATCH_ANNA_AND_MEG] = {{TRAINER_ANNA_AND_MEG_1, TRAINER_ANNA_AND_MEG_2, TRAINER_ANNA_AND_MEG_3, TRAINER_ANNA_AND_MEG_4, TRAINER_ANNA_AND_MEG_5}, 0x0, 0x20},
|
||||
[REMATCH_ISABEL] = {{TRAINER_ISABEL_1, TRAINER_ISABEL_2, TRAINER_ISABEL_3, TRAINER_ISABEL_4, TRAINER_ISABEL_5}, 0x0, 0x19},
|
||||
[REMATCH_MIGUEL] = {{TRAINER_MIGUEL_1, TRAINER_MIGUEL_2, TRAINER_MIGUEL_3, TRAINER_MIGUEL_4, TRAINER_MIGUEL_5}, 0x0, 0x12},
|
||||
[REMATCH_TIMOTHY] = {{TRAINER_TIMOTHY_1, TRAINER_TIMOTHY_2, TRAINER_TIMOTHY_3, TRAINER_TIMOTHY_4, TRAINER_TIMOTHY_5}, 0x0, 0x1e},
|
||||
[REMATCH_SHELBY] = {{TRAINER_SHELBY_1, TRAINER_SHELBY_2, TRAINER_SHELBY_3, TRAINER_SHELBY_4, TRAINER_SHELBY_5}, 0x18, 0xc},
|
||||
[REMATCH_CALVIN] = {{TRAINER_CALVIN_1, TRAINER_CALVIN_2, TRAINER_CALVIN_3, TRAINER_CALVIN_4, TRAINER_CALVIN_5}, 0x0, 0x11},
|
||||
[REMATCH_ELLIOT] = {{TRAINER_ELLIOT_1, TRAINER_ELLIOT_2, TRAINER_ELLIOT_3, TRAINER_ELLIOT_4, TRAINER_ELLIOT_5}, 0x0, 0x15},
|
||||
[REMATCH_ISAIAH] = {{TRAINER_ISAIAH_1, TRAINER_ISAIAH_2, TRAINER_ISAIAH_3, TRAINER_ISAIAH_4, TRAINER_ISAIAH_5}, 0x0, 0x2b},
|
||||
[REMATCH_MARIA] = {{TRAINER_MARIA_1, TRAINER_MARIA_2, TRAINER_MARIA_3, TRAINER_MARIA_4, TRAINER_MARIA_5}, 0x0, 0x20},
|
||||
[REMATCH_ABIGAIL] = {{TRAINER_ABIGAIL_1, TRAINER_ABIGAIL_2, TRAINER_ABIGAIL_3, TRAINER_ABIGAIL_4, TRAINER_ABIGAIL_5}, 0x0, 0x19},
|
||||
[REMATCH_DYLAN] = {{TRAINER_DYLAN_1, TRAINER_DYLAN_2, TRAINER_DYLAN_3, TRAINER_DYLAN_4, TRAINER_DYLAN_5}, 0x0, 0x20},
|
||||
[REMATCH_KATELYN] = {{TRAINER_KATELYN_1, TRAINER_KATELYN_2, TRAINER_KATELYN_3, TRAINER_KATELYN_4, TRAINER_KATELYN_5}, 0x0, 0x2b},
|
||||
[REMATCH_BENJAMIN] = {{TRAINER_BENJAMIN_1, TRAINER_BENJAMIN_2, TRAINER_BENJAMIN_3, TRAINER_BENJAMIN_4, TRAINER_BENJAMIN_5}, 0x0, 0x19},
|
||||
[REMATCH_PABLO] = {{TRAINER_PABLO_1, TRAINER_PABLO_2, TRAINER_PABLO_3, TRAINER_PABLO_4, TRAINER_PABLO_5}, 0x0, 0x29},
|
||||
[REMATCH_NICOLAS] = {{TRAINER_NICOLAS_1, TRAINER_NICOLAS_2, TRAINER_NICOLAS_3, TRAINER_NICOLAS_4, TRAINER_NICOLAS_5}, 0x18, 0x1},
|
||||
[REMATCH_ROBERT] = {{TRAINER_ROBERT_1, TRAINER_ROBERT_2, TRAINER_ROBERT_3, TRAINER_ROBERT_4, TRAINER_ROBERT_5}, 0x0, 0x23},
|
||||
[REMATCH_LAO] = {{TRAINER_LAO_1, TRAINER_LAO_2, TRAINER_LAO_3, TRAINER_LAO_4, TRAINER_LAO_5}, 0x0, 0x1c},
|
||||
[REMATCH_CYNDY] = {{TRAINER_CYNDY_1, TRAINER_CYNDY_2, TRAINER_CYNDY_3, TRAINER_CYNDY_4, TRAINER_CYNDY_5}, 0x0, 0x1e},
|
||||
[REMATCH_MADELINE] = {{TRAINER_MADELINE_1, TRAINER_MADELINE_2, TRAINER_MADELINE_3, TRAINER_MADELINE_4, TRAINER_MADELINE_5}, 0x0, 0x1c},
|
||||
[REMATCH_JENNY] = {{TRAINER_JENNY_1, TRAINER_JENNY_2, TRAINER_JENNY_3, TRAINER_JENNY_4, TRAINER_JENNY_5}, 0x0, 0x27},
|
||||
[REMATCH_DIANA] = {{TRAINER_DIANA_1, TRAINER_DIANA_2, TRAINER_DIANA_3, TRAINER_DIANA_4, TRAINER_DIANA_5}, 0x18, 0xd},
|
||||
[REMATCH_AMY_AND_LIV] = {{TRAINER_AMY_AND_LIV_1, TRAINER_AMY_AND_LIV_2, TRAINER_AMY_AND_LIV_4, TRAINER_AMY_AND_LIV_5, TRAINER_AMY_AND_LIV_6}, 0x0, 0x12},
|
||||
[REMATCH_ERNEST] = {{TRAINER_ERNEST_1, TRAINER_ERNEST_2, TRAINER_ERNEST_3, TRAINER_ERNEST_4, TRAINER_ERNEST_5}, 0x0, 0x28},
|
||||
[REMATCH_CORY] = {{TRAINER_CORY_1, TRAINER_CORY_2, TRAINER_CORY_3, TRAINER_CORY_4, TRAINER_CORY_5}, 0x0, 0x17},
|
||||
[REMATCH_EDWIN] = {{TRAINER_EDWIN_1, TRAINER_EDWIN_2, TRAINER_EDWIN_3, TRAINER_EDWIN_4, TRAINER_EDWIN_5}, 0x0, 0x19},
|
||||
[REMATCH_LYDIA] = {{TRAINER_LYDIA_1, TRAINER_LYDIA_2, TRAINER_LYDIA_3, TRAINER_LYDIA_4, TRAINER_LYDIA_5}, 0x0, 0x20},
|
||||
[REMATCH_ISAAC] = {{TRAINER_ISAAC_1, TRAINER_ISAAC_2, TRAINER_ISAAC_3, TRAINER_ISAAC_4, TRAINER_ISAAC_5}, 0x0, 0x20},
|
||||
[REMATCH_GABRIELLE] = {{TRAINER_GABRIELLE_1, TRAINER_GABRIELLE_2, TRAINER_GABRIELLE_3, TRAINER_GABRIELLE_4, TRAINER_GABRIELLE_5}, 0x18, 0x11},
|
||||
[REMATCH_CATHERINE] = {{TRAINER_CATHERINE_1, TRAINER_CATHERINE_2, TRAINER_CATHERINE_3, TRAINER_CATHERINE_4, TRAINER_CATHERINE_5}, 0x0, 0x22},
|
||||
[REMATCH_JACKSON] = {{TRAINER_JACKSON_1, TRAINER_JACKSON_2, TRAINER_JACKSON_3, TRAINER_JACKSON_4, TRAINER_JACKSON_5}, 0x0, 0x22},
|
||||
[REMATCH_HALEY] = {{TRAINER_HALEY_1, TRAINER_HALEY_2, TRAINER_HALEY_3, TRAINER_HALEY_4, TRAINER_HALEY_5}, 0x0, 0x13},
|
||||
[REMATCH_JAMES] = {{TRAINER_JAMES_1, TRAINER_JAMES_2, TRAINER_JAMES_3, TRAINER_JAMES_4, TRAINER_JAMES_5}, 0x18, 0xb},
|
||||
[REMATCH_TRENT] = {{TRAINER_TRENT_1, TRAINER_TRENT_2, TRAINER_TRENT_3, TRAINER_TRENT_4, TRAINER_TRENT_5}, 0x0, 0x1b},
|
||||
[REMATCH_SAWYER] = {{TRAINER_SAWYER_1, TRAINER_SAWYER_2, TRAINER_SAWYER_3, TRAINER_SAWYER_4, TRAINER_SAWYER_5}, 0x18, 0xc},
|
||||
[REMATCH_KIRA_AND_DAN] = {{TRAINER_KIRA_AND_DAN_1, TRAINER_KIRA_AND_DAN_2, TRAINER_KIRA_AND_DAN_3, TRAINER_KIRA_AND_DAN_4, TRAINER_KIRA_AND_DAN_5}, 0x18, 0x3e},
|
||||
[REMATCH_WALLY_3] = {{TRAINER_WALLY_3, TRAINER_WALLY_4, TRAINER_WALLY_5, TRAINER_WALLY_6, TRAINER_WALLY_6}, 0x18, 0x2b},
|
||||
[REMATCH_ROXANNE] = {{TRAINER_ROXANNE_1, TRAINER_ROXANNE_2, TRAINER_ROXANNE_3, TRAINER_ROXANNE_4, TRAINER_ROXANNE_5}, 0x0, 0x3},
|
||||
[REMATCH_BRAWLY] = {{TRAINER_BRAWLY_1, TRAINER_BRAWLY_2, TRAINER_BRAWLY_3, TRAINER_BRAWLY_4, TRAINER_BRAWLY_5}, 0x0, 0xb},
|
||||
[REMATCH_WATTSON] = {{TRAINER_WATTSON_1, TRAINER_WATTSON_2, TRAINER_WATTSON_3, TRAINER_WATTSON_4, TRAINER_WATTSON_5}, 0x0, 0x2},
|
||||
[REMATCH_FLANNERY] = {{TRAINER_FLANNERY_1, TRAINER_FLANNERY_2, TRAINER_FLANNERY_3, TRAINER_FLANNERY_4, TRAINER_FLANNERY_5}, 0x0, 0xc},
|
||||
[REMATCH_NORMAN] = {{TRAINER_NORMAN_1, TRAINER_NORMAN_2, TRAINER_NORMAN_3, TRAINER_NORMAN_4, TRAINER_NORMAN_5}, 0x0, 0x0},
|
||||
[REMATCH_WINONA] = {{TRAINER_WINONA_1, TRAINER_WINONA_2, TRAINER_WINONA_3, TRAINER_WINONA_4, TRAINER_WINONA_5}, 0x0, 0x4},
|
||||
[REMATCH_TATE_AND_LIZA] = {{TRAINER_TATE_AND_LIZA_1, TRAINER_TATE_AND_LIZA_2, TRAINER_TATE_AND_LIZA_3, TRAINER_TATE_AND_LIZA_4, TRAINER_TATE_AND_LIZA_5}, 0x0, 0x6},
|
||||
[REMATCH_JUAN] = {{TRAINER_JUAN_1, TRAINER_JUAN_2, TRAINER_JUAN_3, TRAINER_JUAN_4, TRAINER_JUAN_5}, 0x0, 0x7},
|
||||
[REMATCH_SIDNEY] = {{TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY, TRAINER_SIDNEY}, 0x0, 0x8},
|
||||
[REMATCH_PHOEBE] = {{TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE, TRAINER_PHOEBE}, 0x0, 0x8},
|
||||
[REMATCH_GLACIA] = {{TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA, TRAINER_GLACIA}, 0x0, 0x8},
|
||||
[REMATCH_DRAKE] = {{TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE, TRAINER_DRAKE}, 0x0, 0x8},
|
||||
[REMATCH_WALLACE] = {{TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE, TRAINER_WALLACE}, 0x0, 0x8},
|
||||
};
|
||||
|
||||
static const u16 sBadgeFlags[8] =
|
||||
@ -1545,7 +1545,7 @@ static bool32 sub_80B1D94(s32 rematchTableId)
|
||||
{
|
||||
if (rematchTableId >= REMATCH_ELITE_FOUR_ENTRIES)
|
||||
return TRUE;
|
||||
else if (rematchTableId == REMATCH_WALLY_ENTRY)
|
||||
else if (rematchTableId == REMATCH_WALLY_3)
|
||||
return (FlagGet(FLAG_DEFEATED_WALLY_VICTORY_ROAD) == FALSE);
|
||||
else
|
||||
return FALSE;
|
||||
@ -1573,7 +1573,7 @@ static bool32 UpdateRandomTrainerRematches(const struct RematchTrainer *table, u
|
||||
s32 i;
|
||||
bool32 ret = FALSE;
|
||||
|
||||
for (i = 0; i <= REMATCH_WALLY_ENTRY; i++)
|
||||
for (i = 0; i <= REMATCH_WALLY_3; i++)
|
||||
{
|
||||
if (table[i].mapGroup == mapGroup && table[i].mapNum == mapNum && !sub_80B1D94(i))
|
||||
{
|
||||
|
@ -25,42 +25,42 @@ EWRAM_DATA static u8 sBraillePuzzleCallbackFlag = 0;
|
||||
|
||||
static const u8 gRegicePathCoords[][2] =
|
||||
{
|
||||
{0x04, 0x15},
|
||||
{0x05, 0x15},
|
||||
{0x06, 0x15},
|
||||
{0x07, 0x15},
|
||||
{0x08, 0x15},
|
||||
{0x09, 0x15},
|
||||
{0x0a, 0x15},
|
||||
{0x0b, 0x15},
|
||||
{0x0c, 0x15},
|
||||
{0x0c, 0x16},
|
||||
{0x0c, 0x17},
|
||||
{0x0d, 0x17},
|
||||
{0x0d, 0x18},
|
||||
{0x0d, 0x19},
|
||||
{0x0d, 0x1a},
|
||||
{0x0d, 0x1b},
|
||||
{0x0c, 0x1b},
|
||||
{0x0c, 0x1c},
|
||||
{0x04, 0x1d},
|
||||
{0x05, 0x1d},
|
||||
{0x06, 0x1d},
|
||||
{0x07, 0x1d},
|
||||
{0x08, 0x1d},
|
||||
{0x09, 0x1d},
|
||||
{0x0a, 0x1d},
|
||||
{0x0b, 0x1d},
|
||||
{0x0c, 0x1d},
|
||||
{0x04, 0x1c},
|
||||
{0x04, 0x1b},
|
||||
{0x03, 0x1b},
|
||||
{0x03, 0x1a},
|
||||
{0x03, 0x19},
|
||||
{0x03, 0x18},
|
||||
{0x03, 0x17},
|
||||
{0x04, 0x17},
|
||||
{0x04, 0x16},
|
||||
{4, 21},
|
||||
{5, 21},
|
||||
{6, 21},
|
||||
{7, 21},
|
||||
{8, 21},
|
||||
{9, 21},
|
||||
{10, 21},
|
||||
{11, 21},
|
||||
{12, 21},
|
||||
{12, 22},
|
||||
{12, 23},
|
||||
{13, 23},
|
||||
{13, 24},
|
||||
{13, 25},
|
||||
{13, 26},
|
||||
{13, 27},
|
||||
{12, 27},
|
||||
{12, 28},
|
||||
{4, 29},
|
||||
{5, 29},
|
||||
{6, 29},
|
||||
{7, 29},
|
||||
{8, 29},
|
||||
{9, 29},
|
||||
{10, 29},
|
||||
{11, 29},
|
||||
{12, 29},
|
||||
{4, 28},
|
||||
{4, 27},
|
||||
{3, 27},
|
||||
{3, 26},
|
||||
{3, 25},
|
||||
{3, 24},
|
||||
{3, 23},
|
||||
{4, 23},
|
||||
{4, 22},
|
||||
};
|
||||
|
||||
void SealedChamberShakingEffect(u8);
|
||||
|
19
src/bug.c
19
src/bug.c
@ -6,7 +6,7 @@
|
||||
|
||||
void sub_8110368(struct Sprite *);
|
||||
void sub_8110438(struct Sprite *);
|
||||
void sub_81104E4(struct Sprite *);
|
||||
void AnimTranslateWebThread(struct Sprite *);
|
||||
void sub_81105B4(struct Sprite *);
|
||||
void sub_811067C(struct Sprite *);
|
||||
void AnimTranslateStinger(struct Sprite *);
|
||||
@ -90,7 +90,7 @@ const struct SpriteTemplate gUnknown_085969C8 =
|
||||
.callback = sub_8110438,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_085969E0 =
|
||||
const struct SpriteTemplate gWebThreadSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_WEB_THREAD,
|
||||
.paletteTag = ANIM_TAG_WEB_THREAD,
|
||||
@ -98,7 +98,7 @@ const struct SpriteTemplate gUnknown_085969E0 =
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = sub_81104E4,
|
||||
.callback = AnimTranslateWebThread,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_085969F8 =
|
||||
@ -124,7 +124,7 @@ const union AffineAnimCmd *const gUnknown_08596A28[] =
|
||||
gUnknown_08596A10,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08596A2C =
|
||||
const struct SpriteTemplate gSpiderWebSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_SPIDER_WEB,
|
||||
.paletteTag = ANIM_TAG_SPIDER_WEB,
|
||||
@ -247,12 +247,19 @@ void sub_8110438(struct Sprite *sprite)
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_81104E4(struct Sprite *sprite)
|
||||
// Creates a single web thread that travels from attacker to target.
|
||||
// Used by MOVE_STRING_SHOT and MOVE_SPIDER_WEB in their first move phase.
|
||||
// arg 0: x
|
||||
// arg 1: y
|
||||
// arg 2: controls the left-to-right movement
|
||||
// arg 3: amplitude
|
||||
// arg 4: if targets both opponents
|
||||
void AnimTranslateWebThread(struct Sprite *sprite)
|
||||
{
|
||||
if (IsContest())
|
||||
gBattleAnimArgs[2] /= 2;
|
||||
|
||||
InitSpritePosToAnimAttacker(sprite, 1);
|
||||
InitSpritePosToAnimAttacker(sprite, TRUE);
|
||||
sprite->data[0] = gBattleAnimArgs[2];
|
||||
sprite->data[1] = sprite->pos1.x;
|
||||
sprite->data[3] = sprite->pos1.y;
|
||||
|
53
src/cable_car.c
Executable file → Normal file
53
src/cable_car.c
Executable file → Normal file
@ -151,25 +151,46 @@ const struct SpritePalette gUnknown_085CDB74[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
const struct OamData gOamData_85CDB84 = {
|
||||
const struct OamData gOamData_85CDB84 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_DOUBLE,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(64x64),
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(64x64),
|
||||
.priority = 2
|
||||
.tileNum = 0,
|
||||
.priority = 2,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
|
||||
const struct OamData gOamData_85CDB8C = {
|
||||
const struct OamData gOamData_85CDB8C =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_DOUBLE,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(16x8),
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(16x8),
|
||||
.priority = 2
|
||||
.tileNum = 0,
|
||||
.priority = 2,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
|
||||
const struct OamData gOamData_85CDB94 = {
|
||||
const struct OamData gOamData_85CDB94 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_DOUBLE,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(16x16),
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(16x16),
|
||||
.priority = 2
|
||||
.tileNum = 0,
|
||||
.priority = 2,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gSpriteTemplate_85CDB9C[] =
|
||||
@ -407,13 +428,12 @@ static void sub_81503E4(u8 taskId)
|
||||
case WEATHER_ASH:
|
||||
if (gWeatherPtr->sprites.s2.ashSprites[0] != NULL && gWeatherPtr->sprites.s2.ashSprites[0]->oam.priority != 0)
|
||||
{
|
||||
for (; i < 20; i++)
|
||||
for (; i < NUM_ASH_SPRITES; i++)
|
||||
{
|
||||
if (gWeatherPtr->sprites.s2.ashSprites[i] != NULL)
|
||||
{
|
||||
if (gWeatherPtr->sprites.s2.ashSprites[i])
|
||||
gWeatherPtr->sprites.s2.ashSprites[i]->oam.priority = 0;
|
||||
}
|
||||
}
|
||||
|
||||
sCableCar->state = 2;
|
||||
}
|
||||
break;
|
||||
@ -424,12 +444,10 @@ static void sub_81503E4(u8 taskId)
|
||||
}
|
||||
else if (sCableCar->timer >= sCableCar->unk4 + 8)
|
||||
{
|
||||
for (; i < 20; i++)
|
||||
for (; i < NUM_ASH_SPRITES; i++)
|
||||
{
|
||||
if (gWeatherPtr->sprites.s2.ashSprites[i] != NULL)
|
||||
{
|
||||
gWeatherPtr->sprites.s2.ashSprites[i]->invisible ^= TRUE;
|
||||
}
|
||||
if (gWeatherPtr->sprites.s2.ashSprites[i])
|
||||
gWeatherPtr->sprites.s2.ashSprites[i]->invisible ^= 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -445,9 +463,7 @@ static void sub_81503E4(u8 taskId)
|
||||
break;
|
||||
case 3:
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
sCableCar->state = 0xFF;
|
||||
}
|
||||
break;
|
||||
case 0xFF:
|
||||
SetVBlankCallback(NULL);
|
||||
@ -536,7 +552,7 @@ static void sub_8150664(u8 taskId)
|
||||
if (sCableCar->timer < sCableCar->unk4)
|
||||
gSpriteCoordOffsetX = (gSpriteCoordOffsetX + 247) % 248;
|
||||
else
|
||||
gWeatherPtr->unknown_6FC = (gWeatherPtr->unknown_6FC + 247) % 248;
|
||||
gWeatherPtr->ashBaseSpritesX = (gWeatherPtr->ashBaseSpritesX + 247) % 248;
|
||||
}
|
||||
|
||||
static void CableCarVblankCallback(void)
|
||||
@ -1007,3 +1023,4 @@ static void sub_81514C8(u8 arg0)
|
||||
|
||||
sCableCar->unk1C = 0;
|
||||
}
|
||||
|
||||
|
@ -445,18 +445,15 @@ const struct CompressedSpriteSheet gUnknown_08587B88 =
|
||||
const struct OamData gOamData_8587B90 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(16x16),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(16x16),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gSpriteTemplate_8587B98 =
|
||||
@ -486,18 +483,15 @@ const struct SpritePalette gUnknown_08587BB8 =
|
||||
const struct OamData gOamData_8587BC0 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(64x32),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(64x32),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gSpriteTemplate_8587BC8 =
|
||||
@ -514,18 +508,15 @@ const struct SpriteTemplate gSpriteTemplate_8587BC8 =
|
||||
const struct OamData gOamData_8587BE0 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(64x64),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(64x64),
|
||||
.tileNum = 0,
|
||||
.priority = 3,
|
||||
.paletteNum = 2,
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gSpriteTemplate_8587BE8 =
|
||||
@ -768,18 +759,16 @@ static const struct SpritePalette sUnknown_08589924[] =
|
||||
const struct OamData gOamData_8589944 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 3,
|
||||
.objMode = 1,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.affineMode = ST_OAM_AFFINE_DOUBLE,
|
||||
.objMode = ST_OAM_OBJ_BLEND,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(64x64),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(64x64),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
const union AffineAnimCmd gSpriteAffineAnim_858994C[] =
|
||||
@ -5762,3 +5751,5 @@ void sub_80DFA08(struct ContestPokemon *mon, s32 language)
|
||||
name[PLAYER_NAME_LENGTH] = EOS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -152,16 +152,14 @@ const struct OamData gUnknown_085B0830 =
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.mosaic = 1,
|
||||
.mosaic = TRUE,
|
||||
.bpp = ST_OAM_8BPP,
|
||||
.shape = SPRITE_SHAPE(64x64),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(64x64),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
const u16 gUnknown_085B0838[] = {RGB(0, 0, 0), RGB(0, 0, 0)};
|
||||
@ -705,3 +703,4 @@ static void sub_8130884(u8 arg0, u8 arg1)
|
||||
sub_8130688(arg0);
|
||||
sub_8130430(arg0, arg1);
|
||||
}
|
||||
|
||||
|
44
src/dark.c
44
src/dark.c
@ -803,17 +803,23 @@ void sub_81144BC(struct Sprite *sprite)
|
||||
StoreSpriteCallbackInData6(sprite, DestroyAnimSprite);
|
||||
}
|
||||
|
||||
void sub_81144F8(u8 taskId)
|
||||
// Makes the attacker metallic and shining.
|
||||
// Used by MOVE_HARDEN and MOVE_IRON_DEFENSE.
|
||||
// arg0: if true won't change battler's palette back
|
||||
// arg1: if true, use custom color
|
||||
// arg2: custom color
|
||||
// Custom color argument is used in MOVE_POISON_TAIL to make the mon turn purplish/pinkish as if became cloaked in poison.
|
||||
void AnimTask_MetallicShine(u8 taskId)
|
||||
{
|
||||
u16 species;
|
||||
u8 spriteId;
|
||||
u8 newSpriteId;
|
||||
u16 paletteNum;
|
||||
struct BattleAnimBgData animBg;
|
||||
int var0 = 0;
|
||||
bool32 priorityChanged = FALSE;
|
||||
|
||||
gBattle_WIN0H = var0;
|
||||
gBattle_WIN0V = var0;
|
||||
gBattle_WIN0H = 0;
|
||||
gBattle_WIN0V = 0;
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WINOBJ_BG_ALL | WINOUT_WINOBJ_OBJ | WINOUT_WINOBJ_CLR | WINOUT_WIN01_BG0 | WINOUT_WIN01_BG2 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ | WINOUT_WIN01_CLR);
|
||||
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJWIN_ON);
|
||||
@ -832,7 +838,7 @@ void sub_81144F8(u8 taskId)
|
||||
{
|
||||
gSprites[gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]].oam.priority--;
|
||||
SetAnimBgAttribute(1, BG_ANIM_PRIORITY, 1);
|
||||
var0 = 1;
|
||||
priorityChanged = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -861,7 +867,7 @@ void sub_81144F8(u8 taskId)
|
||||
gBattle_BG1_Y = -gSprites[spriteId].pos1.y + 32;
|
||||
paletteNum = 16 + gSprites[spriteId].oam.paletteNum;
|
||||
|
||||
if (gBattleAnimArgs[1] == 0)
|
||||
if (gBattleAnimArgs[1] == 0)
|
||||
SetGreyscaleOrOriginalPalette(paletteNum, FALSE);
|
||||
else
|
||||
BlendPalette(paletteNum * 16, 16, 11, gBattleAnimArgs[2]);
|
||||
@ -870,7 +876,7 @@ void sub_81144F8(u8 taskId)
|
||||
gTasks[taskId].data[1] = gBattleAnimArgs[0];
|
||||
gTasks[taskId].data[2] = gBattleAnimArgs[1];
|
||||
gTasks[taskId].data[3] = gBattleAnimArgs[2];
|
||||
gTasks[taskId].data[6] = var0;
|
||||
gTasks[taskId].data[6] = priorityChanged;
|
||||
gTasks[taskId].func = sub_8114748;
|
||||
}
|
||||
|
||||
@ -879,29 +885,28 @@ static void sub_8114748(u8 taskId)
|
||||
struct BattleAnimBgData animBg;
|
||||
u16 paletteNum;
|
||||
u8 spriteId;
|
||||
u8 taskIdCopy = taskId;
|
||||
|
||||
gTasks[taskIdCopy].data[10] += 4;
|
||||
gTasks[taskId].data[10] += 4;
|
||||
gBattle_BG1_X -= 4;
|
||||
if (gTasks[taskIdCopy].data[10] == 128)
|
||||
if (gTasks[taskId].data[10] == 128)
|
||||
{
|
||||
gTasks[taskIdCopy].data[10] = 0;
|
||||
gTasks[taskId].data[10] = 0;
|
||||
gBattle_BG1_X += 128;
|
||||
gTasks[taskIdCopy].data[11]++;
|
||||
if (gTasks[taskIdCopy].data[11] == 2)
|
||||
gTasks[taskId].data[11]++;
|
||||
if (gTasks[taskId].data[11] == 2)
|
||||
{
|
||||
spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||
paletteNum = 16 + gSprites[spriteId].oam.paletteNum;
|
||||
if (gTasks[taskIdCopy].data[1] == 0)
|
||||
if (gTasks[taskId].data[1] == 0)
|
||||
SetGreyscaleOrOriginalPalette(paletteNum, 1);
|
||||
|
||||
DestroySprite(&gSprites[gTasks[taskIdCopy].data[0]]);
|
||||
DestroySprite(&gSprites[gTasks[taskId].data[0]]);
|
||||
sub_80A6B30(&animBg);
|
||||
sub_80A6C68(animBg.bgId);
|
||||
if (gTasks[taskIdCopy].data[6] == 1)
|
||||
if (gTasks[taskId].data[6] == 1)
|
||||
gSprites[gBattlerSpriteIds[BATTLE_PARTNER(gBattleAnimAttacker)]].oam.priority++;
|
||||
}
|
||||
else if (gTasks[taskIdCopy].data[11] == 3)
|
||||
else if (gTasks[taskId].data[11] == 3)
|
||||
{
|
||||
gBattle_WIN0H = 0;
|
||||
gBattle_WIN0V = 0;
|
||||
@ -918,7 +923,10 @@ static void sub_8114748(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_811489C(u8 taskId)
|
||||
// Changes battler's palette to either greyscale or original.
|
||||
// arg0: which battler
|
||||
// arg1: 0 grayscale, 1 original
|
||||
void AnimTask_SetGreyscaleOrOriginalPal(u8 taskId)
|
||||
{
|
||||
u8 spriteId;
|
||||
u8 battler;
|
||||
|
@ -391,10 +391,18 @@ const struct SpritePalette gUnknown_085A73E0 = {
|
||||
Unknown_085A7328, OVERWORLD_PLACE_DECOR_PLAYER_PAL_TAG
|
||||
};
|
||||
|
||||
const struct OamData Unknown_085A73E8 = {
|
||||
const struct OamData Unknown_085A73E8 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(16x16),
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(16x16),
|
||||
.priority = 1
|
||||
.tileNum = 0,
|
||||
.priority = 1,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
|
||||
const union AnimCmd Unknown_085A73F0[] = {
|
||||
@ -2740,3 +2748,4 @@ void sub_812A478(u8 taskId)
|
||||
StringExpandPlaceholders(gStringVar4, gText_DecorationThrownAway);
|
||||
DisplayItemMessageOnField(taskId, gStringVar4, sub_8127A5C);
|
||||
}
|
||||
|
||||
|
@ -1949,7 +1949,7 @@ void EventObjectSetGraphicsId(struct EventObject *eventObject, u8 graphicsId)
|
||||
sprite->oam.paletteNum = paletteSlot;
|
||||
eventObject->inanimate = graphicsInfo->inanimate;
|
||||
eventObject->graphicsId = graphicsId;
|
||||
sub_8093038(eventObject->currentCoords.x, eventObject->currentCoords.y, &sprite->pos1.x, &sprite->pos1.y);
|
||||
SetSpritePosToMapCoords(eventObject->currentCoords.x, eventObject->currentCoords.y, &sprite->pos1.x, &sprite->pos1.y);
|
||||
sprite->centerToCornerVecX = -(graphicsInfo->width >> 1);
|
||||
sprite->centerToCornerVecY = -(graphicsInfo->height >> 1);
|
||||
sprite->pos1.x += 8;
|
||||
@ -2253,7 +2253,7 @@ void sub_808EB08(struct EventObject *eventObject, s16 x, s16 y)
|
||||
sprite = &gSprites[eventObject->spriteId];
|
||||
graphicsInfo = GetEventObjectGraphicsInfo(eventObject->graphicsId);
|
||||
SetEventObjectCoords(eventObject, x, y);
|
||||
sub_8093038(eventObject->currentCoords.x, eventObject->currentCoords.y, &sprite->pos1.x, &sprite->pos1.y);
|
||||
SetSpritePosToMapCoords(eventObject->currentCoords.x, eventObject->currentCoords.y, &sprite->pos1.x, &sprite->pos1.y);
|
||||
sprite->centerToCornerVecX = -(graphicsInfo->width >> 1);
|
||||
sprite->centerToCornerVecY = -(graphicsInfo->height >> 1);
|
||||
sprite->pos1.x += 8;
|
||||
@ -4414,8 +4414,8 @@ bool8 CopyablePlayerMovement_GoSpeed0(struct EventObject *eventObject, struct Sp
|
||||
direction = playerDirection;
|
||||
if (EventObjectIsFarawayIslandMew(eventObject))
|
||||
{
|
||||
direction = sub_81D427C();
|
||||
if (direction == 0)
|
||||
direction = GetMewMoveDirection();
|
||||
if (direction == DIR_NONE)
|
||||
{
|
||||
direction = playerDirection;
|
||||
direction = state_to_direction(gInitialMovementTypeFacingDirections[eventObject->movementType], eventObject->directionSequenceIndex, direction);
|
||||
@ -5024,44 +5024,37 @@ static void MoveCoordsInDirection(u32 dir, s16 *x, s16 *y, s16 deltaX, s16 delta
|
||||
*y -= dy2;
|
||||
}
|
||||
|
||||
void sub_8092FF0(s16 x, s16 y, s16 *dest_x, s16 *dest_y)
|
||||
void sub_8092FF0(s16 x, s16 y, s16 *destX, s16 *destY)
|
||||
{
|
||||
*dest_x = (x - gSaveBlock1Ptr->pos.x) << 4;
|
||||
*dest_y = (y - gSaveBlock1Ptr->pos.y) << 4;
|
||||
*dest_x -= gTotalCameraPixelOffsetX;
|
||||
*dest_y -= gTotalCameraPixelOffsetY;
|
||||
*destX = (x - gSaveBlock1Ptr->pos.x) << 4;
|
||||
*destY = (y - gSaveBlock1Ptr->pos.y) << 4;
|
||||
*destX -= gTotalCameraPixelOffsetX;
|
||||
*destY -= gTotalCameraPixelOffsetY;
|
||||
}
|
||||
|
||||
void sub_8093038(s16 x, s16 y, s16 *dest_x, s16 *dest_y)
|
||||
void SetSpritePosToMapCoords(s16 mapX, s16 mapY, s16 *destX, s16 *destY)
|
||||
{
|
||||
s16 dx;
|
||||
s16 dy;
|
||||
|
||||
dx = -gTotalCameraPixelOffsetX - gFieldCamera.x;
|
||||
dy = -gTotalCameraPixelOffsetY - gFieldCamera.y;
|
||||
s16 dx = -gTotalCameraPixelOffsetX - gFieldCamera.x;
|
||||
s16 dy = -gTotalCameraPixelOffsetY - gFieldCamera.y;
|
||||
if (gFieldCamera.x > 0)
|
||||
{
|
||||
dx += 0x10;
|
||||
}
|
||||
dx += 1 << 4;
|
||||
|
||||
if (gFieldCamera.x < 0)
|
||||
{
|
||||
dx -= 0x10;
|
||||
}
|
||||
dx -= 1 << 4;
|
||||
|
||||
if (gFieldCamera.y > 0)
|
||||
{
|
||||
dy += 0x10;
|
||||
}
|
||||
dy += 1 << 4;
|
||||
|
||||
if (gFieldCamera.y < 0)
|
||||
{
|
||||
dy -= 0x10;
|
||||
}
|
||||
*dest_x = ((x - gSaveBlock1Ptr->pos.x) << 4) + dx;
|
||||
*dest_y = ((y - gSaveBlock1Ptr->pos.y) << 4) + dy;
|
||||
dy -= 1 << 4;
|
||||
|
||||
*destX = ((mapX - gSaveBlock1Ptr->pos.x) << 4) + dx;
|
||||
*destY = ((mapY - gSaveBlock1Ptr->pos.y) << 4) + dy;
|
||||
}
|
||||
|
||||
void sub_80930E0(s16 *x, s16 *y, s16 dx, s16 dy)
|
||||
{
|
||||
sub_8093038(*x, *y, x, y);
|
||||
SetSpritePosToMapCoords(*x, *y, x, y);
|
||||
*x += dx;
|
||||
*y += dy;
|
||||
}
|
||||
|
@ -17,12 +17,13 @@ static u8 sub_81D4C9C(struct EventObject*, u8);
|
||||
static u8 sub_81D4C58(struct EventObject*, u8);
|
||||
static u8 sub_81D4CE0(struct EventObject*, u8);
|
||||
static u8 sub_81D4D24(u8);
|
||||
static bool8 sub_81D4834(s16, s16);
|
||||
static bool8 CanMewWalkToCoords(s16, s16);
|
||||
|
||||
extern u8 gUnknown_0203CF50;
|
||||
extern s16 gUnknown_030012F8;
|
||||
extern s16 gUnknown_030012FA;
|
||||
extern u8 gUnknown_030012FC[4];
|
||||
static EWRAM_DATA u8 sUnknown_0203CF50 = 0;
|
||||
|
||||
static s16 sPlayerToMewDeltaX;
|
||||
static s16 sPlayerToMewDeltaY;
|
||||
static u8 sMewDirectionCandidates[4];
|
||||
|
||||
extern const struct SpritePalette gFieldEffectObjectPaletteInfo1;
|
||||
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
|
||||
@ -35,23 +36,23 @@ static const s16 sFarawayIslandRockCoords[4][2] =
|
||||
{20, 20},
|
||||
};
|
||||
|
||||
static u8 sub_81D4258(void)
|
||||
static u8 GetMewEventObjectId(void)
|
||||
{
|
||||
u8 eventObjectId;
|
||||
TryGetEventObjectIdByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &eventObjectId);
|
||||
return eventObjectId;
|
||||
}
|
||||
|
||||
u32 sub_81D427C(void)
|
||||
u32 GetMewMoveDirection(void)
|
||||
{
|
||||
u8 i;
|
||||
int skip;
|
||||
struct EventObject *mew = &gEventObjects[sub_81D4258()];
|
||||
struct EventObject *mew = &gEventObjects[GetMewEventObjectId()];
|
||||
|
||||
gUnknown_030012F8 = gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x - mew->currentCoords.x;
|
||||
gUnknown_030012FA = gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y - mew->currentCoords.y;
|
||||
for (i = 0; i < ARRAY_COUNT(gUnknown_030012FC); i++)
|
||||
gUnknown_030012FC[i] = DIR_NONE;
|
||||
sPlayerToMewDeltaX = gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x - mew->currentCoords.x;
|
||||
sPlayerToMewDeltaY = gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y - mew->currentCoords.y;
|
||||
for (i = 0; i < ARRAY_COUNT(sMewDirectionCandidates); i++)
|
||||
sMewDirectionCandidates[i] = DIR_NONE;
|
||||
|
||||
if (gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x == gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.x
|
||||
&& gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y == gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.y)
|
||||
@ -85,33 +86,33 @@ u32 sub_81D427C(void)
|
||||
|
||||
if (!skip)
|
||||
{
|
||||
if (gUnknown_030012F8 > 0)
|
||||
if (sPlayerToMewDeltaX > 0)
|
||||
{
|
||||
if (mew->currentCoords.x + 1 == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
return DIR_EAST;
|
||||
}
|
||||
}
|
||||
else if (gUnknown_030012F8 < 0)
|
||||
else if (sPlayerToMewDeltaX < 0)
|
||||
{
|
||||
if (mew->currentCoords.x - 1 == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
return DIR_WEST;
|
||||
}
|
||||
}
|
||||
|
||||
if (mew->currentCoords.x == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x)
|
||||
{
|
||||
if (gUnknown_030012FA > 0)
|
||||
if (sPlayerToMewDeltaY > 0)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
return DIR_NORTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
return DIR_SOUTH;
|
||||
}
|
||||
}
|
||||
@ -134,33 +135,33 @@ u32 sub_81D427C(void)
|
||||
|
||||
if (!skip)
|
||||
{
|
||||
if (gUnknown_030012FA > 0)
|
||||
if (sPlayerToMewDeltaY > 0)
|
||||
{
|
||||
if (mew->currentCoords.y + 1 == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
return DIR_SOUTH;
|
||||
}
|
||||
}
|
||||
else if (gUnknown_030012FA < 0)
|
||||
else if (sPlayerToMewDeltaY < 0)
|
||||
{
|
||||
if (mew->currentCoords.y - 1 == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
return DIR_NORTH;
|
||||
}
|
||||
}
|
||||
|
||||
if (mew->currentCoords.y == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y)
|
||||
{
|
||||
if (gUnknown_030012F8 > 0)
|
||||
if (sPlayerToMewDeltaX > 0)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
return DIR_WEST;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
return DIR_EAST;
|
||||
}
|
||||
}
|
||||
@ -208,52 +209,52 @@ u32 sub_81D427C(void)
|
||||
return DIR_WEST;
|
||||
}
|
||||
|
||||
if (gUnknown_030012FA == 0)
|
||||
if (sPlayerToMewDeltaY == 0)
|
||||
{
|
||||
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.y > mew->currentCoords.y)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
return DIR_NORTH;
|
||||
}
|
||||
|
||||
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.y < mew->currentCoords.y)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
return DIR_SOUTH;
|
||||
}
|
||||
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
return DIR_NORTH;
|
||||
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
return DIR_SOUTH;
|
||||
}
|
||||
|
||||
if (gUnknown_030012F8 == 0)
|
||||
if (sPlayerToMewDeltaX == 0)
|
||||
{
|
||||
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.x > mew->currentCoords.x)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
return DIR_WEST;
|
||||
}
|
||||
|
||||
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.x < mew->currentCoords.x)
|
||||
{
|
||||
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
return DIR_EAST;
|
||||
}
|
||||
|
||||
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
return DIR_EAST;
|
||||
|
||||
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
return DIR_WEST;
|
||||
}
|
||||
|
||||
return sub_81D4890(DIR_NONE);
|
||||
}
|
||||
|
||||
static bool8 sub_81D4834(s16 x, s16 y)
|
||||
static bool8 CanMewWalkToCoords(s16 x, s16 y)
|
||||
{
|
||||
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.x == x
|
||||
&& gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.y == y)
|
||||
@ -268,39 +269,39 @@ static u8 sub_81D4890(u8 ignoredDir)
|
||||
{
|
||||
u8 i;
|
||||
u8 count = 0;
|
||||
struct EventObject *mew = &gEventObjects[sub_81D4258()];
|
||||
struct EventObject *mew = &gEventObjects[GetMewEventObjectId()];
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gUnknown_030012FC); i++)
|
||||
gUnknown_030012FC[i] = DIR_NONE;
|
||||
for (i = 0; i < ARRAY_COUNT(sMewDirectionCandidates); i++)
|
||||
sMewDirectionCandidates[i] = DIR_NONE;
|
||||
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1) == TRUE && ignoredDir != DIR_NORTH)
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y - 1) == TRUE && ignoredDir != DIR_NORTH)
|
||||
{
|
||||
gUnknown_030012FC[count] = DIR_NORTH;
|
||||
sMewDirectionCandidates[count] = DIR_NORTH;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y) == TRUE && ignoredDir != DIR_EAST)
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x + 1, mew->currentCoords.y) == TRUE && ignoredDir != DIR_EAST)
|
||||
{
|
||||
gUnknown_030012FC[count] = DIR_EAST;
|
||||
sMewDirectionCandidates[count] = DIR_EAST;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1) == TRUE && ignoredDir != DIR_SOUTH)
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y + 1) == TRUE && ignoredDir != DIR_SOUTH)
|
||||
{
|
||||
gUnknown_030012FC[count] = DIR_SOUTH;
|
||||
sMewDirectionCandidates[count] = DIR_SOUTH;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y) == TRUE && ignoredDir != DIR_WEST)
|
||||
if (CanMewWalkToCoords(mew->currentCoords.x - 1, mew->currentCoords.y) == TRUE && ignoredDir != DIR_WEST)
|
||||
{
|
||||
gUnknown_030012FC[count] = DIR_WEST;
|
||||
sMewDirectionCandidates[count] = DIR_WEST;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count > 1)
|
||||
return gUnknown_030012FC[VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) % count];
|
||||
return sMewDirectionCandidates[VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) % count];
|
||||
else
|
||||
return gUnknown_030012FC[0];
|
||||
return sMewDirectionCandidates[0];
|
||||
}
|
||||
|
||||
void UpdateFarawayIslandStepCounter(void)
|
||||
@ -355,7 +356,7 @@ void sub_81D4A90(void)
|
||||
s16 x;
|
||||
s16 y;
|
||||
u8 spriteId;
|
||||
struct EventObject *mew = &gEventObjects[sub_81D4258()];
|
||||
struct EventObject *mew = &gEventObjects[GetMewEventObjectId()];
|
||||
|
||||
mew->invisible = 0;
|
||||
if (gSpecialVar_0x8004 == 1)
|
||||
@ -378,10 +379,10 @@ void sub_81D4A90(void)
|
||||
x = mew->currentCoords.x;
|
||||
y = mew->currentCoords.y;
|
||||
sub_80930E0(&x, &y, 8, 8);
|
||||
gUnknown_0203CF50 = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[15], x, y, gSprites[mew->spriteId].subpriority - 1);
|
||||
if (gUnknown_0203CF50 != MAX_SPRITES)
|
||||
sUnknown_0203CF50 = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[15], x, y, gSprites[mew->spriteId].subpriority - 1);
|
||||
if (sUnknown_0203CF50 != MAX_SPRITES)
|
||||
{
|
||||
struct Sprite *sprite = &gSprites[gUnknown_0203CF50];
|
||||
struct Sprite *sprite = &gSprites[sUnknown_0203CF50];
|
||||
sprite->coordOffsetEnabled = 1;
|
||||
sprite->oam.priority = 2;
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
@ -391,15 +392,15 @@ void sub_81D4A90(void)
|
||||
|
||||
void sub_81D4BEC(void)
|
||||
{
|
||||
if (gUnknown_0203CF50 != MAX_SPRITES)
|
||||
DestroySprite(&gSprites[gUnknown_0203CF50]);
|
||||
if (sUnknown_0203CF50 != MAX_SPRITES)
|
||||
DestroySprite(&gSprites[sUnknown_0203CF50]);
|
||||
}
|
||||
|
||||
static bool8 sub_81D4C14(struct EventObject *mew, u8 index)
|
||||
{
|
||||
if (gUnknown_030012FA > 0 && sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
if (sPlayerToMewDeltaY > 0 && CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y - 1))
|
||||
{
|
||||
gUnknown_030012FC[index] = DIR_NORTH;
|
||||
sMewDirectionCandidates[index] = DIR_NORTH;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -408,9 +409,9 @@ static bool8 sub_81D4C14(struct EventObject *mew, u8 index)
|
||||
|
||||
static u8 sub_81D4C58(struct EventObject *mew, u8 index)
|
||||
{
|
||||
if (gUnknown_030012F8 < 0 && sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
if (sPlayerToMewDeltaX < 0 && CanMewWalkToCoords(mew->currentCoords.x + 1, mew->currentCoords.y))
|
||||
{
|
||||
gUnknown_030012FC[index] = DIR_EAST;
|
||||
sMewDirectionCandidates[index] = DIR_EAST;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -419,9 +420,9 @@ static u8 sub_81D4C58(struct EventObject *mew, u8 index)
|
||||
|
||||
static u8 sub_81D4C9C(struct EventObject *mew, u8 index)
|
||||
{
|
||||
if (gUnknown_030012FA < 0 && sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
if (sPlayerToMewDeltaY < 0 && CanMewWalkToCoords(mew->currentCoords.x, mew->currentCoords.y + 1))
|
||||
{
|
||||
gUnknown_030012FC[index] = DIR_SOUTH;
|
||||
sMewDirectionCandidates[index] = DIR_SOUTH;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -430,9 +431,9 @@ static u8 sub_81D4C9C(struct EventObject *mew, u8 index)
|
||||
|
||||
static u8 sub_81D4CE0(struct EventObject *mew, u8 index)
|
||||
{
|
||||
if (gUnknown_030012F8 > 0 && sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
if (sPlayerToMewDeltaX > 0 && CanMewWalkToCoords(mew->currentCoords.x - 1, mew->currentCoords.y))
|
||||
{
|
||||
gUnknown_030012FC[index] = DIR_WEST;
|
||||
sMewDirectionCandidates[index] = DIR_WEST;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -441,5 +442,5 @@ static u8 sub_81D4CE0(struct EventObject *mew, u8 index)
|
||||
|
||||
static u8 sub_81D4D24(u8 mod)
|
||||
{
|
||||
return gUnknown_030012FC[VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) % mod];
|
||||
return sMewDirectionCandidates[VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) % mod];
|
||||
}
|
||||
|
@ -284,20 +284,44 @@ bool8 (*const gFieldEffectScriptFuncs[])(u8 **, u32 *) =
|
||||
|
||||
const struct OamData gNewGameBirchOamAttributes =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(64x64),
|
||||
.size = SPRITE_SIZE(64x64)
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(64x64),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
|
||||
const struct OamData gOamData_855C218 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(8x8),
|
||||
.size = SPRITE_SIZE(8x8)
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(8x8),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
|
||||
const struct OamData gOamData_855C220 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(16x16),
|
||||
.size = SPRITE_SIZE(16x16)
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(16x16),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
|
||||
const struct SpriteFrameImage gNewGameBirchPicTable[] =
|
||||
@ -347,8 +371,16 @@ const struct SpritePalette gFieldEffectObjectPaletteInfo5 =
|
||||
|
||||
const struct OamData gOamData_855C26C =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(32x16),
|
||||
.size = SPRITE_SIZE(32x16)
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(32x16),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
|
||||
const struct SpriteFrameImage gSpriteImageTable_855C274[] =
|
||||
@ -3759,3 +3791,4 @@ static void Fldeff_MoveDeoxysRock_Step(u8 taskId)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y)
|
||||
sprite = &gSprites[spriteId];
|
||||
if (sprite->invisible || sprite->data[0] != x || sprite->data[1] != y)
|
||||
{
|
||||
sub_8093038(x, y, &x2, &y2);
|
||||
SetSpritePosToMapCoords(x, y, &x2, &y2);
|
||||
sprite = &gSprites[spriteId];
|
||||
sprite->pos1.x = x2 + 8;
|
||||
sprite->pos1.y = y2 + 8;
|
||||
|
@ -91,7 +91,7 @@ static const struct WeatherCallbacks sWeatherFuncs[] =
|
||||
{
|
||||
{None_Init, None_Main, None_Init, None_Finish},
|
||||
{Clouds_InitVars, Clouds_Main, Clouds_InitAll, Clouds_Finish},
|
||||
{Weather2_InitVars, Weather2_Main, Weather2_InitAll, Weather2_Finish},
|
||||
{Sunny_InitVars, Sunny_Main, Sunny_InitAll, Sunny_Finish},
|
||||
{LightRain_InitVars, LightRain_Main, LightRain_InitAll, LightRain_Finish},
|
||||
{Snow_InitVars, Snow_Main, Snow_InitAll, Snow_Finish},
|
||||
{MedRain_InitVars, Rain_Main, MedRain_InitAll, Rain_Finish},
|
||||
@ -167,15 +167,15 @@ void StartWeather(void)
|
||||
gWeatherPtr->altGammaSpritePalIndex = index;
|
||||
gWeatherPtr->weatherPicSpritePalIndex = AllocSpritePalette(0x1201);
|
||||
gWeatherPtr->rainSpriteCount = 0;
|
||||
gWeatherPtr->unknown_6D8 = 0;
|
||||
gWeatherPtr->curRainSpriteIndex = 0;
|
||||
gWeatherPtr->cloudSpritesCreated = 0;
|
||||
gWeatherPtr->snowflakeSpriteCount = 0;
|
||||
gWeatherPtr->ashSpritesCreated = 0;
|
||||
gWeatherPtr->fog1SpritesCreated = 0;
|
||||
gWeatherPtr->fog2SpritesCreated = 0;
|
||||
gWeatherPtr->sandstormSprites1Created = 0;
|
||||
gWeatherPtr->sandstormSprites2Created = 0;
|
||||
gWeatherPtr->unknown_72E = 0;
|
||||
gWeatherPtr->sandstormSpritesCreated = 0;
|
||||
gWeatherPtr->sandstormSwirlSpritesCreated = 0;
|
||||
gWeatherPtr->bubblesSpritesCreated = 0;
|
||||
gWeatherPtr->lightenedFogSpritePalsCount = 0;
|
||||
Weather_SetBlendCoeffs(16, 0);
|
||||
gWeatherPtr->currWeather = 0;
|
||||
@ -234,7 +234,8 @@ static void Task_WeatherMain(u8 taskId)
|
||||
{
|
||||
if (gWeatherPtr->currWeather != gWeatherPtr->nextWeather)
|
||||
{
|
||||
if (!sWeatherFuncs[gWeatherPtr->currWeather].finish() && gWeatherPtr->palProcessingState != WEATHER_PAL_STATE_SCREEN_FADING_OUT)
|
||||
if (!sWeatherFuncs[gWeatherPtr->currWeather].finish()
|
||||
&& gWeatherPtr->palProcessingState != WEATHER_PAL_STATE_SCREEN_FADING_OUT)
|
||||
{
|
||||
// Finished cleaning up previous weather. Now transition to next weather.
|
||||
sWeatherFuncs[gWeatherPtr->nextWeather].initVars();
|
||||
|
File diff suppressed because it is too large
Load Diff
106
src/ghost.c
106
src/ghost.c
@ -87,7 +87,7 @@ const union AffineAnimCmd *const gUnknown_08596D54[] =
|
||||
gUnknown_08596D44,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_08596D58 =
|
||||
const struct SpriteTemplate gShadowBallSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_SHADOW_BALL,
|
||||
.paletteTag = ANIM_TAG_SHADOW_BALL,
|
||||
@ -261,20 +261,20 @@ static void sub_81116E8(struct Sprite *sprite)
|
||||
AnimTranslateLinear(sprite);
|
||||
sprite->pos2.x += Sin(sprite->data[5], 10);
|
||||
sprite->pos2.y += Cos(sprite->data[5], 15);
|
||||
|
||||
|
||||
r2 = sprite->data[5];
|
||||
sprite->data[5] = (sprite->data[5] + 5) & 0xFF;
|
||||
r0 = sprite->data[5];
|
||||
|
||||
|
||||
if (r2 == 0 || r2 > 196)
|
||||
{
|
||||
if (r0 > 0)
|
||||
PlaySE(SE_W109);
|
||||
}
|
||||
|
||||
|
||||
if (sprite->data[6] == 0)
|
||||
{
|
||||
sprite->invisible = TRUE;
|
||||
sprite->invisible = TRUE;
|
||||
sprite->callback = DestroyAnimSpriteAndDisableBlend;
|
||||
}
|
||||
else
|
||||
@ -283,18 +283,18 @@ static void sub_81116E8(struct Sprite *sprite)
|
||||
|
||||
static void sub_8111764(struct Sprite *sprite)
|
||||
{
|
||||
|
||||
s16 r0;
|
||||
|
||||
s16 r0;
|
||||
if (sprite->data[6] > 0xFF)
|
||||
{
|
||||
if (++sprite->data[6] == 0x10d)
|
||||
sprite->data[6] = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
r0 = sprite->data[7];
|
||||
sprite->data[7]++;
|
||||
|
||||
|
||||
if ((r0 & 0xFF) == 0)
|
||||
{
|
||||
sprite->data[7] &= 0xff00;
|
||||
@ -392,16 +392,16 @@ static void sub_811196C(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
// Spins a sprite towards the target, pausing in the middle.
|
||||
// Used in Shadow Ball.
|
||||
// Spins a sprite towards the target, pausing in the middle.
|
||||
// Used in Shadow Ball.
|
||||
// arg 0: duration step 1 (attacker -> center)
|
||||
// arg 1: duration step 2 (spin center)
|
||||
// arg 2: duration step 3 (center -> target)
|
||||
static void InitAnimShadowBall(struct Sprite *sprite)
|
||||
{
|
||||
u16 r5, r6;
|
||||
r5 = sprite->pos1.x;
|
||||
r6 = sprite->pos1.y;
|
||||
s16 oldPosX = sprite->pos1.x;
|
||||
s16 oldPosY = sprite->pos1.y;
|
||||
|
||||
sprite->pos1.x = GetBattlerSpriteCoord(gBattleAnimAttacker, 2);
|
||||
sprite->pos1.y = GetBattlerSpriteCoord(gBattleAnimAttacker, 3);
|
||||
sprite->data[0] = 0;
|
||||
@ -410,8 +410,8 @@ static void InitAnimShadowBall(struct Sprite *sprite)
|
||||
sprite->data[3] = gBattleAnimArgs[2];
|
||||
sprite->data[4] = sprite->pos1.x << 4;
|
||||
sprite->data[5] = sprite->pos1.y << 4;
|
||||
sprite->data[6] = (((s16)r5 - sprite->pos1.x) << 4) / (gBattleAnimArgs[0] << 1);
|
||||
sprite->data[7] = (((s16)r6 - sprite->pos1.y) << 4) / (gBattleAnimArgs[0] << 1);
|
||||
sprite->data[6] = ((oldPosX - sprite->pos1.x) << 4) / (gBattleAnimArgs[0] << 1);
|
||||
sprite->data[7] = ((oldPosY - sprite->pos1.y) << 4) / (gBattleAnimArgs[0] << 1);
|
||||
sprite->callback = AnimShadowBallStep;
|
||||
}
|
||||
|
||||
@ -465,50 +465,57 @@ static void sub_8111B9C(struct Sprite *sprite)
|
||||
sprite->callback = sub_8111BB4;
|
||||
}
|
||||
|
||||
static void sub_8111BB4(struct Sprite *sprite) {
|
||||
|
||||
s8 r5 = FALSE;
|
||||
static void sub_8111BB4(struct Sprite *sprite)
|
||||
{
|
||||
bool8 r5 = FALSE;
|
||||
bool8 r6 = FALSE;
|
||||
if(sprite->animEnded)
|
||||
|
||||
if (sprite->animEnded)
|
||||
{
|
||||
if(!(sprite->invisible))
|
||||
sprite->invisible=TRUE;
|
||||
switch(sprite->data[0])
|
||||
if (!sprite->invisible)
|
||||
sprite->invisible = TRUE;
|
||||
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
case 0:
|
||||
if((sprite->data[1]) != 2)
|
||||
break;
|
||||
goto loc_08111C06;
|
||||
case 1:
|
||||
if((sprite->data[1]) == 4)
|
||||
r5 = TRUE;
|
||||
break;
|
||||
default:
|
||||
r6 = TRUE;
|
||||
default:
|
||||
r6 = TRUE;
|
||||
break;
|
||||
case 0:
|
||||
if (sprite->data[1] == 2)
|
||||
r5 = TRUE;
|
||||
break;
|
||||
case 1:
|
||||
if (sprite->data[1] == 4)
|
||||
r5 = TRUE;
|
||||
break;
|
||||
}
|
||||
if(r5)
|
||||
|
||||
if (r5)
|
||||
{
|
||||
loc_08111C06:
|
||||
sprite->invisible ^= 1;
|
||||
sprite->data[2]++;
|
||||
sprite->data[1] = 0;
|
||||
if(sprite->data[2] == 5)
|
||||
if (sprite->data[2] == 5)
|
||||
{
|
||||
sprite->data[2] = 0;
|
||||
sprite->data[0]++;
|
||||
}
|
||||
}
|
||||
else if(r6)
|
||||
else if (r6)
|
||||
{
|
||||
DestroyAnimSprite(sprite);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprite->data[1]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8111C50(u8 taskId)
|
||||
{
|
||||
struct Task *task;
|
||||
|
||||
|
||||
task = &gTasks[taskId];
|
||||
task->data[0] = CloneBattlerSpriteWithBlend(1);
|
||||
if (task->data[0] < 0)
|
||||
@ -523,7 +530,7 @@ void sub_8111C50(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL));
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(task->data[2], task->data[3]));
|
||||
gSprites[task->data[0]].data[0] = 80;
|
||||
if (GetBattlerSide(gBattleAnimTarget) == 0)
|
||||
if (GetBattlerSide(gBattleAnimTarget) == B_SIDE_PLAYER)
|
||||
{
|
||||
gSprites[task->data[0]].data[1] = -144;
|
||||
gSprites[task->data[0]].data[2] = 112;
|
||||
@ -573,6 +580,7 @@ static void sub_8111D78(u8 taskId)
|
||||
break;
|
||||
case 2:
|
||||
DestroyAnimVisualTask(taskId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -595,7 +603,7 @@ static void sub_8111E78(u8 taskId)
|
||||
switch (task->data[15])
|
||||
{
|
||||
case 0:
|
||||
task->data[14] = AllocSpritePalette(0x2771);
|
||||
task->data[14] = AllocSpritePalette(ANIM_TAG_BENT_SPOON);
|
||||
if (task->data[14] == 0xFF || task->data[14] == 0xF)
|
||||
{
|
||||
DestroyAnimVisualTask(taskId);
|
||||
@ -605,7 +613,7 @@ static void sub_8111E78(u8 taskId)
|
||||
task->data[0] = CloneBattlerSpriteWithBlend(1);
|
||||
if (task->data[0] < 0)
|
||||
{
|
||||
FreeSpritePaletteByTag(0x2771);
|
||||
FreeSpritePaletteByTag(ANIM_TAG_BENT_SPOON);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
else
|
||||
@ -698,14 +706,14 @@ static void sub_81120DC(u8 taskId)
|
||||
static void sub_8112170(u8 taskId)
|
||||
{
|
||||
struct Task *task = &gTasks[taskId];
|
||||
u8 position = GetBattlerSpriteBGPriorityRank(gBattleAnimTarget);
|
||||
u8 rank = GetBattlerSpriteBGPriorityRank(gBattleAnimTarget);
|
||||
|
||||
switch (task->data[15])
|
||||
{
|
||||
case 0:
|
||||
gScanlineEffect.state = 3;
|
||||
task->data[14] = GetAnimBattlerSpriteId(1);
|
||||
if (position == 1)
|
||||
if (rank == 1)
|
||||
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG1_ON);
|
||||
else
|
||||
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG2_ON);
|
||||
@ -714,12 +722,12 @@ static void sub_8112170(u8 taskId)
|
||||
BlendPalette(task->data[4], 16, 0, RGB(13, 0, 15));
|
||||
break;
|
||||
case 2:
|
||||
gSprites[task->data[14]].invisible = 1;
|
||||
gSprites[task->data[14]].invisible = TRUE;
|
||||
obj_delete_but_dont_free_vram(&gSprites[task->data[0]]);
|
||||
FreeSpritePaletteByTag(0x2771);
|
||||
FreeSpritePaletteByTag(ANIM_TAG_BENT_SPOON);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
||||
if (position == 1)
|
||||
if (rank == 1)
|
||||
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG1_ON);
|
||||
else
|
||||
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG2_ON);
|
||||
@ -886,7 +894,7 @@ static void sub_81125E0(u8 taskId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (task->data[10])
|
||||
task->data[10]--;
|
||||
else if (task->data[6])
|
||||
@ -1081,7 +1089,7 @@ static void sub_8112ACC(struct Sprite *sprite)
|
||||
if (sprite->data[0] == 0)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, (BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL));
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0x10, 0));
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0));
|
||||
sprite->data[0]++;
|
||||
sprite->data[1] = 0;
|
||||
sprite->data[2] = 0;
|
||||
@ -1120,7 +1128,7 @@ static void sub_8112B78(struct Sprite *sprite)
|
||||
sprite->pos2.x = Sin(sprite->data[0], 12);
|
||||
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
|
||||
sprite->pos2.x = -sprite->pos2.x;
|
||||
|
||||
|
||||
sprite->data[0] = (sprite->data[0] + 6) & 0xFF;
|
||||
sprite->data[1] += 0x100;
|
||||
sprite->pos2.y = -(sprite->data[1] >> 8);
|
||||
|
@ -154,9 +154,18 @@ const u8 sWireless_RSEtoASCIITable[] = {
|
||||
0x20, 0x2b, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00
|
||||
};
|
||||
const struct OamData sWirelessStatusIndicatorOamData = {
|
||||
const struct OamData sWirelessStatusIndicatorOamData =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(16x16),
|
||||
.size = SPRITE_SIZE(16x16)
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(16x16),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
static const union AnimCmd sWirelessStatusIndicatorAnim0[] = {
|
||||
// 3 bars
|
||||
@ -5182,3 +5191,4 @@ u32 GetRfuRecvQueueLength(void)
|
||||
{
|
||||
return gUnknown_03005000.unk_124.unk_8c2;
|
||||
}
|
||||
|
||||
|
@ -1193,7 +1193,7 @@ static void Task_StoryListMenu(u8 taskId) // Task_StoryListMenu
|
||||
gSpecialVar_Result = 1;
|
||||
sSelectedStory = selection;
|
||||
}
|
||||
sub_80E2A78(sStorytellerWindowId);
|
||||
ClearToTransparentAndRemoveWindow(sStorytellerWindowId);
|
||||
DestroyTask(taskId);
|
||||
EnableBothScriptContexts();
|
||||
break;
|
||||
|
66
src/menu.c
66
src/menu.c
@ -43,8 +43,8 @@ struct Menu
|
||||
u8 fontId;
|
||||
u8 optionWidth;
|
||||
u8 optionHeight;
|
||||
u8 horizontalCount;
|
||||
u8 verticalCount;
|
||||
u8 columns;
|
||||
u8 rows;
|
||||
bool8 APressMuted;
|
||||
};
|
||||
|
||||
@ -1283,8 +1283,8 @@ u8 sub_8198F58(u8 windowId, u8 fontId, u8 left, u8 top, u8 a4, u8 cursorHeight,
|
||||
sMenu.fontId = fontId;
|
||||
sMenu.optionWidth = a4;
|
||||
sMenu.optionHeight = cursorHeight;
|
||||
sMenu.horizontalCount = a6;
|
||||
sMenu.verticalCount = a7;
|
||||
sMenu.columns = a6;
|
||||
sMenu.rows = a7;
|
||||
|
||||
pos = a9;
|
||||
|
||||
@ -1308,16 +1308,16 @@ void sub_8199060(u8 oldCursorPos, u8 newCursorPos)
|
||||
{
|
||||
u8 cursorWidth = GetMenuCursorDimensionByFont(sMenu.fontId, 0);
|
||||
u8 cursorHeight = GetMenuCursorDimensionByFont(sMenu.fontId, 1);
|
||||
u8 xPos = (oldCursorPos % sMenu.horizontalCount) * sMenu.optionWidth + sMenu.left;
|
||||
u8 yPos = (oldCursorPos / sMenu.horizontalCount) * sMenu.optionHeight + sMenu.top;
|
||||
u8 xPos = (oldCursorPos % sMenu.columns) * sMenu.optionWidth + sMenu.left;
|
||||
u8 yPos = (oldCursorPos / sMenu.columns) * sMenu.optionHeight + sMenu.top;
|
||||
FillWindowPixelRect(sMenu.windowId,
|
||||
PIXEL_FILL(1),
|
||||
xPos,
|
||||
yPos,
|
||||
cursorWidth,
|
||||
cursorHeight);
|
||||
xPos = (newCursorPos % sMenu.horizontalCount) * sMenu.optionWidth + sMenu.left;
|
||||
yPos = (newCursorPos / sMenu.horizontalCount) * sMenu.optionHeight + sMenu.top;
|
||||
xPos = (newCursorPos % sMenu.columns) * sMenu.optionWidth + sMenu.left;
|
||||
yPos = (newCursorPos / sMenu.columns) * sMenu.optionHeight + sMenu.top;
|
||||
AddTextPrinterParameterized(sMenu.windowId,
|
||||
sMenu.fontId,
|
||||
gText_SelectorArrow3,
|
||||
@ -1333,13 +1333,13 @@ u8 sub_8199134(s8 deltaX, s8 deltaY)
|
||||
|
||||
if (deltaX != 0)
|
||||
{
|
||||
if ((sMenu.cursorPos % sMenu.horizontalCount) + deltaX < 0)
|
||||
if ((sMenu.cursorPos % sMenu.columns) + deltaX < 0)
|
||||
{
|
||||
sMenu.cursorPos += sMenu.horizontalCount - 1;
|
||||
sMenu.cursorPos += sMenu.columns - 1;
|
||||
}
|
||||
else if ((sMenu.cursorPos % sMenu.horizontalCount) + deltaX >= sMenu.horizontalCount)
|
||||
else if ((sMenu.cursorPos % sMenu.columns) + deltaX >= sMenu.columns)
|
||||
{
|
||||
sMenu.cursorPos = (sMenu.cursorPos / sMenu.horizontalCount) * sMenu.horizontalCount;
|
||||
sMenu.cursorPos = (sMenu.cursorPos / sMenu.columns) * sMenu.columns;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1349,17 +1349,17 @@ u8 sub_8199134(s8 deltaX, s8 deltaY)
|
||||
|
||||
if (deltaY != 0)
|
||||
{
|
||||
if ((sMenu.cursorPos / sMenu.horizontalCount) + deltaY < 0)
|
||||
if ((sMenu.cursorPos / sMenu.columns) + deltaY < 0)
|
||||
{
|
||||
sMenu.cursorPos += sMenu.horizontalCount * (sMenu.verticalCount - 1);
|
||||
sMenu.cursorPos += sMenu.columns * (sMenu.rows - 1);
|
||||
}
|
||||
else if ((sMenu.cursorPos / sMenu.horizontalCount) + deltaY >= sMenu.verticalCount)
|
||||
else if ((sMenu.cursorPos / sMenu.columns) + deltaY >= sMenu.rows)
|
||||
{
|
||||
sMenu.cursorPos -= sMenu.horizontalCount * (sMenu.verticalCount - 1);
|
||||
sMenu.cursorPos -= sMenu.columns * (sMenu.rows - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
sMenu.cursorPos += (sMenu.horizontalCount * deltaY);
|
||||
sMenu.cursorPos += (sMenu.columns * deltaY);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1381,8 +1381,8 @@ u8 sub_81991F8(s8 deltaX, s8 deltaY)
|
||||
|
||||
if (deltaX != 0)
|
||||
{
|
||||
if (((sMenu.cursorPos % sMenu.horizontalCount) + deltaX >= 0) &&
|
||||
((sMenu.cursorPos % sMenu.horizontalCount) + deltaX < sMenu.horizontalCount))
|
||||
if (((sMenu.cursorPos % sMenu.columns) + deltaX >= 0) &&
|
||||
((sMenu.cursorPos % sMenu.columns) + deltaX < sMenu.columns))
|
||||
{
|
||||
sMenu.cursorPos += deltaX;
|
||||
}
|
||||
@ -1390,10 +1390,10 @@ u8 sub_81991F8(s8 deltaX, s8 deltaY)
|
||||
|
||||
if (deltaY != 0)
|
||||
{
|
||||
if (((sMenu.cursorPos / sMenu.horizontalCount) + deltaY >= 0) &&
|
||||
((sMenu.cursorPos / sMenu.horizontalCount) + deltaY < sMenu.verticalCount))
|
||||
if (((sMenu.cursorPos / sMenu.columns) + deltaY >= 0) &&
|
||||
((sMenu.cursorPos / sMenu.columns) + deltaY < sMenu.rows))
|
||||
{
|
||||
sMenu.cursorPos += (sMenu.horizontalCount * deltaY);
|
||||
sMenu.cursorPos += (sMenu.columns * deltaY);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1661,16 +1661,14 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 pa
|
||||
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sYesNoWindowId, 2, initialCursorPos);
|
||||
}
|
||||
|
||||
void sub_81997AC(u8 windowId, u8 a4, u8 a6, u8 a7, const struct MenuAction *strs)
|
||||
void PrintMenuGridTable(u8 windowId, u8 optionWidth, u8 columns, u8 rows, const struct MenuAction *strs)
|
||||
{
|
||||
u32 i;
|
||||
u32 j;
|
||||
for (i = 0; i < a7; i++)
|
||||
u32 i, j;
|
||||
|
||||
for (i = 0; i < rows; i++)
|
||||
{
|
||||
for (j = 0; j < a6; j++)
|
||||
{
|
||||
AddTextPrinterParameterized(windowId, 1, strs[(i * a6) + j].text, (a4 * j) + 8, (i * 16) + 1, 0xFF, NULL);
|
||||
}
|
||||
for (j = 0; j < columns; j++)
|
||||
AddTextPrinterParameterized(windowId, 1, strs[(i * columns) + j].text, (optionWidth * j) + 8, (i * 16) + 1, 0xFF, NULL);
|
||||
}
|
||||
CopyWindowToVram(windowId, 2);
|
||||
}
|
||||
@ -1706,20 +1704,20 @@ void sub_819983C(u8 windowId, u8 a4, u8 itemCount, u8 itemCount2, const struct M
|
||||
CopyWindowToVram(windowId, 2);
|
||||
}
|
||||
|
||||
u8 sub_8199944(u8 windowId, u8 optionWidth, u8 horizontalCount, u8 verticalCount, u8 initialCursorPos)
|
||||
u8 sub_8199944(u8 windowId, u8 optionWidth, u8 columns, u8 rows, u8 initialCursorPos)
|
||||
{
|
||||
s32 pos;
|
||||
|
||||
sMenu.left = 0;
|
||||
sMenu.top = 1;
|
||||
sMenu.minCursorPos = 0;
|
||||
sMenu.maxCursorPos = (horizontalCount * verticalCount) - 1;
|
||||
sMenu.maxCursorPos = (columns * rows) - 1;
|
||||
sMenu.windowId = windowId;
|
||||
sMenu.fontId = 1;
|
||||
sMenu.optionWidth = optionWidth;
|
||||
sMenu.optionHeight = 16;
|
||||
sMenu.horizontalCount = horizontalCount;
|
||||
sMenu.verticalCount = verticalCount;
|
||||
sMenu.columns = columns;
|
||||
sMenu.rows = rows;
|
||||
|
||||
pos = initialCursorPos;
|
||||
|
||||
|
@ -1906,52 +1906,43 @@ static const struct NamingScreenTemplate *const sNamingScreenTemplates[] =
|
||||
const struct OamData gOamData_858BFEC =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(8x8),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(8x8),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
const struct OamData gOamData_858BFF4 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(16x16),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(16x16),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
const struct OamData gOamData_858BFFC =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(32x16),
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = SPRITE_SIZE(32x16),
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
static const struct Subsprite gUnknown_0858C004[] =
|
||||
@ -2203,3 +2194,5 @@ static const struct SpritePalette gUnknown_0858C230[] =
|
||||
{gNamingScreenMenu_Pal + 0x40, 0x0007},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
|
||||
|
@ -2960,7 +2960,7 @@ static void InitLinkPlayerEventObjectPos(struct EventObject *eventObj, s16 x, s1
|
||||
eventObj->currentCoords.y = y;
|
||||
eventObj->previousCoords.x = x;
|
||||
eventObj->previousCoords.y = y;
|
||||
sub_8093038(x, y, &eventObj->initialCoords.x, &eventObj->initialCoords.y);
|
||||
SetSpritePosToMapCoords(x, y, &eventObj->initialCoords.x, &eventObj->initialCoords.y);
|
||||
eventObj->initialCoords.x += 8;
|
||||
EventObjectUpdateZCoord(eventObj);
|
||||
}
|
||||
|
8
src/pokedex_cry_screen.c
Executable file → Normal file
8
src/pokedex_cry_screen.c
Executable file → Normal file
@ -169,9 +169,14 @@ const struct OamData gOamData_85B8C60 =
|
||||
{
|
||||
.y = 160,
|
||||
.affineMode = ST_OAM_AFFINE_NORMAL,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
.bpp = ST_OAM_4BPP,
|
||||
.shape = SPRITE_SHAPE(64x64),
|
||||
.x = 0,
|
||||
.size = SPRITE_SIZE(64x64),
|
||||
.priority = 1
|
||||
.tileNum = 0,
|
||||
.priority = 1,
|
||||
.paletteNum = 0,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gUnknown_085B8C68 =
|
||||
@ -521,3 +526,4 @@ static void sub_8145B24(s8 a0)
|
||||
sCryVolumeMeter->unk1 = r2;
|
||||
sCryVolumeMeter->unk2 = 5;
|
||||
}
|
||||
|
||||
|
@ -73,22 +73,17 @@ struct MatchCallStruct4 {
|
||||
const match_call_text_data_t *textData;
|
||||
};
|
||||
|
||||
// Note: Type1 and Type5 have identical struct layouts.
|
||||
struct MatchCallStruct5 {
|
||||
u8 type;
|
||||
u8 v1;
|
||||
u16 flag;
|
||||
u16 v4;
|
||||
u16 rematchTableIdx;
|
||||
const u8 *desc;
|
||||
const u8 *name;
|
||||
const match_call_text_data_t *textData;
|
||||
};
|
||||
|
||||
#define MATCHCALLDEF(name, type_, ...) \
|
||||
static const struct MatchCallStruct##type_ name = { \
|
||||
.type = type_, \
|
||||
__VA_ARGS__ \
|
||||
};
|
||||
|
||||
typedef union {
|
||||
const struct MatchCallStructCommon *common;
|
||||
const struct MatchCallStruct0 *type0;
|
||||
@ -328,7 +323,15 @@ static const match_call_text_data_t sMrStoneTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sMrStoneMatchCallHeader, 0, 10, 0xffff, gMrStoneMatchCallDesc, gMrStoneMatchCallName, sMrStoneTextScripts);
|
||||
static const struct MatchCallStruct0 sMrStoneMatchCallHeader =
|
||||
{
|
||||
.type = 0,
|
||||
.v1 = 10,
|
||||
.flag = 0xFFFF,
|
||||
.desc = gMrStoneMatchCallDesc,
|
||||
.name = gMrStoneMatchCallName,
|
||||
.textData = sMrStoneTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sNormanTextScripts[] = {
|
||||
{ gText_Norman_Pokenav_2B5719, FLAG_ENABLE_NORMAN_MATCH_CALL, 0xFFFF },
|
||||
@ -343,9 +346,25 @@ static const match_call_text_data_t sNormanTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sNormanMatchCallHeader, 5, 7, FLAG_ENABLE_NORMAN_MATCH_CALL, 0x45, gNormanMatchCallDesc, gNormanMatchCallName, sNormanTextScripts);
|
||||
static const struct MatchCallStruct5 sNormanMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 7,
|
||||
.flag = FLAG_ENABLE_NORMAN_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_NORMAN,
|
||||
.desc = gNormanMatchCallDesc,
|
||||
.name = gNormanMatchCallName,
|
||||
.textData = sNormanTextScripts
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sProfBirchMatchCallHeader, 3, 0, FLAG_ENABLE_PROF_BIRCH_MATCH_CALL, gProfBirchMatchCallDesc, gProfBirchMatchCallName)
|
||||
static const struct MatchCallStruct3 sProfBirchMatchCallHeader =
|
||||
{
|
||||
.type = 3,
|
||||
.v1 = 0,
|
||||
.flag = FLAG_ENABLE_PROF_BIRCH_MATCH_CALL,
|
||||
.desc = gProfBirchMatchCallDesc,
|
||||
.name = gProfBirchMatchCallName
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sMomTextScripts[] = {
|
||||
{ gText_Mom_Pokenav_2B227B, 0xffff, 0xffff },
|
||||
@ -354,7 +373,15 @@ static const match_call_text_data_t sMomTextScripts[] = {
|
||||
{ NULL, 0xffff, 0xffff }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sMomMatchCallHeader, 0, 0, FLAG_ENABLE_MOM_MATCH_CALL, gMomMatchCallDesc, gMomMatchCallName, sMomTextScripts);
|
||||
static const struct MatchCallStruct0 sMomMatchCallHeader =
|
||||
{
|
||||
.type = 0,
|
||||
.v1 = 0,
|
||||
.flag = FLAG_ENABLE_MOM_MATCH_CALL,
|
||||
.desc = gMomMatchCallDesc,
|
||||
.name = gMomMatchCallName,
|
||||
.textData = sMomTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sStevenTextScripts[] = {
|
||||
{ gText_Steven_Pokenav_2B5B95, 0xffff, 0xffff },
|
||||
@ -367,7 +394,15 @@ static const match_call_text_data_t sStevenTextScripts[] = {
|
||||
{ NULL, 0xffff, 0xffff },
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sStevenMatchCallHeader, 0, 0xd5, FLAG_REGISTERED_STEVEN_POKENAV, gStevenMatchCallDesc, gStevenMatchCallName, sStevenTextScripts);
|
||||
static const struct MatchCallStruct0 sStevenMatchCallHeader =
|
||||
{
|
||||
.type = 0,
|
||||
.v1 = 0xD5,
|
||||
.flag = FLAG_REGISTERED_STEVEN_POKENAV,
|
||||
.desc = gStevenMatchCallDesc,
|
||||
.name = gStevenMatchCallName,
|
||||
.textData = sStevenTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sMayTextScripts[] = {
|
||||
{ gText_May_Pokenav_2B3AB3, 0xFFFF, 0xFFFF },
|
||||
@ -388,7 +423,15 @@ static const match_call_text_data_t sMayTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sMayMatchCallHeader, 4, MALE, FLAG_ENABLE_RIVAL_MATCH_CALL, gMayBrendanMatchCallDesc, gExpandedPlaceholder_May, sMayTextScripts);
|
||||
static const struct MatchCallStruct4 sMayMatchCallHeader =
|
||||
{
|
||||
.type = 4,
|
||||
.gender = MALE,
|
||||
.flag = FLAG_ENABLE_RIVAL_MATCH_CALL,
|
||||
.desc = gMayBrendanMatchCallDesc,
|
||||
.name = gExpandedPlaceholder_May,
|
||||
.textData = sMayTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sBrendanTextScripts[] = {
|
||||
{ gText_Brendan_Pokenav_2B43EF, 0xFFFF, 0xFFFF },
|
||||
@ -409,7 +452,15 @@ static const match_call_text_data_t sBrendanTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sBrendanMatchCallHeader, 4, FEMALE, FLAG_ENABLE_RIVAL_MATCH_CALL, gMayBrendanMatchCallDesc, gExpandedPlaceholder_Brendan, sBrendanTextScripts);
|
||||
static const struct MatchCallStruct4 sBrendanMatchCallHeader =
|
||||
{
|
||||
.type = 4,
|
||||
.gender = FEMALE,
|
||||
.flag = FLAG_ENABLE_RIVAL_MATCH_CALL,
|
||||
.desc = gMayBrendanMatchCallDesc,
|
||||
.name = gExpandedPlaceholder_Brendan,
|
||||
.textData = sBrendanTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sWallyTextScripts[] = {
|
||||
{ gText_Wally_Pokenav_2B4DE2, 0xFFFF, 0xFFFF },
|
||||
@ -429,7 +480,16 @@ const struct MatchCallSubstruct2 sWallyAdditionalData[] = {
|
||||
{ 0xFFFF, 0xD5 }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sWallyMatchCallHeader, 2, 0, FLAG_ENABLE_WALLY_MATCH_CALL, REMATCH_WALLY_3, gWallyMatchCallDesc, sWallyTextScripts, sWallyAdditionalData);
|
||||
static const struct MatchCallStruct2 sWallyMatchCallHeader =
|
||||
{
|
||||
.type = 2,
|
||||
.v1 = 0,
|
||||
.flag = FLAG_ENABLE_WALLY_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_WALLY_3,
|
||||
.desc = gWallyMatchCallDesc,
|
||||
.textData = sWallyTextScripts,
|
||||
.v10 = sWallyAdditionalData
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sScottTextScripts[] = {
|
||||
{ gText_Scott_Pokenav_2B5184, 0xFFFF, 0xFFFF },
|
||||
@ -443,7 +503,15 @@ static const match_call_text_data_t sScottTextScripts[] = {
|
||||
};
|
||||
|
||||
|
||||
MATCHCALLDEF(sScottMatchCallHeader, 0, 0xD5, FLAG_ENABLE_SCOTT_MATCH_CALL, gScottMatchCallDesc, gScottMatchCallName, sScottTextScripts);
|
||||
static const struct MatchCallStruct0 sScottMatchCallHeader =
|
||||
{
|
||||
.type = 0,
|
||||
.v1 = 0xD5,
|
||||
.flag = FLAG_ENABLE_SCOTT_MATCH_CALL,
|
||||
.desc = gScottMatchCallDesc,
|
||||
.name = gScottMatchCallName,
|
||||
.textData = sScottTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sRoxanneTextScripts[] = {
|
||||
{ gText_Roxanne_Pokenav_2B2456, 0xFFFE, 0xFFFF },
|
||||
@ -453,7 +521,16 @@ static const match_call_text_data_t sRoxanneTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sRoxanneMatchCallHeader, 5, 10, FLAG_ENABLE_ROXANNE_MATCH_CALL, 0x41, gRoxanneMatchCallDesc, NULL, sRoxanneTextScripts);
|
||||
static const struct MatchCallStruct5 sRoxanneMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 10,
|
||||
.flag = FLAG_ENABLE_ROXANNE_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_ROXANNE,
|
||||
.desc = gRoxanneMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sRoxanneTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sBrawlyTextScripts[] = {
|
||||
{ gText_Brawly_Pokenav_2B2659, 0xFFFE, 0xFFFF },
|
||||
@ -463,7 +540,16 @@ static const match_call_text_data_t sBrawlyTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sBrawlyMatchCallHeader, 5, 2, FLAG_ENABLE_BRAWLY_MATCH_CALL, 0x42, gBrawlyMatchCallDesc, NULL, sBrawlyTextScripts);
|
||||
static const struct MatchCallStruct5 sBrawlyMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 2,
|
||||
.flag = FLAG_ENABLE_BRAWLY_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_BRAWLY,
|
||||
.desc = gBrawlyMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sBrawlyTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sWattsonTextScripts[] = {
|
||||
{ gText_Wattson_Pokenav_2B2912, 0xFFFE, 0xFFFF },
|
||||
@ -473,7 +559,16 @@ static const match_call_text_data_t sWattsonTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sWattsonMatchCallHeader, 5, 9, FLAG_ENABLE_WATTSON_MATCH_CALL, 0x43, gWattsonMatchCallDesc, NULL, sWattsonTextScripts);
|
||||
static const struct MatchCallStruct5 sWattsonMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 9,
|
||||
.flag = FLAG_ENABLE_WATTSON_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_WATTSON,
|
||||
.desc = gWattsonMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sWattsonTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sFlanneryTextScripts[] = {
|
||||
{ gText_Flannery_Pokenav_2B2B4D, 0xFFFE, 0xFFFF },
|
||||
@ -483,7 +578,16 @@ static const match_call_text_data_t sFlanneryTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sFlanneryMatchCallHeader, 5, 3, FLAG_ENABLE_FLANNERY_MATCH_CALL, 0x44, gFlanneryMatchCallDesc, NULL, sFlanneryTextScripts);
|
||||
static const struct MatchCallStruct5 sFlanneryMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 3,
|
||||
.flag = FLAG_ENABLE_FLANNERY_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_FLANNERY,
|
||||
.desc = gFlanneryMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sFlanneryTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sWinonaTextScripts[] = {
|
||||
{ gText_Winona_Pokenav_2B2DA4, 0xFFFE, 0xFFFF },
|
||||
@ -493,7 +597,16 @@ static const match_call_text_data_t sWinonaTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sWinonaMatchCallHeader, 5, 11, FLAG_ENABLE_WINONA_MATCH_CALL, 0x46, gWinonaMatchCallDesc, NULL, sWinonaTextScripts);
|
||||
static const struct MatchCallStruct5 sWinonaMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 11,
|
||||
.flag = FLAG_ENABLE_WINONA_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_WINONA,
|
||||
.desc = gWinonaMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sWinonaTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sTateLizaTextScripts[] = {
|
||||
{ gText_TateLiza_Pokenav_2B2F97, 0xFFFE, 0xFFFF },
|
||||
@ -503,7 +616,16 @@ static const match_call_text_data_t sTateLizaTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sTateLizaMatchCallHeader, 5, 13, FLAG_ENABLE_TATE_AND_LIZA_MATCH_CALL, 0x47, gTateLizaMatchCallDesc, NULL, sTateLizaTextScripts);
|
||||
static const struct MatchCallStruct5 sTateLizaMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 13,
|
||||
.flag = FLAG_ENABLE_TATE_AND_LIZA_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_TATE_AND_LIZA,
|
||||
.desc = gTateLizaMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sTateLizaTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sJuanTextScripts[] = {
|
||||
{ gText_Juan_Pokenav_2B3249, 0xFFFE, 0xFFFF },
|
||||
@ -513,42 +635,96 @@ static const match_call_text_data_t sJuanTextScripts[] = {
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sJuanMatchCallHeader, 5, 14, FLAG_ENABLE_JUAN_MATCH_CALL, 0x48, gJuanMatchCallDesc, NULL, sJuanTextScripts);
|
||||
static const struct MatchCallStruct5 sJuanMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 14,
|
||||
.flag = FLAG_ENABLE_JUAN_MATCH_CALL,
|
||||
.rematchTableIdx = REMATCH_JUAN,
|
||||
.desc = gJuanMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sJuanTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sSidneyTextScripts[] = {
|
||||
{ gText_Sidney_Pokenav_2B34CC, 0xFFFF, 0xFFFF },
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sSidneyMatchCallHeader, 5, 15, FLAG_REMATCH_JUAN, 0x49, gEliteFourMatchCallDesc, NULL, sSidneyTextScripts);
|
||||
static const struct MatchCallStruct5 sSidneyMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 15,
|
||||
.flag = FLAG_REMATCH_SIDNEY,
|
||||
.rematchTableIdx = REMATCH_SIDNEY,
|
||||
.desc = gEliteFourMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sSidneyTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sPhoebeTextScripts[] = {
|
||||
{ gText_Phoebe_Pokenav_2B3561, 0xFFFF, 0xFFFF },
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sPhoebeMatchCallHeader, 5, 15, FLAG_REMATCH_SIDNEY, 0x4A, gEliteFourMatchCallDesc, NULL, sPhoebeTextScripts);
|
||||
static const struct MatchCallStruct5 sPhoebeMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 15,
|
||||
.flag = FLAG_REMATCH_PHOEBE,
|
||||
.rematchTableIdx = REMATCH_PHOEBE,
|
||||
.desc = gEliteFourMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sPhoebeTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sGlaciaTextScripts[] = {
|
||||
{ gText_Glacia_Pokenav_2B35E4, 0xFFFF, 0xFFFF },
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sGlaciaMatchCallHeader, 5, 15, FLAG_REMATCH_PHOEBE, 0x4B, gEliteFourMatchCallDesc, NULL, sGlaciaTextScripts);
|
||||
static const struct MatchCallStruct5 sGlaciaMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 15,
|
||||
.flag = FLAG_REMATCH_GLACIA,
|
||||
.rematchTableIdx = REMATCH_GLACIA,
|
||||
.desc = gEliteFourMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sGlaciaTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sDrakeTextScripts[] = {
|
||||
{ gText_Drake_Pokenav_2B368B, 0xFFFF, 0xFFFF },
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sDrakeMatchCallHeader, 5, 15, FLAG_REMATCH_GLACIA, 0x4C, gEliteFourMatchCallDesc, NULL, sDrakeTextScripts);
|
||||
static const struct MatchCallStruct5 sDrakeMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 15,
|
||||
.flag = FLAG_REMATCH_DRAKE,
|
||||
.rematchTableIdx = REMATCH_DRAKE,
|
||||
.desc = gEliteFourMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sDrakeTextScripts
|
||||
};
|
||||
|
||||
static const match_call_text_data_t sWallaceTextScripts[] = {
|
||||
{ gText_Wallace_Pokenav_2B3790, 0xFFFF, 0xFFFF },
|
||||
{ NULL, 0xFFFF, 0xFFFF }
|
||||
};
|
||||
|
||||
MATCHCALLDEF(sWallaceMatchCallHeader, 5, 15, FLAG_REMATCH_DRAKE, 0x4D, gChampionMatchCallDesc, NULL, sWallaceTextScripts);
|
||||
static const struct MatchCallStruct5 sWallaceMatchCallHeader =
|
||||
{
|
||||
.type = 5,
|
||||
.v1 = 15,
|
||||
.flag = FLAG_REMATCH_WALLACE,
|
||||
.rematchTableIdx = REMATCH_WALLACE,
|
||||
.desc = gChampionMatchCallDesc,
|
||||
.name = NULL,
|
||||
.textData = sWallaceTextScripts
|
||||
};
|
||||
|
||||
static const match_call_t sMatchCallHeaders[] = {
|
||||
{.type0 = &sMrStoneMatchCallHeader},
|
||||
@ -680,7 +856,7 @@ bool32 MatchCallFlagGetByIndex(u32 idx)
|
||||
match_call_t matchCall;
|
||||
u32 i;
|
||||
|
||||
if (idx > 20)
|
||||
if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1)
|
||||
return FALSE;
|
||||
matchCall = sMatchCallHeaders[idx];
|
||||
i = MatchCallGetFunctionIndex(matchCall);
|
||||
@ -727,7 +903,7 @@ u8 sub_81D16DC(u32 idx)
|
||||
match_call_t matchCall;
|
||||
u32 i;
|
||||
|
||||
if (idx > 20)
|
||||
if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1)
|
||||
return 0;
|
||||
matchCall = sMatchCallHeaders[idx];
|
||||
i = MatchCallGetFunctionIndex(matchCall);
|
||||
@ -771,7 +947,7 @@ bool32 MatchCall_IsRematchable(u32 idx)
|
||||
match_call_t matchCall;
|
||||
u32 i;
|
||||
|
||||
if (idx > 20)
|
||||
if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1)
|
||||
return 0;
|
||||
matchCall = sMatchCallHeaders[idx];
|
||||
i = MatchCallGetFunctionIndex(matchCall);
|
||||
@ -810,13 +986,13 @@ bool32 sub_81D17E8(u32 idx)
|
||||
match_call_t matchCall;
|
||||
u32 i;
|
||||
|
||||
if (idx > 20)
|
||||
if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1)
|
||||
return FALSE;
|
||||
matchCall = sMatchCallHeaders[idx];
|
||||
i = MatchCallGetFunctionIndex(matchCall);
|
||||
if (gUnknown_08625338[i](matchCall))
|
||||
return TRUE;
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < ARRAY_COUNT(sMatchCallCheckPageOverrides); i++)
|
||||
{
|
||||
if (sMatchCallCheckPageOverrides[i].idx == idx)
|
||||
return TRUE;
|
||||
@ -854,7 +1030,7 @@ u32 MatchCall_GetRematchTableIdx(u32 idx)
|
||||
match_call_t matchCall;
|
||||
u32 i;
|
||||
|
||||
if (idx > 20)
|
||||
if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1)
|
||||
return REMATCH_TABLE_ENTRIES;
|
||||
matchCall = sMatchCallHeaders[idx];
|
||||
i = MatchCallGetFunctionIndex(matchCall);
|
||||
@ -891,7 +1067,7 @@ void MatchCall_GetMessage(u32 idx, u8 *dest)
|
||||
match_call_t matchCall;
|
||||
u32 i;
|
||||
|
||||
if (idx > 20)
|
||||
if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1)
|
||||
return;
|
||||
matchCall = sMatchCallHeaders[idx];
|
||||
i = MatchCallGetFunctionIndex(matchCall);
|
||||
@ -906,9 +1082,9 @@ static void MatchCall_GetMessage_Type0(match_call_t matchCall, u8 *dest)
|
||||
static void MatchCall_GetMessage_Type1(match_call_t matchCall, u8 *dest)
|
||||
{
|
||||
if (matchCall.common->type != 5)
|
||||
sub_81D1920(matchCall.type5->textData, dest);
|
||||
sub_81D1920(matchCall.type1->textData, dest);
|
||||
else
|
||||
sub_81D199C(matchCall.type1->textData, matchCall.type1->rematchTableIdx, dest);
|
||||
sub_81D199C(matchCall.type5->textData, matchCall.type5->rematchTableIdx, dest);
|
||||
}
|
||||
|
||||
static void MatchCall_GetMessage_Type2(match_call_t matchCall, u8 *dest)
|
||||
@ -1093,7 +1269,7 @@ void sub_81D1A78(u32 idx, const u8 **desc, const u8 **name)
|
||||
match_call_t matchCall;
|
||||
u32 i;
|
||||
|
||||
if (idx > 20)
|
||||
if (idx > ARRAY_COUNT(sMatchCallHeaders) - 1)
|
||||
return;
|
||||
matchCall = sMatchCallHeaders[idx];
|
||||
i = MatchCallGetFunctionIndex(matchCall);
|
||||
@ -1146,11 +1322,11 @@ const u8 *sub_81D1B40(u32 idx, u32 offset)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < ARRAY_COUNT(sMatchCallCheckPageOverrides); i++)
|
||||
{
|
||||
if (sMatchCallCheckPageOverrides[i].idx == idx)
|
||||
{
|
||||
for (; i + 1 < 4 && sMatchCallCheckPageOverrides[i + 1].idx == idx; i++)
|
||||
for (; i + 1 < ARRAY_COUNT(sMatchCallCheckPageOverrides) && sMatchCallCheckPageOverrides[i + 1].idx == idx; i++)
|
||||
{
|
||||
if (!FlagGet(sMatchCallCheckPageOverrides[i + 1].v4))
|
||||
break;
|
||||
@ -1244,7 +1420,7 @@ s32 sub_81D1BD0(u32 idx)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < ARRAY_COUNT(sMatchCallCheckPageOverrides); i++)
|
||||
{
|
||||
if (sMatchCallCheckPageOverrides[i].idx == idx)
|
||||
return sMatchCallCheckPageOverrides[i].v2;
|
||||
@ -1256,7 +1432,7 @@ bool32 sub_81D1BF8(u32 idx)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 21; i++)
|
||||
for (i = 0; i < (s32)ARRAY_COUNT(sMatchCallHeaders); i++)
|
||||
{
|
||||
u32 r0 = MatchCall_GetRematchTableIdx(i);
|
||||
if (r0 != REMATCH_TABLE_ENTRIES && r0 == idx)
|
||||
|
@ -1183,7 +1183,7 @@ static void Task_HandleMultichoiceInput(u8 taskId)
|
||||
{
|
||||
gSpecialVar_Result = selection;
|
||||
}
|
||||
sub_80E2A78(tWindowId);
|
||||
ClearToTransparentAndRemoveWindow(tWindowId);
|
||||
DestroyTask(taskId);
|
||||
EnableBothScriptContexts();
|
||||
}
|
||||
@ -1219,8 +1219,6 @@ bool8 IsScriptActive(void)
|
||||
|
||||
static void Task_HandleYesNoInput(u8 taskId)
|
||||
{
|
||||
u8 left, top;
|
||||
|
||||
if (gTasks[taskId].tRight < 5)
|
||||
{
|
||||
gTasks[taskId].tRight++;
|
||||
@ -1229,9 +1227,9 @@ static void Task_HandleYesNoInput(u8 taskId)
|
||||
|
||||
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
||||
{
|
||||
case -2:
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return;
|
||||
case -1:
|
||||
case MENU_B_PRESSED:
|
||||
case 1:
|
||||
PlaySE(SE_SELECT);
|
||||
gSpecialVar_Result = 0;
|
||||
@ -1247,8 +1245,6 @@ static void Task_HandleYesNoInput(u8 taskId)
|
||||
|
||||
bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPress, u8 columnCount)
|
||||
{
|
||||
u8 bottom = 0;
|
||||
|
||||
if (FuncIsActiveTask(Task_HandleMultichoiceGridInput) == TRUE)
|
||||
{
|
||||
return FALSE;
|
||||
@ -1256,10 +1252,8 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPr
|
||||
else
|
||||
{
|
||||
u8 taskId;
|
||||
u8 unk2;
|
||||
int width;
|
||||
int i;
|
||||
u8 newWidth;
|
||||
u8 rowCount, newWidth;
|
||||
int i, width;
|
||||
|
||||
gSpecialVar_Result = 0xFF;
|
||||
width = 0;
|
||||
@ -1272,15 +1266,15 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 ignoreBPr
|
||||
newWidth = convert_pixel_width_to_tile_width(width);
|
||||
|
||||
left = sub_80E2D5C(left, columnCount * newWidth);
|
||||
unk2 = gMultichoiceLists[multichoiceId].count / columnCount;
|
||||
rowCount = gMultichoiceLists[multichoiceId].count / columnCount;
|
||||
|
||||
taskId = CreateTask(Task_HandleMultichoiceGridInput, 80);
|
||||
|
||||
gTasks[taskId].tIgnoreBPress = ignoreBPress;
|
||||
gTasks[taskId].tWindowId = CreateWindowFromRect(left, top, columnCount * newWidth, unk2 * 2);
|
||||
gTasks[taskId].tWindowId = CreateWindowFromRect(left, top, columnCount * newWidth, rowCount * 2);
|
||||
SetStandardWindowBorderStyle(gTasks[taskId].tWindowId, 0);
|
||||
sub_81997AC(gTasks[taskId].tWindowId, newWidth * 8, columnCount, unk2, gMultichoiceLists[multichoiceId].list);
|
||||
sub_8199944(gTasks[taskId].tWindowId, newWidth * 8, columnCount, unk2, 0);
|
||||
PrintMenuGridTable(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, gMultichoiceLists[multichoiceId].list);
|
||||
sub_8199944(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, 0);
|
||||
CopyWindowToVram(gTasks[taskId].tWindowId, 3);
|
||||
return TRUE;
|
||||
}
|
||||
@ -1291,23 +1285,24 @@ static void Task_HandleMultichoiceGridInput(u8 taskId)
|
||||
s16 *data = gTasks[taskId].data;
|
||||
s8 selection = Menu_ProcessInputGridLayout();
|
||||
|
||||
if (selection != -2)
|
||||
switch (selection)
|
||||
{
|
||||
if (selection == -1)
|
||||
{
|
||||
if (tIgnoreBPress)
|
||||
return;
|
||||
PlaySE(SE_SELECT);
|
||||
gSpecialVar_Result = 0x7F;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_Result = selection;
|
||||
}
|
||||
sub_80E2A78(tWindowId);
|
||||
DestroyTask(taskId);
|
||||
EnableBothScriptContexts();
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
return;
|
||||
case MENU_B_PRESSED:
|
||||
if (tIgnoreBPress)
|
||||
return;
|
||||
PlaySE(SE_SELECT);
|
||||
gSpecialVar_Result = 0x7F;
|
||||
break;
|
||||
default:
|
||||
gSpecialVar_Result = selection;
|
||||
break;
|
||||
}
|
||||
|
||||
ClearToTransparentAndRemoveWindow(tWindowId);
|
||||
DestroyTask(taskId);
|
||||
EnableBothScriptContexts();
|
||||
}
|
||||
|
||||
#undef tWindowId
|
||||
@ -1564,7 +1559,7 @@ static void Task_PokemonPicWindow(u8 taskId)
|
||||
task->tState++;
|
||||
break;
|
||||
case 3:
|
||||
sub_80E2A78(task->tWindowId);
|
||||
ClearToTransparentAndRemoveWindow(task->tWindowId);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
@ -1628,7 +1623,7 @@ u8 CreateWindowFromRect(u8 x, u8 y, u8 width, u8 height)
|
||||
return windowId;
|
||||
}
|
||||
|
||||
void sub_80E2A78(u8 windowId)
|
||||
void ClearToTransparentAndRemoveWindow(u8 windowId)
|
||||
{
|
||||
ClearStdWindowAndFrameToTransparent(windowId, TRUE);
|
||||
RemoveWindow(windowId);
|
||||
@ -1638,30 +1633,30 @@ static void sub_80E2A94(u8 multichoiceId)
|
||||
{
|
||||
switch (multichoiceId)
|
||||
{
|
||||
case 77:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 76:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 78:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 79:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 75:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 74:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 77:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 76:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 78:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 79:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 75:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
case 74:
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -395,7 +395,7 @@ static void sub_80F8EE8(u8 taskId)
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 4:
|
||||
sub_80E2A78(gTasks[taskId].data[5]);
|
||||
ClearToTransparentAndRemoveWindow(gTasks[taskId].data[5]);
|
||||
DestroyTask(taskId);
|
||||
break;
|
||||
}
|
||||
|
@ -89,14 +89,7 @@ gUnknown_030012F2: @ 30012F2
|
||||
gUnknown_030012F4: @ 30012F4
|
||||
.space 0x4
|
||||
|
||||
gUnknown_030012F8: @ 30012F8
|
||||
.space 0x2
|
||||
|
||||
gUnknown_030012FA: @ 30012FA
|
||||
.space 0x2
|
||||
|
||||
gUnknown_030012FC: @ 30012FC
|
||||
.space 0x4
|
||||
.include "src/faraway_island.o"
|
||||
|
||||
gUnknown_03001300: @ 3001300
|
||||
.space 0x40
|
||||
|
@ -193,9 +193,6 @@ gUnknown_0203CF44: @ 203CF44
|
||||
.space 0x4
|
||||
|
||||
.include "src/menu_specialized.o"
|
||||
|
||||
gUnknown_0203CF50: @ 203CF50
|
||||
.space 0x4
|
||||
|
||||
.include "src/faraway_island.o"
|
||||
.include "src/trainer_hill.o"
|
||||
.include "src/rayquaza_scene.o"
|
||||
|
Loading…
x
Reference in New Issue
Block a user