Documented boolean uses

This commit is contained in:
Eduardo Quezada 2022-07-25 14:59:14 -04:00
parent a8c93dcf35
commit a37d8b1346
68 changed files with 197 additions and 197 deletions

View File

@ -58,8 +58,8 @@ void SpriteCb_HideAsMoveTarget(struct Sprite *sprite);
void SpriteCB_OpponentMonFromBall(struct Sprite *sprite); void SpriteCB_OpponentMonFromBall(struct Sprite *sprite);
void SpriteCB_BattleSpriteStartSlideLeft(struct Sprite *sprite); void SpriteCB_BattleSpriteStartSlideLeft(struct Sprite *sprite);
void SpriteCB_FaintSlideAnim(struct Sprite *sprite); void SpriteCB_FaintSlideAnim(struct Sprite *sprite);
void DoBounceEffect(u8 battlerId, u8 b, s8 c, s8 d); void DoBounceEffect(u8 battler, u8 which, s8 delta, s8 amplitude);
void EndBounceEffect(u8 battlerId, bool8 b); void EndBounceEffect(u8 battler, u8 which);
void SpriteCB_PlayerMonFromBall(struct Sprite *sprite); void SpriteCB_PlayerMonFromBall(struct Sprite *sprite);
void SpriteCB_TrainerThrowObject(struct Sprite *sprite); void SpriteCB_TrainerThrowObject(struct Sprite *sprite);
void AnimSetCenterToCornerVecX(struct Sprite *sprite); void AnimSetCenterToCornerVecX(struct Sprite *sprite);

View File

@ -15,7 +15,7 @@
|| itemId == ITEM_RETRO_MAIL)) || itemId == ITEM_RETRO_MAIL))
// mail.h // mail.h
void ReadMail(struct Mail *mail, void (*callback)(void), bool8 flag); void ReadMail(struct Mail *mail, void (*exitCallback)(void), bool8 hasText);
// mail_data.h // mail_data.h
void ClearAllMail(void); void ClearAllMail(void);

View File

@ -49,7 +49,7 @@ u32 rfu_LMAN_REQBN_softReset_and_checkID(void)
return id; return id;
} }
void rfu_LMAN_REQ_sendData(u8 clockChangeFlag) void rfu_LMAN_REQ_sendData(bool8 clockChangeFlag)
{ {
if (gRfuLinkStatus->parentChild == MODE_CHILD) if (gRfuLinkStatus->parentChild == MODE_CHILD)
{ {

View File

@ -638,7 +638,7 @@ static void CreateApprenticeMenu(u8 menu)
width = ConvertPixelWidthToTileWidth(pixelWidth); width = ConvertPixelWidthToTileWidth(pixelWidth);
left = ScriptMenu_AdjustLeftCoordFromWidth(left, width); left = ScriptMenu_AdjustLeftCoordFromWidth(left, width);
windowId = CreateAndShowWindow(left, top, width, count * 2); windowId = CreateAndShowWindow(left, top, width, count * 2);
SetStandardWindowBorderStyle(windowId, 0); SetStandardWindowBorderStyle(windowId, FALSE);
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
AddTextPrinterParameterized(windowId, FONT_NORMAL, strings[i], 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, strings[i], 8, (i * 16) + 1, TEXT_SKIP_DRAW, NULL);
@ -910,7 +910,7 @@ static void Script_PrintApprenticeMessage(void)
FreezeObjectEvents(); FreezeObjectEvents();
PlayerFreeze(); PlayerFreeze();
StopPlayerAvatar(); StopPlayerAvatar();
DrawDialogueFrame(0, 1); DrawDialogueFrame(0, TRUE);
PrintApprenticeMessage(); PrintApprenticeMessage();
} }

View File

@ -271,7 +271,7 @@ static void AnimTranslateWebThread(struct Sprite *sprite)
} }
else else
{ {
SetAverageBattlerPositions(gBattleAnimTarget, 1, &sprite->data[2], &sprite->data[4]); SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->data[2], &sprite->data[4]);
} }
InitAnimLinearTranslationWithSpeed(sprite); InitAnimLinearTranslationWithSpeed(sprite);
@ -294,7 +294,7 @@ static void AnimTranslateWebThread_Step(struct Sprite *sprite)
// Second stage of String Shot // Second stage of String Shot
static void AnimStringWrap(struct Sprite *sprite) static void AnimStringWrap(struct Sprite *sprite)
{ {
SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->x, &sprite->y); SetAverageBattlerPositions(gBattleAnimTarget, FALSE, &sprite->x, &sprite->y);
if (GetBattlerSide(gBattleAnimAttacker)) if (GetBattlerSide(gBattleAnimAttacker))
sprite->x -= gBattleAnimArgs[0]; sprite->x -= gBattleAnimArgs[0];
else else
@ -392,7 +392,7 @@ static void AnimTranslateStinger(struct Sprite *sprite)
} }
} }
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
lVarX = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2]; lVarX = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2) + gBattleAnimArgs[2];
lVarY = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3]; lVarY = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET) + gBattleAnimArgs[3];
@ -417,7 +417,7 @@ static void AnimTranslateStinger(struct Sprite *sprite)
// arg 5: wave amplitude // arg 5: wave amplitude
static void AnimMissileArc(struct Sprite *sprite) static void AnimMissileArc(struct Sprite *sprite)
{ {
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
if (GetBattlerSide(gBattleAnimAttacker)) if (GetBattlerSide(gBattleAnimAttacker))
gBattleAnimArgs[2] = -gBattleAnimArgs[2]; gBattleAnimArgs[2] = -gBattleAnimArgs[2];

View File

@ -786,7 +786,7 @@ void AnimTask_InitMementoShadow(u8 taskId)
void AnimTask_MementoHandleBg(u8 taskId) void AnimTask_MementoHandleBg(u8 taskId)
{ {
u8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? 1 : 0; bool8 toBG2 = GetBattlerSpriteBGPriorityRank(gBattleAnimAttacker) ^ 1 ? TRUE : FALSE;
ResetBattleAnimBg(toBG2); ResetBattleAnimBg(toBG2);
if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) if (IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker)))

View File

@ -2709,7 +2709,7 @@ static void AnimTranslateLinearSingleSineWave_Step(struct Sprite* sprite)
void AnimMoveTwisterParticle(struct Sprite* sprite) void AnimMoveTwisterParticle(struct Sprite* sprite)
{ {
if (IsDoubleBattle() == TRUE) if (IsDoubleBattle() == TRUE)
SetAverageBattlerPositions(gBattleAnimTarget, 1, &sprite->x, &sprite->y); SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->x, &sprite->y);
sprite->y += 32; sprite->y += 32;
sprite->data[0] = gBattleAnimArgs[0]; sprite->data[0] = gBattleAnimArgs[0];
@ -3716,7 +3716,7 @@ static void AnimNeedleArmSpike(struct Sprite* sprite)
if (IsContest()) if (IsContest())
c -= 0x8000; c -= 0x8000;
TrySetSpriteRotScale(sprite, 0, 0x100, 0x100, c); TrySetSpriteRotScale(sprite, FALSE, 0x100, 0x100, c);
sprite->callback = AnimNeedleArmSpike_Step; sprite->callback = AnimNeedleArmSpike_Step;
} }
} }

View File

