Merge branch 'master' into doc-pblock

This commit is contained in:
GriffinR 2020-08-12 19:49:55 -04:00 committed by GitHub
commit ade49de329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
61 changed files with 3737 additions and 4290 deletions

View File

@ -405,7 +405,7 @@ B_BUFF3 = FD 34
NAME_END = FC 00
@ special 0xF7 character
SPECIAL_F7 = F7
DYNAMIC = F7
@ more text functions
@ -415,15 +415,15 @@ SHADOW = FC 03 @ same as fc 01
COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
PALETTE = FC 05 @ used in credits
SIZE = FC 06 @ note that anything other than "SMALL" is invalid
UNKNOWN_7 = FC 07
RESET_SIZE = FC 07
PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them
PAUSE_UNTIL_PRESS = FC 09
WAIT_SE = FC 0A
PLAY_BGM = FC 0B
ESCAPE = FC 0C
SHIFT_TEXT = FC 0D
UNKNOWN_E = FC 0E
UNKNOWN_F = FC 0F
SHIFT_DOWN = FC 0E
FILL_WINDOW = FC 0F
PLAY_SE = FC 10
CLEAR = FC 11
SKIP = FC 12

View File

@ -249,64 +249,64 @@ AI_CBM_BellyDrum: @ 82DC341
if_hp_less_than AI_USER, 51, Score_Minus10
AI_CBM_AttackUp: @ 82DC348
if_stat_level_equal AI_USER, STAT_ATK, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_ATK, MAX_STAT_STAGE, Score_Minus10
end
AI_CBM_DefenseUp: @ 82DC351
if_stat_level_equal AI_USER, STAT_DEF, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_DEF, MAX_STAT_STAGE, Score_Minus10
end
AI_CBM_SpeedUp: @ 82DC35A
if_stat_level_equal AI_USER, STAT_SPEED, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_SPEED, MAX_STAT_STAGE, Score_Minus10
end
AI_CBM_SpAtkUp: @ 82DC363
if_stat_level_equal AI_USER, STAT_SPATK, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_SPATK, MAX_STAT_STAGE, Score_Minus10
end
AI_CBM_SpDefUp: @ 82DC36C
if_stat_level_equal AI_USER, STAT_SPDEF, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_SPDEF, MAX_STAT_STAGE, Score_Minus10
end
AI_CBM_AccUp: @ 82DC375
if_stat_level_equal AI_USER, STAT_ACC, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_ACC, MAX_STAT_STAGE, Score_Minus10
end
AI_CBM_EvasionUp: @ 82DC37E
if_stat_level_equal AI_USER, STAT_EVASION, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_EVASION, MAX_STAT_STAGE, Score_Minus10
end
AI_CBM_AttackDown: @ 82DC387
if_stat_level_equal AI_TARGET, STAT_ATK, 0, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_ATK, MIN_STAT_STAGE, Score_Minus10
get_ability AI_TARGET
if_equal ABILITY_HYPER_CUTTER, Score_Minus10
goto CheckIfAbilityBlocksStatChange
AI_CBM_DefenseDown: @ 82DC39C
if_stat_level_equal AI_TARGET, STAT_DEF, 0, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_DEF, MIN_STAT_STAGE, Score_Minus10
goto CheckIfAbilityBlocksStatChange
AI_CBM_SpeedDown: @ 82DC3A9
if_stat_level_equal AI_TARGET, STAT_SPEED, 0, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_SPEED, MIN_STAT_STAGE, Score_Minus10
if_ability AI_TARGET, ABILITY_SPEED_BOOST, Score_Minus10
goto CheckIfAbilityBlocksStatChange
AI_CBM_SpAtkDown: @ 82DC3BF
if_stat_level_equal AI_TARGET, STAT_SPATK, 0, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_SPATK, MIN_STAT_STAGE, Score_Minus10
goto CheckIfAbilityBlocksStatChange
AI_CBM_SpDefDown: @ 82DC3CC
if_stat_level_equal AI_TARGET, STAT_SPDEF, 0, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_SPDEF, MIN_STAT_STAGE, Score_Minus10
goto CheckIfAbilityBlocksStatChange
AI_CBM_AccDown: @ 82DC3D9
if_stat_level_equal AI_TARGET, STAT_ACC, 0, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_ACC, MIN_STAT_STAGE, Score_Minus10
get_ability AI_TARGET
if_equal ABILITY_KEEN_EYE, Score_Minus10
goto CheckIfAbilityBlocksStatChange
AI_CBM_EvasionDown: @ 82DC3EE
if_stat_level_equal AI_TARGET, STAT_EVASION, 0, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_EVASION, MIN_STAT_STAGE, Score_Minus10
CheckIfAbilityBlocksStatChange: @ 82DC3F6
get_ability AI_TARGET
@ -315,20 +315,20 @@ CheckIfAbilityBlocksStatChange: @ 82DC3F6
end
AI_CBM_Haze: @ 82DC405
if_stat_level_less_than AI_USER, STAT_ATK, 6, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_DEF, 6, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_SPEED, 6, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_SPATK, 6, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_SPDEF, 6, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_ACC, 6, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_EVASION, 6, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_ATK, 6, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_DEF, 6, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_SPEED, 6, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_SPATK, 6, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_SPDEF, 6, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_ACC, 6, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_EVASION, 6, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_ATK, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_DEF, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_SPEED, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_SPATK, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_SPDEF, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_ACC, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_less_than AI_USER, STAT_EVASION, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_ATK, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_DEF, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_SPEED, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_SPATK, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_SPDEF, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_ACC, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
if_stat_level_more_than AI_TARGET, STAT_EVASION, DEFAULT_STAT_STAGE, AI_CBM_Haze_End
goto Score_Minus10
AI_CBM_Haze_End: @ 82DC47A
@ -436,8 +436,8 @@ AI_CBM_CantEscape: @ 82DC5B0
end
AI_CBM_Curse: @ 82DC5BB
if_stat_level_equal AI_USER, STAT_ATK, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_DEF, 12, Score_Minus8
if_stat_level_equal AI_USER, STAT_ATK, MAX_STAT_STAGE, Score_Minus10
if_stat_level_equal AI_USER, STAT_DEF, MAX_STAT_STAGE, Score_Minus8
end
AI_CBM_Spikes: @ 82DC5CC
@ -484,8 +484,8 @@ AI_CBM_Safeguard: @ 82DC635
end
AI_CBM_Memento: @ 82DC640
if_stat_level_equal AI_TARGET, STAT_ATK, 0, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_SPATK, 0, Score_Minus8
if_stat_level_equal AI_TARGET, STAT_ATK, MIN_STAT_STAGE, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_SPATK, MIN_STAT_STAGE, Score_Minus8
AI_CBM_BatonPass: @ 82DC650
count_usable_party_mons AI_USER
@ -574,18 +574,18 @@ AI_CBM_MudSport: @ 82DC71E
end
AI_CBM_Tickle: @ 82DC729
if_stat_level_equal AI_TARGET, STAT_ATK, 0, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_DEF, 0, Score_Minus8
if_stat_level_equal AI_TARGET, STAT_ATK, MIN_STAT_STAGE, Score_Minus10
if_stat_level_equal AI_TARGET, STAT_DEF, MIN_STAT_STAGE, Score_Minus8
end
AI_CBM_CosmicPower: @ 82DC73A
if_stat_level_equal AI_USER, STAT_DEF, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_SPDEF, 12, Score_Minus8
if_stat_level_equal AI_USER, STAT_DEF, MAX_STAT_STAGE, Score_Minus10
if_stat_level_equal AI_USER, STAT_SPDEF, MAX_STAT_STAGE, Score_Minus8
end
AI_CBM_BulkUp: @ 82DC74B
if_stat_level_equal AI_USER, STAT_ATK, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_DEF, 12, Score_Minus8
if_stat_level_equal AI_USER, STAT_ATK, MAX_STAT_STAGE, Score_Minus10
if_stat_level_equal AI_USER, STAT_DEF, MAX_STAT_STAGE, Score_Minus8
end
AI_CBM_WaterSport: @ 82DC75C
@ -593,13 +593,13 @@ AI_CBM_WaterSport: @ 82DC75C
end
AI_CBM_CalmMind: @ 82DC767
if_stat_level_equal AI_USER, STAT_SPATK, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_SPDEF, 12, Score_Minus8
if_stat_level_equal AI_USER, STAT_SPATK, MAX_STAT_STAGE, Score_Minus10
if_stat_level_equal AI_USER, STAT_SPDEF, MAX_STAT_STAGE, Score_Minus8
end
AI_CBM_DragonDance: @ 82DC778
if_stat_level_equal AI_USER, STAT_ATK, 12, Score_Minus10
if_stat_level_equal AI_USER, STAT_SPEED, 12, Score_Minus8
if_stat_level_equal AI_USER, STAT_ATK, MAX_STAT_STAGE, Score_Minus10
if_stat_level_equal AI_USER, STAT_SPEED, MAX_STAT_STAGE, Score_Minus8
end
Score_Minus1:
@ -1101,7 +1101,7 @@ AI_CV_EvasionUp7:
AI_CV_EvasionUp8:
if_hp_more_than AI_USER, 70, AI_CV_EvasionUp_End
if_stat_level_equal AI_USER, STAT_EVASION, 6, AI_CV_EvasionUp_End
if_stat_level_equal AI_USER, STAT_EVASION, DEFAULT_STAT_STAGE, AI_CV_EvasionUp_End
if_hp_less_than AI_USER, 40, AI_CV_EvasionUp_ScoreDown2
if_hp_less_than AI_TARGET, 40, AI_CV_EvasionUp_ScoreDown2
if_random_less_than 70, AI_CV_EvasionUp_End
@ -1130,7 +1130,7 @@ AI_CV_AlwaysHit_End:
end
AI_CV_AttackDown: @ 82DCDF8
if_stat_level_equal AI_TARGET, STAT_ATK, 6, AI_CV_AttackDown3
if_stat_level_equal AI_TARGET, STAT_ATK, DEFAULT_STAT_STAGE, AI_CV_AttackDown3
score -1
if_hp_more_than AI_USER, 90, AI_CV_AttackDown2
score -1
@ -1198,7 +1198,7 @@ AI_CV_SpeedDown_End: @ 82DCE96
end
AI_CV_SpAtkDown:
if_stat_level_equal AI_TARGET, STAT_ATK, 6, AI_CV_SpAtkDown3
if_stat_level_equal AI_TARGET, STAT_ATK, DEFAULT_STAT_STAGE, AI_CV_SpAtkDown3
score -1
if_hp_more_than AI_USER, 90, AI_CV_SpAtkDown2
score -1
@ -1284,7 +1284,7 @@ AI_CV_AccuracyDown7:
AI_CV_AccuracyDown8:
if_hp_more_than AI_USER, 70, AI_CV_AccuracyDown_End
if_stat_level_equal AI_TARGET, STAT_ACC, 6, AI_CV_AccuracyDown_End
if_stat_level_equal AI_TARGET, STAT_ACC, DEFAULT_STAT_STAGE, AI_CV_AccuracyDown_End
if_hp_less_than AI_USER, 40, AI_CV_AccuracyDown_ScoreDown2
if_hp_less_than AI_TARGET, 40, AI_CV_AccuracyDown_ScoreDown2
if_random_less_than 70, AI_CV_AccuracyDown_End
@ -1997,7 +1997,7 @@ AI_CV_Curse2:
score +1
AI_CV_Curse3:
if_stat_level_more_than AI_USER, STAT_DEF, 6, AI_CV_Curse_End
if_stat_level_more_than AI_USER, STAT_DEF, DEFAULT_STAT_STAGE, AI_CV_Curse_End
if_random_less_than 128, AI_CV_Curse_End
score +1
goto AI_CV_Curse_End
@ -2518,7 +2518,7 @@ AI_CV_ChangeSelfAbility_AbilitiesToEncourage:
AI_CV_Superpower:
if_type_effectiveness AI_EFFECTIVENESS_x0_25, AI_CV_Superpower_ScoreDown1
if_type_effectiveness AI_EFFECTIVENESS_x0_5, AI_CV_Superpower_ScoreDown1
if_stat_level_less_than AI_USER, STAT_ATK, 6, AI_CV_Superpower_ScoreDown1
if_stat_level_less_than AI_USER, STAT_ATK, DEFAULT_STAT_STAGE, AI_CV_Superpower_ScoreDown1
if_target_faster AI_CV_Superpower2
if_hp_more_than AI_USER, 40, AI_CV_Superpower_ScoreDown1
goto AI_CV_Superpower_End
@ -2933,12 +2933,12 @@ sMovesTable_ProtectMoves:
AI_PreferBatonPass_EncourageIfHighStats:
get_turn_count
if_equal 0, Score_Minus2
if_stat_level_more_than AI_USER, STAT_ATK, 8, Score_Plus3
if_stat_level_more_than AI_USER, STAT_ATK, 7, Score_Plus2
if_stat_level_more_than AI_USER, STAT_ATK, 6, Score_Plus1
if_stat_level_more_than AI_USER, STAT_SPATK, 8, Score_Plus3
if_stat_level_more_than AI_USER, STAT_SPATK, 7, Score_Plus2
if_stat_level_more_than AI_USER, STAT_SPATK, 6, Score_Plus1
if_stat_level_more_than AI_USER, STAT_ATK, DEFAULT_STAT_STAGE + 2, Score_Plus3
if_stat_level_more_than AI_USER, STAT_ATK, DEFAULT_STAT_STAGE + 1, Score_Plus2
if_stat_level_more_than AI_USER, STAT_ATK, DEFAULT_STAT_STAGE, Score_Plus1
if_stat_level_more_than AI_USER, STAT_SPATK, DEFAULT_STAT_STAGE + 2, Score_Plus3
if_stat_level_more_than AI_USER, STAT_SPATK, DEFAULT_STAT_STAGE + 1, Score_Plus2
if_stat_level_more_than AI_USER, STAT_SPATK, DEFAULT_STAT_STAGE, Score_Plus1
end
AI_PreferBatonPassEnd:

View File

@ -798,7 +798,7 @@ BattleScript_KOFail::
BattleScript_EffectRazorWind::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
setbyte sTWOTURN_STRINGID, 0x0
setbyte sTWOTURN_STRINGID, 0
call BattleScriptFirstChargingTurn
goto BattleScript_MoveEnd
@ -1084,7 +1084,7 @@ BattleScript_EffectAccuracyDownHit::
BattleScript_EffectSkyAttack::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
setbyte sTWOTURN_STRINGID, 0x3
setbyte sTWOTURN_STRINGID, 3
call BattleScriptFirstChargingTurn
goto BattleScript_MoveEnd
@ -1504,9 +1504,9 @@ BattleScript_EffectCurse::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_SPEED, 0x0, BattleScript_CurseTrySpeed
jumpifstat BS_ATTACKER, CMP_NOT_EQUAL, STAT_ATK, 0xC, BattleScript_CurseTrySpeed
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, 0xC, BattleScript_ButItFailed
jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_SPEED, MIN_STAT_STAGE, BattleScript_CurseTrySpeed
jumpifstat BS_ATTACKER, CMP_NOT_EQUAL, STAT_ATK, MAX_STAT_STAGE, BattleScript_CurseTrySpeed
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, MAX_STAT_STAGE, BattleScript_ButItFailed
BattleScript_CurseTrySpeed::
copybyte gBattlerTarget, gBattlerAttacker
setbyte sB_ANIM_TURN, 0x1
@ -1831,7 +1831,7 @@ BattleScript_EffectMirrorCoat::
BattleScript_EffectSkullBash::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
setbyte sTWOTURN_STRINGID, 0x2
setbyte sTWOTURN_STRINGID, 2
call BattleScriptFirstChargingTurn
setstatchanger STAT_DEF, 1, FALSE
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_SkullBashEnd
@ -1927,7 +1927,7 @@ BattleScript_EffectSolarbeam::
BattleScript_SolarbeamDecideTurn::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
setbyte sTWOTURN_STRINGID, 0x1
setbyte sTWOTURN_STRINGID, 1
call BattleScriptFirstChargingTurn
goto BattleScript_MoveEnd
BattleScript_SolarbeamOnFirstTurn::
@ -1996,19 +1996,19 @@ BattleScript_EffectSemiInvulnerable::
jumpifmove MOVE_FLY, BattleScript_FirstTurnFly
jumpifmove MOVE_DIVE, BattleScript_FirstTurnDive
jumpifmove MOVE_BOUNCE, BattleScript_FirstTurnBounce
setbyte sTWOTURN_STRINGID, 0x5
setbyte sTWOTURN_STRINGID, 5
goto BattleScript_FirstTurnSemiInvulnerable
BattleScript_FirstTurnBounce::
setbyte sTWOTURN_STRINGID, 0x7
setbyte sTWOTURN_STRINGID, 7
goto BattleScript_FirstTurnSemiInvulnerable
BattleScript_FirstTurnDive::
setbyte sTWOTURN_STRINGID, 0x6
setbyte sTWOTURN_STRINGID, 6
goto BattleScript_FirstTurnSemiInvulnerable
BattleScript_FirstTurnFly::
setbyte sTWOTURN_STRINGID, 0x4
setbyte sTWOTURN_STRINGID, 4
BattleScript_FirstTurnSemiInvulnerable::
call BattleScriptFirstChargingTurn
setsemiinvulnerablebit
@ -2670,8 +2670,8 @@ BattleScript_EffectTickle::
attackcanceler
attackstring
ppreduce
jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_ATK, 0x0, BattleScript_TickleDoMoveAnim
jumpifstat BS_TARGET, CMP_EQUAL, STAT_DEF, 0x0, BattleScript_CantLowerMultipleStats
jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_ATK, MIN_STAT_STAGE, BattleScript_TickleDoMoveAnim
jumpifstat BS_TARGET, CMP_EQUAL, STAT_DEF, MIN_STAT_STAGE, BattleScript_CantLowerMultipleStats
BattleScript_TickleDoMoveAnim::
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
attackanimation
@ -2705,8 +2705,8 @@ BattleScript_EffectCosmicPower::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, 0xC, BattleScript_CosmicPowerDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 0xC, BattleScript_CantRaiseMultipleStats
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, MAX_STAT_STAGE, BattleScript_CosmicPowerDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, MAX_STAT_STAGE, BattleScript_CantRaiseMultipleStats
BattleScript_CosmicPowerDoMoveAnim::
attackanimation
waitanimation
@ -2734,8 +2734,8 @@ BattleScript_EffectBulkUp::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_BulkUpDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, 0xC, BattleScript_CantRaiseMultipleStats
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_BulkUpDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, MAX_STAT_STAGE, BattleScript_CantRaiseMultipleStats
BattleScript_BulkUpDoMoveAnim::
attackanimation
waitanimation
@ -2759,8 +2759,8 @@ BattleScript_EffectCalmMind::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, 0xC, BattleScript_CalmMindDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 0xC, BattleScript_CantRaiseMultipleStats
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_CalmMindDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, MAX_STAT_STAGE, BattleScript_CantRaiseMultipleStats
BattleScript_CalmMindDoMoveAnim::
attackanimation
waitanimation
@ -2791,8 +2791,8 @@ BattleScript_EffectDragonDance::
attackcanceler
attackstring
ppreduce
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_DragonDanceDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPEED, 0xC, BattleScript_CantRaiseMultipleStats
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_DragonDanceDoMoveAnim
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPEED, MAX_STAT_STAGE, BattleScript_CantRaiseMultipleStats
BattleScript_DragonDanceDoMoveAnim::
attackanimation
waitanimation
@ -3047,13 +3047,13 @@ BattleScript_FrontierTrainerBattleWon_LoseTexts:
trainerslidein BS_ATTACKER
waitstate
printstring STRINGID_TRAINER1LOSETEXT
jumpifnotbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_82DAACB
jumpifnotbattletype BATTLE_TYPE_TWO_OPPONENTS, BattleScript_TryPickUpItems
trainerslideout B_POSITION_OPPONENT_LEFT
waitstate
trainerslidein BS_FAINTED
waitstate
printstring STRINGID_TRAINER2LOSETEXT
BattleScript_82DAACB:
BattleScript_TryPickUpItems:
jumpifnotbattletype BATTLE_TYPE_PYRAMID, BattleScript_FrontierTrainerBattleWon_End
pickup
BattleScript_FrontierTrainerBattleWon_End:
@ -3252,7 +3252,7 @@ BattleScript_SunlightFaded::
end2
BattleScript_OverworldWeatherStarts::
printfromtable gWeatherContinuesStringIds
printfromtable gWeatherStartsStringIds
waitmessage 0x40
playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL
end3
@ -3462,11 +3462,11 @@ BattleScript_PerishSongCountGoesDown::
end2
BattleScript_AllStatsUp::
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, 0xC, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPEED, 0xC, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, 0xC, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 0xC, BattleScript_AllStatsUpRet
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPEED, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, MAX_STAT_STAGE, BattleScript_AllStatsUpRet
BattleScript_AllStatsUpAtk::
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0x0
@ -3638,18 +3638,18 @@ BattleScript_AtkDefDown::
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS
playstatchangeanimation BS_ATTACKER, BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE
setstatchanger STAT_ATK, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_82DB144
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB144
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_AtkDefDown_TryDef
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AtkDefDown_TryDef
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_82DB144::
BattleScript_AtkDefDown_TryDef::
playstatchangeanimation BS_ATTACKER, BIT_DEF, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE
setstatchanger STAT_DEF, 1, TRUE
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_82DB167
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB167
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_AtkDefDown_End
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AtkDefDown_End
printfromtable gStatDownStringIds
waitmessage 0x40
BattleScript_82DB167::
BattleScript_AtkDefDown_End::
return
BattleScript_KnockedOff::
@ -4017,10 +4017,10 @@ BattleScript_WeatherFormChangesLoop::
return
BattleScript_CastformChange::
call BattleScript_82DB4AF
call BattleScript_DoCastformChange
end3
BattleScript_82DB4AF::
BattleScript_DoCastformChange::
docastformchangeanimation
waitstate
printstring STRINGID_PKMNTRANSFORMED

