mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 11:14:15 +01:00
Merge pull request #1719 from AsparagusEduardo/pret_cleanBattleScriptCommands
Further cleaning after comparing with pokefirered
This commit is contained in:
commit
5101811407
@ -490,7 +490,7 @@ BattleScript_EffectStatUp::
|
||||
BattleScript_EffectStatUpAfterAtkCanceler::
|
||||
attackstring
|
||||
ppreduce
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_StatUpEnd
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_StatUpEnd
|
||||
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpAttackAnim
|
||||
pause B_WAIT_TIME_SHORT
|
||||
goto BattleScript_StatUpPrintString
|
||||
@ -536,7 +536,7 @@ BattleScript_EffectStatDown::
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
ppreduce
|
||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_StatDownEnd
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_StatDownEnd
|
||||
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_StatDownDoAnim
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY, BattleScript_StatDownEnd
|
||||
pause B_WAIT_TIME_SHORT
|
||||
@ -1492,17 +1492,17 @@ BattleScript_CurseTrySpeed::
|
||||
attackanimation
|
||||
waitanimation
|
||||
setstatchanger STAT_SPEED, 1, TRUE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryAttack
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CurseTryAttack
|
||||
printfromtable gStatDownStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CurseTryAttack::
|
||||
setstatchanger STAT_ATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryDefense
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CurseTryDefense
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CurseTryDefense::
|
||||
setstatchanger STAT_DEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseEnd
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CurseEnd
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CurseEnd::
|
||||
@ -1614,7 +1614,7 @@ BattleScript_EffectSwagger::
|
||||
attackanimation
|
||||
waitanimation
|
||||
setstatchanger STAT_ATK, 2, FALSE
|
||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_SwaggerTryConfuse
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_SwaggerTryConfuse
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SwaggerTryConfuse
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
@ -1813,7 +1813,7 @@ BattleScript_EffectSkullBash::
|
||||
setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SKULL_BASH
|
||||
call BattleScriptFirstChargingTurn
|
||||
setstatchanger STAT_DEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_SkullBashEnd
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_SkullBashEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SkullBashEnd
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
@ -2016,7 +2016,7 @@ BattleScript_EffectDefenseCurl::
|
||||
ppreduce
|
||||
setdefensecurlbit
|
||||
setstatchanger STAT_DEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DefenseCurlDoStatUpAnim
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_DefenseCurlDoStatUpAnim
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpPrintString
|
||||
attackanimation
|
||||
waitanimation
|
||||
@ -2157,7 +2157,7 @@ BattleScript_EffectFlatter::
|
||||
attackanimation
|
||||
waitanimation
|
||||
setstatchanger STAT_SPATK, 1, FALSE
|
||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_FlatterTryConfuse
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_FlatterTryConfuse
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_FlatterTryConfuse
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
@ -2214,7 +2214,7 @@ BattleScript_EffectMemento::
|
||||
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO | STAT_CHANGE_MULTIPLE_STATS
|
||||
playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
|
||||
setstatchanger STAT_ATK, 2, TRUE
|
||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTrySpAtk
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_EffectMementoTrySpAtk
|
||||
@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease
|
||||
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTrySpAtk
|
||||
printfromtable gStatDownStringIds
|
||||
@ -2222,7 +2222,7 @@ BattleScript_EffectMemento::
|
||||
BattleScript_EffectMementoTrySpAtk:
|
||||
playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
|
||||
setstatchanger STAT_SPATK, 2, TRUE
|
||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTryFaint
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_EffectMementoTryFaint
|
||||
@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease
|
||||
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTryFaint
|
||||
printfromtable gStatDownStringIds
|
||||
@ -2662,14 +2662,14 @@ BattleScript_TickleDoMoveAnim::
|
||||
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_DEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS
|
||||
playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE
|
||||
setstatchanger STAT_ATK, 1, TRUE
|
||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TickleTryLowerDef
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TickleTryLowerDef
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleTryLowerDef
|
||||
printfromtable gStatDownStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_TickleTryLowerDef::
|
||||
playstatchangeanimation BS_TARGET, BIT_DEF, STAT_CHANGE_NEGATIVE
|
||||
setstatchanger STAT_DEF, 1, TRUE
|
||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TickleEnd
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TickleEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleEnd
|
||||
printfromtable gStatDownStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -2695,13 +2695,13 @@ BattleScript_CosmicPowerDoMoveAnim::
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, 0
|
||||
setstatchanger STAT_DEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CosmicPowerTrySpDef
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CosmicPowerTrySpDef
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerTrySpDef
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CosmicPowerTrySpDef::
|
||||
setstatchanger STAT_SPDEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CosmicPowerEnd
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CosmicPowerEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerEnd
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -2724,13 +2724,13 @@ BattleScript_BulkUpDoMoveAnim::
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, 0
|
||||
setstatchanger STAT_ATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BulkUpTryDef
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_BulkUpTryDef
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpTryDef
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_BulkUpTryDef::
|
||||
setstatchanger STAT_DEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BulkUpEnd
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_BulkUpEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpEnd
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -2749,13 +2749,13 @@ BattleScript_CalmMindDoMoveAnim::
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0
|
||||
setstatchanger STAT_SPATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CalmMindTrySpDef
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CalmMindTrySpDef
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindTrySpDef
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_CalmMindTrySpDef::
|
||||
setstatchanger STAT_SPDEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CalmMindEnd
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CalmMindEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindEnd
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -2781,13 +2781,13 @@ BattleScript_DragonDanceDoMoveAnim::
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPEED, 0
|
||||
setstatchanger STAT_ATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DragonDanceTrySpeed
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_DragonDanceTrySpeed
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceTrySpeed
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_DragonDanceTrySpeed::
|
||||
setstatchanger STAT_SPEED, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DragonDanceEnd
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_DragonDanceEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceEnd
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -3458,27 +3458,27 @@ BattleScript_AllStatsUpAtk::
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0
|
||||
setstatchanger STAT_ATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpDef
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpDef
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_AllStatsUpDef::
|
||||
setstatchanger STAT_DEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpeed
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpSpeed
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_AllStatsUpSpeed::
|
||||
setstatchanger STAT_SPEED, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpAtk
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpSpAtk
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_AllStatsUpSpAtk::
|
||||
setstatchanger STAT_SPATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpDef
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpSpDef
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_AllStatsUpSpDef::
|
||||
setstatchanger STAT_SPDEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpRet
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpRet
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_AllStatsUpRet::
|
||||
@ -3625,14 +3625,14 @@ 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_AtkDefDown_TryDef
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_ALLOW_PTR, BattleScript_AtkDefDown_TryDef
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_AtkDefDown_TryDef
|
||||
printfromtable gStatDownStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
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_AtkDefDown_End
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_ALLOW_PTR, BattleScript_AtkDefDown_End
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_AtkDefDown_End
|
||||
printfromtable gStatDownStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -3698,7 +3698,7 @@ BattleScript_SAtkDown2::
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_SPATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
|
||||
setstatchanger STAT_SPATK, 2, TRUE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_SAtkDown2End
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_ALLOW_PTR, BattleScript_SAtkDown2End
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_SAtkDown2End
|
||||
printfromtable gStatDownStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -4029,7 +4029,7 @@ BattleScript_IntimidateActivatesLoop:
|
||||
jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented
|
||||
jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented
|
||||
jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented
|
||||
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | STAT_BUFF_ALLOW_PTR, BattleScript_IntimidateActivatesLoopIncrement
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_IntimidateActivatesLoopIncrement
|
||||
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 1, BattleScript_IntimidateActivatesLoopIncrement
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
@ -4408,7 +4408,7 @@ BattleScript_BerryConfuseHealEnd2::
|
||||
|
||||
BattleScript_BerryStatRaiseEnd2::
|
||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BerryStatRaiseDoStatUp
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_BerryStatRaiseDoStatUp
|
||||
BattleScript_BerryStatRaiseDoStatUp::
|
||||
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM
|
||||
call BattleScript_StatUp
|
||||
|
30
gflib/bg.c
30
gflib/bg.c
@ -33,7 +33,7 @@ struct BgConfig2
|
||||
u32 basePalette:4;
|
||||
u32 unk_3:18;
|
||||
|
||||
void* tilemap;
|
||||
void *tilemap;
|
||||
s32 bg_x;
|
||||
s32 bg_y;
|
||||
};
|
||||
@ -183,14 +183,14 @@ u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode)
|
||||
case 0x1:
|
||||
offset = sGpuBgConfigs.configs[bg].charBaseIndex * BG_CHAR_SIZE;
|
||||
offset = destOffset + offset;
|
||||
cursor = RequestDma3Copy(src, (void*)(offset + BG_VRAM), size, 0);
|
||||
cursor = RequestDma3Copy(src, (void *)(offset + BG_VRAM), size, 0);
|
||||
if (cursor == -1)
|
||||
return -1;
|
||||
break;
|
||||
case 0x2:
|
||||
offset = sGpuBgConfigs.configs[bg].mapBaseIndex * BG_SCREEN_SIZE;
|
||||
offset = destOffset + offset;
|
||||
cursor = RequestDma3Copy(src, (void*)(offset + BG_VRAM), size, 0);
|
||||
cursor = RequestDma3Copy(src, (void *)(offset + BG_VRAM), size, 0);
|
||||
if (cursor == -1)
|
||||
return -1;
|
||||
break;
|
||||
@ -372,7 +372,7 @@ void SetBgMode(u8 bgMode)
|
||||
SetBgModeInternal(bgMode);
|
||||
}
|
||||
|
||||
u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset)
|
||||
u16 LoadBgTiles(u8 bg, const void *src, u16 size, u16 destOffset)
|
||||
{
|
||||
u16 tileOffset;
|
||||
u8 cursor;
|
||||
@ -422,7 +422,7 @@ u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset)
|
||||
if (!IsInvalidBg32(bg))
|
||||
{
|
||||
u16 paletteOffset = (sGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2);
|
||||
cursor = RequestDma3Copy(src, (void*)(paletteOffset + BG_PLTT), size, 0);
|
||||
cursor = RequestDma3Copy(src, (void *)(paletteOffset + BG_PLTT), size, 0);
|
||||
|
||||
if (cursor == -1)
|
||||
{
|
||||
@ -863,7 +863,7 @@ void UnsetBgTilemapBuffer(u8 bg)
|
||||
}
|
||||
}
|
||||
|
||||
void* GetBgTilemapBuffer(u8 bg)
|
||||
void *GetBgTilemapBuffer(u8 bg)
|
||||
{
|
||||
if (IsInvalidBg32(bg))
|
||||
return NULL;
|
||||
@ -906,7 +906,7 @@ void CopyBgTilemapBufferToVram(u8 bg)
|
||||
}
|
||||
}
|
||||
|
||||
void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height)
|
||||
void CopyToBgTilemapBufferRect(u8 bg, const void *src, u8 destX, u8 destY, u8 width, u8 height)
|
||||
{
|
||||
u16 destX16;
|
||||
u16 destY16;
|
||||
@ -923,7 +923,7 @@ void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 wi
|
||||
{
|
||||
for (destX16 = destX; destX16 < (destX + width); destX16++)
|
||||
{
|
||||
((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *srcCopy++;
|
||||
((u16 *)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *srcCopy++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -936,7 +936,7 @@ void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 wi
|
||||
{
|
||||
for (destX16 = destX; destX16 < (destX + width); destX16++)
|
||||
{
|
||||
((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *srcCopy++;
|
||||
((u8 *)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *srcCopy++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -984,7 +984,7 @@ void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8
|
||||
{
|
||||
for (j = destX; j < (destX + rectWidth); j++)
|
||||
{
|
||||
*(u8*)(sGpuBgConfigs2[bg].tilemap + ((var * i) + j)) = *(u8*)(srcPtr) + tileOffset;
|
||||
*(u8 *)(sGpuBgConfigs2[bg].tilemap + ((var * i) + j)) = *(u8 *)(srcPtr) + tileOffset;
|
||||
srcPtr++;
|
||||
}
|
||||
srcPtr += (srcWidth - rectWidth);
|
||||
@ -1009,7 +1009,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width,
|
||||
{
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
((u16*)sGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum;
|
||||
((u16 *)sGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1019,7 +1019,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width,
|
||||
{
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
((u8*)sGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum;
|
||||
((u8 *)sGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1052,7 +1052,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
|
||||
{
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
CopyTileMapEntry(&firstTileNum, &((u16*)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0);
|
||||
CopyTileMapEntry(&firstTileNum, &((u16 *)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0);
|
||||
firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK);
|
||||
}
|
||||
}
|
||||
@ -1063,7 +1063,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
|
||||
{
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
((u8*)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum;
|
||||
((u8 *)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum;
|
||||
firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK);
|
||||
}
|
||||
}
|
||||
@ -1240,7 +1240,7 @@ bool32 IsInvalidBg32(u8 bg)
|
||||
|
||||
bool32 IsTileMapOutsideWram(u8 bg)
|
||||
{
|
||||
if (sGpuBgConfigs2[bg].tilemap > (void*)IWRAM_END)
|
||||
if (sGpuBgConfigs2[bg].tilemap > (void *)IWRAM_END)
|
||||
return TRUE;
|
||||
else if (sGpuBgConfigs2[bg].tilemap == NULL)
|
||||
return TRUE;
|
||||
|
@ -62,7 +62,7 @@ void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable);
|
||||
void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates);
|
||||
void InitBgFromTemplate(const struct BgTemplate *template);
|
||||
void SetBgMode(u8 bgMode);
|
||||
u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset);
|
||||
u16 LoadBgTiles(u8 bg, const void *src, u16 size, u16 destOffset);
|
||||
u16 LoadBgTilemap(u8 bg, const void *src, u16 size, u16 destOffset);
|
||||
u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset);
|
||||
bool8 IsDma3ManagerBusyWithBgCopy(void);
|
||||
@ -79,10 +79,10 @@ void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dis
|
||||
u8 Unused_AdjustBgMosaic(u8 val, u8 mode);
|
||||
void SetBgTilemapBuffer(u8 bg, void *tilemap);
|
||||
void UnsetBgTilemapBuffer(u8 bg);
|
||||
void* GetBgTilemapBuffer(u8 bg);
|
||||
void *GetBgTilemapBuffer(u8 bg);
|
||||
void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset);
|
||||
void CopyBgTilemapBufferToVram(u8 bg);
|
||||
void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height);
|
||||
void CopyToBgTilemapBufferRect(u8 bg, const void *src, u8 destX, u8 destY, u8 width, u8 height);
|
||||
void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, const void *src, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette);
|
||||
void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, s16 tileOffset, s16 palette2);
|
||||
void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height);
|
||||
|
@ -94,7 +94,7 @@ static void ApplyAffineAnimFrame(u8 matrixNum, struct AffineAnimFrameCmd *frameC
|
||||
static u8 IndexOfSpriteTileTag(u16 tag);
|
||||
static void AllocSpriteTileRange(u16 tag, u16 start, u16 count);
|
||||
static void DoLoadSpritePalette(const u16 *src, u16 paletteOffset);
|
||||
static void UpdateSpriteMatrixAnchorPos(struct Sprite*, s32, s32);
|
||||
static void UpdateSpriteMatrixAnchorPos(struct Sprite *, s32, s32);
|
||||
|
||||
typedef void (*AnimFunc)(struct Sprite *);
|
||||
typedef void (*AnimCmdFunc)(struct Sprite *);
|
||||
@ -1201,7 +1201,7 @@ u8 GetSpriteMatrixNum(struct Sprite *sprite)
|
||||
|
||||
// Used to shift a sprite's position as it scales.
|
||||
// Only used by the minigame countdown, so that for instance the numbers don't slide up as they squish down before jumping.
|
||||
void SetSpriteMatrixAnchor(struct Sprite* sprite, s16 x, s16 y)
|
||||
void SetSpriteMatrixAnchor(struct Sprite *sprite, s16 x, s16 y)
|
||||
{
|
||||
sprite->sAnchorX = x;
|
||||
sprite->sAnchorY = y;
|
||||
|
@ -282,7 +282,7 @@ void FreeSpritePalette(struct Sprite *sprite);
|
||||
void FreeSpriteOamMatrix(struct Sprite *sprite);
|
||||
void DestroySpriteAndFreeResources(struct Sprite *sprite);
|
||||
void AnimateSprite(struct Sprite *sprite);
|
||||
void SetSpriteMatrixAnchor(struct Sprite* sprite, s16 x, s16 y);
|
||||
void SetSpriteMatrixAnchor(struct Sprite *sprite, s16 x, s16 y);
|
||||
void StartSpriteAnim(struct Sprite *sprite, u8 animNum);
|
||||
void StartSpriteAnimIfDifferent(struct Sprite *sprite, u8 animNum);
|
||||
void SeekSpriteAnim(struct Sprite *sprite, u8 animCmdIndex);
|
||||
|
14
gflib/text.c
14
gflib/text.c
@ -652,7 +652,7 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
|
||||
struct Window *window;
|
||||
struct Bitmap pixels_data;
|
||||
struct TextGlyph *glyph;
|
||||
u8* glyphHeight;
|
||||
u8 *glyphHeight;
|
||||
|
||||
if (sLastTextBgColor != TEXT_COLOR_TRANSPARENT)
|
||||
{
|
||||
@ -1684,7 +1684,7 @@ u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension)
|
||||
|
||||
static void DecompressGlyph_Small(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
const u16 *glyphs;
|
||||
|
||||
if (isJapanese == 1)
|
||||
{
|
||||
@ -1726,7 +1726,7 @@ static u32 GetGlyphWidth_Small(u16 glyphId, bool32 isJapanese)
|
||||
|
||||
static void DecompressGlyph_Narrow(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
const u16 *glyphs;
|
||||
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
@ -1768,7 +1768,7 @@ static u32 GetGlyphWidth_Narrow(u16 glyphId, bool32 isJapanese)
|
||||
|
||||
static void DecompressGlyph_SmallNarrow(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
const u16 *glyphs;
|
||||
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
@ -1810,7 +1810,7 @@ static u32 GetGlyphWidth_SmallNarrow(u16 glyphId, bool32 isJapanese)
|
||||
|
||||
static void DecompressGlyph_Short(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
const u16 *glyphs;
|
||||
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
@ -1854,7 +1854,7 @@ static u32 GetGlyphWidth_Short(u16 glyphId, bool32 isJapanese)
|
||||
|
||||
static void DecompressGlyph_Normal(u16 glyphId, bool32 isJapanese)
|
||||
{
|
||||
const u16* glyphs;
|
||||
const u16 *glyphs;
|
||||
|
||||
if (isJapanese == TRUE)
|
||||
{
|
||||
@ -1896,7 +1896,7 @@ static u32 GetGlyphWidth_Normal(u16 glyphId, bool32 isJapanese)
|
||||
|
||||
static void DecompressGlyph_Bold(u16 glyphId)
|
||||
{
|
||||
const u16* glyphs;
|
||||
const u16 *glyphs;
|
||||
|
||||
glyphs = sFontBoldJapaneseGlyphs + (0x100 * (glyphId >> 4)) + (0x8 * (glyphId & 0xF));
|
||||
DecompressGlyphTile(glyphs, gCurGlyph.gfxBufferTop);
|
||||
|
@ -65,7 +65,7 @@ struct TextPrinterSubStruct
|
||||
|
||||
struct TextPrinterTemplate
|
||||
{
|
||||
const u8* currentChar;
|
||||
const u8 *currentChar;
|
||||
u8 windowId;
|
||||
u8 fontId;
|
||||
u8 x;
|
||||
|
@ -35,7 +35,7 @@ bool16 InitWindows(const struct WindowTemplate *templates)
|
||||
int j;
|
||||
u8 bgLayer;
|
||||
u16 attrib;
|
||||
u8* allocatedTilemapBuffer;
|
||||
u8 *allocatedTilemapBuffer;
|
||||
int allocatedBaseBlock;
|
||||
|
||||
for (i = 0; i < NUM_BACKGROUNDS; ++i)
|
||||
@ -405,7 +405,7 @@ void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u
|
||||
struct Bitmap sourceRect;
|
||||
struct Bitmap destRect;
|
||||
|
||||
sourceRect.pixels = (u8*)pixels;
|
||||
sourceRect.pixels = (u8 *)pixels;
|
||||
sourceRect.width = srcWidth;
|
||||
sourceRect.height = srcHeight;
|
||||
|
||||
@ -421,7 +421,7 @@ static void BlitBitmapRectToWindowWithColorKey(u8 windowId, const u8 *pixels, u1
|
||||
struct Bitmap sourceRect;
|
||||
struct Bitmap destRect;
|
||||
|
||||
sourceRect.pixels = (u8*)pixels;
|
||||
sourceRect.pixels = (u8 *)pixels;
|
||||
sourceRect.width = srcWidth;
|
||||
sourceRect.height = srcHeight;
|
||||
|
||||
@ -463,9 +463,9 @@ void FillWindowPixelBuffer(u8 windowId, u8 fillValue)
|
||||
destOffset = i + (a); \
|
||||
srcOffset = i + (((width * (distanceLoop & ~7)) | (distanceLoop & 7)) * 4); \
|
||||
if (srcOffset < size) \
|
||||
*(u32*)(tileData + destOffset) = *(u32*)(tileData + srcOffset); \
|
||||
*(u32 *)(tileData + destOffset) = *(u32 *)(tileData + srcOffset); \
|
||||
else \
|
||||
*(u32*)(tileData + destOffset) = fillValue32; \
|
||||
*(u32 *)(tileData + destOffset) = fillValue32; \
|
||||
distanceLoop++; \
|
||||
}
|
||||
|
||||
@ -474,9 +474,9 @@ void FillWindowPixelBuffer(u8 windowId, u8 fillValue)
|
||||
destOffset = i + (a); \
|
||||
srcOffset = i + (((width * (distanceLoop & ~7)) | (distanceLoop & 7)) * 4); \
|
||||
if (srcOffset < size) \
|
||||
*(u32*)(tileData - destOffset) = *(u32*)(tileData - srcOffset); \
|
||||
*(u32 *)(tileData - destOffset) = *(u32 *)(tileData - srcOffset); \
|
||||
else \
|
||||
*(u32*)(tileData - destOffset) = fillValue32; \
|
||||
*(u32 *)(tileData - destOffset) = fillValue32; \
|
||||
distanceLoop++; \
|
||||
}
|
||||
|
||||
@ -550,7 +550,7 @@ bool8 SetWindowAttribute(u8 windowId, u8 attributeId, u32 value)
|
||||
gWindows[windowId].window.baseBlock = value;
|
||||
return FALSE;
|
||||
case WINDOW_TILE_DATA:
|
||||
gWindows[windowId].tileData = (u8*)(value);
|
||||
gWindows[windowId].tileData = (u8 *)(value);
|
||||
return TRUE;
|
||||
case WINDOW_BG:
|
||||
case WINDOW_WIDTH:
|
||||
@ -605,7 +605,7 @@ static void DummyWindowBgTilemap8Bit(void)
|
||||
u16 AddWindow8Bit(const struct WindowTemplate *template)
|
||||
{
|
||||
u16 windowId;
|
||||
u8* memAddress;
|
||||
u8 *memAddress;
|
||||
u8 bgLayer;
|
||||
|
||||
for (windowId = 0; windowId < WINDOWS_MAX; windowId++)
|
||||
@ -675,7 +675,7 @@ void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u
|
||||
struct Bitmap sourceRect;
|
||||
struct Bitmap destRect;
|
||||
|
||||
sourceRect.pixels = (u8*) pixels;
|
||||
sourceRect.pixels = (u8 *) pixels;
|
||||
sourceRect.width = srcWidth;
|
||||
sourceRect.height = srcHeight;
|
||||
|
||||
|
@ -73,7 +73,7 @@ void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u
|
||||
void CopyWindowToVram8Bit(u8 windowId, u8 mode);
|
||||
|
||||
extern struct Window gWindows[];
|
||||
extern void* gWindowBgTilemapBuffers[];
|
||||
extern void *gWindowBgTilemapBuffers[];
|
||||
extern u32 gUnusedWindowVar1;
|
||||
extern u32 gUnusedWindowVar2;
|
||||
extern u32 gUnusedWindowVar3;
|
||||
|
@ -588,10 +588,10 @@ struct BattleSpriteData
|
||||
|
||||
struct MonSpritesGfx
|
||||
{
|
||||
void* firstDecompressed; // ptr to the decompressed sprite of the first pokemon
|
||||
void *firstDecompressed; // ptr to the decompressed sprite of the first pokemon
|
||||
union {
|
||||
void* ptr[MAX_BATTLERS_COUNT];
|
||||
u8* byte[MAX_BATTLERS_COUNT];
|
||||
void *ptr[MAX_BATTLERS_COUNT];
|
||||
u8 *byte[MAX_BATTLERS_COUNT];
|
||||
} sprites;
|
||||
struct SpriteTemplate templates[MAX_BATTLERS_COUNT];
|
||||
struct SpriteFrameImage frameImages[MAX_BATTLERS_COUNT][4];
|
||||
|
@ -108,8 +108,8 @@ u8 GetBattlerSpriteBGPriority(u8 battlerId);
|
||||
void *LoadPointerFromVars(s16 bottom, s16 top);
|
||||
void StorePointerInVars(s16 *bottom, s16 *top, const void *ptr);
|
||||
void InitPrioritiesForVisibleBattlers(void);
|
||||
void GetBattleAnimBg1Data(struct BattleAnimBgData*);
|
||||
void GetBattleAnimBgData(struct BattleAnimBgData*, u32 bgId);
|
||||
void GetBattleAnimBg1Data(struct BattleAnimBgData *);
|
||||
void GetBattleAnimBgData(struct BattleAnimBgData *, u32 bgId);
|
||||
u8 GetBattlerSpriteSubpriority(u8 battlerId);
|
||||
bool8 TranslateAnimHorizontalArc(struct Sprite *sprite);
|
||||
void TranslateSpriteLinearByIdFixedPoint(struct Sprite *sprite);
|
||||
@ -122,10 +122,10 @@ u32 GetBattlePalettesMask(bool8 battleBackground, bool8 attacker, bool8 target,
|
||||
u32 GetBattleMonSpritePalettesMask(u8 playerLeft, u8 playerRight, u8 opponentLeft, u8 opponentRight);
|
||||
u8 AnimDummyReturnArg(u8 battler);
|
||||
s16 CloneBattlerSpriteWithBlend(u8);
|
||||
void DestroySpriteWithActiveSheet(struct Sprite*);
|
||||
void DestroySpriteWithActiveSheet(struct Sprite *);
|
||||
u8 CreateInvisibleSpriteCopy(int, u8, int);
|
||||
void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData*, const void*, bool32);
|
||||
void AnimLoadCompressedBgGfx(u32, const u32*, u32);
|
||||
void AnimLoadCompressedBgTilemapHandleContest(struct BattleAnimBgData *, const void *, bool32);
|
||||
void AnimLoadCompressedBgGfx(u32, const u32 *, u32);
|
||||
void UpdateAnimBg3ScreenSize(bool8);
|
||||
void TranslateSpriteInGrowingCircle(struct Sprite *);
|
||||
void SetBattlerSpriteYOffsetFromYScale(u8 spriteId);
|
||||
@ -186,7 +186,7 @@ u8 GetAnimBattlerSpriteId(u8 wantedBattler);
|
||||
bool8 IsDoubleBattle(void);
|
||||
u8 GetBattleBgPaletteNum(void);
|
||||
u8 GetBattlerSpriteBGPriorityRank(u8 battlerId);
|
||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite*));
|
||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*spriteCallback)(struct Sprite *));
|
||||
void SetSpritePrimaryCoordsFromSecondaryCoords(struct Sprite *sprite);
|
||||
u8 GetBattlerSpriteDefault_Y(u8 battlerId);
|
||||
u8 GetSubstituteSpriteDefault_Y(u8 battlerId);
|
||||
@ -216,8 +216,8 @@ void InitStatsChangeAnimation(u8);
|
||||
void StartMonScrollingBgMask(u8 taskId, int unused, u16 scrollSpeed, u8 battler, bool8 includePartner, u8 numFadeSteps, u8 fadeStepDelay, u8 duration, const u32 *gfx, const u32 *tilemap, const u32 *palette);
|
||||
|
||||
// battle_anim_effects_1.c
|
||||
void SetSpriteNextToMonHead(u8 battler, struct Sprite* sprite);
|
||||
void AnimMoveTwisterParticle(struct Sprite* sprite);
|
||||
void SetSpriteNextToMonHead(u8 battler, struct Sprite *sprite);
|
||||
void AnimMoveTwisterParticle(struct Sprite *sprite);
|
||||
void AnimParticleBurst(struct Sprite *);
|
||||
|
||||
// battle_anim_water.c
|
||||
|
@ -92,7 +92,7 @@ enum {
|
||||
LINK_STANDBY_MSG_ONLY,
|
||||
};
|
||||
|
||||
#define INSTANT_HP_BAR_DROP 32767
|
||||
#define INSTANT_HP_BAR_DROP 0x7FFF
|
||||
|
||||
#define PARTY_SUMM_SKIP_DRAW_DELAY (1 << 7)
|
||||
|
||||
@ -222,8 +222,8 @@ void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringId);
|
||||
void BtlController_EmitChooseAction(u8 bufferId, u8 action, u16 itemId);
|
||||
void BtlController_EmitYesNoBox(u8 bufferId);
|
||||
void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
|
||||
void BtlController_EmitChooseItem(u8 bufferId, u8* battlePartyOrder);
|
||||
void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8* data);
|
||||
void BtlController_EmitChooseItem(u8 bufferId, u8 *battlePartyOrder);
|
||||
void BtlController_EmitChoosePokemon(u8 bufferId, u8 caseId, u8 slotId, u8 abilityId, u8 *data);
|
||||
void BtlController_EmitCmd23(u8 bufferId); // unused
|
||||
void BtlController_EmitHealthBarUpdate(u8 bufferId, u16 hpValue);
|
||||
void BtlController_EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints);
|
||||
|
@ -211,18 +211,18 @@ struct BattleMsgData
|
||||
};
|
||||
|
||||
void BufferStringBattle(u16 stringID);
|
||||
u32 BattleStringExpandPlaceholdersToDisplayedString(const u8* src);
|
||||
u32 BattleStringExpandPlaceholders(const u8* src, u8* dst);
|
||||
void BattlePutTextOnWindow(const u8* text, u8 windowId);
|
||||
u32 BattleStringExpandPlaceholdersToDisplayedString(const u8 *src);
|
||||
u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst);
|
||||
void BattlePutTextOnWindow(const u8 *text, u8 windowId);
|
||||
void SetPpNumbersPaletteInMoveSelection(void);
|
||||
u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp);
|
||||
|
||||
extern struct BattleMsgData *gBattleMsgDataPtr;
|
||||
|
||||
extern const u8* const gBattleStringsTable[];
|
||||
extern const u8* const gStatNamesTable[];
|
||||
extern const u8* const gPokeblockWasTooXStringTable[];
|
||||
extern const u8* const gRefereeStringsTable[];
|
||||
extern const u8 *const gBattleStringsTable[];
|
||||
extern const u8 *const gStatNamesTable[];
|
||||
extern const u8 *const gPokeblockWasTooXStringTable[];
|
||||
extern const u8 *const gRefereeStringsTable[];
|
||||
extern const u8 *const gRoundsStringTable[];
|
||||
|
||||
extern const u8 gText_PkmnIsEvolving[];
|
||||
|
@ -73,7 +73,7 @@ void PrepareStringBattle(u16 stringId, u8 battlerId);
|
||||
void ResetSentPokesToOpponentValue(void);
|
||||
void OpponentSwitchInResetSentPokesToOpponentValue(u8 battlerId);
|
||||
void UpdateSentPokesToOpponentValue(u8 battlerId);
|
||||
void BattleScriptPush(const u8* bsPtr);
|
||||
void BattleScriptPush(const u8 *bsPtr);
|
||||
void BattleScriptPushCursor(void);
|
||||
void BattleScriptPop(void);
|
||||
u8 TrySetCantSelectMoveBattleScript(void);
|
||||
@ -89,8 +89,8 @@ u8 AtkCanceller_UnableToUseMove(void);
|
||||
bool8 HasNoMonsToSwitch(u8 battlerId, u8 r1, u8 r2);
|
||||
u8 CastformDataTypeChange(u8 battlerId);
|
||||
u8 AbilityBattleEffects(u8 caseID, u8 battlerId, u8 ability, u8 special, u16 moveArg);
|
||||
void BattleScriptExecute(const u8* BS_ptr);
|
||||
void BattleScriptPushCursorAndCallback(const u8* BS_ptr);
|
||||
void BattleScriptExecute(const u8 *BS_ptr);
|
||||
void BattleScriptPushCursorAndCallback(const u8 *BS_ptr);
|
||||
u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn);
|
||||
void ClearFuryCutterDestinyBondGrudge(u8 battlerId);
|
||||
void HandleAction_RunBattleScript(void);
|
||||
|
@ -53,17 +53,17 @@
|
||||
#define BATTLE_TYPE_MULTI (1 << 6)
|
||||
#define BATTLE_TYPE_SAFARI (1 << 7)
|
||||
#define BATTLE_TYPE_BATTLE_TOWER (1 << 8)
|
||||
#define BATTLE_TYPE_WALLY_TUTORIAL (1 << 9)
|
||||
#define BATTLE_TYPE_WALLY_TUTORIAL (1 << 9) // Used in pokefirered as BATTLE_TYPE_OLD_MAN_TUTORIAL.
|
||||
#define BATTLE_TYPE_ROAMER (1 << 10)
|
||||
#define BATTLE_TYPE_EREADER_TRAINER (1 << 11)
|
||||
#define BATTLE_TYPE_KYOGRE_GROUDON (1 << 12)
|
||||
#define BATTLE_TYPE_LEGENDARY (1 << 13)
|
||||
#define BATTLE_TYPE_REGI (1 << 14)
|
||||
#define BATTLE_TYPE_TWO_OPPONENTS (1 << 15)
|
||||
#define BATTLE_TYPE_DOME (1 << 16)
|
||||
#define BATTLE_TYPE_PALACE (1 << 17)
|
||||
#define BATTLE_TYPE_ARENA (1 << 18)
|
||||
#define BATTLE_TYPE_FACTORY (1 << 19)
|
||||
#define BATTLE_TYPE_TWO_OPPONENTS (1 << 15) // Used in pokefirered as BATTLE_TYPE_GHOST.
|
||||
#define BATTLE_TYPE_DOME (1 << 16) // Used in pokefirered as BATTLE_TYPE_POKEDUDE.
|
||||
#define BATTLE_TYPE_PALACE (1 << 17) // Used in pokefirered as BATTLE_TYPE_WILD_SCRIPTED.
|
||||
#define BATTLE_TYPE_ARENA (1 << 18) // Used in pokefirered as BATTLE_TYPE_LEGENDARY_FRLG.
|
||||
#define BATTLE_TYPE_FACTORY (1 << 19) // Used in pokefirered as BATTLE_TYPE_TRAINER_TOWER.
|
||||
#define BATTLE_TYPE_PIKE (1 << 20)
|
||||
#define BATTLE_TYPE_PYRAMID (1 << 21)
|
||||
#define BATTLE_TYPE_INGAME_PARTNER (1 << 22)
|
||||
|
@ -53,15 +53,15 @@
|
||||
#define BS_EFFECT_BATTLER 2
|
||||
#define BS_FAINTED 3
|
||||
#define BS_ATTACKER_WITH_PARTNER 4 // for Cmd_updatestatusicon
|
||||
#define BS_FAINTED_LINK_MULTIPLE_1 5
|
||||
#define BS_FAINTED_LINK_MULTIPLE_2 6
|
||||
#define BS_FAINTED_LINK_MULTIPLE_1 5 // for openpartyscreen
|
||||
#define BS_FAINTED_LINK_MULTIPLE_2 6 // for openpartyscreen
|
||||
#define BS_BATTLER_0 7
|
||||
#define BS_ATTACKER_SIDE 8 // for Cmd_jumpifability
|
||||
#define BS_NOT_ATTACKER_SIDE 9 // for Cmd_jumpifability
|
||||
#define BS_SCRIPTING 10
|
||||
#define BS_PLAYER1 11
|
||||
#define BS_OPPONENT1 12
|
||||
#define BS_PLAYER2 13
|
||||
#define BS_PLAYER2 13 // for Cmd_updatestatusicon
|
||||
#define BS_OPPONENT2 14
|
||||
|
||||
// Cmd_accuracycheck
|
||||
@ -115,8 +115,8 @@
|
||||
#define SWITCH_IGNORE_ESCAPE_PREVENTION (1 << 7)
|
||||
|
||||
// Cmd_statbuffchange
|
||||
#define STAT_BUFF_ALLOW_PTR (1 << 0) // If set, allow use of jumpptr. Set in every use of statbuffchange
|
||||
#define STAT_BUFF_NOT_PROTECT_AFFECTED (1 << 5)
|
||||
#define STAT_CHANGE_ALLOW_PTR (1 << 0) // If set, allow use of jumpptr. Set in every use of statbuffchange
|
||||
#define STAT_CHANGE_NOT_PROTECT_AFFECTED (1 << 5)
|
||||
|
||||
// stat change flags for Cmd_playstatchangeanimation
|
||||
#define STAT_CHANGE_NEGATIVE (1 << 0)
|
||||
|
@ -10,15 +10,15 @@ void LZDecompressVram(const u32 *src, void *dest);
|
||||
|
||||
u16 LoadCompressedSpriteSheet(const struct CompressedSpriteSheet *src);
|
||||
void LoadCompressedSpriteSheetOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer);
|
||||
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src);
|
||||
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet *src);
|
||||
|
||||
void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src);
|
||||
void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePalette *src, void *buffer);
|
||||
bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette *src);
|
||||
|
||||
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species);
|
||||
void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void* buffer, s32 species);
|
||||
void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void* buffer, s32 species);
|
||||
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffer, s32 species);
|
||||
void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void *buffer, s32 species);
|
||||
void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *buffer, s32 species);
|
||||
|
||||
void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality);
|
||||
void HandleLoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality);
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef GUARD_EVOLUTION_SCENE_H
|
||||
#define GUARD_EVOLUTION_SCENE_H
|
||||
|
||||
void BeginEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
|
||||
void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
|
||||
void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpriteID, u8 partyID);
|
||||
void BeginEvolutionScene(struct Pokemon *mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
|
||||
void EvolutionScene(struct Pokemon *mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID);
|
||||
void TradeEvolutionScene(struct Pokemon *mon, u16 speciesToEvolve, u8 preEvoSpriteID, u8 partyID);
|
||||
|
||||
extern void (*gCB2_AfterEvolution)(void);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define GUARD_FARAWAY_ISLAND_H
|
||||
|
||||
u32 GetMewMoveDirection(void);
|
||||
bool8 ShouldMewShakeGrass(struct ObjectEvent*);
|
||||
bool8 ShouldMewShakeGrass(struct ObjectEvent *);
|
||||
void UpdateFarawayIslandStepCounter(void);
|
||||
bool8 ObjectEventIsFarawayIslandMew(struct ObjectEvent *);
|
||||
bool8 IsMewPlayingHideAndSeek(void);
|
||||
|
@ -39,8 +39,8 @@ void StartEscalatorWarp(u8 metatileBehavior, u8 priority);
|
||||
void StartLavaridgeGymB1FWarp(u8 priority);
|
||||
void StartLavaridgeGym1FWarp(u8 priority);
|
||||
|
||||
void SpriteCB_AshPuff(struct Sprite*);
|
||||
void SpriteCB_AshLaunch(struct Sprite*);
|
||||
void SpriteCB_AshPuff(struct Sprite *);
|
||||
void SpriteCB_AshLaunch(struct Sprite *);
|
||||
|
||||
void MultiplyPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b);
|
||||
void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId);
|
||||
|
@ -20,25 +20,25 @@ void SetSurfBlob_PlayerOffset(u8 spriteId, bool8 hasOffset, s16 offset);
|
||||
bool8 UpdateRevealDisguise(struct ObjectEvent *);
|
||||
void StartRevealDisguise(struct ObjectEvent *);
|
||||
void StartAshFieldEffect(s16, s16, u16, s16);
|
||||
void SetUpReflection(struct ObjectEvent*, struct Sprite*, u8);
|
||||
u32 StartFieldEffectForObjectEvent(u8, struct ObjectEvent*);
|
||||
void SetUpReflection(struct ObjectEvent *, struct Sprite *, u8);
|
||||
u32 StartFieldEffectForObjectEvent(u8, struct ObjectEvent *);
|
||||
u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y);
|
||||
void UpdateRayquazaSpotlightEffect(struct Sprite*);
|
||||
void UpdateShadowFieldEffect(struct Sprite*);
|
||||
void UpdateTallGrassFieldEffect(struct Sprite*);
|
||||
void WaitFieldEffectSpriteAnim(struct Sprite*);
|
||||
void UpdateAshFieldEffect(struct Sprite*);
|
||||
void UpdateSurfBlobFieldEffect(struct Sprite*);
|
||||
void UpdateJumpImpactEffect(struct Sprite*);
|
||||
void UpdateFootprintsTireTracksFieldEffect(struct Sprite*);
|
||||
void UpdateSplashFieldEffect(struct Sprite*);
|
||||
void UpdateLongGrassFieldEffect(struct Sprite*);
|
||||
void UpdateSandPileFieldEffect(struct Sprite*);
|
||||
void UpdateDisguiseFieldEffect(struct Sprite*);
|
||||
void UpdateShortGrassFieldEffect(struct Sprite*);
|
||||
void UpdateHotSpringsWaterFieldEffect(struct Sprite*);
|
||||
void UpdateBubblesFieldEffect(struct Sprite*);
|
||||
void UpdateSparkleFieldEffect(struct Sprite*);
|
||||
void UpdateRayquazaSpotlightEffect(struct Sprite *);
|
||||
void UpdateShadowFieldEffect(struct Sprite *);
|
||||
void UpdateTallGrassFieldEffect(struct Sprite *);
|
||||
void WaitFieldEffectSpriteAnim(struct Sprite *);
|
||||
void UpdateAshFieldEffect(struct Sprite *);
|
||||
void UpdateSurfBlobFieldEffect(struct Sprite *);
|
||||
void UpdateJumpImpactEffect(struct Sprite *);
|
||||
void UpdateFootprintsTireTracksFieldEffect(struct Sprite *);
|
||||
void UpdateSplashFieldEffect(struct Sprite *);
|
||||
void UpdateLongGrassFieldEffect(struct Sprite *);
|
||||
void UpdateSandPileFieldEffect(struct Sprite *);
|
||||
void UpdateDisguiseFieldEffect(struct Sprite *);
|
||||
void UpdateShortGrassFieldEffect(struct Sprite *);
|
||||
void UpdateHotSpringsWaterFieldEffect(struct Sprite *);
|
||||
void UpdateBubblesFieldEffect(struct Sprite *);
|
||||
void UpdateSparkleFieldEffect(struct Sprite *);
|
||||
void SetSpriteInvisible(u8 spriteId);
|
||||
void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y);
|
||||
|
||||
|
@ -25,7 +25,7 @@ u32 MapGridGetMetatileIdAt(int, int);
|
||||
u32 MapGridGetMetatileBehaviorAt(int, int);
|
||||
void MapGridSetMetatileIdAt(int, int, u16);
|
||||
void MapGridSetMetatileEntryAt(int, int, u16);
|
||||
void GetCameraCoords(u16*, u16*);
|
||||
void GetCameraCoords(u16 *, u16 *);
|
||||
bool8 MapGridIsImpassableAt(int, int);
|
||||
int GetMapBorderIdAt(int x, int y);
|
||||
bool32 CanCameraMoveInDirection(int direction);
|
||||
|
@ -23,14 +23,14 @@ void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopP
|
||||
#ifdef NDEBUG
|
||||
#define AGB_ASSERT(exp)
|
||||
#else
|
||||
#define AGB_ASSERT(exp) (exp) ? ((void*)0) : AGBAssert(__FILE__, __LINE__, #exp, 1);
|
||||
#define AGB_ASSERT(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 1);
|
||||
#endif
|
||||
|
||||
#undef AGB_WARNING
|
||||
#ifdef NDEBUG
|
||||
#define AGB_WARNING(exp)
|
||||
#else
|
||||
#define AGB_WARNING(exp) (exp) ? ((void*)0) : AGBAssert(__FILE__, __LINE__, #exp, 0);
|
||||
#define AGB_WARNING(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 0);
|
||||
#endif
|
||||
|
||||
// for matching purposes
|
||||
@ -38,13 +38,13 @@ void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopP
|
||||
#ifdef NDEBUG
|
||||
#define AGB_ASSERT_EX(exp, file, line)
|
||||
#else
|
||||
#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void*)0) : AGBAssert(file, line, #exp, 1);
|
||||
#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 1);
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define AGB_WARNING_EX(exp, file, line)
|
||||
#else
|
||||
#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void*)0) : AGBAssert(file, line, #exp, 0);
|
||||
#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 0);
|
||||
#endif
|
||||
|
||||
#endif // GUARD_GBA_ISAGBPRINT_H
|
||||
|
@ -102,13 +102,13 @@
|
||||
#define T1_READ_8(ptr) ((ptr)[0])
|
||||
#define T1_READ_16(ptr) ((ptr)[0] | ((ptr)[1] << 8))
|
||||
#define T1_READ_32(ptr) ((ptr)[0] | ((ptr)[1] << 8) | ((ptr)[2] << 16) | ((ptr)[3] << 24))
|
||||
#define T1_READ_PTR(ptr) (u8*) T1_READ_32(ptr)
|
||||
#define T1_READ_PTR(ptr) (u8 *) T1_READ_32(ptr)
|
||||
|
||||
// T2_READ_8 is a duplicate to remain consistent with each group.
|
||||
#define T2_READ_8(ptr) ((ptr)[0])
|
||||
#define T2_READ_16(ptr) ((ptr)[0] + ((ptr)[1] << 8))
|
||||
#define T2_READ_32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24))
|
||||
#define T2_READ_PTR(ptr) (void*) T2_READ_32(ptr)
|
||||
#define T2_READ_PTR(ptr) (void *) T2_READ_32(ptr)
|
||||
|
||||
// Macros for checking the joypad
|
||||
#define TEST_BUTTON(field, button) ((field) & (button))
|
||||
|
@ -11,7 +11,7 @@ int GetStringRightAlignXOffset(int fontId, const u8 *str, int totalWidth);
|
||||
int GetStringCenterAlignXOffsetWithLetterSpacing(int fontId, const u8 *str, int totalWidth, int letterSpacing);
|
||||
int GetStringWidthDifference(int fontId, const u8 *str, int totalWidth, int letterSpacing);
|
||||
int GetMaxWidthInMenuTable(const struct MenuAction *actions, int numActions);
|
||||
int GetMaxWidthInSubsetOfMenuTable(const struct MenuAction *actions, const u8* actionIds, int numActions);
|
||||
int GetMaxWidthInSubsetOfMenuTable(const struct MenuAction *actions, const u8 *actionIds, int numActions);
|
||||
int Intl_GetListMenuWidth(const struct ListMenuTemplate *listMenu);
|
||||
void CopyMonCategoryText(int dexNum, u8 *dest);
|
||||
u8 *GetStringClearToWidth(u8 *dest, int fontId, const u8 *str, int totalStringWidth);
|
||||
|
@ -71,7 +71,7 @@ struct BagMenu
|
||||
u8 unused1[2];
|
||||
u8 pocketScrollArrowsTask;
|
||||
u8 pocketSwitchArrowsTask;
|
||||
const u8* contextMenuItemsPtr;
|
||||
const u8 *contextMenuItemsPtr;
|
||||
u8 contextMenuItemsBuffer[4];
|
||||
u8 contextMenuNumItems;
|
||||
u8 numItemStacks[POCKETS_COUNT];
|
||||
|
@ -50,7 +50,7 @@ void LoadMessageBoxAndBorderGfx(void);
|
||||
void DrawDialogueFrame(u8 windowId, bool8 copyToVram);
|
||||
void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram);
|
||||
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
|
||||
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
|
||||
void PrintPlayerNameOnWindow(u8, const u8 *, u16, u16);
|
||||
void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram);
|
||||
void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram);
|
||||
void DisplayYesNoMenuDefaultYes(void);
|
||||
@ -61,7 +61,7 @@ void AddTextPrinterWithCallbackForMessage(bool8 canSpeedUp, void (*callback)(str
|
||||
void BgDmaFill(u32 bg, u8 value, int offset, int size);
|
||||
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
|
||||
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
|
||||
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
|
||||
void SetWindowTemplateFields(struct WindowTemplate *template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
|
||||
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
|
||||
void ScheduleBgCopyTilemapToVram(u8 bgNum);
|
||||
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
|
||||
|
@ -1,11 +1,11 @@
|
||||
#ifndef GUARD_MONEY_H
|
||||
#define GUARD_MONEY_H
|
||||
|
||||
u32 GetMoney(u32* moneyPtr);
|
||||
void SetMoney(u32* moneyPtr, u32 newValue);
|
||||
bool8 IsEnoughMoney(u32* moneyPtr, u32 cost);
|
||||
void AddMoney(u32* moneyPtr, u32 toAdd);
|
||||
void RemoveMoney(u32* moneyPtr, u32 toSub);
|
||||
u32 GetMoney(u32 *moneyPtr);
|
||||
void SetMoney(u32 *moneyPtr, u32 newValue);
|
||||
bool8 IsEnoughMoney(u32 *moneyPtr, u32 cost);
|
||||
void AddMoney(u32 *moneyPtr, u32 toAdd);
|
||||
void RemoveMoney(u32 *moneyPtr, u32 toSub);
|
||||
bool8 IsEnoughForCostInVar0x8005(void);
|
||||
void SubtractMoneyFromVar0x8005(void);
|
||||
void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, u8 speed);
|
||||
|
@ -36,8 +36,8 @@ bool8 IsMultiBattle(void);
|
||||
u8 GetCursorSelectionMonId(void);
|
||||
u8 GetPartyMenuType(void);
|
||||
void Task_HandleChooseMonInput(u8 taskId);
|
||||
u8* GetMonNickname(struct Pokemon *mon, u8 *dest);
|
||||
u8 DisplayPartyMenuMessage(const u8* str, bool8 keepOpen);
|
||||
u8 *GetMonNickname(struct Pokemon *mon, u8 *dest);
|
||||
u8 DisplayPartyMenuMessage(const u8 *str, bool8 keepOpen);
|
||||
bool8 IsPartyMenuTextPrinterActive(void);
|
||||
void PartyMenuModifyHP(u8 taskId, u8 slot, s8 hpIncrement, s16 HPDifference, TaskFunc task);
|
||||
u8 GetAilmentFromStatus(u32 status);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#ifndef GUARD_POKEDEX_AREA_SCREEN_H
|
||||
#define GUARD_POKEDEX_AREA_SCREEN_H
|
||||
|
||||
void ShowPokedexAreaScreen(u16, u8*);
|
||||
void ShowPokedexAreaScreen(u16, u8 *);
|
||||
|
||||
#endif // GUARD_POKEDEX_AREA_SCREEN_H
|
||||
|
@ -12,10 +12,10 @@ struct CryScreenWindow
|
||||
|
||||
extern u8 gDexCryScreenState;
|
||||
|
||||
bool8 LoadCryWaveformWindow(struct CryScreenWindow*, u8);
|
||||
bool8 LoadCryWaveformWindow(struct CryScreenWindow *, u8);
|
||||
void UpdateCryWaveformWindow(u8);
|
||||
void CryScreenPlayButton(u16);
|
||||
bool8 LoadCryMeter(struct CryScreenWindow*, u8);
|
||||
bool8 LoadCryMeter(struct CryScreenWindow *, u8);
|
||||
void FreeCryScreen(void);
|
||||
|
||||
#endif
|
||||
|
@ -426,11 +426,11 @@ void SetWildMonHeldItem(void);
|
||||
bool8 IsMonShiny(struct Pokemon *mon);
|
||||
bool8 IsShinyOtIdPersonality(u32 otId, u32 personality);
|
||||
const u8 *GetTrainerPartnerName(void);
|
||||
void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 panMode);
|
||||
void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 panModeAnimFlag);
|
||||
void PokemonSummaryDoMonAnimation(struct Sprite* sprite, u16 species, bool8 oneFrame);
|
||||
void BattleAnimateFrontSprite(struct Sprite *sprite, u16 species, bool8 noCry, u8 panMode);
|
||||
void DoMonFrontSpriteAnimation(struct Sprite *sprite, u16 species, bool8 noCry, u8 panModeAnimFlag);
|
||||
void PokemonSummaryDoMonAnimation(struct Sprite *sprite, u16 species, bool8 oneFrame);
|
||||
void StopPokemonAnimationDelayTask(void);
|
||||
void BattleAnimateBackSprite(struct Sprite* sprite, u16 species);
|
||||
void BattleAnimateBackSprite(struct Sprite *sprite, u16 species);
|
||||
u8 GetOpposingLinkMultiBattlerId(bool8 rightSide, u8 multiplayerId);
|
||||
u16 FacilityClassToPicIndex(u16 facilityClass);
|
||||
u16 PlayerGenderToFrontTrainerPicId(u8 playerGender);
|
||||
|
@ -104,8 +104,8 @@ bool8 WriteSaveBlock2(void);
|
||||
bool8 WriteSaveBlock1Sector(void);
|
||||
u8 LoadGameSave(u8 saveType);
|
||||
u16 GetSaveBlocksPointersBaseOffset(void);
|
||||
u32 TryReadSpecialSaveSector(u8 sector, u8* dst);
|
||||
u32 TryWriteSpecialSaveSector(u8 sector, u8* src);
|
||||
u32 TryReadSpecialSaveSector(u8 sector, u8 *dst);
|
||||
u32 TryWriteSpecialSaveSector(u8 sector, u8 *src);
|
||||
void Task_LinkFullSave(u8 taskId);
|
||||
|
||||
// save_failed_screen.c
|
||||
|
@ -12,7 +12,7 @@ bool8 (*ScriptMenu_HidePokemonPic(void))(void);
|
||||
int ConvertPixelWidthToTileWidth(int width);
|
||||
u8 CreateWindowFromRect(u8 x, u8 y, u8 width, u8 height);
|
||||
void ClearToTransparentAndRemoveWindow(u8 windowId);
|
||||
int DisplayTextAndGetWidth(const u8* str, int width);
|
||||
int DisplayTextAndGetWidth(const u8 *str, int width);
|
||||
int ScriptMenu_AdjustLeftCoordFromWidth(int left, int width);
|
||||
bool16 ScriptMenu_CreatePCMultichoice(void);
|
||||
void ScriptMenu_DisplayPCStartupPrompt(void);
|
||||
|
@ -12,7 +12,6 @@ void StopMapMusic(void);
|
||||
void FadeOutMapMusic(u8 speed);
|
||||
void FadeOutAndPlayNewMapMusic(u16 songNum, u8 speed);
|
||||
void FadeOutAndFadeInNewMapMusic(u16 songNum, u8 fadeOutSpeed, u8 fadeInSpeed);
|
||||
void FadeInNewMapMusic(u16 songNum, u8 speed);
|
||||
bool8 IsNotWaitingForBGMStop(void);
|
||||
void PlayFanfareByFanfareNum(u8 fanfareNum);
|
||||
bool8 WaitFanfare(bool8 stop);
|
||||
|
@ -11,6 +11,6 @@ void SaveGame(void);
|
||||
void CB2_SetUpSaveAfterLinkBattle(void);
|
||||
void SaveForBattleTowerLink(void);
|
||||
void HideStartMenu(void);
|
||||
void AppendToList(u8* list, u8* pos, u8 newEntry);
|
||||
void AppendToList(u8 *list, u8 *pos, u8 newEntry);
|
||||
|
||||
#endif // GUARD_START_MENU_H
|
||||
|
@ -14,10 +14,10 @@ void CB2_StartCreateTradeMenu(void);
|
||||
void CB2_LinkTrade(void);
|
||||
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal);
|
||||
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal);
|
||||
int CanSpinTradeMon(struct Pokemon*, u16);
|
||||
int CanSpinTradeMon(struct Pokemon *, u16);
|
||||
void InitTradeSequenceBgGpuRegs(void);
|
||||
void LinkTradeDrawWindow(void);
|
||||
void InitTradeBg(void);
|
||||
void LoadTradeAnimGfx(void);
|
||||
void DrawTextOnTradeWindow(u8, const u8 *, u8);
|
||||
|
||||
#endif //GUARD_TRADE_H
|
||||
|
@ -12,7 +12,7 @@ void LoadWordFromTwoHalfwords(u16 *, u32 *);
|
||||
int CountTrailingZeroBits(u32 value);
|
||||
u16 CalcCRC16(const u8 *data, s32 length);
|
||||
u16 CalcCRC16WithTable(const u8 *data, u32 length);
|
||||
u32 CalcByteArraySum(const u8* data, u32 length);
|
||||
u32 CalcByteArraySum(const u8 *data, u32 length);
|
||||
void BlendPalette(u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor);
|
||||
void DoBgAffineSet(struct BgAffineDstData *dest, u32 texX, u32 texY, s16 scrX, s16 scrY, s16 sx, s16 sy, u16 alpha);
|
||||
void CopySpriteTiles(u8 shape, u8 size, u8 *tiles, u16 *tilemap, u8 *output);
|
||||
|
@ -1289,7 +1289,7 @@ static void Task_ExecuteFuncAfterButtonPress(u8 taskId)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON))
|
||||
{
|
||||
gApprenticeFunc = (void*)(u32)(((u16)gTasks[taskId].data[0] | (gTasks[taskId].data[1] << 16)));
|
||||
gApprenticeFunc = (void *)(u32)(((u16)gTasks[taskId].data[0] | (gTasks[taskId].data[1] << 16)));
|
||||
gApprenticeFunc();
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
|
@ -676,13 +676,13 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
||||
|
||||
if (IsContest() == TRUE)
|
||||
{
|
||||
RequestDma3Fill(0, (void*)(BG_SCREEN_ADDR(16)), 0x2000, 1);
|
||||
RequestDma3Fill(0xFF, (void*)(BG_SCREEN_ADDR(30)), 0x1000, 0);
|
||||
RequestDma3Fill(0, (void *)(BG_SCREEN_ADDR(16)), 0x2000, 1);
|
||||
RequestDma3Fill(0xFF, (void *)(BG_SCREEN_ADDR(30)), 0x1000, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
RequestDma3Fill(0, (void*)(BG_SCREEN_ADDR(8)), 0x2000, 1);
|
||||
RequestDma3Fill(0xFF, (void*)(BG_SCREEN_ADDR(28)), 0x1000, 0);
|
||||
RequestDma3Fill(0, (void *)(BG_SCREEN_ADDR(8)), 0x2000, 1);
|
||||
RequestDma3Fill(0xFF, (void *)(BG_SCREEN_ADDR(28)), 0x1000, 0);
|
||||
}
|
||||
|
||||
GetBattleAnimBg1Data(&animBg);
|
||||
@ -707,7 +707,7 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y);
|
||||
|
||||
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], animBg.paletteId * 16, 0x20);
|
||||
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void*)(BG_PLTT + animBg.paletteId * 32), 0x20);
|
||||
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void *)(BG_PLTT + animBg.paletteId * 32), 0x20);
|
||||
|
||||
if (IsContest())
|
||||
battlerPosition = 0;
|
||||
@ -721,8 +721,8 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
||||
}
|
||||
else
|
||||
{
|
||||
RequestDma3Fill(0, (void*)(BG_SCREEN_ADDR(12)), 0x2000, 1);
|
||||
RequestDma3Fill(0, (void*)(BG_SCREEN_ADDR(30)), 0x1000, 1);
|
||||
RequestDma3Fill(0, (void *)(BG_SCREEN_ADDR(12)), 0x2000, 1);
|
||||
RequestDma3Fill(0, (void *)(BG_SCREEN_ADDR(30)), 0x1000, 1);
|
||||
GetBattleAnimBgData(&animBg, 2);
|
||||
CpuFill16(0, animBg.bgTiles + 0x1000, 0x1000);
|
||||
CpuFill16(0, animBg.bgTilemap + 0x400, 0x800);
|
||||
@ -742,7 +742,7 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
|
||||
SetGpuReg(REG_OFFSET_BG2VOFS, gBattle_BG2_Y);
|
||||
|
||||
LoadPalette(&gPlttBufferUnfaded[0x100 + battlerId * 16], 0x90, 0x20);
|
||||
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void*)(BG_PLTT + 0x120), 0x20);
|
||||
CpuCopy32(&gPlttBufferUnfaded[0x100 + battlerId * 16], (void *)(BG_PLTT + 0x120), 0x20);
|
||||
|
||||
DrawBattlerOnBg(2, 0, 0, GetBattlerPosition(battlerId), animBg.paletteId, animBg.bgTiles + 0x1000, animBg.bgTilemap + 0x400, animBg.tilesOffset);
|
||||
}
|
||||
@ -1203,7 +1203,7 @@ static void LoadMoveBg(u16 bgId)
|
||||
void *dmaDest;
|
||||
|
||||
LZDecompressWram(tilemap, gDecompressionBuffer);
|
||||
RelocateBattleBgPal(GetBattleBgPaletteNum(), (void*)gDecompressionBuffer, 0x100, FALSE);
|
||||
RelocateBattleBgPal(GetBattleBgPaletteNum(), (void *)gDecompressionBuffer, 0x100, FALSE);
|
||||
dmaSrc = gDecompressionBuffer;
|
||||
dmaDest = (void *)BG_SCREEN_ADDR(26);
|
||||
DmaCopy32(3, dmaSrc, dmaDest, 0x800);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1534,7 +1534,7 @@ static void AnimAirWaveProjectile_Step2(struct Sprite *sprite)
|
||||
|
||||
static void AnimAirWaveProjectile_Step1(struct Sprite *sprite)
|
||||
{
|
||||
struct Task* task = &gTasks[sprite->data[7]];
|
||||
struct Task *task = &gTasks[sprite->data[7]];
|
||||
if (sprite->data[0] > task->data[5])
|
||||
{
|
||||
sprite->data[5] += sprite->data[3];
|
||||
@ -1571,7 +1571,7 @@ static void AnimAirWaveProjectile(struct Sprite *sprite)
|
||||
s16 b;
|
||||
s16 c;
|
||||
|
||||
struct Task* task = &gTasks[sprite->data[7]];
|
||||
struct Task *task = &gTasks[sprite->data[7]];
|
||||
sprite->data[1] += (-2 & task->data[7]);
|
||||
sprite->data[2] += (-2 & task->data[8]);
|
||||
if (1 & task->data[7])
|
||||
@ -1838,7 +1838,7 @@ static void AnimBulletSeed_Step1(struct Sprite *sprite)
|
||||
{
|
||||
int i;
|
||||
u16 rand;
|
||||
s16* ptr;
|
||||
s16 *ptr;
|
||||
PlaySE12WithPanning(SE_M_HORN_ATTACK, BattleAnimAdjustPanning(63));
|
||||
sprite->x += sprite->x2;
|
||||
sprite->y += sprite->y2;
|
||||
@ -2035,7 +2035,7 @@ static void AnimTask_GrowAndGrayscale_Step(u8 taskId)
|
||||
// No args.
|
||||
void AnimTask_Minimize(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||
task->data[0] = spriteId;
|
||||
PrepareBattlerSpriteForRotScale(spriteId, ST_OAM_OBJ_NORMAL);
|
||||
@ -2051,7 +2051,7 @@ void AnimTask_Minimize(u8 taskId)
|
||||
|
||||
static void AnimTask_Minimize_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
switch (task->data[1])
|
||||
{
|
||||
case 0:
|
||||
@ -2115,7 +2115,7 @@ static void AnimTask_Minimize_Step(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void CreateMinimizeSprite(struct Task* task, u8 taskId)
|
||||
static void CreateMinimizeSprite(struct Task *task, u8 taskId)
|
||||
{
|
||||
u16 matrixNum;
|
||||
s16 spriteId = CloneBattlerSpriteWithBlend(ANIM_ATTACKER);
|
||||
@ -2160,7 +2160,7 @@ static void ClonedMinizeSprite_Step(struct Sprite *sprite)
|
||||
// arg 1: num hops
|
||||
void AnimTask_Splash(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
if (gBattleAnimArgs[1] == 0)
|
||||
{
|
||||
DestroyAnimVisualTask(taskId);
|
||||
@ -2180,7 +2180,7 @@ void AnimTask_Splash(u8 taskId)
|
||||
|
||||
static void AnimTask_Splash_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
switch (task->data[1])
|
||||
{
|
||||
case 0:
|
||||
@ -2234,7 +2234,7 @@ static void AnimTask_Splash_Step(u8 taskId)
|
||||
// No args.
|
||||
void AnimTask_GrowAndShrink(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||
PrepareAffineAnimInTaskData(task, spriteId, gGrowAndShrinkAffineAnimCmds);
|
||||
task->func = AnimTask_GrowAndShrink_Step;
|
||||
@ -2242,7 +2242,7 @@ void AnimTask_GrowAndShrink(u8 taskId)
|
||||
|
||||
static void AnimTask_GrowAndShrink_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
if (!RunAffineAnimFromTaskData(task))
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
@ -2301,7 +2301,7 @@ static void AnimAngerMark(struct Sprite *sprite)
|
||||
// left/right movements
|
||||
void AnimTask_ThrashMoveMonHorizontal(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||
task->data[0] = spriteId;
|
||||
task->data[1] = 0;
|
||||
@ -2311,7 +2311,7 @@ void AnimTask_ThrashMoveMonHorizontal(u8 taskId)
|
||||
|
||||
static void AnimTask_ThrashMoveMonHorizontal_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
if (!RunAffineAnimFromTaskData(task))
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
@ -2319,7 +2319,7 @@ static void AnimTask_ThrashMoveMonHorizontal_Step(u8 taskId)
|
||||
// up/down movements
|
||||
void AnimTask_ThrashMoveMonVertical(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
task->data[0] = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||
task->data[1] = 0;
|
||||
task->data[2] = 4;
|
||||
@ -2338,7 +2338,7 @@ void AnimTask_ThrashMoveMonVertical(u8 taskId)
|
||||
|
||||
static void AnimTask_ThrashMoveMonVertical_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
if (++task->data[7] > 2)
|
||||
{
|
||||
task->data[7] = 0;
|
||||
@ -2389,7 +2389,7 @@ static void AnimTask_ThrashMoveMonVertical_Step(u8 taskId)
|
||||
|
||||
void AnimTask_SketchDrawMon(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
struct ScanlineEffectParams params;
|
||||
|
||||
s16 i;
|
||||
@ -2430,7 +2430,7 @@ void AnimTask_SketchDrawMon(u8 taskId)
|
||||
|
||||
static void AnimTask_SketchDrawMon_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[4])
|
||||
{
|
||||
@ -2791,7 +2791,7 @@ static void AnimSoftBoiledEgg_Step4_Callback(struct Sprite *sprite)
|
||||
// Used by Extremespeed
|
||||
void AnimTask_AttackerStretchAndDisappear(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER);
|
||||
task->data[0] = spriteId;
|
||||
PrepareAffineAnimInTaskData(task, spriteId, gStretchAttackerAffineAnimCmds);
|
||||
@ -2800,7 +2800,7 @@ void AnimTask_AttackerStretchAndDisappear(u8 taskId)
|
||||
|
||||
static void AnimTask_AttackerStretchAndDisappear_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
if (!RunAffineAnimFromTaskData(task))
|
||||
{
|
||||
gSprites[task->data[0]].y2 = 0;
|
||||
@ -2811,7 +2811,7 @@ static void AnimTask_AttackerStretchAndDisappear_Step(u8 taskId)
|
||||
|
||||
void AnimTask_ExtremeSpeedImpact(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
task->data[0] = 0;
|
||||
task->data[1] = 0;
|
||||
task->data[2] = 0;
|
||||
@ -2834,7 +2834,7 @@ void AnimTask_ExtremeSpeedImpact(u8 taskId)
|
||||
|
||||
static void AnimTask_ExtremeSpeedImpact_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->data[0])
|
||||
{
|
||||
@ -2880,7 +2880,7 @@ static void AnimTask_ExtremeSpeedImpact_Step(u8 taskId)
|
||||
|
||||
void AnimTask_ExtremeSpeedMonReappear(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
task->data[0] = 0;
|
||||
task->data[1] = 0;
|
||||
task->data[2] = 0;
|
||||
@ -2894,7 +2894,7 @@ void AnimTask_ExtremeSpeedMonReappear(u8 taskId)
|
||||
|
||||
static void AnimTask_ExtremeSpeedMonReappear_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
if (task->data[0] == 0 && ++task->data[1] > task->data[4])
|
||||
{
|
||||
task->data[1] = 0;
|
||||
@ -2922,7 +2922,7 @@ static void AnimTask_ExtremeSpeedMonReappear_Step(u8 taskId)
|
||||
|
||||
void AnimTask_SpeedDust(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
task->data[0] = 0;
|
||||
task->data[1] = 4;
|
||||
task->data[2] = 0;
|
||||
@ -2940,7 +2940,7 @@ void AnimTask_SpeedDust(u8 taskId)
|
||||
|
||||
static void AnimTask_SpeedDust_Step(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
switch (task->data[8])
|
||||
{
|
||||
case 0:
|
||||
|
@ -595,7 +595,7 @@ static void AnimFallingFeather(struct Sprite *sprite)
|
||||
data->unkA = (gBattleAnimArgs[2] >> 8) & 0xFF;
|
||||
data->unk4 = gBattleAnimArgs[3];
|
||||
data->unk6 = gBattleAnimArgs[4];
|
||||
*(u16*)(data->unkC) = gBattleAnimArgs[5];
|
||||
*(u16 *)(data->unkC) = gBattleAnimArgs[5];
|
||||
|
||||
if (data->unk2 >= 64 && data->unk2 <= 191)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ static void AnimTask_TranslateMonElliptical_Step(u8 taskId);
|
||||
static void DoHorizontalLunge(struct Sprite *sprite);
|
||||
static void ReverseHorizontalLungeDirection(struct Sprite *sprite);
|
||||
static void DoVerticalDip(struct Sprite *sprite);
|
||||
static void ReverseVerticalDipDirection(struct Sprite* sprite);
|
||||
static void ReverseVerticalDipDirection(struct Sprite *sprite);
|
||||
static void SlideMonToOriginalPos(struct Sprite *sprite);
|
||||
static void SlideMonToOriginalPos_Step(struct Sprite *sprite);
|
||||
static void SlideMonToOffset(struct Sprite *sprite);
|
||||
|
@ -414,7 +414,7 @@ u8 GetAnimBattlerSpriteId(u8 animBattler)
|
||||
}
|
||||
}
|
||||
|
||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*callback)(struct Sprite*))
|
||||
void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*callback)(struct Sprite *))
|
||||
{
|
||||
sprite->data[6] = (u32)(callback) & 0xffff;
|
||||
sprite->data[7] = (u32)(callback) >> 16;
|
||||
|
@ -27,7 +27,7 @@ static void StartBlendAnimSpriteColor(u8, u32);
|
||||
static void AnimTask_BlendSpriteColor_Step2(u8);
|
||||
static void AnimTask_HardwarePaletteFade_Step(u8);
|
||||
static void AnimTask_TraceMonBlended_Step(u8);
|
||||
static void AnimMonTrace(struct Sprite*);
|
||||
static void AnimMonTrace(struct Sprite *);
|
||||
static void AnimTask_DrawFallingWhiteLinesOnAttacker_Step(u8);
|
||||
static void StatsChangeAnimation_Step1(u8);
|
||||
static void StatsChangeAnimation_Step2(u8);
|
||||
|
@ -48,11 +48,11 @@ static void AnimTask_SurfWaveScanlineEffect(u8);
|
||||
static void AnimTask_WaterSpoutLaunch_Step(u8);
|
||||
static void AnimTask_WaterSpoutRain_Step(u8);
|
||||
static u8 GetWaterSpoutPowerForAnim(void);
|
||||
static void CreateWaterSpoutLaunchDroplets(struct Task*, u8);
|
||||
static void CreateWaterSpoutRainDroplet(struct Task*, u8);
|
||||
static void CreateWaterSpoutLaunchDroplets(struct Task *, u8);
|
||||
static void CreateWaterSpoutRainDroplet(struct Task *, u8);
|
||||
static void AnimTask_WaterSport_Step(u8);
|
||||
static void CreateWaterSportDroplet(struct Task*);
|
||||
static void CreateWaterPulseRingBubbles(struct Sprite*, int, int);
|
||||
static void CreateWaterSportDroplet(struct Task *);
|
||||
static void CreateWaterPulseRingBubbles(struct Sprite *, int, int);
|
||||
|
||||
static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused/water_gfx.4bpp");
|
||||
static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused/water.bin");
|
||||
|
@ -719,7 +719,7 @@ void BattleArena_AddSkillPoints(u8 battler)
|
||||
}
|
||||
else if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
{
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_MISSED) || gBattleCommunication[6] != 1)
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_MISSED) || gBattleCommunication[MISS_TYPE] != B_MSG_PROTECTED)
|
||||
skillPoints[battler] -= 2;
|
||||
}
|
||||
else if ((gMoveResultFlags & MOVE_RESULT_SUPER_EFFECTIVE) && (gMoveResultFlags & MOVE_RESULT_NOT_VERY_EFFECTIVE))
|
||||
|
154
src/battle_bg.c
154
src/battle_bg.c
@ -760,26 +760,26 @@ void DrawMainBattleBackground(void)
|
||||
{
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_RECORDED_LINK))
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60);
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Cave, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Cave, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Cave, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Groudon, 0x20, 0x60);
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Water, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Water, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Water, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Water, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Kyogre, 0x20, 0x60);
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RAYQUAZA)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Rayquaza, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Rayquaza, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Rayquaza, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Rayquaza, 0x20, 0x60);
|
||||
}
|
||||
else
|
||||
@ -789,15 +789,15 @@ void DrawMainBattleBackground(void)
|
||||
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
|
||||
if (trainerClass == TRAINER_CLASS_LEADER)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_BuildingLeader, 0x20, 0x60);
|
||||
return;
|
||||
}
|
||||
else if (trainerClass == TRAINER_CLASS_CHAMPION)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_StadiumWallace, 0x20, 0x60);
|
||||
return;
|
||||
}
|
||||
@ -807,48 +807,48 @@ void DrawMainBattleBackground(void)
|
||||
{
|
||||
default:
|
||||
case MAP_BATTLE_SCENE_NORMAL:
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(sBattleTerrainTable[gBattleTerrain].palette, 0x20, 0x60);
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_GYM:
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_BuildingGym, 0x20, 0x60);
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_MAGMA:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_StadiumMagma, 0x20, 0x60);
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_AQUA:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_StadiumAqua, 0x20, 0x60);
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_SIDNEY:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_StadiumSidney, 0x20, 0x60);
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_PHOEBE:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_StadiumPhoebe, 0x20, 0x60);
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_GLACIA:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_StadiumGlacia, 0x20, 0x60);
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_DRAKE:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_StadiumDrake, 0x20, 0x60);
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_FRONTIER:
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
LoadCompressedPalette(gBattleTerrainPalette_Frontier, 0x20, 0x60);
|
||||
break;
|
||||
}
|
||||
@ -857,7 +857,7 @@ void DrawMainBattleBackground(void)
|
||||
|
||||
void LoadBattleTextboxAndBackground(void)
|
||||
{
|
||||
LZDecompressVram(gBattleTextboxTiles, (void*)(BG_CHAR_ADDR(0)));
|
||||
LZDecompressVram(gBattleTextboxTiles, (void *)(BG_CHAR_ADDR(0)));
|
||||
CopyToBgTilemapBuffer(0, gBattleTextboxTilemap, 0, 0);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
LoadCompressedPalette(gBattleTextboxPalette, 0, 0x40);
|
||||
@ -1124,8 +1124,8 @@ void DrawBattleEntryBackground(void)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
|
||||
{
|
||||
LZDecompressVram(gBattleVSFrame_Gfx, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gVsLettersGfx, (void*)OBJ_VRAM0);
|
||||
LZDecompressVram(gBattleVSFrame_Gfx, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gVsLettersGfx, (void *)OBJ_VRAM0);
|
||||
LoadCompressedPalette(gBattleVSFrame_Pal, 0x60, 0x20);
|
||||
SetBgAttribute(1, BG_ATTR_SCREENSIZE, 1);
|
||||
SetGpuReg(REG_OFFSET_BG1CNT, 0x5C04);
|
||||
@ -1143,8 +1143,8 @@ void DrawBattleEntryBackground(void)
|
||||
{
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) || gPartnerTrainerId == TRAINER_STEVEN_PARTNER)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(BG_SCREEN_ADDR(28)));
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void *)(BG_SCREEN_ADDR(28)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1160,18 +1160,18 @@ void DrawBattleEntryBackground(void)
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Cave, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Cave, (void*)(BG_SCREEN_ADDR(28)));
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Cave, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Cave, (void *)(BG_SCREEN_ADDR(28)));
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Underwater, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Underwater, (void*)(BG_SCREEN_ADDR(28)));
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Underwater, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Underwater, (void *)(BG_SCREEN_ADDR(28)));
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_RAYQUAZA)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Rayquaza, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Rayquaza, (void*)(BG_SCREEN_ADDR(28)));
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Rayquaza, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Rayquaza, (void *)(BG_SCREEN_ADDR(28)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1180,27 +1180,27 @@ void DrawBattleEntryBackground(void)
|
||||
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
|
||||
if (trainerClass == TRAINER_CLASS_LEADER)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(BG_SCREEN_ADDR(28)));
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void *)(BG_SCREEN_ADDR(28)));
|
||||
return;
|
||||
}
|
||||
else if (trainerClass == TRAINER_CLASS_CHAMPION)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(BG_SCREEN_ADDR(28)));
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void *)(BG_SCREEN_ADDR(28)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (GetCurrentMapBattleScene() == MAP_BATTLE_SCENE_NORMAL)
|
||||
{
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTileset, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTilemap, (void*)(BG_SCREEN_ADDR(28)));
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTileset, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].entryTilemap, (void *)(BG_SCREEN_ADDR(28)));
|
||||
}
|
||||
else
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void*)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void*)(BG_SCREEN_ADDR(28)));
|
||||
LZDecompressVram(gBattleTerrainAnimTiles_Building, (void *)(BG_CHAR_ADDR(1)));
|
||||
LZDecompressVram(gBattleTerrainAnimTilemap_Building, (void *)(BG_SCREEN_ADDR(28)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1212,7 +1212,7 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
switch (caseId)
|
||||
{
|
||||
case 0:
|
||||
LZDecompressVram(gBattleTextboxTiles, (void*)(BG_CHAR_ADDR(0)));
|
||||
LZDecompressVram(gBattleTextboxTiles, (void *)(BG_CHAR_ADDR(0)));
|
||||
break;
|
||||
case 1:
|
||||
CopyToBgTilemapBuffer(0, gBattleTextboxTilemap, 0, 0);
|
||||
@ -1224,11 +1224,11 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
case 3:
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_EREADER_TRAINER))
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_GROUDON)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Cave, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Cave, (void *)(BG_CHAR_ADDR(2)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1237,12 +1237,12 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
|
||||
if (trainerClass == TRAINER_CLASS_LEADER)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
}
|
||||
else if (trainerClass == TRAINER_CLASS_CHAMPION)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1251,31 +1251,31 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
{
|
||||
default:
|
||||
case MAP_BATTLE_SCENE_NORMAL:
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tileset, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_GYM:
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_MAGMA:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_AQUA:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_SIDNEY:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_PHOEBE:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_GLACIA:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_DRAKE:
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Stadium, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_FRONTIER:
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void*)(BG_CHAR_ADDR(2)));
|
||||
LZDecompressVram(gBattleTerrainTiles_Building, (void *)(BG_CHAR_ADDR(2)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1283,14 +1283,14 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
case 4:
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_EREADER_TRAINER))
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
}
|
||||
else if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON)
|
||||
{
|
||||
if (gGameVersion == VERSION_RUBY)
|
||||
LZDecompressVram(gBattleTerrainTilemap_Cave, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Cave, (void *)(BG_SCREEN_ADDR(26)));
|
||||
else
|
||||
LZDecompressVram(gBattleTerrainTilemap_Water, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Water, (void *)(BG_SCREEN_ADDR(26)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1299,12 +1299,12 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
u8 trainerClass = gTrainers[gTrainerBattleOpponent_A].trainerClass;
|
||||
if (trainerClass == TRAINER_CLASS_LEADER)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
}
|
||||
else if (trainerClass == TRAINER_CLASS_CHAMPION)
|
||||
{
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1313,31 +1313,31 @@ bool8 LoadChosenBattleElement(u8 caseId)
|
||||
{
|
||||
default:
|
||||
case MAP_BATTLE_SCENE_NORMAL:
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(sBattleTerrainTable[gBattleTerrain].tilemap, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_GYM:
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_MAGMA:
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_AQUA:
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_SIDNEY:
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_PHOEBE:
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_GLACIA:
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_DRAKE:
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Stadium, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
case MAP_BATTLE_SCENE_FRONTIER:
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void*)(BG_SCREEN_ADDR(26)));
|
||||
LZDecompressVram(gBattleTerrainTilemap_Building, (void *)(BG_SCREEN_ADDR(26)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ static u32 CopyLinkOpponentMonData(u8 monId, u8 *dst)
|
||||
moveData.pp[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size);
|
||||
}
|
||||
moveData.ppBonuses = GetMonData(&gEnemyParty[monId], MON_DATA_PP_BONUSES);
|
||||
src = (u8*)(&moveData);
|
||||
src = (u8 *)(&moveData);
|
||||
for (size = 0; size < sizeof(moveData); size++)
|
||||
dst[size] = src[size];
|
||||
break;
|
||||
@ -1466,7 +1466,7 @@ static void LinkOpponentHandlePrintString(void)
|
||||
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
|
@ -514,7 +514,7 @@ static u32 CopyLinkPartnerMonData(u8 monId, u8 *dst)
|
||||
moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size);
|
||||
}
|
||||
moveData.ppBonuses = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES);
|
||||
src = (u8*)(&moveData);
|
||||
src = (u8 *)(&moveData);
|
||||
for (size = 0; size < sizeof(moveData); size++)
|
||||
dst[size] = src[size];
|
||||
break;
|
||||
@ -1298,7 +1298,7 @@ static void LinkPartnerHandlePrintString(void)
|
||||
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
|
@ -627,7 +627,7 @@ static u32 GetOpponentMonData(u8 monId, u8 *dst)
|
||||
moveData.pp[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size);
|
||||
}
|
||||
moveData.ppBonuses = GetMonData(&gEnemyParty[monId], MON_DATA_PP_BONUSES);
|
||||
src = (u8*)(&moveData);
|
||||
src = (u8 *)(&moveData);
|
||||
for (size = 0; size < sizeof(moveData); size++)
|
||||
dst[size] = src[size];
|
||||
break;
|
||||
@ -1519,7 +1519,7 @@ static void OpponentHandlePrintString(void)
|
||||
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
@ -1552,7 +1552,7 @@ static void OpponentHandleChooseMove(void)
|
||||
else
|
||||
{
|
||||
u8 chosenMoveId;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER))
|
||||
{
|
||||
|
@ -471,7 +471,7 @@ static void HandleInputChooseTarget(void)
|
||||
static void HandleInputChooseMove(void)
|
||||
{
|
||||
bool32 canSelectTarget = FALSE;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
|
||||
if (JOY_HELD(DPAD_ANY) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A)
|
||||
gPlayerDpadHoldFrames++;
|
||||
@ -676,7 +676,7 @@ static void HandleMoveSwitching(void)
|
||||
|
||||
if (gMoveSelectionCursor[gActiveBattler] != gMultiUsePlayerCursor)
|
||||
{
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
s32 i;
|
||||
|
||||
// swap moves and pp
|
||||
@ -1456,7 +1456,7 @@ static void PlayerHandleYesNoInput(void)
|
||||
static void MoveSelectionDisplayMoveNames(void)
|
||||
{
|
||||
s32 i;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
gNumberOfMovesToChoose = 0;
|
||||
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
@ -1485,7 +1485,7 @@ static void MoveSelectionDisplayPpNumber(void)
|
||||
return;
|
||||
|
||||
SetPpNumbersPaletteInMoveSelection();
|
||||
moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
txtPtr = ConvertIntToDecimalStringN(gDisplayedStringBattle, moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
*(txtPtr)++ = CHAR_SLASH;
|
||||
ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2);
|
||||
@ -1496,7 +1496,7 @@ static void MoveSelectionDisplayPpNumber(void)
|
||||
static void MoveSelectionDisplayMoveType(void)
|
||||
{
|
||||
u8 *txtPtr;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
|
||||
txtPtr = StringCopy(gDisplayedStringBattle, gText_MoveInterfaceType);
|
||||
*(txtPtr)++ = EXT_CTRL_CODE_BEGIN;
|
||||
@ -1672,7 +1672,7 @@ static u32 CopyPlayerMonData(u8 monId, u8 *dst)
|
||||
moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size);
|
||||
}
|
||||
moveData.ppBonuses = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES);
|
||||
src = (u8*)(&moveData);
|
||||
src = (u8 *)(&moveData);
|
||||
for (size = 0; size < sizeof(moveData); size++)
|
||||
dst[size] = src[size];
|
||||
break;
|
||||
@ -2546,7 +2546,7 @@ static void PlayerHandlePrintString(void)
|
||||
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter2;
|
||||
@ -2797,7 +2797,7 @@ static void PlayerHandleDMA3Transfer(void)
|
||||
u16 sizeArg = gBattleBufferA[gActiveBattler][5] | (gBattleBufferA[gActiveBattler][6] << 8);
|
||||
|
||||
const u8 *src = &gBattleBufferA[gActiveBattler][7];
|
||||
u8 *dst = (u8*)(dstArg);
|
||||
u8 *dst = (u8 *)(dstArg);
|
||||
u32 size = sizeArg;
|
||||
|
||||
while (1)
|
||||
|
@ -698,7 +698,7 @@ static u32 CopyPlayerPartnerMonData(u8 monId, u8 *dst)
|
||||
moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size);
|
||||
}
|
||||
moveData.ppBonuses = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES);
|
||||
src = (u8*)(&moveData);
|
||||
src = (u8 *)(&moveData);
|
||||
for (size = 0; size < sizeof(moveData); size++)
|
||||
dst[size] = src[size];
|
||||
break;
|
||||
@ -1488,7 +1488,7 @@ static void PlayerPartnerHandlePrintString(void)
|
||||
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter2;
|
||||
@ -1513,7 +1513,7 @@ static void PlayerPartnerHandleYesNoBox(void)
|
||||
static void PlayerPartnerHandleChooseMove(void)
|
||||
{
|
||||
u8 chosenMoveId;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
|
||||
BattleAI_SetupAIData(0xF);
|
||||
chosenMoveId = BattleAI_ChooseMoveOrAction();
|
||||
|
@ -610,7 +610,7 @@ static u32 CopyRecordedOpponentMonData(u8 monId, u8 *dst)
|
||||
moveData.pp[size] = GetMonData(&gEnemyParty[monId], MON_DATA_PP1 + size);
|
||||
}
|
||||
moveData.ppBonuses = GetMonData(&gEnemyParty[monId], MON_DATA_PP_BONUSES);
|
||||
src = (u8*)(&moveData);
|
||||
src = (u8 *)(&moveData);
|
||||
for (size = 0; size < sizeof(moveData); size++)
|
||||
dst[size] = src[size];
|
||||
break;
|
||||
@ -1393,7 +1393,7 @@ static void RecordedOpponentHandlePrintString(void)
|
||||
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
|
@ -589,7 +589,7 @@ static u32 CopyRecordedPlayerMonData(u8 monId, u8 *dst)
|
||||
moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size);
|
||||
}
|
||||
moveData.ppBonuses = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES);
|
||||
src = (u8*)(&moveData);
|
||||
src = (u8 *)(&moveData);
|
||||
for (size = 0; size < sizeof(moveData); size++)
|
||||
dst[size] = src[size];
|
||||
break;
|
||||
@ -1399,7 +1399,7 @@ static void RecordedPlayerHandlePrintString(void)
|
||||
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
|
@ -422,7 +422,7 @@ static void SafariHandlePrintString(void)
|
||||
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
|
@ -516,7 +516,7 @@ static u32 CopyWallyMonData(u8 monId, u8 *dst)
|
||||
moveData.pp[size] = GetMonData(&gPlayerParty[monId], MON_DATA_PP1 + size);
|
||||
}
|
||||
moveData.ppBonuses = GetMonData(&gPlayerParty[monId], MON_DATA_PP_BONUSES);
|
||||
src = (u8*)(&moveData);
|
||||
src = (u8 *)(&moveData);
|
||||
for (size = 0; size < sizeof(moveData); size++)
|
||||
dst[size] = src[size];
|
||||
break;
|
||||
@ -1176,7 +1176,7 @@ static void WallyHandlePrintString(void)
|
||||
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
stringId = (u16*)(&gBattleBufferA[gActiveBattler][2]);
|
||||
stringId = (u16 *)(&gBattleBufferA[gActiveBattler][2]);
|
||||
BufferStringBattle(*stringId);
|
||||
BattlePutTextOnWindow(gDisplayedStringBattle, B_WIN_MSG);
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnInactiveTextPrinter;
|
||||
|
@ -99,10 +99,10 @@ void InitBattleControllers(void)
|
||||
}
|
||||
|
||||
for (i = 0; i < sizeof(gBattleStruct->tvMovePoints); i++)
|
||||
*((u8*)(&gBattleStruct->tvMovePoints) + i) = 0;
|
||||
*((u8 *)(&gBattleStruct->tvMovePoints) + i) = 0;
|
||||
|
||||
for (i = 0; i < sizeof(gBattleStruct->tv); i++)
|
||||
*((u8*)(&gBattleStruct->tv) + i) = 0;
|
||||
*((u8 *)(&gBattleStruct->tv) + i) = 0;
|
||||
}
|
||||
|
||||
static void InitSinglePlayerBtlControllers(void)
|
||||
@ -930,7 +930,7 @@ void BtlController_EmitSetMonData(u8 bufferId, u8 requestId, u8 monToCheck, u8 b
|
||||
sBattleBuffersTransferData[1] = requestId;
|
||||
sBattleBuffersTransferData[2] = monToCheck;
|
||||
for (i = 0; i < bytes; i++)
|
||||
sBattleBuffersTransferData[3 + i] = *(u8*)(data++);
|
||||
sBattleBuffersTransferData[3 + i] = *(u8 *)(data++);
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, 3 + bytes);
|
||||
}
|
||||
|
||||
@ -942,7 +942,7 @@ void BtlController_EmitSetRawMonData(u8 bufferId, u8 monId, u8 bytes, void *data
|
||||
sBattleBuffersTransferData[1] = monId;
|
||||
sBattleBuffersTransferData[2] = bytes;
|
||||
for (i = 0; i < bytes; i++)
|
||||
sBattleBuffersTransferData[3 + i] = *(u8*)(data++);
|
||||
sBattleBuffersTransferData[3 + i] = *(u8 *)(data++);
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, bytes + 3);
|
||||
}
|
||||
|
||||
@ -1039,7 +1039,7 @@ void BtlController_EmitPause(u8 bufferId, u8 toWait, void *data)
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_PAUSE;
|
||||
sBattleBuffersTransferData[1] = toWait;
|
||||
for (i = 0; i < toWait * 3; i++)
|
||||
sBattleBuffersTransferData[2 + i] = *(u8*)(data++);
|
||||
sBattleBuffersTransferData[2 + i] = *(u8 *)(data++);
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, toWait * 3 + 2);
|
||||
}
|
||||
|
||||
@ -1076,14 +1076,14 @@ void BtlController_EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 m
|
||||
void BtlController_EmitPrintString(u8 bufferId, u16 stringID)
|
||||
{
|
||||
s32 i;
|
||||
struct BattleMsgData* stringInfo;
|
||||
struct BattleMsgData *stringInfo;
|
||||
|
||||
sBattleBuffersTransferData[0] = CONTROLLER_PRINTSTRING;
|
||||
sBattleBuffersTransferData[1] = gBattleOutcome;
|
||||
sBattleBuffersTransferData[2] = stringID;
|
||||
sBattleBuffersTransferData[3] = (stringID & 0xFF00) >> 8;
|
||||
|
||||
stringInfo = (struct BattleMsgData*)(&sBattleBuffersTransferData[4]);
|
||||
stringInfo = (struct BattleMsgData *)(&sBattleBuffersTransferData[4]);
|
||||
stringInfo->currentMove = gCurrentMove;
|
||||
stringInfo->originallyUsedMove = gChosenMove;
|
||||
stringInfo->lastItem = gLastUsedItem;
|
||||
@ -1115,7 +1115,7 @@ void BtlController_EmitPrintSelectionString(u8 bufferId, u16 stringID)
|
||||
sBattleBuffersTransferData[2] = stringID;
|
||||
sBattleBuffersTransferData[3] = (stringID & 0xFF00) >> 8;
|
||||
|
||||
stringInfo = (struct BattleMsgData*)(&sBattleBuffersTransferData[4]);
|
||||
stringInfo = (struct BattleMsgData *)(&sBattleBuffersTransferData[4]);
|
||||
stringInfo->currentMove = gCurrentMove;
|
||||
stringInfo->originallyUsedMove = gChosenMove;
|
||||
stringInfo->lastItem = gLastUsedItem;
|
||||
@ -1164,7 +1164,7 @@ void BtlController_EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpN
|
||||
sBattleBuffersTransferData[2] = NoPpNumber;
|
||||
sBattleBuffersTransferData[3] = 0;
|
||||
for (i = 0; i < sizeof(*movePpData); i++)
|
||||
sBattleBuffersTransferData[4 + i] = *((u8*)(movePpData) + i);
|
||||
sBattleBuffersTransferData[4 + i] = *((u8 *)(movePpData) + i);
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, sizeof(*movePpData) + 4);
|
||||
}
|
||||
|
||||
@ -1261,7 +1261,7 @@ void BtlController_EmitDataTransfer(u8 bufferId, u16 size, void *data)
|
||||
sBattleBuffersTransferData[2] = size;
|
||||
sBattleBuffersTransferData[3] = (size & 0xFF00) >> 8;
|
||||
for (i = 0; i < size; i++)
|
||||
sBattleBuffersTransferData[4 + i] = *(u8*)(data++);
|
||||
sBattleBuffersTransferData[4 + i] = *(u8 *)(data++);
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, size + 4);
|
||||
}
|
||||
|
||||
@ -1277,7 +1277,7 @@ void BtlController_EmitDMA3Transfer(u8 bufferId, void *dst, u16 size, void *data
|
||||
sBattleBuffersTransferData[5] = size;
|
||||
sBattleBuffersTransferData[6] = (size & 0xFF00) >> 8;
|
||||
for (i = 0; i < size; i++)
|
||||
sBattleBuffersTransferData[7 + i] = *(u8*)(data++);
|
||||
sBattleBuffersTransferData[7 + i] = *(u8 *)(data++);
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, size + 7);
|
||||
}
|
||||
|
||||
@ -1293,7 +1293,7 @@ void BtlController_EmitPlayBGM(u8 bufferId, u16 songId, void *data)
|
||||
// Nonsense loop using songId as a size
|
||||
// Would go out of bounds for any song id after SE_RG_BAG_POCKET (253)
|
||||
for (i = 0; i < songId; i++)
|
||||
sBattleBuffersTransferData[3 + i] = *(u8*)(data++);
|
||||
sBattleBuffersTransferData[3 + i] = *(u8 *)(data++);
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, songId + 3);
|
||||
}
|
||||
|
||||
@ -1305,7 +1305,7 @@ void BtlController_EmitCmd32(u8 bufferId, u16 size, void *data)
|
||||
sBattleBuffersTransferData[1] = size;
|
||||
sBattleBuffersTransferData[2] = (size & 0xFF00) >> 8;
|
||||
for (i = 0; i < size; i++)
|
||||
sBattleBuffersTransferData[3 + i] = *(u8*)(data++);
|
||||
sBattleBuffersTransferData[3 + i] = *(u8 *)(data++);
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, size + 3);
|
||||
}
|
||||
|
||||
@ -1451,7 +1451,7 @@ void BtlController_EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* h
|
||||
sBattleBuffersTransferData[2] = (flags & PARTY_SUMM_SKIP_DRAW_DELAY) >> 7; // If true, skip delay after drawing. True during intro
|
||||
sBattleBuffersTransferData[3] = CONTROLLER_DRAWPARTYSTATUSSUMMARY;
|
||||
for (i = 0; i < (s32)(sizeof(struct HpAndStatus) * PARTY_SIZE); i++)
|
||||
sBattleBuffersTransferData[4 + i] = *(i + (u8*)(hpAndStatus));
|
||||
sBattleBuffersTransferData[4 + i] = *(i + (u8 *)(hpAndStatus));
|
||||
PrepareBufferDataTransfer(bufferId, sBattleBuffersTransferData, sizeof(struct HpAndStatus) * PARTY_SIZE + 4);
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ static void CB2_TourneyTree(void);
|
||||
static void VblankCb_TourneyInfoCard(void);
|
||||
static void DisplayMatchInfoOnCard(u8, u8);
|
||||
static void DisplayTrainerInfoOnCard(u8, u8);
|
||||
static int BufferDomeWinString(u8, u8*);
|
||||
static int BufferDomeWinString(u8, u8 *);
|
||||
static u8 GetDomeBrainTrainerPicId(void);
|
||||
static u8 GetDomeBrainTrainerClass(void);
|
||||
static void CopyDomeBrainTrainerName(u8 *);
|
||||
|
@ -2473,7 +2473,7 @@ static void Swap_Task_HandleYesNo(u8 taskId)
|
||||
gTasks[taskId].tSaidYes = TRUE;
|
||||
hiPtr = gTasks[taskId].tFollowUpTaskPtrHi;
|
||||
loPtr = gTasks[taskId].tFollowUpTaskPtrLo;
|
||||
gTasks[taskId].func = (void*)((hiPtr << 16) | loPtr);
|
||||
gTasks[taskId].func = (void *)((hiPtr << 16) | loPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2482,7 +2482,7 @@ static void Swap_Task_HandleYesNo(u8 taskId)
|
||||
Swap_ErasePopupMenu(SWAP_WIN_YES_NO);
|
||||
hiPtr = gTasks[taskId].tFollowUpTaskPtrHi;
|
||||
loPtr = gTasks[taskId].tFollowUpTaskPtrLo;
|
||||
gTasks[taskId].func = (void*)((hiPtr << 16) | loPtr);
|
||||
gTasks[taskId].func = (void *)((hiPtr << 16) | loPtr);
|
||||
}
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
@ -2492,7 +2492,7 @@ static void Swap_Task_HandleYesNo(u8 taskId)
|
||||
Swap_ErasePopupMenu(SWAP_WIN_YES_NO);
|
||||
hiPtr = gTasks[taskId].tFollowUpTaskPtrHi;
|
||||
loPtr = gTasks[taskId].tFollowUpTaskPtrLo;
|
||||
gTasks[taskId].func = (void*)((hiPtr << 16) | loPtr);
|
||||
gTasks[taskId].func = (void *)((hiPtr << 16) | loPtr);
|
||||
}
|
||||
else if (JOY_REPEAT(DPAD_UP))
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ u16 ChooseMoveAndTargetInBattlePalace(void)
|
||||
{
|
||||
s32 i, var1, var2;
|
||||
s32 chosenMoveId = -1;
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
u8 unusableMovesBits = CheckMoveLimitations(gActiveBattler, 0, MOVE_LIMITATIONS_ALL);
|
||||
s32 percent = Random() % 100;
|
||||
|
||||
@ -1219,7 +1219,7 @@ void HideBattlerShadowSprite(u8 battlerId)
|
||||
// Color the background tiles surrounding the action selection and move windows
|
||||
void FillAroundBattleWindows(void)
|
||||
{
|
||||
u16 *vramPtr = (u16*)(VRAM + 0x240);
|
||||
u16 *vramPtr = (u16 *)(VRAM + 0x240);
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
|
@ -159,7 +159,7 @@ enum
|
||||
};
|
||||
|
||||
static const u8 *GetHealthboxElementGfxPtr(u8);
|
||||
static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *, u32, u32, u32, u32 *);
|
||||
static u8 *AddTextPrinterAndCreateWindowOnHealthbox(const u8 *, u32, u32, u32, u32 *);
|
||||
|
||||
static void RemoveWindowOnHealthbox(u32 windowId);
|
||||
static void UpdateHpTextInHealthboxInDoubles(u8, s16, u8);
|
||||
@ -908,7 +908,7 @@ u8 CreateBattlerHealthboxSprites(u8 battlerId)
|
||||
healthBarSpritePtr->subspriteMode = SUBSPRITES_IGNORE_PRIORITY;
|
||||
healthBarSpritePtr->oam.priority = 1;
|
||||
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void*)(OBJ_VRAM0 + healthBarSpritePtr->oam.tileNum * TILE_SIZE_4BPP), 64);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void *)(OBJ_VRAM0 + healthBarSpritePtr->oam.tileNum * TILE_SIZE_4BPP), 64);
|
||||
|
||||
gSprites[healthboxLeftSpriteId].hMain_HealthBarSpriteId = healthbarSpriteId;
|
||||
gSprites[healthboxLeftSpriteId].hMain_Battler = battlerId;
|
||||
@ -1094,7 +1094,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl)
|
||||
|
||||
if (GetBattlerSide(gSprites[healthboxSpriteId].hMain_Battler) == B_SIDE_PLAYER)
|
||||
{
|
||||
objVram = (void*)(OBJ_VRAM0);
|
||||
objVram = (void *)(OBJ_VRAM0);
|
||||
if (!IsDoubleBattle())
|
||||
objVram += spriteTileNum + 0x820;
|
||||
else
|
||||
@ -1102,7 +1102,7 @@ static void UpdateLvlInHealthbox(u8 healthboxSpriteId, u8 lvl)
|
||||
}
|
||||
else
|
||||
{
|
||||
objVram = (void*)(OBJ_VRAM0);
|
||||
objVram = (void *)(OBJ_VRAM0);
|
||||
objVram += spriteTileNum + 0x400;
|
||||
}
|
||||
TextIntoHealthboxObject(objVram, windowTileData, 3);
|
||||
@ -1123,7 +1123,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
{
|
||||
ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 2, &windowId);
|
||||
objVram = (void*)(OBJ_VRAM0);
|
||||
objVram = (void *)(OBJ_VRAM0);
|
||||
objVram += spriteTileNum + 0xB40;
|
||||
HpTextIntoHealthboxObject(objVram, windowTileData, 2);
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
@ -1134,10 +1134,10 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
text[3] = CHAR_SLASH;
|
||||
text[4] = EOS;
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 4, 5, 2, &windowId);
|
||||
objVram = (void*)(OBJ_VRAM0);
|
||||
objVram = (void *)(OBJ_VRAM0);
|
||||
objVram += spriteTileNum + 0x3E0;
|
||||
HpTextIntoHealthboxObject(objVram, windowTileData, 1);
|
||||
objVram = (void*)(OBJ_VRAM0);
|
||||
objVram = (void *)(OBJ_VRAM0);
|
||||
objVram += spriteTileNum + 0xB00;
|
||||
HpTextIntoHealthboxObject(objVram, windowTileData + 0x20, 2);
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
@ -1179,7 +1179,7 @@ void UpdateHpTextInHealthbox(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent)
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[i * 64 + 32],
|
||||
(void*)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)),
|
||||
(void *)((OBJ_VRAM0) + TILE_SIZE_4BPP * (gSprites[healthboxSpriteId].oam.tileNum + var + i)),
|
||||
0x20);
|
||||
}
|
||||
}
|
||||
@ -1198,16 +1198,16 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
if (gBattleSpritesDataPtr->battlerData[gSprites[healthboxSpriteId].data[6]].hpNumbersNoBars) // don't print text if only bars are visible
|
||||
{
|
||||
spriteTileNum = gSprites[gSprites[healthboxSpriteId].data[5]].oam.tileNum * TILE_SIZE_4BPP;
|
||||
objVram = (void*)(OBJ_VRAM0) + spriteTileNum;
|
||||
objVram = (void *)(OBJ_VRAM0) + spriteTileNum;
|
||||
|
||||
if (maxOrCurrent != HP_CURRENT) // doubles, max hp
|
||||
{
|
||||
ConvertIntToDecimalStringN(text, value, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 0, 5, 0, &windowId);
|
||||
HpTextIntoHealthboxObject((void*)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2);
|
||||
HpTextIntoHealthboxObject((void *)(OBJ_VRAM0) + spriteTileNum + 0xC0, windowTileData, 2);
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END),
|
||||
(void*)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP),
|
||||
(void *)(OBJ_VRAM0 + 0x680) + (gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP),
|
||||
0x20);
|
||||
}
|
||||
else
|
||||
@ -1217,7 +1217,7 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
text[4] = EOS;
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, 4, 5, 0, &windowId);
|
||||
FillHealthboxObject(objVram, 0, 3); // Erases HP bar leftover.
|
||||
HpTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x60) + spriteTileNum, windowTileData, 3);
|
||||
HpTextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x60) + spriteTileNum, windowTileData, 3);
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
}
|
||||
}
|
||||
@ -1250,13 +1250,13 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
if (i < 3)
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32],
|
||||
(void*)((OBJ_VRAM0) + 32 * (1 + gSprites[r7].oam.tileNum + i)),
|
||||
(void *)((OBJ_VRAM0) + 32 * (1 + gSprites[r7].oam.tileNum + i)),
|
||||
0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[((i - var) * 64) + 32],
|
||||
(void*)((OBJ_VRAM0 + 0x20) + 32 * (i + gSprites[r7].oam.tileNum)),
|
||||
(void *)((OBJ_VRAM0 + 0x20) + 32 * (i + gSprites[r7].oam.tileNum)),
|
||||
0x20);
|
||||
}
|
||||
}
|
||||
@ -1264,16 +1264,16 @@ static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8
|
||||
if (maxOrCurrent == HP_CURRENT)
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[224],
|
||||
(void*)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * TILE_SIZE_4BPP)),
|
||||
(void *)((OBJ_VRAM0) + ((gSprites[r7].oam.tileNum + 4) * TILE_SIZE_4BPP)),
|
||||
0x20);
|
||||
CpuFill32(0, (void*)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * TILE_SIZE_4BPP)), 0x20);
|
||||
CpuFill32(0, (void *)((OBJ_VRAM0) + (gSprites[r7].oam.tileNum * TILE_SIZE_4BPP)), 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER) // Impossible to reach part, because the battlerId is from the opponent's side.
|
||||
{
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END),
|
||||
(void*)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP),
|
||||
(void *)(OBJ_VRAM0) + ((gSprites[healthboxSpriteId].oam.tileNum + 52) * TILE_SIZE_4BPP),
|
||||
0x20);
|
||||
}
|
||||
}
|
||||
@ -1313,11 +1313,11 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
for (j = 1; j < var + 1; j++)
|
||||
{
|
||||
spriteTileNum = (gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * TILE_SIZE_4BPP;
|
||||
CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (spriteTileNum), 0x20);
|
||||
CpuCopy32(barFontGfx, (void *)(OBJ_VRAM0) + (spriteTileNum), 0x20);
|
||||
barFontGfx += 0x20;
|
||||
|
||||
spriteTileNum = (8 + gSprites[healthboxSpriteId].oam.tileNum + (j - (j / 8 * 8)) + (j / 8 * 64)) * TILE_SIZE_4BPP;
|
||||
CpuCopy32(barFontGfx, (void*)(OBJ_VRAM0) + (spriteTileNum), 0x20);
|
||||
CpuCopy32(barFontGfx, (void *)(OBJ_VRAM0) + (spriteTileNum), 0x20);
|
||||
barFontGfx += 0x20;
|
||||
}
|
||||
|
||||
@ -1334,13 +1334,13 @@ static void PrintSafariMonInfo(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
if (j <= 1)
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[0x40 * j + 0x20],
|
||||
(void*)(OBJ_VRAM0) + (gSprites[healthBarSpriteId].oam.tileNum + 2 + j) * TILE_SIZE_4BPP,
|
||||
(void *)(OBJ_VRAM0) + (gSprites[healthBarSpriteId].oam.tileNum + 2 + j) * TILE_SIZE_4BPP,
|
||||
32);
|
||||
}
|
||||
else
|
||||
{
|
||||
CpuCopy32(&gMonSpritesGfxPtr->barFontGfx[0x40 * j + 0x20],
|
||||
(void*)(OBJ_VRAM0 + 0xC0) + (j + gSprites[healthBarSpriteId].oam.tileNum) * TILE_SIZE_4BPP,
|
||||
(void *)(OBJ_VRAM0 + 0xC0) + (j + gSprites[healthBarSpriteId].oam.tileNum) * TILE_SIZE_4BPP,
|
||||
32);
|
||||
}
|
||||
}
|
||||
@ -1372,7 +1372,7 @@ void SwapHpBarsWithHpText(void)
|
||||
{
|
||||
healthBarSpriteId = gSprites[gHealthboxSpriteIds[i]].hMain_HealthBarSpriteId;
|
||||
|
||||
CpuFill32(0, (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x100);
|
||||
CpuFill32(0, (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 0x100);
|
||||
UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_HP), HP_CURRENT);
|
||||
UpdateHpTextInHealthboxInDoubles(gHealthboxSpriteIds[i], GetMonData(&gPlayerParty[gBattlerPartyIndexes[i]], MON_DATA_MAX_HP), HP_MAX);
|
||||
}
|
||||
@ -1380,7 +1380,7 @@ void SwapHpBarsWithHpText(void)
|
||||
{
|
||||
UpdateStatusIconInHealthbox(gHealthboxSpriteIds[i]);
|
||||
UpdateHealthboxAttribute(gHealthboxSpriteIds[i], &gPlayerParty[gBattlerPartyIndexes[i]], HEALTHBOX_HEALTH_BAR);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END_BAR), (void*)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_FRAME_END_BAR), (void *)(OBJ_VRAM0 + 0x680 + gSprites[gHealthboxSpriteIds[i]].oam.tileNum * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1924,8 +1924,8 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
|
||||
if (GetBattlerSide(gSprites[healthboxSpriteId].data[6]) == B_SIDE_PLAYER)
|
||||
{
|
||||
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x40 + spriteTileNum), windowTileData, 6);
|
||||
ptr = (void*)(OBJ_VRAM0);
|
||||
TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x40 + spriteTileNum), windowTileData, 6);
|
||||
ptr = (void *)(OBJ_VRAM0);
|
||||
if (!IsDoubleBattle())
|
||||
ptr += spriteTileNum + 0x800;
|
||||
else
|
||||
@ -1934,7 +1934,7 @@ static void UpdateNickInHealthbox(u8 healthboxSpriteId, struct Pokemon *mon)
|
||||
}
|
||||
else
|
||||
{
|
||||
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x20 + spriteTileNum), windowTileData, 7);
|
||||
TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x20 + spriteTileNum), windowTileData, 7);
|
||||
}
|
||||
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
@ -1958,9 +1958,9 @@ static void TryAddPokeballIconToHealthbox(u8 healthboxSpriteId, bool8 noStatus)
|
||||
healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId;
|
||||
|
||||
if (noStatus)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_STATUS_BALL_CAUGHT), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_STATUS_BALL_CAUGHT), (void *)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
||||
else
|
||||
CpuFill32(0, (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
||||
CpuFill32(0, (void *)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 8) * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
|
||||
static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
|
||||
@ -2018,7 +2018,7 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
|
||||
statusGfxPtr = GetHealthboxElementGfxPtr(HEALTHBOX_GFX_39);
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder + i) * TILE_SIZE_4BPP), 32);
|
||||
CpuCopy32(statusGfxPtr, (void *)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder + i) * TILE_SIZE_4BPP), 32);
|
||||
|
||||
if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_1), (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 64);
|
||||
@ -2031,14 +2031,14 @@ static void UpdateStatusIconInHealthbox(u8 healthboxSpriteId)
|
||||
pltAdder += battlerId + 12;
|
||||
|
||||
FillPalette(sStatusIconColors[statusPalId], pltAdder + 0x100, 2);
|
||||
CpuCopy16(gPlttBufferUnfaded + 0x100 + pltAdder, (void*)(OBJ_PLTT + pltAdder * 2), 2);
|
||||
CpuCopy32(statusGfxPtr, (void*)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * TILE_SIZE_4BPP), 96);
|
||||
CpuCopy16(gPlttBufferUnfaded + 0x100 + pltAdder, (void *)(OBJ_PLTT + pltAdder * 2), 2);
|
||||
CpuCopy32(statusGfxPtr, (void *)(OBJ_VRAM0 + (gSprites[healthboxSpriteId].oam.tileNum + tileNumAdder) * TILE_SIZE_4BPP), 96);
|
||||
if (IsDoubleBattle() == TRUE || GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
||||
{
|
||||
if (!gBattleSpritesDataPtr->battlerData[battlerId].hpNumbersNoBars)
|
||||
{
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_0), (void*)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_65), (void*)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 1) * TILE_SIZE_4BPP), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_0), (void *)(OBJ_VRAM0 + gSprites[healthBarSpriteId].oam.tileNum * TILE_SIZE_4BPP), 32);
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_65), (void *)(OBJ_VRAM0 + (gSprites[healthBarSpriteId].oam.tileNum + 1) * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
}
|
||||
TryAddPokeballIconToHealthbox(healthboxSpriteId, FALSE);
|
||||
@ -2111,8 +2111,8 @@ static void UpdateSafariBallsTextOnHealthbox(u8 healthboxSpriteId)
|
||||
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(gText_SafariBalls, 0, 3, 2, &windowId);
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x40) + spriteTileNum, windowTileData, 6);
|
||||
TextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x800) + spriteTileNum, windowTileData + 0xC0, 2);
|
||||
TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x40) + spriteTileNum, windowTileData, 6);
|
||||
TextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x800) + spriteTileNum, windowTileData + 0xC0, 2);
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
}
|
||||
|
||||
@ -2128,8 +2128,8 @@ static void UpdateLeftNoOfBallsTextOnHealthbox(u8 healthboxSpriteId)
|
||||
|
||||
windowTileData = AddTextPrinterAndCreateWindowOnHealthbox(text, GetStringRightAlignXOffset(FONT_SMALL, text, 0x2F), 3, 2, &windowId);
|
||||
spriteTileNum = gSprites[healthboxSpriteId].oam.tileNum * TILE_SIZE_4BPP;
|
||||
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0x2C0) + spriteTileNum, windowTileData, 2);
|
||||
SafariTextIntoHealthboxObject((void*)(OBJ_VRAM0 + 0xA00) + spriteTileNum, windowTileData + 0x40, 4);
|
||||
SafariTextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0x2C0) + spriteTileNum, windowTileData, 2);
|
||||
SafariTextIntoHealthboxObject((void *)(OBJ_VRAM0 + 0xA00) + spriteTileNum, windowTileData + 0x40, 4);
|
||||
RemoveWindowOnHealthbox(windowId);
|
||||
}
|
||||
|
||||
@ -2273,10 +2273,10 @@ static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar)
|
||||
u8 healthbarSpriteId = gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].hMain_HealthBarSpriteId;
|
||||
if (i < 2)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(barElementId) + array[i] * 32,
|
||||
(void*)(OBJ_VRAM0 + (gSprites[healthbarSpriteId].oam.tileNum + 2 + i) * TILE_SIZE_4BPP), 32);
|
||||
(void *)(OBJ_VRAM0 + (gSprites[healthbarSpriteId].oam.tileNum + 2 + i) * TILE_SIZE_4BPP), 32);
|
||||
else
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(barElementId) + array[i] * 32,
|
||||
(void*)(OBJ_VRAM0 + 64 + (i + gSprites[healthbarSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
|
||||
(void *)(OBJ_VRAM0 + 64 + (i + gSprites[healthbarSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
break;
|
||||
case EXP_BAR:
|
||||
@ -2295,10 +2295,10 @@ static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar)
|
||||
{
|
||||
if (i < 4)
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_12) + array[i] * 32,
|
||||
(void*)(OBJ_VRAM0 + (gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum + 0x24 + i) * TILE_SIZE_4BPP), 32);
|
||||
(void *)(OBJ_VRAM0 + (gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum + 0x24 + i) * TILE_SIZE_4BPP), 32);
|
||||
else
|
||||
CpuCopy32(GetHealthboxElementGfxPtr(HEALTHBOX_GFX_12) + array[i] * 32,
|
||||
(void*)(OBJ_VRAM0 + 0xB80 + (i + gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
|
||||
(void *)(OBJ_VRAM0 + 0xB80 + (i + gSprites[gBattleSpritesDataPtr->battleBars[battlerId].healthboxSpriteId].oam.tileNum) * TILE_SIZE_4BPP), 32);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2522,7 +2522,7 @@ u8 GetHPBarLevel(s16 hp, s16 maxhp)
|
||||
return result;
|
||||
}
|
||||
|
||||
static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 bgColor, u32 *windowId)
|
||||
static u8 *AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, u32 bgColor, u32 *windowId)
|
||||
{
|
||||
u16 winId;
|
||||
u8 color[3];
|
||||
@ -2538,7 +2538,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y,
|
||||
AddTextPrinterParameterized4(winId, FONT_SMALL, x, y, 0, 0, color, TEXT_SKIP_DRAW, str);
|
||||
|
||||
*windowId = winId;
|
||||
return (u8*)(GetWindowAttribute(winId, WINDOW_TILE_DATA));
|
||||
return (u8 *)(GetWindowAttribute(winId, WINDOW_TILE_DATA));
|
||||
}
|
||||
|
||||
static void RemoveWindowOnHealthbox(u32 windowId)
|
||||
|
@ -118,7 +118,7 @@ static void HandleEndTurn_BattleLost(void);
|
||||
static void HandleEndTurn_RanFromBattle(void);
|
||||
static void HandleEndTurn_MonFled(void);
|
||||
static void HandleEndTurn_FinishBattle(void);
|
||||
static void SpriteCB_UnusedBattleInit(struct Sprite* sprite);
|
||||
static void SpriteCB_UnusedBattleInit(struct Sprite *sprite);
|
||||
static void SpriteCB_UnusedBattleInit_Main(struct Sprite *sprite);
|
||||
|
||||
EWRAM_DATA u16 gBattle_BG0_X = 0;
|
||||
@ -606,7 +606,7 @@ static void CB2_InitBattleInternal(void)
|
||||
SetHBlankCallback(NULL);
|
||||
SetVBlankCallback(NULL);
|
||||
|
||||
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
|
||||
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
|
||||
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, DISPLAY_WIDTH);
|
||||
@ -1805,7 +1805,7 @@ static void CB2_HandleStartMultiBattle(void)
|
||||
case 8:
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
u32* ptr = gBattleStruct->multiBuffer.battleVideo;
|
||||
u32 *ptr = gBattleStruct->multiBuffer.battleVideo;
|
||||
ptr[0] = gBattleTypeFlags;
|
||||
ptr[1] = gRecordedBattleRngSeed; // UB: overwrites berry data
|
||||
SendBlock(BitmaskAllOtherLinkPlayers(), ptr, sizeof(gBattleStruct->multiBuffer.battleVideo));
|
||||
@ -1891,7 +1891,7 @@ void CB2_QuitRecordedBattle(void)
|
||||
#define sState data[0]
|
||||
#define sDelay data[4]
|
||||
|
||||
static void SpriteCB_UnusedBattleInit(struct Sprite* sprite)
|
||||
static void SpriteCB_UnusedBattleInit(struct Sprite *sprite)
|
||||
{
|
||||
sprite->sState = 0;
|
||||
sprite->callback = SpriteCB_UnusedBattleInit_Main;
|
||||
@ -1899,7 +1899,7 @@ static void SpriteCB_UnusedBattleInit(struct Sprite* sprite)
|
||||
|
||||
static void SpriteCB_UnusedBattleInit_Main(struct Sprite *sprite)
|
||||
{
|
||||
u16 *arr = (u16*)gDecompressionBuffer;
|
||||
u16 *arr = (u16 *)gDecompressionBuffer;
|
||||
|
||||
switch (sprite->sState)
|
||||
{
|
||||
@ -2178,7 +2178,7 @@ void CB2_InitEndLinkBattle(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
|
||||
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, DISPLAY_WIDTH);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(DISPLAY_HEIGHT / 2, DISPLAY_HEIGHT / 2 + 1));
|
||||
@ -2319,7 +2319,7 @@ static void EndLinkBattleInSteps(void)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
CpuFill32(0, (void*)VRAM, VRAM_SIZE);
|
||||
CpuFill32(0, (void *)VRAM, VRAM_SIZE);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
LoadChosenBattleElement(i);
|
||||
@ -2406,7 +2406,7 @@ static void CB2_InitAskRecordBattle(void)
|
||||
|
||||
SetHBlankCallback(NULL);
|
||||
SetVBlankCallback(NULL);
|
||||
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
|
||||
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
|
||||
ResetPaletteFade();
|
||||
gBattle_BG0_X = 0;
|
||||
gBattle_BG0_Y = 0;
|
||||
@ -2787,7 +2787,7 @@ static void SpriteCB_AnimFaintOpponent(struct Sprite *sprite)
|
||||
}
|
||||
else // Erase bottom part of the sprite to create a smooth illusion of mon falling down.
|
||||
{
|
||||
u8* dst = gMonSpritesGfxPtr->sprites.byte[GetBattlerPosition(sprite->sBattler)] + (gBattleMonForms[sprite->sBattler] << 11) + (sprite->data[3] << 8);
|
||||
u8 *dst = gMonSpritesGfxPtr->sprites.byte[GetBattlerPosition(sprite->sBattler)] + (gBattleMonForms[sprite->sBattler] << 11) + (sprite->data[3] << 8);
|
||||
|
||||
for (i = 0; i < 0x100; i++)
|
||||
*(dst++) = 0;
|
||||
@ -3109,10 +3109,10 @@ static void BattleStartClearSetData(void)
|
||||
*((u8 *)gBattleStruct->usedHeldItems + i) = 0;
|
||||
*((u8 *)gBattleStruct->choicedMove + i) = 0;
|
||||
*((u8 *)gBattleStruct->changedItems + i) = 0;
|
||||
*(i + 0 * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i + 1 * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i + 2 * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i + 3 * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i + 0 * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i + 1 * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i + 2 * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i + 3 * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
|
||||
@ -3214,14 +3214,14 @@ void SwitchInClearSetData(void)
|
||||
|
||||
*(gBattleStruct->lastTakenMove + gActiveBattler * 2 + 0) = 0;
|
||||
*(gBattleStruct->lastTakenMove + gActiveBattler * 2 + 1) = 0;
|
||||
*(0 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(0 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(1 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(1 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(2 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(2 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(0 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(0 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(1 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(1 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(2 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(2 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
|
||||
gBattleStruct->palaceFlags &= ~(gBitTable[gActiveBattler]);
|
||||
|
||||
@ -3232,12 +3232,12 @@ void SwitchInClearSetData(void)
|
||||
*(gBattleStruct->lastTakenMove + i * 2 + 0) = 0;
|
||||
*(gBattleStruct->lastTakenMove + i * 2 + 1) = 0;
|
||||
}
|
||||
*(i * 8 + gActiveBattler * 2 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i * 8 + gActiveBattler * 2 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
}
|
||||
|
||||
*(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBattler]) + 0) = 0;
|
||||
*(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBattler]) + 1) = 0;
|
||||
*(u8 *)((u8 *)(&gBattleStruct->choicedMove[gActiveBattler]) + 0) = 0;
|
||||
*(u8 *)((u8 *)(&gBattleStruct->choicedMove[gActiveBattler]) + 1) = 0;
|
||||
|
||||
gBattleResources->flags->flags[gActiveBattler] = 0;
|
||||
gCurrentMove = 0;
|
||||
@ -3275,25 +3275,25 @@ void FaintClearSetData(void)
|
||||
for (i = 0; i < sizeof(struct DisableStruct); i++)
|
||||
ptr[i] = 0;
|
||||
|
||||
gProtectStructs[gActiveBattler].protected = 0;
|
||||
gProtectStructs[gActiveBattler].endured = 0;
|
||||
gProtectStructs[gActiveBattler].noValidMoves = 0;
|
||||
gProtectStructs[gActiveBattler].helpingHand = 0;
|
||||
gProtectStructs[gActiveBattler].bounceMove = 0;
|
||||
gProtectStructs[gActiveBattler].stealMove = 0;
|
||||
gProtectStructs[gActiveBattler].flag0Unknown = 0;
|
||||
gProtectStructs[gActiveBattler].prlzImmobility = 0;
|
||||
gProtectStructs[gActiveBattler].confusionSelfDmg = 0;
|
||||
gProtectStructs[gActiveBattler].targetNotAffected = 0;
|
||||
gProtectStructs[gActiveBattler].chargingTurn = 0;
|
||||
gProtectStructs[gActiveBattler].protected = FALSE;
|
||||
gProtectStructs[gActiveBattler].endured = FALSE;
|
||||
gProtectStructs[gActiveBattler].noValidMoves = FALSE;
|
||||
gProtectStructs[gActiveBattler].helpingHand = FALSE;
|
||||
gProtectStructs[gActiveBattler].bounceMove = FALSE;
|
||||
gProtectStructs[gActiveBattler].stealMove = FALSE;
|
||||
gProtectStructs[gActiveBattler].flag0Unknown = FALSE;
|
||||
gProtectStructs[gActiveBattler].prlzImmobility = FALSE;
|
||||
gProtectStructs[gActiveBattler].confusionSelfDmg = FALSE;
|
||||
gProtectStructs[gActiveBattler].targetNotAffected = FALSE;
|
||||
gProtectStructs[gActiveBattler].chargingTurn = FALSE;
|
||||
gProtectStructs[gActiveBattler].fleeType = 0;
|
||||
gProtectStructs[gActiveBattler].usedImprisonedMove = 0;
|
||||
gProtectStructs[gActiveBattler].loveImmobility = 0;
|
||||
gProtectStructs[gActiveBattler].usedDisabledMove = 0;
|
||||
gProtectStructs[gActiveBattler].usedTauntedMove = 0;
|
||||
gProtectStructs[gActiveBattler].flag2Unknown = 0;
|
||||
gProtectStructs[gActiveBattler].flinchImmobility = 0;
|
||||
gProtectStructs[gActiveBattler].notFirstStrike = 0;
|
||||
gProtectStructs[gActiveBattler].usedImprisonedMove = FALSE;
|
||||
gProtectStructs[gActiveBattler].loveImmobility = FALSE;
|
||||
gProtectStructs[gActiveBattler].usedDisabledMove = FALSE;
|
||||
gProtectStructs[gActiveBattler].usedTauntedMove = FALSE;
|
||||
gProtectStructs[gActiveBattler].flag2Unknown = FALSE;
|
||||
gProtectStructs[gActiveBattler].flinchImmobility = FALSE;
|
||||
gProtectStructs[gActiveBattler].notFirstStrike = FALSE;
|
||||
|
||||
gDisableStructs[gActiveBattler].isFirstTurn = 2;
|
||||
|
||||
@ -3304,19 +3304,19 @@ void FaintClearSetData(void)
|
||||
gLastPrintedMoves[gActiveBattler] = 0;
|
||||
gLastHitBy[gActiveBattler] = 0xFF;
|
||||
|
||||
*(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBattler]) + 0) = 0;
|
||||
*(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBattler]) + 1) = 0;
|
||||
*(u8 *)((u8 *)(&gBattleStruct->choicedMove[gActiveBattler]) + 0) = 0;
|
||||
*(u8 *)((u8 *)(&gBattleStruct->choicedMove[gActiveBattler]) + 1) = 0;
|
||||
|
||||
*(gBattleStruct->lastTakenMove + gActiveBattler * 2 + 0) = 0;
|
||||
*(gBattleStruct->lastTakenMove + gActiveBattler * 2 + 1) = 0;
|
||||
*(0 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(0 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(1 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(1 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(2 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(2 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(0 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(0 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(1 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(1 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(2 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(2 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(3 * 2 + gActiveBattler * 8 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
|
||||
gBattleStruct->palaceFlags &= ~(gBitTable[gActiveBattler]);
|
||||
|
||||
@ -3327,8 +3327,8 @@ void FaintClearSetData(void)
|
||||
*(gBattleStruct->lastTakenMove + i * 2 + 0) = 0;
|
||||
*(gBattleStruct->lastTakenMove + i * 2 + 1) = 0;
|
||||
}
|
||||
*(i * 8 + gActiveBattler * 2 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i * 8 + gActiveBattler * 2 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
*(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 0) = 0;
|
||||
*(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0;
|
||||
}
|
||||
|
||||
gBattleResources->flags->flags[gActiveBattler] = 0;
|
||||
@ -3395,7 +3395,7 @@ static void BattleIntroDrawTrainersOrMonsSprites(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
u16* hpOnSwitchout;
|
||||
u16 *hpOnSwitchout;
|
||||
|
||||
ptr = (u8 *)&gBattleMons[gActiveBattler];
|
||||
for (i = 0; i < sizeof(struct BattlePokemon); i++)
|
||||
@ -4055,7 +4055,7 @@ void SwitchPartyOrder(u8 battler)
|
||||
u8 partyId2;
|
||||
|
||||
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
|
||||
gBattlePartyCurrentOrder[i] = *(battler * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders));
|
||||
gBattlePartyCurrentOrder[i] = *(battler * 3 + i + (u8 *)(gBattleStruct->battlerPartyOrders));
|
||||
|
||||
partyId1 = GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battler]);
|
||||
partyId2 = GetPartyIdFromBattlePartyId(*(gBattleStruct->monToSwitchIntoId + battler));
|
||||
@ -4065,15 +4065,15 @@ void SwitchPartyOrder(u8 battler)
|
||||
{
|
||||
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
|
||||
{
|
||||
*(battler * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
|
||||
*(BATTLE_PARTNER(battler) * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
|
||||
*(battler * 3 + i + (u8 *)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
|
||||
*(BATTLE_PARTNER(battler) * 3 + i + (u8 *)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
|
||||
{
|
||||
*(battler * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
|
||||
*(battler * 3 + i + (u8 *)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4543,13 +4543,13 @@ static void UpdateBattlerPartyOrdersOnSwitch(void)
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI)
|
||||
{
|
||||
*(gActiveBattler * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) &= 0xF;
|
||||
*(gActiveBattler * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0);
|
||||
*(gActiveBattler * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 1) = gBattleBufferB[gActiveBattler][3];
|
||||
*(gActiveBattler * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 0) &= 0xF;
|
||||
*(gActiveBattler * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0);
|
||||
*(gActiveBattler * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 1) = gBattleBufferB[gActiveBattler][3];
|
||||
|
||||
*((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) &= (0xF0);
|
||||
*((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0) >> 4;
|
||||
*((gActiveBattler ^ BIT_FLANK) * 3 + (u8*)(gBattleStruct->battlerPartyOrders) + 2) = gBattleBufferB[gActiveBattler][3];
|
||||
*((gActiveBattler ^ BIT_FLANK) * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 0) &= (0xF0);
|
||||
*((gActiveBattler ^ BIT_FLANK) * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 0) |= (gBattleBufferB[gActiveBattler][2] & 0xF0) >> 4;
|
||||
*((gActiveBattler ^ BIT_FLANK) * 3 + (u8 *)(gBattleStruct->battlerPartyOrders) + 2) = gBattleBufferB[gActiveBattler][3];
|
||||
}
|
||||
}
|
||||
|
||||
@ -4831,7 +4831,7 @@ static void TurnValuesCleanUp(bool8 var0)
|
||||
}
|
||||
else
|
||||
{
|
||||
dataPtr = (u8*)(&gProtectStructs[gActiveBattler]);
|
||||
dataPtr = (u8 *)(&gProtectStructs[gActiveBattler]);
|
||||
for (i = 0; i < sizeof(struct ProtectStruct); i++)
|
||||
dataPtr[i] = 0;
|
||||
|
||||
@ -4859,7 +4859,7 @@ void SpecialStatusesClear(void)
|
||||
for (gActiveBattler = 0; gActiveBattler < gBattlersCount; gActiveBattler++)
|
||||
{
|
||||
s32 i;
|
||||
u8 *dataPtr = (u8*)(&gSpecialStatuses[gActiveBattler]);
|
||||
u8 *dataPtr = (u8 *)(&gSpecialStatuses[gActiveBattler]);
|
||||
|
||||
for (i = 0; i < sizeof(struct SpecialStatus); i++)
|
||||
dataPtr[i] = 0;
|
||||
|
@ -1010,7 +1010,7 @@ const u16 gStatUpStringIds[] =
|
||||
[B_MSG_STAT_WONT_INCREASE] = STRINGID_STATSWONTINCREASE,
|
||||
[B_MSG_STAT_ROSE_EMPTY] = STRINGID_EMPTYSTRING3,
|
||||
[B_MSG_STAT_ROSE_ITEM] = STRINGID_USINGITEMSTATOFPKMNROSE,
|
||||
[B_MSG_USED_DIRE_HIT] = STRINGID_PKMNUSEDXTOGETPUMPED,
|
||||
[B_MSG_USED_DIRE_HIT] = STRINGID_PKMNUSEDXTOGETPUMPED,
|
||||
};
|
||||
|
||||
const u16 gStatDownStringIds[] =
|
||||
@ -2059,7 +2059,7 @@ void BufferStringBattle(u16 stringID)
|
||||
s32 i;
|
||||
const u8 *stringPtr = NULL;
|
||||
|
||||
gBattleMsgDataPtr = (struct BattleMsgData*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
gBattleMsgDataPtr = (struct BattleMsgData *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
gLastUsedItem = gBattleMsgDataPtr->lastItem;
|
||||
gLastUsedAbility = gBattleMsgDataPtr->lastAbility;
|
||||
gBattleScripting.battler = gBattleMsgDataPtr->scrActive;
|
||||
@ -2346,17 +2346,17 @@ void BufferStringBattle(u16 stringID)
|
||||
BattleStringExpandPlaceholdersToDisplayedString(stringPtr);
|
||||
}
|
||||
|
||||
u32 BattleStringExpandPlaceholdersToDisplayedString(const u8* src)
|
||||
u32 BattleStringExpandPlaceholdersToDisplayedString(const u8 *src)
|
||||
{
|
||||
BattleStringExpandPlaceholders(src, gDisplayedStringBattle);
|
||||
}
|
||||
|
||||
static const u8* TryGetStatusString(u8 *src)
|
||||
static const u8 *TryGetStatusString(u8 *src)
|
||||
{
|
||||
u32 i;
|
||||
u8 status[8];
|
||||
u32 chars1, chars2;
|
||||
u8* statusPtr;
|
||||
u8 *statusPtr;
|
||||
|
||||
memcpy(status, sDummyWeirdStatusString, 8);
|
||||
|
||||
@ -2369,13 +2369,13 @@ static const u8* TryGetStatusString(u8 *src)
|
||||
statusPtr++;
|
||||
}
|
||||
|
||||
chars1 = *(u32*)(&status[0]);
|
||||
chars2 = *(u32*)(&status[4]);
|
||||
chars1 = *(u32 *)(&status[0]);
|
||||
chars2 = *(u32 *)(&status[4]);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gStatusConditionStringsTable); i++)
|
||||
{
|
||||
if (chars1 == *(u32*)(&gStatusConditionStringsTable[i][0][0])
|
||||
&& chars2 == *(u32*)(&gStatusConditionStringsTable[i][0][4]))
|
||||
if (chars1 == *(u32 *)(&gStatusConditionStringsTable[i][0][0])
|
||||
&& chars2 == *(u32 *)(&gStatusConditionStringsTable[i][0][4]))
|
||||
return gStatusConditionStringsTable[i][1];
|
||||
}
|
||||
return NULL;
|
||||
@ -2966,7 +2966,7 @@ static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst)
|
||||
// unused, since the value loaded into the buffer is not read; it loaded one of
|
||||
// two particles (either "は" or "の") which works in tandem with ChooseTypeOfMoveUsedString
|
||||
// below to effect changes in the meaning of the line.
|
||||
static void ChooseMoveUsedParticle(u8* textBuff)
|
||||
static void ChooseMoveUsedParticle(u8 *textBuff)
|
||||
{
|
||||
s32 counter = 0;
|
||||
u32 i = 0;
|
||||
@ -3006,7 +3006,7 @@ static void ChooseMoveUsedParticle(u8* textBuff)
|
||||
//
|
||||
// sText_ExclamationMark5 was " こうげき!" This resulted in a translation of
|
||||
// "<NAME>'s <ATTACK> attack!".
|
||||
static void ChooseTypeOfMoveUsedString(u8* dst)
|
||||
static void ChooseTypeOfMoveUsedString(u8 *dst)
|
||||
{
|
||||
s32 counter = 0;
|
||||
s32 i = 0;
|
||||
@ -3119,7 +3119,7 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
|
||||
|
||||
void SetPpNumbersPaletteInMoveSelection(void)
|
||||
{
|
||||
struct ChooseMoveStruct *chooseMoveStruct = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]);
|
||||
struct ChooseMoveStruct *chooseMoveStruct = (struct ChooseMoveStruct *)(&gBattleBufferA[gActiveBattler][4]);
|
||||
const u16 *palPtr = gPPTextPalette;
|
||||
u8 var = GetCurrentPpToMaxPpState(chooseMoveStruct->currentPp[gMoveSelectionCursor[gActiveBattler]],
|
||||
chooseMoveStruct->maxPp[gMoveSelectionCursor[gActiveBattler]]);
|
||||
|
@ -388,7 +388,7 @@ static void RemoveTrainerHillRecordsWindow(u8 windowId)
|
||||
|
||||
static void ClearVramOamPlttRegs(void)
|
||||
{
|
||||
DmaClearLarge16(3, (void*)(VRAM), VRAM_SIZE, 0x1000);
|
||||
DmaClearLarge16(3, (void *)(VRAM), VRAM_SIZE, 0x1000);
|
||||
DmaClear32(3, OAM, OAM_SIZE);
|
||||
DmaClear16(3, PLTT, PLTT_SIZE);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -600,7 +600,7 @@ void StartRegiBattle(void)
|
||||
|
||||
static void CB2_EndWildBattle(void)
|
||||
{
|
||||
CpuFill16(0, (void*)(BG_PLTT), BG_PLTT_SIZE);
|
||||
CpuFill16(0, (void *)(BG_PLTT), BG_PLTT_SIZE);
|
||||
ResetOamRange(0, 128);
|
||||
|
||||
if (IsPlayerDefeated(gBattleOutcome) == TRUE && !InBattlePyramid() && !InBattlePike())
|
||||
@ -616,7 +616,7 @@ static void CB2_EndWildBattle(void)
|
||||
|
||||
static void CB2_EndScriptedWildBattle(void)
|
||||
{
|
||||
CpuFill16(0, (void*)(BG_PLTT), BG_PLTT_SIZE);
|
||||
CpuFill16(0, (void *)(BG_PLTT), BG_PLTT_SIZE);
|
||||
ResetOamRange(0, 128);
|
||||
|
||||
if (IsPlayerDefeated(gBattleOutcome) == TRUE)
|
||||
@ -1037,22 +1037,22 @@ static void InitTrainerBattleVariables(void)
|
||||
|
||||
static inline void SetU8(void *ptr, u8 value)
|
||||
{
|
||||
*(u8*)(ptr) = value;
|
||||
*(u8 *)(ptr) = value;
|
||||
}
|
||||
|
||||
static inline void SetU16(void *ptr, u16 value)
|
||||
{
|
||||
*(u16*)(ptr) = value;
|
||||
*(u16 *)(ptr) = value;
|
||||
}
|
||||
|
||||
static inline void SetU32(void *ptr, u32 value)
|
||||
{
|
||||
*(u32*)(ptr) = value;
|
||||
*(u32 *)(ptr) = value;
|
||||
}
|
||||
|
||||
static inline void SetPtr(const void *ptr, const void* value)
|
||||
static inline void SetPtr(const void *ptr, const void *value)
|
||||
{
|
||||
*(const void**)(ptr) = value;
|
||||
*(const void **)(ptr) = value;
|
||||
}
|
||||
|
||||
static void TrainerBattleLoadArgs(const struct TrainerBattleParameter *specs, const u8 *data)
|
||||
|
@ -996,7 +996,7 @@ static bool8 ChooseSpecialBattleTowerTrainer(void)
|
||||
winStreak = GetCurrentBattleTowerWinStreak(lvlMode, battleMode);
|
||||
for (i = 0; i < BATTLE_TOWER_RECORD_COUNT; i++)
|
||||
{
|
||||
u32 *record = (u32*)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
|
||||
u32 *record = (u32 *)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
|
||||
u32 recordHasData = 0;
|
||||
u32 checksum = 0;
|
||||
for (j = 0; j < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; j++) // - 4, because of the last field being the checksum itself.
|
||||
@ -2374,7 +2374,7 @@ static void LoadMultiPartnerCandidatesData(void)
|
||||
r10 = 0;
|
||||
for (i = 0; i < BATTLE_TOWER_RECORD_COUNT; i++)
|
||||
{
|
||||
u32 *record = (u32*)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
|
||||
u32 *record = (u32 *)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
|
||||
u32 recordHasData = 0;
|
||||
u32 checksum = 0;
|
||||
for (j = 0; j < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; j++) // - 4, because of the last field being the checksum itself.
|
||||
@ -2690,7 +2690,7 @@ static void SetTowerInterviewData(void)
|
||||
static void ValidateBattleTowerRecordChecksums(void)
|
||||
{
|
||||
s32 i, j;
|
||||
u32 *record = (u32*)(&gSaveBlock2Ptr->frontier.towerPlayer);
|
||||
u32 *record = (u32 *)(&gSaveBlock2Ptr->frontier.towerPlayer);
|
||||
u32 checksum = 0;
|
||||
|
||||
for (j = 0; j < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; j++) // - 4, because of the last field being the checksum itself.
|
||||
@ -2702,7 +2702,7 @@ static void ValidateBattleTowerRecordChecksums(void)
|
||||
|
||||
for (i = 0; i < BATTLE_TOWER_RECORD_COUNT; i++)
|
||||
{
|
||||
record = (u32*)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
|
||||
record = (u32 *)(&gSaveBlock2Ptr->frontier.towerRecords[i]);
|
||||
checksum = 0;
|
||||
for (j = 0; j < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; j++) // - 4, because of the last field being the checksum itself.
|
||||
{
|
||||
@ -3195,7 +3195,7 @@ static void ValidateApprenticesChecksums(void)
|
||||
|
||||
for (i = 0; i < APPRENTICE_COUNT; i++)
|
||||
{
|
||||
u32 *data = (u32*) &gSaveBlock2Ptr->apprentices[i];
|
||||
u32 *data = (u32 *) &gSaveBlock2Ptr->apprentices[i];
|
||||
u32 checksum = 0;
|
||||
for (j = 0; j < (sizeof(struct Apprentice) - 4) / 4; j++)
|
||||
checksum += data[j];
|
||||
@ -3504,7 +3504,7 @@ u8 FacilityClassToGraphicsId(u8 facilityClass)
|
||||
bool32 ValidateBattleTowerRecord(u8 recordId) // unused
|
||||
{
|
||||
s32 i;
|
||||
u32 *record = (u32*)(&gSaveBlock2Ptr->frontier.towerRecords[recordId]);
|
||||
u32 *record = (u32 *)(&gSaveBlock2Ptr->frontier.towerRecords[recordId]);
|
||||
u32 checksum = 0;
|
||||
u32 hasData = 0;
|
||||
for (i = 0; i < (sizeof(struct EmeraldBattleTowerRecord) - 4) / 4; i++) // - 4, because of the last fjeld bejng the checksum jtself.
|
||||
|
@ -2186,7 +2186,7 @@ static bool8 Wave_Init(struct Task *task)
|
||||
static bool8 Wave_Main(struct Task *task)
|
||||
{
|
||||
u8 i, sinIndex;
|
||||
u16* toStore;
|
||||
u16 *toStore;
|
||||
bool8 finished;
|
||||
|
||||
sTransitionData->VBlank_DMA = FALSE;
|
||||
@ -2347,7 +2347,7 @@ static bool8 Mugshot_SetGfx(struct Task *task)
|
||||
static bool8 Mugshot_ShowBanner(struct Task *task)
|
||||
{
|
||||
u8 i, sinIndex;
|
||||
u16* toStore;
|
||||
u16 *toStore;
|
||||
s16 x;
|
||||
s32 mergedValue;
|
||||
|
||||
@ -2388,7 +2388,7 @@ static bool8 Mugshot_ShowBanner(struct Task *task)
|
||||
if (task->tBottomBannerX < 0)
|
||||
task->tBottomBannerX = 0;
|
||||
|
||||
mergedValue = *(s32*)(&task->tTopBannerX);
|
||||
mergedValue = *(s32 *)(&task->tTopBannerX);
|
||||
if (mergedValue == DISPLAY_WIDTH)
|
||||
task->tState++;
|
||||
|
||||
@ -2401,7 +2401,7 @@ static bool8 Mugshot_ShowBanner(struct Task *task)
|
||||
static bool8 Mugshot_StartOpponentSlide(struct Task *task)
|
||||
{
|
||||
u8 i;
|
||||
u16* toStore;
|
||||
u16 *toStore;
|
||||
|
||||
sTransitionData->VBlank_DMA = FALSE;
|
||||
|
||||
@ -3716,8 +3716,8 @@ static void SpriteCB_WhiteBarFade(struct Sprite *sprite)
|
||||
else
|
||||
{
|
||||
u16 i;
|
||||
u16* ptr1 = &gScanlineEffectRegBuffers[0][sprite->y];
|
||||
u16* ptr2 = &gScanlineEffectRegBuffers[0][sprite->y + DISPLAY_HEIGHT];
|
||||
u16 *ptr1 = &gScanlineEffectRegBuffers[0][sprite->y];
|
||||
u16 *ptr2 = &gScanlineEffectRegBuffers[0][sprite->y + DISPLAY_HEIGHT];
|
||||
for (i = 0; i < DISPLAY_HEIGHT / NUM_WHITE_BARS; i++)
|
||||
{
|
||||
ptr1[i] = sprite->sFade >> 8;
|
||||
@ -3783,7 +3783,7 @@ static bool8 GridSquares_Init(struct Task *task)
|
||||
|
||||
static bool8 GridSquares_Main(struct Task *task)
|
||||
{
|
||||
u16* tileset;
|
||||
u16 *tileset;
|
||||
|
||||
if (task->tDelay == 0)
|
||||
{
|
||||
@ -4061,7 +4061,7 @@ static void GetBg0TilemapDst(u16 **tileset)
|
||||
{
|
||||
u16 charBase = REG_BG0CNT >> 2;
|
||||
charBase <<= 14;
|
||||
*tileset = (u16*)(BG_VRAM + charBase);
|
||||
*tileset = (u16 *)(BG_VRAM + charBase);
|
||||
}
|
||||
|
||||
void GetBg0TilesDst(u16 **tilemap, u16 **tileset)
|
||||
@ -4072,8 +4072,8 @@ void GetBg0TilesDst(u16 **tilemap, u16 **tileset)
|
||||
screenBase <<= 11;
|
||||
charBase <<= 14;
|
||||
|
||||
*tilemap = (u16*)(BG_VRAM + screenBase);
|
||||
*tileset = (u16*)(BG_VRAM + charBase);
|
||||
*tilemap = (u16 *)(BG_VRAM + screenBase);
|
||||
*tileset = (u16 *)(BG_VRAM + charBase);
|
||||
}
|
||||
|
||||
static void FadeScreenBlack(void)
|
||||
|
@ -93,7 +93,7 @@ void HandleAction_UseMove(void)
|
||||
gBattleStruct->atkCancellerTracker = 0;
|
||||
gMoveResultFlags = 0;
|
||||
gMultiHitCounter = 0;
|
||||
gBattleCommunication[6] = 0;
|
||||
gBattleCommunication[MISS_TYPE] = 0;
|
||||
gCurrMovePos = gChosenMovePos = *(gBattleStruct->chosenMovePositions + gBattlerAttacker);
|
||||
|
||||
// choose move
|
||||
@ -961,7 +961,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
|
||||
u8 limitations = 0;
|
||||
u16 move = gBattleMons[gActiveBattler].moves[gBattleBufferB[gActiveBattler][2]];
|
||||
u8 holdEffect;
|
||||
u16* choicedMove = &gBattleStruct->choicedMove[gActiveBattler];
|
||||
u16 *choicedMove = &gBattleStruct->choicedMove[gActiveBattler];
|
||||
|
||||
if (gDisableStructs[gActiveBattler].disabledMove == move && move != MOVE_NONE)
|
||||
{
|
||||
@ -1199,7 +1199,7 @@ u8 DoFieldEndTurnEffects(void)
|
||||
|
||||
// It's stupid, but won't match without it
|
||||
{
|
||||
u8* var = &gBattleStruct->turnCountersTracker;
|
||||
u8 *var = &gBattleStruct->turnCountersTracker;
|
||||
(*var)++;
|
||||
gBattleStruct->turnSideTracker = 0;
|
||||
}
|
||||
|
@ -109,12 +109,12 @@ void SwitchPartyOrderInGameMulti(u8 battlerId, u8 arg1)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
|
||||
gBattlePartyCurrentOrder[i] = *(0 * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders));
|
||||
gBattlePartyCurrentOrder[i] = *(0 * 3 + i + (u8 *)(gBattleStruct->battlerPartyOrders));
|
||||
|
||||
SwitchPartyMonSlots(GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battlerId]), GetPartyIdFromBattlePartyId(arg1));
|
||||
|
||||
for (i = 0; i < (int)ARRAY_COUNT(gBattlePartyCurrentOrder); i++)
|
||||
*(0 * 3 + i + (u8*)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
|
||||
*(0 * 3 + i + (u8 *)(gBattleStruct->battlerPartyOrders)) = gBattlePartyCurrentOrder[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -946,7 +946,7 @@ void ClearEnigmaBerries(void)
|
||||
void SetEnigmaBerry(u8 *src)
|
||||
{
|
||||
u32 i;
|
||||
u8 *dest = (u8*)&gSaveBlock1Ptr->enigmaBerry;
|
||||
u8 *dest = (u8 *)&gSaveBlock1Ptr->enigmaBerry;
|
||||
|
||||
for (i = 0; i < sizeof(gSaveBlock1Ptr->enigmaBerry); i++)
|
||||
dest[i] = src[i];
|
||||
@ -958,7 +958,7 @@ static u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry)
|
||||
u32 checksum;
|
||||
u8 *dest;
|
||||
|
||||
dest = (u8*)enigmaBerry;
|
||||
dest = (u8 *)enigmaBerry;
|
||||
checksum = 0;
|
||||
for (i = 0; i < sizeof(gSaveBlock1Ptr->enigmaBerry) - sizeof(gSaveBlock1Ptr->enigmaBerry.checksum); i++)
|
||||
checksum += dest[i];
|
||||
@ -980,7 +980,7 @@ bool32 IsEnigmaBerryValid(void)
|
||||
const struct Berry *GetBerryInfo(u8 berry)
|
||||
{
|
||||
if (berry == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) && IsEnigmaBerryValid())
|
||||
return (struct Berry*)(&gSaveBlock1Ptr->enigmaBerry.berry);
|
||||
return (struct Berry *)(&gSaveBlock1Ptr->enigmaBerry.berry);
|
||||
else
|
||||
{
|
||||
if (berry == BERRY_NONE || berry > ITEM_TO_BERRY(LAST_BERRY_INDEX))
|
||||
@ -1172,7 +1172,7 @@ void GetBerryNameByBerryType(u8 berry, u8 *string)
|
||||
string[BERRY_NAME_LENGTH] = EOS;
|
||||
}
|
||||
|
||||
void GetBerryCountStringByBerryType(u8 berry, u8* dest, u32 berryCount)
|
||||
void GetBerryCountStringByBerryType(u8 berry, u8 *dest, u32 berryCount)
|
||||
{
|
||||
GetBerryCountString(dest, GetBerryInfo(berry)->name, berryCount);
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ static void SetPlayerBerryData(u8, u16);
|
||||
static void Blender_AddTextPrinter(u8, const u8 *, u8, u8, s32, s32);
|
||||
static void ResetLinkCmds(void);
|
||||
static void CreateParticleSprites(void);
|
||||
static void ShakeBgCoordForHit(s16*, u16);
|
||||
static void ShakeBgCoordForHit(s16 *, u16);
|
||||
static void TryUpdateProgressBar(u16, u16);
|
||||
static void UpdateRPM(u16);
|
||||
static void RestoreBgCoords(void);
|
||||
@ -265,7 +265,7 @@ static const u8 sText_Master[] = _("MASTER");
|
||||
static const u8 sText_Dude[] = _("DUDE");
|
||||
static const u8 sText_Miss[] = _("MISS");
|
||||
|
||||
static const u8* const sBlenderOpponentsNames[] =
|
||||
static const u8 *const sBlenderOpponentsNames[] =
|
||||
{
|
||||
[BLENDER_MISTER] = sText_Mister,
|
||||
[BLENDER_LADDIE] = sText_Laddie,
|
||||
@ -1145,7 +1145,7 @@ static void CB2_LoadBerryBlender(void)
|
||||
#define sYDownSpeed data[7]
|
||||
|
||||
// For throwing berries into the machine
|
||||
static void SpriteCB_Berry(struct Sprite* sprite)
|
||||
static void SpriteCB_Berry(struct Sprite *sprite)
|
||||
{
|
||||
sprite->sX += sprite->sXSpeed;
|
||||
sprite->sY -= sprite->sYUpSpeed;
|
||||
@ -1166,7 +1166,7 @@ static void SpriteCB_Berry(struct Sprite* sprite)
|
||||
sprite->y = sprite->sY;
|
||||
}
|
||||
|
||||
static void SetBerrySpriteData(struct Sprite* sprite, s16 x, s16 y, s16 bounceSpeed, s16 xSpeed, s16 ySpeed)
|
||||
static void SetBerrySpriteData(struct Sprite *sprite, s16 x, s16 y, s16 bounceSpeed, s16 xSpeed, s16 ySpeed)
|
||||
{
|
||||
sprite->sTargetY = y;
|
||||
sprite->sX = x;
|
||||
@ -2260,7 +2260,7 @@ static bool8 AreBlenderBerriesSame(struct BlenderBerry* berries, u8 a, u8 b)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static u32 CalculatePokeblockColor(struct BlenderBerry* berries, s16* _flavors, u8 numPlayers, u8 negativeFlavors)
|
||||
static u32 CalculatePokeblockColor(struct BlenderBerry* berries, s16 *_flavors, u8 numPlayers, u8 negativeFlavors)
|
||||
{
|
||||
s16 flavors[FLAVOR_COUNT + 1];
|
||||
s32 i, j;
|
||||
@ -2494,7 +2494,7 @@ static void CalculatePokeblock(struct BlenderBerry *berries, struct Pokeblock *p
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void Debug_CalculatePokeblock(struct BlenderBerry* berries, struct Pokeblock* pokeblock, u8 numPlayers, u8* flavors, u16 maxRPM)
|
||||
static void Debug_CalculatePokeblock(struct BlenderBerry* berries, struct Pokeblock* pokeblock, u8 numPlayers, u8 *flavors, u16 maxRPM)
|
||||
{
|
||||
CalculatePokeblock(berries, pokeblock, numPlayers, flavors, maxRPM);
|
||||
}
|
||||
@ -2628,7 +2628,7 @@ static void CB2_EndBlenderGame(void)
|
||||
|
||||
if (gReceivedRemoteLinkPlayers && gWirelessCommType)
|
||||
{
|
||||
struct BlenderGameBlock *receivedBlock = (struct BlenderGameBlock*)(&gBlockRecvBuffer);
|
||||
struct BlenderGameBlock *receivedBlock = (struct BlenderGameBlock *)(&gBlockRecvBuffer);
|
||||
|
||||
sBerryBlender->maxRPM = receivedBlock->timeRPM.maxRPM;
|
||||
sBerryBlender->gameFrameTime = receivedBlock->timeRPM.time;
|
||||
@ -2641,7 +2641,7 @@ static void CB2_EndBlenderGame(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
struct TimeAndRPM *receivedBlock = (struct TimeAndRPM*)(&gBlockRecvBuffer);
|
||||
struct TimeAndRPM *receivedBlock = (struct TimeAndRPM *)(&gBlockRecvBuffer);
|
||||
|
||||
sBerryBlender->maxRPM = receivedBlock->maxRPM;
|
||||
sBerryBlender->gameFrameTime = receivedBlock->time;
|
||||
@ -3159,7 +3159,7 @@ static void SetBgPos(void)
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, sBerryBlender->bg_Y);
|
||||
}
|
||||
|
||||
static void SpriteCB_Particle(struct Sprite* sprite)
|
||||
static void SpriteCB_Particle(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[2] += sprite->data[0];
|
||||
sprite->data[3] += sprite->data[1];
|
||||
@ -3194,7 +3194,7 @@ static void CreateParticleSprites(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_ScoreSymbol(struct Sprite* sprite)
|
||||
static void SpriteCB_ScoreSymbol(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[0]++;
|
||||
sprite->y2 = -(sprite->data[0] / 3);
|
||||
@ -3203,7 +3203,7 @@ static void SpriteCB_ScoreSymbol(struct Sprite* sprite)
|
||||
DestroySprite(sprite);
|
||||
}
|
||||
|
||||
static void SpriteCB_ScoreSymbolBest(struct Sprite* sprite)
|
||||
static void SpriteCB_ScoreSymbolBest(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[0]++;
|
||||
sprite->y2 = -(sprite->data[0] * 2);
|
||||
@ -3225,7 +3225,7 @@ static void SetPlayerBerryData(u8 playerId, u16 itemId)
|
||||
#define sDelay data[2]
|
||||
#define sAnimId data[3]
|
||||
|
||||
static void SpriteCB_CountdownNumber(struct Sprite* sprite)
|
||||
static void SpriteCB_CountdownNumber(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->sState)
|
||||
{
|
||||
@ -3272,7 +3272,7 @@ static void SpriteCB_CountdownNumber(struct Sprite* sprite)
|
||||
#undef sDelay
|
||||
#undef sAnimId
|
||||
|
||||
static void SpriteCB_Start(struct Sprite* sprite)
|
||||
static void SpriteCB_Start(struct Sprite *sprite)
|
||||
{
|
||||
switch (sprite->data[0])
|
||||
{
|
||||
@ -3318,7 +3318,7 @@ static void UpdateProgressBar(u16 value, u16 limit)
|
||||
s32 amountFilled, maxFilledSegment, subSegmentsFilled, i;
|
||||
u16 *vram;
|
||||
|
||||
vram = (u16*)(BG_SCREEN_ADDR(12));
|
||||
vram = (u16 *)(BG_SCREEN_ADDR(12));
|
||||
amountFilled = (value * 64) / limit;
|
||||
maxFilledSegment = amountFilled / 8;
|
||||
|
||||
@ -3368,22 +3368,22 @@ static void UpdateRPM(u16 speed)
|
||||
digits[i] = currentRPM % 10;
|
||||
currentRPM /= 10;
|
||||
}
|
||||
*((u16*)(BG_SCREEN_ADDR(12) + 0x458)) = digits[4] + RPM_DIGIT;
|
||||
*((u16*)(BG_SCREEN_ADDR(12) + 0x45A)) = digits[3] + RPM_DIGIT;
|
||||
*((u16*)(BG_SCREEN_ADDR(12) + 0x45C)) = digits[2] + RPM_DIGIT;
|
||||
*((u16*)(BG_SCREEN_ADDR(12) + 0x460)) = digits[1] + RPM_DIGIT;
|
||||
*((u16*)(BG_SCREEN_ADDR(12) + 0x462)) = digits[0] + RPM_DIGIT;
|
||||
*((u16 *)(BG_SCREEN_ADDR(12) + 0x458)) = digits[4] + RPM_DIGIT;
|
||||
*((u16 *)(BG_SCREEN_ADDR(12) + 0x45A)) = digits[3] + RPM_DIGIT;
|
||||
*((u16 *)(BG_SCREEN_ADDR(12) + 0x45C)) = digits[2] + RPM_DIGIT;
|
||||
*((u16 *)(BG_SCREEN_ADDR(12) + 0x460)) = digits[1] + RPM_DIGIT;
|
||||
*((u16 *)(BG_SCREEN_ADDR(12) + 0x462)) = digits[0] + RPM_DIGIT;
|
||||
}
|
||||
|
||||
// Passed a pointer to the bg x/y
|
||||
// Used when hitting a Best at high RPM
|
||||
static void ShakeBgCoordForHit(s16* coord, u16 speed)
|
||||
static void ShakeBgCoordForHit(s16 *coord, u16 speed)
|
||||
{
|
||||
if (*coord == 0)
|
||||
*coord = (Random() % speed) - (speed / 2);
|
||||
}
|
||||
|
||||
static void RestoreBgCoord(s16* coord)
|
||||
static void RestoreBgCoord(s16 *coord)
|
||||
{
|
||||
if (*coord < 0)
|
||||
(*coord)++;
|
||||
@ -3398,7 +3398,7 @@ static void RestoreBgCoords(void)
|
||||
RestoreBgCoord(&sBerryBlender->bg_Y);
|
||||
}
|
||||
|
||||
static void BlenderLandShakeBgCoord(s16* coord, u16 timer)
|
||||
static void BlenderLandShakeBgCoord(s16 *coord, u16 timer)
|
||||
{
|
||||
s32 strength;
|
||||
|
||||
@ -3443,7 +3443,7 @@ static bool8 UpdateBlenderLandScreenShake(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void SpriteCB_PlayerArrow(struct Sprite* sprite)
|
||||
static void SpriteCB_PlayerArrow(struct Sprite *sprite)
|
||||
{
|
||||
sprite->x2 = -(sBerryBlender->bg_X);
|
||||
sprite->y2 = -(sBerryBlender->bg_Y);
|
||||
|
@ -874,7 +874,7 @@ static const struct DigitObjUtilTemplate sDigitObjTemplates[] =
|
||||
.xDelta = 8,
|
||||
.x = 156,
|
||||
.y = 0,
|
||||
.spriteSheet = (void*) &sSpriteSheets[3],
|
||||
.spriteSheet = (void *) &sSpriteSheets[3],
|
||||
.spritePal = &sSpritePals[2],
|
||||
},
|
||||
{ // Seconds
|
||||
@ -886,7 +886,7 @@ static const struct DigitObjUtilTemplate sDigitObjTemplates[] =
|
||||
.xDelta = 8,
|
||||
.x = 180,
|
||||
.y = 0,
|
||||
.spriteSheet = (void*) &sSpriteSheets[3],
|
||||
.spriteSheet = (void *) &sSpriteSheets[3],
|
||||
.spritePal = &sSpritePals[2],
|
||||
},
|
||||
{ // 1/60ths of a second
|
||||
@ -898,7 +898,7 @@ static const struct DigitObjUtilTemplate sDigitObjTemplates[] =
|
||||
.xDelta = 8,
|
||||
.x = 204,
|
||||
.y = 0,
|
||||
.spriteSheet = (void*) &sSpriteSheets[3],
|
||||
.spriteSheet = (void *) &sSpriteSheets[3],
|
||||
.spritePal = &sSpritePals[2],
|
||||
}
|
||||
};
|
||||
|
@ -833,7 +833,7 @@ static void SetLinkBattleTypeFlags(int linkService)
|
||||
|
||||
static void Task_StartWiredCableClubBattle(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->tState)
|
||||
{
|
||||
@ -879,7 +879,7 @@ static void Task_StartWiredCableClubBattle(u8 taskId)
|
||||
static void Task_StartWirelessCableClubBattle(u8 taskId)
|
||||
{
|
||||
int i;
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
switch (tState)
|
||||
{
|
||||
@ -1042,7 +1042,7 @@ void ExitLinkRoom(void)
|
||||
// Note: gSpecialVar_0x8005 contains the id of the seat the player entered
|
||||
static void Task_EnterCableClubSeat(u8 taskId)
|
||||
{
|
||||
struct Task* task = &gTasks[taskId];
|
||||
struct Task *task = &gTasks[taskId];
|
||||
|
||||
switch (task->tState)
|
||||
{
|
||||
|
@ -859,19 +859,19 @@ static const struct CompressedSpriteSheet sSpriteSheets_ContestantsTurnBlinkEffe
|
||||
static const struct SpritePalette sSpritePalettes_ContestantsTurnBlinkEffect[CONTESTANT_COUNT] =
|
||||
{
|
||||
{
|
||||
.data = (u16*)(gHeap + 0x1A0A4),
|
||||
.data = (u16 *)(gHeap + 0x1A0A4),
|
||||
.tag = TAG_BLINK_EFFECT_CONTESTANT0
|
||||
},
|
||||
{
|
||||
.data = (u16*)(gHeap + 0x1A0C4),
|
||||
.data = (u16 *)(gHeap + 0x1A0C4),
|
||||
.tag = TAG_BLINK_EFFECT_CONTESTANT1
|
||||
},
|
||||
{
|
||||
.data = (u16*)(gHeap + 0x1A0E4),
|
||||
.data = (u16 *)(gHeap + 0x1A0E4),
|
||||
.tag = TAG_BLINK_EFFECT_CONTESTANT2
|
||||
},
|
||||
{
|
||||
.data = (u16*)(gHeap + 0x1A104),
|
||||
.data = (u16 *)(gHeap + 0x1A104),
|
||||
.tag = TAG_BLINK_EFFECT_CONTESTANT3
|
||||
}
|
||||
};
|
||||
@ -1396,7 +1396,7 @@ static void Task_RaiseCurtainAtStart(u8 taskId)
|
||||
gTasks[taskId].data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
*(s16*)&gBattle_BG1_Y += 7;
|
||||
*(s16 *)&gBattle_BG1_Y += 7;
|
||||
if ((s16)gBattle_BG1_Y <= DISPLAY_HEIGHT)
|
||||
break;
|
||||
gTasks[taskId].data[0]++;
|
||||
|
@ -1196,7 +1196,7 @@ static s32 DrawResultsTextWindow(const u8 *text, u8 spriteId)
|
||||
spriteTilePtrs[0] = (u8 *)(sprite->oam.tileNum * 32 + OBJ_VRAM0);
|
||||
|
||||
for (i = 1; i < (int)ARRAY_COUNT(spriteTilePtrs); i++)
|
||||
spriteTilePtrs[i] = (void*)(gSprites[sprite->data[i - 1]].oam.tileNum * 32 + OBJ_VRAM0);
|
||||
spriteTilePtrs[i] = (void *)(gSprites[sprite->data[i - 1]].oam.tileNum * 32 + OBJ_VRAM0);
|
||||
|
||||
for (i = 0; i < (int)ARRAY_COUNT(spriteTilePtrs); i++)
|
||||
CpuFill32(0, spriteTilePtrs[i], 0x400);
|
||||
|
@ -46,7 +46,7 @@ void LoadCompressedSpritePalette(const struct CompressedSpritePalette *src)
|
||||
struct SpritePalette dest;
|
||||
|
||||
LZ77UnCompWram(src->data, gDecompressionBuffer);
|
||||
dest.data = (void*) gDecompressionBuffer;
|
||||
dest.data = (void *) gDecompressionBuffer;
|
||||
dest.tag = src->tag;
|
||||
LoadSpritePalette(&dest);
|
||||
}
|
||||
@ -61,7 +61,7 @@ void LoadCompressedSpritePaletteOverrideBuffer(const struct CompressedSpritePale
|
||||
LoadSpritePalette(&dest);
|
||||
}
|
||||
|
||||
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species)
|
||||
void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void *buffer, s32 species)
|
||||
{
|
||||
if (species > NUM_SPECIES)
|
||||
LZ77UnCompWram(gMonFrontPicTable[0].data, buffer);
|
||||
@ -263,12 +263,12 @@ u32 GetDecompressedDataSize(const u32 *ptr)
|
||||
return (ptr8[3] << 16) | (ptr8[2] << 8) | (ptr8[1]);
|
||||
}
|
||||
|
||||
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src)
|
||||
bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet *src)
|
||||
{
|
||||
struct SpriteSheet dest;
|
||||
void* buffer;
|
||||
void *buffer;
|
||||
|
||||
buffer = AllocZeroed(*((u32*)(&src->data[0])) >> 8);
|
||||
buffer = AllocZeroed(*((u32 *)(&src->data[0])) >> 8);
|
||||
LZ77UnCompWram(src->data, buffer);
|
||||
|
||||
dest.data = buffer;
|
||||
@ -283,9 +283,9 @@ bool8 LoadCompressedSpriteSheetUsingHeap(const struct CompressedSpriteSheet* src
|
||||
bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette *src)
|
||||
{
|
||||
struct SpritePalette dest;
|
||||
void* buffer;
|
||||
void *buffer;
|
||||
|
||||
buffer = AllocZeroed(*((u32*)(&src->data[0])) >> 8);
|
||||
buffer = AllocZeroed(*((u32 *)(&src->data[0])) >> 8);
|
||||
LZ77UnCompWram(src->data, buffer);
|
||||
dest.data = buffer;
|
||||
dest.tag = src->tag;
|
||||
@ -295,7 +295,7 @@ bool8 LoadCompressedSpritePaletteUsingHeap(const struct CompressedSpritePalette
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void* buffer, s32 species) // a copy of DecompressPicFromTable
|
||||
void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void *buffer, s32 species) // a copy of DecompressPicFromTable
|
||||
{
|
||||
if (species > NUM_SPECIES)
|
||||
LZ77UnCompWram(gMonFrontPicTable[0].data, buffer);
|
||||
@ -342,7 +342,7 @@ void HandleLoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *d
|
||||
LoadSpecialPokePic_2(src, dest, species, personality, isFrontPic);
|
||||
}
|
||||
|
||||
void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void* buffer, s32 species)
|
||||
void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *buffer, s32 species)
|
||||
{
|
||||
if (species > NUM_SPECIES)
|
||||
LZ77UnCompWram(gMonFrontPicTable[0].data, buffer);
|
||||
|
@ -138,7 +138,7 @@ bool32 DigitObjUtil_CreatePrinter(u32 id, s32 num, const struct DigitObjUtilTemp
|
||||
{
|
||||
struct CompressedSpriteSheet compSpriteSheet;
|
||||
|
||||
compSpriteSheet = *(struct CompressedSpriteSheet*)(template->spriteSheet);
|
||||
compSpriteSheet = *(struct CompressedSpriteSheet *)(template->spriteSheet);
|
||||
compSpriteSheet.size = GetDecompressedDataSize(template->spriteSheet->data);
|
||||
sOamWork->array[id].tileStart = LoadCompressedSpriteSheet(&compSpriteSheet);
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ static bool32 TryPickBerry(u8, u8, u8);
|
||||
static void UpdateFallingBerries(void);
|
||||
static void UpdateGame_Leader(void);
|
||||
static void UpdateGame_Member(void);
|
||||
static void GetActiveBerryColumns(u8, u8*, u8*);
|
||||
static void GetActiveBerryColumns(u8, u8 *, u8 *);
|
||||
static bool32 AllPlayersReadyToStart(void);
|
||||
static void ResetReadyToStart(void);
|
||||
static bool32 ReadyToEndGame_Leader(void);
|
||||
@ -1795,7 +1795,7 @@ static void VBlankCB_DodrioGame(void)
|
||||
ProcessSpriteCopyRequests();
|
||||
}
|
||||
|
||||
static void InitMonInfo(struct DodrioGame_MonInfo * monInfo, struct Pokemon * mon)
|
||||
static void InitMonInfo(struct DodrioGame_MonInfo * monInfo, struct Pokemon *mon)
|
||||
{
|
||||
monInfo->isShiny = IsMonShiny(mon);
|
||||
}
|
||||
|
@ -69,14 +69,14 @@ extern const u8 gText_NicknameHatchPrompt[];
|
||||
static void Task_EggHatch(u8);
|
||||
static void CB2_LoadEggHatch(void);
|
||||
static void CB2_EggHatch(void);
|
||||
static void SpriteCB_Egg_Shake1(struct Sprite*);
|
||||
static void SpriteCB_Egg_Shake2(struct Sprite*);
|
||||
static void SpriteCB_Egg_Shake3(struct Sprite*);
|
||||
static void SpriteCB_Egg_WaitHatch(struct Sprite*);
|
||||
static void SpriteCB_Egg_Hatch(struct Sprite*);
|
||||
static void SpriteCB_Egg_Reveal(struct Sprite*);
|
||||
static void SpriteCB_EggShard(struct Sprite*);
|
||||
static void EggHatchPrintMessage(u8, u8*, u8, u8, u8);
|
||||
static void SpriteCB_Egg_Shake1(struct Sprite *);
|
||||
static void SpriteCB_Egg_Shake2(struct Sprite *);
|
||||
static void SpriteCB_Egg_Shake3(struct Sprite *);
|
||||
static void SpriteCB_Egg_WaitHatch(struct Sprite *);
|
||||
static void SpriteCB_Egg_Hatch(struct Sprite *);
|
||||
static void SpriteCB_Egg_Reveal(struct Sprite *);
|
||||
static void SpriteCB_EggShard(struct Sprite *);
|
||||
static void EggHatchPrintMessage(u8, u8 *, u8, u8, u8);
|
||||
static void CreateRandomEggShardSprite(void);
|
||||
static void CreateEggShardSprite(u8, u8, s16, s16, s16, u8);
|
||||
|
||||
@ -363,7 +363,7 @@ static void AddHatchedMonToParty(u8 id)
|
||||
u16 ball;
|
||||
u16 metLevel;
|
||||
u8 metLocation;
|
||||
struct Pokemon* mon = &gPlayerParty[id];
|
||||
struct Pokemon *mon = &gPlayerParty[id];
|
||||
|
||||
CreateHatchedMon(mon, &gEnemyParty[0]);
|
||||
SetMonData(mon, MON_DATA_IS_EGG, &isEgg);
|
||||
@ -420,11 +420,11 @@ bool8 CheckDaycareMonReceivedMail(void)
|
||||
return _CheckDaycareMonReceivedMail(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004);
|
||||
}
|
||||
|
||||
static u8 EggHatchCreateMonSprite(u8 useAlt, u8 state, u8 partyId, u16* speciesLoc)
|
||||
static u8 EggHatchCreateMonSprite(u8 useAlt, u8 state, u8 partyId, u16 *speciesLoc)
|
||||
{
|
||||
u8 position = 0;
|
||||
u8 spriteId = 0;
|
||||
struct Pokemon* mon = NULL;
|
||||
struct Pokemon *mon = NULL;
|
||||
|
||||
if (useAlt == FALSE)
|
||||
{
|
||||
@ -728,7 +728,7 @@ static void CB2_EggHatch(void)
|
||||
#define sSinIdx data[1]
|
||||
#define sDelayTimer data[2]
|
||||
|
||||
static void SpriteCB_Egg_Shake1(struct Sprite* sprite)
|
||||
static void SpriteCB_Egg_Shake1(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->sTimer > 20)
|
||||
{
|
||||
@ -750,7 +750,7 @@ static void SpriteCB_Egg_Shake1(struct Sprite* sprite)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Egg_Shake2(struct Sprite* sprite)
|
||||
static void SpriteCB_Egg_Shake2(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->sDelayTimer > 30)
|
||||
{
|
||||
@ -775,7 +775,7 @@ static void SpriteCB_Egg_Shake2(struct Sprite* sprite)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Egg_Shake3(struct Sprite* sprite)
|
||||
static void SpriteCB_Egg_Shake3(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->sDelayTimer > 30)
|
||||
{
|
||||
@ -813,7 +813,7 @@ static void SpriteCB_Egg_Shake3(struct Sprite* sprite)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Egg_WaitHatch(struct Sprite* sprite)
|
||||
static void SpriteCB_Egg_WaitHatch(struct Sprite *sprite)
|
||||
{
|
||||
if (++sprite->sTimer > 50)
|
||||
{
|
||||
@ -822,7 +822,7 @@ static void SpriteCB_Egg_WaitHatch(struct Sprite* sprite)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Egg_Hatch(struct Sprite* sprite)
|
||||
static void SpriteCB_Egg_Hatch(struct Sprite *sprite)
|
||||
{
|
||||
s16 i;
|
||||
|
||||
@ -849,7 +849,7 @@ static void SpriteCB_Egg_Hatch(struct Sprite* sprite)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Egg_Reveal(struct Sprite* sprite)
|
||||
static void SpriteCB_Egg_Reveal(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->sTimer == 0)
|
||||
{
|
||||
@ -877,7 +877,7 @@ static void SpriteCB_Egg_Reveal(struct Sprite* sprite)
|
||||
#define sDeltaX data[4]
|
||||
#define sDeltaY data[5]
|
||||
|
||||
static void SpriteCB_EggShard(struct Sprite* sprite)
|
||||
static void SpriteCB_EggShard(struct Sprite *sprite)
|
||||
{
|
||||
sprite->sDeltaX += sprite->sVelocX;
|
||||
sprite->sDeltaY += sprite->sVelocY;
|
||||
@ -914,7 +914,7 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 velocityX, s16 velocityY, s16 a
|
||||
StartSpriteAnim(&gSprites[spriteId], spriteAnimIndex);
|
||||
}
|
||||
|
||||
static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
|
||||
static void EggHatchPrintMessage(u8 windowId, u8 *string, u8 x, u8 y, u8 speed)
|
||||
{
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(15));
|
||||
sEggHatchData->textColor[0] = 0;
|
||||
|
@ -397,8 +397,8 @@ static void Task_EReader(u8 taskId)
|
||||
break;
|
||||
case ER_STATE_CONNECTING:
|
||||
AddTextPrinterToWindow1(gJPText_Connecting);
|
||||
// XXX: This (u32*) cast is discarding the const qualifier from gMultiBootProgram_EReader_Start
|
||||
EReader_Load(&gEReaderData, gMultiBootProgram_EReader_End - gMultiBootProgram_EReader_Start, (u32*)gMultiBootProgram_EReader_Start);
|
||||
// XXX: This (u32 *) cast is discarding the const qualifier from gMultiBootProgram_EReader_Start
|
||||
EReader_Load(&gEReaderData, gMultiBootProgram_EReader_End - gMultiBootProgram_EReader_Start, (u32 *)gMultiBootProgram_EReader_Start);
|
||||
data->state = ER_STATE_TRANSFER;
|
||||
break;
|
||||
case ER_STATE_TRANSFER:
|
||||
|
@ -93,33 +93,33 @@ static bool8 IsMetatileDirectionallyImpassable(struct ObjectEvent *, s16, s16, u
|
||||
static bool8 DoesObjectCollideWithObjectAt(struct ObjectEvent *, s16, s16);
|
||||
static void UpdateObjectEventOffscreen(struct ObjectEvent *, struct Sprite *);
|
||||
static void UpdateObjectEventSpriteVisibility(struct ObjectEvent *, struct Sprite *);
|
||||
static void ObjectEventUpdateMetatileBehaviors(struct ObjectEvent*);
|
||||
static void GetGroundEffectFlags_Reflection(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_TallGrassOnSpawn(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_LongGrassOnSpawn(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_SandHeap(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_ShallowFlowingWater(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_ShortGrass(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_HotSprings(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_TallGrassOnBeginStep(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_LongGrassOnBeginStep(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_Tracks(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_Puddle(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_Ripple(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_Seaweed(struct ObjectEvent*, u32*);
|
||||
static void GetGroundEffectFlags_JumpLanding(struct ObjectEvent*, u32*);
|
||||
static u8 ObjectEventGetNearbyReflectionType(struct ObjectEvent*);
|
||||
static void ObjectEventUpdateMetatileBehaviors(struct ObjectEvent *);
|
||||
static void GetGroundEffectFlags_Reflection(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_TallGrassOnSpawn(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_LongGrassOnSpawn(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_SandHeap(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_ShallowFlowingWater(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_ShortGrass(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_HotSprings(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_TallGrassOnBeginStep(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_LongGrassOnBeginStep(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_Tracks(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_Puddle(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_Ripple(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_Seaweed(struct ObjectEvent *, u32 *);
|
||||
static void GetGroundEffectFlags_JumpLanding(struct ObjectEvent *, u32 *);
|
||||
static u8 ObjectEventGetNearbyReflectionType(struct ObjectEvent *);
|
||||
static u8 GetReflectionTypeByMetatileBehavior(u32);
|
||||
static void InitObjectPriorityByElevation(struct Sprite *, u8);
|
||||
static void ObjectEventUpdateSubpriority(struct ObjectEvent*, struct Sprite*);
|
||||
static void DoTracksGroundEffect_None(struct ObjectEvent*, struct Sprite*, u8);
|
||||
static void DoTracksGroundEffect_Footprints(struct ObjectEvent*, struct Sprite*, u8);
|
||||
static void DoTracksGroundEffect_BikeTireTracks(struct ObjectEvent*, struct Sprite*, u8);
|
||||
static void DoRippleFieldEffect(struct ObjectEvent*, struct Sprite*);
|
||||
static void DoGroundEffects_OnSpawn(struct ObjectEvent*, struct Sprite*);
|
||||
static void DoGroundEffects_OnBeginStep(struct ObjectEvent*, struct Sprite*);
|
||||
static void DoGroundEffects_OnFinishStep(struct ObjectEvent*, struct Sprite*);
|
||||
static void VirtualObject_UpdateAnim(struct Sprite*);
|
||||
static void ObjectEventUpdateSubpriority(struct ObjectEvent *, struct Sprite *);
|
||||
static void DoTracksGroundEffect_None(struct ObjectEvent *, struct Sprite *, u8);
|
||||
static void DoTracksGroundEffect_Footprints(struct ObjectEvent *, struct Sprite *, u8);
|
||||
static void DoTracksGroundEffect_BikeTireTracks(struct ObjectEvent *, struct Sprite *, u8);
|
||||
static void DoRippleFieldEffect(struct ObjectEvent *, struct Sprite *);
|
||||
static void DoGroundEffects_OnSpawn(struct ObjectEvent *, struct Sprite *);
|
||||
static void DoGroundEffects_OnBeginStep(struct ObjectEvent *, struct Sprite *);
|
||||
static void DoGroundEffects_OnFinishStep(struct ObjectEvent *, struct Sprite *);
|
||||
static void VirtualObject_UpdateAnim(struct Sprite *);
|
||||
static void ApplyLevitateMovement(u8);
|
||||
static bool8 MovementType_Disguise_Callback(struct ObjectEvent *, struct Sprite *);
|
||||
static bool8 MovementType_Buried_Callback(struct ObjectEvent *, struct Sprite *);
|
||||
@ -1911,9 +1911,9 @@ void SetObjectInvisibility(u8 localId, u8 mapNum, u8 mapGroup, bool8 invisible)
|
||||
|
||||
void ObjectEventGetLocalIdAndMap(struct ObjectEvent *objectEvent, void *localId, void *mapNum, void *mapGroup)
|
||||
{
|
||||
*(u8*)(localId) = objectEvent->localId;
|
||||
*(u8*)(mapNum) = objectEvent->mapNum;
|
||||
*(u8*)(mapGroup) = objectEvent->mapGroup;
|
||||
*(u8 *)(localId) = objectEvent->localId;
|
||||
*(u8 *)(mapNum) = objectEvent->mapNum;
|
||||
*(u8 *)(mapGroup) = objectEvent->mapGroup;
|
||||
}
|
||||
|
||||
void AllowObjectAtPosTriggerGroundEffects(s16 x, s16 y)
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "palette.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
static void SpriteCB_Sparkle_Dummy(struct Sprite* sprite);
|
||||
static void SpriteCB_Sparkle_Dummy(struct Sprite *sprite);
|
||||
|
||||
static void Task_Sparkles_SpiralUpward_Init(u8 taskId);
|
||||
static void Task_Sparkles_SpiralUpward(u8 taskId);
|
||||
@ -127,7 +127,7 @@ static void SetEvoSparklesMatrices(void)
|
||||
#define sTrigIdx data[6]
|
||||
#define sTimer data[7]
|
||||
|
||||
static void SpriteCB_Sparkle_SpiralUpward(struct Sprite* sprite)
|
||||
static void SpriteCB_Sparkle_SpiralUpward(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->y > 8)
|
||||
{
|
||||
@ -167,7 +167,7 @@ static void CreateSparkle_SpiralUpward(u8 trigIdx)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Sparkle_ArcDown(struct Sprite* sprite)
|
||||
static void SpriteCB_Sparkle_ArcDown(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->y < 88)
|
||||
{
|
||||
@ -196,7 +196,7 @@ static void CreateSparkle_ArcDown(u8 trigIdx)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Sparkle_CircleInward(struct Sprite* sprite)
|
||||
static void SpriteCB_Sparkle_CircleInward(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->sAmplitude > 8)
|
||||
{
|
||||
@ -225,7 +225,7 @@ static void CreateSparkle_CircleInward(u8 trigIdx, u8 speed)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_Sparkle_Spray(struct Sprite* sprite)
|
||||
static void SpriteCB_Sparkle_Spray(struct Sprite *sprite)
|
||||
{
|
||||
if (!(sprite->sTimer & 3))
|
||||
sprite->y++;
|
||||
@ -492,7 +492,7 @@ static void Task_Sparkles_SprayAndFlashTrade(u8 taskId)
|
||||
#undef tTimer
|
||||
#undef tSpecies
|
||||
|
||||
static void SpriteCB_EvolutionMonSprite(struct Sprite* sprite)
|
||||
static void SpriteCB_EvolutionMonSprite(struct Sprite *sprite)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ static void CB2_BeginEvolutionScene(void)
|
||||
|
||||
static void Task_BeginEvolutionScene(u8 taskId)
|
||||
{
|
||||
struct Pokemon* mon = NULL;
|
||||
struct Pokemon *mon = NULL;
|
||||
switch (gTasks[taskId].tState)
|
||||
{
|
||||
case 0:
|
||||
@ -196,7 +196,7 @@ static void Task_BeginEvolutionScene(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void BeginEvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u8 partyId)
|
||||
void BeginEvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u8 partyId)
|
||||
{
|
||||
u8 taskId = CreateTask(Task_BeginEvolutionScene, 0);
|
||||
gTasks[taskId].tState = 0;
|
||||
@ -206,7 +206,7 @@ void BeginEvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopE
|
||||
SetMainCallback2(CB2_BeginEvolutionScene);
|
||||
}
|
||||
|
||||
void EvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u8 partyId)
|
||||
void EvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, bool8 canStopEvo, u8 partyId)
|
||||
{
|
||||
u8 name[20];
|
||||
u16 currSpecies;
|
||||
@ -216,7 +216,7 @@ void EvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, bool8 canStopEvo, u
|
||||
|
||||
SetHBlankCallback(NULL);
|
||||
SetVBlankCallback(NULL);
|
||||
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
|
||||
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
|
||||
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
@ -314,7 +314,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
||||
const struct CompressedSpritePalette* pokePal;
|
||||
u16 postEvoSpecies;
|
||||
u32 trainerId, personality;
|
||||
struct Pokemon* mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskId].tPartyId];
|
||||
struct Pokemon *mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskId].tPartyId];
|
||||
|
||||
postEvoSpecies = gTasks[sEvoStructPtr->evoTaskId].tPostEvoSpecies;
|
||||
trainerId = GetMonData(mon, MON_DATA_OT_ID);
|
||||
@ -322,7 +322,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
||||
|
||||
SetHBlankCallback(NULL);
|
||||
SetVBlankCallback(NULL);
|
||||
CpuFill32(0, (void*)(VRAM), VRAM_SIZE);
|
||||
CpuFill32(0, (void *)(VRAM), VRAM_SIZE);
|
||||
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
@ -381,7 +381,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
||||
|
||||
static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
||||
{
|
||||
struct Pokemon* mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskId].tPartyId];
|
||||
struct Pokemon *mon = &gPlayerParty[gTasks[sEvoStructPtr->evoTaskId].tPartyId];
|
||||
u16 postEvoSpecies = gTasks[sEvoStructPtr->evoTaskId].tPostEvoSpecies;
|
||||
|
||||
switch (gMain.state)
|
||||
@ -410,7 +410,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 2:
|
||||
InitTradeBg();
|
||||
LoadTradeAnimGfx();
|
||||
gMain.state++;
|
||||
break;
|
||||
case 3:
|
||||
@ -465,7 +465,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
||||
}
|
||||
}
|
||||
|
||||
void TradeEvolutionScene(struct Pokemon* mon, u16 postEvoSpecies, u8 preEvoSpriteId, u8 partyId)
|
||||
void TradeEvolutionScene(struct Pokemon *mon, u16 postEvoSpecies, u8 preEvoSpriteId, u8 partyId)
|
||||
{
|
||||
u8 name[20];
|
||||
u16 currSpecies;
|
||||
@ -545,13 +545,13 @@ static void CB2_TradeEvolutionSceneUpdate(void)
|
||||
RunTasks();
|
||||
}
|
||||
|
||||
static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
||||
static void CreateShedinja(u16 preEvoSpecies, struct Pokemon *mon)
|
||||
{
|
||||
u32 data = 0;
|
||||
if (gEvolutionTable[preEvoSpecies][0].method == EVO_LEVEL_NINJASK && gPlayerPartyCount < PARTY_SIZE)
|
||||
{
|
||||
s32 i;
|
||||
struct Pokemon* shedinja = &gPlayerParty[gPlayerPartyCount];
|
||||
struct Pokemon *shedinja = &gPlayerParty[gPlayerPartyCount];
|
||||
|
||||
CopyMon(&gPlayerParty[gPlayerPartyCount], mon, sizeof(struct Pokemon));
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_SPECIES, &gEvolutionTable[preEvoSpecies][1].targetSpecies);
|
||||
@ -632,7 +632,7 @@ enum {
|
||||
static void Task_EvolutionScene(u8 taskId)
|
||||
{
|
||||
u32 var;
|
||||
struct Pokemon* mon = &gPlayerParty[gTasks[taskId].tPartyId];
|
||||
struct Pokemon *mon = &gPlayerParty[gTasks[taskId].tPartyId];
|
||||
|
||||
// check if B Button was held, so the evolution gets stopped
|
||||
if (gMain.heldKeys == B_BUTTON
|
||||
@ -761,7 +761,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
BattlePutTextOnWindow(gStringVar4, B_WIN_MSG);
|
||||
PlayBGM(MUS_EVOLVED);
|
||||
gTasks[taskId].tState++;
|
||||
SetMonData(mon, MON_DATA_SPECIES, (void*)(&gTasks[taskId].tPostEvoSpecies));
|
||||
SetMonData(mon, MON_DATA_SPECIES, (void *)(&gTasks[taskId].tPostEvoSpecies));
|
||||
CalculateMonStats(mon);
|
||||
EvolutionRenameMon(mon, gTasks[taskId].tPreEvoSpecies, gTasks[taskId].tPostEvoSpecies);
|
||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_SEEN);
|
||||
@ -1081,7 +1081,7 @@ enum {
|
||||
static void Task_TradeEvolutionScene(u8 taskId)
|
||||
{
|
||||
u32 var = 0;
|
||||
struct Pokemon* mon = &gPlayerParty[gTasks[taskId].tPartyId];
|
||||
struct Pokemon *mon = &gPlayerParty[gTasks[taskId].tPartyId];
|
||||
|
||||
switch (gTasks[taskId].tState)
|
||||
{
|
||||
|
@ -10,10 +10,10 @@
|
||||
#include "constants/metatile_behaviors.h"
|
||||
|
||||
static u8 GetValidMewMoveDirection(u8);
|
||||
static bool8 ShouldMewMoveNorth(struct ObjectEvent*, u8);
|
||||
static bool8 ShouldMewMoveSouth(struct ObjectEvent*, u8);
|
||||
static bool8 ShouldMewMoveEast(struct ObjectEvent*, u8);
|
||||
static bool8 ShouldMewMoveWest(struct ObjectEvent*, u8);
|
||||
static bool8 ShouldMewMoveNorth(struct ObjectEvent *, u8);
|
||||
static bool8 ShouldMewMoveSouth(struct ObjectEvent *, u8);
|
||||
static bool8 ShouldMewMoveEast(struct ObjectEvent *, u8);
|
||||
static bool8 ShouldMewMoveWest(struct ObjectEvent *, u8);
|
||||
static u8 GetRandomMewDirectionCandidate(u8);
|
||||
static bool8 CanMewMoveToCoords(s16, s16);
|
||||
|
||||
|
@ -43,8 +43,8 @@ u8 gSelectedObjectEvent;
|
||||
static void GetPlayerPosition(struct MapPosition *);
|
||||
static void GetInFrontOfPlayerPosition(struct MapPosition *);
|
||||
static u16 GetPlayerCurMetatileBehavior(int);
|
||||
static bool8 TryStartInteractionScript(struct MapPosition*, u16, u8);
|
||||
static const u8 *GetInteractionScript(struct MapPosition*, u8, u8);
|
||||
static bool8 TryStartInteractionScript(struct MapPosition *, u16, u8);
|
||||
static const u8 *GetInteractionScript(struct MapPosition *, u8, u8);
|
||||
static const u8 *GetInteractedObjectEventScript(struct MapPosition *, u8, u8);
|
||||
static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *, u8, u8);
|
||||
static const u8 *GetInteractedMetatileScript(struct MapPosition *, u8, u8);
|
||||
|
@ -146,10 +146,10 @@ static void EscapeRopeWarpInEffect_Init(struct Task *);
|
||||
static void EscapeRopeWarpInEffect_Spin(struct Task *);
|
||||
|
||||
static void Task_TeleportWarpOut(u8);
|
||||
static void TeleportWarpOutFieldEffect_Init(struct Task*);
|
||||
static void TeleportWarpOutFieldEffect_SpinGround(struct Task*);
|
||||
static void TeleportWarpOutFieldEffect_SpinExit(struct Task*);
|
||||
static void TeleportWarpOutFieldEffect_End(struct Task*);
|
||||
static void TeleportWarpOutFieldEffect_Init(struct Task *);
|
||||
static void TeleportWarpOutFieldEffect_SpinGround(struct Task *);
|
||||
static void TeleportWarpOutFieldEffect_SpinExit(struct Task *);
|
||||
static void TeleportWarpOutFieldEffect_End(struct Task *);
|
||||
|
||||
static void FieldCallback_TeleportWarpIn(void);
|
||||
static void Task_TeleportWarpIn(u8);
|
||||
@ -223,11 +223,11 @@ static void FlyInFieldEffect_WaitBirdReturn(struct Task *);
|
||||
static void FlyInFieldEffect_End(struct Task *);
|
||||
|
||||
static void Task_DestroyDeoxysRock(u8 taskId);
|
||||
static void DestroyDeoxysRockEffect_CameraShake(s16*, u8);
|
||||
static void DestroyDeoxysRockEffect_RockFragments(s16*, u8);
|
||||
static void DestroyDeoxysRockEffect_WaitAndEnd(s16*, u8);
|
||||
static void CreateDeoxysRockFragments(struct Sprite*);
|
||||
static void SpriteCB_DeoxysRockFragment(struct Sprite* sprite);
|
||||
static void DestroyDeoxysRockEffect_CameraShake(s16 *, u8);
|
||||
static void DestroyDeoxysRockEffect_RockFragments(s16 *, u8);
|
||||
static void DestroyDeoxysRockEffect_WaitAndEnd(s16 *, u8);
|
||||
static void CreateDeoxysRockFragments(struct Sprite *);
|
||||
static void SpriteCB_DeoxysRockFragment(struct Sprite *sprite);
|
||||
|
||||
static void Task_MoveDeoxysRock(u8 taskId);
|
||||
|
||||
@ -3088,15 +3088,15 @@ u8 FldEff_RayquazaSpotlight(void)
|
||||
{
|
||||
for (j = 12; j < 18; j++)
|
||||
{
|
||||
((u16*)(BG_SCREEN_ADDR(31)))[i * 32 + j] = 0xBFF4 + i * 6 + j + 1;
|
||||
((u16 *)(BG_SCREEN_ADDR(31)))[i * 32 + j] = 0xBFF4 + i * 6 + j + 1;
|
||||
}
|
||||
}
|
||||
for (k = 0; k < 90; k++)
|
||||
{
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
*(u16*)(BG_CHAR_ADDR(2) + (k + 1) * 32 + i * 4) = (sSpotlight_Gfx[k * 32 + i * 4 + 1] << 8) + sSpotlight_Gfx[k * 32 + i * 4];
|
||||
*(u16*)(BG_CHAR_ADDR(2) + (k + 1) * 32 + i * 4 + 2) = (sSpotlight_Gfx[k * 32 + i * 4 + 3] << 8) + sSpotlight_Gfx[k * 32 + i * 4 + 2];
|
||||
*(u16 *)(BG_CHAR_ADDR(2) + (k + 1) * 32 + i * 4) = (sSpotlight_Gfx[k * 32 + i * 4 + 1] << 8) + sSpotlight_Gfx[k * 32 + i * 4];
|
||||
*(u16 *)(BG_CHAR_ADDR(2) + (k + 1) * 32 + i * 4 + 2) = (sSpotlight_Gfx[k * 32 + i * 4 + 3] << 8) + sSpotlight_Gfx[k * 32 + i * 4 + 2];
|
||||
}
|
||||
}
|
||||
return spriteId;
|
||||
@ -3675,7 +3675,7 @@ static void StartEndingDeoxysRockCameraShake(u8 taskId)
|
||||
#undef tEndDelay
|
||||
#undef tEnding
|
||||
|
||||
static void (*const sDestroyDeoxysRockEffectFuncs[])(s16*, u8) = {
|
||||
static void (*const sDestroyDeoxysRockEffectFuncs[])(s16 *, u8) = {
|
||||
DestroyDeoxysRockEffect_CameraShake,
|
||||
DestroyDeoxysRockEffect_RockFragments,
|
||||
DestroyDeoxysRockEffect_WaitAndEnd,
|
||||
@ -3689,7 +3689,7 @@ static void Task_DestroyDeoxysRock(u8 taskId)
|
||||
sDestroyDeoxysRockEffectFuncs[tState](data, taskId);
|
||||
}
|
||||
|
||||
static void DestroyDeoxysRockEffect_CameraShake(s16* data, u8 taskId)
|
||||
static void DestroyDeoxysRockEffect_CameraShake(s16 *data, u8 taskId)
|
||||
{
|
||||
u8 newTaskId = CreateTask(Task_DeoxysRockCameraShake, 90);
|
||||
PlaySE(SE_THUNDER2);
|
||||
@ -3697,7 +3697,7 @@ static void DestroyDeoxysRockEffect_CameraShake(s16* data, u8 taskId)
|
||||
tState++;
|
||||
}
|
||||
|
||||
static void DestroyDeoxysRockEffect_RockFragments(s16* data, u8 taskId)
|
||||
static void DestroyDeoxysRockEffect_RockFragments(s16 *data, u8 taskId)
|
||||
{
|
||||
if (++tTimer > 120)
|
||||
{
|
||||
@ -3713,7 +3713,7 @@ static void DestroyDeoxysRockEffect_RockFragments(s16* data, u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void DestroyDeoxysRockEffect_WaitAndEnd(s16* data, u8 taskId)
|
||||
static void DestroyDeoxysRockEffect_WaitAndEnd(s16 *data, u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active && !FuncIsActiveTask(Task_DeoxysRockCameraShake))
|
||||
{
|
||||
@ -3776,7 +3776,7 @@ static const struct SpriteTemplate sSpriteTemplate_DeoxysRockFragment = {
|
||||
.callback = SpriteCB_DeoxysRockFragment
|
||||
};
|
||||
|
||||
static void CreateDeoxysRockFragments(struct Sprite* sprite)
|
||||
static void CreateDeoxysRockFragments(struct Sprite *sprite)
|
||||
{
|
||||
int i;
|
||||
int xPos = (s16)gTotalCameraPixelOffsetX + sprite->x + sprite->x2;
|
||||
@ -3794,7 +3794,7 @@ static void CreateDeoxysRockFragments(struct Sprite* sprite)
|
||||
}
|
||||
}
|
||||
|
||||
static void SpriteCB_DeoxysRockFragment(struct Sprite* sprite)
|
||||
static void SpriteCB_DeoxysRockFragment(struct Sprite *sprite)
|
||||
{
|
||||
// 1 case for each fragment, fly off in 4 different directions
|
||||
switch (sprite->data[0])
|
||||
@ -3820,7 +3820,7 @@ static void SpriteCB_DeoxysRockFragment(struct Sprite* sprite)
|
||||
DestroySprite(sprite);
|
||||
}
|
||||
|
||||
bool8 FldEff_MoveDeoxysRock(struct Sprite* sprite)
|
||||
bool8 FldEff_MoveDeoxysRock(struct Sprite *sprite)
|
||||
{
|
||||
u8 objectEventIdBuffer;
|
||||
if (!TryGetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2], &objectEventIdBuffer))
|
||||
|
@ -1525,7 +1525,7 @@ void UpdateRayquazaSpotlightEffect(struct Sprite *sprite)
|
||||
{
|
||||
for (j = 12; j < 18; j++)
|
||||
{
|
||||
((u16*)(BG_SCREEN_ADDR(31)))[i * 32 + j] = 0xBFF4 + i * 6 + j + 1;
|
||||
((u16 *)(BG_SCREEN_ADDR(31)))[i * 32 + j] = 0xBFF4 + i * 6 + j + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1611,7 +1611,7 @@ void UpdateRayquazaSpotlightEffect(struct Sprite *sprite)
|
||||
{
|
||||
for (j = 12; j < 18; j++)
|
||||
{
|
||||
((u16*)(BG_SCREEN_ADDR(31)))[i * 32 + j] = 0;
|
||||
((u16 *)(BG_SCREEN_ADDR(31)))[i * 32 + j] = 0;
|
||||
}
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
static EWRAM_DATA u8 sFieldMessageBoxMode = 0;
|
||||
|
||||
static void ExpandStringAndStartDrawFieldMessage(const u8*, bool32);
|
||||
static void ExpandStringAndStartDrawFieldMessage(const u8 *, bool32);
|
||||
static void StartDrawFieldMessage(void);
|
||||
|
||||
void InitFieldMessageBox(void)
|
||||
@ -116,7 +116,7 @@ bool8 ShowFieldMessageFromBuffer(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void ExpandStringAndStartDrawFieldMessage(const u8* str, bool32 allowSkippingDelayWithButtonPress)
|
||||
static void ExpandStringAndStartDrawFieldMessage(const u8 *str, bool32 allowSkippingDelayWithButtonPress)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, str);
|
||||
AddTextPrinterForMessage(allowSkippingDelayWithButtonPress);
|
||||
|
@ -43,7 +43,7 @@ static void FillWestConnection(struct MapHeader const *mapHeader, struct MapHead
|
||||
static void FillEastConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset);
|
||||
static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader);
|
||||
static void LoadSavedMapView(void);
|
||||
static bool8 SkipCopyingMetatileFromSavedMap(u16* mapBlock, u16 mapWidth, u8 yMode);
|
||||
static bool8 SkipCopyingMetatileFromSavedMap(u16 *mapBlock, u16 mapWidth, u8 yMode);
|
||||
static struct MapConnection *GetIncomingConnection(u8 direction, int x, int y);
|
||||
static bool8 IsPosInIncomingConnectingMap(u8 direction, int x, int y, struct MapConnection *connection);
|
||||
static bool8 IsCoordInIncomingConnectingMap(int coord, int srcMax, int destMax, int offset);
|
||||
@ -823,7 +823,7 @@ void MapGridSetMetatileImpassabilityAt(int x, int y, bool32 impassable)
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 SkipCopyingMetatileFromSavedMap(u16* mapBlock, u16 mapWidth, u8 yMode)
|
||||
static bool8 SkipCopyingMetatileFromSavedMap(u16 *mapBlock, u16 mapWidth, u8 yMode)
|
||||
{
|
||||
if (yMode == 0xFF)
|
||||
return FALSE;
|
||||
@ -879,17 +879,17 @@ void LoadTilesetPalette(struct Tileset const *tileset, u16 destOffset, u16 size)
|
||||
if (tileset->isSecondary == FALSE)
|
||||
{
|
||||
LoadPalette(&black, destOffset, 2);
|
||||
LoadPalette(((u16*)tileset->palettes) + 1, destOffset + 1, size - 2);
|
||||
LoadPalette(((u16 *)tileset->palettes) + 1, destOffset + 1, size - 2);
|
||||
FieldmapPaletteDummy(destOffset + 1, (size - 2) >> 1);
|
||||
}
|
||||
else if (tileset->isSecondary == TRUE)
|
||||
{
|
||||
LoadPalette(((u16*)tileset->palettes) + (NUM_PALS_IN_PRIMARY * 16), destOffset, size);
|
||||
LoadPalette(((u16 *)tileset->palettes) + (NUM_PALS_IN_PRIMARY * 16), destOffset, size);
|
||||
FieldmapPaletteDummy(destOffset, size >> 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadCompressedPalette((u32*)tileset->palettes, destOffset, size);
|
||||
LoadCompressedPalette((u32 *)tileset->palettes, destOffset, size);
|
||||
FieldmapPaletteDummy(destOffset, size >> 1);
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
|
||||
static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2);
|
||||
static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2);
|
||||
static void Task_DoDomeConfetti(u8 taskId);
|
||||
static void SpriteCB_HofConfetti(struct Sprite* sprite);
|
||||
static void SpriteCB_HofConfetti(struct Sprite *sprite);
|
||||
|
||||
static const struct BgTemplate sHof_BgTemplates[] =
|
||||
{
|
||||
@ -484,7 +484,7 @@ static void Task_Hof_InitMonData(u8 taskId)
|
||||
static void Task_Hof_InitTeamSaveData(u8 taskId)
|
||||
{
|
||||
u16 i;
|
||||
struct HallofFameTeam* lastSavedTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
||||
struct HallofFameTeam *lastSavedTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||
|
||||
if (!gHasHallOfFameRecords)
|
||||
{
|
||||
@ -503,8 +503,8 @@ static void Task_Hof_InitTeamSaveData(u8 taskId)
|
||||
}
|
||||
if (i >= HALL_OF_FAME_MAX_TEAMS)
|
||||
{
|
||||
struct HallofFameTeam *afterTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
||||
struct HallofFameTeam *beforeTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
||||
struct HallofFameTeam *afterTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||
struct HallofFameTeam *beforeTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||
afterTeam++;
|
||||
for (i = 0; i < HALL_OF_FAME_MAX_TEAMS - 1; i++, beforeTeam++, afterTeam++)
|
||||
{
|
||||
@ -821,7 +821,7 @@ void CB2_DoHallOfFamePC(void)
|
||||
case 3:
|
||||
if (!LoadHofBgs())
|
||||
{
|
||||
struct HallofFameTeam *fameTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
||||
struct HallofFameTeam *fameTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||
fameTeam->mon[0] = sDummyFameMon;
|
||||
ComputerScreenOpenEffect(0, 0, 0);
|
||||
SetVBlankCallback(VBlankCB_HallOfFame);
|
||||
@ -867,7 +867,7 @@ static void Task_HofPC_CopySaveData(u8 taskId)
|
||||
else
|
||||
{
|
||||
u16 i;
|
||||
struct HallofFameTeam* savedTeams;
|
||||
struct HallofFameTeam *savedTeams;
|
||||
|
||||
CpuCopy16(gDecompressionBuffer, sHofMonPtr, SECTOR_SIZE * NUM_HOF_SECTORS);
|
||||
savedTeams = sHofMonPtr;
|
||||
@ -890,7 +890,7 @@ static void Task_HofPC_CopySaveData(u8 taskId)
|
||||
|
||||
static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
{
|
||||
struct HallofFameTeam* savedTeams = sHofMonPtr;
|
||||
struct HallofFameTeam *savedTeams = sHofMonPtr;
|
||||
struct HallofFameMon* currMon;
|
||||
u16 i;
|
||||
|
||||
@ -956,7 +956,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
|
||||
static void Task_HofPC_PrintMonInfo(u8 taskId)
|
||||
{
|
||||
struct HallofFameTeam* savedTeams = sHofMonPtr;
|
||||
struct HallofFameTeam *savedTeams = sHofMonPtr;
|
||||
struct HallofFameMon* currMon;
|
||||
u16 i;
|
||||
u16 currMonID;
|
||||
@ -1042,10 +1042,10 @@ static void Task_HofPC_HandleInput(u8 taskId)
|
||||
|
||||
static void Task_HofPC_HandlePaletteOnExit(u8 taskId)
|
||||
{
|
||||
struct HallofFameTeam* fameTeam;
|
||||
struct HallofFameTeam *fameTeam;
|
||||
|
||||
CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
|
||||
fameTeam = (struct HallofFameTeam*)(gDecompressionBuffer);
|
||||
fameTeam = (struct HallofFameTeam *)(gDecompressionBuffer);
|
||||
fameTeam->mon[0] = sDummyFameMon;
|
||||
ComputerScreenCloseEffect(0, 0, 0);
|
||||
gTasks[taskId].func = Task_HofPC_HandleExit;
|
||||
@ -1369,7 +1369,7 @@ static void SpriteCB_GetOnScreenAndAnimate(struct Sprite *sprite)
|
||||
#define sSineIdx data[0]
|
||||
#define sExtraY data[1]
|
||||
|
||||
static void SpriteCB_HofConfetti(struct Sprite* sprite)
|
||||
static void SpriteCB_HofConfetti(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->y2 > 120)
|
||||
{
|
||||
@ -1394,7 +1394,7 @@ static void SpriteCB_HofConfetti(struct Sprite* sprite)
|
||||
static bool8 CreateHofConfettiSprite(void)
|
||||
{
|
||||
u8 spriteID;
|
||||
struct Sprite* sprite;
|
||||
struct Sprite *sprite;
|
||||
|
||||
s16 posX = Random() % DISPLAY_WIDTH;
|
||||
s16 posY = -(Random() % 8);
|
||||
|
@ -28,14 +28,14 @@ static void ApplyImageEffect_PersonalityColor(u8);
|
||||
static void ApplyImageEffect_RedChannelGrayscale(u8);
|
||||
static void ApplyImageEffect_RedChannelGrayscaleHighlight(u8);
|
||||
static void AddPointillismPoints(u16);
|
||||
static u16 ConvertColorToGrayscale(u16*);
|
||||
static u16 QuantizePixel_Blur(u16*, u16*, u16*);
|
||||
static u16 QuantizePixel_PersonalityColor(u16*, u8);
|
||||
static u16 QuantizePixel_BlackAndWhite(u16*);
|
||||
static u16 QuantizePixel_BlackOutline(u16*, u16*);
|
||||
static u16 QuantizePixel_Invert(u16*);
|
||||
static u16 QuantizePixel_BlurHard(u16*, u16*, u16*);
|
||||
static u16 QuantizePixel_MotionBlur(u16*, u16*);
|
||||
static u16 ConvertColorToGrayscale(u16 *);
|
||||
static u16 QuantizePixel_Blur(u16 *, u16 *, u16 *);
|
||||
static u16 QuantizePixel_PersonalityColor(u16 *, u8);
|
||||
static u16 QuantizePixel_BlackAndWhite(u16 *);
|
||||
static u16 QuantizePixel_BlackOutline(u16 *, u16 *);
|
||||
static u16 QuantizePixel_Invert(u16 *);
|
||||
static u16 QuantizePixel_BlurHard(u16 *, u16 *, u16 *);
|
||||
static u16 QuantizePixel_MotionBlur(u16 *, u16 *);
|
||||
static u16 GetColorFromPersonality(u8);
|
||||
static void QuantizePalette_Standard(bool8);
|
||||
static void SetPresetPalette_PrimaryColors(void);
|
||||
@ -46,10 +46,10 @@ static void SetPresetPalette_GrayscaleSmall(void);
|
||||
static void QuantizePalette_GrayscaleSmall(void);
|
||||
static void SetPresetPalette_BlackAndWhite(void);
|
||||
static void QuantizePalette_BlackAndWhite(void);
|
||||
static u16 QuantizePixel_Standard(u16*);
|
||||
static u16 QuantizePixel_GrayscaleSmall(u16*);
|
||||
static u16 QuantizePixel_Grayscale(u16*);
|
||||
static u16 QuantizePixel_PrimaryColors(u16*);
|
||||
static u16 QuantizePixel_Standard(u16 *);
|
||||
static u16 QuantizePixel_GrayscaleSmall(u16 *);
|
||||
static u16 QuantizePixel_Grayscale(u16 *);
|
||||
static u16 QuantizePixel_PrimaryColors(u16 *);
|
||||
|
||||
#define MAX_DIMENSION 64
|
||||
|
||||
@ -1091,7 +1091,7 @@ static u16 QuantizePixel_Standard(u16 *pixel)
|
||||
return RGB2(red, green, blue);
|
||||
}
|
||||
|
||||
static u16 QuantizePixel_PrimaryColors(u16* color)
|
||||
static u16 QuantizePixel_PrimaryColors(u16 *color)
|
||||
{
|
||||
u16 red = GET_R(*color);
|
||||
u16 green = GET_G(*color);
|
||||
|
@ -48,7 +48,7 @@ int GetMaxWidthInMenuTable(const struct MenuAction *actions, int numActions)
|
||||
return ConvertPixelWidthToTileWidth(maxWidth);
|
||||
}
|
||||
|
||||
int GetMaxWidthInSubsetOfMenuTable(const struct MenuAction *actions, const u8* actionIds, int numActions)
|
||||
int GetMaxWidthInSubsetOfMenuTable(const struct MenuAction *actions, const u8 *actionIds, int numActions)
|
||||
{
|
||||
int i, maxWidth;
|
||||
|
||||
|
@ -1106,7 +1106,7 @@ static void SpriteCB_Player(struct Sprite *sprite)
|
||||
|
||||
#define sPlayerSpriteId data[0]
|
||||
|
||||
static void SpriteCB_Bicycle(struct Sprite* sprite)
|
||||
static void SpriteCB_Bicycle(struct Sprite *sprite)
|
||||
{
|
||||
sprite->invisible = gSprites[sprite->sPlayerSpriteId].invisible;
|
||||
sprite->x = gSprites[sprite->sPlayerSpriteId].x;
|
||||
@ -1139,7 +1139,7 @@ static void SpriteCB_FlygonLeftHalf(struct Sprite *sprite)
|
||||
|
||||
#define sLeftSpriteId data[0]
|
||||
|
||||
static void SpriteCB_FlygonRightHalf(struct Sprite* sprite)
|
||||
static void SpriteCB_FlygonRightHalf(struct Sprite *sprite)
|
||||
{
|
||||
sprite->invisible = gSprites[sprite->sLeftSpriteId].invisible;
|
||||
sprite->y = gSprites[sprite->sLeftSpriteId].y;
|
||||
|
104
src/item_menu.c
104
src/item_menu.c
@ -128,7 +128,7 @@ static bool8 LoadBagMenu_Graphics(void);
|
||||
static void LoadBagMenuTextWindows(void);
|
||||
static void AllocateBagItemListBuffers(void);
|
||||
static void LoadBagItemListBuffers(u8);
|
||||
static void PrintPocketNames(const u8*, const u8*);
|
||||
static void PrintPocketNames(const u8 *, const u8 *);
|
||||
static void CopyPocketNameToWindow(u32);
|
||||
static void DrawPocketIndicatorSquare(u8, bool8);
|
||||
static void CreatePocketScrollArrowPair(void);
|
||||
@ -138,10 +138,10 @@ static void PrepareTMHMMoveWindow(void);
|
||||
static bool8 IsWallysBag(void);
|
||||
static void Task_WallyTutorialBagMenu(u8);
|
||||
static void Task_BagMenu_HandleInput(u8);
|
||||
static void GetItemName(s8*, u16);
|
||||
static void GetItemName(s8 *, u16);
|
||||
static void PrintItemDescription(int);
|
||||
static void BagMenu_PrintCursorAtPos(u8, u8);
|
||||
static void BagMenu_Print(u8, u8, const u8*, u8, u8, u8, u8, u8, u8);
|
||||
static void BagMenu_Print(u8, u8, const u8 *, u8, u8, u8, u8, u8, u8);
|
||||
static void Task_CloseBagMenu(u8);
|
||||
static u8 AddItemMessageWindow(u8);
|
||||
static void RemoveItemMessageWindow(u8);
|
||||
@ -189,7 +189,7 @@ static void InitPocketListPositions(void);
|
||||
static void InitPocketScrollPositions(void);
|
||||
static u8 CreateBagInputHandlerTask(u8);
|
||||
static void DrawItemListBgRow(u8);
|
||||
static void BagMenu_MoveCursorCallback(s32, bool8, struct ListMenu*);
|
||||
static void BagMenu_MoveCursorCallback(s32, bool8, struct ListMenu *);
|
||||
static void BagMenu_ItemPrintCallback(u8, u32, u8);
|
||||
static void ItemMenu_UseOutOfBattle(u8);
|
||||
static void ItemMenu_Toss(u8);
|
||||
@ -1080,7 +1080,7 @@ void Task_FadeAndCloseBagMenu(u8 taskId)
|
||||
|
||||
static void Task_CloseBagMenu(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
DestroyListMenuTask(tListTaskId, &gBagPosition.scrollPosition[gBagPosition.pocket], &gBagPosition.cursorPosition[gBagPosition.pocket]);
|
||||
@ -1162,7 +1162,7 @@ u8 GetItemListPosition(u8 pocketId)
|
||||
|
||||
void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void (*callback)(u8 taskId))
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
tMsgWindowId = AddItemMessageWindow(ITEMWIN_MESSAGE);
|
||||
FillWindowPixelBuffer(tMsgWindowId, PIXEL_FILL(1));
|
||||
@ -1172,9 +1172,9 @@ void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void (*callback)(u8
|
||||
|
||||
void CloseItemMessage(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
u16* scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16* cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u16 *scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
RemoveItemMessageWindow(ITEMWIN_MESSAGE);
|
||||
DestroyListMenuTask(tListTaskId, scrollPos, cursorPos);
|
||||
UpdatePocketItemList(gBagPosition.pocket);
|
||||
@ -1210,9 +1210,9 @@ static void PrintItemSoldAmount(int windowId, int numSold, int moneyEarned)
|
||||
|
||||
static void Task_BagMenu_HandleInput(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
u16* scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16* cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u16 *scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
s32 listPosition;
|
||||
|
||||
if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE && !gPaletteFade.active)
|
||||
@ -1313,7 +1313,7 @@ static void ChangeBagPocketId(u8 *bagPocketId, s8 deltaBagPocketId)
|
||||
|
||||
static void SwitchBagPocket(u8 taskId, s16 deltaBagPocketId, bool16 skipEraseList)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u8 newPocket;
|
||||
|
||||
tPocketSwitchState = 0;
|
||||
@ -1352,7 +1352,7 @@ static void SwitchBagPocket(u8 taskId, s16 deltaBagPocketId, bool16 skipEraseLis
|
||||
|
||||
static void Task_SwitchBagPocket(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (!MenuHelpers_IsLinkActive() && !IsWallysBag())
|
||||
{
|
||||
@ -1430,7 +1430,7 @@ static bool8 CanSwapItems(void)
|
||||
|
||||
static void StartItemSwap(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
ListMenuSetUnkIndicatorsStructField(tListTaskId, 16, 1);
|
||||
tListPosition = gBagPosition.scrollPosition[gBagPosition.pocket] + gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
@ -1447,7 +1447,7 @@ static void StartItemSwap(u8 taskId)
|
||||
|
||||
static void Task_HandleSwappingItemsInput(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (MenuHelpers_ShouldWaitForLinkRecv() != TRUE)
|
||||
{
|
||||
@ -1485,9 +1485,9 @@ static void Task_HandleSwappingItemsInput(u8 taskId)
|
||||
|
||||
static void DoItemSwap(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
u16* scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16* cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u16 *scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
u16 realPos = (*scrollPos + *cursorPos);
|
||||
|
||||
if (tListPosition == realPos || tListPosition == realPos - 1)
|
||||
@ -1512,9 +1512,9 @@ static void DoItemSwap(u8 taskId)
|
||||
|
||||
static void CancelItemSwap(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
u16* scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16* cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u16 *scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
|
||||
gBagMenu->toSwapPos = NOT_SWAPPING;
|
||||
DestroyListMenuTask(tListTaskId, scrollPos, cursorPos);
|
||||
@ -1806,7 +1806,7 @@ static void ItemMenu_UseOutOfBattle(u8 taskId)
|
||||
|
||||
static void ItemMenu_Toss(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
RemoveContextWindow();
|
||||
tItemCount = 1;
|
||||
@ -1827,7 +1827,7 @@ static void ItemMenu_Toss(u8 taskId)
|
||||
|
||||
static void AskTossItems(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS);
|
||||
@ -1839,7 +1839,7 @@ static void AskTossItems(u8 taskId)
|
||||
|
||||
static void CancelToss(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
PrintItemDescription(tListPosition);
|
||||
BagMenu_PrintCursor(tListTaskId, COLORID_NORMAL);
|
||||
@ -1848,7 +1848,7 @@ static void CancelToss(u8 taskId)
|
||||
|
||||
static void Task_ChooseHowManyToToss(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (AdjustQuantityAccordingToDPadInput(&tItemCount, tQuantity) == TRUE)
|
||||
{
|
||||
@ -1870,7 +1870,7 @@ static void Task_ChooseHowManyToToss(u8 taskId)
|
||||
|
||||
static void ConfirmToss(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS);
|
||||
@ -1884,9 +1884,9 @@ static void ConfirmToss(u8 taskId)
|
||||
// For when items are tossed or deposited
|
||||
static void Task_RemoveItemFromBag(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
u16* scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16* cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u16 *scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
@ -1904,9 +1904,9 @@ static void Task_RemoveItemFromBag(u8 taskId)
|
||||
|
||||
static void ItemMenu_Register(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
u16* scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16* cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u16 *scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
|
||||
if (gSaveBlock1Ptr->registeredItem == gSpecialVar_ItemId)
|
||||
gSaveBlock1Ptr->registeredItem = 0;
|
||||
@ -1973,7 +1973,7 @@ static void ItemMenu_CheckTag(u8 taskId)
|
||||
|
||||
static void ItemMenu_Cancel(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
RemoveContextWindow();
|
||||
PrintItemDescription(tListPosition);
|
||||
@ -2066,7 +2066,7 @@ bool8 UseRegisteredKeyItemOnField(void)
|
||||
|
||||
static void Task_ItemContext_Sell(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (ItemId_GetPrice(gSpecialVar_ItemId) == 0)
|
||||
{
|
||||
@ -2093,7 +2093,7 @@ static void Task_ItemContext_Sell(u8 taskId)
|
||||
|
||||
static void DisplaySellItemPriceAndConfirm(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * tItemCount, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ICanPayVar1);
|
||||
@ -2107,7 +2107,7 @@ static void AskSellItems(u8 taskId)
|
||||
|
||||
static void CancelSell(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
RemoveMoneyWindow();
|
||||
RemoveItemMessageWindow(ITEMWIN_MESSAGE);
|
||||
@ -2117,7 +2117,7 @@ static void CancelSell(u8 taskId)
|
||||
|
||||
static void InitSellHowManyInput(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u8 windowId = BagMenu_AddWindow(ITEMWIN_QUANTITY_WIDE);
|
||||
|
||||
PrintItemSoldAmount(windowId, 1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * tItemCount);
|
||||
@ -2127,7 +2127,7 @@ static void InitSellHowManyInput(u8 taskId)
|
||||
|
||||
static void Task_ChooseHowManyToSell(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (AdjustQuantityAccordingToDPadInput(&tItemCount, tQuantity) == TRUE)
|
||||
{
|
||||
@ -2152,7 +2152,7 @@ static void Task_ChooseHowManyToSell(u8 taskId)
|
||||
|
||||
static void ConfirmSell(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||
ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * tItemCount, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
@ -2162,9 +2162,9 @@ static void ConfirmSell(u8 taskId)
|
||||
|
||||
static void SellItem(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
u16* scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16* cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u16 *scrollPos = &gBagPosition.scrollPosition[gBagPosition.pocket];
|
||||
u16 *cursorPos = &gBagPosition.cursorPosition[gBagPosition.pocket];
|
||||
|
||||
PlaySE(SE_SHOP);
|
||||
RemoveBagItem(gSpecialVar_ItemId, tItemCount);
|
||||
@ -2191,7 +2191,7 @@ static void WaitAfterItemSell(u8 taskId)
|
||||
|
||||
static void Task_ItemContext_Deposit(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
tItemCount = 1;
|
||||
if (tQuantity == 1)
|
||||
@ -2211,7 +2211,7 @@ static void Task_ItemContext_Deposit(u8 taskId)
|
||||
|
||||
static void Task_ChooseHowManyToDeposit(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (AdjustQuantityAccordingToDPadInput(&tItemCount, tQuantity) == TRUE)
|
||||
{
|
||||
@ -2235,7 +2235,7 @@ static void Task_ChooseHowManyToDeposit(u8 taskId)
|
||||
|
||||
static void TryDepositItem(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0));
|
||||
if (ItemId_GetImportance(gSpecialVar_ItemId))
|
||||
@ -2263,7 +2263,7 @@ static void TryDepositItem(u8 taskId)
|
||||
|
||||
static void WaitDepositErrorMessage(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
@ -2327,7 +2327,7 @@ void DoWallyTutorialBagMenu(void)
|
||||
|
||||
static void Task_WallyTutorialBagMenu(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
@ -2423,19 +2423,19 @@ static void PrintPocketNames(const u8 *pocketName1, const u8 *pocketName2)
|
||||
offset = GetStringCenterAlignXOffset(FONT_NORMAL, pocketName2, 0x40);
|
||||
BagMenu_Print(windowId, FONT_NORMAL, pocketName2, offset + 0x40, 1, 0, 0, TEXT_SKIP_DRAW, COLORID_POCKET_NAME);
|
||||
}
|
||||
CpuCopy32((u8*)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gBagMenu->pocketNameBuffer, sizeof(gBagMenu->pocketNameBuffer));
|
||||
CpuCopy32((u8 *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), gBagMenu->pocketNameBuffer, sizeof(gBagMenu->pocketNameBuffer));
|
||||
RemoveWindow(windowId);
|
||||
}
|
||||
|
||||
static void CopyPocketNameToWindow(u32 a)
|
||||
{
|
||||
u8 (* tileDataBuffer)[32][32];
|
||||
u8* windowTileData;
|
||||
u8 *windowTileData;
|
||||
int b;
|
||||
if (a > 8)
|
||||
a = 8;
|
||||
tileDataBuffer = &gBagMenu->pocketNameBuffer;
|
||||
windowTileData = (u8*)GetWindowAttribute(2, WINDOW_TILE_DATA);
|
||||
windowTileData = (u8 *)GetWindowAttribute(2, WINDOW_TILE_DATA);
|
||||
CpuCopy32(tileDataBuffer[0][a], windowTileData, 0x100); // Top half of pocket name
|
||||
b = a + 16;
|
||||
CpuCopy32(tileDataBuffer[0][b], windowTileData + 0x100, 0x100); // Bottom half of pocket name
|
||||
@ -2551,7 +2551,7 @@ static void PrintTMHMMoveData(u16 itemId)
|
||||
{
|
||||
u8 i;
|
||||
u16 moveId;
|
||||
const u8* text;
|
||||
const u8 *text;
|
||||
|
||||
FillWindowPixelBuffer(WIN_TMHM_INFO, PIXEL_FILL(0));
|
||||
if (itemId == ITEM_NONE)
|
||||
|
@ -195,7 +195,7 @@ void ItemUseOutOfBattle_Mail(u8 taskId)
|
||||
|
||||
void ItemUseOutOfBattle_Bike(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
s16 coordsY;
|
||||
s16 coordsX;
|
||||
u8 behavior;
|
||||
@ -301,7 +301,7 @@ static void Task_UseItemfinder(u8 taskId)
|
||||
u8 playerDir;
|
||||
u8 playerDirToItem;
|
||||
u8 i;
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
if (tCounter == 0)
|
||||
{
|
||||
if (tItemfinderBeeps == 4)
|
||||
@ -843,7 +843,7 @@ void ItemUseOutOfBattle_Repel(u8 taskId)
|
||||
|
||||
static void Task_StartUseRepel(u8 taskId)
|
||||
{
|
||||
s16* data = gTasks[taskId].data;
|
||||
s16 *data = gTasks[taskId].data;
|
||||
|
||||
if (++data[8] > 7)
|
||||
{
|
||||
|
@ -160,7 +160,7 @@ void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopP
|
||||
/*
|
||||
void NoCashGBAPrint(const char *pBuf)
|
||||
{
|
||||
*(volatile u32*)NOCASHGBAPRINTADDR2 = (u32)pBuf;
|
||||
*(volatile u32 *)NOCASHGBAPRINTADDR2 = (u32)pBuf;
|
||||
}
|
||||
|
||||
void NoCashGBAPrintf(const char *pBuf, ...)
|
||||
|
@ -41,7 +41,7 @@ static void sio32intr_clock_master(void)
|
||||
{
|
||||
if (gSTWIStatus->reqNext <= gSTWIStatus->reqLength)
|
||||
{
|
||||
REG_SIODATA32 = ((u32*)gSTWIStatus->txPacket->rfuPacket8.data)[gSTWIStatus->reqNext];
|
||||
REG_SIODATA32 = ((u32 *)gSTWIStatus->txPacket->rfuPacket8.data)[gSTWIStatus->reqNext];
|
||||
gSTWIStatus->reqNext++;
|
||||
}
|
||||
else
|
||||
@ -62,7 +62,7 @@ static void sio32intr_clock_master(void)
|
||||
if ((regSIODATA32 & 0xFFFF0000) == 0x99660000)
|
||||
{
|
||||
gSTWIStatus->ackNext = 0;
|
||||
((u32*)gSTWIStatus->rxPacket)[gSTWIStatus->ackNext] = regSIODATA32;
|
||||
((u32 *)gSTWIStatus->rxPacket)[gSTWIStatus->ackNext] = regSIODATA32;
|
||||
gSTWIStatus->ackNext++;
|
||||
gSTWIStatus->ackActiveCommand = regSIODATA32;
|
||||
gSTWIStatus->ackLength = ackLen = regSIODATA32 >> 8;
|
||||
@ -85,7 +85,7 @@ static void sio32intr_clock_master(void)
|
||||
}
|
||||
else if (gSTWIStatus->state == 2) // master receive ack
|
||||
{
|
||||
((u32*)gSTWIStatus->rxPacket)[gSTWIStatus->ackNext] = regSIODATA32;
|
||||
((u32 *)gSTWIStatus->rxPacket)[gSTWIStatus->ackNext] = regSIODATA32;
|
||||
gSTWIStatus->ackNext++;
|
||||
if (gSTWIStatus->ackLength < gSTWIStatus->ackNext)
|
||||
gSTWIStatus->state = 3; // master done ack
|
||||
@ -158,7 +158,7 @@ static void sio32intr_clock_slave(void)
|
||||
regSIODATA32 = REG_SIODATA32;
|
||||
if (gSTWIStatus->state == 5) // slave receive req init
|
||||
{
|
||||
((u32*)gSTWIStatus->rxPacket)[0] = regSIODATA32;
|
||||
((u32 *)gSTWIStatus->rxPacket)[0] = regSIODATA32;
|
||||
gSTWIStatus->reqNext = 1;
|
||||
r0 = 0x99660000;
|
||||
// variable reuse required
|
||||
@ -179,24 +179,24 @@ static void sio32intr_clock_slave(void)
|
||||
)
|
||||
{
|
||||
gSTWIStatus->ackActiveCommand = gSTWIStatus->reqActiveCommand + 0x80;
|
||||
((u32*)gSTWIStatus->txPacket)[0] = 0x99660000 + gSTWIStatus->ackActiveCommand;
|
||||
((u32 *)gSTWIStatus->txPacket)[0] = 0x99660000 + gSTWIStatus->ackActiveCommand;
|
||||
gSTWIStatus->ackLength = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
((u32*)gSTWIStatus->txPacket)[0] = 0x996601EE;
|
||||
((u32 *)gSTWIStatus->txPacket)[0] = 0x996601EE;
|
||||
if (gSTWIStatus->reqActiveCommand >= 0x10 && gSTWIStatus->reqActiveCommand <= 0x3D)
|
||||
{
|
||||
((u32*)gSTWIStatus->txPacket)[1] = 1;
|
||||
((u32 *)gSTWIStatus->txPacket)[1] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
((u32*)gSTWIStatus->txPacket)[1] = 2;
|
||||
((u32 *)gSTWIStatus->txPacket)[1] = 2;
|
||||
}
|
||||
gSTWIStatus->ackLength = 1;
|
||||
gSTWIStatus->error = ERR_REQ_CMD_ACK_REJECTION;
|
||||
}
|
||||
REG_SIODATA32 = ((u32*)gSTWIStatus->txPacket)[0];
|
||||
REG_SIODATA32 = ((u32 *)gSTWIStatus->txPacket)[0];
|
||||
gSTWIStatus->ackNext = 1;
|
||||
gSTWIStatus->state = 7; // slave send ack
|
||||
}
|
||||
@ -216,7 +216,7 @@ static void sio32intr_clock_slave(void)
|
||||
}
|
||||
else if (gSTWIStatus->state == 6) // slave receive req
|
||||
{
|
||||
((u32*)gSTWIStatus->rxPacket)[gSTWIStatus->reqNext] = regSIODATA32;
|
||||
((u32 *)gSTWIStatus->rxPacket)[gSTWIStatus->reqNext] = regSIODATA32;
|
||||
gSTWIStatus->reqNext++;
|
||||
if (gSTWIStatus->reqLength < gSTWIStatus->reqNext)
|
||||
{
|
||||
@ -227,24 +227,24 @@ static void sio32intr_clock_slave(void)
|
||||
)
|
||||
{
|
||||
gSTWIStatus->ackActiveCommand = gSTWIStatus->reqActiveCommand + 0x80;
|
||||
((u32*)gSTWIStatus->txPacket)[0] = 0x99660000 | gSTWIStatus->ackActiveCommand;
|
||||
((u32 *)gSTWIStatus->txPacket)[0] = 0x99660000 | gSTWIStatus->ackActiveCommand;
|
||||
gSTWIStatus->ackLength = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
((u32*)gSTWIStatus->txPacket)[0] = 0x996601EE;
|
||||
((u32 *)gSTWIStatus->txPacket)[0] = 0x996601EE;
|
||||
if (gSTWIStatus->reqActiveCommand >= 0x10 && gSTWIStatus->reqActiveCommand <= 0x3D)
|
||||
{
|
||||
((u32*)gSTWIStatus->txPacket)[1] = 1;
|
||||
((u32 *)gSTWIStatus->txPacket)[1] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
((u32*)gSTWIStatus->txPacket)[1] = 2;
|
||||
((u32 *)gSTWIStatus->txPacket)[1] = 2;
|
||||
}
|
||||
gSTWIStatus->ackLength = 1;
|
||||
gSTWIStatus->error = ERR_REQ_CMD_ACK_REJECTION;
|
||||
}
|
||||
REG_SIODATA32 = ((u32*)gSTWIStatus->txPacket)[0];
|
||||
REG_SIODATA32 = ((u32 *)gSTWIStatus->txPacket)[0];
|
||||
gSTWIStatus->ackNext = 1;
|
||||
gSTWIStatus->state = 7; // slave send ack
|
||||
}
|
||||
@ -263,7 +263,7 @@ static void sio32intr_clock_slave(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
REG_SIODATA32 = ((u32*)gSTWIStatus->txPacket)[gSTWIStatus->ackNext];
|
||||
REG_SIODATA32 = ((u32 *)gSTWIStatus->txPacket)[gSTWIStatus->ackNext];
|
||||
gSTWIStatus->ackNext++;
|
||||
}
|
||||
}
|
||||
@ -336,8 +336,8 @@ static u16 handshake_wait(u16 slot)
|
||||
|
||||
static void STWI_set_timer_in_RAM(u8 count)
|
||||
{
|
||||
vu16* regTMCNTL = ®_TMCNT_L(gSTWIStatus->timerSelect);
|
||||
vu16* regTMCNTH = ®_TMCNT_H(gSTWIStatus->timerSelect);
|
||||
vu16 *regTMCNTL = ®_TMCNT_L(gSTWIStatus->timerSelect);
|
||||
vu16 *regTMCNTH = ®_TMCNT_H(gSTWIStatus->timerSelect);
|
||||
REG_IME = 0;
|
||||
switch (count)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user