@ -1684,7 +1684,7 @@ void AnimTask_AirCutterProjectile(u8 taskId)
if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
&& IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget))) && IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimTarget)))
{ {
SetAverageBattlerPositions(gBattleAnimTarget, 0, &targetX, &targetY); SetAverageBattlerPositions(gBattleAnimTarget, FALSE, &targetX, &targetY);
} }
else else
{ {
@ -3720,7 +3720,7 @@ static void AnimPerishSongMusicNote2(struct Sprite *sprite)
} }
if (++sprite->data[0] == sprite->data[1]) if (++sprite->data[0] == sprite->data[1])
SetGrayscaleOrOriginalPalette(sprite->oam.paletteNum + 16, 0); SetGrayscaleOrOriginalPalette(sprite->oam.paletteNum + 16, FALSE);
if (sprite->data[0] == sprite->data[1] + 80) if (sprite->data[0] == sprite->data[1] + 80)
DestroyAnimSprite(sprite); DestroyAnimSprite(sprite);
@ -3807,7 +3807,7 @@ static void AnimGuardRing(struct Sprite *sprite)
{ {
if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker))) if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && IsBattlerSpriteVisible(BATTLE_PARTNER(gBattleAnimAttacker)))
{ {
SetAverageBattlerPositions(gBattleAnimAttacker, 0, &sprite->x, &sprite->y); SetAverageBattlerPositions(gBattleAnimAttacker, FALSE, &sprite->x, &sprite->y);
sprite->y += 40; sprite->y += 40;
StartSpriteAffineAnim(sprite, 1); StartSpriteAffineAnim(sprite, 1);

View File

@ -2677,7 +2677,7 @@ static void AnimWeakFrustrationAngerMark(struct Sprite *sprite)
{ {
if (sprite->data[0] == 0) if (sprite->data[0] == 0)
{ {
InitSpritePosToAnimAttacker(sprite, 0); InitSpritePosToAnimAttacker(sprite, FALSE);
sprite->data[0]++; sprite->data[0]++;
} }
else if (sprite->data[0]++ > 20) else if (sprite->data[0]++ > 20)
@ -4807,7 +4807,7 @@ void AnimTask_MonToSubstitute(u8 taskId)
} }
else else
{ {
LoadBattleMonGfxAndAnimate(gBattleAnimAttacker, 0, spriteId); LoadBattleMonGfxAndAnimate(gBattleAnimAttacker, FALSE, spriteId);
if (IsContest()) if (IsContest())
{ {
gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gAffineAnims_BattleSpriteContest; gSprites[gBattlerSpriteIds[gBattleAnimAttacker]].affineAnims = gAffineAnims_BattleSpriteContest;

View File

@ -571,7 +571,7 @@ static void AnimSparkElectricity(struct Sprite *sprite)
static void AnimZapCannonSpark(struct Sprite *sprite) static void AnimZapCannonSpark(struct Sprite *sprite)
{ {
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
sprite->data[0] = gBattleAnimArgs[3]; sprite->data[0] = gBattleAnimArgs[3];
sprite->data[1] = sprite->x; sprite->data[1] = sprite->x;
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2);

View File

@ -454,7 +454,7 @@ static void AnimBasicFistOrFoot(struct Sprite *sprite)
StartSpriteAnim(sprite, gBattleAnimArgs[4]); StartSpriteAnim(sprite, gBattleAnimArgs[4]);
if (gBattleAnimArgs[3] == 0) if (gBattleAnimArgs[3] == 0)
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
else else
InitSpritePosToAnimTarget(sprite, TRUE); InitSpritePosToAnimTarget(sprite, TRUE);
@ -964,7 +964,7 @@ static void AnimArmThrustHit(struct Sprite *sprite)
static void AnimRevengeScratch(struct Sprite *sprite) static void AnimRevengeScratch(struct Sprite *sprite)
{ {
if (gBattleAnimArgs[2] == ANIM_ATTACKER) if (gBattleAnimArgs[2] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, 0); InitSpritePosToAnimAttacker(sprite, FALSE);
else else
InitSpritePosToAnimTarget(sprite, FALSE); InitSpritePosToAnimTarget(sprite, FALSE);

View File

@ -649,7 +649,7 @@ static void AnimBurnFlame(struct Sprite *sprite)
//void AnimFireRing(struct Sprite *sprite) //void AnimFireRing(struct Sprite *sprite)
void AnimFireRing(struct Sprite *sprite) void AnimFireRing(struct Sprite *sprite)
{ {
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
sprite->data[7] = gBattleAnimArgs[2]; sprite->data[7] = gBattleAnimArgs[2];
sprite->data[0] = 0; sprite->data[0] = 0;
@ -736,7 +736,7 @@ static void AnimFireCross(struct Sprite *sprite)
static void AnimFireSpiralOutward(struct Sprite *sprite) static void AnimFireSpiralOutward(struct Sprite *sprite)
{ {
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
sprite->data[1] = gBattleAnimArgs[2]; sprite->data[1] = gBattleAnimArgs[2];
sprite->data[0] = gBattleAnimArgs[3]; sprite->data[0] = gBattleAnimArgs[3];
@ -1102,7 +1102,7 @@ static void AnimWillOWispOrb(struct Sprite *sprite)
switch (sprite->data[0]) switch (sprite->data[0])
{ {
case 0: case 0:
InitSpritePosToAnimAttacker(sprite, 0); InitSpritePosToAnimAttacker(sprite, FALSE);
StartSpriteAnim(sprite, gBattleAnimArgs[2]); StartSpriteAnim(sprite, gBattleAnimArgs[2]);
sprite->data[7] = gBattleAnimArgs[2]; sprite->data[7] = gBattleAnimArgs[2];

View File

@ -456,7 +456,7 @@ static void AnimAirWaveCrescent(struct Sprite *sprite)
} }
else else
{ {
SetAverageBattlerPositions(gBattleAnimTarget, 1, &sprite->data[2], &sprite->data[4]); SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->data[2], &sprite->data[4]);
} }
sprite->data[2] = sprite->data[2] + gBattleAnimArgs[2]; sprite->data[2] = sprite->data[2] + gBattleAnimArgs[2];
@ -906,7 +906,7 @@ static void AnimWhirlwindLine(struct Sprite * sprite)
u8 mult; u8 mult;
if (gBattleAnimArgs[2] == ANIM_ATTACKER) if (gBattleAnimArgs[2] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, 0); InitSpritePosToAnimAttacker(sprite, FALSE);
else else
InitSpritePosToAnimTarget(sprite, FALSE); InitSpritePosToAnimTarget(sprite, FALSE);
@ -971,7 +971,7 @@ static void AnimBounceBallShrink(struct Sprite *sprite)
switch (sprite->data[0]) switch (sprite->data[0])
{ {
case 0: case 0:
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = TRUE; gSprites[GetAnimBattlerSpriteId(ANIM_ATTACKER)].invisible = TRUE;
++sprite->data[0]; ++sprite->data[0];
break; break;
@ -1009,7 +1009,7 @@ static void AnimBounceBallLand(struct Sprite *sprite)
static void AnimDiveBall(struct Sprite *sprite) static void AnimDiveBall(struct Sprite *sprite)
{ {
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
sprite->data[0] = gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[2];
sprite->data[1] = gBattleAnimArgs[3]; sprite->data[1] = gBattleAnimArgs[3];
sprite->callback = AnimDiveBall_Step1; sprite->callback = AnimDiveBall_Step1;
@ -1067,7 +1067,7 @@ static void AnimDiveWaterSplash(struct Sprite *sprite)
sprite->data[1] = 0x200; sprite->data[1] = 0x200;
TrySetSpriteRotScale(sprite, 0, 0x100, sprite->data[1], 0); TrySetSpriteRotScale(sprite, FALSE, 0x100, sprite->data[1], 0);
sprite->data[0]++; sprite->data[0]++;
break; break;
case 1: case 1:
@ -1078,7 +1078,7 @@ static void AnimDiveWaterSplash(struct Sprite *sprite)
sprite->data[2]++; sprite->data[2]++;
TrySetSpriteRotScale(sprite, 0, 0x100, sprite->data[1], 0); TrySetSpriteRotScale(sprite, FALSE, 0x100, sprite->data[1], 0);
matrixNum = sprite->oam.matrixNum; matrixNum = sprite->oam.matrixNum;
@ -1202,7 +1202,7 @@ static void AnimSkyAttackBird(struct Sprite *sprite)
rotation = ArcTan2Neg(posx - sprite->x, posy - sprite->y); rotation = ArcTan2Neg(posx - sprite->x, posy - sprite->y);
rotation -= 16384; rotation -= 16384;
TrySetSpriteRotScale(sprite, 1, 0x100, 0x100, rotation); TrySetSpriteRotScale(sprite, TRUE, 0x100, 0x100, rotation);
sprite->callback = AnimSkyAttackBird_Step; sprite->callback = AnimSkyAttackBird_Step;
} }

View File

@ -1034,7 +1034,7 @@ static void AnimCurseNail(struct Sprite *sprite)
s16 xDelta; s16 xDelta;
s16 xDelta2; s16 xDelta2;
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER) if (GetBattlerSide(gBattleAnimAttacker) == B_SIDE_PLAYER)
{ {
xDelta = 24; xDelta = 24;

View File

@ -205,7 +205,7 @@ static void AnimDirtScatter(struct Sprite *sprite)
u8 targetXPos, targetYPos; u8 targetXPos, targetYPos;
s16 xOffset, yOffset; s16 xOffset, yOffset;
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
targetXPos = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_X_2); targetXPos = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_X_2);
targetYPos = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET); targetYPos = GetBattlerSpriteCoord2(gBattleAnimTarget, BATTLER_COORD_Y_PIC_OFFSET);

View File

@ -631,7 +631,7 @@ static void AnimIceEffectParticle(struct Sprite *sprite)
} }
else else
{ {
SetAverageBattlerPositions(gBattleAnimTarget, 1, &sprite->x, &sprite->y); SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->x, &sprite->y);
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
gBattleAnimArgs[0] = -gBattleAnimArgs[0]; gBattleAnimArgs[0] = -gBattleAnimArgs[0];
@ -676,7 +676,7 @@ static void AnimSwirlingSnowball(struct Sprite *sprite)
} }
else else
{ {
SetAverageBattlerPositions(gBattleAnimTarget, 1, &sprite->data[2], &sprite->data[4]); SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->data[2], &sprite->data[4]);
} }
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
@ -796,7 +796,7 @@ static void AnimMoveParticleBeyondTarget(struct Sprite *sprite)
} }
else else
{ {
SetAverageBattlerPositions(gBattleAnimTarget, 1, &sprite->data[2], &sprite->data[4]); SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &sprite->data[2], &sprite->data[4]);
} }
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
@ -867,7 +867,7 @@ static void AnimWaveFromCenterOfTarget(struct Sprite *sprite)
} }
else else
{ {
SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->x, &sprite->y); SetAverageBattlerPositions(gBattleAnimTarget, FALSE, &sprite->x, &sprite->y);
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
gBattleAnimArgs[0] = -gBattleAnimArgs[0]; gBattleAnimArgs[0] = -gBattleAnimArgs[0];
@ -905,7 +905,7 @@ static void InitSwirlingFogAnim(struct Sprite *sprite)
} }
else else
{ {
SetAverageBattlerPositions(gBattleAnimAttacker, 0, &sprite->x, &sprite->y); SetAverageBattlerPositions(gBattleAnimAttacker, FALSE, &sprite->x, &sprite->y);
if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER)
sprite->x -= gBattleAnimArgs[0]; sprite->x -= gBattleAnimArgs[0];
else else
@ -924,7 +924,7 @@ static void InitSwirlingFogAnim(struct Sprite *sprite)
} }
else else
{ {
SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->x, &sprite->y); SetAverageBattlerPositions(gBattleAnimTarget, FALSE, &sprite->x, &sprite->y);
if (GetBattlerSide(gBattleAnimTarget) != B_SIDE_PLAYER) if (GetBattlerSide(gBattleAnimTarget) != B_SIDE_PLAYER)
sprite->x -= gBattleAnimArgs[0]; sprite->x -= gBattleAnimArgs[0];
else else
@ -1497,7 +1497,7 @@ static void InitIceBallAnim(struct Sprite *sprite)
animNum = 4; animNum = 4;
StartSpriteAffineAnim(sprite, animNum); StartSpriteAffineAnim(sprite, animNum);
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
sprite->data[0] = gBattleAnimArgs[4]; sprite->data[0] = gBattleAnimArgs[4];

View File

@ -1578,7 +1578,7 @@ void TranslateAnimSpriteToTargetMonLocation(struct Sprite *sprite)
void AnimThrowProjectile(struct Sprite *sprite) void AnimThrowProjectile(struct Sprite *sprite)
{ {
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
if (GetBattlerSide(gBattleAnimAttacker)) if (GetBattlerSide(gBattleAnimAttacker))
gBattleAnimArgs[2] = -gBattleAnimArgs[2]; gBattleAnimArgs[2] = -gBattleAnimArgs[2];
sprite->data[0] = gBattleAnimArgs[4]; sprite->data[0] = gBattleAnimArgs[4];

View File

@ -945,7 +945,7 @@ static void AnimHitSplatBasic(struct Sprite *sprite)
{ {
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
if (gBattleAnimArgs[2] == ANIM_ATTACKER) if (gBattleAnimArgs[2] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
else else
InitSpritePosToAnimTarget(sprite, TRUE); InitSpritePosToAnimTarget(sprite, TRUE);
@ -958,7 +958,7 @@ static void AnimHitSplatPersistent(struct Sprite *sprite)
{ {
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
if (gBattleAnimArgs[2] == ANIM_ATTACKER) if (gBattleAnimArgs[2] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
else else
InitSpritePosToAnimTarget(sprite, TRUE); InitSpritePosToAnimTarget(sprite, TRUE);
@ -984,7 +984,7 @@ static void AnimHitSplatRandom(struct Sprite *sprite)
StartSpriteAffineAnim(sprite, gBattleAnimArgs[1]); StartSpriteAffineAnim(sprite, gBattleAnimArgs[1]);
if (gBattleAnimArgs[0] == ANIM_ATTACKER) if (gBattleAnimArgs[0] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, 0); InitSpritePosToAnimAttacker(sprite, FALSE);
else else
InitSpritePosToAnimTarget(sprite, FALSE); InitSpritePosToAnimTarget(sprite, FALSE);
@ -1010,7 +1010,7 @@ static void AnimHitSplatOnMonEdge(struct Sprite *sprite)
static void AnimCrossImpact(struct Sprite *sprite) static void AnimCrossImpact(struct Sprite *sprite)
{ {
if (gBattleAnimArgs[2] == ANIM_ATTACKER) if (gBattleAnimArgs[2] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
else else
InitSpritePosToAnimTarget(sprite, TRUE); InitSpritePosToAnimTarget(sprite, TRUE);
@ -1023,7 +1023,7 @@ static void AnimFlashingHitSplat(struct Sprite *sprite)
{ {
StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]); StartSpriteAffineAnim(sprite, gBattleAnimArgs[3]);
if (gBattleAnimArgs[2] == ANIM_ATTACKER) if (gBattleAnimArgs[2] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
else else
InitSpritePosToAnimTarget(sprite, TRUE); InitSpritePosToAnimTarget(sprite, TRUE);

View File

@ -190,7 +190,7 @@ static void AnimSludgeProjectile(struct Sprite *sprite)
if (!gBattleAnimArgs[3]) if (!gBattleAnimArgs[3])
StartSpriteAnim(sprite, 2); StartSpriteAnim(sprite, 2);
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
sprite->data[0] = gBattleAnimArgs[2]; sprite->data[0] = gBattleAnimArgs[2];
sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2); sprite->data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X_2);
@ -214,8 +214,8 @@ static void AnimAcidPoisonBubble(struct Sprite *sprite)
if (!gBattleAnimArgs[3]) if (!gBattleAnimArgs[3])
StartSpriteAnim(sprite, 2); StartSpriteAnim(sprite, 2);
InitSpritePosToAnimAttacker(sprite, 1); InitSpritePosToAnimAttacker(sprite, TRUE);
SetAverageBattlerPositions(gBattleAnimTarget, 1, &l1, &l2); SetAverageBattlerPositions(gBattleAnimTarget, TRUE, &l1, &l2);
if (GetBattlerSide(gBattleAnimAttacker)) if (GetBattlerSide(gBattleAnimAttacker))
gBattleAnimArgs[4] = -gBattleAnimArgs[4]; gBattleAnimArgs[4] = -gBattleAnimArgs[4];

View File

@ -297,7 +297,7 @@ const struct SpriteTemplate gWeatherBallRockDownSpriteTemplate =
static void AnimFallingRock(struct Sprite *sprite) static void AnimFallingRock(struct Sprite *sprite)
{ {
if (gBattleAnimArgs[3] != 0) if (gBattleAnimArgs[3] != 0)
SetAverageBattlerPositions(gBattleAnimTarget, 0, &sprite->x, &sprite->y); SetAverageBattlerPositions(gBattleAnimTarget, FALSE, &sprite->x, &sprite->y);
sprite->x += gBattleAnimArgs[0]; sprite->x += gBattleAnimArgs[0];
sprite->y += 14; sprite->y += 14;
@ -363,7 +363,7 @@ static void AnimRockFragment(struct Sprite *sprite)
static void AnimParticleInVortex(struct Sprite *sprite) static void AnimParticleInVortex(struct Sprite *sprite)
{ {
if (gBattleAnimArgs[6] == ANIM_ATTACKER) if (gBattleAnimArgs[6] == ANIM_ATTACKER)
InitSpritePosToAnimAttacker(sprite, 0); InitSpritePosToAnimAttacker(sprite, FALSE);
else else
InitSpritePosToAnimTarget(sprite, FALSE); InitSpritePosToAnimTarget(sprite, FALSE);
@ -544,7 +544,7 @@ static void AnimFlyingSandCrescent(struct Sprite *sprite)
static void AnimRaiseSprite(struct Sprite *sprite) static void AnimRaiseSprite(struct Sprite *sprite)
{ {
StartSpriteAnim(sprite, gBattleAnimArgs[4]); StartSpriteAnim(sprite, gBattleAnimArgs[4]);
InitSpritePosToAnimAttacker(sprite, 0); InitSpritePosToAnimAttacker(sprite, FALSE);
sprite->data[0] = gBattleAnimArgs[3]; sprite->data[0] = gBattleAnimArgs[3];
sprite->data[2] = sprite->x; sprite->data[2] = sprite->x;

View File

@ -515,7 +515,7 @@ static void AnimTask_UnusedLevelUpHealthBox_Step(u8 taskId)
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[12], 16 - gTasks[taskId].data[12])); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[12], 16 - gTasks[taskId].data[12]));
if (gTasks[taskId].data[12] == 0) if (gTasks[taskId].data[12] == 0)
{ {
ResetBattleAnimBg(0); ResetBattleAnimBg(FALSE);
gBattle_WIN0H = 0; gBattle_WIN0H = 0;
gBattle_WIN0V = 0; gBattle_WIN0V = 0;
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR); SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR | WININ_WIN1_BG_ALL | WININ_WIN1_OBJ | WININ_WIN1_CLR);
@ -2408,7 +2408,7 @@ void AnimTask_FreePokeblockGfx(u8 taskId)
static void SpriteCB_PokeBlock_Throw(struct Sprite *sprite) static void SpriteCB_PokeBlock_Throw(struct Sprite *sprite)
{ {
InitSpritePosToAnimAttacker(sprite, 0); InitSpritePosToAnimAttacker(sprite, FALSE);
sprite->sDuration = 30; sprite->sDuration = 30;
sprite->sTargetX = GetBattlerSpriteCoord(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), BATTLER_COORD_X) + gBattleAnimArgs[2]; sprite->sTargetX = GetBattlerSpriteCoord(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), BATTLER_COORD_X) + gBattleAnimArgs[2];
sprite->sTargetY = GetBattlerSpriteCoord(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), BATTLER_COORD_Y) + gBattleAnimArgs[3]; sprite->sTargetY = GetBattlerSpriteCoord(GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), BATTLER_COORD_Y) + gBattleAnimArgs[3];

View File

@ -356,7 +356,7 @@ static void AnimTask_DrawFallingWhiteLinesOnAttacker_Step(u8 taskId)
gBattle_BG1_Y += 64; gBattle_BG1_Y += 64;
if (++gTasks[taskId].data[11] == 4) if (++gTasks[taskId].data[11] == 4)
{ {
ResetBattleAnimBg(0); ResetBattleAnimBg(FALSE);
gBattle_WIN0H = 0; gBattle_WIN0H = 0;
gBattle_WIN0V = 0; gBattle_WIN0V = 0;
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR
@ -568,7 +568,7 @@ static void StatsChangeAnimation_Step3(u8 taskId)
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[12], 16 - gTasks[taskId].data[12])); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[12], 16 - gTasks[taskId].data[12]));
if (gTasks[taskId].data[12] == 0) if (gTasks[taskId].data[12] == 0)
{ {
ResetBattleAnimBg(0); ResetBattleAnimBg(FALSE);
gTasks[taskId].data[15]++; gTasks[taskId].data[15]++;
} }
} }
@ -869,7 +869,7 @@ static void UpdateMonScrollingBgMask(u8 taskId)
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[12], 16 - gTasks[taskId].data[12])); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[12], 16 - gTasks[taskId].data[12]));
if (gTasks[taskId].data[12] == 0) if (gTasks[taskId].data[12] == 0)
{ {
ResetBattleAnimBg(0); ResetBattleAnimBg(FALSE);
gBattle_WIN0H = 0; gBattle_WIN0H = 0;
gBattle_WIN0V = 0; gBattle_WIN0V = 0;
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ | WININ_WIN0_CLR

View File

@ -1747,9 +1747,9 @@ static void CreateFrontierFactorySelectableMons(u8 firstMonId)
u16 monId = gSaveBlock2Ptr->frontier.rentalMons[i].monId; u16 monId = gSaveBlock2Ptr->frontier.rentalMons[i].monId;
sFactorySelectScreen->mons[i + firstMonId].monId = monId; sFactorySelectScreen->mons[i + firstMonId].monId = monId;
if (i < rentalRank) if (i < rentalRank)
ivs = GetFactoryMonFixedIV(challengeNum + 1, 0); ivs = GetFactoryMonFixedIV(challengeNum + 1, FALSE);
else else
ivs = GetFactoryMonFixedIV(challengeNum, 0); ivs = GetFactoryMonFixedIV(challengeNum, FALSE);
CreateMonWithEVSpreadNatureOTID(&sFactorySelectScreen->mons[i + firstMonId].monData, CreateMonWithEVSpreadNatureOTID(&sFactorySelectScreen->mons[i + firstMonId].monData,
gFacilityTrainerMons[monId].species, gFacilityTrainerMons[monId].species,
level, level,

View File

@ -1195,7 +1195,7 @@ static void Task_ChooseHowManyToToss(u8 taskId)
{ {
// Toss // Toss
PlaySE(SE_SELECT); PlaySE(SE_SELECT);
ClearStdWindowAndFrameToTransparent(WIN_TOSS_NUM, 0); ClearStdWindowAndFrameToTransparent(WIN_TOSS_NUM, FALSE);
ClearWindowTilemap(WIN_TOSS_NUM); ClearWindowTilemap(WIN_TOSS_NUM);
ScheduleBgCopyTilemapToVram(1); ScheduleBgCopyTilemapToVram(1);
AskConfirmToss(taskId); AskConfirmToss(taskId);
@ -1204,7 +1204,7 @@ static void Task_ChooseHowManyToToss(u8 taskId)
{ {
// Cancel tossing // Cancel tossing
PlaySE(SE_SELECT); PlaySE(SE_SELECT);
ClearStdWindowAndFrameToTransparent(WIN_TOSS_NUM, 0); ClearStdWindowAndFrameToTransparent(WIN_TOSS_NUM, FALSE);
ClearWindowTilemap(WIN_TOSS_NUM); ClearWindowTilemap(WIN_TOSS_NUM);
ScheduleBgCopyTilemapToVram(1); ScheduleBgCopyTilemapToVram(1);
DontTossItem(taskId); DontTossItem(taskId);
@ -1464,7 +1464,7 @@ static void PyramidBagPrint_Quantity(u8 windowId, const u8 *src, u8 x, u8 y, u8
static void DrawTossNumberWindow(u8 windowId) static void DrawTossNumberWindow(u8 windowId)
{ {
DrawStdFrameWithCustomTileAndPalette(windowId, 0, 1, 0xE); DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, 1, 0xE);
ScheduleBgCopyTilemapToVram(1); ScheduleBgCopyTilemapToVram(1);
} }

View File

@ -1300,7 +1300,7 @@ void ObjectEventInteractionPlantBerryTree(void)
{ {
u8 berry = ItemIdToBerryType(gSpecialVar_ItemId); u8 berry = ItemIdToBerryType(gSpecialVar_ItemId);
PlantBerryTree(GetObjectEventBerryTreeId(gSelectedObjectEvent), berry, 1, TRUE); PlantBerryTree(GetObjectEventBerryTreeId(gSelectedObjectEvent), berry, BERRY_STAGE_PLANTED, TRUE);
ObjectEventInteractionGetBerryTreeData(); ObjectEventInteractionGetBerryTreeData();
} }

View File

@ -3553,7 +3553,7 @@ static bool8 PrintBlendingResults(void)
sBerryBlender->mainState++; sBerryBlender->mainState++;
break; break;
case 5: case 5:
ClearStdWindowAndFrameToTransparent(5, 1); ClearStdWindowAndFrameToTransparent(5, TRUE);
for (i = 0; i < BLENDER_MAX_PLAYERS; i++) for (i = 0; i < BLENDER_MAX_PLAYERS; i++)
{ {
@ -3692,7 +3692,7 @@ static bool8 PrintBlendingRanking(void)
} }
break; break;
case 3: case 3:
DrawStdFrameWithCustomTileAndPalette(5, 0, 1, 0xD); DrawStdFrameWithCustomTileAndPalette(5, FALSE, 1, 0xD);
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_Ranking, 168); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, sText_Ranking, 168);
Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SKIP_DRAW, 0); Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SKIP_DRAW, 0);
@ -3764,7 +3764,7 @@ void ShowBerryBlenderRecordWindow(void)
winTemplate = sBlenderRecordWindowTemplate; winTemplate = sBlenderRecordWindowTemplate;
gRecordsWindowId = AddWindow(&winTemplate); gRecordsWindowId = AddWindow(&winTemplate);
DrawStdWindowFrame(gRecordsWindowId, 0); DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1)); FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_BlenderMaxSpeedRecord, 144); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_BlenderMaxSpeedRecord, 144);

View File

@ -1752,7 +1752,7 @@ static bool32 OpenResultsWindow(struct BerryCrushGame *game, struct BerryCrushGa
break; break;
case 2: case 2:
LoadUserWindowBorderGfx_(gfx->resultsWindowId, 541, 208); LoadUserWindowBorderGfx_(gfx->resultsWindowId, 541, 208);
DrawStdFrameWithCustomTileAndPalette(gfx->resultsWindowId, 0, 541, 13); DrawStdFrameWithCustomTileAndPalette(gfx->resultsWindowId, FALSE, 541, 13);
break; break;
case 3: case 3:
playerCountIdx = game->playerCount - 2; playerCountIdx = game->playerCount - 2;
@ -1788,7 +1788,7 @@ static bool32 OpenResultsWindow(struct BerryCrushGame *game, struct BerryCrushGa
static void CloseResultsWindow(struct BerryCrushGame *game) static void CloseResultsWindow(struct BerryCrushGame *game)
{ {
ClearStdWindowAndFrameToTransparent(game->gfx.resultsWindowId, 1); ClearStdWindowAndFrameToTransparent(game->gfx.resultsWindowId, TRUE);
RemoveWindow(game->gfx.resultsWindowId); RemoveWindow(game->gfx.resultsWindowId);
DrawPlayerNameWindows(game); DrawPlayerNameWindows(game);
} }
@ -1810,7 +1810,7 @@ static void Task_ShowRankings(u8 taskId)
PutWindowTilemap(tWindowId); PutWindowTilemap(tWindowId);
FillWindowPixelBuffer(tWindowId, PIXEL_FILL(0)); FillWindowPixelBuffer(tWindowId, PIXEL_FILL(0));
LoadUserWindowBorderGfx_(tWindowId, 541, 208); LoadUserWindowBorderGfx_(tWindowId, 541, 208);
DrawStdFrameWithCustomTileAndPalette(tWindowId, 0, 541, 13); DrawStdFrameWithCustomTileAndPalette(tWindowId, FALSE, 541, 13);
break; break;
case 1: case 1:
// Print header text // Print header text
@ -1849,7 +1849,7 @@ static void Task_ShowRankings(u8 taskId)
else else
return; return;
case 3: case 3:
ClearStdWindowAndFrameToTransparent(tWindowId, 1); ClearStdWindowAndFrameToTransparent(tWindowId, TRUE);
ClearWindowTilemap(tWindowId); ClearWindowTilemap(tWindowId);
RemoveWindow(tWindowId); RemoveWindow(tWindowId);
DestroyTask(taskId); DestroyTask(taskId);
@ -1885,9 +1885,9 @@ static void HideTimer(struct BerryCrushGame_Gfx *gfx)
{ {
gfx->timerSprites[0]->invisible = TRUE; gfx->timerSprites[0]->invisible = TRUE;
gfx->timerSprites[1]->invisible = TRUE; gfx->timerSprites[1]->invisible = TRUE;
DigitObjUtil_HideOrShow(2, 1); DigitObjUtil_HideOrShow(2, TRUE);
DigitObjUtil_HideOrShow(1, 1); DigitObjUtil_HideOrShow(1, TRUE);
DigitObjUtil_HideOrShow(0, 1); DigitObjUtil_HideOrShow(0, TRUE);
} }
static void CreatePlayerNameWindows(struct BerryCrushGame *game) static void CreatePlayerNameWindows(struct BerryCrushGame *game)
@ -2282,7 +2282,7 @@ static u32 Cmd_PrintMessage(struct BerryCrushGame *game, u8 *args)
break; break;
case 3: case 3:
if (args[1] & F_MSG_CLEAR) if (args[1] & F_MSG_CLEAR)
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
RunOrScheduleCommand(game->nextCmd, SCHEDULE_CMD, NULL); RunOrScheduleCommand(game->nextCmd, SCHEDULE_CMD, NULL);
game->cmdState = args[4]; game->cmdState = args[4];
return 0; return 0;
@ -2402,7 +2402,7 @@ static u32 Cmd_WaitForOthersToPickBerries(struct BerryCrushGame *game, u8 *args)
game->targetDepth = MathUtil_Div32(Q_24_8(game->targetAPresses), Q_24_8(32)); game->targetDepth = MathUtil_Div32(Q_24_8(game->targetAPresses), Q_24_8(32));
break; break;
case 5: case 5:
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
RunOrScheduleCommand(CMD_DROP_BERRIES, SCHEDULE_CMD, NULL); RunOrScheduleCommand(CMD_DROP_BERRIES, SCHEDULE_CMD, NULL);
game->gameState = STATE_DROP_BERRIES; game->gameState = STATE_DROP_BERRIES;
game->cmdState = 0; game->cmdState = 0;
@ -3295,7 +3295,7 @@ static u32 Cmd_AskPlayAgain(struct BerryCrushGame *game, u8 *args)
} }
// Close Yes/No and start communication // Close Yes/No and start communication
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
SetPrintMessageArgs(args, MSG_COMM_STANDBY, 0, 0, 0); SetPrintMessageArgs(args, MSG_COMM_STANDBY, 0, 0, 0);
game->nextCmd = CMD_COMM_PLAY_AGAIN; game->nextCmd = CMD_COMM_PLAY_AGAIN;
RunOrScheduleCommand(CMD_PRINT_MSG, SCHEDULE_CMD, NULL); RunOrScheduleCommand(CMD_PRINT_MSG, SCHEDULE_CMD, NULL);
@ -3367,7 +3367,7 @@ static u32 Cmd_PlayAgain(struct BerryCrushGame *game, u8 *args)
return 0; return 0;
break; break;
case 2: case 2:
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
ResetCrusherPos(game); ResetCrusherPos(game);
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
UpdatePaletteFade(); UpdatePaletteFade();

View File

@ -97,7 +97,7 @@ static void PrintNumPlayersInLink(u16 windowId, u32 numPlayers)
u8 xPos; u8 xPos;
ConvertIntToDecimalStringN(gStringVar1, numPlayers, STR_CONV_MODE_LEFT_ALIGN, 1); ConvertIntToDecimalStringN(gStringVar1, numPlayers, STR_CONV_MODE_LEFT_ALIGN, 1);
SetStandardWindowBorderStyle(windowId, 0); SetStandardWindowBorderStyle(windowId, FALSE);
StringExpandPlaceholders(gStringVar4, gText_NumPlayerLink); StringExpandPlaceholders(gStringVar4, gText_NumPlayerLink);
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 88); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gStringVar4, 88);
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, xPos, 1, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, xPos, 1, TEXT_SKIP_DRAW, NULL);

View File

@ -79,7 +79,7 @@ void CB2_InitClearSaveDataScreen(void)
static void Task_DoClearSaveDataScreenYesNo(u8 taskId) static void Task_DoClearSaveDataScreenYesNo(u8 taskId)
{ {
DrawStdFrameWithCustomTileAndPalette(0, 0, 2, 14); DrawStdFrameWithCustomTileAndPalette(0, FALSE, 2, 14);
AddTextPrinterParameterized(0, FONT_NORMAL, gText_ClearAllSaveData, 0, 1, 0, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_ClearAllSaveData, 0, 1, 0, 0);
CreateYesNoMenu(sClearSaveYesNo, 2, 14, 1); CreateYesNoMenu(sClearSaveYesNo, 2, 14, 1);
gTasks[taskId].func = Task_ClearSaveDataScreenYesNoChoice; gTasks[taskId].func = Task_ClearSaveDataScreenYesNoChoice;

View File

@ -1582,7 +1582,7 @@ static void Task_HandleMoveSelectInput(u8 taskId)
StringCopy(gDisplayedStringBattle, gText_AppealNumButItCantParticipate); StringCopy(gDisplayedStringBattle, gText_AppealNumButItCantParticipate);
ContestClearGeneralTextWindow(); ContestClearGeneralTextWindow();
StringExpandPlaceholders(gStringVar4, gDisplayedStringBattle); StringExpandPlaceholders(gStringVar4, gDisplayedStringBattle);
Contest_StartTextPrinter(gStringVar4, 0); Contest_StartTextPrinter(gStringVar4, FALSE);
gBattle_BG0_Y = 0; gBattle_BG0_Y = 0;
gBattle_BG2_Y = 0; gBattle_BG2_Y = 0;
gTasks[taskId].func = Task_TryShowMoveSelectScreen; gTasks[taskId].func = Task_TryShowMoveSelectScreen;
@ -1814,7 +1814,7 @@ static void Task_DoAppeals(u8 taskId)
else else
StringCopy(gStringVar2, sInvalidContestMoveNames[eContestantStatus[contestant].moveCategory]); StringCopy(gStringVar2, sInvalidContestMoveNames[eContestantStatus[contestant].moveCategory]);
StringExpandPlaceholders(gStringVar4, gText_MonAppealedWithMove); StringExpandPlaceholders(gStringVar4, gText_MonAppealedWithMove);
Contest_StartTextPrinter(gStringVar4, 1); Contest_StartTextPrinter(gStringVar4, TRUE);
gTasks[taskId].tState = APPEALSTATE_WAIT_USED_MOVE_MSG; gTasks[taskId].tState = APPEALSTATE_WAIT_USED_MOVE_MSG;
} }
return; return;
@ -2076,7 +2076,7 @@ static void Task_DoAppeals(u8 taskId)
ContestClearGeneralTextWindow(); ContestClearGeneralTextWindow();
StringCopy(gStringVar1, gContestMons[contestant].nickname); StringCopy(gStringVar1, gContestMons[contestant].nickname);
StringExpandPlaceholders(gStringVar4, gText_MonCantAppealNextTurn); StringExpandPlaceholders(gStringVar4, gText_MonCantAppealNextTurn);
Contest_StartTextPrinter(gStringVar4, 1); Contest_StartTextPrinter(gStringVar4, TRUE);
} }
gTasks[taskId].tState = APPEALSTATE_WAIT_SKIP_NEXT_TURN_MSG; gTasks[taskId].tState = APPEALSTATE_WAIT_SKIP_NEXT_TURN_MSG;
} }
@ -2118,7 +2118,7 @@ static void Task_DoAppeals(u8 taskId)
ContestClearGeneralTextWindow(); ContestClearGeneralTextWindow();
StringCopy(gStringVar1, gContestMons[contestant].nickname); StringCopy(gStringVar1, gContestMons[contestant].nickname);
StringExpandPlaceholders(gStringVar4, gText_JudgeLookedAtMonExpectantly); StringExpandPlaceholders(gStringVar4, gText_JudgeLookedAtMonExpectantly);
Contest_StartTextPrinter(gStringVar4, 1); Contest_StartTextPrinter(gStringVar4, TRUE);
DoJudgeSpeechBubble(JUDGE_SYMBOL_ONE_EXCLAMATION); DoJudgeSpeechBubble(JUDGE_SYMBOL_ONE_EXCLAMATION);
gTasks[taskId].tCounter = 0; gTasks[taskId].tCounter = 0;
gTasks[taskId].tState = APPEALSTATE_WAIT_JUDGE_COMBO; gTasks[taskId].tState = APPEALSTATE_WAIT_JUDGE_COMBO;
@ -2231,7 +2231,7 @@ static void Task_DoAppeals(u8 taskId)
StringExpandPlaceholders(gStringVar4, gText_MonsXWentOverGreat); StringExpandPlaceholders(gStringVar4, gText_MonsXWentOverGreat);
else else
StringExpandPlaceholders(gStringVar4, gText_MonsXGotTheCrowdGoing); StringExpandPlaceholders(gStringVar4, gText_MonsXGotTheCrowdGoing);
Contest_StartTextPrinter(gStringVar4, 1); Contest_StartTextPrinter(gStringVar4, TRUE);
gTasks[taskId].tCounter = 0; gTasks[taskId].tCounter = 0;
gTasks[taskId].data[11] = 0; gTasks[taskId].data[11] = 0;
if (r3 < 0) if (r3 < 0)
@ -3666,7 +3666,7 @@ static void ContestPrintLinkStandby(void)
gBattle_BG0_Y = 0; gBattle_BG0_Y = 0;
gBattle_BG2_Y = 0; gBattle_BG2_Y = 0;
ContestClearGeneralTextWindow(); ContestClearGeneralTextWindow();
Contest_StartTextPrinter(gText_LinkStandby4, 0); Contest_StartTextPrinter(gText_LinkStandby4, FALSE);
} }
static void FillContestantWindowBgs(void) static void FillContestantWindowBgs(void)
@ -4577,7 +4577,7 @@ static void PrintAppealMoveResultText(u8 contestant, u8 stringId)
StringCopy(gStringVar3, gText_Contest_Fear); StringCopy(gStringVar3, gText_Contest_Fear);
StringExpandPlaceholders(gStringVar4, sAppealResultTexts[stringId]); StringExpandPlaceholders(gStringVar4, sAppealResultTexts[stringId]);
ContestClearGeneralTextWindow(); ContestClearGeneralTextWindow();
Contest_StartTextPrinter(gStringVar4, 1); Contest_StartTextPrinter(gStringVar4, TRUE);
} }
void MakeContestantNervous(u8 p) void MakeContestantNervous(u8 p)