View File

@ -13,28 +13,28 @@
.align 2
gBattlescriptsForBallThrow:: @ 82DBD08
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_SafariBallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow
.4byte BattleScript_BallThrow @ ITEM_NONE
.4byte BattleScript_BallThrow @ ITEM_MASTER_BALL
.4byte BattleScript_BallThrow @ ITEM_ULTRA_BALL
.4byte BattleScript_BallThrow @ ITEM_GREAT_BALL
.4byte BattleScript_BallThrow @ ITEM_POKE_BALL
.4byte BattleScript_SafariBallThrow @ ITEM_SAFARI_BALL
.4byte BattleScript_BallThrow @ ITEM_NET_BALL
.4byte BattleScript_BallThrow @ ITEM_DIVE_BALL
.4byte BattleScript_BallThrow @ ITEM_NEST_BALL
.4byte BattleScript_BallThrow @ ITEM_REPEAT_BALL
.4byte BattleScript_BallThrow @ ITEM_TIMER_BALL
.4byte BattleScript_BallThrow @ ITEM_LUXURY_BALL
.4byte BattleScript_BallThrow @ ITEM_PREMIER_BALL
.align 2
gBattlescriptsForUsingItem:: @ 82DBD3C
.4byte BattleScript_PlayerUsesItem
.4byte BattleScript_OpponentUsesHealItem
.4byte BattleScript_OpponentUsesHealItem
.4byte BattleScript_OpponentUsesStatusCureItem
.4byte BattleScript_OpponentUsesXItem
.4byte BattleScript_OpponentUsesGuardSpecs
.4byte BattleScript_OpponentUsesHealItem @ AI_ITEM_FULL_RESTORE
.4byte BattleScript_OpponentUsesHealItem @ AI_ITEM_HEAL_HP
.4byte BattleScript_OpponentUsesStatusCureItem @ AI_ITEM_CURE_CONDITION
.4byte BattleScript_OpponentUsesXItem @ AI_ITEM_X_STAT
.4byte BattleScript_OpponentUsesGuardSpecs @ AI_ITEM_GUARD_SPECS
.align 2
gBattlescriptsForRunningByItem:: @ 82DBD54

View File

@ -40,6 +40,7 @@
#include "constants/moves.h"
#include "constants/party_menu.h"
#include "constants/pokemon.h"
#include "constants/roulette.h"
#include "constants/script_menu.h"
#include "constants/secret_bases.h"
#include "constants/songs.h"

View File

@ -6,7 +6,7 @@ Roulette_EventScript_Table1:: @ 82A5AB1
getpricereduction POKENEWS_GAME_CORNER
compare VAR_RESULT, FALSE
goto_if_eq Roulette_EventScript_Play
addvar VAR_0x8004, 128
addvar VAR_0x8004, ROULETTE_SPECIAL_RATE
goto Roulette_EventScript_Play
end
@ -18,7 +18,7 @@ Roulette_EventScript_Table2:: @ 82A5ADF
getpricereduction POKENEWS_GAME_CORNER
compare VAR_RESULT, FALSE
goto_if_eq Roulette_EventScript_Play
addvar VAR_0x8004, 128
addvar VAR_0x8004, ROULETTE_SPECIAL_RATE
goto Roulette_EventScript_Play
end

View File

@ -342,50 +342,61 @@ u8 *StringExpandPlaceholders(u8 *dest, const u8 *src)
switch (c)
{
case PLACEHOLDER_BEGIN:
placeholderId = *src++;
expandedString = GetExpandedPlaceholder(placeholderId);
dest = StringExpandPlaceholders(dest, expandedString);
break;
case EXT_CTRL_CODE_BEGIN:
*dest++ = c;
c = *src++;
*dest++ = c;
case PLACEHOLDER_BEGIN:
placeholderId = *src++;
expandedString = GetExpandedPlaceholder(placeholderId);
dest = StringExpandPlaceholders(dest, expandedString);
break;
case EXT_CTRL_CODE_BEGIN:
*dest++ = c;
c = *src++;
*dest++ = c;
switch (c)
{
case 0x07:
case 0x09:
case 0x0F:
case 0x15:
case 0x16:
case 0x17:
case 0x18:
break;
case 0x04:
*dest++ = *src++;
case 0x0B:
*dest++ = *src++;
default:
*dest++ = *src++;
}
switch (c)
{
case EXT_CTRL_CODE_RESET_SIZE:
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
case EXT_CTRL_CODE_FILL_WINDOW:
case EXT_CTRL_CODE_JPN:
case EXT_CTRL_CODE_ENG:
case EXT_CTRL_CODE_PAUSE_MUSIC:
case EXT_CTRL_CODE_RESUME_MUSIC:
break;
case EOS:
*dest = EOS;
return dest;
case CHAR_PROMPT_SCROLL:
case CHAR_PROMPT_CLEAR:
case CHAR_NEWLINE:
case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW:
*dest++ = *src++;
case EXT_CTRL_CODE_PLAY_BGM:
*dest++ = *src++;
default:
*dest++ = c;
*dest++ = *src++;
}
break;
case EOS:
*dest = EOS;
return dest;
case CHAR_PROMPT_SCROLL:
case CHAR_PROMPT_CLEAR:
case CHAR_NEWLINE:
default:
*dest++ = c;
}
}
}
u8 *StringBraille(u8 *dest, const u8 *src)
{
u8 setBrailleFont[] = { EXT_CTRL_CODE_BEGIN, 0x06, 0x06, EOS };
u8 gotoLine2[] = { CHAR_NEWLINE, EXT_CTRL_CODE_BEGIN, 0x0E, 0x02, EOS };
const u8 setBrailleFont[] = {
EXT_CTRL_CODE_BEGIN,
EXT_CTRL_CODE_SIZE,
6,
EOS
};
const u8 gotoLine2[] = {
CHAR_NEWLINE,
EXT_CTRL_CODE_BEGIN,
EXT_CTRL_CODE_SHIFT_DOWN,
2,
EOS
};
dest = StringCopy(dest, setBrailleFont);
@ -395,16 +406,16 @@ u8 *StringBraille(u8 *dest, const u8 *src)
switch (c)
{
case EOS:
*dest = c;
return dest;
case CHAR_NEWLINE:
dest = StringCopy(dest, gotoLine2);
break;
default:
*dest++ = c;
*dest++ = c + 0x40;
break;
case EOS:
*dest = c;
return dest;
case CHAR_NEWLINE:
dest = StringCopy(dest, gotoLine2);
break;
default:
*dest++ = c;
*dest++ = c + 0x40;
break;
}
}
}
@ -564,7 +575,7 @@ u8 *StringCopyN_Multibyte(u8 *dest, u8 *src, u32 n)
else
{
*dest++ = *src++;
if (*(src - 1) == CHAR_SPECIAL_F9)
if (*(src - 1) == CHAR_EXTRA_SYMBOL)
*dest++ = *src++;
}
}
@ -579,7 +590,7 @@ u32 StringLength_Multibyte(const u8 *str)
while (*str != EOS)
{
if (*str == CHAR_SPECIAL_F9)
if (*str == CHAR_EXTRA_SYMBOL)
str++;
str++;
length++;
@ -596,15 +607,15 @@ u8 *WriteColorChangeControlCode(u8 *dest, u32 colorType, u8 color)
switch (colorType)
{
case 0:
*dest = 1;
*dest = EXT_CTRL_CODE_COLOR;
dest++;
break;
case 1:
*dest = 3;
*dest = EXT_CTRL_CODE_SHADOW;
dest++;
break;
case 2:
*dest = 2;
*dest = EXT_CTRL_CODE_HIGHLIGHT;
dest++;
break;
}
@ -619,7 +630,7 @@ bool32 IsStringJapanese(u8 *str)
{
while (*str != EOS)
{
if (*str <= 0xA0)
if (*str < CHAR_0)
if (*str != CHAR_SPACE)
return TRUE;
str++;
@ -634,7 +645,7 @@ bool32 sub_800924C(u8 *str, s32 n)
for (i = 0; *str != EOS && i < n; i++)
{
if (*str <= 0xA0)
if (*str < CHAR_0)
if (*str != CHAR_SPACE)
return TRUE;
str++;
@ -647,31 +658,31 @@ u8 GetExtCtrlCodeLength(u8 code)
{
static const u8 lengths[] =
{
1,
2,
2,
2,
4,
2,
2,
1,
2,
1,
1,
3,
2,
2,
2,
1,
3,
2,
2,
2,
2,
1,
1,
1,
1,
[0] = 1,
[EXT_CTRL_CODE_COLOR] = 2,
[EXT_CTRL_CODE_HIGHLIGHT] = 2,
[EXT_CTRL_CODE_SHADOW] = 2,
[EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW] = 4,
[EXT_CTRL_CODE_PALETTE] = 2,
[EXT_CTRL_CODE_SIZE] = 2,
[EXT_CTRL_CODE_RESET_SIZE] = 1,
[EXT_CTRL_CODE_PAUSE] = 2,
[EXT_CTRL_CODE_PAUSE_UNTIL_PRESS] = 1,
[EXT_CTRL_CODE_WAIT_SE] = 1,
[EXT_CTRL_CODE_PLAY_BGM] = 3,
[EXT_CTRL_CODE_ESCAPE] = 2,
[EXT_CTRL_CODE_SHIFT_TEXT] = 2,
[EXT_CTRL_CODE_SHIFT_DOWN] = 2,
[EXT_CTRL_CODE_FILL_WINDOW] = 1,
[EXT_CTRL_CODE_PLAY_SE] = 3,
[EXT_CTRL_CODE_CLEAR] = 2,
[EXT_CTRL_CODE_SKIP] = 2,
[EXT_CTRL_CODE_CLEAR_TO] = 2,
[EXT_CTRL_CODE_MIN_LETTER_SPACING] = 2,
[EXT_CTRL_CODE_JPN] = 1,
[EXT_CTRL_CODE_ENG] = 1,
[EXT_CTRL_CODE_PAUSE_MUSIC] = 1,
[EXT_CTRL_CODE_RESUME_MUSIC] = 1,
};
u8 length = 0;
@ -734,7 +745,7 @@ void ConvertInternationalString(u8 *s, u8 language)
StripExtCtrlCodes(s);
i = StringLength(s);
s[i++] = EXT_CTRL_CODE_BEGIN;
s[i++] = 22;
s[i++] = EXT_CTRL_CODE_ENG;
s[i++] = EOS;
i--;
@ -746,7 +757,7 @@ void ConvertInternationalString(u8 *s, u8 language)
}
s[0] = EXT_CTRL_CODE_BEGIN;
s[1] = 21;
s[1] = EXT_CTRL_CODE_JPN;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -169,9 +169,9 @@
#define CHAR_a_DIAERESIS 0xF4
#define CHAR_o_DIAERESIS 0xF5
#define CHAR_u_DIAERESIS 0xF6
#define CHAR_SPECIAL_F7 0xF7
#define CHAR_SPECIAL_F8 0xF8
#define CHAR_SPECIAL_F9 0xF9
#define CHAR_DYNAMIC 0xF7
#define CHAR_KEYPAD_ICON 0xF8
#define CHAR_EXTRA_SYMBOL 0xF9
#define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog
#define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog
#define EXT_CTRL_CODE_BEGIN 0xFC // extended control code
@ -179,7 +179,22 @@
#define CHAR_NEWLINE 0xFE
#define EOS 0xFF // end of string
// Special F9 chars
// CHAR_KEYPAD_ICON chars
#define CHAR_A_BUTTON 0x00
#define CHAR_B_BUTTON 0x01
#define CHAR_L_BUTTON 0x02
#define CHAR_R_BUTTON 0x03
#define CHAR_START_BUTTON 0x04
#define CHAR_SELECT_BUTTON 0x05
#define CHAR_DPAD_UP 0x06
#define CHAR_DPAD_DOWN 0x07
#define CHAR_DPAD_LEFT 0x08
#define CHAR_DPAD_RIGHT 0x09
#define CHAR_DPAD_UPDOWN 0x0A
#define CHAR_DPAD_LEFTRIGHT 0x0B
#define CHAR_DPAD_NONE 0x0C
// CHAR_EXTRA_SYMBOL chars
#define CHAR_UP_ARROW_2 0x00
#define CHAR_DOWN_ARROW_2 0x01
#define CHAR_LEFT_ARROW_2 0x02
@ -191,21 +206,21 @@
#define CHAR_NO 0x08
#define CHAR_UNDERSCORE 0x09
#define EXT_CTRL_CODE_COLOR 0x1
#define EXT_CTRL_CODE_HIGHLIGHT 0x2
#define EXT_CTRL_CODE_SHADOW 0x3
#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x4
#define EXT_CTRL_CODE_PALETTE 0x5
#define EXT_CTRL_CODE_SIZE 0x6
#define EXT_CTRL_CODE_UNKNOWN_7 0x7
#define EXT_CTRL_CODE_PAUSE 0x8
#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x9
#define EXT_CTRL_CODE_WAIT_SE 0xA
#define EXT_CTRL_CODE_PLAY_BGM 0xB
#define EXT_CTRL_CODE_ESCAPE 0xC
#define EXT_CTRL_CODE_SHIFT_TEXT 0xD
#define EXT_CTRL_CODE_UNKNOWN_E 0xE
#define EXT_CTRL_CODE_UNKNOWN_F 0xF
#define EXT_CTRL_CODE_COLOR 0x01
#define EXT_CTRL_CODE_HIGHLIGHT 0x02
#define EXT_CTRL_CODE_SHADOW 0x03
#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04
#define EXT_CTRL_CODE_PALETTE 0x05
#define EXT_CTRL_CODE_SIZE 0x06
#define EXT_CTRL_CODE_RESET_SIZE 0x07
#define EXT_CTRL_CODE_PAUSE 0x08
#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09
#define EXT_CTRL_CODE_WAIT_SE 0x0A
#define EXT_CTRL_CODE_PLAY_BGM 0x0B
#define EXT_CTRL_CODE_ESCAPE 0x0C
#define EXT_CTRL_CODE_SHIFT_TEXT 0x0D
#define EXT_CTRL_CODE_SHIFT_DOWN 0x0E
#define EXT_CTRL_CODE_FILL_WINDOW 0x0F
#define EXT_CTRL_CODE_PLAY_SE 0x10
#define EXT_CTRL_CODE_CLEAR 0x11
#define EXT_CTRL_CODE_SKIP 0x12
@ -307,7 +322,7 @@ struct TextPrinter
u8 delayCounter;
u8 scrollDistance;
u8 minLetterSpacing; // 0x20
u8 japanese;
bool8 japanese;
};
struct FontInfo
@ -357,7 +372,7 @@ struct Struct_03002F90
extern TextFlags gTextFlags;
extern u8 gUnknown_03002F84;
extern bool8 gUnknown_03002F84;
extern struct Struct_03002F90 gUnknown_03002F90;
void SetFontsPointer(const struct FontInfo *fonts);

View File

@ -1,259 +0,0 @@
JASC-PAL
0100
256
82 156 49
41 41 41
98 98 115
172 180 197
255 255 255
255 205 41
255 172 0
213 164 65
205 164 82
139 106 65
131 222 189
74 189 156
115 189 148
123 180 172
74 115 115
255 255 0
74 106 156
41 41 41
98 98 115
156 156 164
255 255 255
205 156 205
164 106 164
172 131 164
156 123 156
90 57 106
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
74 106 156
41 41 41
123 123 131
172 180 197
255 255 255
238 238 156
189 180 106
131 90 32
255 131 90
189 106 98
230 222 255
74 189 156
255 255 255
123 180 172
255 255 255
255 255 255
74 106 156
57 57 65
98 98 115
156 156 164
255 255 255
106 205 205
246 98 90
106 156 255
255 255 255
156 255 106
246 230 74
255 230 123
255 255 255
255 255 156
156 255 148
205 156 255
74 106 156
41 41 41
98 98 115
205 205 213
255 255 255
123 238 139
255 172 139
16 156 74
197 164 255
49 106 32
115 197 131
197 139 189
255 82 57
255 238 82
205 180 8
255 205 8
74 106 156
106 139 230
82 115 205
255 255 255
255 255 255
255 205 41
255 172 0
213 164 65
205 164 82
139 106 65
131 222 189
74 189 156
115 189 148
123 180 172
74 115 115
255 255 255
74 106 156
255 246 65
255 255 164
255 246 65
255 255 255
205 156 205
164 106 164
172 131 164
156 123 156
90 57 106
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
65 65 57
74 106 156
172 255 238
222 255 255
148 255 238
255 255 255
255 205 41
255 172 0
213 164 65
205 164 82
139 106 65
131 222 189
74 189 156
115 189 148
123 180 172
74 115 115
65 65 57
74 106 156
255 205 255
255 222 255
255 197 255
255 255 255
205 156 205
164 106 164
172 131 164
156 123 156
90 57 106
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
65 65 57
74 106 156
255 255 255
255 255 255
255 255 255
255 255 255
255 205 41
255 172 0
213 164 65
205 164 82
139 106 65
131 222 189
74 189 156
115 189 148
123 180 172
74 115 115
255 255 255
74 106 156
255 255 255
255 255 255
255 255 255
255 255 255
205 156 205
164 106 164
172 131 164
156 123 156
90 57 106
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
74 106 156
255 246 82
164 255 222
172 180 197
255 255 255
255 246 65
246 205 24
238 197 98
205 172 90
164 131 90
156 246 222
90 213 180
131 222 172
115 189 156
98 148 148
65 65 57
74 106 156
238 189 238
156 148 148
172 180 197
255 255 255
255 205 255
222 156 230
197 156 197
172 139 172
139 106 148
205 205 230
255 255 255
255 255 255
255 255 255
255 255 255
65 65 57
74 106 156
238 230 246
205 205 230
172 180 197
255 255 255
255 255 230
255 255 164
255 255 255
222 255 255
255 246 255
255 222 255
255 255 255
255 255 255
255 255 255
255 255 255
65 65 57
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255

View File

Before

Width:  |  Height:  |  Size: 409 B

After

Width:  |  Height:  |  Size: 409 B

View File

@ -483,7 +483,7 @@ $(ROULETTEGFXDIR)/roulette_tilt.4bpp: $(ROULETTEGFXDIR)/shroomish.4bpp \
$(ROULETTEGFXDIR)/tailow.4bpp
@cat $^ >$@
$(ROULETTEGFXDIR)/poke_icons2.4bpp: $(ROULETTEGFXDIR)/wynaut.4bpp \
$(ROULETTEGFXDIR)/wheel_icons.4bpp: $(ROULETTEGFXDIR)/wynaut.4bpp \
$(ROULETTEGFXDIR)/azurill.4bpp \
$(ROULETTEGFXDIR)/skitty.4bpp \
$(ROULETTEGFXDIR)/makuhita.4bpp

View File

@ -2,5 +2,6 @@
#define GUARD_CONSTANTS_COINS_H
#define MAX_COINS 9999
#define MAX_COIN_DIGITS 4
#endif // GUARD_CONSTANTS_COINS_H

View File

@ -84,6 +84,10 @@
#define NUM_NATURE_STATS NUM_STATS - 1 // excludes HP
#define NUM_BATTLE_STATS NUM_STATS + 2 // includes Accuracy and Evasion
#define MIN_STAT_STAGE 0
#define DEFAULT_STAT_STAGE 6
#define MAX_STAT_STAGE 12
// Shiny odds
#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536

View File

@ -0,0 +1,7 @@
#ifndef GUARD_CONSTANTS_ROULETTE_H
#define GUARD_CONSTANTS_ROULETTE_H
// Flag set in gSpecialVar_0x8004 when playing Roulette on a Game Corner service day
#define ROULETTE_SPECIAL_RATE (1 << 7)
#endif // GUARD_CONSTANTS_ROULETTE_H

View File

@ -4918,13 +4918,13 @@ extern const u32 gPartyMenuPokeball_Pal[];
extern const u32 gStatusPal_Icons[];
// Roulette
extern const u32 gRouletteMenuTiles[];
extern const u32 gRouletteWheelTiles[];
extern const u32 gRouletteMenu_Gfx[];
extern const u32 gRouletteWheel_Gfx[];
extern const u32 gRouletteCenter_Gfx[];
extern const u32 gRouletteHeadersTiles[];
extern const u32 gRouletteCreditTiles[];
extern const u32 gRouletteNumbersTiles[];
extern const u32 gRouletteMultiplierTiles[];
extern const u32 gRouletteHeaders_Gfx[];
extern const u32 gRouletteCredit_Gfx[];
extern const u32 gRouletteNumbers_Gfx[];
extern const u32 gRouletteMultiplier_Gfx[];
// Contest util
extern const u32 gContestResults_Gfx[];

83
include/palette_util.h Normal file
View File

@ -0,0 +1,83 @@
#ifndef GUARD_PALETTE_UTIL_H
#define GUARD_PALETTE_UTIL_H
struct PulseBlendSettings
{
u16 blendColor;
u16 paletteOffset;
u8 numColors;
u8 delay;
u8 numFadeCycles;
s8 maxBlendCoeff:4;
s8 fadeType:2;
s8 restorePaletteOnUnload:1;
s8 unk7_7:1;
};
struct PulseBlendPalette
{
u8 paletteSelector;
u8 blendCoeff:4;
u8 fadeDirection:1;
s8 unk1_5:1;
s8 available:1;
u32 inUse:1;
u8 delayCounter;
u8 fadeCycleCounter;
struct PulseBlendSettings pulseBlendSettings;
};
struct PulseBlend
{
u16 usedPulseBlendPalettes;
struct PulseBlendPalette pulseBlendPalettes[16];
};
#define FLASHUTIL_USE_EXISTING_COLOR (1 << 15)
struct RouletteFlashSettings
{
u16 color;
u16 paletteOffset;
u8 numColors;
u8 delay;
s8 unk6; // Set but never used
s8 numFadeCycles:5;
s8 unk7_5:2; // Set but never used
s8 colorDeltaDir:1;
};
struct RouletteFlashPalette
{
u8 state:7;
bool8 available:1;
u8 delayCounter;
s8 fadeCycleCounter;
s8 colorDelta;
struct RouletteFlashSettings settings;
};
struct RouletteFlashUtil
{
u8 enabled;
u8 unused;
u16 flags;
struct RouletteFlashPalette palettes[16];
};
int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *);
void InitPulseBlend(struct PulseBlend *);
void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
void UnloadUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
void UnmarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
void UpdatePulseBlend(struct PulseBlend *);
void ClearTilemapRect(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height);
void SetTilemapRect(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height);
void RouletteFlash_Run(struct RouletteFlashUtil *r0);
void RouletteFlash_Reset(struct RouletteFlashUtil *r0);
u8 RouletteFlash_Add(struct RouletteFlashUtil *r0, u8 r1, const struct RouletteFlashSettings *r2);
void RouletteFlash_Stop(struct RouletteFlashUtil *r0, u16 r1);
void RouletteFlash_Enable(struct RouletteFlashUtil *r0, u16 r1);
#endif // GUARD_PALETTE_UTIL_H

View File

@ -254,7 +254,7 @@ extern const u16 *const gLevelUpLearnsets[];
extern const u8 gPPUpGetMask[];
extern const u8 gPPUpSetMask[];
extern const u8 gPPUpAddMask[];
extern const u8 gStatStageRatios[][2];
extern const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2];
extern const u16 gLinkPlayerFacilityClasses[];
extern const struct SpriteTemplate gUnknown_08329D98[];
extern const s8 gNatureStatTable[][5];

View File

@ -1,34 +1,6 @@
#ifndef GUARD_ROULETTE_H
#define GUARD_ROULETTE_H
struct UnkStruct1
{
u16 var00;
u16 var02;
u8 var04;
u8 var05;
u8 var06;
s8 var07_0:5;
s8 var07_5:2;
s8 var07_7:1;
};
struct UnkStruct3
{
u8 var00_0:7;
u8 var00_7:1;
u8 var01;
s8 var02;
s8 var03;
struct UnkStruct1 var04;
};
struct UnkStruct0
{
u8 var00;
u8 var01;
u16 var02; //flag for each UnkStruct3
struct UnkStruct3 var04[0x10];
};
void PlayRoulette(void);
#endif // GUARD_ROULETTE_H

View File

@ -1,52 +0,0 @@
#ifndef GUARD_ROULETTE_UTIL_H
#define GUARD_ROULETTE_UTIL_H
#include "roulette.h"
struct PulseBlendSettings
{
u16 blendColor;
u16 paletteOffset;
u8 numColors;
u8 delay;
u8 numFadeCycles;
s8 maxBlendCoeff:4;
s8 fadeType:2;
s8 restorePaletteOnUnload:1;
s8 unk7_7:1;
};
struct PulseBlendPalette
{
u8 paletteSelector;
u8 blendCoeff:4;
u8 fadeDirection:1;
s8 unk1_5:1;
s8 available:1;
u32 inUse:1;
u8 delayCounter;
u8 fadeCycleCounter;
struct PulseBlendSettings pulseBlendSettings;
};
struct PulseBlend
{
u16 usedPulseBlendPalettes;
struct PulseBlendPalette pulseBlendPalettes[16];
};
int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *);
void InitPulseBlend(struct PulseBlend *);
void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
void UnloadUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
void UnmarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
void UpdatePulseBlend(struct PulseBlend *);
void sub_8152008(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height);
void sub_8152058(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height);
void task_tutorial_controls_fadein(struct UnkStruct0 *r0);
void sub_8151678(struct UnkStruct0 *r0);
u8 sub_815168C(struct UnkStruct0 *r0, u8 r1, const struct UnkStruct1 *r2);
void sub_8151A9C(struct UnkStruct0 *r0, u16 r1);
void sub_8151A48(struct UnkStruct0 *r0, u16 r1);
#endif // GUARD_ROULETTE_UTIL_H