View File

@ -2639,7 +2639,7 @@ static void Task_ShowContestEntryMonPic(u8 taskId)
break; break;
case 1: case 1:
task->data[5] = CreateWindowFromRect(10, 3, 8, 8); task->data[5] = CreateWindowFromRect(10, 3, 8, 8);
SetStandardWindowBorderStyle(task->data[5], 1); SetStandardWindowBorderStyle(task->data[5], TRUE);
task->data[0]++; task->data[0]++;
break; break;
case 2: case 2:

View File

@ -643,7 +643,7 @@ static void DecorationMenuAction_PutAway(u8 taskId)
else else
{ {
RemoveDecorationWindow(WINDOW_MAIN_MENU); RemoveDecorationWindow(WINDOW_MAIN_MENU);
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
FadeScreen(FADE_TO_BLACK, 0); FadeScreen(FADE_TO_BLACK, 0);
gTasks[taskId].tState = 0; gTasks[taskId].tState = 0;
gTasks[taskId].func = Task_ContinuePuttingAwayDecorations; gTasks[taskId].func = Task_ContinuePuttingAwayDecorations;
@ -688,7 +688,7 @@ static void ReturnToDecorationActionsAfterInvalidSelection(u8 taskId)
static void SecretBasePC_PrepMenuForSelectingStoredDecors(u8 taskId) static void SecretBasePC_PrepMenuForSelectingStoredDecors(u8 taskId)
{ {
LoadPalette(sDecorationMenuPalette, 0xd0, 0x20); LoadPalette(sDecorationMenuPalette, 0xd0, 0x20);
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
RemoveDecorationWindow(WINDOW_MAIN_MENU); RemoveDecorationWindow(WINDOW_MAIN_MENU);
InitDecorationCategoriesWindow(taskId); InitDecorationCategoriesWindow(taskId);
} }
@ -810,7 +810,7 @@ static void SelectDecorationCategory(u8 taskId)
static void ReturnToDecorationCategoriesAfterInvalidSelection(u8 taskId) static void ReturnToDecorationCategoriesAfterInvalidSelection(u8 taskId)
{ {
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
InitDecorationCategoriesWindow(taskId); InitDecorationCategoriesWindow(taskId);
} }
@ -834,7 +834,7 @@ static void ReturnToActionsMenuFromCategories(u8 taskId)
void ShowDecorationCategoriesWindow(u8 taskId) void ShowDecorationCategoriesWindow(u8 taskId)
{ {
LoadPalette(sDecorationMenuPalette, 0xd0, 0x20); LoadPalette(sDecorationMenuPalette, 0xd0, 0x20);
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
gTasks[taskId].tDecorationMenuCommand = DECOR_MENU_TRADE; gTasks[taskId].tDecorationMenuCommand = DECOR_MENU_TRADE;
sCurDecorationCategory = DECORCAT_DESK; sCurDecorationCategory = DECORCAT_DESK;
InitDecorationCategoriesWindow(taskId); InitDecorationCategoriesWindow(taskId);
@ -1141,7 +1141,7 @@ static void Task_ShowDecorationItemsWindow(u8 taskId)
static void DontTossDecoration(u8 taskId) static void DontTossDecoration(u8 taskId)
{ {
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
gTasks[taskId].func = Task_ShowDecorationItemsWindow; gTasks[taskId].func = Task_ShowDecorationItemsWindow;
} }
@ -1149,7 +1149,7 @@ static void ReturnToDecorationItemsAfterInvalidSelection(u8 taskId)
{ {
if (JOY_NEW(A_BUTTON | B_BUTTON)) if (JOY_NEW(A_BUTTON | B_BUTTON))
{ {
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
AddDecorationWindow(WINDOW_DECORATION_CATEGORIES); AddDecorationWindow(WINDOW_DECORATION_CATEGORIES);
ShowDecorationItemsWindow(taskId); ShowDecorationItemsWindow(taskId);
} }
@ -1640,7 +1640,7 @@ static void PlaceDecorationPrompt(u8 taskId)
static void PlaceDecoration(u8 taskId) static void PlaceDecoration(u8 taskId)
{ {
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
PlaceDecoration_(taskId); PlaceDecoration_(taskId);
if (gDecorations[gCurDecorationItems[gCurDecorationIndex]].permission != DECORPERM_SPRITE) if (gDecorations[gCurDecorationItems[gCurDecorationIndex]].permission != DECORPERM_SPRITE)
{ {
@ -1706,7 +1706,7 @@ static void CancelDecoratingPrompt(u8 taskId)
static void CancelDecorating(u8 taskId) static void CancelDecorating(u8 taskId)
{ {
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
CancelDecorating_(taskId); CancelDecorating_(taskId);
} }
@ -1891,7 +1891,7 @@ static void Task_SelectLocation(u8 taskId)
static void ContinueDecorating(u8 taskId) static void ContinueDecorating(u8 taskId)
{ {
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0; gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
gTasks[taskId].tButton = 0; gTasks[taskId].tButton = 0;
gTasks[taskId].func = Task_SelectLocation; gTasks[taskId].func = Task_SelectLocation;
@ -2247,7 +2247,7 @@ static void Task_PutAwayDecoration(u8 taskId)
if (!gPaletteFade.active) { if (!gPaletteFade.active) {
DrawWholeMapView(); DrawWholeMapView();
ScriptContext1_SetupScript(SecretBase_EventScript_PutAwayDecoration); ScriptContext1_SetupScript(SecretBase_EventScript_PutAwayDecoration);
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
gTasks[taskId].tState = 2; gTasks[taskId].tState = 2;
} }
break; break;
@ -2331,7 +2331,7 @@ static void Task_ContinuePuttingAwayDecorations(u8 taskId)
static void ContinuePuttingAwayDecorations(u8 taskId) static void ContinuePuttingAwayDecorations(u8 taskId)
{ {
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0; gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE; gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE;
gSprites[sDecor_CameraSpriteObjectIdx1].callback = InitializeCameraSprite1; gSprites[sDecor_CameraSpriteObjectIdx1].callback = InitializeCameraSprite1;
@ -2604,7 +2604,7 @@ static void StopPuttingAwayDecorationsPrompt(u8 taskId)
static void StopPuttingAwayDecorations(u8 taskId) static void StopPuttingAwayDecorations(u8 taskId)
{ {
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
StopPuttingAwayDecorations_(taskId); StopPuttingAwayDecorations_(taskId);
} }

View File

@ -904,7 +904,7 @@ u8 AddNewGameBirchObject(s16 x, s16 y, u8 subpriority)
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority) u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
{ {
s32 spriteId = CreateMonPicSprite_HandleDeoxys(species, 0, 0x8000, 1, x, y, 0, gMonPaletteTable[species].tag); s32 spriteId = CreateMonPicSprite_HandleDeoxys(species, 0, 0x8000, TRUE, x, y, 0, gMonPaletteTable[species].tag);
PreservePaletteInWeather(IndexOfSpritePaletteTag(gMonPaletteTable[species].tag) + 0x10); PreservePaletteInWeather(IndexOfSpritePaletteTag(gMonPaletteTable[species].tag) + 0x10);
if (spriteId == 0xFFFF) if (spriteId == 0xFFFF)
return MAX_SPRITES; return MAX_SPRITES;
@ -915,7 +915,7 @@ u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
u8 CreateMonSprite_FieldMove(u16 species, u32 otId, u32 personality, s16 x, s16 y, u8 subpriority) u8 CreateMonSprite_FieldMove(u16 species, u32 otId, u32 personality, s16 x, s16 y, u8 subpriority)
{ {
const struct CompressedSpritePalette *spritePalette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); const struct CompressedSpritePalette *spritePalette = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality);
u16 spriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, 1, x, y, 0, spritePalette->tag); u16 spriteId = CreateMonPicSprite_HandleDeoxys(species, otId, personality, TRUE, x, y, 0, spritePalette->tag);
PreservePaletteInWeather(IndexOfSpritePaletteTag(spritePalette->tag) + 0x10); PreservePaletteInWeather(IndexOfSpritePaletteTag(spritePalette->tag) + 0x10);
if (spriteId == 0xFFFF) if (spriteId == 0xFFFF)
return MAX_SPRITES; return MAX_SPRITES;

View File

@ -132,7 +132,7 @@ static void StartDrawFieldMessage(void)
void HideFieldMessageBox(void) void HideFieldMessageBox(void)
{ {
DestroyTask_DrawFieldMessage(); DestroyTask_DrawFieldMessage();
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
sFieldMessageBoxMode = FIELD_MESSAGE_BOX_HIDDEN; sFieldMessageBoxMode = FIELD_MESSAGE_BOX_HIDDEN;
} }
@ -152,7 +152,7 @@ bool8 IsFieldMessageBoxHidden(void)
static void ReplaceFieldMessageWithFrame(void) static void ReplaceFieldMessageWithFrame(void)
{ {
DestroyTask_DrawFieldMessage(); DestroyTask_DrawFieldMessage();
DrawStdWindowFrame(0, 1); DrawStdWindowFrame(0, TRUE);
sFieldMessageBoxMode = FIELD_MESSAGE_BOX_HIDDEN; sFieldMessageBoxMode = FIELD_MESSAGE_BOX_HIDDEN;
} }

View File

@ -150,11 +150,11 @@ static void FieldUpdateRegionMap(void)
sFieldRegionMapHandler->state++; sFieldRegionMapHandler->state++;
break; break;
case 1: case 1:
DrawStdFrameWithCustomTileAndPalette(1, 0, 0x27, 0xd); DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x27, 0xd);
offset = GetStringCenterAlignXOffset(FONT_NORMAL, gText_Hoenn, 0x38); offset = GetStringCenterAlignXOffset(FONT_NORMAL, gText_Hoenn, 0x38);
AddTextPrinterParameterized(1, FONT_NORMAL, gText_Hoenn, offset, 1, 0, NULL); AddTextPrinterParameterized(1, FONT_NORMAL, gText_Hoenn, offset, 1, 0, NULL);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);
DrawStdFrameWithCustomTileAndPalette(0, 0, 0x27, 0xd); DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x27, 0xd);
PrintRegionMapSecName(); PrintRegionMapSecName();
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
sFieldRegionMapHandler->state++; sFieldRegionMapHandler->state++;

View File

@ -1825,7 +1825,7 @@ void ShowDeptStoreElevatorFloorSelect(void)
int xPos; int xPos;
sTutorMoveAndElevatorWindowId = AddWindow(&gElevatorFloor_WindowTemplate); sTutorMoveAndElevatorWindowId = AddWindow(&gElevatorFloor_WindowTemplate);
SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, 0); SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, FALSE);
xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_ElevatorNowOn, 64); xPos = GetStringCenterAlignXOffset(FONT_NORMAL, gText_ElevatorNowOn, 64);
AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gText_ElevatorNowOn, xPos, 1, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(sTutorMoveAndElevatorWindowId, FONT_NORMAL, gText_ElevatorNowOn, xPos, 1, TEXT_SKIP_DRAW, NULL);
@ -2507,7 +2507,7 @@ static void Task_ShowScrollableMultichoice(u8 taskId)
template = CreateWindowTemplate(0, task->tLeft, task->tTop, task->tWidth, task->tHeight, 0xF, 0x64); template = CreateWindowTemplate(0, task->tLeft, task->tTop, task->tWidth, task->tHeight, 0xF, 0x64);
windowId = AddWindow(&template); windowId = AddWindow(&template);
task->tWindowId = windowId; task->tWindowId = windowId;
SetStandardWindowBorderStyle(windowId, 0); SetStandardWindowBorderStyle(windowId, FALSE);
gScrollableMultichoice_ListMenuTemplate.totalItems = task->tNumItems; gScrollableMultichoice_ListMenuTemplate.totalItems = task->tNumItems;
gScrollableMultichoice_ListMenuTemplate.maxShowed = task->tMaxItemsOnScreen; gScrollableMultichoice_ListMenuTemplate.maxShowed = task->tMaxItemsOnScreen;
@ -2606,7 +2606,7 @@ static void CloseScrollableMultichoice(u8 taskId)
ScrollableMultichoice_RemoveScrollArrows(taskId); ScrollableMultichoice_RemoveScrollArrows(taskId);
DestroyListMenuTask(task->tListTaskId, NULL, NULL); DestroyListMenuTask(task->tListTaskId, NULL, NULL);
Free(sScrollableMultichoice_ListMenuItem); Free(sScrollableMultichoice_ListMenuItem);
ClearStdWindowAndFrameToTransparent(task->tWindowId, 1); ClearStdWindowAndFrameToTransparent(task->tWindowId, TRUE);
FillWindowPixelBuffer(task->tWindowId, PIXEL_FILL(0)); FillWindowPixelBuffer(task->tWindowId, PIXEL_FILL(0));
CopyWindowToVram(task->tWindowId, COPYWIN_GFX); CopyWindowToVram(task->tWindowId, COPYWIN_GFX);
RemoveWindow(task->tWindowId); RemoveWindow(task->tWindowId);
@ -2850,7 +2850,7 @@ void ShowBattlePointsWindow(void)
}; };
sBattlePointsWindowId = AddWindow(&sBattlePoints_WindowTemplate); sBattlePointsWindowId = AddWindow(&sBattlePoints_WindowTemplate);
SetStandardWindowBorderStyle(sBattlePointsWindowId, 0); SetStandardWindowBorderStyle(sBattlePointsWindowId, FALSE);
UpdateBattlePointsWindow(); UpdateBattlePointsWindow();
CopyWindowToVram(sBattlePointsWindowId, COPYWIN_GFX); CopyWindowToVram(sBattlePointsWindowId, COPYWIN_GFX);
} }
@ -2896,7 +2896,7 @@ void ShowFrontierExchangeCornerItemIconWindow(void)
}; };
sFrontierExchangeCorner_ItemIconWindowId = AddWindow(&sFrontierExchangeCorner_ItemIconWindowTemplate); sFrontierExchangeCorner_ItemIconWindowId = AddWindow(&sFrontierExchangeCorner_ItemIconWindowTemplate);
SetStandardWindowBorderStyle(sFrontierExchangeCorner_ItemIconWindowId, 0); SetStandardWindowBorderStyle(sFrontierExchangeCorner_ItemIconWindowId, FALSE);
CopyWindowToVram(sFrontierExchangeCorner_ItemIconWindowId, COPYWIN_GFX); CopyWindowToVram(sFrontierExchangeCorner_ItemIconWindowId, COPYWIN_GFX);
} }
@ -3040,7 +3040,7 @@ static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection)
if (gSpecialVar_0x8006 == 0) if (gSpecialVar_0x8006 == 0)
{ {
sTutorMoveAndElevatorWindowId = AddWindow(&sBattleFrontierTutor_WindowTemplate); sTutorMoveAndElevatorWindowId = AddWindow(&sBattleFrontierTutor_WindowTemplate);
SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, 0); SetStandardWindowBorderStyle(sTutorMoveAndElevatorWindowId, FALSE);
} }
ShowBattleFrontierTutorMoveDescription(menu, selection); ShowBattleFrontierTutorMoveDescription(menu, selection);
} }
@ -3104,7 +3104,7 @@ void ScrollableMultichoice_RedrawPersistentMenu(void)
{ {
struct Task *task = &gTasks[taskId]; struct Task *task = &gTasks[taskId];
ListMenuGetScrollAndRow(task->tListTaskId, &scrollOffset, &selectedRow); ListMenuGetScrollAndRow(task->tListTaskId, &scrollOffset, &selectedRow);
SetStandardWindowBorderStyle(task->tWindowId, 0); SetStandardWindowBorderStyle(task->tWindowId, FALSE);
for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++) for (i = 0; i < MAX_SCROLL_MULTI_ON_SCREEN; i++)
AddTextPrinterParameterized5(task->tWindowId, FONT_NORMAL, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SKIP_DRAW, NULL, 0, 0); AddTextPrinterParameterized5(task->tWindowId, FONT_NORMAL, sScrollableMultichoiceOptions[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SKIP_DRAW, NULL, 0, 0);

View File

@ -700,7 +700,7 @@ static void Task_Hof_DisplayPlayer(u8 taskId)
ShowBg(0); ShowBg(0);
ShowBg(1); ShowBg(1);
ShowBg(3); ShowBg(3);
gTasks[taskId].tPlayerSpriteID = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId_Debug(gSaveBlock2Ptr->playerGender, TRUE), 1, 120, 72, 6, TAG_NONE); gTasks[taskId].tPlayerSpriteID = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId_Debug(gSaveBlock2Ptr->playerGender, TRUE), TRUE, 120, 72, 6, TAG_NONE);
AddWindow(&sHof_WindowTemplate); AddWindow(&sHof_WindowTemplate);
LoadWindowGfx(1, gSaveBlock2Ptr->optionsWindowFrameType, 0x21D, 0xD0); LoadWindowGfx(1, gSaveBlock2Ptr->optionsWindowFrameType, 0x21D, 0xD0);
LoadPalette(GetTextWindowPalette(1), 0xE0, 0x20); LoadPalette(GetTextWindowPalette(1), 0xE0, 0x20);
@ -931,7 +931,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
if (currMon->species == SPECIES_EGG) if (currMon->species == SPECIES_EGG)
posY += 10; posY += 10;
spriteId = CreateMonPicSprite_HandleDeoxys(currMon->species, currMon->tid, currMon->personality, 1, posX, posY, i, TAG_NONE); spriteId = CreateMonPicSprite_HandleDeoxys(currMon->species, currMon->tid, currMon->personality, TRUE, posX, posY, i, TAG_NONE);
gSprites[spriteId].oam.priority = 1; gSprites[spriteId].oam.priority = 1;
gTasks[taskId].tMonSpriteId(i) = spriteId; gTasks[taskId].tMonSpriteId(i) = spriteId;
} }

View File

@ -2478,7 +2478,7 @@ static u8 BagMenu_AddWindow(u8 windowType)
if (*windowId == WINDOW_NONE) if (*windowId == WINDOW_NONE)
{ {
*windowId = AddWindow(&sContextMenuWindowTemplates[windowType]); *windowId = AddWindow(&sContextMenuWindowTemplates[windowType]);
DrawStdFrameWithCustomTileAndPalette(*windowId, 0, 1, 14); DrawStdFrameWithCustomTileAndPalette(*windowId, FALSE, 1, 14);
ScheduleBgCopyTilemapToVram(1); ScheduleBgCopyTilemapToVram(1);
} }
return *windowId; return *windowId;

View File

@ -163,7 +163,7 @@ static void DisplayCannotDismountBikeMessage(u8 taskId, bool8 isUsingRegisteredK
static void Task_CloseCantUseKeyItemMessage(u8 taskId) static void Task_CloseCantUseKeyItemMessage(u8 taskId)
{ {
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
DestroyTask(taskId); DestroyTask(taskId);
ScriptUnfreezeObjectEvents(); ScriptUnfreezeObjectEvents();
ScriptContext2_Disable(); ScriptContext2_Disable();
@ -184,7 +184,7 @@ static void CB2_CheckMail(void)
{ {
struct Mail mail; struct Mail mail;
mail.itemId = gSpecialVar_ItemId; mail.itemId = gSpecialVar_ItemId;
ReadMail(&mail, CB2_ReturnToBagMenuPocket, 0); ReadMail(&mail, CB2_ReturnToBagMenuPocket, FALSE);
} }
void ItemUseOutOfBattle_Mail(u8 taskId) void ItemUseOutOfBattle_Mail(u8 taskId)
@ -335,7 +335,7 @@ static void Task_UseItemfinder(u8 taskId)
static void Task_CloseItemfinderMessage(u8 taskId) static void Task_CloseItemfinderMessage(u8 taskId)
{ {
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
ScriptUnfreezeObjectEvents(); ScriptUnfreezeObjectEvents();
ScriptContext2_Disable(); ScriptContext2_Disable();
DestroyTask(taskId); DestroyTask(taskId);

View File

@ -2004,7 +2004,7 @@ static void RfuMain1_UnionRoom(void)
{ {
rfu_REQ_recvData(); rfu_REQ_recvData();
rfu_waitREQComplete(); rfu_waitREQComplete();
rfu_LMAN_REQ_sendData(0); rfu_LMAN_REQ_sendData(FALSE);
} }
} }

View File

@ -1333,7 +1333,7 @@ static void Task_NewGameBirchSpeech_WaitForSpriteFadeInWelcome(u8 taskId)
CopyWindowToVram(0, COPYWIN_GFX); CopyWindowToVram(0, COPYWIN_GFX);
NewGameBirchSpeech_ClearWindow(0); NewGameBirchSpeech_ClearWindow(0);
StringExpandPlaceholders(gStringVar4, gText_Birch_Welcome); StringExpandPlaceholders(gStringVar4, gText_Birch_Welcome);
AddTextPrinterForMessage(1); AddTextPrinterForMessage(TRUE);
gTasks[taskId].func = Task_NewGameBirchSpeech_ThisIsAPokemon; gTasks[taskId].func = Task_NewGameBirchSpeech_ThisIsAPokemon;
} }
} }
@ -1345,7 +1345,7 @@ static void Task_NewGameBirchSpeech_ThisIsAPokemon(u8 taskId)
{ {
gTasks[taskId].func = Task_NewGameBirchSpeech_MainSpeech; gTasks[taskId].func = Task_NewGameBirchSpeech_MainSpeech;
StringExpandPlaceholders(gStringVar4, gText_ThisIsAPokemon); StringExpandPlaceholders(gStringVar4, gText_ThisIsAPokemon);
AddTextPrinterWithCallbackForMessage(1, NewGameBirchSpeech_WaitForThisIsPokemonText); AddTextPrinterWithCallbackForMessage(TRUE, NewGameBirchSpeech_WaitForThisIsPokemonText);
sBirchSpeechMainTaskId = taskId; sBirchSpeechMainTaskId = taskId;
} }
} }
@ -1355,7 +1355,7 @@ static void Task_NewGameBirchSpeech_MainSpeech(u8 taskId)
if (!RunTextPrintersAndIsPrinter0Active()) if (!RunTextPrintersAndIsPrinter0Active())
{ {
StringExpandPlaceholders(gStringVar4, gText_Birch_MainSpeech); StringExpandPlaceholders(gStringVar4, gText_Birch_MainSpeech);
AddTextPrinterForMessage(1); AddTextPrinterForMessage(TRUE);
gTasks[taskId].func = Task_NewGameBirchSpeech_AndYouAre; gTasks[taskId].func = Task_NewGameBirchSpeech_AndYouAre;
} }
} }
@ -1410,7 +1410,7 @@ static void Task_NewGameBirchSpeech_AndYouAre(u8 taskId)
{ {
sStartedPokeBallTask = FALSE; sStartedPokeBallTask = FALSE;
StringExpandPlaceholders(gStringVar4, gText_Birch_AndYouAre); StringExpandPlaceholders(gStringVar4, gText_Birch_AndYouAre);
AddTextPrinterForMessage(1); AddTextPrinterForMessage(TRUE);
gTasks[taskId].func = Task_NewGameBirchSpeech_StartBirchLotadPlatformFade; gTasks[taskId].func = Task_NewGameBirchSpeech_StartBirchLotadPlatformFade;
} }
} }
@ -1482,7 +1482,7 @@ static void Task_NewGameBirchSpeech_BoyOrGirl(u8 taskId)
{ {
NewGameBirchSpeech_ClearWindow(0); NewGameBirchSpeech_ClearWindow(0);
StringExpandPlaceholders(gStringVar4, gText_Birch_BoyOrGirl); StringExpandPlaceholders(gStringVar4, gText_Birch_BoyOrGirl);
AddTextPrinterForMessage(1); AddTextPrinterForMessage(TRUE);
gTasks[taskId].func = Task_NewGameBirchSpeech_WaitToShowGenderMenu; gTasks[taskId].func = Task_NewGameBirchSpeech_WaitToShowGenderMenu;
} }
@ -1572,7 +1572,7 @@ static void Task_NewGameBirchSpeech_WhatsYourName(u8 taskId)
{ {
NewGameBirchSpeech_ClearWindow(0); NewGameBirchSpeech_ClearWindow(0);
StringExpandPlaceholders(gStringVar4, gText_Birch_WhatsYourName); StringExpandPlaceholders(gStringVar4, gText_Birch_WhatsYourName);
AddTextPrinterForMessage(1); AddTextPrinterForMessage(TRUE);
gTasks[taskId].func = Task_NewGameBirchSpeech_WaitForWhatsYourNameToPrint; gTasks[taskId].func = Task_NewGameBirchSpeech_WaitForWhatsYourNameToPrint;
} }
@ -1607,7 +1607,7 @@ static void Task_NewGameBirchSpeech_SoItsPlayerName(u8 taskId)
{ {
NewGameBirchSpeech_ClearWindow(0); NewGameBirchSpeech_ClearWindow(0);
StringExpandPlaceholders(gStringVar4, gText_Birch_SoItsPlayer); StringExpandPlaceholders(gStringVar4, gText_Birch_SoItsPlayer);
AddTextPrinterForMessage(1); AddTextPrinterForMessage(TRUE);
gTasks[taskId].func = Task_NewGameBirchSpeech_CreateNameYesNo; gTasks[taskId].func = Task_NewGameBirchSpeech_CreateNameYesNo;
} }
@ -1673,7 +1673,7 @@ static void Task_NewGameBirchSpeech_ReshowBirchLotad(u8 taskId)
NewGameBirchSpeech_StartFadePlatformOut(taskId, 1); NewGameBirchSpeech_StartFadePlatformOut(taskId, 1);
NewGameBirchSpeech_ClearWindow(0); NewGameBirchSpeech_ClearWindow(0);
StringExpandPlaceholders(gStringVar4, gText_Birch_YourePlayer); StringExpandPlaceholders(gStringVar4, gText_Birch_YourePlayer);
AddTextPrinterForMessage(1); AddTextPrinterForMessage(TRUE);
gTasks[taskId].func = Task_NewGameBirchSpeech_WaitForSpriteFadeInAndTextPrinter; gTasks[taskId].func = Task_NewGameBirchSpeech_WaitForSpriteFadeInAndTextPrinter;
} }
} }
@ -1721,7 +1721,7 @@ static void Task_NewGameBirchSpeech_AreYouReady(u8 taskId)
NewGameBirchSpeech_StartFadeInTarget1OutTarget2(taskId, 2); NewGameBirchSpeech_StartFadeInTarget1OutTarget2(taskId, 2);
NewGameBirchSpeech_StartFadePlatformOut(taskId, 1); NewGameBirchSpeech_StartFadePlatformOut(taskId, 1);
StringExpandPlaceholders(gStringVar4, gText_Birch_AreYouReady); StringExpandPlaceholders(gStringVar4, gText_Birch_AreYouReady);
AddTextPrinterForMessage(1); AddTextPrinterForMessage(TRUE);
gTasks[taskId].func = Task_NewGameBirchSpeech_ShrinkPlayer; gTasks[taskId].func = Task_NewGameBirchSpeech_ShrinkPlayer;
} }
} }