View File

@ -84,6 +84,19 @@ extern const u8 gText_SoSo[];
extern const u8 gText_Bad[];
extern const u8 gText_TheWorst[];
extern const u8 Roulette_Text_ControlsInstruction[];
extern const u8 Roulette_Text_KeepPlaying[];
extern const u8 Roulette_Text_Jackpot[];
extern const u8 Roulette_Text_ItsAHit[];
extern const u8 Roulette_Text_NothingDoing[];
extern const u8 Roulette_Text_YouveWonXCoins[];
extern const u8 Roulette_Text_BoardWillBeCleared[];
extern const u8 Roulette_Text_CoinCaseIsFull[];
extern const u8 Roulette_Text_NoCoinsLeft[];
extern const u8 Roulette_Text_PlayMinimumWagerIsX[];
extern const u8 Roulette_Text_SpecialRateTable[];
extern const u8 Roulette_Text_NotEnoughCoins[];
extern const u8 gText_Slots[];
extern const u8 gText_Roulette[];
extern const u8 gText_Jackpot[];

View File

@ -237,7 +237,7 @@ SECTIONS {
src/battle_message.o(.text);
src/cable_car.o(.text);
src/math_util.o(.text);
src/roulette_util.o(.text);
src/palette_util.o(.text);
src/confetti_util.o(.text);
src/save.o(.text);
src/mystery_event_script.o(.text);

View File

@ -314,8 +314,8 @@ static bool8 AreStatsRaised(void)
for (i = 0; i < NUM_BATTLE_STATS; i++)
{
if (gBattleMons[gActiveBattler].statStages[i] > 6)
buffedStatsValue += gBattleMons[gActiveBattler].statStages[i] - 6;
if (gBattleMons[gActiveBattler].statStages[i] > DEFAULT_STAT_STAGE)
buffedStatsValue += gBattleMons[gActiveBattler].statStages[i] - DEFAULT_STAT_STAGE;
}
return (buffedStatsValue > 3);

View File

@ -380,21 +380,18 @@ static void AnimTask_AnimateGustTornadoPalette_Step(u8 taskId)
{
u8 data2;
u16 temp;
int i, base;
if (gTasks[taskId].data[10]++ == gTasks[taskId].data[1])
{
int i, base;
gTasks[taskId].data[10] = 0;
data2 = gTasks[taskId].data[2];
temp = gPlttBufferFaded[16 * data2 + 0x108];
i = 7;
base = data2 * 16;
do
{
for (; i > 0; --i)
gPlttBufferFaded[base + 0x101 + i] = gPlttBufferFaded[base + 0x100 + i];
i--;
} while (i > 0);
gPlttBufferFaded[base + 0x101] = temp;
}
@ -536,17 +533,16 @@ static void AnimFlyBallAttack_Step(struct Sprite *sprite)
void DestroyAnimSpriteAfterTimer(struct Sprite *sprite)
{
if (sprite->data[0]-- <= 0)
if (sprite->data[0]-- > 0)
return;
if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK)
{
if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK)
{
FreeOamMatrix(sprite->oam.matrixNum);
sprite->oam.affineMode = ST_OAM_AFFINE_OFF;
}
DestroySprite(sprite);
gAnimVisualTaskCount--;
FreeOamMatrix(sprite->oam.matrixNum);
sprite->oam.affineMode = ST_OAM_AFFINE_OFF;
}
DestroySprite(sprite);
gAnimVisualTaskCount--;
}
struct FeatherDanceData
@ -570,30 +566,27 @@ struct FeatherDanceData
static void AnimFallingFeather(struct Sprite *sprite)
{
u8 battler, matrixNum, sinIndex;
s16 spriteCoord, sinVal;
s16 sinVal;
struct FeatherDanceData *data = (struct FeatherDanceData *)sprite->data;
if (gBattleAnimArgs[7] & 0x100)
battler = gBattleAnimAttacker;
else
battler = gBattleAnimTarget;
battler = (gBattleAnimArgs[7] & 0x100) ? gBattleAnimAttacker : gBattleAnimTarget;
if (GetBattlerSide(battler) == B_SIDE_PLAYER)
gBattleAnimArgs[0] = -gBattleAnimArgs[0];
sprite->pos1.x = GetBattlerSpriteCoord(battler, BATTLER_COORD_ATTR_HEIGHT) + gBattleAnimArgs[0];
spriteCoord = GetBattlerSpriteCoord(battler, BATTLER_COORD_ATTR_WIDTH);
sprite->pos1.y = spriteCoord + gBattleAnimArgs[1];
sinVal = GetBattlerSpriteCoord(battler, BATTLER_COORD_ATTR_WIDTH);
sprite->pos1.y = sinVal + gBattleAnimArgs[1];
data->unk8 = sprite->pos1.y << 8;
data->unkE_1 = spriteCoord + gBattleAnimArgs[6];
data->unk8 = (u16)(sprite->pos1.y) << 8;
data->unkE_1 = (u16)(sinVal + gBattleAnimArgs[6]);
data->unk0_0c = 1;
data->unk2 = gBattleAnimArgs[2] & 0xFF;
data->unkA = (gBattleAnimArgs[2] >> 8) & 0xFF;
data->unk2 = (u16)(gBattleAnimArgs[2] & 0xFF);
data->unkA = (u16)((gBattleAnimArgs[2] >> 8) & 0xFF) ;
data->unk4 = gBattleAnimArgs[3];
data->unk6 = gBattleAnimArgs[4];
*(u16*)(data->unkC) = gBattleAnimArgs[5];
data->unk6 = (u16)gBattleAnimArgs[4];
*(u16*)(data->unkC) = (u16)gBattleAnimArgs[5];
if (data->unk2 >= 64 && data->unk2 <= 191)
{
@ -628,27 +621,16 @@ static void AnimFallingFeather(struct Sprite *sprite)
}
}
data->unk0_1 = data->unk2 >> 6;
sprite->pos2.x = (gSineTable[data->unk2] * data->unkC[0]) >> 8;
data->unk0_1 = data->unk2/64;
sprite->pos2.x = (gSineTable[data->unk2] * (s32)data->unkC[0]) >> 8;
matrixNum = sprite->oam.matrixNum;
sinIndex = (-sprite->pos2.x >> 1) + data->unkA;
sinVal = gSineTable[sinIndex];
gOamMatrices[matrixNum].a = gOamMatrices[matrixNum].d = gSineTable[sinIndex + 64];
// The comparison below is completely pointless. 'sprite' is sure to be a valid pointer and
// both the 'if' and 'else' parts are exactly the same.
// The only reason for this is making sure the compiler generates the exact ASM.
if (sprite)
{
gOamMatrices[matrixNum].b = sinVal;
gOamMatrices[matrixNum].c = -sinVal;
}
else
{
gOamMatrices[matrixNum].b = sinVal;
gOamMatrices[matrixNum].c = -sinVal;
}
gOamMatrices[matrixNum].b = sinVal;
gOamMatrices[matrixNum].c = -sinVal;
sprite->callback = sub_810E520;
}
@ -665,242 +647,239 @@ static void sub_810E520(struct Sprite *sprite)
data->unk0_0a = 0;
data->unk1 = 0;
}
return;
}
else
switch (data->unk2 / 64)
{
switch (data->unk2 / 64)
case 0:
if ((u8)data->unk0_1 == 1) // this must be cast to u8
{
case 0:
if (data->unk0_1 << 24 >> 24 == 1) // the shifts have to be here
{
data->unk0_0d = 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_1 << 24 >> 24 == 3)
{
data->unk0_0b ^= 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_0d)
{
sprite->hFlip ^= 1;
sprite->animNum = sprite->hFlip;
sprite->animBeginning = TRUE;
sprite->animEnded = FALSE;
if (data->unk0_0c)
{
if (!IsContest())
{
if (!data->unkE_0)
{
sprite->oam.priority--;
data->unkE_0 ^= 1;
}
else
{
sprite->oam.priority++;
data->unkE_0 ^= 1;
}
}
else
{
if (!data->unkE_0)
{
sprite->subpriority -= 12;
data->unkE_0 ^= 1;
}
else
{
sprite->subpriority += 12;
data->unkE_0 ^= 1;
}
}
}
data->unk0_0d = 0;
data->unk2;
}
data->unk0_1 = 0;
break;
case 1:
if (data->unk0_1 << 24 >> 24 == 0)
{
data->unk0_0d = 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_1 << 24 >> 24 == 2)
{
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_0d)
{
sprite->hFlip ^= 1;
sprite->animNum = sprite->hFlip;
sprite->animBeginning = TRUE;
sprite->animEnded = FALSE;
if (data->unk0_0c)
{
if (!IsContest())
{
if (!data->unkE_0)
{
sprite->oam.priority--;
data->unkE_0 ^= 1;
}
else
{
sprite->oam.priority++;
data->unkE_0 ^= 1;
}
}
else
{
if (!data->unkE_0)
{
sprite->subpriority -= 12;
data->unkE_0 ^= 1;
}
else
{
sprite->subpriority += 12;
data->unkE_0 ^= 1;
}
}
}
data->unk0_0d = 0;
}
data->unk0_1 = 1;
break;
case 2:
if (data->unk0_1 << 24 >> 24 == 3)
{
data->unk0_0d = 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_1 << 24 >> 24 == 1)
{
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_0d)
{
sprite->hFlip ^= 1;
sprite->animNum = sprite->hFlip;
sprite->animBeginning = TRUE;
sprite->animEnded = FALSE;
if (data->unk0_0c)
{
if (!IsContest())
{
if (!data->unkE_0)
{
sprite->oam.priority--;
data->unkE_0 ^= 1;
}
else
{
sprite->oam.priority++;
data->unkE_0 ^= 1;
}
}
else
{
if (!data->unkE_0)
{
sprite->subpriority -= 12;
data->unkE_0 ^= 1;
}
else
{
sprite->subpriority += 12;
data->unkE_0 ^= 1;
}
}
}
data->unk0_0d = 0;
}
data->unk0_1 = 2;
break;
case 3:
if (data->unk0_1 << 24 >> 24 == 2)
{
data->unk0_0d = 1;
}
else if (data->unk0_1 << 24 >> 24 == 0)
{
data->unk0_0b ^= 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_0d)
{
sprite->hFlip ^= 1;
sprite->animNum = sprite->hFlip;
sprite->animBeginning = TRUE;
sprite->animEnded = FALSE;
if (data->unk0_0c)
{
if (!IsContest())
{
if (!data->unkE_0)
{
sprite->oam.priority--;
data->unkE_0 ^= 1;
}
else
{
sprite->oam.priority++;
data->unkE_0 ^= 1;
}
}
else
{
if (!data->unkE_0)
{
sprite->subpriority -= 12;
data->unkE_0 ^= 1;
}
else
{
sprite->subpriority += 12;
data->unkE_0 ^= 1;
}
}
}
data->unk0_0d = 0;
}
data->unk0_1 = 3;
break;
data->unk0_0d = 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
#ifndef NONMATCHING
asm("":::"r8");
#endif
sprite->pos2.x = (data->unkC[data->unk0_0b] * gSineTable[data->unk2]) >> 8;
matrixNum = sprite->oam.matrixNum;
sinIndex = (-sprite->pos2.x >> 1) + data->unkA;
sinVal = gSineTable[sinIndex];
gOamMatrices[matrixNum].a = gOamMatrices[matrixNum].d = gSineTable[sinIndex + 64];
gOamMatrices[matrixNum].b = sinVal;
gOamMatrices[matrixNum].c = -sinVal;
data->unk8 += data->unk6;
sprite->pos1.y = data->unk8 >> 8;
if (data->unk4 & 0x8000)
data->unk2 = (data->unk2 - (data->unk4 & 0x7FFF)) & 0xFF;
else
data->unk2 = (data->unk2 + (data->unk4 & 0x7FFF)) & 0xFF;
if (sprite->pos1.y + sprite->pos2.y >= data->unkE_1)
else if ((u8)data->unk0_1 == 3)
{
sprite->data[0] = 0;
sprite->callback = DestroyAnimSpriteAfterTimer;
data->unk0_0b ^= 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_0d)
{
sprite->hFlip ^= 1;
sprite->animNum = sprite->hFlip;
sprite->animBeginning = TRUE;
sprite->animEnded = FALSE;
if (data->unk0_0c)
{
if (!IsContest())
{
if (!data->unkE_0)
{
sprite->oam.priority--;
data->unkE_0 ^= 1;
}
else
{
sprite->oam.priority++;
data->unkE_0 ^= 1;
}
}
else
{
if (!data->unkE_0)
{
sprite->subpriority -= 12;
data->unkE_0 ^= 1;
}
else
{
sprite->subpriority += 12;
data->unkE_0 ^= 1;
}
}
}
data->unk0_0d = 0;
data->unk2;
}
data->unk0_1 = 0;
break;
case 1:
if ((u8)data->unk0_1 == 0)
{
data->unk0_0d = 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
else if ((u8)data->unk0_1 == 2)
{
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_0d)
{
sprite->hFlip ^= 1;
sprite->animNum = sprite->hFlip;
sprite->animBeginning = TRUE;
sprite->animEnded = FALSE;
if (data->unk0_0c)
{
if (!IsContest())
{
if (!data->unkE_0)
{
sprite->oam.priority--;
data->unkE_0 ^= 1;
}
else
{
sprite->oam.priority++;
data->unkE_0 ^= 1;
}
}
else
{
if (!data->unkE_0)
{
sprite->subpriority -= 12;
data->unkE_0 ^= 1;
}
else
{
sprite->subpriority += 12;
data->unkE_0 ^= 1;
}
}
}
data->unk0_0d = 0;
}
data->unk0_1 = 1;
break;
case 2:
if ((u8)data->unk0_1 == 3)
{
data->unk0_0d = 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
else if ((u8)data->unk0_1 == 1)
{
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_0d)
{
sprite->hFlip ^= 1;
sprite->animNum = sprite->hFlip;
sprite->animBeginning = TRUE;
sprite->animEnded = FALSE;
if (data->unk0_0c)
{
if (!IsContest())
{
if (!data->unkE_0)
{
sprite->oam.priority--;
data->unkE_0 ^= 1;
}
else
{
sprite->oam.priority++;
data->unkE_0 ^= 1;
}
}
else
{
if (!data->unkE_0)
{
sprite->subpriority -= 12;
data->unkE_0 ^= 1;
}
else
{
sprite->subpriority += 12;
data->unkE_0 ^= 1;
}
}
}
data->unk0_0d = 0;
}
data->unk0_1 = 2;
break;
case 3:
if ((u8)data->unk0_1 == 2)
{
data->unk0_0d = 1;
}
else if ((u8)data->unk0_1 == 0)
{
data->unk0_0b ^= 1;
data->unk0_0a = 1;
data->unk1 = 0;
}
else if (data->unk0_0d)
{
sprite->hFlip ^= 1;
sprite->animNum = sprite->hFlip;
sprite->animBeginning = TRUE;
sprite->animEnded = FALSE;
if (data->unk0_0c)
{
if (!IsContest())
{
if (!data->unkE_0)
{
sprite->oam.priority--;
data->unkE_0 ^= 1;
}
else
{
sprite->oam.priority++;
data->unkE_0 ^= 1;
}
}
else
{
if (!data->unkE_0)
{
sprite->subpriority -= 12;
data->unkE_0 ^= 1;
}
else
{
sprite->subpriority += 12;
data->unkE_0 ^= 1;
}
}
}
data->unk0_0d = 0;
}
data->unk0_1 = 3;
break;
}
sprite->pos2.x = ((s32)(data->unkC[data->unk0_0b]) * gSineTable[data->unk2]) >> 8;
matrixNum = sprite->oam.matrixNum;
sinIndex = ((-sprite->pos2.x >> 1) + data->unkA);
sinVal = gSineTable[sinIndex];
gOamMatrices[matrixNum].a = gOamMatrices[matrixNum].d = gSineTable[sinIndex + 64];
gOamMatrices[matrixNum].b = sinVal;
gOamMatrices[matrixNum].c = -sinVal;
data->unk8 += data->unk6;
sprite->pos1.y = (s16)(data->unk8 >> 8);
if (data->unk4 & 0x8000)
data->unk2 = (data->unk2 - (data->unk4 & 0x7FFF)) & 0xFF;
else
data->unk2 = (data->unk2 + (data->unk4 & 0x7FFF)) & 0xFF;
if (sprite->pos1.y + sprite->pos2.y >= data->unkE_1)
{
sprite->data[0] = 0;
sprite->callback = DestroyAnimSpriteAfterTimer;
}
}
@ -944,20 +923,20 @@ static void sub_810EB40(struct Sprite *sprite)
{
sprite->pos2.x += sprite->data[1] >> 8;
if (++sprite->data[0] == 6)
if (sprite->data[0]++ == 5)
{
sprite->data[0] = 0;
sprite->pos2.x = 0;
StartSpriteAnim(sprite, 0);
}
if (--sprite->data[7] == -1)
if (sprite->data[7]-- == 0)
DestroyAnimSprite(sprite);
}
void AnimTask_DrillPeckHitSplats(u8 task)
{
if (!(gTasks[task].data[0] % 32))
if ((gTasks[task].data[0] % 32) == 0)
{
gAnimVisualTaskCount++;
@ -1060,8 +1039,8 @@ static void AnimDiveBall_Step2(struct Sprite *sprite)
static void AnimDiveWaterSplash(struct Sprite *sprite)
{
u32 matrixNum;
int t1, t2;
u8 matrixNum;
s32 t1, t2;
switch (sprite->data[0])
{
@ -1083,7 +1062,7 @@ static void AnimDiveWaterSplash(struct Sprite *sprite)
sprite->data[0]++;
break;
case 1:
if (sprite->data[2] <= 11)
if (sprite->data[2] < 12)
sprite->data[1] -= 40;
else
sprite->data[1] += 40;
@ -1091,7 +1070,7 @@ static void AnimDiveWaterSplash(struct Sprite *sprite)
sprite->data[2]++;
TrySetSpriteRotScale(sprite, 0, 256, sprite->data[1], 0);
matrixNum = sprite->oam.matrixNum;
t1 = 15616;
@ -1115,8 +1094,8 @@ static void AnimDiveWaterSplash(struct Sprite *sprite)
// Launches a water droplet away from the specified battler. Used by Astonish and Dive
static void AnimSprayWaterDroplet(struct Sprite *sprite)
{
int v1 = 0x1ff & Random2();
int v2 = 0x7f & Random2();
const u16 v1 = Random2() & 0x1ff;
const u16 v2 = Random2() & 0x07f;
if (v1 % 2)
sprite->data[0] = 736 + v1;
@ -1160,13 +1139,13 @@ static void AnimSprayWaterDroplet_Step(struct Sprite *sprite)
sprite->pos2.y -= sprite->data[1] >> 8;
}
sprite->data[0] = sprite->data[0];
sprite->data[0] -= 0; // Needed to Match
sprite->data[1] -= 32;
if (sprite->data[0] < 0)
sprite->data[0] = 0;
if (++sprite->data[3] == 31)
if (sprite->data[3]++ == 30)
DestroyAnimSprite(sprite);
}
@ -1212,7 +1191,7 @@ static void AnimSkyAttackBird(struct Sprite *sprite)
sprite->data[7] = ((posy - sprite->pos1.y) << 4) / 12;
rotation = ArcTan2Neg(posx - sprite->pos1.x, posy - sprite->pos1.y);
rotation += 49152;
rotation -= 16384;
TrySetSpriteRotScale(sprite, 1, 0x100, 0x100, rotation);
@ -1236,12 +1215,12 @@ void unref_sub_810F184(u8 taskId)
{
if (gBattleAnimArgs[0] == 0)
{
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
const u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
gSprites[spriteId].invisible = TRUE;
}
else
{
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
const u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
gSprites[spriteId].invisible = FALSE;
}
DestroyAnimVisualTask(taskId);

View File

@ -1468,8 +1468,7 @@ static void MoveSelectionDisplayPpNumber(void)
SetPpNumbersPaletteInMoveSelection();
moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
txtPtr = ConvertIntToDecimalStringN(gDisplayedStringBattle, moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
txtPtr[0] = CHAR_SLASH;
txtPtr++;
*(txtPtr)++ = CHAR_SLASH;
ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
BattlePutTextOnWindow(gDisplayedStringBattle, 9);
@ -1481,12 +1480,9 @@ static void MoveSelectionDisplayMoveType(void)
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
txtPtr = StringCopy(gDisplayedStringBattle, gText_MoveInterfaceType);
txtPtr[0] = EXT_CTRL_CODE_BEGIN;
txtPtr++;
txtPtr[0] = 6;
txtPtr++;
txtPtr[0] = 1;
txtPtr++;
*(txtPtr)++ = EXT_CTRL_CODE_BEGIN;
*(txtPtr)++ = EXT_CTRL_CODE_SIZE;
*(txtPtr)++ = 1;
StringCopy(txtPtr, gTypeNames[gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].type]);
BattlePutTextOnWindow(gDisplayedStringBattle, 10);

View File

@ -3135,7 +3135,7 @@ void SwitchInClearSetData(void)
if (gBattleMoves[gCurrentMove].effect != EFFECT_BATON_PASS)
{
for (i = 0; i < NUM_BATTLE_STATS; i++)
gBattleMons[gActiveBattler].statStages[i] = 6;
gBattleMons[gActiveBattler].statStages[i] = DEFAULT_STAT_STAGE;
for (i = 0; i < gBattlersCount; i++)
{
if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].battlerPreventingEscape == gActiveBattler)
@ -3244,7 +3244,7 @@ void FaintClearSetData(void)
u8 *ptr;
for (i = 0; i < NUM_BATTLE_STATS; i++)
gBattleMons[gActiveBattler].statStages[i] = 6;
gBattleMons[gActiveBattler].statStages[i] = DEFAULT_STAT_STAGE;
gBattleMons[gActiveBattler].status2 = 0;
gStatuses3[gActiveBattler] = 0;
@ -3398,7 +3398,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)];
*hpOnSwitchout = gBattleMons[gActiveBattler].hp;
for (i = 0; i < NUM_BATTLE_STATS; i++)
gBattleMons[gActiveBattler].statStages[i] = 6;
gBattleMons[gActiveBattler].statStages[i] = DEFAULT_STAT_STAGE;
gBattleMons[gActiveBattler].status2 = 0;
}

View File

@ -19,12 +19,15 @@
#include "text.h"
#include "trainer_hill.h"
#include "window.h"
#include "constants/battle_dome.h"
#include "constants/battle_string_ids.h"
#include "constants/berry.h"
#include "constants/frontier_util.h"
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/trainers.h"
#include "constants/trainer_hill.h"
#include "constants/weather.h"
struct BattleWindowText
{
@ -433,11 +436,16 @@ static const u8 sText_SpDef2[] = _("SP. DEF");
static const u8 sText_Accuracy[] = _("accuracy");
static const u8 sText_Evasiveness[] = _("evasiveness");
const u8 * const gStatNamesTable[] =
const u8 * const gStatNamesTable[NUM_BATTLE_STATS] =
{
sText_HP2, sText_Attack2, sText_Defense2,
sText_Speed, sText_SpAtk2, sText_SpDef2,
sText_Accuracy, sText_Evasiveness
[STAT_HP] = sText_HP2,
[STAT_ATK] = sText_Attack2,
[STAT_DEF] = sText_Defense2,
[STAT_SPEED] = sText_Speed,
[STAT_SPATK] = sText_SpAtk2,
[STAT_SPDEF] = sText_SpDef2,
[STAT_ACC] = sText_Accuracy,
[STAT_EVASION] = sText_Evasiveness,
};
static const u8 sText_PokeblockWasTooSpicy[] = _("was too spicy!");
@ -446,11 +454,13 @@ static const u8 sText_PokeblockWasTooSweet[] = _("was too sweet!");
static const u8 sText_PokeblockWasTooBitter[] = _("was too bitter!");
static const u8 sText_PokeblockWasTooSour[] = _("was too sour!");
const u8 * const gPokeblockWasTooXStringTable[] =
const u8 * const gPokeblockWasTooXStringTable[FLAVOR_COUNT] =
{
sText_PokeblockWasTooSpicy, sText_PokeblockWasTooDry,
sText_PokeblockWasTooSweet, sText_PokeblockWasTooBitter,
sText_PokeblockWasTooSour
[FLAVOR_SPICY] = sText_PokeblockWasTooSpicy,
[FLAVOR_DRY] = sText_PokeblockWasTooDry,
[FLAVOR_SWEET] = sText_PokeblockWasTooSweet,
[FLAVOR_BITTER] = sText_PokeblockWasTooBitter,
[FLAVOR_SOUR] = sText_PokeblockWasTooSour
};
static const u8 sText_PlayerUsedItem[] = _("{B_PLAYER_NAME} used\n{B_LAST_ITEM}!");
@ -979,16 +989,28 @@ const u16 gStatDownStringIds[] =
STRINGID_PKMNSSTATCHANGED3, STRINGID_PKMNSSTATCHANGED4, STRINGID_STATSWONTDECREASE, STRINGID_EMPTYSTRING3
};
// Index read from sTWOTURN_STRINGID
const u16 gFirstTurnOfTwoStringIds[] =
{
STRINGID_PKMNWHIPPEDWHIRLWIND, STRINGID_PKMNTOOKSUNLIGHT, STRINGID_PKMNLOWEREDHEAD, STRINGID_PKMNISGLOWING,
STRINGID_PKMNFLEWHIGH, STRINGID_PKMNDUGHOLE, STRINGID_PKMNHIDUNDERWATER, STRINGID_PKMNSPRANGUP
STRINGID_PKMNWHIPPEDWHIRLWIND, // MOVE_RAZOR_WIND
STRINGID_PKMNTOOKSUNLIGHT, // MOVE_SOLAR_BEAM
STRINGID_PKMNLOWEREDHEAD, // MOVE_SKULL_BASH
STRINGID_PKMNISGLOWING, // MOVE_SKY_ATTACK
STRINGID_PKMNFLEWHIGH, // MOVE_FLY
STRINGID_PKMNDUGHOLE, // MOVE_DIG
STRINGID_PKMNHIDUNDERWATER, // MOVE_DIVE
STRINGID_PKMNSPRANGUP // MOVE_BOUNCE
};
// Index copied from move's index in gTrappingMoves
const u16 gWrappedStringIds[] =
{
STRINGID_PKMNSQUEEZEDBYBIND, STRINGID_PKMNWRAPPEDBY, STRINGID_PKMNTRAPPEDINVORTEX,
STRINGID_PKMNCLAMPED, STRINGID_PKMNTRAPPEDINVORTEX, STRINGID_PKMNTRAPPEDBYSANDTOMB
STRINGID_PKMNSQUEEZEDBYBIND, // MOVE_BIND
STRINGID_PKMNWRAPPEDBY, // MOVE_WRAP
STRINGID_PKMNTRAPPEDINVORTEX, // MOVE_FIRE_SPIN
STRINGID_PKMNCLAMPED, // MOVE_CLAMP
STRINGID_PKMNTRAPPEDINVORTEX, // MOVE_WHIRLPOOL
STRINGID_PKMNTRAPPEDBYSANDTOMB // MOVE_SAND_TOMB
};
const u16 gMistUsedStringIds[] =
@ -1078,13 +1100,25 @@ const u16 gBallEscapeStringIds[] =
STRINGID_PKMNBROKEFREE, STRINGID_ITAPPEAREDCAUGHT, STRINGID_AARGHALMOSTHADIT, STRINGID_SHOOTSOCLOSE
};
const u16 gWeatherContinuesStringIds[] =
// Overworld weathers that don't have an associated battle weather default to "It is raining."
const u16 gWeatherStartsStringIds[] =
{
STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING,
STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING,
STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_SANDSTORMISRAGING,
STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING,
STRINGID_SUNLIGHTSTRONG, STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING
[WEATHER_NONE] = STRINGID_ITISRAINING,
[WEATHER_SUNNY_CLOUDS] = STRINGID_ITISRAINING,
[WEATHER_SUNNY] = STRINGID_ITISRAINING,
[WEATHER_RAIN] = STRINGID_ITISRAINING,
[WEATHER_SNOW] = STRINGID_ITISRAINING,
[WEATHER_RAIN_THUNDERSTORM] = STRINGID_ITISRAINING,
[WEATHER_FOG_HORIZONTAL] = STRINGID_ITISRAINING,
[WEATHER_VOLCANIC_ASH] = STRINGID_ITISRAINING,
[WEATHER_SANDSTORM] = STRINGID_SANDSTORMISRAGING,
[WEATHER_FOG_DIAGONAL] = STRINGID_ITISRAINING,
[WEATHER_UNDERWATER] = STRINGID_ITISRAINING,
[WEATHER_SHADE] = STRINGID_ITISRAINING,
[WEATHER_DROUGHT] = STRINGID_SUNLIGHTSTRONG,
[WEATHER_DOWNPOUR] = STRINGID_ITISRAINING,
[WEATHER_UNDERWATER_BUBBLES] = STRINGID_ITISRAINING,
[WEATHER_ABNORMAL] = STRINGID_ITISRAINING
};
const u16 gInobedientStringIds[] =
@ -1146,7 +1180,13 @@ const u16 gCaughtMonStringIds[] =
const u16 gTrappingMoves[] =
{
MOVE_BIND, MOVE_WRAP, MOVE_FIRE_SPIN, MOVE_CLAMP, MOVE_WHIRLPOOL, MOVE_SAND_TOMB, 0xFFFF
MOVE_BIND,
MOVE_WRAP,
MOVE_FIRE_SPIN,
MOVE_CLAMP,
MOVE_WHIRLPOOL,
MOVE_SAND_TOMB,
0xFFFF
};
const u8 gText_PkmnIsEvolving[] = _("What?\n{STR_VAR_1} is evolving!");
@ -1207,26 +1247,27 @@ const u8 gText_Draw[] = _("{HIGHLIGHT TRANSPARENT}Draw");
static const u8 sText_SpaceIs[] = _(" is");
static const u8 sText_ApostropheS[] = _("'s");
static const u8 sATypeMove_Table[][17] =
// For displaying names of invalid moves
static const u8 sATypeMove_Table[][NUMBER_OF_MON_TYPES - 1] =
{
_("a NORMAL move"),
_("a FIGHTING move"),
_("a FLYING move"),
_("a POISON move"),
_("a GROUND move"),
_("a ROCK move"),
_("a BUG move"),
_("a GHOST move"),
_("a STEEL move"),
_("a ??? move"),
_("a FIRE move"),
_("a WATER move"),
_("a GRASS move"),
_("an ELECTRIC move"),
_("a PSYCHIC move"),
_("an ICE move"),
_("a DRAGON move"),
_("a DARK move")
[TYPE_NORMAL] = _("a NORMAL move"),
[TYPE_FIGHTING] = _("a FIGHTING move"),
[TYPE_FLYING] = _("a FLYING move"),
[TYPE_POISON] = _("a POISON move"),
[TYPE_GROUND] = _("a GROUND move"),
[TYPE_ROCK] = _("a ROCK move"),
[TYPE_BUG] = _("a BUG move"),
[TYPE_GHOST] = _("a GHOST move"),
[TYPE_STEEL] = _("a STEEL move"),
[TYPE_MYSTERY] = _("a ??? move"),
[TYPE_FIRE] = _("a FIRE move"),
[TYPE_WATER] = _("a WATER move"),
[TYPE_GRASS] = _("a GRASS move"),
[TYPE_ELECTRIC] = _("an ELECTRIC move"),
[TYPE_PSYCHIC] = _("a PSYCHIC move"),
[TYPE_ICE] = _("an ICE move"),
[TYPE_DRAGON] = _("a DRAGON move"),
[TYPE_DARK] = _("a DARK move")
};
const u8 gText_BattleTourney[] = _("BATTLE TOURNEY");
@ -1235,12 +1276,12 @@ static const u8 sText_Round2[] = _("Round 2");
static const u8 sText_Semifinal[] = _("Semifinal");
static const u8 sText_Final[] = _("Final");
const u8 *const gRoundsStringTable[] =
const u8 *const gRoundsStringTable[DOME_ROUNDS_COUNT] =
{
sText_Round1,
sText_Round2,
sText_Semifinal,
sText_Final
[DOME_ROUND1] = sText_Round1,
[DOME_ROUND2] = sText_Round2,
[DOME_SEMIFINAL] = sText_Semifinal,
[DOME_FINAL] = sText_Final
};
const u8 gText_TheGreatNewHope[] = _("The great new hope!\p");
@ -2715,7 +2756,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
{
dst[dstID] = EXT_CTRL_CODE_BEGIN;
dstID++;
dst[dstID] = 9;
dst[dstID] = EXT_CTRL_CODE_PAUSE_UNTIL_PRESS;
dstID++;
}
}

View File

@ -1128,13 +1128,13 @@ static void Cmd_accuracycheck(void)
else
{
u8 acc = gBattleMons[gBattlerAttacker].statStages[STAT_ACC];
buff = acc + 6 - gBattleMons[gBattlerTarget].statStages[STAT_EVASION];
buff = acc + DEFAULT_STAT_STAGE - gBattleMons[gBattlerTarget].statStages[STAT_EVASION];
}
if (buff < 0)
buff = 0;
if (buff > 0xC)
buff = 0xC;
if (buff < MIN_STAT_STAGE)
buff = MIN_STAT_STAGE;
if (buff > MAX_STAT_STAGE)
buff = MAX_STAT_STAGE;
moveAcc = gBattleMoves[move].accuracy;
// check Thunder on sunny weather
@ -3500,7 +3500,7 @@ static void Cmd_unknown_24(void)
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && gPartnerTrainerId == TRAINER_STEVEN_PARTNER)
{
for (i = 0; i < 3; i++)
for (i = 0; i < MULTI_PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP);
@ -4385,7 +4385,7 @@ static void Cmd_playstatchangeanimation(void)
{
if (gBattlescriptCurrInstr[3] & STAT_CHANGE_CANT_PREVENT)
{
if (gBattleMons[gActiveBattler].statStages[currStat] > 0)
if (gBattleMons[gActiveBattler].statStages[currStat] > MIN_STAT_STAGE)
{
statAnimId = startingStatAnimId + currStat;
changeableStatsCount++;
@ -4397,7 +4397,7 @@ static void Cmd_playstatchangeanimation(void)
&& !(gBattleMons[gActiveBattler].ability == ABILITY_KEEN_EYE && currStat == STAT_ACC)
&& !(gBattleMons[gActiveBattler].ability == ABILITY_HYPER_CUTTER && currStat == STAT_ATK))
{
if (gBattleMons[gActiveBattler].statStages[currStat] > 0)
if (gBattleMons[gActiveBattler].statStages[currStat] > MIN_STAT_STAGE)
{
statAnimId = startingStatAnimId + currStat;
changeableStatsCount++;
@ -4425,7 +4425,7 @@ static void Cmd_playstatchangeanimation(void)
while (statsToCheck != 0)
{
if (statsToCheck & 1 && gBattleMons[gActiveBattler].statStages[currStat] < 0xC)
if (statsToCheck & 1 && gBattleMons[gActiveBattler].statStages[currStat] < MAX_STAT_STAGE)
{
statAnimId = startingStatAnimId + currStat;
changeableStatsCount++;
@ -4495,7 +4495,7 @@ static void Cmd_moveend(void)
&& gBattleMons[gBattlerTarget].hp != 0 && gBattlerAttacker != gBattlerTarget
&& GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget)
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) && TARGET_TURN_DAMAGED
&& gBattleMoves[gCurrentMove].power && gBattleMons[gBattlerTarget].statStages[STAT_ATK] <= 0xB)
&& gBattleMoves[gCurrentMove].power && gBattleMons[gBattlerTarget].statStages[STAT_ATK] < MAX_STAT_STAGE)
{
gBattleMons[gBattlerTarget].statStages[STAT_ATK]++;
BattleScriptPushCursor();
@ -6340,15 +6340,13 @@ static void PutLevelAndGenderOnLvlUpBox(void)
AddTextPrinter(&printerTemplate, 0xFF, NULL);
txtPtr = gStringVar4;
gStringVar4[0] = CHAR_SPECIAL_F9;
txtPtr++;
txtPtr[0] = CHAR_LV_2;
txtPtr++;
*(txtPtr)++ = CHAR_EXTRA_SYMBOL;
*(txtPtr)++ = CHAR_LV_2;
var = (u32)(txtPtr);
txtPtr = ConvertIntToDecimalStringN(txtPtr, monLevel, STR_CONV_MODE_LEFT_ALIGN, 3);
var = (u32)(txtPtr) - var;
txtPtr = StringFill(txtPtr, 0x77, 4 - var);
txtPtr = StringFill(txtPtr, CHAR_UNK_SPACER, 4 - var);
if (monGender != MON_GENDERLESS)
{
@ -7288,7 +7286,7 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
index++;
gBattleTextBuff2[index] = B_BUFF_EOS;
if (gBattleMons[gActiveBattler].statStages[statId] == 0)
if (gBattleMons[gActiveBattler].statStages[statId] == MIN_STAT_STAGE)
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
else
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler);
@ -7315,17 +7313,17 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
index++;
gBattleTextBuff2[index] = B_BUFF_EOS;
if (gBattleMons[gActiveBattler].statStages[statId] == 0xC)
if (gBattleMons[gActiveBattler].statStages[statId] == MAX_STAT_STAGE)
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
else
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler);
}
gBattleMons[gActiveBattler].statStages[statId] += statValue;
if (gBattleMons[gActiveBattler].statStages[statId] < 0)
gBattleMons[gActiveBattler].statStages[statId] = 0;
if (gBattleMons[gActiveBattler].statStages[statId] > 0xC)
gBattleMons[gActiveBattler].statStages[statId] = 0xC;
if (gBattleMons[gActiveBattler].statStages[statId] < MIN_STAT_STAGE)
gBattleMons[gActiveBattler].statStages[statId] = MIN_STAT_STAGE;
if (gBattleMons[gActiveBattler].statStages[statId] > MAX_STAT_STAGE)
gBattleMons[gActiveBattler].statStages[statId] = MAX_STAT_STAGE;
if (gBattleCommunication[MULTISTRING_CHOOSER] == 2 && flags & STAT_BUFF_ALLOW_PTR)
gMoveResultFlags |= MOVE_RESULT_MISSED;
@ -7350,7 +7348,7 @@ static void Cmd_normalisebuffs(void) // haze
for (i = 0; i < gBattlersCount; i++)
{
for (j = 0; j < NUM_BATTLE_STATS; j++)
gBattleMons[i].statStages[j] = 6;
gBattleMons[i].statStages[j] = DEFAULT_STAT_STAGE;
}
gBattlescriptCurrInstr++;
@ -8750,7 +8748,7 @@ static void Cmd_rolloutdamagecalculation(void)
static void Cmd_jumpifconfusedandstatmaxed(void)
{
if (gBattleMons[gBattlerTarget].status2 & STATUS2_CONFUSION
&& gBattleMons[gBattlerTarget].statStages[gBattlescriptCurrInstr[1]] == 0xC)
&& gBattleMons[gBattlerTarget].statStages[gBattlescriptCurrInstr[1]] == MAX_STAT_STAGE)
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 2);
else
gBattlescriptCurrInstr += 6;
@ -8957,10 +8955,10 @@ static void Cmd_maxattackhalvehp(void) // belly drum
if (!(gBattleMons[gBattlerAttacker].maxHP / 2))
halfHp = 1;
if (gBattleMons[gBattlerAttacker].statStages[STAT_ATK] < 12
if (gBattleMons[gBattlerAttacker].statStages[STAT_ATK] < MAX_STAT_STAGE
&& gBattleMons[gBattlerAttacker].hp > halfHp)
{
gBattleMons[gBattlerAttacker].statStages[STAT_ATK] = 12;
gBattleMons[gBattlerAttacker].statStages[STAT_ATK] = MAX_STAT_STAGE;
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 2;
if (gBattleMoveDamage == 0)
gBattleMoveDamage = 1;
@ -9234,8 +9232,8 @@ static void Cmd_sethail(void)
static void Cmd_jumpifattackandspecialattackcannotfall(void) // memento
{
if (gBattleMons[gBattlerTarget].statStages[STAT_ATK] == 0
&& gBattleMons[gBattlerTarget].statStages[STAT_SPATK] == 0
if (gBattleMons[gBattlerTarget].statStages[STAT_ATK] == MIN_STAT_STAGE
&& gBattleMons[gBattlerTarget].statStages[STAT_SPATK] == MIN_STAT_STAGE
&& gBattleCommunication[6] != 1)
{
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);

View File

@ -1398,9 +1398,9 @@ static void TrySetBattleSeminarShow(void)
return;
else if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT)
return;
else if (gBattleMons[gBattlerAttacker].statStages[STAT_ACC] <= 5)
else if (gBattleMons[gBattlerAttacker].statStages[STAT_ACC] < DEFAULT_STAT_STAGE)
return;
else if (gBattleMons[gBattlerTarget].statStages[STAT_EVASION] > 6)
else if (gBattleMons[gBattlerTarget].statStages[STAT_EVASION] > DEFAULT_STAT_STAGE)
return;
else if (gCurrentMove == MOVE_HIDDEN_POWER || gCurrentMove == MOVE_WEATHER_BALL)
return;

View File

@ -1978,7 +1978,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
}
break;
case ABILITY_SPEED_BOOST:
if (gBattleMons[battler].statStages[STAT_SPEED] < 0xC && gDisableStructs[battler].isFirstTurn != 2)
if (gBattleMons[battler].statStages[STAT_SPEED] < MAX_STAT_STAGE && gDisableStructs[battler].isFirstTurn != 2)
{
gBattleMons[battler].statStages[STAT_SPEED]++;
gBattleScripting.animArg1 = 0x11;
@ -2619,9 +2619,9 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
case HOLD_EFFECT_RESTORE_STATS:
for (i = 0; i < NUM_BATTLE_STATS; i++)
{
if (gBattleMons[battlerId].statStages[i] < 6)
if (gBattleMons[battlerId].statStages[i] < DEFAULT_STAT_STAGE)
{
gBattleMons[battlerId].statStages[i] = 6;
gBattleMons[battlerId].statStages[i] = DEFAULT_STAT_STAGE;
effect = ITEM_STATS_CHANGE;
}
}
@ -2690,9 +2690,9 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
case HOLD_EFFECT_RESTORE_STATS:
for (i = 0; i < NUM_BATTLE_STATS; i++)
{
if (gBattleMons[battlerId].statStages[i] < 6)
if (gBattleMons[battlerId].statStages[i] < DEFAULT_STAT_STAGE)
{
gBattleMons[battlerId].statStages[i] = 6;
gBattleMons[battlerId].statStages[i] = DEFAULT_STAT_STAGE;
effect = ITEM_STATS_CHANGE;
}
}
@ -2811,7 +2811,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
break;
// copy/paste again, smh
case HOLD_EFFECT_ATTACK_UP:
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_ATK] < 0xC)
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam
&& !moveTurn && gBattleMons[battlerId].statStages[STAT_ATK] < MAX_STAT_STAGE)
{
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK);
PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATROSE);
@ -2825,7 +2826,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
}
break;
case HOLD_EFFECT_DEFENSE_UP:
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_DEF] < 0xC)
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn
&& gBattleMons[battlerId].statStages[STAT_DEF] < MAX_STAT_STAGE)
{
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_DEF);
@ -2838,7 +2840,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
}
break;
case HOLD_EFFECT_SPEED_UP:
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_SPEED] < 0xC)
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn
&& gBattleMons[battlerId].statStages[STAT_SPEED] < MAX_STAT_STAGE)
{
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPEED);
@ -2851,7 +2854,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
}
break;
case HOLD_EFFECT_SP_ATTACK_UP:
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_SPATK] < 0xC)
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn
&& gBattleMons[battlerId].statStages[STAT_SPATK] < MAX_STAT_STAGE)
{
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK);
@ -2864,7 +2868,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
}
break;
case HOLD_EFFECT_SP_DEFENSE_UP:
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && gBattleMons[battlerId].statStages[STAT_SPDEF] < 0xC)
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn
&& gBattleMons[battlerId].statStages[STAT_SPDEF] < MAX_STAT_STAGE)
{
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPDEF);
@ -2877,7 +2882,8 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
}
break;
case HOLD_EFFECT_CRITICAL_UP:
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn && !(gBattleMons[battlerId].status2 & STATUS2_FOCUS_ENERGY))
if (gBattleMons[battlerId].hp <= gBattleMons[battlerId].maxHP / battlerHoldEffectParam && !moveTurn
&& !(gBattleMons[battlerId].status2 & STATUS2_FOCUS_ENERGY))
{
gBattleMons[battlerId].status2 |= STATUS2_FOCUS_ENERGY;
BattleScriptExecute(BattleScript_BerryFocusEnergyEnd2);
@ -2889,7 +2895,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
{
for (i = 0; i < 5; i++)
{
if (gBattleMons[battlerId].statStages[STAT_ATK + i] < 0xC)
if (gBattleMons[battlerId].statStages[STAT_ATK + i] < MAX_STAT_STAGE)
break;
}
if (i != 5)
@ -2897,7 +2903,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
do
{
i = Random() % 5;
} while (gBattleMons[battlerId].statStages[STAT_ATK + i] == 0xC);
} while (gBattleMons[battlerId].statStages[STAT_ATK + i] == MAX_STAT_STAGE);
PREPARE_STAT_BUFFER(gBattleTextBuff1, i + 1);
@ -3166,9 +3172,9 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
case HOLD_EFFECT_RESTORE_STATS:
for (i = 0; i < NUM_BATTLE_STATS; i++)
{
if (gBattleMons[battlerId].statStages[i] < 6)
if (gBattleMons[battlerId].statStages[i] < DEFAULT_STAT_STAGE)
{
gBattleMons[battlerId].statStages[i] = 6;
gBattleMons[battlerId].statStages[i] = DEFAULT_STAT_STAGE;
effect = ITEM_STATS_CHANGE;
}
}

View File

@ -3271,7 +3271,7 @@ static void BerryCrush_SetPaletteFadeParams(u8 *params, bool8 communicateAfter,
void sub_8024644(u8 *r0, u32 r1, u32 r2, u32 r3, u32 r5)
{
u8 sp[4];
u8 sp[2];
0[(u16 *)sp] = r3;
r0[0] = r1;

View File

@ -14,7 +14,7 @@ void PrintCoinsString(u32 coinAmount)
{
u32 xAlign;
ConvertIntToDecimalStringN(gStringVar1, coinAmount, STR_CONV_MODE_RIGHT_ALIGN, 4);
ConvertIntToDecimalStringN(gStringVar1, coinAmount, STR_CONV_MODE_RIGHT_ALIGN, MAX_COIN_DIGITS);
StringExpandPlaceholders(gStringVar4, gText_Coins);
xAlign = GetStringRightAlignXOffset(1, gStringVar4, 0x40);

View File

@ -222,7 +222,7 @@ static const u8 *const sAwaitingResponseTexts[] = {
ALIGNED(4) const u8 sText_ShowTrainerCard[] = _("The other TRAINER showed\nyou their TRAINER CARD.\pWould you like to show your\nTRAINER CARD?");
ALIGNED(4) const u8 sText_BattleChallenge[] = _("The other TRAINER challenges you\nto battle.\pWill you accept the battle\nchallenge?");
ALIGNED(4) const u8 sText_ChatInvitation[] = _("The other TRAINER invites you\nto chat.\pWill you accept the chat\ninvitation?");
ALIGNED(4) const u8 sText_OfferToTradeMon[] = _("There is an offer to trade your\nregistered Lv. {SPECIAL_F7 0x00} {SPECIAL_F7 0x01}\pin exchange for a\nLv. {SPECIAL_F7 0x02} {SPECIAL_F7 0x03}.\pWill you accept this trade\noffer?");
ALIGNED(4) const u8 sText_OfferToTradeMon[] = _("There is an offer to trade your\nregistered Lv. {DYNAMIC 0} {DYNAMIC 1}\pin exchange for a\nLv. {DYNAMIC 2} {DYNAMIC 3}.\pWill you accept this trade\noffer?");
ALIGNED(4) const u8 sText_OfferToTradeEgg[] = _("There is an offer to trade your\nregistered EGG.\lWill you accept this trade offer?");
ALIGNED(4) const u8 sText_ChatDropped[] = _("The chat has been dropped.\p");
ALIGNED(4) const u8 sText_OfferDeclined1[] = _("You declined the offer.\p");
@ -567,17 +567,17 @@ static const u8 *const sCardColorTexts[] = {
sText_ItsGoldCard
};
ALIGNED(4) const u8 sText_TrainerCardInfoPage1[] = _("This is {SPECIAL_F7 0x00} {SPECIAL_F7 0x01}'s\nTRAINER CARD…\l{SPECIAL_F7 0x02}\pPOKéDEX: {SPECIAL_F7 0x03}\nTIME: {SPECIAL_F7 0x04}:{SPECIAL_F7 0x05}\p");
ALIGNED(4) const u8 sText_TrainerCardInfoPage2[] = _("BATTLES: WINS: {SPECIAL_F7 0x00} LOSSES: {SPECIAL_F7 0x02}\nTRADES: {SPECIAL_F7 0x03}\p“{SPECIAL_F7 0x04} {SPECIAL_F7 0x05}\n{SPECIAL_F7 0x06} {SPECIAL_F7 0x07}”\p");
ALIGNED(4) const u8 sText_GladToMeetYouMale[] = _("{SPECIAL_F7 0x01}: Glad to have met you!{PAUSE 60}");
ALIGNED(4) const u8 sText_GladToMeetYouFemale[] = _("{SPECIAL_F7 0x01}: Glad to meet you!{PAUSE 60}");
ALIGNED(4) const u8 sText_TrainerCardInfoPage1[] = _("This is {DYNAMIC 0} {DYNAMIC 1}'s\nTRAINER CARD…\l{DYNAMIC 2}\pPOKéDEX: {DYNAMIC 3}\nTIME: {DYNAMIC 4}:{DYNAMIC 5}\p");
ALIGNED(4) const u8 sText_TrainerCardInfoPage2[] = _("BATTLES: WINS: {DYNAMIC 0} LOSSES: {DYNAMIC 2}\nTRADES: {DYNAMIC 3}\p“{DYNAMIC 4} {DYNAMIC 5}\n{DYNAMIC 6} {DYNAMIC 7}”\p");
ALIGNED(4) const u8 sText_GladToMeetYouMale[] = _("{DYNAMIC 1}: Glad to have met you!{PAUSE 60}");
ALIGNED(4) const u8 sText_GladToMeetYouFemale[] = _("{DYNAMIC 1}: Glad to meet you!{PAUSE 60}");
const u8 *const sGladToMeetYouTexts[GENDER_COUNT] = {
sText_GladToMeetYouMale,
sText_GladToMeetYouFemale
};
ALIGNED(4) const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {SPECIAL_F7 0x01}'s\nTRAINER CARD.{PAUSE 60}");
ALIGNED(4) const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {DYNAMIC 1}'s\nTRAINER CARD.{PAUSE 60}");
static const u8 *const sLinkGroupActivityNameTexts[] = {
[ACTIVITY_NONE] = sText_EmptyString,

View File

@ -32,7 +32,7 @@ u8 *DynamicPlaceholderTextUtil_ExpandPlaceholders(u8 *dest, const u8 *src)
{
while (*src != EOS)
{
if (*src != CHAR_SPECIAL_F7)
if (*src != CHAR_DYNAMIC)
{
*dest++ = *src++;
}

View File

@ -1227,13 +1227,14 @@ const u32 gCableCar_Gfx[] = INCBIN_U32("graphics/misc/cable_car.4bpp.lz");
const u32 gCableCarDoor_Gfx[] = INCBIN_U32("graphics/misc/cable_car_door.4bpp.lz");
const u32 gCableCarCord_Gfx[] = INCBIN_U32("graphics/misc/cable_car_cord.4bpp.lz");
const u32 gRouletteMenuTiles[] = INCBIN_U32("graphics/roulette/window.4bpp.lz");
const u32 gRouletteWheelTiles[] = INCBIN_U32("graphics/roulette/wheel.8bpp.lz");
// Roulette
const u32 gRouletteMenu_Gfx[] = INCBIN_U32("graphics/roulette/window.4bpp.lz");
const u32 gRouletteWheel_Gfx[] = INCBIN_U32("graphics/roulette/wheel.8bpp.lz");
const u32 gRouletteCenter_Gfx[] = INCBIN_U32("graphics/roulette/center.4bpp.lz");
const u32 gRouletteHeadersTiles[] = INCBIN_U32("graphics/roulette/headers.4bpp.lz");
const u32 gRouletteCreditTiles[] = INCBIN_U32("graphics/roulette/credit.4bpp.lz");
const u32 gRouletteNumbersTiles[] = INCBIN_U32("graphics/roulette/numbers.4bpp.lz");
const u32 gRouletteMultiplierTiles[] = INCBIN_U32("graphics/roulette/multiplier.4bpp.lz");
const u32 gRouletteHeaders_Gfx[] = INCBIN_U32("graphics/roulette/headers.4bpp.lz");
const u32 gRouletteCredit_Gfx[] = INCBIN_U32("graphics/roulette/credit.4bpp.lz");
const u32 gRouletteNumbers_Gfx[] = INCBIN_U32("graphics/roulette/numbers.4bpp.lz");
const u32 gRouletteMultiplier_Gfx[] = INCBIN_U32("graphics/roulette/multiplier.4bpp.lz");
#include "data/graphics/mail.h"

View File

@ -136,7 +136,7 @@ void PadNameString(u8 *dest, u8 padChar)
while (length < PLAYER_NAME_LENGTH - 1)
{
dest[length] = EXT_CTRL_CODE_BEGIN;
dest[length + 1] = EXT_CTRL_CODE_UNKNOWN_7;
dest[length + 1] = EXT_CTRL_CODE_RESET_SIZE;
length += 2;
}
}

View File

@ -220,9 +220,9 @@ static const u8 sWireless_RSEtoASCIITable[256] = {
[CHAR_y] = 'y',
[CHAR_z] = 'z',
0x20, 0x20, 0x2b, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
[CHAR_SPECIAL_F7] = ' ',
[CHAR_SPECIAL_F8] = ' ',
[CHAR_SPECIAL_F9] = ' ',
[CHAR_DYNAMIC] = ' ',
[CHAR_KEYPAD_ICON] = ' ',
[CHAR_EXTRA_SYMBOL] = ' ',
[CHAR_PROMPT_SCROLL] = ' ',
[CHAR_PROMPT_CLEAR] = ' ',
[EXT_CTRL_CODE_BEGIN] = ' ',

View File

@ -220,7 +220,7 @@ static void PrepareSongText(void)
if (lineNum == 0)
{
*(wordEnd++) = EXT_CTRL_CODE_BEGIN;
*(wordEnd++) = 15;
*(wordEnd++) = EXT_CTRL_CODE_FILL_WINDOW;
}
}
}

View File

@ -956,7 +956,7 @@ static u8 *GetConditionMenuMonString(u8 *dst, u16 boxId, u16 monId)
*(str++) = TEXT_COLOR_TRANSPARENT;
*(str++) = TEXT_COLOR_LIGHT_BLUE;
*(str++) = CHAR_SLASH;
*(str++) = CHAR_SPECIAL_F9;
*(str++) = CHAR_EXTRA_SYMBOL;
*(str++) = CHAR_LV_2;
str = ConvertIntToDecimalStringN(str, level, STR_CONV_MODE_LEFT_ALIGN, 3);
*(str++) = CHAR_SPACE;

View File

@ -8,7 +8,7 @@
#include "gpu_regs.h"
#include "menu.h"
#include "random.h"
#include "roulette_util.h"
#include "palette_util.h"
#include "script.h"
#include "sound.h"
#include "sprite.h"

View File

@ -1,208 +1,217 @@
#include "global.h"
#include "palette.h"
#include "roulette.h"
#include "roulette_util.h"
#include "palette_util.h"
#include "util.h"
void sub_8151678(struct UnkStruct0 *r0)
// "RouletteFlash" is more accurately a general flashing/fading util
// this file handles fading the palettes for the color/icon selections on the Roulette wheel
// but it also handles the "pulse blend" effect of Mirage Tower
void RouletteFlash_Reset(struct RouletteFlashUtil *flash)
{
r0->var00 = 0;
r0->var02 = 0;
memset(&r0->var04, 0, sizeof(r0->var04));
flash->enabled = 0;
flash->flags = 0;
memset(&flash->palettes, 0, sizeof(flash->palettes));
}
u8 sub_815168C(struct UnkStruct0 *r0, u8 r1, const struct UnkStruct1 *r2)
u8 RouletteFlash_Add(struct RouletteFlashUtil *flash, u8 id, const struct RouletteFlashSettings *settings)
{
if (!(r1 < 16) || (r0->var04[r1].var00_7))
if (id >= ARRAY_COUNT(flash->palettes) || flash->palettes[id].available)
return 0xFF;
r0->var04[r1].var04.var00 = r2->var00;
r0->var04[r1].var04.var02 = r2->var02;
r0->var04[r1].var04.var04 = r2->var04;
r0->var04[r1].var04.var05 = r2->var05;
r0->var04[r1].var04.var06 = r2->var06;
r0->var04[r1].var04.var07_0 = r2->var07_0;
r0->var04[r1].var04.var07_5 = r2->var07_5;
r0->var04[r1].var04.var07_7 = r2->var07_7;
r0->var04[r1].var00_0 = 0;
r0->var04[r1].var00_7 = 1;
r0->var04[r1].var02 = 0;
r0->var04[r1].var01 = 0;
if (r0->var04[r1].var04.var07_7 < 0)
r0->var04[r1].var03 = 0xFF;
flash->palettes[id].settings.color = settings->color;
flash->palettes[id].settings.paletteOffset = settings->paletteOffset;
flash->palettes[id].settings.numColors = settings->numColors;
flash->palettes[id].settings.delay = settings->delay;
flash->palettes[id].settings.unk6 = settings->unk6;
flash->palettes[id].settings.numFadeCycles = settings->numFadeCycles;
flash->palettes[id].settings.unk7_5 = settings->unk7_5;
flash->palettes[id].settings.colorDeltaDir = settings->colorDeltaDir;
flash->palettes[id].state = 0;
flash->palettes[id].available = TRUE;
flash->palettes[id].fadeCycleCounter = 0;
flash->palettes[id].delayCounter = 0;
if (flash->palettes[id].settings.colorDeltaDir < 0)
flash->palettes[id].colorDelta = -1;
else
r0->var04[r1].var03 = 1;
flash->palettes[id].colorDelta = 1;
return r1;
return id;
}
u8 sub_8151710(struct UnkStruct0 *r0, u8 r1)
// Unused
static u8 RouletteFlash_Remove(struct RouletteFlashUtil *flash, u8 id)
{
if (r1 >= 16)
if (id >= ARRAY_COUNT(flash->palettes))
return 0xFF;
if (!r0->var04[r1].var00_7)
if (!flash->palettes[id].available)
return 0xFF;
memset(&r0->var04[r1], 0, sizeof(r0->var04[r1]));
return r1;
memset(&flash->palettes[id], 0, sizeof(flash->palettes[id]));
return id;
}
u8 sub_8151744(struct UnkStruct3 *r0)
static u8 RouletteFlash_FadePalette(struct RouletteFlashPalette *pal)
{
u8 i;
u8 returnval;
for (i = 0; i < r0->var04.var04; i++)
for (i = 0; i < pal->settings.numColors; i++)
{
struct PlttData *faded = (struct PlttData *)&gPlttBufferFaded[r0->var04.var02 + i];
struct PlttData *unfaded = (struct PlttData *)&gPlttBufferUnfaded[r0->var04.var02 + i];
struct PlttData *faded = (struct PlttData *)&gPlttBufferFaded[pal->settings.paletteOffset + i];
struct PlttData *unfaded = (struct PlttData *)&gPlttBufferUnfaded[pal->settings.paletteOffset + i];
switch (r0->var00_0)
switch (pal->state)
{
case 1:
if (faded->r + r0->var03 >= 0 && faded->r + r0->var03 < 32)
faded->r += r0->var03;
if (faded->g + r0->var03 >= 0 && faded->g + r0->var03 < 32)
faded->g += r0->var03;
if (faded->b + r0->var03 >= 0 && faded->b + r0->var03 < 32)
faded->b += r0->var03;
// Fade color
if (faded->r + pal->colorDelta >= 0 && faded->r + pal->colorDelta < 32)
faded->r += pal->colorDelta;
if (faded->g + pal->colorDelta >= 0 && faded->g + pal->colorDelta < 32)
faded->g += pal->colorDelta;
if (faded->b + pal->colorDelta >= 0 && faded->b + pal->colorDelta < 32)
faded->b += pal->colorDelta;
break;
case 2:
if (r0->var03 < 0)
// Fade back to original color
if (pal->colorDelta < 0)
{
if (faded->r + r0->var03 >= unfaded->r)
faded->r += r0->var03;
if (faded->g + r0->var03 >= unfaded->g)
faded->g += r0->var03;
if (faded->b + r0->var03 >= unfaded->b)
faded->b += r0->var03;
if (faded->r + pal->colorDelta >= unfaded->r)
faded->r += pal->colorDelta;
if (faded->g + pal->colorDelta >= unfaded->g)
faded->g += pal->colorDelta;
if (faded->b + pal->colorDelta >= unfaded->b)
faded->b += pal->colorDelta;
}
else
{
if (faded->r + r0->var03 <= unfaded->r)
faded->r += r0->var03;
if (faded->g + r0->var03 <= unfaded->g)
faded->g += r0->var03;
if (faded->b + r0->var03 <= unfaded->b)
faded->b += r0->var03;
if (faded->r + pal->colorDelta <= unfaded->r)
faded->r += pal->colorDelta;
if (faded->g + pal->colorDelta <= unfaded->g)
faded->g += pal->colorDelta;
if (faded->b + pal->colorDelta <= unfaded->b)
faded->b += pal->colorDelta;
}
break;
}
}
if ((u32)r0->var02++ != r0->var04.var07_0)
if ((u32)pal->fadeCycleCounter++ != pal->settings.numFadeCycles)
{
returnval = 0;
}
else
{
r0->var02 = 0;
r0->var03 *= -1;
if (r0->var00_0 == 1)
r0->var00_0++;
pal->fadeCycleCounter = 0;
pal->colorDelta *= -1;
if (pal->state == 1)
pal->state++;
else
r0->var00_0--;
pal->state--;
returnval = 1;
}
return returnval;
}
u8 sub_815194C(struct UnkStruct3 *r0)
static u8 RouletteFlash_FlashPalette(struct RouletteFlashPalette *pal)
{
u8 rg2 = 0;
switch (r0->var00_0)
u8 i = 0;
switch (pal->state)
{
case 1:
for (rg2 = 0; rg2 < r0->var04.var04; rg2++)
gPlttBufferFaded[r0->var04.var02 + rg2] = r0->var04.var00;
r0->var00_0++;
// Flash to color
for (; i < pal->settings.numColors; i++)
gPlttBufferFaded[pal->settings.paletteOffset + i] = pal->settings.color;
pal->state++;
break;
case 2:
for (rg2 = 0; rg2 < r0->var04.var04; rg2++)
gPlttBufferFaded[r0->var04.var02 + rg2] = gPlttBufferUnfaded[r0->var04.var02 + rg2];
r0->var00_0--;
// Restore to original color
for (; i < pal->settings.numColors; i++)
gPlttBufferFaded[pal->settings.paletteOffset + i] = gPlttBufferUnfaded[pal->settings.paletteOffset + i];
pal->state--;
break;
}
return 1;
}
void task_tutorial_controls_fadein(struct UnkStruct0 *r0)
void RouletteFlash_Run(struct RouletteFlashUtil *flash)
{
u8 i = 0;
if (r0->var00)
if (flash->enabled)
{
for (i = 0; i < 16; i++)
for (i = 0; i < ARRAY_COUNT(flash->palettes); i++)
{
if ((r0->var02 >> i) & 1)
if ((flash->flags >> i) & 1)
{
if (--r0->var04[i].var01 == 0xFF) // if underflow ?
if (--flash->palettes[i].delayCounter == (u8)-1)
{
if (r0->var04[i].var04.var00 & 0x8000) // PlttData->unused_15 ?
sub_8151744(&r0->var04[i]);
if (flash->palettes[i].settings.color & FLASHUTIL_USE_EXISTING_COLOR)
RouletteFlash_FadePalette(&flash->palettes[i]);
else
sub_815194C(&r0->var04[i]);
RouletteFlash_FlashPalette(&flash->palettes[i]);
r0->var04[i].var01 = r0->var04[i].var04.var05;
flash->palettes[i].delayCounter = flash->palettes[i].settings.delay;
}
}
}
}
}
void sub_8151A48(struct UnkStruct0 *r0, u16 r1)
void RouletteFlash_Enable(struct RouletteFlashUtil *flash, u16 flags)
{
u8 i = 0;
r0->var00++;
for (i = 0; i < 16; i++)
flash->enabled++;
for (i = 0; i < ARRAY_COUNT(flash->palettes); i++)
{
if ((r1 >> i) & 1)
if ((flags >> i) & 1)
{
if (r0->var04[i].var00_7)
if (flash->palettes[i].available)
{
r0->var02 |= 1 << i;
r0->var04[i].var00_0 = 1;
flash->flags |= 1 << i;
flash->palettes[i].state = 1;
}
}
}
}
void sub_8151A9C(struct UnkStruct0 *r0, u16 r1)
void RouletteFlash_Stop(struct RouletteFlashUtil *flash, u16 flags)
{
u8 i;
for (i = 0; i < 16; i++)
for (i = 0; i < ARRAY_COUNT(flash->palettes); i++)
{
if ((r0->var02 >> i) & 1)
if ((flash->flags >> i) & 1)
{
if (r0->var04[i].var00_7)
if (flash->palettes[i].available)
{
if ((r1 >> i) & 1)
if ((flags >> i) & 1)
{
u32 offset = r0->var04[i].var04.var02;
u32 offset = flash->palettes[i].settings.paletteOffset;
u16 *faded = &gPlttBufferFaded[offset];
u16 *unfaded = &gPlttBufferUnfaded[offset];
memcpy(faded, unfaded, r0->var04[i].var04.var04 * 2);
r0->var04[i].var00_0 = 0;
r0->var04[i].var02 = 0;
r0->var04[i].var01 = 0;
if (r0->var04[i].var04.var07_7 < 0)
r0->var04[i].var03 = 0xFF;
memcpy(faded, unfaded, flash->palettes[i].settings.numColors * 2);
flash->palettes[i].state = 0;
flash->palettes[i].fadeCycleCounter = 0;
flash->palettes[i].delayCounter = 0;
if (flash->palettes[i].settings.colorDeltaDir < 0)
flash->palettes[i].colorDelta = -1;
else
r0->var04[i].var03 = 0x1;
flash->palettes[i].colorDelta = 1;
}
}
}
}
if (r1 == 0xFFFF)
if (flags == 0xFFFF)
{
r0->var00 = 0;
r0->var02 = 0;
// Stopped all
flash->enabled = 0;
flash->flags = 0;
}
else
{
r0->var02 = r0->var02 & ~r1;
flash->flags &= ~flags;
}
}
@ -429,7 +438,8 @@ void UpdatePulseBlend(struct PulseBlend *pulseBlend)
}
}
void sub_8152008(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height)
// Below used for the Roulette grid
void ClearTilemapRect(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height)
{
u16 *_dest;
u8 i;
@ -446,7 +456,7 @@ void sub_8152008(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height)
}
}
void sub_8152058(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height)
void SetTilemapRect(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height)
{
u16 *_dest;
u16 *_src = src;

View File

@ -725,8 +725,8 @@ static void PutPokeblockListMenuString(u8 *dst, u16 pkblId)
u8 *txtPtr = StringCopy(dst, gPokeblockNames[pkblock->color]);
*(txtPtr++) = EXT_CTRL_CODE_BEGIN;
*(txtPtr++) = 0x12;
*(txtPtr++) = 0x57;
*(txtPtr++) = EXT_CTRL_CODE_SKIP;
*(txtPtr++) = 87;
ConvertIntToDecimalStringN(gStringVar1, GetHighestPokeblocksFlavorLevel(pkblock), STR_CONV_MODE_LEFT_ALIGN, 3);
StringExpandPlaceholders(txtPtr, gText_LvVar1);

View File

@ -4145,7 +4145,7 @@ static void PrintMonHeight(u16 height, u8 left, u8 top)
inches = (inches - (feet * 120)) / 10;
buffer[i++] = EXT_CTRL_CODE_BEGIN;
buffer[i++] = 0x13;
buffer[i++] = EXT_CTRL_CODE_CLEAR_TO;
if (feet / 10 == 0)
{
buffer[i++] = 18;

View File

@ -1868,21 +1868,21 @@ const u8 gPPUpGetMask[] = {0x03, 0x0c, 0x30, 0xc0}; // Masks for getting PP Up c
const u8 gPPUpSetMask[] = {0xfc, 0xf3, 0xcf, 0x3f}; // Masks for setting PP Up count
const u8 gPPUpAddMask[] = {0x01, 0x04, 0x10, 0x40}; // Values added to PP Up count
const u8 gStatStageRatios[][2] =
const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2] =
{
{10, 40}, // -6
{10, 40}, // -6, MIN_STAT_STAGE
{10, 35}, // -5
{10, 30}, // -4
{10, 25}, // -3
{10, 20}, // -2
{10, 15}, // -1
{10, 10}, // 0
{10, 10}, // 0, DEFAULT_STAT_STAGE
{15, 10}, // +1
{20, 10}, // +2
{25, 10}, // +3
{30, 10}, // +4
{35, 10}, // +5
{40, 10}, // +6
{40, 10}, // +6, MAX_STAT_STAGE
};
static const u16 sDeoxysBaseStats[] =
@ -3199,7 +3199,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
{
if (gCritMultiplier == 2)
{
if (attacker->statStages[STAT_ATK] > 6)
if (attacker->statStages[STAT_ATK] > DEFAULT_STAT_STAGE)
APPLY_STAT_MOD(damage, attacker, attack, STAT_ATK)
else
damage = attack;
@ -3212,7 +3212,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (gCritMultiplier == 2)
{
if (defender->statStages[STAT_DEF] < 6)
if (defender->statStages[STAT_DEF] < DEFAULT_STAT_STAGE)
APPLY_STAT_MOD(damageHelper, defender, defense, STAT_DEF)
else
damageHelper = defense;
@ -3249,7 +3249,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
{
if (gCritMultiplier == 2)
{
if (attacker->statStages[STAT_SPATK] > 6)
if (attacker->statStages[STAT_SPATK] > DEFAULT_STAT_STAGE)
APPLY_STAT_MOD(damage, attacker, spAttack, STAT_SPATK)
else
damage = spAttack;
@ -3262,7 +3262,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if (gCritMultiplier == 2)
{
if (defender->statStages[STAT_SPDEF] < 6)
if (defender->statStages[STAT_SPDEF] < DEFAULT_STAT_STAGE)
APPLY_STAT_MOD(damageHelper, defender, spDefense, STAT_SPDEF)
else
damageHelper = spDefense;
@ -4624,8 +4624,8 @@ void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex)
hpSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(battlerId)];
*hpSwitchout = gBattleMons[battlerId].hp;
for (i = 0; i < 8; i++)
gBattleMons[battlerId].statStages[i] = 6;
for (i = 0; i < NUM_BATTLE_STATS; i++)
gBattleMons[battlerId].statStages[i] = DEFAULT_STAT_STAGE;
gBattleMons[battlerId].status2 = 0;
UpdateSentPokesToOpponentValue(battlerId);
@ -4728,49 +4728,49 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
retVal = FALSE;
}
if ((itemEffect[cmdIndex] & ITEM0_X_ATTACK)
&& gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12)
&& gBattleMons[gActiveBattler].statStages[STAT_ATK] < MAX_STAT_STAGE)
{
gBattleMons[gActiveBattler].statStages[STAT_ATK] += itemEffect[cmdIndex] & ITEM0_X_ATTACK;
if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > 12)
gBattleMons[gActiveBattler].statStages[STAT_ATK] = 12;
if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > MAX_STAT_STAGE)
gBattleMons[gActiveBattler].statStages[STAT_ATK] = MAX_STAT_STAGE;
retVal = FALSE;
}
break;
// in-battle stat boosting effects
case 1:
if ((itemEffect[cmdIndex] & ITEM1_X_DEFEND)
&& gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12)
&& gBattleMons[gActiveBattler].statStages[STAT_DEF] < MAX_STAT_STAGE)
{
gBattleMons[gActiveBattler].statStages[STAT_DEF] += (itemEffect[cmdIndex] & ITEM1_X_DEFEND) >> 4;
if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > 12)
gBattleMons[gActiveBattler].statStages[STAT_DEF] = 12;
if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > MAX_STAT_STAGE)
gBattleMons[gActiveBattler].statStages[STAT_DEF] = MAX_STAT_STAGE;
retVal = FALSE;
}
if ((itemEffect[cmdIndex] & ITEM1_X_SPEED)
&& gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12)
&& gBattleMons[gActiveBattler].statStages[STAT_SPEED] < MAX_STAT_STAGE)
{
gBattleMons[gActiveBattler].statStages[STAT_SPEED] += itemEffect[cmdIndex] & ITEM1_X_SPEED;
if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > 12)
gBattleMons[gActiveBattler].statStages[STAT_SPEED] = 12;
if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > MAX_STAT_STAGE)
gBattleMons[gActiveBattler].statStages[STAT_SPEED] = MAX_STAT_STAGE;
retVal = FALSE;
}
break;
// more stat boosting effects
case 2:
if ((itemEffect[cmdIndex] & ITEM2_X_ACCURACY)
&& gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12)
&& gBattleMons[gActiveBattler].statStages[STAT_ACC] < MAX_STAT_STAGE)
{
gBattleMons[gActiveBattler].statStages[STAT_ACC] += (itemEffect[cmdIndex] & ITEM2_X_ACCURACY) >> 4;
if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > 12)
gBattleMons[gActiveBattler].statStages[STAT_ACC] = 12;
if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > MAX_STAT_STAGE)
gBattleMons[gActiveBattler].statStages[STAT_ACC] = MAX_STAT_STAGE;
retVal = FALSE;
}
if ((itemEffect[cmdIndex] & ITEM2_X_SPATK)
&& gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12)
&& gBattleMons[gActiveBattler].statStages[STAT_SPATK] < MAX_STAT_STAGE)
{
gBattleMons[gActiveBattler].statStages[STAT_SPATK] += itemEffect[cmdIndex] & ITEM2_X_SPATK;
if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > 12)
gBattleMons[gActiveBattler].statStages[STAT_SPATK] = 12;
if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > MAX_STAT_STAGE)
gBattleMons[gActiveBattler].statStages[STAT_SPATK] = MAX_STAT_STAGE;
retVal = FALSE;
}
break;