View File

@ -1336,7 +1336,7 @@ static void PrintStoryList(void)
width = curWidth; width = curWidth;
} }
sStorytellerWindowId = CreateWindowFromRect(0, 0, ConvertPixelWidthToTileWidth(width), GetFreeStorySlot() * 2 + 2); sStorytellerWindowId = CreateWindowFromRect(0, 0, ConvertPixelWidthToTileWidth(width), GetFreeStorySlot() * 2 + 2);
SetStandardWindowBorderStyle(sStorytellerWindowId, 0); SetStandardWindowBorderStyle(sStorytellerWindowId, FALSE);
for (i = 0; i < NUM_STORYTELLER_TALES; i++) for (i = 0; i < NUM_STORYTELLER_TALES; i++)
{ {
u16 gameStatID = sStorytellerPtr->gameStatIDs[i]; u16 gameStatID = sStorytellerPtr->gameStatIDs[i];

View File

@ -223,14 +223,14 @@ u8 MailboxMenu_AddWindow(u8 windowIdx)
{ {
sMailboxWindowIds[windowIdx] = AddWindow(&sWindowTemplates_MailboxMenu[windowIdx]); sMailboxWindowIds[windowIdx] = AddWindow(&sWindowTemplates_MailboxMenu[windowIdx]);
} }
SetStandardWindowBorderStyle(sMailboxWindowIds[windowIdx], 0); SetStandardWindowBorderStyle(sMailboxWindowIds[windowIdx], FALSE);
} }
return sMailboxWindowIds[windowIdx]; return sMailboxWindowIds[windowIdx];
} }
void MailboxMenu_RemoveWindow(u8 windowIdx) void MailboxMenu_RemoveWindow(u8 windowIdx)
{ {
ClearStdWindowAndFrameToTransparent(sMailboxWindowIds[windowIdx], 0); ClearStdWindowAndFrameToTransparent(sMailboxWindowIds[windowIdx], FALSE);
ClearWindowTilemap(sMailboxWindowIds[windowIdx]); ClearWindowTilemap(sMailboxWindowIds[windowIdx]);
RemoveWindow(sMailboxWindowIds[windowIdx]); RemoveWindow(sMailboxWindowIds[windowIdx]);
sMailboxWindowIds[windowIdx] = WINDOW_NONE; sMailboxWindowIds[windowIdx] = WINDOW_NONE;
@ -716,17 +716,17 @@ void InitMoveRelearnerWindows(bool8 useContextWindow)
if (!useContextWindow) if (!useContextWindow)
{ {
PutWindowTilemap(0); PutWindowTilemap(0);
DrawStdFrameWithCustomTileAndPalette(0, 0, 0x1, 0xE); DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x1, 0xE);
} }
else else
{ {
PutWindowTilemap(1); PutWindowTilemap(1);
DrawStdFrameWithCustomTileAndPalette(1, 0, 1, 0xE); DrawStdFrameWithCustomTileAndPalette(1, FALSE, 1, 0xE);
} }
PutWindowTilemap(2); PutWindowTilemap(2);
PutWindowTilemap(3); PutWindowTilemap(3);
DrawStdFrameWithCustomTileAndPalette(2, 0, 1, 0xE); DrawStdFrameWithCustomTileAndPalette(2, FALSE, 1, 0xE);
DrawStdFrameWithCustomTileAndPalette(3, 0, 1, 0xE); DrawStdFrameWithCustomTileAndPalette(3, FALSE, 1, 0xE);
MoveRelearnerDummy(); MoveRelearnerDummy();
ScheduleBgCopyTilemapToVram(1); ScheduleBgCopyTilemapToVram(1);
} }