View File

@ -6869,36 +6869,36 @@ static void SetCursorMonData(void *pokemon, u8 mode)
txtPtr = sPSSData->cursorMonGenderLvlText;
*(txtPtr)++ = EXT_CTRL_CODE_BEGIN;
*(txtPtr)++ = 4;
*(txtPtr)++ = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
switch (gender)
{
case MON_MALE:
*(txtPtr)++ = 4;
*(txtPtr)++ = 1;
*(txtPtr)++ = 5;
*(txtPtr)++ = TEXT_COLOR_RED;
*(txtPtr)++ = TEXT_COLOR_WHITE;
*(txtPtr)++ = TEXT_COLOR_LIGHT_RED;
*(txtPtr)++ = CHAR_MALE;
break;
case MON_FEMALE:
*(txtPtr)++ = 6;
*(txtPtr)++ = 1;
*(txtPtr)++ = 7;
*(txtPtr)++ = TEXT_COLOR_GREEN;
*(txtPtr)++ = TEXT_COLOR_WHITE;
*(txtPtr)++ = TEXT_COLOR_LIGHT_GREEN;
*(txtPtr)++ = CHAR_FEMALE;
break;
default:
*(txtPtr)++ = 2;
*(txtPtr)++ = 1;
*(txtPtr)++ = 3;
*(txtPtr)++ = 0x77;
*(txtPtr)++ = TEXT_COLOR_DARK_GREY;
*(txtPtr)++ = TEXT_COLOR_WHITE;
*(txtPtr)++ = TEXT_COLOR_LIGHT_GREY;
*(txtPtr)++ = CHAR_UNK_SPACER;
break;
}
*(txtPtr++) = EXT_CTRL_CODE_BEGIN;
*(txtPtr++) = 4;
*(txtPtr++) = 2;
*(txtPtr++) = 1;
*(txtPtr++) = 3;
*(txtPtr++) = 0;
*(txtPtr++) = CHAR_SPECIAL_F9;
*(txtPtr++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
*(txtPtr++) = TEXT_COLOR_DARK_GREY;
*(txtPtr++) = TEXT_COLOR_WHITE;
*(txtPtr++) = TEXT_COLOR_LIGHT_GREY;
*(txtPtr++) = CHAR_SPACE;
*(txtPtr++) = CHAR_EXTRA_SYMBOL;
*(txtPtr++) = CHAR_LV_2;
txtPtr = ConvertIntToDecimalStringN(txtPtr, sPSSData->cursorMonLevel, STR_CONV_MODE_LEFT_ALIGN, 3);

View File

@ -709,9 +709,9 @@ static void (*const sTextPrinterTasks[])(u8 taskId) =
static const u8 sMemoNatureTextColor[] = _("{COLOR LIGHT_RED}{SHADOW GREEN}");
static const u8 sMemoMiscTextColor[] = _("{COLOR WHITE}{SHADOW DARK_GREY}"); // This is also affected by palettes, apparently
static const u8 sStatsLeftColumnLayout[] = _("{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}\n{SPECIAL_F7 0x03}");
static const u8 sStatsRightColumnLayout[] = _("{SPECIAL_F7 0x00}\n{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}");
static const u8 sMovesPPLayout[] = _("{PP}{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}");
static const u8 sStatsLeftColumnLayout[] = _("{DYNAMIC 0}/{DYNAMIC 1}\n{DYNAMIC 2}\n{DYNAMIC 3}");
static const u8 sStatsRightColumnLayout[] = _("{DYNAMIC 0}\n{DYNAMIC 1}\n{DYNAMIC 2}");
static const u8 sMovesPPLayout[] = _("{PP}{DYNAMIC 0}/{DYNAMIC 1}");
#define TAG_MOVE_SELECTOR 30000
#define TAG_MON_STATUS 30001

View File

@ -337,10 +337,10 @@ u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3)
boxId = unkPtr->unk4[id].boxId;
monId = unkPtr->unk4[id].monId;
*(str++) = EXT_CTRL_CODE_BEGIN;
*(str++) = 4;
*(str++) = 8;
*(str++) = 0;
*(str++) = 9;
*(str++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
*(str++) = TEXT_COLOR_BLUE;
*(str++) = TEXT_COLOR_TRANSPARENT;
*(str++) = TEXT_COLOR_LIGHT_BLUE;
if (GetBoxOrPartyMonData(boxId, monId, MON_DATA_IS_EGG, NULL))
return StringCopyPadded(str, gText_EggNickname, CHAR_SPACE, 12);
@ -368,40 +368,40 @@ u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3)
(str_++);
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = 0x12;
*(str_++) = 0x3C;
*(str_++) = EXT_CTRL_CODE_SKIP;
*(str_++) = 60;
switch (gender)
{
default:
*(str_++) = 0x77;
*(str_++) = CHAR_UNK_SPACER;
break;
case MON_MALE:
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = EXT_CTRL_CODE_COLOR;
*(str_++) = 4;
*(str_++) = TEXT_COLOR_RED;
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = 3;
*(str_++) = 5;
*(str_++) = EXT_CTRL_CODE_SHADOW;
*(str_++) = TEXT_COLOR_LIGHT_RED;
*(str_++) = CHAR_MALE;
break;
case MON_FEMALE:
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = EXT_CTRL_CODE_COLOR;
*(str_++) = 6;
*(str_++) = TEXT_COLOR_GREEN;
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = 3;
*(str_++) = 7;
*(str_++) = EXT_CTRL_CODE_SHADOW;
*(str_++) = TEXT_COLOR_LIGHT_GREEN;
*(str_++) = CHAR_FEMALE;
break;
}
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = 4;
*(str_++) = 8;
*(str_++) = 0;
*(str_++) = 9;
*(str_++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
*(str_++) = TEXT_COLOR_BLUE;
*(str_++) = TEXT_COLOR_TRANSPARENT;
*(str_++) = TEXT_COLOR_LIGHT_BLUE;
*(str_++) = CHAR_SLASH;
*(str_++) = CHAR_SPECIAL_F9;
*(str_++) = CHAR_EXTRA_SYMBOL;
*(str_++) = CHAR_LV_2;
txtPtr = str_;
str_ = ConvertIntToDecimalStringN(str_, level, STR_CONV_MODE_LEFT_ALIGN, 3);
@ -429,10 +429,10 @@ void sub_81CD824(s16 arg0, u8 arg1)
sub_81CD624(structPtr->unk6368[arg1], arg0, FALSE);
boxId = unkPtr->unk4[arg0].boxId;
structPtr->unk6320[arg1][0] = EXT_CTRL_CODE_BEGIN;
structPtr->unk6320[arg1][1] = 4;
structPtr->unk6320[arg1][2] = 8;
structPtr->unk6320[arg1][3] = 0;
structPtr->unk6320[arg1][4] = 9;
structPtr->unk6320[arg1][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
structPtr->unk6320[arg1][2] = TEXT_COLOR_BLUE;
structPtr->unk6320[arg1][3] = TEXT_COLOR_TRANSPARENT;
structPtr->unk6320[arg1][4] = TEXT_COLOR_LIGHT_BLUE;
if (boxId == TOTAL_BOXES_COUNT)
sub_81CD5CC(&structPtr->unk6320[arg1][5], gText_InParty, 8);
else

View File

@ -581,10 +581,10 @@ bool32 sub_81CE754(u8 a0, u16 a1, bool8 a2)
str = sub_81CDD24(a1);
AddTextPrinterParameterized(structPtr->unk1820, 1, str, 0, 17, 0, NULL);
text[0] = EXT_CTRL_CODE_BEGIN;
text[1] = 4;
text[2] = 8;
text[3] = 0;
text[4] = 9;
text[1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
text[2] = TEXT_COLOR_BLUE;
text[3] = TEXT_COLOR_TRANSPARENT;
text[4] = TEXT_COLOR_LIGHT_BLUE;
StringCopy(text + 5, gText_Number2);
AddTextPrinterParameterized(structPtr->unk1821, 1, text, 4, 1, 0, NULL);
ConvertIntToDecimalStringN(text + 5, sub_81CDD48(), STR_CONV_MODE_RIGHT_ALIGN, 4);

View File

@ -707,7 +707,7 @@ static void sub_81CF8E4(struct PokenavMonList * item, u8 * dest)
}
s = StringCopy(gStringVar1, genderStr);
*s++ = CHAR_SLASH;
*s++ = CHAR_SPECIAL_F9;
*s++ = CHAR_EXTRA_SYMBOL;
*s++ = CHAR_LV_2;
ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3);
sub_81DB494(dest, 1, gStringVar1, 40);

View File

@ -724,7 +724,7 @@ static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest)
s = StringCopy(gStringVar1, genderStr);
*s++ = CHAR_SLASH;
*s++ = CHAR_SPECIAL_F9;
*s++ = CHAR_EXTRA_SYMBOL;
*s++ = CHAR_LV_2;
ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3);
dest = sub_81DB494(dest, 1, gStringVar1, 54);