View File

@ -131,7 +131,7 @@ static void CB2_MysteryEventMenu(void)
switch (gMain.state) switch (gMain.state)
{ {
case 0: case 0:
DrawStdFrameWithCustomTileAndPalette(0, 1, 1, 0xD); DrawStdFrameWithCustomTileAndPalette(0, TRUE, 1, 0xD);
PutWindowTilemap(0); PutWindowTilemap(0);
CopyWindowToVram(0, COPYWIN_FULL); CopyWindowToVram(0, COPYWIN_FULL);
ShowBg(0); ShowBg(0);
@ -178,7 +178,7 @@ static void CB2_MysteryEventMenu(void)
{ {
PlaySE(SE_SELECT); PlaySE(SE_SELECT);
CheckShouldAdvanceLinkState(); CheckShouldAdvanceLinkState();
DrawStdFrameWithCustomTileAndPalette(1, 1, 1, 0xD); DrawStdFrameWithCustomTileAndPalette(1, TRUE, 1, 0xD);
PrintMysteryMenuText(1, gText_LoadingEvent, 1, 2, 0); PrintMysteryMenuText(1, gText_LoadingEvent, 1, 2, 0);
PutWindowTilemap(1); PutWindowTilemap(1);
CopyWindowToVram(1, COPYWIN_FULL); CopyWindowToVram(1, COPYWIN_FULL);

View File

@ -738,7 +738,7 @@ static void DisplaySentToPCMessage(void)
stringToDisplay++; stringToDisplay++;
StringExpandPlaceholders(gStringVar4, sTransferredToPCMessages[stringToDisplay]); StringExpandPlaceholders(gStringVar4, sTransferredToPCMessages[stringToDisplay]);
DrawDialogueFrame(0, 0); DrawDialogueFrame(0, FALSE);
gTextFlags.canABSpeedUpPrint = TRUE; gTextFlags.canABSpeedUpPrint = TRUE;
AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3); AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3);
CopyWindowToVram(0, COPYWIN_FULL); CopyWindowToVram(0, COPYWIN_FULL);

View File

@ -3209,7 +3209,7 @@ static void SpriteCB_LinkPlayer(struct Sprite *sprite)
else else
StartSpriteAnimIfDifferent(sprite, GetMoveDirectionAnimNum(linkDirection(objEvent))); StartSpriteAnimIfDifferent(sprite, GetMoveDirectionAnimNum(linkDirection(objEvent)));
UpdateObjectEventSpriteInvisibility(sprite, 0); UpdateObjectEventSpriteInvisibility(sprite, FALSE);
if (objEvent->triggerGroundEffectsOnMove) if (objEvent->triggerGroundEffectsOnMove)
{ {
sprite->invisible = ((sprite->data[7] & 4) >> 2); sprite->invisible = ((sprite->data[7] & 4) >> 2);

View File

@ -1641,7 +1641,7 @@ static void Task_PrintAndWaitForText(u8 taskId)
{ {
if (gTasks[taskId].tKeepOpen == FALSE) if (gTasks[taskId].tKeepOpen == FALSE)
{ {
ClearStdWindowAndFrameToTransparent(6, 0); ClearStdWindowAndFrameToTransparent(6, FALSE);
ClearWindowTilemap(6); ClearWindowTilemap(6);
} }
DestroyTask(taskId); DestroyTask(taskId);
@ -1668,7 +1668,7 @@ static void Task_ReturnToChooseMonAfterText(u8 taskId)
{ {
if (IsPartyMenuTextPrinterActive() != TRUE) if (IsPartyMenuTextPrinterActive() != TRUE)
{ {
ClearStdWindowAndFrameToTransparent(6, 0); ClearStdWindowAndFrameToTransparent(6, FALSE);
ClearWindowTilemap(6); ClearWindowTilemap(6);
if (MenuHelpers_IsLinkActive() == TRUE) if (MenuHelpers_IsLinkActive() == TRUE)
{ {
@ -2371,7 +2371,7 @@ static void PartyMenuRemoveWindow(u8 *ptr)
{ {
if (*ptr != WINDOW_NONE) if (*ptr != WINDOW_NONE)
{ {
ClearStdWindowAndFrameToTransparent(*ptr, 0); ClearStdWindowAndFrameToTransparent(*ptr, FALSE);
RemoveWindow(*ptr); RemoveWindow(*ptr);
*ptr = WINDOW_NONE; *ptr = WINDOW_NONE;
ScheduleBgCopyTilemapToVram(2); ScheduleBgCopyTilemapToVram(2);
@ -3309,7 +3309,7 @@ static void CursorCb_Read(u8 taskId)
static void CB2_ReadHeldMail(void) static void CB2_ReadHeldMail(void)
{ {
ReadMail(&gSaveBlock1Ptr->mail[GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAIL)], CB2_ReturnToPartyMenuFromReadingMail, 1); ReadMail(&gSaveBlock1Ptr->mail[GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MAIL)], CB2_ReturnToPartyMenuFromReadingMail, TRUE);
} }
static void CB2_ReturnToPartyMenuFromReadingMail(void) static void CB2_ReturnToPartyMenuFromReadingMail(void)

View File

@ -398,7 +398,7 @@ static void InitPlayerPCMenu(u8 taskId)
windowTemplate.width = GetMaxWidthInSubsetOfMenuTable(sPlayerPCMenuActions, sTopMenuOptionOrder, sTopMenuNumOptions); windowTemplate.width = GetMaxWidthInSubsetOfMenuTable(sPlayerPCMenuActions, sTopMenuOptionOrder, sTopMenuNumOptions);
tWindowId = AddWindow(&windowTemplate); tWindowId = AddWindow(&windowTemplate);
SetStandardWindowBorderStyle(tWindowId, 0); SetStandardWindowBorderStyle(tWindowId, FALSE);
PrintMenuActionTextsInUpperLeftCorner(tWindowId, sTopMenuNumOptions, sPlayerPCMenuActions, sTopMenuOptionOrder); PrintMenuActionTextsInUpperLeftCorner(tWindowId, sTopMenuNumOptions, sPlayerPCMenuActions, sTopMenuOptionOrder);
InitMenuInUpperLeftCornerNormal(tWindowId, sTopMenuNumOptions, 0); InitMenuInUpperLeftCornerNormal(tWindowId, sTopMenuNumOptions, 0);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);
@ -467,7 +467,7 @@ static void PlayerPC_Mailbox(u8 taskId)
SetPlayerPCListCount(taskId); SetPlayerPCListCount(taskId);
if (MailboxMenu_Alloc(gPlayerPCItemPageInfo.count) == TRUE) if (MailboxMenu_Alloc(gPlayerPCItemPageInfo.count) == TRUE)
{ {
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
Mailbox_DrawMailboxMenu(taskId); Mailbox_DrawMailboxMenu(taskId);
gTasks[taskId].func = Mailbox_ProcessInput; gTasks[taskId].func = Mailbox_ProcessInput;
} }
@ -509,7 +509,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var)
windowTemplate = sWindowTemplates_MainMenus[WIN_ITEM_STORAGE_MENU]; windowTemplate = sWindowTemplates_MainMenus[WIN_ITEM_STORAGE_MENU];
windowTemplate.width = GetMaxWidthInMenuTable(sItemStorage_MenuActions, ARRAY_COUNT(sItemStorage_MenuActions)); windowTemplate.width = GetMaxWidthInMenuTable(sItemStorage_MenuActions, ARRAY_COUNT(sItemStorage_MenuActions));
tWindowId = AddWindow(&windowTemplate); tWindowId = AddWindow(&windowTemplate);
SetStandardWindowBorderStyle(tWindowId, 0); SetStandardWindowBorderStyle(tWindowId, FALSE);
PrintMenuTable(tWindowId, ARRAY_COUNT(sItemStorage_MenuActions), sItemStorage_MenuActions); PrintMenuTable(tWindowId, ARRAY_COUNT(sItemStorage_MenuActions), sItemStorage_MenuActions);
InitMenuInUpperLeftCornerNormal(tWindowId, ARRAY_COUNT(sItemStorage_MenuActions), var); InitMenuInUpperLeftCornerNormal(tWindowId, ARRAY_COUNT(sItemStorage_MenuActions), var);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);
@ -632,7 +632,7 @@ static void ItemStorage_Enter(u8 taskId, bool8 toss)
FreeAndReserveObjectSpritePalettes(); FreeAndReserveObjectSpritePalettes();
LoadListMenuSwapLineGfx(); LoadListMenuSwapLineGfx();
CreateSwapLineSprites(sItemStorageMenu->swapLineSpriteIds, SWAP_LINE_LENGTH); CreateSwapLineSprites(sItemStorageMenu->swapLineSpriteIds, SWAP_LINE_LENGTH);
ClearDialogWindowAndFrame(0,0); ClearDialogWindowAndFrame(0, FALSE);
gTasks[taskId].func = ItemStorage_CreateListMenu; gTasks[taskId].func = ItemStorage_CreateListMenu;
} }
@ -928,7 +928,7 @@ static void Mailbox_NoPokemonForMail(u8 taskId)
static void Mailbox_Cancel(u8 taskId) static void Mailbox_Cancel(u8 taskId)
{ {
MailboxMenu_RemoveWindow(MAILBOXWIN_OPTIONS); MailboxMenu_RemoveWindow(MAILBOXWIN_OPTIONS);
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
Mailbox_DrawMailboxMenu(taskId); Mailbox_DrawMailboxMenu(taskId);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);
gTasks[taskId].func = Mailbox_ProcessInput; gTasks[taskId].func = Mailbox_ProcessInput;

View File

@ -1067,7 +1067,7 @@ static void SpriteCB_PokeballReleaseMon(struct Sprite *sprite)
StartSpriteAnim(sprite, 1); StartSpriteAnim(sprite, 1);
AnimateBallOpenParticlesForPokeball(sprite->x, sprite->y - 5, sprite->oam.priority, subpriority); AnimateBallOpenParticlesForPokeball(sprite->x, sprite->y - 5, sprite->oam.priority, subpriority);
// sDelay re-used to store task id but never read // sDelay re-used to store task id but never read
sprite->sDelay = LaunchBallFadeMonTaskForPokeball(1, monPalNum, selectedPalettes); sprite->sDelay = LaunchBallFadeMonTaskForPokeball(TRUE, monPalNum, selectedPalettes);
sprite->callback = SpriteCB_ReleasedMonFlyOut; sprite->callback = SpriteCB_ReleasedMonFlyOut;
gSprites[spriteId].invisible = FALSE; gSprites[spriteId].invisible = FALSE;
StartSpriteAffineAnim(&gSprites[spriteId], BATTLER_AFFINE_EMERGE); StartSpriteAffineAnim(&gSprites[spriteId], BATTLER_AFFINE_EMERGE);
@ -1171,7 +1171,7 @@ static void SpriteCB_TradePokeball(struct Sprite *sprite)
StartSpriteAnim(sprite, 1); StartSpriteAnim(sprite, 1);
AnimateBallOpenParticlesForPokeball(sprite->x, sprite->y - 5, sprite->oam.priority, subpriority); AnimateBallOpenParticlesForPokeball(sprite->x, sprite->y - 5, sprite->oam.priority, subpriority);
// sDelay re-used to store task id but never read // sDelay re-used to store task id but never read
sprite->sDelay = LaunchBallFadeMonTaskForPokeball(1, monPalNum, selectedPalettes); sprite->sDelay = LaunchBallFadeMonTaskForPokeball(TRUE, monPalNum, selectedPalettes);
sprite->callback = SpriteCB_TradePokeballSendOff; sprite->callback = SpriteCB_TradePokeballSendOff;
#ifdef BUGFIX #ifdef BUGFIX
// FIX: If this is used on a sprite that has previously had an affine animation, it will not // FIX: If this is used on a sprite that has previously had an affine animation, it will not

View File

@ -1148,7 +1148,7 @@ static void ShowPokeblockActionsWindow(u8 taskId)
tWindowId = WIN_ACTIONS; tWindowId = WIN_ACTIONS;
DestroyScrollArrows(); DestroyScrollArrows();
DrawStdFrameWithCustomTileAndPalette(tWindowId, 0, 1, 0xE); DrawStdFrameWithCustomTileAndPalette(tWindowId, FALSE, 1, 0xE);
PrintMenuActionTextsInUpperLeftCorner(tWindowId, sPokeblockMenu->numActions, sPokeblockMenuActions, sPokeblockMenu->pokeblockActionIds); PrintMenuActionTextsInUpperLeftCorner(tWindowId, sPokeblockMenu->numActions, sPokeblockMenuActions, sPokeblockMenu->pokeblockActionIds);
InitMenuInUpperLeftCornerNormal(tWindowId, sPokeblockMenu->numActions, 0); InitMenuInUpperLeftCornerNormal(tWindowId, sPokeblockMenu->numActions, 0);
PutWindowTilemap(tWindowId); PutWindowTilemap(tWindowId);

View File

@ -660,7 +660,7 @@ static bool8 LoadPokeblockFeedScene(void)
gMain.state++; gMain.state++;
break; break;
case 10: case 10:
DrawStdFrameWithCustomTileAndPalette(0, 1, 1, 14); DrawStdFrameWithCustomTileAndPalette(0, TRUE, 1, 14);
gMain.state++; gMain.state++;
break; break;
case 11: case 11:

View File

@ -1547,7 +1547,7 @@ static void Task_PCMainMenu(u8 taskId)
case STATE_LOAD: case STATE_LOAD:
CreateMainMenu(task->tSelectedOption, &task->tWindowId); CreateMainMenu(task->tSelectedOption, &task->tWindowId);
LoadMessageBoxAndBorderGfx(); LoadMessageBoxAndBorderGfx();
DrawDialogueFrame(0, 0); DrawDialogueFrame(0, FALSE);
FillWindowPixelBuffer(0, PIXEL_FILL(1)); FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SKIP_DRAW, NULL, 2, 1, 3); AddTextPrinterParameterized2(0, FONT_NORMAL, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SKIP_DRAW, NULL, 2, 1, 3);
CopyWindowToVram(0, COPYWIN_FULL); CopyWindowToVram(0, COPYWIN_FULL);

View File

@ -299,8 +299,8 @@ static u32 LoopedTask_OpenConditionGraphMenu(s32 state)
if (!IsConditionMenuSearchMode()) if (!IsConditionMenuSearchMode())
{ {
LoadLeftHeaderGfxForIndex(POKENAV_GFX_PARTY_MENU); LoadLeftHeaderGfxForIndex(POKENAV_GFX_PARTY_MENU);
ShowLeftHeaderGfx(POKENAV_GFX_CONDITION_MENU, TRUE, 0); ShowLeftHeaderGfx(POKENAV_GFX_CONDITION_MENU, TRUE, FALSE);
ShowLeftHeaderGfx(POKENAV_GFX_PARTY_MENU, TRUE, 0); ShowLeftHeaderGfx(POKENAV_GFX_PARTY_MENU, TRUE, FALSE);
} }
return LT_INC_AND_PAUSE; return LT_INC_AND_PAUSE;
case 16: case 16:

View File

@ -464,8 +464,8 @@ static u32 LoopedTask_OpenConditionSearchResults(s32 state)
{ {
u8 searchGfxId = GetSelectedConditionSearch() + POKENAV_MENUITEM_CONDITION_SEARCH_COOL; u8 searchGfxId = GetSelectedConditionSearch() + POKENAV_MENUITEM_CONDITION_SEARCH_COOL;
LoadLeftHeaderGfxForIndex(searchGfxId); LoadLeftHeaderGfxForIndex(searchGfxId);
ShowLeftHeaderGfx(searchGfxId, 1, 0); ShowLeftHeaderGfx(searchGfxId, TRUE, FALSE);
ShowLeftHeaderGfx(POKENAV_GFX_CONDITION_MENU, 1, 0); ShowLeftHeaderGfx(POKENAV_GFX_CONDITION_MENU, TRUE, FALSE);
} }
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); PokenavFadeScreen(POKENAV_FADE_FROM_BLACK);
return LT_INC_AND_PAUSE; return LT_INC_AND_PAUSE;

View File

@ -72,7 +72,7 @@ static void InitPokenavListWindowState(struct PokenavListWindowState *, struct P
static void SpriteCB_UpArrow(struct Sprite *); static void SpriteCB_UpArrow(struct Sprite *);
static void SpriteCB_DownArrow(struct Sprite *); static void SpriteCB_DownArrow(struct Sprite *);
static void SpriteCB_RightArrow(struct Sprite *); static void SpriteCB_RightArrow(struct Sprite *);
static void ToggleListArrows(struct PokenavListSub *, u32); static void ToggleListArrows(struct PokenavListSub *, bool32);
static void DestroyListArrows(struct PokenavListSub *); static void DestroyListArrows(struct PokenavListSub *);
static void CreateListArrowSprites(struct PokenavListWindowState *, struct PokenavListSub *); static void CreateListArrowSprites(struct PokenavListWindowState *, struct PokenavListSub *);
static void LoadListArrowGfx(void); static void LoadListArrowGfx(void);
@ -503,7 +503,7 @@ static u32 LoopedTask_EraseListForCheckPage(s32 state)
switch (state) switch (state)
{ {
case 0: case 0:
ToggleListArrows(&list->sub, 1); ToggleListArrows(&list->sub, TRUE);
// fall-through // fall-through
case 1: case 1:
if (list->eraseIndex != list->windowState.selectedIndexOffset) if (list->eraseIndex != list->windowState.selectedIndexOffset)
@ -656,7 +656,7 @@ static u32 LoopedTask_ReshowListFromCheckPage(s32 state)
return LT_INC_AND_CONTINUE; return LT_INC_AND_CONTINUE;
return LT_SET_STATE(4); return LT_SET_STATE(4);
case 6: case 6:
ToggleListArrows(subPtr, 0); ToggleListArrows(subPtr, FALSE);
return LT_FINISH; return LT_FINISH;
} }

View File

@ -379,7 +379,7 @@ static u32 LoopedTask_OpenMatchCall(s32 state)
ShowBg(1); ShowBg(1);
AllocMatchCallSprites(); AllocMatchCallSprites();
LoadLeftHeaderGfxForIndex(3); LoadLeftHeaderGfxForIndex(3);
ShowLeftHeaderGfx(POKENAV_GFX_MATCH_CALL_MENU, 1, 0); ShowLeftHeaderGfx(POKENAV_GFX_MATCH_CALL_MENU, TRUE, FALSE);
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); PokenavFadeScreen(POKENAV_FADE_FROM_BLACK);
return LT_INC_AND_PAUSE; return LT_INC_AND_PAUSE;
case 7: case 7:

View File

@ -579,7 +579,7 @@ static u32 LoopedTask_OpenConditionMenu(s32 state)
case 0: case 0:
ResetBldCnt(); ResetBldCnt();
StartOptionAnimations_Exit(); StartOptionAnimations_Exit();
HideMainOrSubMenuLeftHeader(POKENAV_GFX_MAIN_MENU, 0); HideMainOrSubMenuLeftHeader(POKENAV_GFX_MAIN_MENU, FALSE);
PlaySE(SE_SELECT); PlaySE(SE_SELECT);
return LT_INC_AND_PAUSE; return LT_INC_AND_PAUSE;
case 1: case 1:
@ -618,7 +618,7 @@ static u32 LoopedTask_ReturnToMainMenu(s32 state)
case 0: case 0:
ResetBldCnt(); ResetBldCnt();
StartOptionAnimations_Exit(); StartOptionAnimations_Exit();
HideMainOrSubMenuLeftHeader(POKENAV_GFX_CONDITION_MENU, 0); HideMainOrSubMenuLeftHeader(POKENAV_GFX_CONDITION_MENU, FALSE);
return LT_INC_AND_PAUSE; return LT_INC_AND_PAUSE;
case 1: case 1:
if (AreMenuOptionSpritesMoving()) if (AreMenuOptionSpritesMoving())
@ -689,7 +689,7 @@ static u32 LoopedTask_ReturnToConditionMenu(s32 state)
case 0: case 0:
ResetBldCnt(); ResetBldCnt();
StartOptionAnimations_Exit(); StartOptionAnimations_Exit();
HideMainOrSubMenuLeftHeader(POKENAV_GFX_SEARCH_MENU, 0); HideMainOrSubMenuLeftHeader(POKENAV_GFX_SEARCH_MENU, FALSE);
return LT_INC_AND_PAUSE; return LT_INC_AND_PAUSE;
case 1: case 1:
if (AreMenuOptionSpritesMoving()) if (AreMenuOptionSpritesMoving())

View File

@ -366,7 +366,7 @@ static u32 LoopedTask_OpenRegionMap(s32 taskState)
menuGfxId = POKENAV_GFX_MAP_MENU_ZOOMED_IN; menuGfxId = POKENAV_GFX_MAP_MENU_ZOOMED_IN;
LoadLeftHeaderGfxForIndex(menuGfxId); LoadLeftHeaderGfxForIndex(menuGfxId);
ShowLeftHeaderGfx(menuGfxId, 1, 1); ShowLeftHeaderGfx(menuGfxId, TRUE, TRUE);
PokenavFadeScreen(POKENAV_FADE_FROM_BLACK); PokenavFadeScreen(POKENAV_FADE_FROM_BLACK);
return LT_INC_AND_PAUSE; return LT_INC_AND_PAUSE;
case 7: case 7:

View File

@ -464,7 +464,7 @@ static u32 LoopedTask_OpenRibbonsMonList(s32 state)
if (!menu->fromSummary) if (!menu->fromSummary)
{ {
LoadLeftHeaderGfxForIndex(POKENAV_GFX_RIBBONS_MENU); LoadLeftHeaderGfxForIndex(POKENAV_GFX_RIBBONS_MENU);
ShowLeftHeaderGfx(POKENAV_GFX_RIBBONS_MENU, 1, 0); ShowLeftHeaderGfx(POKENAV_GFX_RIBBONS_MENU, TRUE, FALSE);
} }
return LT_INC_AND_PAUSE; return LT_INC_AND_PAUSE;
case 5: case 5:

View File

@ -363,7 +363,7 @@ static void Task_RecordMixing_Main(u8 taskId)
SetLinkWaitingForScript(); SetLinkWaitingForScript();
if (gWirelessCommType != 0) if (gWirelessCommType != 0)
CreateTask(Task_ReturnToFieldRecordMixing, 10); CreateTask(Task_ReturnToFieldRecordMixing, 10);
ClearDialogWindowAndFrame(0, 1); ClearDialogWindowAndFrame(0, TRUE);
DestroyTask(taskId); DestroyTask(taskId);
EnableBothScriptContexts(); EnableBothScriptContexts();
} }

View File

@ -1293,7 +1293,7 @@ static void Task_StartPlaying(u8 taskId)
static void Task_AskKeepPlaying(u8 taskId) static void Task_AskKeepPlaying(u8 taskId)
{ {
DisplayYesNoMenuDefaultYes(); DisplayYesNoMenuDefaultYes();
DrawStdWindowFrame(sTextWindowId, 0); DrawStdWindowFrame(sTextWindowId, FALSE);
AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_KeepPlaying, 0, 1, TEXT_SKIP_DRAW, 0); AddTextPrinterParameterized(sTextWindowId, FONT_NORMAL, Roulette_Text_KeepPlaying, 0, 1, TEXT_SKIP_DRAW, 0);
CopyWindowToVram(sTextWindowId, COPYWIN_FULL); CopyWindowToVram(sTextWindowId, COPYWIN_FULL);
DoYesNoFuncWithChoice(taskId, &sYesNoTable_KeepPlaying); DoYesNoFuncWithChoice(taskId, &sYesNoTable_KeepPlaying);

View File

@ -1305,7 +1305,7 @@ bool8 ScrCmd_messageinstant(struct ScriptContext *ctx)
if (msg == NULL) if (msg == NULL)
msg = (const u8 *)ctx->data[0]; msg = (const u8 *)ctx->data[0];
LoadMessageBoxAndBorderGfx(); LoadMessageBoxAndBorderGfx();
DrawDialogueFrame(0, 1); DrawDialogueFrame(0, TRUE);
AddTextPrinterParameterized(0, FONT_NORMAL, msg, 0, 1, 0, NULL); AddTextPrinterParameterized(0, FONT_NORMAL, msg, 0, 1, 0, NULL);
return FALSE; return FALSE;
} }
@ -1527,7 +1527,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
winTemplate = CreateWindowTemplate(0, xWindow, yWindow + 1, width, height, 0xF, 0x1); winTemplate = CreateWindowTemplate(0, xWindow, yWindow + 1, width, height, 0xF, 0x1);
sBrailleWindowId = AddWindow(&winTemplate); sBrailleWindowId = AddWindow(&winTemplate);
LoadUserWindowBorderGfx(sBrailleWindowId, 0x214, 0xE0); LoadUserWindowBorderGfx(sBrailleWindowId, 0x214, 0xE0);
DrawStdWindowFrame(sBrailleWindowId, 0); DrawStdWindowFrame(sBrailleWindowId, FALSE);
PutWindowTilemap(sBrailleWindowId); PutWindowTilemap(sBrailleWindowId);
FillWindowPixelBuffer(sBrailleWindowId, PIXEL_FILL(1)); FillWindowPixelBuffer(sBrailleWindowId, PIXEL_FILL(1));
AddTextPrinterParameterized(sBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(sBrailleWindowId, FONT_BRAILLE, gStringVar4, xText, yText, TEXT_SKIP_DRAW, NULL);
@ -2268,7 +2268,7 @@ bool8 ScrCmd_setmonmetlocation(struct ScriptContext *ctx)
static void CloseBrailleWindow(void) static void CloseBrailleWindow(void)
{ {
ClearStdWindowAndFrame(sBrailleWindowId, 1); ClearStdWindowAndFrame(sBrailleWindowId, TRUE);
RemoveWindow(sBrailleWindowId); RemoveWindow(sBrailleWindowId);
} }

View File

@ -107,7 +107,7 @@ static void DrawMultichoiceMenu(u8 left, u8 top, u8 multichoiceId, bool8 ignoreB
newWidth = ConvertPixelWidthToTileWidth(width); newWidth = ConvertPixelWidthToTileWidth(width);
left = ScriptMenu_AdjustLeftCoordFromWidth(left, newWidth); left = ScriptMenu_AdjustLeftCoordFromWidth(left, newWidth);
windowId = CreateWindowFromRect(left, top, newWidth, count * 2); windowId = CreateWindowFromRect(left, top, newWidth, count * 2);
SetStandardWindowBorderStyle(windowId, 0); SetStandardWindowBorderStyle(windowId, FALSE);
PrintMenuTable(windowId, count, actions); PrintMenuTable(windowId, count, actions);
InitMenuInUpperLeftCornerNormal(windowId, count, cursorPos); InitMenuInUpperLeftCornerNormal(windowId, count, cursorPos);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);
@ -277,7 +277,7 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignore
gTasks[taskId].tIgnoreBPress = ignoreBPress; gTasks[taskId].tIgnoreBPress = ignoreBPress;
gTasks[taskId].tWindowId = CreateWindowFromRect(left, top, columnCount * newWidth, rowCount * 2); gTasks[taskId].tWindowId = CreateWindowFromRect(left, top, columnCount * newWidth, rowCount * 2);
SetStandardWindowBorderStyle(gTasks[taskId].tWindowId, 0); SetStandardWindowBorderStyle(gTasks[taskId].tWindowId, FALSE);
PrintMenuGridTable(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, sMultichoiceLists[multichoiceId].list); PrintMenuGridTable(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, sMultichoiceLists[multichoiceId].list);
InitMenuActionGrid(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, 0); InitMenuActionGrid(gTasks[taskId].tWindowId, newWidth * 8, columnCount, rowCount, 0);
CopyWindowToVram(gTasks[taskId].tWindowId, COPYWIN_FULL); CopyWindowToVram(gTasks[taskId].tWindowId, COPYWIN_FULL);
@ -352,7 +352,7 @@ static void CreatePCMultichoice(void)
{ {
numChoices = 4; numChoices = 4;
windowId = CreateWindowFromRect(0, 0, width, 8); windowId = CreateWindowFromRect(0, 0, width, 8);
SetStandardWindowBorderStyle(windowId, 0); SetStandardWindowBorderStyle(windowId, FALSE);
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame, y, 33, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 49, TEXT_SKIP_DRAW, NULL);
} }
@ -360,7 +360,7 @@ static void CreatePCMultichoice(void)
{ {
numChoices = 3; numChoices = 3;
windowId = CreateWindowFromRect(0, 0, width, 6); windowId = CreateWindowFromRect(0, 0, width, 6);
SetStandardWindowBorderStyle(windowId, 0); SetStandardWindowBorderStyle(windowId, FALSE);
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, y, 33, TEXT_SKIP_DRAW, NULL);
} }
@ -521,7 +521,7 @@ static void CreateLilycoveSSTidalMultichoice(void)
width = ConvertPixelWidthToTileWidth(pixelWidth); width = ConvertPixelWidthToTileWidth(pixelWidth);
windowId = CreateWindowFromRect(MAX_MULTICHOICE_WIDTH - width, (6 - count) * 2, width, count * 2); windowId = CreateWindowFromRect(MAX_MULTICHOICE_WIDTH - width, (6 - count) * 2, width, count * 2);
SetStandardWindowBorderStyle(windowId, 0); SetStandardWindowBorderStyle(windowId, FALSE);
for (selectionCount = 0, i = 0; i < SSTIDAL_SELECTION_COUNT; i++) for (selectionCount = 0, i = 0; i < SSTIDAL_SELECTION_COUNT; i++)
{ {
@ -595,7 +595,7 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y)
gTasks[taskId].tMonSpriteId = spriteId; gTasks[taskId].tMonSpriteId = spriteId;
gSprites[spriteId].callback = SpriteCallbackDummy; gSprites[spriteId].callback = SpriteCallbackDummy;
gSprites[spriteId].oam.priority = 0; gSprites[spriteId].oam.priority = 0;
SetStandardWindowBorderStyle(gTasks[taskId].tWindowId, 1); SetStandardWindowBorderStyle(gTasks[taskId].tWindowId, TRUE);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);
return TRUE; return TRUE;
} }
@ -688,7 +688,7 @@ bool16 ScriptMenu_CreateStartMenuForPokenavTutorial(void)
static void CreateStartMenuForPokenavTutorial(void) static void CreateStartMenuForPokenavTutorial(void)
{ {
u8 windowId = CreateWindowFromRect(21, 0, 7, 18); u8 windowId = CreateWindowFromRect(21, 0, 7, 18);
SetStandardWindowBorderStyle(windowId, 0); SetStandardWindowBorderStyle(windowId, FALSE);
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokedex, 8, 9, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionPokemon, 8, 25, TEXT_SKIP_DRAW, NULL);
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SKIP_DRAW, NULL); AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_MenuOptionBag, 8, 41, TEXT_SKIP_DRAW, NULL);

View File

@ -920,7 +920,7 @@ static void Task_ShowSecretBaseRegistryMenu(u8 taskId)
{ {
tSelectedRow = 0; tSelectedRow = 0;
tScrollOffset = 0; tScrollOffset = 0;
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
sRegistryMenu = calloc(1, sizeof(*sRegistryMenu)); sRegistryMenu = calloc(1, sizeof(*sRegistryMenu));
tMainWindowId = AddWindow(&sRegistryWindowTemplates[0]); tMainWindowId = AddWindow(&sRegistryWindowTemplates[0]);
BuildRegistryMenuItems(taskId); BuildRegistryMenuItems(taskId);
@ -976,7 +976,7 @@ static void RegistryMenu_OnCursorMove(s32 unused, bool8 flag, struct ListMenu *m
static void FinalizeRegistryMenu(u8 taskId) static void FinalizeRegistryMenu(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
SetStandardWindowBorderStyle(tMainWindowId, 0); SetStandardWindowBorderStyle(tMainWindowId, FALSE);
tListTaskId = ListMenuInit(&gMultiuseListMenuTemplate, tScrollOffset, tSelectedRow); tListTaskId = ListMenuInit(&gMultiuseListMenuTemplate, tScrollOffset, tSelectedRow);
AddRegistryMenuScrollArrows(taskId); AddRegistryMenuScrollArrows(taskId);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);
@ -1002,7 +1002,7 @@ static void HandleRegistryMenuInput(u8 taskId)
PlaySE(SE_SELECT); PlaySE(SE_SELECT);
DestroyListMenuTask(tListTaskId, NULL, NULL); DestroyListMenuTask(tListTaskId, NULL, NULL);
RemoveScrollIndicatorArrowPair(tArrowTaskId); RemoveScrollIndicatorArrowPair(tArrowTaskId);
ClearStdWindowAndFrame(tMainWindowId, 0); ClearStdWindowAndFrame(tMainWindowId, FALSE);
ClearWindowTilemap(tMainWindowId); ClearWindowTilemap(tMainWindowId);
RemoveWindow(tMainWindowId); RemoveWindow(tMainWindowId);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);
@ -1025,7 +1025,7 @@ static void ShowRegistryMenuActions(u8 taskId)
template = sRegistryWindowTemplates[1]; template = sRegistryWindowTemplates[1];
template.width = GetMaxWidthInMenuTable(sRegistryMenuActions, 2); template.width = GetMaxWidthInMenuTable(sRegistryMenuActions, 2);
tActionWindowId = AddWindow(&template); tActionWindowId = AddWindow(&template);
SetStandardWindowBorderStyle(tActionWindowId, 0); SetStandardWindowBorderStyle(tActionWindowId, FALSE);
PrintMenuTable(tActionWindowId, ARRAY_COUNT(sRegistryMenuActions), sRegistryMenuActions); PrintMenuTable(tActionWindowId, ARRAY_COUNT(sRegistryMenuActions), sRegistryMenuActions);
InitMenuInUpperLeftCornerNormal(tActionWindowId, ARRAY_COUNT(sRegistryMenuActions), 0); InitMenuInUpperLeftCornerNormal(tActionWindowId, ARRAY_COUNT(sRegistryMenuActions), 0);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);
@ -1073,7 +1073,7 @@ static void ShowRegistryMenuDeleteYesNo(u8 taskId)
void DeleteRegistry_Yes_Callback(u8 taskId) void DeleteRegistry_Yes_Callback(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
DestroyListMenuTask(tListTaskId, &tScrollOffset, &tSelectedRow); DestroyListMenuTask(tListTaskId, &tScrollOffset, &tSelectedRow);
gSaveBlock1Ptr->secretBases[tSelectedBaseId].registryStatus = UNREGISTERED; gSaveBlock1Ptr->secretBases[tSelectedBaseId].registryStatus = UNREGISTERED;
BuildRegistryMenuItems(taskId); BuildRegistryMenuItems(taskId);
@ -1090,7 +1090,7 @@ static void DeleteRegistry_Yes(u8 taskId)
static void DeleteRegistry_No(u8 taskId) static void DeleteRegistry_No(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
ClearDialogWindowAndFrame(0, 0); ClearDialogWindowAndFrame(0, FALSE);
DestroyListMenuTask(tListTaskId, &tScrollOffset, &tSelectedRow); DestroyListMenuTask(tListTaskId, &tScrollOffset, &tSelectedRow);
FinalizeRegistryMenu(taskId); FinalizeRegistryMenu(taskId);
gTasks[taskId].func = HandleRegistryMenuInput; gTasks[taskId].func = HandleRegistryMenuInput;
@ -1100,7 +1100,7 @@ static void ReturnToMainRegistryMenu(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
AddRegistryMenuScrollArrows(taskId); AddRegistryMenuScrollArrows(taskId);
ClearStdWindowAndFrame(tActionWindowId, 0); ClearStdWindowAndFrame(tActionWindowId, FALSE);
ClearWindowTilemap(tActionWindowId); ClearWindowTilemap(tActionWindowId);
RemoveWindow(tActionWindowId); RemoveWindow(tActionWindowId);
ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(0);

View File

@ -299,7 +299,7 @@ static u8 CreateShopMenu(u8 martType)
numMenuItems = ARRAY_COUNT(sShopMenuActions_BuyQuit); numMenuItems = ARRAY_COUNT(sShopMenuActions_BuyQuit);
} }
SetStandardWindowBorderStyle(sMartInfo.windowId, 0); SetStandardWindowBorderStyle(sMartInfo.windowId, FALSE);
PrintMenuTable(sMartInfo.windowId, numMenuItems, sMartInfo.menuActions); PrintMenuTable(sMartInfo.windowId, numMenuItems, sMartInfo.menuActions);
InitMenuInUpperLeftCornerNormal(sMartInfo.windowId, numMenuItems, 0); InitMenuInUpperLeftCornerNormal(sMartInfo.windowId, numMenuItems, 0);
PutWindowTilemap(sMartInfo.windowId); PutWindowTilemap(sMartInfo.windowId);
@ -370,7 +370,7 @@ void CB2_ExitSellMenu(void)
static void Task_HandleShopMenuQuit(u8 taskId) static void Task_HandleShopMenuQuit(u8 taskId)
{ {
ClearStdWindowAndFrameToTransparent(sMartInfo.windowId, 2); ClearStdWindowAndFrameToTransparent(sMartInfo.windowId, 2); // Incorrect use, making it not copy it to vram.
RemoveWindow(sMartInfo.windowId); RemoveWindow(sMartInfo.windowId);
TryPutSmartShopperOnAir(); TryPutSmartShopperOnAir();
ScriptContext2_Disable(); ScriptContext2_Disable();
@ -1022,8 +1022,8 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId)
if (JOY_NEW(A_BUTTON)) if (JOY_NEW(A_BUTTON))
{ {
PlaySE(SE_SELECT); PlaySE(SE_SELECT);
ClearStdWindowAndFrameToTransparent(4, 0); ClearStdWindowAndFrameToTransparent(4, FALSE);
ClearStdWindowAndFrameToTransparent(3, 0); ClearStdWindowAndFrameToTransparent(3, FALSE);
ClearWindowTilemap(4); ClearWindowTilemap(4);
ClearWindowTilemap(3); ClearWindowTilemap(3);
PutWindowTilemap(1); PutWindowTilemap(1);
@ -1035,8 +1035,8 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId)
else if (JOY_NEW(B_BUTTON)) else if (JOY_NEW(B_BUTTON))
{ {
PlaySE(SE_SELECT); PlaySE(SE_SELECT);
ClearStdWindowAndFrameToTransparent(4, 0); ClearStdWindowAndFrameToTransparent(4, FALSE);
ClearStdWindowAndFrameToTransparent(3, 0); ClearStdWindowAndFrameToTransparent(3, FALSE);
ClearWindowTilemap(4); ClearWindowTilemap(4);
ClearWindowTilemap(3); ClearWindowTilemap(3);
BuyMenuReturnToItemList(taskId); BuyMenuReturnToItemList(taskId);
@ -1131,7 +1131,7 @@ static void BuyMenuReturnToItemList(u8 taskId)
{ {
s16 *data = gTasks[taskId].data; s16 *data = gTasks[taskId].data;
ClearDialogWindowAndFrameToTransparent(5, 0); ClearDialogWindowAndFrameToTransparent(5, FALSE);
BuyMenuPrintCursor(tListTaskId, 1); BuyMenuPrintCursor(tListTaskId, 1);
PutWindowTilemap(1); PutWindowTilemap(1);
PutWindowTilemap(2); PutWindowTilemap(2);

View File

@ -496,7 +496,7 @@ static void Task_TrainerCard(u8 taskId)
break; break;
case STATE_WAIT_LINK_PARTNER: case STATE_WAIT_LINK_PARTNER:
SetCloseLinkCallback(); SetCloseLinkCallback();
DrawDialogueFrame(0, 1); DrawDialogueFrame(0, TRUE);
AddTextPrinterParameterized(0, FONT_NORMAL, gText_WaitingTrainerFinishReading, 0, 1, 255, 0); AddTextPrinterParameterized(0, FONT_NORMAL, gText_WaitingTrainerFinishReading, 0, 1, 255, 0);
CopyWindowToVram(0, COPYWIN_FULL); CopyWindowToVram(0, COPYWIN_FULL);
sData->mainState = STATE_CLOSE_CARD_LINK; sData->mainState = STATE_CLOSE_CARD_LINK;

View File

@ -1950,7 +1950,7 @@ static void Task_SendMysteryGift(u8 taskId)
data->state = 7; data->state = 7;
break; break;
case 7: case 7:
switch (DoMysteryGiftYesNo(&data->textState, &data->yesNoWindowId, 0, gStringVar4)) switch (DoMysteryGiftYesNo(&data->textState, &data->yesNoWindowId, FALSE, gStringVar4))
{ {
case 0: case 0:
LoadWirelessStatusIndicatorSpriteGfx(); LoadWirelessStatusIndicatorSpriteGfx();
@ -3585,7 +3585,7 @@ static u8 CreateTask_ListenForWonderDistributor(struct RfuIncomingPlayerList * l
static bool32 UR_PrintFieldMessage(const u8 *src) static bool32 UR_PrintFieldMessage(const u8 *src)
{ {
LoadMessageBoxAndBorderGfx(); LoadMessageBoxAndBorderGfx();
DrawDialogueFrame(0, 1); DrawDialogueFrame(0, TRUE);
StringExpandPlaceholders(gStringVar4, src); StringExpandPlaceholders(gStringVar4, src);
AddTextPrinterWithCustomSpeedForMessage(FALSE, 1); AddTextPrinterWithCustomSpeedForMessage(FALSE, 1);
return FALSE; return FALSE;
@ -3605,7 +3605,7 @@ static bool8 PrintOnTextbox(u8 *textState, const u8 *str)
{ {
case 0: case 0:
LoadMessageBoxAndBorderGfx(); LoadMessageBoxAndBorderGfx();
DrawDialogueFrame(0, 1); DrawDialogueFrame(0, TRUE);
StringExpandPlaceholders(gStringVar4, str); StringExpandPlaceholders(gStringVar4, str);
AddTextPrinterForMessage_2(TRUE); AddTextPrinterForMessage_2(TRUE);
(*textState)++; (*textState)++;

View File

@ -665,7 +665,7 @@ void RockSmashWildEncounter(void)
{ {
gSpecialVar_Result = FALSE; gSpecialVar_Result = FALSE;
} }
else if (DoWildEncounterRateTest(wildPokemonInfo->encounterRate, 1) == TRUE else if (DoWildEncounterRateTest(wildPokemonInfo->encounterRate, TRUE) == TRUE
&& TryGenerateWildMon(wildPokemonInfo, WILD_AREA_ROCKS, WILD_CHECK_REPEL | WILD_CHECK_KEEN_EYE) == TRUE) && TryGenerateWildMon(wildPokemonInfo, WILD_AREA_ROCKS, WILD_CHECK_REPEL | WILD_CHECK_KEEN_EYE) == TRUE)
{ {
BattleSetup_StartWildBattle(); BattleSetup_StartWildBattle();