View File

@ -836,7 +836,7 @@ void sub_81D0FF0(struct PokenavSub14 *structPtr)
txtPtr = StringCopy(gStringVar1, genderTxt);
*(txtPtr++) = CHAR_SLASH;
*(txtPtr++) = CHAR_SPECIAL_F9;
*(txtPtr++) = CHAR_EXTRA_SYMBOL;
*(txtPtr++) = CHAR_LV_2;
ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3);
AddTextPrinterParameterized(windowId, 1, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL);

File diff suppressed because it is too large Load Diff

View File

@ -512,14 +512,14 @@ const u8 gText_EggWillTakeSomeTime[] = _("What will hatch from this?\nIt will ta
const u8 gText_EggWillHatchSoon[] = _("It moves occasionally.\nIt should hatch soon.");
const u8 gText_EggAboutToHatch[] = _("It's making sounds.\nIt's about to hatch!");
const u8 gText_HMMovesCantBeForgotten2[] = _("HM moves can't be\nforgotten now.");
const u8 gText_XNatureMetAtYZ[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nmet at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}.");
const u8 gText_XNatureHatchedAtYZ[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nhatched at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}.");
const u8 gText_XNatureObtainedInTrade[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nobtained in a trade.");
const u8 gText_XNatureFatefulEncounter[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nobtained in a fateful\nencounter at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}.");
const u8 gText_XNatureProbablyMetAt[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nprobably met at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}.");
const u8 gText_XNature[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature");
const u8 gText_XNatureMetSomewhereAt[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nmet somewhere at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}.");
const u8 gText_XNatureHatchedSomewhereAt[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nhatched somewhere at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}.");
const u8 gText_XNatureMetAtYZ[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nmet at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1},\n{DYNAMIC 0}{DYNAMIC 4}{DYNAMIC 1}.");
const u8 gText_XNatureHatchedAtYZ[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nhatched at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1},\n{DYNAMIC 0}{DYNAMIC 4}{DYNAMIC 1}.");
const u8 gText_XNatureObtainedInTrade[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nobtained in a trade.");
const u8 gText_XNatureFatefulEncounter[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nobtained in a fateful\nencounter at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1}.");
const u8 gText_XNatureProbablyMetAt[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nprobably met at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1},\n{DYNAMIC 0}{DYNAMIC 4}{DYNAMIC 1}.");
const u8 gText_XNature[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature");
const u8 gText_XNatureMetSomewhereAt[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nmet somewhere at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1}.");
const u8 gText_XNatureHatchedSomewhereAt[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nhatched somewhere at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1}.");
const u8 gText_OddEggFoundByCouple[] = _("An odd POKéMON EGG found\nby the DAY CARE couple.");
const u8 gText_PeculiarEggNicePlace[] = _("A peculiar POKéMON EGG\nobtained at the nice place.");
const u8 gText_PeculiarEggTrade[] = _("A peculiar POKéMON EGG\nobtained in a trade.");
@ -861,14 +861,14 @@ const u8 gText_ExitFromBox[] = _("Exit from the BOX?");
const u8 gText_WhatDoYouWantToDo[] = _("What do you want to do?");
const u8 gText_PleasePickATheme[] = _("Please pick a theme.");
const u8 gText_PickTheWallpaper[] = _("Pick the wallpaper.");
const u8 gText_PkmnIsSelected[] = _("{SPECIAL_F7 0x00} is selected.");
const u8 gText_PkmnIsSelected[] = _("{DYNAMIC 0} is selected.");
const u8 gText_JumpToWhichBox[] = _("Jump to which BOX?");
const u8 gText_DepositInWhichBox[] = _("Deposit in which BOX?");
const u8 gText_PkmnWasDeposited[] = _("{SPECIAL_F7 0x00} was deposited.");
const u8 gText_PkmnWasDeposited[] = _("{DYNAMIC 0} was deposited.");
const u8 gText_BoxIsFull2[] = _("The BOX is full.");
const u8 gText_ReleaseThisPokemon[] = _("Release this POKéMON?");
const u8 gText_PkmnWasReleased[] = _("{SPECIAL_F7 0x00} was released.");
const u8 gText_ByeByePkmn[] = _("Bye-bye, {SPECIAL_F7 0x00}!");
const u8 gText_PkmnWasReleased[] = _("{DYNAMIC 0} was released.");
const u8 gText_ByeByePkmn[] = _("Bye-bye, {DYNAMIC 0}!");
const u8 gText_MarkYourPkmn[] = _("Mark your POKéMON.");
const u8 gText_ThatsYourLastPkmn[] = _("That's your last POKéMON!");
const u8 gText_YourPartysFull[] = _("Your party's full!");
@ -876,7 +876,7 @@ const u8 gText_YoureHoldingAPkmn[] = _("You're holding a POKéMON!");
const u8 gText_WhichOneWillYouTake[] = _("Which one will you take?");
const u8 gText_YouCantReleaseAnEgg[] = _("You can't release an EGG.");
const u8 gText_ContinueBoxOperations[] = _("Continue BOX operations?");
const u8 gText_PkmnCameBack[] = _("{SPECIAL_F7 0x00} came back!");
const u8 gText_PkmnCameBack[] = _("{DYNAMIC 0} came back!");
const u8 gText_WasItWorriedAboutYou[] = _("Was it worried about you?");
const u8 gText_FourEllipsesExclamation[] = _("… … … … !");
const u8 gText_PleaseRemoveTheMail[] = _("Please remove the MAIL.");
@ -884,8 +884,8 @@ const u8 gText_GiveToAPkmn[] = _("GIVE to a POKéMON?");
const u8 gText_PlacedItemInBag[] = _("Placed item in the BAG.");
const u8 gText_BagIsFull2[] = _("The BAG is full.");
const u8 gText_PutItemInBag[] = _("Put this item in the BAG?");
const u8 gText_ItemIsNowHeld[] = _("{SPECIAL_F7 0x00} is now held.");
const u8 gText_ChangedToNewItem[] = _("Changed to {SPECIAL_F7 0x00}.");
const u8 gText_ItemIsNowHeld[] = _("{DYNAMIC 0} is now held.");
const u8 gText_ChangedToNewItem[] = _("Changed to {DYNAMIC 0}.");
const u8 gText_MailCantBeStored[] = _("MAIL can't be stored!");
const u8 gPCText_Cancel[] = _("CANCEL");
const u8 gPCText_Store[] = _("STORE");
@ -981,18 +981,18 @@ const u8 gText_TrainerCloseBy[] = _("That TRAINER is close by.\nTalk to the TRAI
const u8 gText_InParty[] = _("IN PARTY");
const u8 gText_Number2[] = _("No. ");
const u8 gText_Ribbons[] = _("RIBBONS"); // Unused
const u8 gText_PokemonMaleLv[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); // Unused
const u8 gText_PokemonFemaleLv[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); // Unused
const u8 gText_PokemonNoGenderLv[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}"); // Unused
const u8 gText_PokemonMaleLv[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}"); // Unused
const u8 gText_PokemonFemaleLv[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}"); // Unused
const u8 gText_PokemonNoGenderLv[] = _("{DYNAMIC 0}/{LV}{DYNAMIC 1}"); // Unused
const u8 gText_Unknown[] = _("UNKNOWN");
const u8 gText_Call[] = _("CALL");
const u8 gText_Check[] = _("CHECK");
const u8 gText_Cancel6[] = _("CANCEL");
const u8 gText_NumberF700[] = _("No. {SPECIAL_F7 0x00}");
const u8 gText_RibbonsF700[] = _("RIBBONS {SPECIAL_F7 0x00}");
const u8 gText_PokemonMaleLv2[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused
const u8 gText_PokemonFemaleLv2[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused
const u8 gText_PokemonNoGenderLv2[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused
const u8 gText_NumberF700[] = _("No. {DYNAMIC 0}");
const u8 gText_RibbonsF700[] = _("RIBBONS {DYNAMIC 0}");
const u8 gText_PokemonMaleLv2[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused
const u8 gText_PokemonFemaleLv2[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused
const u8 gText_PokemonNoGenderLv2[] = _("{DYNAMIC 0}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused
const u8 gText_CombineFourWordsOrPhrases[] = _("Combine four words or phrases");
const u8 gText_AndMakeYourProfile[] = _("and make your profile.");
const u8 gText_CombineSixWordsOrPhrases[] = _("Combine six words or phrases");
@ -1063,7 +1063,7 @@ const u8 gText_ApprenticesPhrase[] = _("Apprentice's phrase");
const u8 gText_Questionnaire[] = _("QUESTIONNAIRE");
const u8 gText_YouCannotQuitHere[] = _("You cannot quit here.");
const u8 gText_SectionMustBeCompleted[] = _("This section must be completed.");
const u8 gText_F700sQuiz[] = _("{SPECIAL_F7 0x00}'s quiz");
const u8 gText_F700sQuiz[] = _("{DYNAMIC 0}'s quiz");
const u8 gText_Lady[] = _("Lady");
const u8 gText_AfterYouHaveReadTheQuiz[] = _("After you have read the quiz");
const u8 gText_QuestionPressTheAButton[] = _("question, press the A Button.");
@ -1255,16 +1255,16 @@ const u8 gText_QuitChatting[] = _("Quit chatting?");
const u8 gText_RegisterTextWhere[] = _("Register text where?");
const u8 gText_RegisterTextHere[] = _("Register text here?");
const u8 gText_InputText[] = _("Input text.");
const u8 gText_F700JoinedChat[] = _("{SPECIAL_F7 0x00} joined the chat!");
const u8 gText_F700LeftChat[] = _("{SPECIAL_F7 0x00} left the chat.");
const u8 gJPText_PlayersXPokemon[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめ:"); // Unused
const u8 gJPText_PlayersXPokmonDoesNotExist[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめは いません"); // Unused
const u8 gText_F700JoinedChat[] = _("{DYNAMIC 0} joined the chat!");
const u8 gText_F700LeftChat[] = _("{DYNAMIC 0} left the chat.");
const u8 gJPText_PlayersXPokemon[] = _("{DYNAMIC 0}の{DYNAMIC 1}ひきめ:"); // Unused
const u8 gJPText_PlayersXPokmonDoesNotExist[] = _("{DYNAMIC 0}の{DYNAMIC 1}ひきめは いません"); // Unused
const u8 gText_ExitingChat[] = _("Exiting the chat…");
const u8 gText_LeaderLeftEndingChat[] = _("The LEADER, {SPECIAL_F7 0x00}, has\nleft, ending the chat.");
const u8 gText_LeaderLeftEndingChat[] = _("The LEADER, {DYNAMIC 0}, has\nleft, ending the chat.");
const u8 gText_RegisteredTextChangedOKToSave[] = _("The registered text has been changed.\nIs it okay to save the game?");
const u8 gText_AlreadySavedFile_Chat[] = _("There is already a saved file.\nIs it okay to overwrite it?");
const u8 gText_SavingDontTurnOff_Chat[] = _("SAVING…\nDON'T TURN OFF THE POWER.");
const u8 gText_PlayerSavedGame_Chat[] = _("{SPECIAL_F7 0x00} saved the game.");
const u8 gText_PlayerSavedGame_Chat[] = _("{DYNAMIC 0} saved the game.");
const u8 gText_IfLeaderLeavesChatEnds[] = _("If the LEADER leaves, the chat\nwill end. Is that okay?");
const u8 gText_Hello[] = _("HELLO");
const u8 gText_Pokemon2[] = _("POKéMON");
@ -1301,8 +1301,8 @@ ALIGNED(4) const u8 gText_YouHaveNoBerries[] = _("You have no BERRIES.\nThe game
ALIGNED(4) const u8 gText_MemberDroppedOut[] = _("A member dropped out.\nThe game will be canceled.");
ALIGNED(4) const u8 gText_TimesUpNoGoodPowder[] = _("Time's up.\pGood BERRY POWDER could not be\nmade…\p");
ALIGNED(4) const u8 gText_CommunicationStandby2[] = _("Communication standby…");
ALIGNED(4) const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{SPECIAL_F7 0x00}");
ALIGNED(4) const u8 gText_1DotF700[] = _("1. {SPECIAL_F7 0x00}");
ALIGNED(4) const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{DYNAMIC 0}");
ALIGNED(4) const u8 gText_1DotF700[] = _("1. {DYNAMIC 0}");
ALIGNED(4) const u8 gText_SpaceTimes2[] = _(" time(s)");
ALIGNED(4) const u8 gText_XDotY[] = _("{STR_VAR_1}.{STR_VAR_2}");
ALIGNED(4) const u8 gText_Var1Berry[] = _("{STR_VAR_1} BERRY");
@ -1375,7 +1375,7 @@ const u8 gText_2Colon[] = _("2:");
const u8 gText_3Colon[] = _("3:");
const u8 gText_4Colon[] = _("4:");
const u8 gText_5Colon[] = _("5:");
const u8 gText_FirstPlacePrize[] = _("The first-place winner gets\nthis {SPECIAL_F7 0x00}!");
const u8 gText_FirstPlacePrize[] = _("The first-place winner gets\nthis {DYNAMIC 0}!");
const u8 gText_CantHoldAnyMore[] = _("You can't hold any more!");
const u8 gText_FilledStorageSpace[] = _("It filled its storage space.");
const u8 gText_WantToPlayAgain[] = _("Want to play again?");
@ -1388,7 +1388,7 @@ const u8 gText_PkmnJumpRecords[] = _("POKéMON JUMP RECORDS");
const u8 gText_JumpsInARow[] = _("Jumps in a row:");
const u8 gText_BestScore2[] = _("Best score:");
const u8 gText_ExcellentsInARow[] = _("EXCELLENTS in a row:");
const u8 gText_AwesomeWonF701F700[] = _("Awesome score! You've\nwon {SPECIAL_F7 0x01} {SPECIAL_F7 0x00}!");
const u8 gText_AwesomeWonF701F700[] = _("Awesome score! You've\nwon {DYNAMIC 1} {DYNAMIC 0}!");
const u8 gText_FilledStorageSpace2[] = _("It filled its storage space.");
const u8 gText_CantHoldMore[] = _("You can't hold any more!");
const u8 gText_WantToPlayAgain2[] = _("Want to play again?");
@ -1645,10 +1645,10 @@ const u8 gText_PeopleTrading[] = _("People trading:");
const u8 gText_PeopleBattling[] = _("People battling:");
const u8 gText_PeopleInUnionRoom[] = _("People in the UNION ROOM:");
const u8 gText_PeopleCommunicating[] = _("People communicating:");
const u8 gText_F700Players[] = _("{SPECIAL_F7 0} players");
const u8 gText_F701Players[] = _("{SPECIAL_F7 1} players");
const u8 gText_F702Players[] = _("{SPECIAL_F7 2} players");
const u8 gText_F703Players[] = _("{SPECIAL_F7 3} players");
const u8 gText_F700Players[] = _("{DYNAMIC 0} players");
const u8 gText_F701Players[] = _("{DYNAMIC 1} players");
const u8 gText_F702Players[] = _("{DYNAMIC 2} players");
const u8 gText_F703Players[] = _("{DYNAMIC 3} players");
const u8 *const gTextTable_Players[] = {
gText_F700Players,

View File

@ -1646,7 +1646,7 @@ static void AppendTextToMessage(void)
charsStr = sUnionRoomKeyboardText[sChat->currentPage][sChat->currentRow];
for (i = 0; i < sChat->currentCol; i++)
{
if (*charsStr == CHAR_SPECIAL_F9)
if (*charsStr == CHAR_EXTRA_SYMBOL)
charsStr++;
charsStr++;
}
@ -1670,7 +1670,7 @@ static void AppendTextToMessage(void)
str = GetEndOfMessagePtr();
while (--strLength != -1 && sChat->bufferCursorPos < MAX_MESSAGE_LENGTH)
{
if (*charsStr == CHAR_SPECIAL_F9)
if (*charsStr == CHAR_EXTRA_SYMBOL)
{
*str = *charsStr;
charsStr++;
@ -1705,7 +1705,7 @@ static void SwitchCaseOfLastMessageCharacter(void)
sChat->lastBufferCursorPos = sChat->bufferCursorPos - 1;
str = GetLastCharOfMessagePtr();
if (*str != CHAR_SPECIAL_F9)
if (*str != CHAR_EXTRA_SYMBOL)
{
character = sCaseToggleTable[*str];
if (character)
@ -1763,7 +1763,7 @@ static u8 *GetLastCharOfMessagePtr(void)
while (*currChar != EOS)
{
lastChar = currChar;
if (*currChar == CHAR_SPECIAL_F9)
if (*currChar == CHAR_EXTRA_SYMBOL)
currChar++;
currChar++;
}
@ -1784,7 +1784,7 @@ static u16 GetNumOverflowCharsInMessage(void)
strLength -= 10;
for (i = 0; i < strLength; i++)
{
if (*str == CHAR_SPECIAL_F9)
if (*str == CHAR_EXTRA_SYMBOL)
str++;
str++;
@ -1925,7 +1925,7 @@ static u8 *GetLimitedMessageStartPtr(void)
u8 *str = sChat->messageEntryBuffer;
for (i = 0; i < numChars; i++)
{
if (*str == CHAR_SPECIAL_F9)
if (*str == CHAR_EXTRA_SYMBOL)
*str++;
str++;
@ -1942,7 +1942,7 @@ static u16 GetLimitedMessageStartPos(void)
u8 *str = sChat->messageEntryBuffer;
for (count = 0, i = 0; i < numChars; count++, i++)
{
if (*str == CHAR_SPECIAL_F9)
if (*str == CHAR_EXTRA_SYMBOL)
str++;
str++;

View File

@ -57,19 +57,19 @@ u16 Font6Func(struct TextPrinter *textPrinter)
char_ = *textPrinter->printerTemplate.currentChar++;
switch (char_)
{
case 1:
case EXT_CTRL_CODE_COLOR:
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar++;
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
return 2;
case 2:
case EXT_CTRL_CODE_HIGHLIGHT:
textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar++;
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
return 2;
case 3:
case EXT_CTRL_CODE_SHADOW:
textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar++;
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
return 2;
case 4:
case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW:
textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar;
textPrinter->printerTemplate.bgColor = *++textPrinter->printerTemplate.currentChar;
textPrinter->printerTemplate.shadowColor = *++textPrinter->printerTemplate.currentChar;
@ -77,43 +77,43 @@ u16 Font6Func(struct TextPrinter *textPrinter)
GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor);
return 2;
case 5:
case EXT_CTRL_CODE_PALETTE:
textPrinter->printerTemplate.currentChar++;
return 2;
case 6:
case EXT_CTRL_CODE_SIZE:
subStruct->glyphId = *textPrinter->printerTemplate.currentChar;
textPrinter->printerTemplate.currentChar++;
return 2;
case 7:
case EXT_CTRL_CODE_RESET_SIZE:
return 2;
case 8:
case EXT_CTRL_CODE_PAUSE:
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++;
textPrinter->state = 6;
return 2;
case 9:
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
textPrinter->state = 1;
if (gTextFlags.autoScroll)
{
subStruct->autoScrollDelay = 0;
}
return 3;
case 10:
case EXT_CTRL_CODE_WAIT_SE:
textPrinter->state = 5;
return 3;
case 11:
case 16:
case EXT_CTRL_CODE_PLAY_BGM:
case EXT_CTRL_CODE_PLAY_SE:
textPrinter->printerTemplate.currentChar += 2;
return 2;
case 12:
case EXT_CTRL_CODE_ESCAPE:
char_ = *++textPrinter->printerTemplate.currentChar;
break;
case 13:
case EXT_CTRL_CODE_SHIFT_TEXT:
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++;
return 2;
case 14:
case EXT_CTRL_CODE_SHIFT_DOWN:
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar++;
return 2;
case 15:
case EXT_CTRL_CODE_FILL_WINDOW:
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
return 2;
}
@ -126,10 +126,10 @@ u16 Font6Func(struct TextPrinter *textPrinter)
textPrinter->state = 3;
TextPrinterInitDownArrowCounters(textPrinter);
return 3;
case 0xF9:
case CHAR_EXTRA_SYMBOL:
char_ = *textPrinter->printerTemplate.currentChar++| 0x100;
break;
case 0xF8:
case CHAR_KEYPAD_ICON:
textPrinter->printerTemplate.currentChar++;
return 0;
}