Merge branch 'master' into move-tutor

This commit is contained in:
Phlosioneer 2019-03-08 02:27:20 -05:00
commit b93d923826
108 changed files with 2459 additions and 2574 deletions

View File

@ -159,7 +159,7 @@ $(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
ifeq ($(NODEP),1)
$(ASM_BUILDDIR)/%.o: asm_dep :=
else
$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) $(ASM_SUBDIR)/$*.s)
$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) -I "" $(ASM_SUBDIR)/$*.s)
endif
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep)
@ -168,7 +168,7 @@ $(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep)
ifeq ($(NODEP),1)
$(DATA_ASM_BUILDDIR)/%.o: data_dep :=
else
$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) $(DATA_ASM_SUBDIR)/$*.s)
$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) -I include -I "" $(DATA_ASM_SUBDIR)/$*.s)
endif
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep)

File diff suppressed because it is too large Load Diff

View File

@ -1078,7 +1078,7 @@
.4byte \param0
.endm
.macro tryimprision param0:req
.macro tryimprison param0:req
.byte 0xdb
.4byte \param0
.endm

View File

@ -472,7 +472,7 @@ sub_8017020: @ 8017020
bl sub_81973A4
movs r0, 0
movs r1, 0x1
bl NewMenuHelpers_DrawDialogueFrame
bl DrawDialogueFrame
ldr r0, =gStringVar4
adds r1, r4, 0
bl StringExpandPlaceholders
@ -517,7 +517,7 @@ _08017076:
bl sub_81973A4
movs r0, 0
movs r1, 0x1
bl NewMenuHelpers_DrawDialogueFrame
bl DrawDialogueFrame
ldr r0, =gStringVar4
adds r1, r5, 0
bl StringExpandPlaceholders
@ -563,7 +563,7 @@ _080170CA:
negs r0, r0
b _08017110
_080170D4:
bl DisplayYesNoMenu
bl DisplayYesNoMenuDefaultYes
ldrb r0, [r4]
adds r0, 0x1
strb r0, [r4]
@ -609,7 +609,7 @@ sub_8017118: @ 8017118
lsrs r4, 24
adds r0, r4, 0
movs r1, 0
bl NewMenuHelpers_DrawStdWindowFrame
bl DrawStdWindowFrame
adds r0, r4, 0
movs r1, 0xFF
bl FillWindowPixelBuffer
@ -705,7 +705,7 @@ _080171DC:
strb r0, [r5]
ldrb r0, [r5]
movs r1, 0
bl NewMenuHelpers_DrawStdWindowFrame
bl DrawStdWindowFrame
ldr r0, =gMultiuseListMenuTemplate
adds r2, r0, 0
ldr r1, [sp, 0x24]
@ -745,7 +745,7 @@ _08017228:
bl DestroyListMenuTask
ldrb r0, [r5]
movs r1, 0x1
bl sub_819746C
bl ClearStdWindowAndFrame
ldrb r0, [r5]
bl RemoveWindow
movs r0, 0
@ -765,7 +765,7 @@ _08017264:
bl DestroyListMenuTask
ldrb r0, [r5]
movs r1, 0x1
bl sub_819746C
bl ClearStdWindowAndFrame
ldrb r0, [r5]
bl RemoveWindow
strb r4, [r7]
@ -818,7 +818,7 @@ _080172C8:
strb r0, [r6]
ldrb r0, [r6]
movs r1, 0
bl NewMenuHelpers_DrawStdWindowFrame
bl DrawStdWindowFrame
ldr r0, =gMultiuseListMenuTemplate
adds r2, r0, 0
ldr r1, [sp, 0x24]
@ -18242,7 +18242,7 @@ sub_801FEBC: @ 801FEBC
lsls r0, 24
lsrs r0, 24
movs r1, 0
bl sub_8198070
bl ClearStdWindowAndFrameToTransparent
ldr r0, [r4]
ldrb r0, [r0, 0x18]
bl ClearWindowTilemap
@ -18470,7 +18470,7 @@ sub_8020094: @ 8020094
lsls r0, 24
lsrs r0, 24
movs r1, 0
bl sub_8198070
bl ClearStdWindowAndFrameToTransparent
ldr r0, [r4]
ldrb r0, [r0, 0x1E]
bl ClearWindowTilemap
@ -18913,7 +18913,7 @@ sub_802040C: @ 802040C
push {lr}
movs r0, 0x3
movs r1, 0
bl sub_8198070
bl ClearStdWindowAndFrameToTransparent
movs r0, 0x3
bl ClearWindowTilemap
pop {r0}
@ -22378,7 +22378,7 @@ _0802210C:
movs r1, 0
adds r2, r4, 0
movs r3, 0xD
bl SetWindowBorderStyle
bl DrawStdFrameWithCustomTileAndPalette
b _08022218
.pool
_08022130:
@ -22509,7 +22509,7 @@ sub_802222C: @ 802222C
adds r5, r4, r0
ldrb r0, [r5]
movs r1, 0x1
bl sub_8198070
bl ClearStdWindowAndFrameToTransparent
ldrb r0, [r5]
bl RemoveWindow
adds r0, r4, 0
@ -22577,7 +22577,7 @@ _08022296:
movs r1, 0
adds r2, r4, 0
movs r3, 0xD
bl SetWindowBorderStyle
bl DrawStdFrameWithCustomTileAndPalette
b _080224BA
.pool
_080222D0:
@ -22773,7 +22773,7 @@ _08022480:
_08022494:
ldrb r0, [r6, 0x2]
movs r1, 0x1
bl sub_8198070
bl ClearStdWindowAndFrameToTransparent
ldrb r0, [r6, 0x2]
bl ClearWindowTilemap
ldrb r0, [r6, 0x2]
@ -23864,7 +23864,7 @@ _08022D38:
_08022D42:
movs r0, 0
movs r1, 0
bl NewMenuHelpers_DrawDialogueFrame
bl DrawDialogueFrame
ldrb r1, [r5, 0x1]
movs r0, 0x2
mov r8, r0
@ -23946,7 +23946,7 @@ _08022DE8:
beq _08022DFA
movs r0, 0
movs r1, 0x1
bl sub_8197434
bl ClearDialogWindowAndFrame
_08022DFA:
ldrb r0, [r7, 0xE]
movs r1, 0x1
@ -24250,7 +24250,7 @@ _0802301E:
_08023044:
movs r0, 0
movs r1, 0x1
bl sub_8197434
bl ClearDialogWindowAndFrame
movs r0, 0xA
movs r1, 0x1
movs r2, 0
@ -26462,7 +26462,7 @@ _080241A6:
beq _0802421E
movs r0, 0
movs r1, 0
bl NewMenuHelpers_DrawDialogueFrame
bl DrawDialogueFrame
ldr r2, =gText_SavingDontTurnOffPower
movs r0, 0
str r0, [sp]
@ -26550,7 +26550,7 @@ _08024246:
strb r0, [r5, 0xC]
b _080242D8
_0802426A:
bl DisplayYesNoMenu
bl DisplayYesNoMenuDefaultYes
b _080242D0
_08024270:
bl Menu_ProcessInputNoWrapClearOnChoose
@ -26583,7 +26583,7 @@ _080242A4:
_080242A6:
movs r0, 0
movs r1, 0x1
bl sub_8197434
bl ClearDialogWindowAndFrame
movs r4, 0
str r4, [sp]
adds r0, r6, 0
@ -26761,7 +26761,7 @@ _080243EA:
_080243F6:
movs r0, 0
movs r1, 0x1
bl sub_8197434
bl ClearDialogWindowAndFrame
adds r0, r5, 0
bl sub_8021488
movs r0, 0x1
@ -26819,7 +26819,7 @@ _0802445A:
_08024460:
movs r0, 0
movs r1, 0
bl NewMenuHelpers_DrawDialogueFrame
bl DrawDialogueFrame
ldrh r1, [r5, 0x14]
cmp r1, 0x3
bne _08024490
@ -27347,7 +27347,7 @@ sub_802482C: @ 802482C
movs r1, 0
adds r2, r4, 0
adds r3, r5, 0
bl SetWindowBorderStyle
bl DrawStdFrameWithCustomTileAndPalette
ldr r2, =gText_Powder
movs r0, 0x1
str r0, [sp]
@ -27446,7 +27446,7 @@ sub_8024918: @ 8024918
bl ClearWindowTilemap
ldrb r0, [r4]
movs r1, 0x1
bl sub_8198070
bl ClearStdWindowAndFrameToTransparent
ldrb r0, [r4]
bl RemoveWindow
pop {r4}
@ -38552,7 +38552,7 @@ _0802A3A4:
_0802A3AE:
movs r0, 0
movs r1, 0
bl NewMenuHelpers_DrawDialogueFrame
bl DrawDialogueFrame
ldr r2, =gText_SavingDontTurnOffPower
str r4, [sp]
movs r0, 0x2

View File

@ -1,5 +1,5 @@
filler_03002F58
filler_03002F5C
gUnknown_03002F60
gTransparentTileNumber
filler_03002F64
gUnknown_03002F70

View File

@ -2538,7 +2538,7 @@ BattleScript_EffectImprison::
attackcanceler
attackstring
ppreduce
tryimprision BattleScript_ButItFailed
tryimprison BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNSEALEDOPPONENTMOVE
@ -3684,11 +3684,11 @@ BattleScript_MoveUsedIsImprisoned::
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_SelectingImprisionedMove::
BattleScript_SelectingImprisonedMove::
printselectionstring STRINGID_PKMNCANTUSEMOVESEALED
endselectionscript
BattleScript_SelectingImprisionedMoveInPalace::
BattleScript_SelectingImprisonedMoveInPalace::
printstring STRINGID_PKMNCANTUSEMOVESEALED
goto BattleScript_SelectingUnusableMoveInPalace
@ -3876,7 +3876,7 @@ BattleScript_MoveUsedIsInLove::
status2animation BS_ATTACKER, STATUS2_INFATUATION
return
BattleScript_MoveUsedIsParalyzedCantAttack::
BattleScript_MoveUsedIsInLoveCantAttack::
printstring STRINGID_PKMNIMMOBILIZEDBYLOVE
waitmessage 0x40
goto BattleScript_MoveEnd

View File

@ -175,7 +175,7 @@ struct ProtectStruct
u32 targetNotAffected:1;
u32 chargingTurn:1;
u32 fleeFlag:2; // For RunAway and Smoke Ball.
u32 usedImprisionedMove:1;
u32 usedImprisonedMove:1;
u32 loveImmobility:1;
u32 usedDisabledMove:1;
u32 usedTauntedMove:1;

View File

@ -88,8 +88,8 @@ extern const u8 BattleScript_IngrainTurnHeal[];
extern const u8 BattleScript_AtkDefDown[];
extern const u8 BattleScript_KnockedOff[];
extern const u8 BattleScript_MoveUsedIsImprisoned[];
extern const u8 BattleScript_SelectingImprisionedMove[];
extern const u8 BattleScript_SelectingImprisionedMoveInPalace[];
extern const u8 BattleScript_SelectingImprisonedMove[];
extern const u8 BattleScript_SelectingImprisonedMoveInPalace[];
extern const u8 BattleScript_GrudgeTakesPp[];
extern const u8 BattleScript_MagicCoatBounce[];
extern const u8 BattleScript_SnatchedMove[];
@ -115,7 +115,7 @@ extern const u8 BattleScript_PrintPayDayMoneyString[];
extern const u8 BattleScript_WrapTurnDmg[];
extern const u8 BattleScript_WrapEnds[];
extern const u8 BattleScript_MoveUsedIsInLove[];
extern const u8 BattleScript_MoveUsedIsParalyzedCantAttack[];
extern const u8 BattleScript_MoveUsedIsInLoveCantAttack[];
extern const u8 BattleScript_NightmareTurnDmg[];
extern const u8 BattleScript_CurseTurnDmg[];
extern const u8 BattleScript_TargetPRLZHeal[];

View File

@ -6,7 +6,7 @@
#define MOVE_LIMITATION_DISABLED (1 << 2)
#define MOVE_LIMITATION_TORMENTED (1 << 3)
#define MOVE_LIMITATION_TAUNT (1 << 4)
#define MOVE_LIMITATION_IMPRISION (1 << 5)
#define MOVE_LIMITATION_IMPRISON (1 << 5)
#define ABILITYEFFECT_ON_SWITCHIN 0x0
#define ABILITYEFFECT_ENDTURN 0x1
@ -44,7 +44,7 @@
u8 GetBattlerForBattleScript(u8 caseId);
void PressurePPLose(u8 target, u8 attacker, u16 move);
void PressurePPLoseOnUsingPerishSong(u8 attacker);
void PressurePPLoseOnUsingImprision(u8 attacker);
void PressurePPLoseOnUsingImprison(u8 attacker);
void MarkAllBattlersForControllerExec(void); // unused
void MarkBattlerForControllerExec(u8 battlerId);
void sub_803F850(u8 arg0);

View File

@ -25,23 +25,23 @@ void InitStandardTextBoxWindows(void);
void sub_8197200(void);
u16 RunTextPrintersAndIsPrinter0Active(void);
void sub_81973A4(void);
void NewMenuHelpers_DrawDialogueFrame(u8, u8);
void sub_819746C(u8 windowId, bool8 copyToVram);
void DrawDialogueFrame(u8, u8);
void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram);
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
void PrintPlayerNameOnWindow(u8, const u8*, u16, u16);
void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback);
void sub_8197434(u8 windowId, bool8 copyToVram);
void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram);
void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram);
void DisplayYesNoMenu(void);
void DisplayYesNoMenuDefaultYes(void);
u32 GetPlayerTextSpeed(void);
u8 GetPlayerTextSpeedDelay(void);
void sub_81978B0(u16 arg0);
void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextPrinterTemplate *, u16));
void sub_8199DF0(u32 bg, u8 a1, int a2, int a3);
void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
void sub_8198070(u8 windowId, bool8 copyToVram);
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);
void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette);
void schedule_bg_copy_tilemap_to_vram(u8 bgNum);
void PrintMenuTable(u8 windowId, u8 itemCount, const struct MenuAction *strs);
u8 InitMenuInUpperLeftCornerPlaySoundWhenAPressed(u8 windowId, u8 numItems, u8 initialCursorPos);
@ -60,9 +60,9 @@ s8 ProcessMenuInput_other(void);
void do_scheduled_bg_tilemap_copies_to_vram(void);
void clear_scheduled_bg_copies_to_vram(void);
void AddTextPrinterParameterized4(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const u8 *color, s8 speed, const u8 *str);
void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u8 a3);
void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 a2, u8 a3);
void sub_81995E4(u8 windowId, u8 optionsNo, const struct MenuAction *actions, const u8 *actionIds);
void sub_8197DF8(u8 windowId, bool8 copyToVram);
void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram);
u16 sub_8198AA4(u8, u8, u8, u8, u8, u8, u16);
void *malloc_and_decompress(const void *src, u32 *sizeOut);
u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
@ -75,13 +75,13 @@ u8 GetStartMenuWindowId(void);
void sub_819A2BC(u8, u8);
u8 Menu_MoveCursor(s8 cursorDelta);
u8 Menu_MoveCursorNoWrapAround(s8 cursorDelta);
void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 CopyToVram);
void DrawStdWindowFrame(u8 windowId, bool8 CopyToVram);
u8 sub_81979C4(u8 a1);
u8 sub_81983AC(u8 windowId, u8 fontId, u8 left, u8 top, u8 cursorHeight, u8 numChoices, u8 initialCursorPos);
void sub_819786C(u8 windowId, bool8 copyToVram);
void AddTextPrinterForMessage_2(bool8 allowSkippingDelayWithButtonPress);
void RemoveStartMenuWindow(void);
void sub_8197948(u8 initialCursorPos);
void DisplayYesNoMenuWithDefault(u8 initialCursorPos);
void sub_819A344(u8 a0, u8 *dest, u8 color);
void RemoveMapNamePopUpWindow(void);
u8 GetMapNamePopUpWindowId(void);

View File

@ -39,10 +39,10 @@ struct SiiRtcInfo
u8 alarmMinute;
};
void SiiRtcUnprotect();
void SiiRtcProtect();
u8 SiiRtcProbe();
bool8 SiiRtcReset();
void SiiRtcUnprotect(void);
void SiiRtcProtect(void);
u8 SiiRtcProbe(void);
bool8 SiiRtcReset(void);
bool8 SiiRtcGetStatus(struct SiiRtcInfo *rtc);
bool8 SiiRtcSetStatus(struct SiiRtcInfo *rtc);
bool8 SiiRtcGetDateTime(struct SiiRtcInfo *rtc);

View File

@ -1,6 +1,8 @@
#ifndef GUARD_WINDOW_H
#define GUARD_WINDOW_H
#define PIXEL_FILL(num) ((num) | ((num) << 4))
enum
{
WINDOW_BG,
@ -73,6 +75,4 @@ extern u32 filler_03002F58;
extern u32 filler_03002F5C;
extern u32 filler_03002F64;
extern u8 gUnknown_03002F60;
#endif // GUARD_WINDOW_H

View File

@ -165,7 +165,6 @@ SECTIONS {
src/fight.o(.text);
src/poison.o(.text);
src/flying.o(.text);
asm/flying.o(.text);
src/psychic.o(.text);
src/bug.o(.text);
src/rock.o(.text);

View File

@ -3,7 +3,7 @@
MAPS_DIR = $(DATA_ASM_SUBDIR)/maps
LAYOUTS_DIR = $(DATA_ASM_SUBDIR)/layouts
MAP_DIRS := $(dir $(wildcard $(MAPS_DIR)/*/))
MAP_DIRS := $(dir $(wildcard $(MAPS_DIR)/*/map.json))
MAP_CONNECTIONS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/connections.inc,$(MAP_DIRS))
MAP_EVENTS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/events.inc,$(MAP_DIRS))
MAP_HEADERS := $(patsubst $(MAPS_DIR)/%/,$(MAPS_DIR)/%/header.inc,$(MAP_DIRS))

View File

@ -1619,7 +1619,7 @@ static u8 CreateAndShowWindow(u8 left, u8 top, u8 width, u8 height)
static void RemoveAndHideWindow(u8 windowId)
{
sub_8198070(windowId, TRUE);
ClearStdWindowAndFrameToTransparent(windowId, TRUE);
RemoveWindow(windowId);
}
@ -1826,7 +1826,7 @@ static void Script_PrintMessage(void)
FreezeEventObjects();
sub_808B864();
sub_808BCF4();
NewMenuHelpers_DrawDialogueFrame(0, 1);
DrawDialogueFrame(0, 1);
PrintMessage();
}

View File

@ -16,6 +16,7 @@
#include "palette.h"
#include "pokeball.h"
#include "pokemon.h"
#include "recorded_battle.h"
#include "reshow_battle_screen.h"
#include "sound.h"
#include "string_util.h"
@ -32,8 +33,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM;
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon);
extern void sub_81851A8(u8 *);
extern u16 sub_8068B48(void);
// this file's functions
static void LinkOpponentHandleGetMonData(void);
@ -92,7 +91,7 @@ static void LinkOpponentHandleBattleAnimation(void);
static void LinkOpponentHandleLinkStandbyMsg(void);
static void LinkOpponentHandleResetActionMoveSelection(void);
static void LinkOpponentHandleCmd55(void);
static void nullsub_92(void);
static void LinkOpponentCmdEnd(void);
static void LinkOpponentBufferRunCommand(void);
static void LinkOpponentBufferExecCompleted(void);
@ -164,7 +163,7 @@ static void (*const sLinkOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
LinkOpponentHandleLinkStandbyMsg,
LinkOpponentHandleResetActionMoveSelection,
LinkOpponentHandleCmd55,
nullsub_92
LinkOpponentCmdEnd
};
static void nullsub_28(void)
@ -1857,6 +1856,6 @@ static void LinkOpponentHandleCmd55(void)
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
}
static void nullsub_92(void)
static void LinkOpponentCmdEnd(void)
{
}

View File

@ -16,6 +16,7 @@
#include "palette.h"
#include "pokeball.h"
#include "pokemon.h"
#include "recorded_battle.h"
#include "reshow_battle_screen.h"
#include "sound.h"
#include "string_util.h"
@ -31,7 +32,6 @@ extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
extern const struct CompressedSpritePalette gTrainerBackPicPaletteTable[];
extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon);
extern void sub_81851A8(u8 *);
// this file's functions
static void LinkPartnerHandleGetMonData(void);
@ -90,7 +90,7 @@ static void LinkPartnerHandleBattleAnimation(void);
static void LinkPartnerHandleLinkStandbyMsg(void);
static void LinkPartnerHandleResetActionMoveSelection(void);
static void LinkPartnerHandleCmd55(void);
static void nullsub_113(void);
static void LinkPartnerCmdEnd(void);
static void LinkPartnerBufferRunCommand(void);
static void LinkPartnerBufferExecCompleted(void);
@ -161,10 +161,10 @@ static void (*const sLinkPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
LinkPartnerHandleLinkStandbyMsg,
LinkPartnerHandleResetActionMoveSelection,
LinkPartnerHandleCmd55,
nullsub_113
LinkPartnerCmdEnd
};
static void nullsub_112(void)
static void SpriteCB_Null2(void)
{
}
@ -1564,7 +1564,7 @@ static void LinkPartnerHandleIntroTrainerBallThrow(void)
gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary;
gBattleSpritesDataPtr->animationData->field_9_x1 = 1;
gBattlerControllerFuncs[gActiveBattler] = nullsub_112;
gBattlerControllerFuncs[gActiveBattler] = SpriteCB_Null2;
}
static void sub_814DCCC(u8 taskId)
@ -1687,6 +1687,6 @@ static void LinkPartnerHandleCmd55(void)
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
}
static void nullsub_113(void)
static void LinkPartnerCmdEnd(void)
{
}

View File

@ -97,7 +97,7 @@ static void OpponentHandleBattleAnimation(void);
static void OpponentHandleLinkStandbyMsg(void);
static void OpponentHandleResetActionMoveSelection(void);
static void OpponentHandleCmd55(void);
static void nullsub_91(void);
static void OpponentCmdEnd(void);
static void OpponentBufferRunCommand(void);
static void OpponentBufferExecCompleted(void);
@ -169,7 +169,7 @@ static void (*const sOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
OpponentHandleLinkStandbyMsg,
OpponentHandleResetActionMoveSelection,
OpponentHandleCmd55,
nullsub_91
OpponentCmdEnd
};
// unknown unused data
@ -2003,6 +2003,6 @@ static void OpponentHandleCmd55(void)
OpponentBufferExecCompleted();
}
static void nullsub_91(void)
static void OpponentCmdEnd(void)
{
}

View File

@ -99,7 +99,7 @@ static void PlayerHandleBattleAnimation(void);
static void PlayerHandleLinkStandbyMsg(void);
static void PlayerHandleResetActionMoveSelection(void);
static void PlayerHandleCmd55(void);
static void nullsub_22(void);
static void PlayerCmdEnd(void);
static void PlayerBufferRunCommand(void);
static void HandleInputChooseTarget(void);
@ -186,7 +186,7 @@ static void (*const sPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
PlayerHandleLinkStandbyMsg,
PlayerHandleResetActionMoveSelection,
PlayerHandleCmd55,
nullsub_22
PlayerCmdEnd
};
static const u8 sTargetIdentities[] = {B_POSITION_PLAYER_LEFT, B_POSITION_PLAYER_RIGHT, B_POSITION_OPPONENT_RIGHT, B_POSITION_OPPONENT_LEFT};
@ -3105,6 +3105,6 @@ static void PlayerHandleCmd55(void)
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
}
static void nullsub_22(void)
static void PlayerCmdEnd(void)
{
}

View File

@ -90,7 +90,7 @@ static void PlayerPartnerHandleBattleAnimation(void);
static void PlayerPartnerHandleLinkStandbyMsg(void);
static void PlayerPartnerHandleResetActionMoveSelection(void);
static void PlayerPartnerHandleCmd55(void);
static void nullsub_128(void);
static void PlayerPartnerCmdEnd(void);
static void PlayerPartnerBufferRunCommand(void);
static void PlayerPartnerBufferExecCompleted(void);
@ -167,7 +167,7 @@ static void (*const sPlayerPartnerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
PlayerPartnerHandleLinkStandbyMsg,
PlayerPartnerHandleResetActionMoveSelection,
PlayerPartnerHandleCmd55,
nullsub_128
PlayerPartnerCmdEnd
};
// unknown unused data
@ -1928,6 +1928,6 @@ static void PlayerPartnerHandleCmd55(void)
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
}
static void nullsub_128(void)
static void PlayerPartnerCmdEnd(void)
{
}

View File

@ -34,7 +34,6 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM;
extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[];
extern void sub_8172EF0(u8 battlerId, struct Pokemon *mon);
extern u16 sub_8068B48(void);
// this file's functions
static void RecordedOpponentHandleGetMonData(void);
@ -93,7 +92,7 @@ static void RecordedOpponentHandleBattleAnimation(void);
static void RecordedOpponentHandleLinkStandbyMsg(void);
static void RecordedOpponentHandleResetActionMoveSelection(void);
static void RecordedOpponentHandleCmd55(void);
static void nullsub_119(void);
static void RecordedOpponentCmdEnd(void);
static void RecordedOpponentBufferRunCommand(void);
static void RecordedOpponentBufferExecCompleted(void);
@ -165,7 +164,7 @@ static void (*const sRecordedOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void
RecordedOpponentHandleLinkStandbyMsg,
RecordedOpponentHandleResetActionMoveSelection,
RecordedOpponentHandleCmd55,
nullsub_119
RecordedOpponentCmdEnd
};
static void nullsub_70(void)
@ -1791,6 +1790,6 @@ static void RecordedOpponentHandleCmd55(void)
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
}
static void nullsub_119(void)
static void RecordedOpponentCmdEnd(void)
{
}

View File

@ -89,7 +89,7 @@ static void RecordedPlayerHandleBattleAnimation(void);
static void RecordedPlayerHandleLinkStandbyMsg(void);
static void RecordedPlayerHandleResetActionMoveSelection(void);
static void RecordedPlayerHandleCmd55(void);
static void nullsub_121(void);
static void RecordedPlayerCmdEnd(void);
static void RecordedPlayerBufferRunCommand(void);
static void RecordedPlayerBufferExecCompleted(void);
@ -160,7 +160,7 @@ static void (*const sRecordedPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void)
RecordedPlayerHandleLinkStandbyMsg,
RecordedPlayerHandleResetActionMoveSelection,
RecordedPlayerHandleCmd55,
nullsub_121
RecordedPlayerCmdEnd
};
static void nullsub_120(void)
@ -1808,6 +1808,6 @@ static void RecordedPlayerHandleCmd55(void)
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
}
static void nullsub_121(void)
static void RecordedPlayerCmdEnd(void)
{
}

View File

@ -84,7 +84,7 @@ static void SafariHandleBattleAnimation(void);
static void SafariHandleLinkStandbyMsg(void);
static void SafariHandleResetActionMoveSelection(void);
static void SafariHandleCmd55(void);
static void nullsub_115(void);
static void SafariCmdEnd(void);
static void SafariBufferRunCommand(void);
static void SafariBufferExecCompleted(void);
@ -148,10 +148,10 @@ static void (*const sSafariBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
SafariHandleLinkStandbyMsg,
SafariHandleResetActionMoveSelection,
SafariHandleCmd55,
nullsub_115
SafariCmdEnd
};
static void nullsub_114(void)
static void SpriteCB_Null4(void)
{
}
@ -688,6 +688,6 @@ static void SafariHandleCmd55(void)
gBattlerControllerFuncs[gActiveBattler] = sub_81595E4;
}
static void nullsub_115(void)
static void SafariCmdEnd(void)
{
}

View File

@ -92,7 +92,7 @@ static void WallyHandleBattleAnimation(void);
static void WallyHandleLinkStandbyMsg(void);
static void WallyHandleResetActionMoveSelection(void);
static void WallyHandleCmd55(void);
static void nullsub_118(void);
static void WallyCmdEnd(void);
static void WallyBufferRunCommand(void);
static void WallyBufferExecCompleted(void);
@ -161,10 +161,10 @@ static void (*const sWallyBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
WallyHandleLinkStandbyMsg,
WallyHandleResetActionMoveSelection,
WallyHandleCmd55,
nullsub_118
WallyCmdEnd
};
static void nullsub_117(void)
static void SpriteCB_Null7(void)
{
}
@ -1559,6 +1559,6 @@ static void WallyHandleCmd55(void)
gBattlerControllerFuncs[gActiveBattler] = sub_80587B0;
}
static void nullsub_118(void)
static void WallyCmdEnd(void)
{
}

View File

@ -3794,7 +3794,7 @@ static void sub_8190CD4(u8 taskId)
for (i = windowId; i < windowId + 9; i++)
{
CopyWindowToVram(i, 2);
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
}
gTasks[taskId].data[0] = 3;
break;

View File

@ -1741,7 +1741,7 @@ static void Select_CopyMonsToPlayerParty(void)
{
gPlayerParty[i] = sFactorySelectScreen->mons[j].monData;
gSaveBlock2Ptr->frontier.rentalMons[i].monId = sFactorySelectScreen->mons[j].monSetId;
gSaveBlock2Ptr->frontier.rentalMons[i].personality = GetMonData(&gPlayerParty[i].box, MON_DATA_PERSONALITY, NULL);
gSaveBlock2Ptr->frontier.rentalMons[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY, NULL);
gSaveBlock2Ptr->frontier.rentalMons[i].abilityBit = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ALT_ABILITY, NULL);
gSaveBlock2Ptr->frontier.rentalMons[i].ivs = GetBoxMonData(&gPlayerParty[i].box, MON_DATA_ATK_IV, NULL);
break;
@ -1786,14 +1786,14 @@ static void sub_819B958(u8 windowId)
{
gSprites[sFactorySelectScreen->menuCursor1SpriteId].invisible = TRUE;
gSprites[sFactorySelectScreen->menuCursor2SpriteId].invisible = TRUE;
FillWindowPixelBuffer(windowId, 0);
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
CopyWindowToVram(windowId, 2);
ClearWindowTilemap(windowId);
}
static void Select_PrintRentalPkmnString(void)
{
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
AddTextPrinterParameterized(0, 1, gText_RentalPkmn2, 2, 1, 0, NULL);
CopyWindowToVram(0, 3);
}
@ -1804,7 +1804,7 @@ static void Select_PrintMonSpecies(void)
u8 x;
u8 monId = sFactorySelectScreen->cursorPos;
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
StringCopy(gStringVar4, gSpeciesNames[species]);
x = GetStringRightAlignXOffset(1, gStringVar4, 86);
@ -1816,7 +1816,7 @@ static void Select_PrintSelectMonString(void)
{
const u8 *str = NULL;
FillWindowPixelBuffer(2, 0);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
if (sFactorySelectScreen->selectingMonsState == 1)
str = gText_SelectFirstPkmn;
else if (sFactorySelectScreen->selectingMonsState == 2)
@ -1832,7 +1832,7 @@ static void Select_PrintSelectMonString(void)
static void Select_PrintCantSelectSameMon(void)
{
FillWindowPixelBuffer(2, 0);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
AddTextPrinterParameterized(2, 1, gText_CantSelectSamePkmn, 2, 5, 0, NULL);
CopyWindowToVram(2, 2);
}
@ -1842,7 +1842,7 @@ static void Select_PrintMenuOptions(void)
u8 selectedId = sFactorySelectScreen->mons[sFactorySelectScreen->cursorPos].selectedId;
PutWindowTilemap(3);
FillWindowPixelBuffer(3, 0);
FillWindowPixelBuffer(3, PIXEL_FILL(0));
AddTextPrinterParameterized3(3, 1, 7, 1, gUnknown_08610476, 0, gText_Summary);
if (selectedId != 0)
AddTextPrinterParameterized3(3, 1, 7, 17, gUnknown_08610476, 0, gText_Deselect);
@ -1856,7 +1856,7 @@ static void Select_PrintMenuOptions(void)
static void Select_PrintYesNoOptions(void)
{
PutWindowTilemap(4);
FillWindowPixelBuffer(4, 0);
FillWindowPixelBuffer(4, PIXEL_FILL(0));
AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610476, 0, gText_Yes2);
AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610476, 0, gText_No2);
CopyWindowToVram(4, 3);
@ -1924,7 +1924,7 @@ static void Select_PrintMonCategory(void)
if (monId < SELECTABLE_MONS_COUNT)
{
PutWindowTilemap(5);
FillWindowPixelBuffer(5, 0);
FillWindowPixelBuffer(5, PIXEL_FILL(0));
species = GetMonData(&sFactorySelectScreen->mons[monId].monData, MON_DATA_SPECIES, NULL);
CopyMonCategoryText(SpeciesToNationalPokedexNum(species), text);
x = GetStringRightAlignXOffset(1, text, 0x76);
@ -2873,7 +2873,7 @@ static void sub_819D588(u8 taskId)
case 3:
if (!gPaletteFade.active)
{
FillWindowPixelBuffer(5, 0);
FillWindowPixelBuffer(5, PIXEL_FILL(0));
CopyWindowToVram(5, 2);
if (sFactorySwapScreen->inEnemyScreen == TRUE)
{
@ -3002,7 +3002,7 @@ static void sub_819D770(u8 taskId)
gTasks[taskId].data[0]++;
break;
case 6:
FillWindowPixelBuffer(5, 0);
FillWindowPixelBuffer(5, PIXEL_FILL(0));
CopyWindowToVram(5, 2);
gTasks[taskId].data[0]++;
break;
@ -3546,7 +3546,7 @@ static void sub_819EA64(u8 windowId)
{
gSprites[sFactorySwapScreen->menuCursor1SpriteId].invisible = TRUE;
gSprites[sFactorySwapScreen->menuCursor2SpriteId].invisible = TRUE;
FillWindowPixelBuffer(windowId, 0);
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
CopyWindowToVram(windowId, 2);
ClearWindowTilemap(windowId);
}
@ -3554,14 +3554,14 @@ static void sub_819EA64(u8 windowId)
static void sub_819EAC0(void)
{
PutWindowTilemap(1);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
CopyWindowToVram(1, 2);
}
static void sub_819EADC(void)
{
PutWindowTilemap(7);
FillWindowPixelBuffer(7, 0);
FillWindowPixelBuffer(7, PIXEL_FILL(0));
CopyWindowToVram(7, 2);
}
@ -3569,13 +3569,13 @@ static void sub_819EAF8(void)
{
sub_819EAC0();
PutWindowTilemap(5);
FillWindowPixelBuffer(5, 0);
FillWindowPixelBuffer(5, PIXEL_FILL(0));
CopyWindowToVram(5, 2);
}
static void Swap_PrintPkmnSwap(void)
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized(0, 1, gText_PkmnSwap, 2, 1, 0, NULL);
CopyWindowToVram(0, 3);
}
@ -3585,7 +3585,7 @@ static void Swap_PrintMonSpecies(void)
u16 species;
u8 x;
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
if (sFactorySwapScreen->cursorPos > 2)
{
CopyWindowToVram(1, 2);
@ -3606,7 +3606,7 @@ static void Swap_PrintMonSpecies(void)
static void Swap_PrintOnInfoWindow(const u8 *str)
{
FillWindowPixelBuffer(2, 0);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
AddTextPrinterParameterized(2, 1, str, 2, 5, 0, NULL);
CopyWindowToVram(2, 2);
}
@ -3614,7 +3614,7 @@ static void Swap_PrintOnInfoWindow(const u8 *str)
static void Swap_PrintMenuOptions(void)
{
PutWindowTilemap(3);
FillWindowPixelBuffer(3, 0);
FillWindowPixelBuffer(3, PIXEL_FILL(0));
AddTextPrinterParameterized3(3, 1, 15, 1, gUnknown_08610922, 0, gText_Summary2);
AddTextPrinterParameterized3(3, 1, 15, 17, gUnknown_08610922, 0, gText_Swap);
AddTextPrinterParameterized3(3, 1, 15, 33, gUnknown_08610922, 0, gText_Rechoose);
@ -3624,7 +3624,7 @@ static void Swap_PrintMenuOptions(void)
static void Swap_PrintYesNoOptions(void)
{
PutWindowTilemap(4);
FillWindowPixelBuffer(4, 0);
FillWindowPixelBuffer(4, PIXEL_FILL(0));
AddTextPrinterParameterized3(4, 1, 7, 1, gUnknown_08610922, 0, gText_Yes3);
AddTextPrinterParameterized3(4, 1, 7, 17, gUnknown_08610922, 0, gText_No3);
CopyWindowToVram(4, 3);
@ -3638,7 +3638,7 @@ static void Swap_PrintActionString(const u8 *str, u32 y, u32 windowId)
static void Swap_PrintActionStrings(void)
{
FillWindowPixelBuffer(5, 0);
FillWindowPixelBuffer(5, PIXEL_FILL(0));
switch (sFactorySwapScreen->inEnemyScreen)
{
case TRUE:
@ -3652,7 +3652,7 @@ static void Swap_PrintActionStrings(void)
static void Swap_PrintActionStrings2(void)
{
FillWindowPixelBuffer(3, 0);
FillWindowPixelBuffer(3, PIXEL_FILL(0));
switch (sFactorySwapScreen->inEnemyScreen)
{
case TRUE:
@ -3693,7 +3693,7 @@ static void Swap_PrintMonSpecies2(void)
LoadPalette(pal, 0xF0, 0xA);
PutWindowTilemap(7);
FillWindowPixelBuffer(7, 0);
FillWindowPixelBuffer(7, PIXEL_FILL(0));
if (sFactorySwapScreen->cursorPos > 2)
{
CopyWindowToVram(7, 3);
@ -3745,7 +3745,7 @@ static void Swap_PrintMonCategory(void)
u8 x;
u8 monId = sFactorySwapScreen->cursorPos;
FillWindowPixelBuffer(8, 0);
FillWindowPixelBuffer(8, PIXEL_FILL(0));
if (monId > 2)
{
CopyWindowToVram(8, 2);
@ -3940,7 +3940,7 @@ static void Task_SwapCantHaveSameMons(u8 taskId)
case 2:
if (sFactorySwapScreen->unk30 != TRUE)
{
FillWindowPixelBuffer(5, 0);
FillWindowPixelBuffer(5, PIXEL_FILL(0));
CopyWindowToVram(5, 2);
gTasks[taskId].data[0]++;
}

View File

@ -2579,7 +2579,7 @@ static u8* AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y,
struct WindowTemplate winTemplate = sHealthboxWindowTemplate;
winId = AddWindow(&winTemplate);
FillWindowPixelBuffer(winId, (bgColor << 4) | (bgColor));
FillWindowPixelBuffer(winId, PIXEL_FILL(bgColor));
color[0] = bgColor;
color[1] = 1;

View File

@ -3279,7 +3279,7 @@ void FaintClearSetData(void)
gProtectStructs[gActiveBattler].targetNotAffected = 0;
gProtectStructs[gActiveBattler].chargingTurn = 0;
gProtectStructs[gActiveBattler].fleeFlag = 0;
gProtectStructs[gActiveBattler].usedImprisionedMove = 0;
gProtectStructs[gActiveBattler].usedImprisonedMove = 0;
gProtectStructs[gActiveBattler].loveImmobility = 0;
gProtectStructs[gActiveBattler].usedDisabledMove = 0;
gProtectStructs[gActiveBattler].usedTauntedMove = 0;

View File

@ -1357,7 +1357,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
{
// The corresponding WindowTemplate is gStandardBattleWindowTemplates[] within src/battle_bg.c
{ // 0 Standard battle message
.fillValue = 0xFF,
.fillValue = PIXEL_FILL(0xF),
.fontId = 1,
.x = 0,
.y = 1,
@ -1369,7 +1369,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 6,
},
{ // 1 "What will (pokemon) do?"
.fillValue = 0xFF,
.fillValue = PIXEL_FILL(0xF),
.fontId = 1,
.x = 1,
.y = 1,
@ -1381,7 +1381,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 6,
},
{ // 2 "Fight/Pokemon/Bag/Run"
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1393,7 +1393,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 3 Top left move
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1405,7 +1405,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 4 Top right move
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1417,7 +1417,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 5 Bottom left move
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1429,7 +1429,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 6 Bottom right move
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1441,7 +1441,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 7 "PP"
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1453,7 +1453,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 11,
},
{ // 8
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1465,7 +1465,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 9 PP remaining
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 2,
.y = 1,
@ -1477,7 +1477,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 11,
},
{ // 10 "type"
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1489,7 +1489,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 11 "switch which?"
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1501,7 +1501,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 12 "gText_BattleYesNoChoice"
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1513,7 +1513,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 13
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1525,7 +1525,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 14
.fillValue = 0x0,
.fillValue = PIXEL_FILL(0),
.fontId = 1,
.x = 32,
.y = 1,
@ -1537,7 +1537,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 2,
},
{ // 15
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1549,7 +1549,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 16
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1561,7 +1561,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 17
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1573,7 +1573,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 18
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1585,7 +1585,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 19
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1597,7 +1597,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 20
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1609,7 +1609,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 15,
},
{ // 21
.fillValue = 0x0,
.fillValue = PIXEL_FILL(0),
.fontId = 1,
.x = -1,
.y = 1,
@ -1621,7 +1621,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 6,
},
{ // 22
.fillValue = 0x0,
.fillValue = PIXEL_FILL(0),
.fontId = 1,
.x = -1,
.y = 1,
@ -1633,7 +1633,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
.shadowColor = 6,
},
{ // 23
.fillValue = 0x0,
.fillValue = PIXEL_FILL(0x0),
.fontId = 1,
.x = -1,
.y = 1,
@ -1649,7 +1649,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Normal[] =
static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
{
{ // 0
.fillValue = 0xFF,
.fillValue = PIXEL_FILL(0xF),
.fontId = 1,
.x = 0,
.y = 1,
@ -1661,7 +1661,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 6,
},
{ // 1
.fillValue = 0xFF,
.fillValue = PIXEL_FILL(0xF),
.fontId = 1,
.x = 1,
.y = 1,
@ -1673,7 +1673,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 6,
},
{ // 2
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1685,7 +1685,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 3
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1697,7 +1697,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 4
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1709,7 +1709,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 5
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1721,7 +1721,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 6
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1733,7 +1733,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 7
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1745,7 +1745,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 11,
},
{ // 8
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1757,7 +1757,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 9
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 2,
.y = 1,
@ -1769,7 +1769,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 11,
},
{ // 10
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1781,7 +1781,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 11
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 7,
.x = 0,
.y = 1,
@ -1793,7 +1793,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 12
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1805,7 +1805,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 13
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = 0,
.y = 1,
@ -1817,7 +1817,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 14
.fillValue = 0x0,
.fillValue = PIXEL_FILL(0),
.fontId = 1,
.x = 32,
.y = 1,
@ -1829,7 +1829,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 2,
},
{ // 15
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1841,7 +1841,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 16
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1853,7 +1853,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 17
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1865,7 +1865,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 18
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1877,7 +1877,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 19
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1889,7 +1889,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 20
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1901,7 +1901,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 21
.fillValue = 0xEE,
.fillValue = PIXEL_FILL(0xE),
.fontId = 1,
.x = -1,
.y = 1,
@ -1913,7 +1913,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.shadowColor = 15,
},
{ // 22
.fillValue = 0x11,
.fillValue = PIXEL_FILL(0x1),
.fontId = 1,
.x = 0,
.y = 1,

View File

@ -651,7 +651,7 @@ static void PrintItemDescription(s32 listMenuId)
StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1);
desc = gStringVar4;
}
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
PrintOnWindow_Font1(1, desc, 3, 0, 0, 1, 0, 0);
}
@ -804,7 +804,7 @@ static void sub_81C5A98(u8 listMenuTaskId, u8 arg1)
static void sub_81C5AB8(u8 y, u8 arg1)
{
if (arg1 == 0xFF)
FillWindowPixelRect(0, 0, 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
FillWindowPixelRect(0, PIXEL_FILL(0), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
else
PrintOnWindow_Font1(0, gText_SelectorArrow2, 0, y, 0, 0, 0, arg1);
}
@ -911,7 +911,7 @@ static void sub_81C5D20(u8 taskId)
CopyItemName(gSpecialVar_ItemId, gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
if (gPyramidBagResources->menuActionsCount == 1)
sub_81C5EAC(sub_81C6D24(0));
@ -1048,7 +1048,7 @@ static void BagAction_UseOnField(u8 taskId)
else if (ItemId_GetFieldFunc(gSpecialVar_ItemId) != NULL)
{
sub_81C61A8();
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
schedule_bg_copy_tilemap_to_vram(0);
ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId);
}
@ -1086,7 +1086,7 @@ static void BagAction_Toss(u8 taskId)
{
CopyItemName(gSpecialVar_ItemId, gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
sub_81C6404();
gTasks[taskId].func = sub_81C64B4;
@ -1100,7 +1100,7 @@ static void sub_81C6350(u8 taskId)
CopyItemName(gSpecialVar_ItemId, gStringVar1);
ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 2);
StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
sub_81C6DAC(taskId, &sYesNoTossFuncions);
}
@ -1146,7 +1146,7 @@ static void sub_81C64B4(u8 taskId)
else if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
sub_8198070(3, 0);
ClearStdWindowAndFrameToTransparent(3, 0);
ClearWindowTilemap(3);
schedule_bg_copy_tilemap_to_vram(1);
sub_81C6350(taskId);
@ -1154,7 +1154,7 @@ static void sub_81C64B4(u8 taskId)
else if (gMain.newKeys & B_BUTTON)
{
PlaySE(SE_SELECT);
sub_8198070(3, 0);
ClearStdWindowAndFrameToTransparent(3, 0);
ClearWindowTilemap(3);
schedule_bg_copy_tilemap_to_vram(1);
DontTossItem(taskId);
@ -1168,7 +1168,7 @@ static void TossItem(u8 taskId)
CopyItemName(gSpecialVar_ItemId, gStringVar1);
ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 2);
StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
gTasks[taskId].func = sub_81C65CC;
}
@ -1265,7 +1265,7 @@ static void Task_BeginItemSwap(u8 taskId)
ListMenuSetUnkIndicatorsStructField(data[0], 0x10, 1);
CopyItemName(gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode][data[1]], gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
PrintOnWindow_Font1(1, gStringVar4, 3, 0, 0, 1, 0, 0);
sub_81C5A98(data[0], 1);
sub_81C704C(data[1]);
@ -1395,7 +1395,7 @@ static void sub_81C6BD8(void)
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
for (i = 0; i < 5; i++)
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
PutWindowTilemap(0);
PutWindowTilemap(1);
@ -1415,7 +1415,7 @@ static void PrintOnWindow_Font7(u8 windowId, const u8 *src, u8 x, u8 y, u8 lette
static void sub_81C6CEC(u8 windowId)
{
SetWindowBorderStyle(windowId, 0, 1, 0xE);
DrawStdFrameWithCustomTileAndPalette(windowId, 0, 1, 0xE);
schedule_bg_copy_tilemap_to_vram(1);
}
@ -1430,7 +1430,7 @@ static u8 sub_81C6D24(u8 windowArrayId)
if (*windowId == 0xFF)
{
*windowId = AddWindow(&gUnknown_0861F350[windowArrayId]);
SetWindowBorderStyle(*windowId, FALSE, 1, 0xE);
DrawStdFrameWithCustomTileAndPalette(*windowId, FALSE, 1, 0xE);
schedule_bg_copy_tilemap_to_vram(1);
}
return *windowId;
@ -1441,7 +1441,7 @@ static void sub_81C6D6C(u8 windowArrayId)
u8 *windowId = &gPyramidBagResources->windowIds[windowArrayId];
if (*windowId != 0xFF)
{
sub_8198070(*windowId, FALSE);
ClearStdWindowAndFrameToTransparent(*windowId, FALSE);
ClearWindowTilemap(*windowId);
RemoveWindow(*windowId);
schedule_bg_copy_tilemap_to_vram(1);
@ -1456,14 +1456,15 @@ static void sub_81C6DAC(u8 taskId, const struct YesNoFuncTable *yesNoTable)
void DisplayItemMessageInBattlePyramid(u8 taskId, const u8 *str, void (*callback)(u8 taskId))
{
FillWindowPixelBuffer(2, 0x11);
FillWindowPixelBuffer(2, PIXEL_FILL(1));
DisplayMessageAndContinueTask(taskId, 2, 0xA, 0xD, 1, GetPlayerTextSpeedDelay(), str, callback);
schedule_bg_copy_tilemap_to_vram(1);
}
static void sub_81C6E1C(void)
{
sub_8197DF8(2, FALSE);
ClearDialogWindowAndFrameToTransparent(2, FALSE);
// This ClearWindowTilemap call is redundant, since ClearDialogWindowAndFrameToTransparent already calls it.
ClearWindowTilemap(2);
schedule_bg_copy_tilemap_to_vram(1);
}

View File

@ -320,8 +320,8 @@ void ShowLinkBattleRecords(void)
s32 i, x;
gRecordsWindowId = AddWindow(&sLinkBattleRecordsWindow);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
StringExpandPlaceholders(gStringVar4, gText_PlayersBattleResults);
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
@ -342,7 +342,7 @@ void ShowLinkBattleRecords(void)
void RemoveRecordsWindow(void)
{
sub_819746C(gRecordsWindowId, FALSE);
ClearStdWindowAndFrame(gRecordsWindowId, FALSE);
RemoveWindow(gRecordsWindowId);
}
@ -383,7 +383,7 @@ static void Task_ExitTrainerHillRecords(u8 taskId)
static void RemoveTrainerHillRecordsWindow(u8 windowId)
{
FillWindowPixelBuffer(windowId, 0);
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
ClearWindowTilemap(windowId);
CopyWindowToVram(windowId, 2);
RemoveWindow(windowId);

View File

@ -297,7 +297,7 @@ static void atkD7_setyawn(void);
static void atkD8_setdamagetohealthdifference(void);
static void atkD9_scaledamagebyhealthratio(void);
static void atkDA_tryswapabilities(void);
static void atkDB_tryimprision(void);
static void atkDB_tryimprison(void);
static void atkDC_trysetgrudge(void);
static void atkDD_weightdamagecalculation(void);
static void atkDE_asistattackselect(void);
@ -549,7 +549,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atkD8_setdamagetohealthdifference,
atkD9_scaledamagebyhealthratio,
atkDA_tryswapabilities,
atkDB_tryimprision,
atkDB_tryimprison,
atkDC_trysetgrudge,
atkDD_weightdamagecalculation,
atkDE_asistattackselect,
@ -9611,7 +9611,7 @@ static void atkDA_tryswapabilities(void) // skill swap
}
}
static void atkDB_tryimprision(void)
static void atkDB_tryimprison(void)
{
if ((gStatuses3[gBattlerAttacker] & STATUS3_IMPRISONED_OTHERS))
{
@ -9622,7 +9622,7 @@ static void atkDB_tryimprision(void)
u8 battlerId, sideAttacker;
sideAttacker = GetBattlerSide(gBattlerAttacker);
PressurePPLoseOnUsingImprision(gBattlerAttacker);
PressurePPLoseOnUsingImprison(gBattlerAttacker);
for (battlerId = 0; battlerId < gBattlersCount; battlerId++)
{
if (sideAttacker != GetBattlerSide(battlerId))

View File

@ -51,7 +51,7 @@ static void AwardBattleTowerRibbons(void);
static void SaveBattleTowerProgress(void);
static void sub_8163914(void);
static void nullsub_61(void);
static void nullsub_116(void);
static void SpriteCB_Null6(void);
static void sub_81642A0(void);
static void sub_8164828(void);
static void sub_8164B74(void);
@ -1061,7 +1061,7 @@ static void (* const gUnknown_085DF96C[])(void) =
SaveBattleTowerProgress,
sub_8163914,
nullsub_61,
nullsub_116,
SpriteCB_Null6,
sub_81642A0,
sub_8164828,
sub_8164B74,
@ -2437,7 +2437,7 @@ static void nullsub_61(void)
}
static void nullsub_116(void)
static void SpriteCB_Null6(void)
{
}

View File

@ -106,10 +106,10 @@ void PressurePPLose(u8 target, u8 attacker, u16 move)
}
}
void PressurePPLoseOnUsingImprision(u8 attacker)
void PressurePPLoseOnUsingImprison(u8 attacker)
{
int i, j;
int imprisionPos = 4;
int imprisonPos = 4;
u8 atkSide = GetBattlerSide(attacker);
for (i = 0; i < gBattlersCount; i++)
@ -123,19 +123,19 @@ void PressurePPLoseOnUsingImprision(u8 attacker)
}
if (j != MAX_MON_MOVES)
{
imprisionPos = j;
imprisonPos = j;
if (gBattleMons[attacker].pp[j] != 0)
gBattleMons[attacker].pp[j]--;
}
}
}
if (imprisionPos != 4
if (imprisonPos != 4
&& !(gBattleMons[attacker].status2 & STATUS2_TRANSFORMED)
&& !(gDisableStructs[attacker].mimickedMoves & gBitTable[imprisionPos]))
&& !(gDisableStructs[attacker].mimickedMoves & gBitTable[imprisonPos]))
{
gActiveBattler = attacker;
BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + imprisionPos, 0, 1, &gBattleMons[gActiveBattler].pp[imprisionPos]);
BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + imprisonPos, 0, 1, &gBattleMons[gActiveBattler].pp[imprisonPos]);
MarkBattlerForControllerExec(gActiveBattler);
}
}
@ -224,7 +224,7 @@ bool8 WasUnableToUseMove(u8 battler)
{
if (gProtectStructs[battler].prlzImmobility
|| gProtectStructs[battler].targetNotAffected
|| gProtectStructs[battler].usedImprisionedMove
|| gProtectStructs[battler].usedImprisonedMove
|| gProtectStructs[battler].loveImmobility
|| gProtectStructs[battler].usedDisabledMove
|| gProtectStructs[battler].usedTauntedMove
@ -365,12 +365,12 @@ u8 TrySetCantSelectMoveBattleScript(void)
gCurrentMove = move;
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
{
gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisionedMoveInPalace;
gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisonedMoveInPalace;
gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1;
}
else
{
gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisionedMove;
gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisonedMove;
limitations++;
}
}
@ -438,7 +438,7 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check)
unusableMoves |= gBitTable[i];
if (gDisableStructs[battlerId].tauntTimer && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[battlerId].moves[i]].power == 0)
unusableMoves |= gBitTable[i];
if (GetImprisonedMovesCount(battlerId, gBattleMons[battlerId].moves[i]) && check & MOVE_LIMITATION_IMPRISION)
if (GetImprisonedMovesCount(battlerId, gBattleMons[battlerId].moves[i]) && check & MOVE_LIMITATION_IMPRISON)
unusableMoves |= gBitTable[i];
if (gDisableStructs[battlerId].encoreTimer && gDisableStructs[battlerId].encoredMove != gBattleMons[battlerId].moves[i])
unusableMoves |= gBitTable[i];
@ -469,7 +469,7 @@ bool8 AreAllMovesUnusable(void)
u8 GetImprisonedMovesCount(u8 battlerId, u16 move)
{
s32 i;
u8 imprisionedMoves = 0;
u8 imprisonedMoves = 0;
u8 battlerSide = GetBattlerSide(battlerId);
for (i = 0; i < gBattlersCount; i++)
@ -483,11 +483,11 @@ u8 GetImprisonedMovesCount(u8 battlerId, u16 move)
break;
}
if (j < MAX_MON_MOVES)
imprisionedMoves++;
imprisonedMoves++;
}
}
return imprisionedMoves;
return imprisonedMoves;
}
enum
@ -1466,7 +1466,7 @@ u8 AtkCanceller_UnableToUseMove(void)
case CANCELLER_IMPRISONED: // imprisoned
if (GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove))
{
gProtectStructs[gBattlerAttacker].usedImprisionedMove = 1;
gProtectStructs[gBattlerAttacker].usedImprisonedMove = 1;
CancelMultiTurnMoves(gBattlerAttacker);
gBattlescriptCurrInstr = BattleScript_MoveUsedIsImprisoned;
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
@ -1526,7 +1526,7 @@ u8 AtkCanceller_UnableToUseMove(void)
}
else
{
BattleScriptPush(BattleScript_MoveUsedIsParalyzedCantAttack);
BattleScriptPush(BattleScript_MoveUsedIsInLoveCantAttack);
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
gProtectStructs[gBattlerAttacker].loveImmobility = 1;
CancelMultiTurnMoves(gBattlerAttacker);

View File

@ -940,7 +940,7 @@ static void InitBerryBlenderWindows(void)
DeactivateAllTextPrinters();
for (i = 0; i < 5; i++)
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
sub_81978B0(0xE0);
@ -1246,7 +1246,7 @@ static void sub_8080018(void)
case 10:
if (++sBerryBlenderData->framesToWait > 20)
{
sub_8197DF8(4, TRUE);
ClearDialogWindowAndFrameToTransparent(4, TRUE);
if (GetBlockReceivedStatus() == sub_800A9D8())
{
for (i = 0; i < GetLinkPlayerCount(); i++)
@ -3320,7 +3320,7 @@ static bool8 Blender_PrintBlendingResults(void)
sBerryBlenderData->mainState++;
break;
case 5:
sub_8198070(5, 1);
ClearStdWindowAndFrameToTransparent(5, 1);
for (i = 0; i < BLENDER_MAX_PLAYERS; i++)
{
@ -3461,7 +3461,7 @@ static bool8 Blender_PrintBlendingRanking(void)
}
break;
case 3:
SetWindowBorderStyle(5, 0, 1, 0xD);
DrawStdFrameWithCustomTileAndPalette(5, 0, 1, 0xD);
xPos = GetStringCenterAlignXOffset(1, sText_Ranking, 0xA8);
Blender_AddTextPrinter(5, sText_Ranking, xPos, 1, TEXT_SPEED_FF, 0);
@ -3532,8 +3532,8 @@ void ShowBerryBlenderRecordWindow(void)
winTemplate = sBlenderRecordWindowTemplate;
gRecordsWindowId = AddWindow(&winTemplate);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, 0);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, 0);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 0x90);
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL);
@ -3642,7 +3642,7 @@ static void Blender_AddTextPrinter(u8 windowId, const u8 *string, u8 x, u8 y, s3
if (caseId != 3)
{
FillWindowPixelBuffer(windowId, txtColor[0] | (txtColor[0] << 4));
FillWindowPixelBuffer(windowId, PIXEL_FILL(txtColor[0]));
}
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, 1, txtColor, speed, string);
@ -3653,7 +3653,7 @@ static bool32 Blender_PrintText(s16 *textState, const u8 *string, s32 textSpeed)
switch (*textState)
{
case 0:
sub_8197B1C(4, FALSE, 0x14, 0xF);
DrawDialogFrameWithCustomTileAndPalette(4, FALSE, 0x14, 0xF);
Blender_AddTextPrinter(4, string, 0, 1, textSpeed, 0);
PutWindowTilemap(4);
CopyWindowToVram(4, 3);

View File

@ -226,9 +226,9 @@ static void berry_fix_gpu_set(void)
DmaCopy32(3, sUnknown_08618138, BG_PLTT + 0x1E0, 0x20);
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP);
FillWindowPixelBuffer(2, 0);
FillWindowPixelBuffer(3, 0);
FillWindowPixelBuffer(0, 0xAA);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
FillWindowPixelBuffer(3, PIXEL_FILL(0));
FillWindowPixelBuffer(0, PIXEL_FILL(0xA));
width = GetStringWidth(0, sUnknown_08617E9B, 0);
left = (0x78 - width) / 2;
@ -273,7 +273,7 @@ static int berry_fix_text_update(int checkval)
static void berry_fix_text_print(int scene)
{
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
FillWindowPixelBuffer(1, 0xAA);
FillWindowPixelBuffer(1, PIXEL_FILL(0xA));
AddTextPrinterParameterized3(1, 1, 0, 0, sUnknown_08618158, -1, gUnknown_08618160[scene]);
PutWindowTilemap(1);
CopyWindowToVram(1, 2);

View File

@ -381,7 +381,7 @@ static void PrintTextInBerryTagScreen(u8 windowId, const u8 *text, u8 x, u8 y, s
static void AddBerryTagTextToBg0(void)
{
memcpy(GetBgTilemapBuffer(0), sBerryTag->tilemapBuffers[2], sizeof(sBerryTag->tilemapBuffers[2]));
FillWindowPixelBuffer(WIN_BERRY_TAG, 0xFF);
FillWindowPixelBuffer(WIN_BERRY_TAG, PIXEL_FILL(15));
PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(1, gText_BerryTag, 0x40), 1, 0, 1);
PutWindowTilemap(WIN_BERRY_TAG);
schedule_bg_copy_tilemap_to_vram(0);
@ -598,7 +598,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
switch (data[0])
{
case 0x30:
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
break;
case 0x40:
PrintBerryNumberAndName();
@ -608,7 +608,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
CreateBerrySprite();
break;
case 0x60:
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
break;
case 0x70:
PrintBerrySize();
@ -620,7 +620,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
SetFlavorCirclesVisiblity();
break;
case 0xA0:
FillWindowPixelBuffer(2, 0);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
break;
case 0xB0:
PrintBerryDescription1();
@ -635,7 +635,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
switch (data[0])
{
case 0x30:
FillWindowPixelBuffer(2, 0);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
break;
case 0x40:
PrintBerryDescription2();
@ -647,7 +647,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
SetFlavorCirclesVisiblity();
break;
case 0x70:
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
break;
case 0x80:
PrintBerryFirmness();
@ -660,7 +660,7 @@ static void Task_DisplayAnotherBerry(u8 taskId)
CreateBerrySprite();
break;
case 0xB0:
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
break;
case 0xC0:
PrintBerryNumberAndName();

View File

@ -92,7 +92,9 @@ static void sub_80B23B0(u16 windowId, u32 value)
static void sub_80B241C(u16 windowId)
{
sub_819746C(windowId, FALSE);
// Following this call with a copy-to-vram with mode 3 is identical to
// calling ClearStdWindowAndFrame(windowId, TRUE).
ClearStdWindowAndFrame(windowId, FALSE);
CopyWindowToVram(windowId, 3);
}

View File

@ -79,7 +79,7 @@ void CB2_InitClearSaveDataScreen(void)
static void Task_DoClearSaveDataScreenYesNo(u8 taskId)
{
SetWindowBorderStyle(0, 0, 2, 14);
DrawStdFrameWithCustomTileAndPalette(0, 0, 2, 14);
AddTextPrinterParameterized(0, 1, gText_ClearAllSaveData, 0, 1, 0, 0);
CreateYesNoMenu(sClearSaveYesNo, 2, 14, 1);
gTasks[taskId].func = Task_ClearSaveDataScreenYesNoChoice;
@ -90,7 +90,7 @@ static void Task_ClearSaveDataScreenYesNoChoice(u8 taskId)
switch (Menu_ProcessInputNoWrapClearOnChoose())
{
case 0:
FillWindowPixelBuffer(0, 17);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized(0, 1, gText_ClearingData, 0, 1, 0, 0);
gTasks[taskId].func = Task_ClearSaveData;
break;
@ -203,7 +203,7 @@ static void InitClearSaveDataScreenWindows(void)
{
InitWindows(sClearSaveTextWindow);
DeactivateAllTextPrinters();
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
LoadWindowGfx(0, 0, 2, 224);
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
}

View File

@ -27,15 +27,15 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y)
struct WindowTemplate template;
SetWindowTemplateFields(&template, 0, x, y, 8, 2, 0xF, 0x141);
sCoinsWindowId = AddWindow(&template);
FillWindowPixelBuffer(sCoinsWindowId, 0);
FillWindowPixelBuffer(sCoinsWindowId, PIXEL_FILL(0));
PutWindowTilemap(sCoinsWindowId);
SetWindowBorderStyle(sCoinsWindowId, FALSE, 0x214, 0xE);
DrawStdFrameWithCustomTileAndPalette(sCoinsWindowId, FALSE, 0x214, 0xE);
PrintCoinsString(coinAmount);
}
void HideCoinsWindow(void)
{
sub_819746C(sCoinsWindowId, TRUE);
ClearStdWindowAndFrame(sCoinsWindowId, TRUE);
RemoveWindow(sCoinsWindowId);
}

View File

@ -819,7 +819,7 @@ static void sub_80D8490(u8 taskId)
}
r5 = StringCopy(r5, gMoveNames[move]);
FillWindowPixelBuffer(i + 5, 0);
FillWindowPixelBuffer(i + 5, PIXEL_FILL(0));
Contest_PrintTextToBg0WindowAt(i + 5, sp8, 5, 1, 7);
}
@ -941,7 +941,7 @@ static void sub_80D895C(u8 taskId)
for (i = 0; i < 4; i++)
{
FillWindowPixelBuffer(5 + i, 0);
FillWindowPixelBuffer(5 + i, PIXEL_FILL(0));
PutWindowTilemap(5 + i);
CopyWindowToVram(5 + i, 2);
}
@ -2258,7 +2258,7 @@ static void sub_80DAEA4(void)
for (i = 0; i < 4; i++)
{
FillWindowPixelBuffer(gUnknown_02039F26[i], 0);
FillWindowPixelBuffer(gUnknown_02039F26[i], PIXEL_FILL(0));
sub_80DAF04(i);
sub_80DAF88(i);
}
@ -2478,7 +2478,7 @@ static void prints_contest_move_description(u16 a)
ContestBG_FillBoxWithTile(0, 0x5036, 0x15, 0x20, 0x08, 0x01, 0x11);
ContestBG_FillBoxWithTile(0, 0x5014, 0x15, 0x20, numHearts, 0x01, 0x11);
FillWindowPixelBuffer(10, 0);
FillWindowPixelBuffer(10, PIXEL_FILL(0));
Contest_PrintTextToBg0WindowStd(10, gContestEffectDescriptionPointers[gContestMoves[a].effect]);
Contest_PrintTextToBg0WindowStd(9, gText_Slash);
}
@ -2621,7 +2621,7 @@ static void sub_80DB884(void)
static void sub_80DB89C(void)
{
FillWindowPixelBuffer(4, 0);
FillWindowPixelBuffer(4, PIXEL_FILL(0));
CopyWindowToVram(4, 2);
Contest_SetBgCopyFlags(0);
}
@ -3456,7 +3456,7 @@ static void sub_80DCD48(void)
break;
default:
for (i = 0; i < 4; i++)
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
for (i = 0; i < 4; i++)
{
value = sContestantStatus[i].unk4;
@ -5038,7 +5038,7 @@ static void sub_80DF750(void)
return;
for (i = 0; i < 4; i++)
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
if (gHeap[0x1A000] == 2)
{

View File

@ -935,7 +935,7 @@ static void sub_80F6AE8(void)
// windowTemplate.width = 30;
// windowTemplate.height = 2;
// windowId = AddWindow(&windowTemplate);
// FillWindowPixelBuffer(windowId, 0x11);
// FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
// origWidth = GetStringWidth(1, text, 0) + 9;
// strWidth = origWidth;
// if (strWidth < 0)

View File

@ -279,7 +279,7 @@ static void InitContestPaintingWindow(void)
SetBgTilemapBuffer(1, AllocZeroed(BG_SCREEN_SIZE));
gContestPaintingWindowId = AddWindow(&gUnknown_085B07EC);
DeactivateAllTextPrinters();
FillWindowPixelBuffer(gContestPaintingWindowId, 0);
FillWindowPixelBuffer(gContestPaintingWindowId, PIXEL_FILL(0));
PutWindowTilemap(gContestPaintingWindowId);
CopyWindowToVram(gContestPaintingWindowId, 3);
ShowBg(1);

View File

@ -1592,7 +1592,7 @@ static void sub_8175DA0(u8 taskIdB)
case 5:
if (!gPaletteFade.active)
{
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
CopyWindowToVram(0, 2);
gTasks[taskIdB].data[TDB_0] = 2;
}

View File

@ -1259,7 +1259,7 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
break;
}
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
sub_819746C(gTasks[taskId].tWindowId, TRUE);
ClearStdWindowAndFrame(gTasks[taskId].tWindowId, TRUE);
RemoveWindow(gTasks[taskId].tWindowId);
DestroyTask(taskId);
EnableBothScriptContexts();
@ -1268,7 +1268,7 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
{
gSpecialVar_Result = 2;
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
sub_819746C(gTasks[taskId].tWindowId, TRUE);
ClearStdWindowAndFrame(gTasks[taskId].tWindowId, TRUE);
RemoveWindow(gTasks[taskId].tWindowId);
DestroyTask(taskId);
EnableBothScriptContexts();
@ -1283,7 +1283,7 @@ void ShowDaycareLevelMenu(void)
u8 daycareMenuTaskId;
windowId = AddWindow(&sDaycareLevelMenuWindowTemplate);
NewMenuHelpers_DrawStdWindowFrame(windowId, FALSE);
DrawStdWindowFrame(windowId, FALSE);
menuTemplate = sDaycareListMenuLevelTemplate;
menuTemplate.windowId = windowId;

View File

@ -463,14 +463,14 @@ u8 sub_81269D4(u8 idx)
{
*winidx = AddWindow(&gUnknown_085A6B90[idx]);
}
SetWindowBorderStyle(*winidx, 0, 0x214, 0xe);
DrawStdFrameWithCustomTileAndPalette(*winidx, 0, 0x214, 0xe);
schedule_bg_copy_tilemap_to_vram(0);
return *winidx;
}
void sub_8126A58(u8 idx)
{
sub_8198070(sDecorMenuWindowIndices[idx], FALSE);
ClearStdWindowAndFrameToTransparent(sDecorMenuWindowIndices[idx], FALSE);
ClearWindowTilemap(sDecorMenuWindowIndices[idx]);
RemoveWindow(sDecorMenuWindowIndices[idx]);
schedule_bg_copy_tilemap_to_vram(0);
@ -543,7 +543,7 @@ void sub_8126B80(u8 taskId)
void sub_8126C08(void)
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, sSecretBasePCMenuItemDescriptions[sSecretBasePCMenuCursorPos], 0, 0, 2, 1, 3);
}
@ -572,7 +572,7 @@ void SecretBasePC_PutAway(u8 taskId)
else
{
sub_8126A58(0);
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
FadeScreen(1, 0);
gTasks[taskId].data[2] = 0;
gTasks[taskId].func = sub_8129ABC;
@ -617,7 +617,7 @@ void sub_8126DA4(u8 taskId)
void SecretBasePC_PrepMenuForSelectingStoredDecors(u8 taskId)
{
LoadPalette(gUnknown_085A6BB0, 0xd0, 0x20);
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
sub_8126A58(0);
sub_8126DFC(taskId);
}
@ -634,7 +634,7 @@ void sub_8126DFC(u8 taskId)
void sub_8126E44(u8 taskId)
{
FillWindowPixelBuffer(sDecorMenuWindowIndices[1], 0x11);
FillWindowPixelBuffer(sDecorMenuWindowIndices[1], PIXEL_FILL(1));
sub_8126E8C(taskId);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sDecorMenuWindowIndices[1], 9, sCurDecorationCategory);
gTasks[taskId].func = sub_8127088;
@ -751,7 +751,7 @@ void sub_81270E8(u8 taskId)
void sub_8127180(u8 taskId)
{
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
sub_8126DFC(taskId);
}
@ -771,7 +771,7 @@ void sub_81271CC(u8 taskId)
{
sub_8126A58(1);
sub_8126A88();
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
sub_8126C08();
gTasks[taskId].func = sub_8126B80;
}
@ -779,7 +779,7 @@ void sub_81271CC(u8 taskId)
void sub_8127208(u8 taskId)
{
LoadPalette(gUnknown_085A6BB0, 0xd0, 0x20);
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
gTasks[taskId].data[11] = 2;
sCurDecorationCategory = DECORCAT_DESK;
sub_8126DFC(taskId);
@ -968,7 +968,7 @@ void sub_8127744(u32 a0)
const u8 *txt;
winidx = sDecorMenuWindowIndices[3];
FillWindowPixelBuffer(winidx, 0x11);
FillWindowPixelBuffer(winidx, PIXEL_FILL(1));
if (a0 >= sCurDecorCatCount)
{
txt = gText_GoBackPrevMenu;
@ -1095,7 +1095,7 @@ void sub_8127A14(u8 taskId)
void sub_8127A30(u8 taskId)
{
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
gTasks[taskId].func = sub_8127A14;
}
@ -1103,7 +1103,7 @@ void sub_8127A5C(u8 taskId)
{
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
sub_81269D4(1);
sub_8127620(taskId);
}
@ -1628,13 +1628,13 @@ void sub_8128950(u8 taskId)
void sub_81289D0(u8 taskId)
{
DisplayYesNoMenu();
DisplayYesNoMenuDefaultYes();
DoYesNoFuncWithChoice(taskId, &gUnknown_085A72C4);
}
void sub_81289F0(u8 taskId)
{
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
sub_8128AAC(taskId);
if (gDecorations[gCurDecorInventoryItems[gCurDecorationIndex]].permission != DECORPERM_SOLID_MAT)
{
@ -1693,13 +1693,13 @@ void sub_8128AAC(u8 taskId)
void sub_8128B80(u8 taskId)
{
DisplayYesNoMenu();
DisplayYesNoMenuDefaultYes();
DoYesNoFuncWithChoice(taskId, &gUnknown_085A72CC);
}
void sub_8128BA0(u8 taskId)
{
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
sub_8128BBC(taskId);
}
@ -1887,7 +1887,7 @@ void sub_8128E18(u8 taskId)
void sub_8128FD8(u8 taskId)
{
sub_8197434(0, 1);
ClearDialogWindowAndFrame(0, 1);
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
gTasks[taskId].data[10] = 0;
gTasks[taskId].func = sub_8128E18;
@ -2251,7 +2251,7 @@ void sub_81298EC(u8 taskId)
if (!gPaletteFade.active) {
DrawWholeMapView();
ScriptContext1_SetupScript(EventScript_275D2E);
sub_8197434(0, 1);
ClearDialogWindowAndFrame(0, 1);
gTasks[taskId].data[2] = 2;
}
break;
@ -2343,7 +2343,7 @@ void sub_8129ABC(u8 taskId)
void sub_8129B34(u8 taskId)
{
sub_8197434(0, 1);
ClearDialogWindowAndFrame(0, 1);
gSprites[sDecor_CameraSpriteObjectIdx1].data[7] = 0;
gSprites[sDecor_CameraSpriteObjectIdx1].invisible = FALSE;
gSprites[sDecor_CameraSpriteObjectIdx1].callback = sub_812A36C;
@ -2588,7 +2588,7 @@ void sub_812A0E8(u8 taskId)
void sub_812A1A0(u8 taskId)
{
DisplayYesNoMenu();
DisplayYesNoMenuDefaultYes();
DoYesNoFuncWithChoice(taskId, &gUnknown_085A7348);
}
@ -2601,13 +2601,13 @@ void sub_812A1C0(u8 taskId)
void sub_812A1F0(u8 taskId)
{
DisplayYesNoMenu();
DisplayYesNoMenuDefaultYes();
DoYesNoFuncWithChoice(taskId, &gUnknown_085A7350);
}
void sub_812A210(u8 taskId)
{
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
sub_812A22C(taskId);
}
@ -2671,7 +2671,7 @@ void sub_812A334(void)
u8 taskId;
pal_fill_black();
NewMenuHelpers_DrawDialogueFrame(0, 1);
DrawDialogueFrame(0, 1);
sub_8126ABC();
taskId = CreateTask(sub_812A2C4, 8);
gTasks[taskId].data[2] = 0;
@ -2725,7 +2725,7 @@ void sub_812A3D4(u8 taskId)
void sub_812A458(u8 taskId)
{
DisplayYesNoMenu();
DisplayYesNoMenuDefaultYes();
DoYesNoFuncWithChoice(taskId, &gUnknown_085A741C);
}

View File

@ -197,7 +197,7 @@ static void InitDiplomaWindow(void)
InitWindows(sDiplomaWinTemplates);
DeactivateAllTextPrinters();
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
PutWindowTilemap(0);
}

View File

@ -3697,7 +3697,7 @@ static void sub_811CFCC(void)
return;
xOffset = GetStringCenterAlignXOffset(1, titleText, 144);
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
sub_811D058(0, 1, titleText, xOffset, 1, 0xFF, 0, 2, 3);
PutWindowTilemap(0);
CopyWindowToVram(0, 3);
@ -3767,7 +3767,7 @@ static void sub_811D104(u8 arg0)
break;
}
FillWindowPixelBuffer(1, 0x11);
FillWindowPixelBuffer(1, PIXEL_FILL(1));
if (text1)
sub_811D028(1, 1, text1, 0, 1, 0xFF, 0);
@ -3817,7 +3817,7 @@ static void sub_811D2C8(void)
if (frameId == 7)
var1 = 1;
FillWindowPixelBuffer(sUnknown_0203A11C->windowId, 0x11);
FillWindowPixelBuffer(sUnknown_0203A11C->windowId, PIXEL_FILL(1));
for (i = 0; i < numRows; i++)
{
memcpy(spC, sText_Clear17, sizeof(sText_Clear17));
@ -3957,7 +3957,7 @@ static void sub_811D684(void)
static void sub_811D698(u32 arg0)
{
sub_811DD84();
FillWindowPixelBuffer(2, 0x11);
FillWindowPixelBuffer(2, PIXEL_FILL(1));
switch (arg0)
{
case 0:
@ -4114,14 +4114,14 @@ static void sub_811D950(u8 arg0, u8 arg1)
var1 = 0;
}
FillWindowPixelRect(2, 0x11, 0, y, 224, var2);
FillWindowPixelRect(2, PIXEL_FILL(1), 0, y, 224, var2);
if (var1)
FillWindowPixelRect(2, 0x11, 0, 0, 224, var1);
FillWindowPixelRect(2, PIXEL_FILL(1), 0, 0, 224, var1);
}
static void sub_811D9B4(void)
{
FillWindowPixelBuffer(2, 0x11);
FillWindowPixelBuffer(2, PIXEL_FILL(1));
CopyWindowToVram(2, 2);
}
@ -4791,7 +4791,7 @@ static void sub_811E948(void)
template.paletteNum = 11;
template.baseBlock = 0x34;
windowId = AddWindow(&template);
FillWindowPixelBuffer(windowId, 0x11);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
for (i = 0; i < 4; i++)
{
const u8 *str = sFooterTextOptions[footerId][i];

View File

@ -606,7 +606,7 @@ static void CB2_EggHatch_1(void)
case 1:
if (!gPaletteFade.active)
{
FillWindowPixelBuffer(sEggHatchData->windowId, 0);
FillWindowPixelBuffer(sEggHatchData->windowId, PIXEL_FILL(0));
sEggHatchData->CB2_PalCounter = 0;
sEggHatchData->CB2_state++;
}
@ -857,7 +857,7 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8
static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed)
{
FillWindowPixelBuffer(windowId, 0xFF);
FillWindowPixelBuffer(windowId, PIXEL_FILL(15));
sEggHatchData->textColor[0] = 0;
sEggHatchData->textColor[1] = 5;
sEggHatchData->textColor[2] = 6;

View File

@ -33,7 +33,7 @@ static void sub_8098154(u8 taskId)
task->data[0]++;
break;
case 1:
NewMenuHelpers_DrawDialogueFrame(0, 1);
DrawDialogueFrame(0, 1);
task->data[0]++;
break;
case 2:
@ -127,7 +127,7 @@ static void textbox_auto_and_task_add(void)
void HideFieldMessageBox(void)
{
task_del_textbox();
sub_8197434(0, 1);
ClearDialogWindowAndFrame(0, 1);
sFieldMessageBoxMode = 0;
}
@ -146,7 +146,7 @@ bool8 IsFieldMessageBoxHidden(void)
void sub_8098358(void)
{
task_del_textbox();
NewMenuHelpers_DrawStdWindowFrame(0, 1);
DrawStdWindowFrame(0, 1);
sFieldMessageBoxMode = 0;
}

View File

@ -1918,7 +1918,7 @@ static bool8 Fishing9(struct Task *task)
static bool8 Fishing10(struct Task *task)
{
AlignFishingAnimationFrames();
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gText_PokemonOnHook, 1, 0, 2, 1, 3);
task->tStep++;
task->tFrameCounter = 0;
@ -1944,7 +1944,7 @@ static bool8 Fishing11(struct Task *task)
sub_8155604(gEventObjects[gPlayerAvatar.eventObjectId].fieldEffectSpriteId, 0, 0);
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
sub_8197434(0, TRUE);
ClearDialogWindowAndFrame(0, TRUE);
task->tFrameCounter++;
return FALSE;
}
@ -1966,7 +1966,7 @@ static bool8 Fishing12(struct Task *task)
{
AlignFishingAnimationFrames();
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gText_NotEvenANibble, 1, 0, 2, 1, 3);
task->tStep = FISHING_SHOW_RESULT;
return TRUE;
@ -1977,7 +1977,7 @@ static bool8 Fishing13(struct Task *task)
{
AlignFishingAnimationFrames();
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3);
task->tStep++;
return TRUE;
@ -2017,7 +2017,7 @@ static bool8 Fishing16(struct Task *task)
gPlayerAvatar.preventStep = FALSE;
ScriptContext2_Disable();
UnfreezeEventObjects();
sub_8197434(0, TRUE);
ClearDialogWindowAndFrame(0, TRUE);
sub_80ED950(0);
DestroyTask(FindTaskIdByFunc(Task_Fishing));
}

View File

@ -139,11 +139,11 @@ static void FieldUpdateRegionMap(void)
sFieldRegionMapHandler->state++;
break;
case 1:
SetWindowBorderStyle(1, 0, 0x27, 0xd);
DrawStdFrameWithCustomTileAndPalette(1, 0, 0x27, 0xd);
offset = GetStringCenterAlignXOffset(1, gText_Hoenn, 0x38);
AddTextPrinterParameterized(1, 1, gText_Hoenn, offset, 1, 0, NULL);
schedule_bg_copy_tilemap_to_vram(0);
SetWindowBorderStyle(0, 0, 0x27, 0xd);
DrawStdFrameWithCustomTileAndPalette(0, 0, 0x27, 0xd);
PrintRegionMapSecName();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
sFieldRegionMapHandler->state++;
@ -196,13 +196,13 @@ static void PrintRegionMapSecName(void)
{
if (sFieldRegionMapHandler->regionMap.iconDrawType != MAPSECTYPE_NONE)
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized(0, 1, sFieldRegionMapHandler->regionMap.mapSecName, 0, 1, 0, NULL);
schedule_bg_copy_tilemap_to_vram(0);
}
else
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
CopyWindowToVram(0, 3);
}
}

View File

@ -1860,7 +1860,7 @@ void sub_8139B60(void)
void sub_8139C10(void)
{
sub_8198070(gUnknown_0203AB5E, TRUE);
ClearStdWindowAndFrameToTransparent(gUnknown_0203AB5E, TRUE);
RemoveWindow(gUnknown_0203AB5E);
}
@ -2645,8 +2645,8 @@ static void sub_813A570(u8 taskId)
sub_813A738(taskId);
DestroyListMenuTask(task->data[14], NULL, NULL);
Free(gUnknown_0203AB64);
sub_8198070(task->data[13], 1);
FillWindowPixelBuffer(task->data[13], 0);
ClearStdWindowAndFrameToTransparent(task->data[13], 1);
FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0));
CopyWindowToVram(task->data[13], 2);
RemoveWindow(task->data[13]);
DestroyTask(taskId);
@ -2890,7 +2890,7 @@ void sub_813A958(void)
void sub_813A988(void)
{
sub_8198070(gUnknown_0203AB6D, TRUE);
ClearStdWindowAndFrameToTransparent(gUnknown_0203AB6D, TRUE);
RemoveWindow(gUnknown_0203AB6D);
}
@ -2942,7 +2942,7 @@ void sub_813AA18(void)
void sub_813AA44(void)
{
sub_8198070(gUnknown_0203AB6E, TRUE);
ClearStdWindowAndFrameToTransparent(gUnknown_0203AB6E, TRUE);
RemoveWindow(gUnknown_0203AB6E);
}
@ -3001,7 +3001,7 @@ static void sub_813AA60(u16 a0, u16 a1)
if (a0 > 2 && a0 < 7)
{
FillWindowPixelRect(0, 0x11, 0, 0, 216, 32);
FillWindowPixelRect(0, PIXEL_FILL(1), 0, 0, 216, 32);
switch (a0)
{
case 3:
@ -3140,7 +3140,7 @@ static void sub_813AD34(u8 a0, u16 a1)
if (a0 == 9 || a0 == 10)
{
FillWindowPixelRect(gUnknown_0203AB5E, 0x11, 0, 0, 96, 48);
FillWindowPixelRect(gUnknown_0203AB5E, PIXEL_FILL(1), 0, 0, 96, 48);
if (a0 == 10)
{
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gUnknown_085B3254[a1], 0, 1, 0, NULL);
@ -3154,7 +3154,7 @@ static void sub_813AD34(u8 a0, u16 a1)
void sub_813ADB8(void)
{
sub_8198070(gUnknown_0203AB5E, TRUE);
ClearStdWindowAndFrameToTransparent(gUnknown_0203AB5E, TRUE);
RemoveWindow(gUnknown_0203AB5E);
}
@ -3226,8 +3226,8 @@ void sub_813AF48(void)
struct Task *task = &gTasks[taskId];
DestroyListMenuTask(task->data[14], NULL, NULL);
Free(gUnknown_0203AB64);
sub_8198070(task->data[13], TRUE);
FillWindowPixelBuffer(task->data[13], 0);
ClearStdWindowAndFrameToTransparent(task->data[13], TRUE);
FillWindowPixelBuffer(task->data[13], PIXEL_FILL(0));
ClearWindowTilemap(task->data[13]);
CopyWindowToVram(task->data[13], 2);
RemoveWindow(task->data[13]);

View File

@ -86,7 +86,7 @@ static void sub_8161724(u8 taskId)
sub_81B0FCC(gUnknown_0203CEC8.unk9, 0);
gUnknown_0203CEC8.unk9 = gUnknown_0203CEC8.unkA;
sub_81B0FCC(gUnknown_0203CEC8.unkA, 1);
sub_8198070(0x6, FALSE);
ClearStdWindowAndFrameToTransparent(0x6, FALSE);
ClearWindowTilemap(0x6);
display_pokemon_menu_message(0);
gTasks[taskId].func = sub_81B1370;

File diff suppressed because it is too large Load Diff

View File

@ -1090,7 +1090,7 @@ static void ShowAndPrintWindows(void)
for (i = 0; i < WINDOW_COUNT; i++)
{
PutWindowTilemap(i);
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
}
x = GetStringCenterAlignXOffset(1, gText_SymbolsEarned, 96);
@ -1116,7 +1116,7 @@ static void ShowAndPrintWindows(void)
static void PrintAreaDescription(u8 cursorArea)
{
FillWindowPixelBuffer(WINDOW_DESCRIPTION, 0);
FillWindowPixelBuffer(WINDOW_DESCRIPTION, PIXEL_FILL(0));
if (cursorArea == CURSOR_AREA_RECORD && !sPassData->hasBattleRecord)
AddTextPrinterParameterized3(WINDOW_DESCRIPTION, 1, 2, 0, sTextColors[1], 0, sPassAreaDescriptions[0]);
else if (cursorArea != CURSOR_AREA_NOTHING)
@ -1656,7 +1656,7 @@ static void PrintOnFrontierMap(void)
for (i = 0; i < MAP_WINDOW_COUNT; i++)
{
PutWindowTilemap(i);
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
}
for (i = 0; i < NUM_FRONTIER_FACILITIES; i++)
@ -1698,7 +1698,7 @@ static void HandleFrontierMapCursorMove(u8 direction)
StartSpriteAnim(sMapData->mapIndicatorSprite, sMapLandmarks[sMapData->cursorPos].animNum);
sMapData->mapIndicatorSprite->pos1.x = sMapLandmarks[sMapData->cursorPos].x;
sMapData->mapIndicatorSprite->pos1.y = sMapLandmarks[sMapData->cursorPos].y;
FillWindowPixelBuffer(MAP_WINDOW_DESCRIPTION, 0);
FillWindowPixelBuffer(MAP_WINDOW_DESCRIPTION, PIXEL_FILL(0));
AddTextPrinterParameterized3(MAP_WINDOW_DESCRIPTION, 1, 4, 0, sTextColors[0], 0, sMapLandmarks[sMapData->cursorPos].description);
for (i = 0; i < 3; i++)

View File

@ -1044,8 +1044,8 @@ static void TowerPrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x
static void ShowTowerResultsWindow(u8 battleMode)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
if (battleMode == FRONTIER_MODE_SINGLES)
StringExpandPlaceholders(gStringVar4, gText_SingleBattleRoomResults);
else if (battleMode == FRONTIER_MODE_DOUBLES)
@ -1115,8 +1115,8 @@ static void DomePrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8 x2
static void ShowDomeResultsWindow(u8 battleMode)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
if (battleMode == FRONTIER_MODE_SINGLES)
StringExpandPlaceholders(gStringVar4, gText_SingleBattleTourneyResults);
else
@ -1191,8 +1191,8 @@ static void PalacePrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8
static void ShowPalaceResultsWindow(u8 battleMode)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
if (battleMode == FRONTIER_MODE_SINGLES)
StringExpandPlaceholders(gStringVar4, gText_SingleBattleHallResults);
else
@ -1247,8 +1247,8 @@ static void PikePrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
static void ShowPikeResultsWindow(void)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
StringExpandPlaceholders(gStringVar4, gText_BattleChoiceResults);
PrintAligned(gStringVar4, 0);
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 33, TEXT_SPEED_FF, NULL);
@ -1309,8 +1309,8 @@ static void ArenaPrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
static void ShowArenaResultsWindow(void)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
PrintHyphens(10);
StringExpandPlaceholders(gStringVar4, gText_SetKOTourneyResults);
PrintAligned(gStringVar4, 2);
@ -1395,8 +1395,8 @@ static void FactoryPrintPrevOrCurrentStreak(u8 battleMode, u8 lvlMode, u8 x1, u8
static void ShowFactoryResultsWindow(u8 battleMode)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
if (battleMode == FRONTIER_MODE_SINGLES)
StringExpandPlaceholders(gStringVar4, gText_BattleSwapSingleResults);
else
@ -1460,8 +1460,8 @@ static void PyramidPrintPrevOrCurrentStreak(u8 lvlMode, u8 x1, u8 x2, u8 y)
static void ShowPyramidResultsWindow(void)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C74);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
StringExpandPlaceholders(gStringVar4, gText_BattleQuestResults);
PrintAligned(gStringVar4, 2);
AddTextPrinterParameterized(gRecordsWindowId, 1, gText_Lv502, 8, 49, TEXT_SPEED_FF, NULL);
@ -1483,8 +1483,8 @@ static void ShowLinkContestResultsWindow(void)
s32 x;
gRecordsWindowId = AddWindow(&gUnknown_08611C7C);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
StringExpandPlaceholders(gStringVar4, gText_LinkContestResults);
x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
@ -2353,8 +2353,8 @@ static void PrintHallRecords(s32 hallFacilityId, s32 lvlMode)
void ShowRankingHallRecordsWindow(void)
{
gRecordsWindowId = AddWindow(&gUnknown_08611C84);
NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
DrawStdWindowFrame(gRecordsWindowId, FALSE);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_50);
PutWindowTilemap(gRecordsWindowId);
CopyWindowToVram(gRecordsWindowId, 3);
@ -2362,7 +2362,7 @@ void ShowRankingHallRecordsWindow(void)
void ScrollRankingHallRecordsWindow(void)
{
FillWindowPixelBuffer(gRecordsWindowId, 0x11);
FillWindowPixelBuffer(gRecordsWindowId, PIXEL_FILL(1));
PrintHallRecords(gSpecialVar_0x8005, FRONTIER_LVL_OPEN);
CopyWindowToVram(gRecordsWindowId, 2);
}

View File

@ -490,7 +490,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId)
}
*lastSavedTeam = *sHofMonPtr;
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized2(0, 1, gText_SavingDontTurnOffPower, 0, NULL, 2, 1, 3);
CopyWindowToVram(0, 3);
gTasks[taskId].func = Task_Hof_TrySaveData;
@ -570,7 +570,7 @@ static void Task_Hof_DisplayMon(u8 taskId)
gSprites[spriteId].tSpecies = currMon->species;
gSprites[spriteId].callback = SpriteCB_GetOnScreenAndAnimate;
gTasks[taskId].tMonSpriteId(currMonId) = spriteId;
sub_8197434(0, TRUE);
ClearDialogWindowAndFrame(0, TRUE);
gTasks[taskId].func = Task_Hof_PrintMonInfoAfterAnimating;
}
@ -649,7 +649,7 @@ static void sub_8173DC0(u8 taskId)
gSprites[gTasks[taskId].tMonSpriteId(i)].oam.priority = 1;
}
BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, RGB(16, 29, 24));
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
CopyWindowToVram(0, 3);
gTasks[taskId].tFrameCount = 7;
gTasks[taskId].func = sub_8173EA4;
@ -697,7 +697,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId)
{
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
HallOfFame_PrintPlayerInfo(1, 2);
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized2(0, 1, gText_LeagueChamp, 0, NULL, 2, 1, 3);
CopyWindowToVram(0, 3);
gTasks[taskId].func = Task_Hof_ExitOnKeyPressed;
@ -1066,7 +1066,7 @@ static void Task_HofPC_HandleExit(u8 taskId)
static void Task_HofPC_PrintDataIsCorrupted(u8 taskId)
{
sub_8198180(gText_UnkCtrlF800Exit, 8, TRUE);
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized2(0, 1, gText_HOFCorrupted, 0, NULL, 2, 1, 3);
CopyWindowToVram(0, 3);
gTasks[taskId].func = Task_HofPC_ExitOnButtonPress;
@ -1086,7 +1086,7 @@ static void Task_HofPC_ExitOnButtonPress(u8 taskId)
static void HallOfFame_PrintWelcomeText(u8 unusedPossiblyWindowId, u8 unused2)
{
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
PutWindowTilemap(0);
AddTextPrinterParameterized3(0, 1, GetStringCenterAlignXOffset(1, gText_WelcomeToHOF, 0xD0), 1, sUnknown_085E5388, 0, gText_WelcomeToHOF);
CopyWindowToVram(0, 3);
@ -1099,7 +1099,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u
s32 dexNumber;
s32 width;
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
PutWindowTilemap(0);
// dex number
@ -1180,9 +1180,9 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2)
u32 width;
u16 trainerId;
FillWindowPixelBuffer(1, 0x11);
FillWindowPixelBuffer(1, PIXEL_FILL(1));
PutWindowTilemap(1);
SetWindowBorderStyle(1, FALSE, 0x21D, 0xD);
DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x21D, 0xD);
AddTextPrinterParameterized3(1, 1, 0, 1, sUnknown_085E538C, -1, gText_Name);
width = GetStringRightAlignXOffset(1, gSaveBlock2Ptr->playerName, 0x70);

View File

@ -884,7 +884,7 @@ void bag_menu_print_description_box_text(int a)
StringExpandPlaceholders(gStringVar4, gText_ReturnToVar1);
str = gStringVar4;
}
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
bag_menu_print(1, 1, str, 3, 1, 0, 0, 0, 0);
}
@ -896,7 +896,7 @@ void bag_menu_print_cursor_(u8 a, u8 b)
void bag_menu_print_cursor(u8 a, u8 b)
{
if (b == 0xFF)
FillWindowPixelRect(0, 0, 0, a, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
FillWindowPixelRect(0, PIXEL_FILL(0), 0, a, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
else
bag_menu_print(0, 1, gText_SelectorArrow2, 0, a, 0, 0, 0, b);
@ -1028,7 +1028,7 @@ void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u
s16* data = gTasks[taskId].data;
data[10] = AddItemMessageWindow(4);
FillWindowPixelBuffer(data[10], 17);
FillWindowPixelBuffer(data[10], PIXEL_FILL(1));
DisplayMessageAndContinueTask(taskId, data[10], 10, 13, fontId, GetPlayerTextSpeedDelay(), str, callback);
schedule_bg_copy_tilemap_to_vram(1);
}
@ -1293,7 +1293,7 @@ void bag_menu_swap_items(u8 taskId)
gUnknown_0203CE54->unk81A = data[1];
CopyItemName(BagGetItemIdByPocketPosition(gUnknown_0203CE58.pocket + 1, data[1]), gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_MoveVar1Where);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
sub_80D4FEC(data[1]);
sub_81AB89C();
@ -1505,7 +1505,7 @@ void sub_81AC644(u8 unused)
{
CopyItemName(gSpecialVar_ItemId, gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
}
if (gUnknown_0203CE54->unk828 == 1)
@ -1646,7 +1646,7 @@ void ItemMenu_UseOutOfBattle(u8 taskId)
bag_menu_print_there_is_no_pokemon(taskId);
else
{
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
schedule_bg_copy_tilemap_to_vram(0);
if (gUnknown_0203CE58.pocket != BERRIES_POCKET)
ItemId_GetFieldFunc(gSpecialVar_ItemId)(taskId);
@ -1670,7 +1670,7 @@ void ItemMenu_Toss(u8 taskId)
{
CopyItemName(gSpecialVar_ItemId, gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_TossHowManyVar1s);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
sub_81ABC3C(7);
gTasks[taskId].func = Task_ChooseHowManyToToss;
@ -1684,7 +1684,7 @@ void BagMenuConfirmToss(u8 taskId)
CopyItemName(gSpecialVar_ItemId, gStringVar1);
ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3);
StringExpandPlaceholders(gStringVar4, gText_ConfirmTossItems);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
bag_menu_yes_no(taskId, 5, &gUnknown_08614084);
}
@ -1727,7 +1727,7 @@ void BagMenuActuallyToss(u8 taskId)
CopyItemName(gSpecialVar_ItemId, gStringVar1);
ConvertIntToDecimalStringN(gStringVar2, data[8], 0, 3);
StringExpandPlaceholders(gStringVar4, gText_ThrewAwayVar2Var1s);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
gTasks[taskId].func = Task_ActuallyToss;
}
@ -2043,7 +2043,7 @@ void display_deposit_item_ask_str(u8 taskId)
{
CopyItemName(gSpecialVar_ItemId, gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_DepositHowManyVar1);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
bag_menu_print(1, 1, gStringVar4, 3, 1, 0, 0, 0, 0);
sub_81ABC3C(7);
gTasks[taskId].func = sub_81ADA7C;
@ -2078,7 +2078,7 @@ void sub_81ADB14(u8 taskId)
{
s16* data = gTasks[taskId].data;
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
if (ItemId_GetImportance(gSpecialVar_ItemId))
{
bag_menu_print(1, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, 0);
@ -2244,7 +2244,7 @@ void bag_menu_print_pocket_names(const u8 *pocketName1, const u8 *pocketName2)
window.width = 16;
window.height = 2;
windowId = AddWindow(&window);
FillWindowPixelBuffer(windowId, 0);
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
offset = GetStringCenterAlignXOffset(1, pocketName1, 0x40);
bag_menu_print(windowId, 1, pocketName1, offset, 1, 0, 0, -1, 1);
if (pocketName2)
@ -2283,7 +2283,7 @@ void setup_bag_menu_textboxes(void)
LoadPalette(&gUnknown_0860F074, 0xF0, 0x20);
for (i = 0; i < 3; i++)
{
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
PutWindowTilemap(i);
}
schedule_bg_copy_tilemap_to_vram(0);
@ -2306,7 +2306,7 @@ u8 bag_menu_add_window(u8 a)
if (*ptr == 0xFF)
{
*ptr = AddWindow(&gUnknown_086141AC[a]);
SetWindowBorderStyle(*ptr, 0, 1, 14);
DrawStdFrameWithCustomTileAndPalette(*ptr, 0, 1, 14);
schedule_bg_copy_tilemap_to_vram(1);
}
return *ptr;
@ -2317,7 +2317,7 @@ void bag_menu_remove_window(u8 a)
u8 *ptr = &gUnknown_0203CE54->windowPointers[a];
if (*ptr != 0xFF)
{
sub_8198070(*ptr, 0);
ClearStdWindowAndFrameToTransparent(*ptr, 0);
ClearWindowTilemap(*ptr);
RemoveWindow(*ptr);
schedule_bg_copy_tilemap_to_vram(1);
@ -2338,7 +2338,8 @@ void bag_menu_RemoveBagItem_message_window(u8 a)
u8 *ptr = &gUnknown_0203CE54->windowPointers[a];
if (*ptr != 0xFF)
{
sub_8197DF8(*ptr, 0);
ClearDialogWindowAndFrameToTransparent(*ptr, FALSE);
// This ClearWindowTilemap call is redundant, since ClearDialogWindowAndFrameToTransparent already calls it.
ClearWindowTilemap(*ptr);
RemoveWindow(*ptr);
schedule_bg_copy_tilemap_to_vram(1);
@ -2366,7 +2367,7 @@ void bag_menu_remove_money_window(void)
void bag_menu_prepare_tmhm_move_window(void)
{
FillWindowPixelBuffer(3, 0);
FillWindowPixelBuffer(3, PIXEL_FILL(0));
blit_move_info_icon(3, 19, 0, 0);
blit_move_info_icon(3, 20, 0, 12);
blit_move_info_icon(3, 21, 0, 24);
@ -2380,7 +2381,7 @@ void PrintTMHMMoveData(u16 itemId)
u16 moveId;
const u8* text;
FillWindowPixelBuffer(4, 0);
FillWindowPixelBuffer(4, PIXEL_FILL(0));
if (itemId == ITEM_NONE)
{
for (i = 0; i < 4; i++)

View File

@ -188,7 +188,7 @@ void DisplayCannotDismountBikeMessage(u8 taskId, bool8 isUsingRegisteredKeyItemO
void CleanUpAfterFailingToUseRegisteredKeyItemOnField(u8 taskId)
{
sub_8197434(0, 1);
ClearDialogWindowAndFrame(0, 1);
DestroyTask(taskId);
ScriptUnfreezeEventObjects();
ScriptContext2_Disable();
@ -350,7 +350,7 @@ void sub_80FD504(u8 taskId)
void sub_80FD5CC(u8 taskId)
{
sub_8197434(0, 1);
ClearDialogWindowAndFrame(0, 1);
ScriptUnfreezeEventObjects();
ScriptContext2_Disable();
DestroyTask(taskId);

View File

@ -1685,8 +1685,8 @@ static void sub_800B080(void)
CopyToBgTilemapBuffer(1, gWirelessLinkDisplayTilemap, 0, 0);
CopyBgTilemapBufferToVram(1);
LoadPalette(gWirelessLinkDisplayPal, 0, 0x20);
FillWindowPixelBuffer(0, 0x00);
FillWindowPixelBuffer(2, 0x00);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
FillWindowPixelBuffer(2, PIXEL_FILL(0));
AddTextPrinterParameterized3(0, 3, 2, 6, gUnknown_082ED224, 0, gText_CommErrorEllipsis);
AddTextPrinterParameterized3(2, 3, 2, 1, gUnknown_082ED224, 0, gText_MoveCloserToLinkPartner);
PutWindowTilemap(0);
@ -1698,8 +1698,8 @@ static void sub_800B080(void)
static void sub_800B138(void)
{
LoadBgTiles(0, g2BlankTilesGfx, 0x20, 0);
FillWindowPixelBuffer(1, 0x00);
FillWindowPixelBuffer(2, 0x00);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
FillWindowPixelBuffer(2, PIXEL_FILL(0));
AddTextPrinterParameterized3(1, 3, 2, 0, gUnknown_082ED224, 0, gText_CommErrorCheckConnections);
PutWindowTilemap(1);
PutWindowTilemap(2);

View File

@ -355,11 +355,11 @@ s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenu
switch (arg2)
{
case 0: // can never be reached, because of the if statement above
sub_819746C(sMysteryGiftLinkMenu.windowId, FALSE);
ClearStdWindowAndFrame(sMysteryGiftLinkMenu.windowId, FALSE);
break;
case 2:
case 1:
sub_819746C(sMysteryGiftLinkMenu.windowId, FALSE);
ClearStdWindowAndFrame(sMysteryGiftLinkMenu.windowId, FALSE);
break;
}
}
@ -486,7 +486,7 @@ void RedrawListMenu(u8 listTaskId)
{
struct ListMenu *list = (void*) gTasks[listTaskId].data;
FillWindowPixelBuffer(list->template.windowId, (list->template.fillValue << 4) | (list->template.fillValue));
FillWindowPixelBuffer(list->template.windowId, PIXEL_FILL(list->template.fillValue));
ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed);
ListMenuDrawCursor(list);
CopyWindowToVram(list->template.windowId, 2);
@ -584,7 +584,7 @@ static u8 ListMenuInitInternal(struct ListMenuTemplate *listMenuTemplate, u16 sc
if (list->template.totalItems < list->template.maxShowed)
list->template.maxShowed = list->template.totalItems;
FillWindowPixelBuffer(list->template.windowId, (list->template.fillValue << 4) | (list->template.fillValue));
FillWindowPixelBuffer(list->template.windowId, PIXEL_FILL(list->template.fillValue));
ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed);
ListMenuDrawCursor(list);
ListMenuCallSelectionChangedCallback(list, TRUE);
@ -698,7 +698,7 @@ static void ListMenuErasePrintedCursor(struct ListMenu *list, u16 selectedRow)
u8 width = GetMenuCursorDimensionByFont(list->template.fontId, 0);
u8 height = GetMenuCursorDimensionByFont(list->template.fontId, 1);
FillWindowPixelRect(list->template.windowId,
(list->template.fillValue << 4) | (list->template.fillValue),
PIXEL_FILL(list->template.fillValue),
list->template.cursor_X,
selectedRow * yMultiplier + list->template.upText_Y,
width,
@ -795,7 +795,7 @@ static void ListMenuScroll(struct ListMenu *list, u8 count, bool8 movingDown)
{
if (count >= list->template.maxShowed)
{
FillWindowPixelBuffer(list->template.windowId, (list->template.fillValue << 4) | (list->template.fillValue));
FillWindowPixelBuffer(list->template.windowId, PIXEL_FILL(list->template.fillValue));
ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed);
}
else
@ -806,26 +806,26 @@ static void ListMenuScroll(struct ListMenu *list, u8 count, bool8 movingDown)
{
u16 y, width, height;
ScrollWindow(list->template.windowId, 1, count * yMultiplier, (list->template.fillValue << 4) | (list->template.fillValue));
ScrollWindow(list->template.windowId, 1, count * yMultiplier, PIXEL_FILL(list->template.fillValue));
ListMenuPrintEntries(list, list->scrollOffset, 0, count);
y = (list->template.maxShowed * yMultiplier) + list->template.upText_Y;
width = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8;
height = (GetWindowAttribute(list->template.windowId, WINDOW_HEIGHT) * 8) - y;
FillWindowPixelRect(list->template.windowId,
(list->template.fillValue << 4) | (list->template.fillValue),
PIXEL_FILL(list->template.fillValue),
0, y, width, height);
}
else
{
u16 width;
ScrollWindow(list->template.windowId, 0, count * yMultiplier, (list->template.fillValue << 4) | (list->template.fillValue));
ScrollWindow(list->template.windowId, 0, count * yMultiplier, PIXEL_FILL(list->template.fillValue));
ListMenuPrintEntries(list, list->scrollOffset + (list->template.maxShowed - count), list->template.maxShowed - count, count);
width = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8;
FillWindowPixelRect(list->template.windowId,
(list->template.fillValue << 4) | (list->template.fillValue),
PIXEL_FILL(list->template.fillValue),
0, 0, width, list->template.upText_Y);
}
}

View File

@ -477,8 +477,8 @@ static void sub_8121B1C(void)
y = 0;
PutWindowTilemap(0);
PutWindowTilemap(1);
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
FillWindowPixelBuffer(1, PIXEL_FILL(0));
for (i = 0; i < sMailRead->layout->numSubStructs; i ++)
{
if (sMailRead->strbuf[i][0] == EOS || sMailRead->strbuf[i][0] == CHAR_SPACE)

View File

@ -39,6 +39,135 @@
#include "title_screen.h"
#include "window.h"
/*
* Main menu state machine
* -----------------------
*
* Entry point: CB2_InitMainMenu
*
* Note: States advance sequentially unless otherwise stated.
*
* CB2_InitMainMenu / CB2_ReinitMainMenu
* - Both of these states call InitMainMenu, which does all the work.
* - In the Reinit case, the init code will check if the user came from
* the options screen. If they did, then the options menu item is
* pre-selected.
*
* Task_MainMenuCheckSaveFile
* - Determines how many menu options to show based on whether
* the save file is Ok, empty, corrupted, etc.
* - If there was an error loading the save file, advance to
* Task_WaitForSaveFileErrorWindow.
* - If there were no errors, advance to Task_MainMenuCheckBattery.
* - Note that the check to enable Mystery Events would normally happen
* here, but this version of Emerald has them disabled.
*
* Task_WaitForSaveFileErrorWindow
* - Wait for the text to finish printing and then for the A button
* to be pressed.
*
* Task_MainMenuCheckBattery
* - If the battery is OK, advance to Task_DisplayMainMenu.
* - If the battery is dry, advance to Task_WaitForBatteryDryErrorWindow.
*
* Task_WaitForBatteryDryErrorWindow
* - Wait for the text to finish printing and then for the A button
* to be pressed.
*
* Task_DisplayMainWindow
* - Display the buttons to the user. If the menu is in HAS_MYSTERY_EVENTS
* mode, there are too many buttons for one screen and a scrollbar is added,
* and the scrollbar task is spawned (Task_ScrollIndicatorArrowPairOnMainMenu).
*
* Task_HighlightSelectedMainMenuItem
* - Update the UI to match the currently selected item.
*
* Task_HandleMainMenuInput
* - If A is pressed, advance to Task_HandleMainMenuAPressed.
* - If B is pressed, return to the title screen via CB2_InitTitleScreen.
* - If Up or Down is pressed, handle scrolling if there is a scroll bar, change
* the selection, then go back to Task_HighlightSelectedMainMenuItem.
*
* Task_HandleMainMenuAPressed
* - If the user selected New Game, advance to Task_NewGameBirchSpeech_Init.
* - If the user selected Continue, advance to CB2_ContinueSavedGame.
* - If the user selected the Options menu, advance to CB2_InitOptionMenu.
* - If the user selected Mystery Gift, advance to CB2_MysteryGift. However,
* if the wireless adapter was removed, instead advance to
* Task_DisplayMainMenuInvalidActionError.
* - Code to start a Mystery Event is present here, but is unreachable in this
* version.
*
* Task_HandleMainMenuBPressed
* - Clean up the main menu and go back to CB2_InitTitleScreen.
*
* Task_DisplayMainMenuInvalidActionError
* - Print one of three different error messages, wait for the text to stop
* printing, and then wait for A or B to be pressed.
* - Then advance to Task_HandleMainMenuBPressed.
*
* Task_NewGameBirchSpeechInit
* - Load the sprites for the intro speech, start playing music
* Task_NewGameBirchSpeech_WaitToShowBirch
* - Spawn Task_NewGameBirchSpeech_FadeInTarget1OutTarget2
* - Spawn Task_NewGameBirchSpeech_FadePlatformOut
* - Both of these tasks destroy themselves when done.
* Task_NewGameBirchSpeech_WaitForSpriteFadeInWelcome
* Task_NewGameBirchSpeech_ThisIsAPokemon
* - When the text is done printing, spawns Task_NewGameBirchSpeechSub_InitPokeball
* Task_NewGameBirchSpeech_MainSpeech
* Task_NewGameBirchSpeech_AndYouAre
* Task_NewGameBirchSpeech_StartBirchLotadPlatformFade
* Task_NewGameBirchSpeech_StartBirchLotadPlatformFade
* Task_NewGameBirchSpeech_SlidePlatformAway
* Task_NewGameBirchSpeech_StartPlayerFadeIn
* Task_NewGameBirchSpeech_WaitForPlayerFadeIn
* Task_NewGameBirchSpeech_BoyOrGirl
* Task_NewGameBirchSpeech_WaitToShowGenderMenu
* Task_NewGameBirchSpeech_ChooseGender
* - Animates by advancing to Task_NewGameBirchSpeech_SlideOutOldGenderSprite
* whenever the player's selection changes.
* - Advances to Task_NewGameBirchSpeech_WhatsYourName when done.
*
* Task_NewGameBirchSpeech_SlideOutOldGenderSprite
* Task_NewGameBirchSpeech_SlideInNewGenderSprite
* - Returns back to Task_NewGameBirchSpeech_ChooseGender.
*
* Task_NewGameBirchSpeech_WhatsYourName
* Task_NewGameBirchSpeech_WaitForWhatsYourNameToPrint
* Task_NewGameBirchSpeech_WaitPressBeforeNameChoice
* Task_NewGameBirchSpeech_StartNamingScreen
* C2_NamingScreen
* - Returns to CB2_NewGameBirchSpeech_ReturnFromNamingScreen when done
* CB2_NewGameBirchSpeech_ReturnFromNamingScreen
* Task_NewGameBirchSpeech_ReturnFromNamingScreenShowTextbox
* Task_NewGameBirchSpeech_SoItsPlayerName
* Task_NewGameBirchSpeech_CreateNameYesNo
* Task_NewGameBirchSpeech_ProcessNameYesNoMenu
* - If confirmed, advance to Task_NewGameBirchSpeech_SlidePlatformAway2.
* - Otherwise, return to Task_NewGameBirchSpeech_BoyOrGirl.
*
* Task_NewGameBirchSpeech_SlidePlatformAway2
* Task_NewGameBirchSpeech_ReshowBirchLotad
* Task_NewGameBirchSpeech_WaitForSpriteFadeInAndTextPrinter
* Task_NewGameBirchSpeech_AreYouReady
* Task_NewGameBirchSpeech_ShrinkPlayer
* Task_NewGameBirchSpeech_WaitForPlayerShrink
* Task_NewGameBirchSpeech_FadePlayerToWhite
* Task_NewGameBirchSpeech_Cleanup
* - Advances to CB2_NewGame.
*
* Task_NewGameBirchSpeechSub_InitPokeball
* - Advances to Task_NewGameBirchSpeechSub_WaitForLotad
* Task_NewGameBirchSpeechSub_WaitForLotad
* - Destroys itself when done.
*/
// These two defines are used with the sCurrItemAndOptionsMenuCheck,
// to distinguish between its two parts.
#define OPTION_MENU_FLAG 0x8000
#define CURRENT_ITEM_MASK 0x7FFF
// Static type declarations
// Static RAM declarations
@ -112,7 +241,7 @@ static void SpriteCB_MovePlayerDownWhileShrinking(struct Sprite*);
static void Task_NewGameBirchSpeech_WaitForPlayerShrink(u8);
static void Task_NewGameBirchSpeech_FadePlayerToWhite(u8);
static void Task_NewGameBirchSpeech_Cleanup(u8);
static void nullsub_11();
static void SpriteCB_Null();
static void Task_NewGameBirchSpeech_ReturnFromNamingScreenShowTextbox(u8);
static void MainMenu_FormatSavegamePlayer(void);
static void MainMenu_FormatSavegamePokedex(void);
@ -247,7 +376,7 @@ static const struct WindowTemplate sWindowTemplates_MainMenu[] =
DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate gUnknown_082FF080[] =
static const struct WindowTemplate gNewGameBirchSpeechTextWindows[] =
{
{
.bg = 0,
@ -542,7 +671,7 @@ static void Task_MainMenuCheckSaveFile(u8 taskId)
gTasks[taskId].func = Task_WaitForSaveFileErrorWindow;
break;
}
if (sCurrItemAndOptionMenuCheck & 0x8000) // are we returning from the options menu?
if (sCurrItemAndOptionMenuCheck & OPTION_MENU_FLAG) // are we returning from the options menu?
{
switch (tMenuType) // if so, highlight the OPTIONS item
{
@ -558,7 +687,7 @@ static void Task_MainMenuCheckSaveFile(u8 taskId)
break;
}
}
sCurrItemAndOptionMenuCheck &= 0x7FFF; // turn off the "returning from options menu" flag
sCurrItemAndOptionMenuCheck &= CURRENT_ITEM_MASK; // turn off the "returning from options menu" flag
tCurrItem = sCurrItemAndOptionMenuCheck;
tItemCount = tMenuType + 2;
}
@ -637,6 +766,8 @@ static void Task_DisplayMainMenu(u8 taskId)
palette = RGB(26, 26, 25);
LoadPalette(&palette, 252, 2);
// Note: If there is no save file, the save block is zeroed out,
// so the default gender is MALE.
if (gSaveBlock2Ptr->playerGender == MALE)
{
palette = RGB(4, 16, 31);
@ -652,8 +783,8 @@ static void Task_DisplayMainMenu(u8 taskId)
{
case HAS_NO_SAVED_GAME:
default:
FillWindowPixelBuffer(0, 0xAA);
FillWindowPixelBuffer(1, 0xAA);
FillWindowPixelBuffer(0, PIXEL_FILL(0xA));
FillWindowPixelBuffer(1, PIXEL_FILL(0xA));
AddTextPrinterParameterized3(0, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
AddTextPrinterParameterized3(1, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
PutWindowTilemap(0);
@ -664,9 +795,9 @@ static void Task_DisplayMainMenu(u8 taskId)
DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[1], MAIN_MENU_BORDER_TILE);
break;
case HAS_SAVED_GAME:
FillWindowPixelBuffer(2, 0xAA);
FillWindowPixelBuffer(3, 0xAA);
FillWindowPixelBuffer(4, 0xAA);
FillWindowPixelBuffer(2, PIXEL_FILL(0xA));
FillWindowPixelBuffer(3, PIXEL_FILL(0xA));
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuOption);
@ -682,10 +813,10 @@ static void Task_DisplayMainMenu(u8 taskId)
DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[4], MAIN_MENU_BORDER_TILE);
break;
case HAS_MYSTERY_GIFT:
FillWindowPixelBuffer(2, 0xAA);
FillWindowPixelBuffer(3, 0xAA);
FillWindowPixelBuffer(4, 0xAA);
FillWindowPixelBuffer(5, 0xAA);
FillWindowPixelBuffer(2, PIXEL_FILL(0xA));
FillWindowPixelBuffer(3, PIXEL_FILL(0xA));
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
FillWindowPixelBuffer(5, PIXEL_FILL(0xA));
AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift);
@ -705,11 +836,11 @@ static void Task_DisplayMainMenu(u8 taskId)
DrawMainMenuWindowBorder(&sWindowTemplates_MainMenu[5], MAIN_MENU_BORDER_TILE);
break;
case HAS_MYSTERY_EVENTS:
FillWindowPixelBuffer(2, 0xAA);
FillWindowPixelBuffer(3, 0xAA);
FillWindowPixelBuffer(4, 0xAA);
FillWindowPixelBuffer(5, 0xAA);
FillWindowPixelBuffer(6, 0xAA);
FillWindowPixelBuffer(2, PIXEL_FILL(0xA));
FillWindowPixelBuffer(3, PIXEL_FILL(0xA));
FillWindowPixelBuffer(4, PIXEL_FILL(0xA));
FillWindowPixelBuffer(5, PIXEL_FILL(0xA));
FillWindowPixelBuffer(6, PIXEL_FILL(0xA));
AddTextPrinterParameterized3(2, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuContinue);
AddTextPrinterParameterized3(3, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuNewGame);
AddTextPrinterParameterized3(4, 1, 0, 1, sTextColor_Headers, -1, gText_MainMenuMysteryGift2);
@ -813,14 +944,14 @@ static void Task_HandleMainMenuAPressed(u8 taskId)
{
if (gTasks[taskId].tMenuType == HAS_MYSTERY_EVENTS)
RemoveScrollIndicatorArrowPair(gTasks[taskId].tScrollArrowTaskId);
sub_819746C(0, 1);
sub_819746C(1, 1);
sub_819746C(2, 1);
sub_819746C(3, 1);
sub_819746C(4, 1);
sub_819746C(5, 1);
sub_819746C(6, 1);
sub_819746C(7, 1);
ClearStdWindowAndFrame(0, TRUE);
ClearStdWindowAndFrame(1, TRUE);
ClearStdWindowAndFrame(2, TRUE);
ClearStdWindowAndFrame(3, TRUE);
ClearStdWindowAndFrame(4, TRUE);
ClearStdWindowAndFrame(5, TRUE);
ClearStdWindowAndFrame(6, TRUE);
ClearStdWindowAndFrame(7, TRUE);
wirelessAdapterConnected = IsWirelessAdapterConnected();
switch (gTasks[taskId].tMenuType)
{
@ -973,7 +1104,7 @@ static void Task_HandleMainMenuAPressed(u8 taskId)
if (action != ACTION_OPTION)
sCurrItemAndOptionMenuCheck = 0;
else
sCurrItemAndOptionMenuCheck |= 0x8000; // entering the options menu
sCurrItemAndOptionMenuCheck |= OPTION_MENU_FLAG; // entering the options menu
}
}
@ -981,7 +1112,7 @@ static void Task_HandleMainMenuBPressed(u8 taskId)
{
if (!gPaletteFade.active)
{
if (gTasks[taskId].tMenuType == 3)
if (gTasks[taskId].tMenuType == HAS_MYSTERY_EVENTS)
RemoveScrollIndicatorArrowPair(gTasks[taskId].tScrollArrowTaskId);
sCurrItemAndOptionMenuCheck = 0;
FreeAllWindowBuffers();
@ -1199,7 +1330,7 @@ static void Task_NewGameBirchSpeech_WaitForSpriteFadeInWelcome(u8 taskId)
}
else
{
InitWindows(gUnknown_082FF080);
InitWindows(gNewGameBirchSpeechTextWindows);
LoadMainMenuWindowFrameTiles(0, 0xF3);
LoadMessageBoxGfx(0, 0xFC, 0xF0);
NewGameBirchSpeech_ShowDialogueWindow(0, 1);
@ -1642,7 +1773,7 @@ static void Task_NewGameBirchSpeech_FadePlayerToWhite(u8 taskId)
if (!gPaletteFade.active)
{
spriteId = gTasks[taskId].tPlayerSpriteId;
gSprites[spriteId].callback = nullsub_11;
gSprites[spriteId].callback = SpriteCB_Null;
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
BeginNormalPaletteFade(0xFFFF0000, 0, 0, 16, RGB_WHITEALPHA);
gTasks[taskId].func = Task_NewGameBirchSpeech_Cleanup;
@ -1730,14 +1861,14 @@ static void CB2_NewGameBirchSpeech_ReturnFromNamingScreen(void)
REG_IME = savedIme;
SetVBlankCallback(VBlankCB_MainMenu);
SetMainCallback2(CB2_MainMenu);
InitWindows(gUnknown_082FF080);
InitWindows(gNewGameBirchSpeechTextWindows);
LoadMainMenuWindowFrameTiles(0, 0xF3);
LoadMessageBoxGfx(0, 0xFC, 0xF0);
PutWindowTilemap(0);
CopyWindowToVram(0, 3);
}
static void nullsub_11(struct Sprite *sprite)
static void SpriteCB_Null(struct Sprite *sprite)
{
}
@ -1763,22 +1894,22 @@ static void AddBirchSpeechObjects(u8 taskId)
u8 maySpriteId;
birchSpriteId = AddNewGameBirchObject(0x88, 0x3C, 1);
gSprites[birchSpriteId].callback = nullsub_11;
gSprites[birchSpriteId].callback = SpriteCB_Null;
gSprites[birchSpriteId].oam.priority = 0;
gSprites[birchSpriteId].invisible = TRUE;
gTasks[taskId].tBirchSpriteId = birchSpriteId;
lotadSpriteId = NewGameBirchSpeech_CreateLotadSprite(100, 0x4B);
gSprites[lotadSpriteId].callback = nullsub_11;
gSprites[lotadSpriteId].callback = SpriteCB_Null;
gSprites[lotadSpriteId].oam.priority = 0;
gSprites[lotadSpriteId].invisible = TRUE;
gTasks[taskId].tLotadSpriteId = lotadSpriteId;
brendanSpriteId = CreateTrainerSprite(FacilityClassToPicIndex(FACILITY_CLASS_BRENDAN), 120, 60, 0, &gDecompressionBuffer[0]);
gSprites[brendanSpriteId].callback = nullsub_11;
gSprites[brendanSpriteId].callback = SpriteCB_Null;
gSprites[brendanSpriteId].invisible = TRUE;
gSprites[brendanSpriteId].oam.priority = 0;
gTasks[taskId].tBrendanSpriteId = brendanSpriteId;
maySpriteId = CreateTrainerSprite(FacilityClassToPicIndex(FACILITY_CLASS_MAY), 120, 60, 0, &gDecompressionBuffer[0x800]);
gSprites[maySpriteId].callback = nullsub_11;
gSprites[maySpriteId].callback = SpriteCB_Null;
gSprites[maySpriteId].invisible = TRUE;
gSprites[maySpriteId].oam.priority = 0;
gTasks[taskId].tMaySpriteId = maySpriteId;
@ -1966,8 +2097,8 @@ static void NewGameBirchSpeech_StartFadePlatformOut(u8 taskId, u8 delay)
static void NewGameBirchSpeech_ShowGenderMenu(void)
{
DrawMainMenuWindowBorder(&gUnknown_082FF080[1], 0xF3);
FillWindowPixelBuffer(1, 17);
DrawMainMenuWindowBorder(&gNewGameBirchSpeechTextWindows[1], 0xF3);
FillWindowPixelBuffer(1, PIXEL_FILL(1));
PrintMenuTable(1, 2, sMenuActions_Gender);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
PutWindowTilemap(1);
@ -1995,7 +2126,7 @@ static void NewGameBirchSpeech_SetDefaultPlayerName(u8 nameId)
static void CreateMainMenuErrorWindow(const u8* str)
{
FillWindowPixelBuffer(7, 17);
FillWindowPixelBuffer(7, PIXEL_FILL(1));
AddTextPrinterParameterized(7, 1, str, 0, 1, 2, 0);
PutWindowTilemap(7);
CopyWindowToVram(7, 2);
@ -2105,12 +2236,12 @@ static void NewGameBirchSpeech_ClearGenderWindowTilemap(u8 a, u8 b, u8 c, u8 d,
FillBgTilemapBufferRect(a, 0, b + 0xFF, c + 0xFF, d + 2, e + 2, 2);
}
static void NewGameBirchSpeech_ClearGenderWindow(u8 windowId, u8 a)
static void NewGameBirchSpeech_ClearGenderWindow(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, NewGameBirchSpeech_ClearGenderWindowTilemap);
FillWindowPixelBuffer(windowId, 0x11);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
ClearWindowTilemap(windowId);
if (a == 1)
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
@ -2146,7 +2277,7 @@ void CreateYesNoMenuParameterized(u8 a, u8 b, u16 c, u16 d, u8 e, u8 f)
static void NewGameBirchSpeech_ShowDialogueWindow(u8 windowId, u8 copyToVram)
{
CallWindowFunction(windowId, NewGameBirchSpeech_CreateDialogueWindowBorder);
FillWindowPixelBuffer(windowId, 17);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);

View File

@ -276,7 +276,7 @@ static void Task_MapNamePopUpWindow(u8 taskId)
}
break;
case 4:
sub_819746C(GetMapNamePopUpWindowId(), TRUE);
ClearStdWindowAndFrame(GetMapNamePopUpWindowId(), TRUE);
task->data[0] = 5;
break;
case 5:
@ -290,7 +290,7 @@ void HideMapNamePopUpWindow(void)
{
if (FuncIsActiveTask(Task_MapNamePopUpWindow))
{
sub_819746C(GetMapNamePopUpWindowId(), TRUE);
ClearStdWindowAndFrame(GetMapNamePopUpWindowId(), TRUE);
RemoveMapNamePopUpWindow();
SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, 0);
DestroyTask(sPopupTaskId);

View File

@ -1191,7 +1191,7 @@ static bool32 LoadMatchCallWindowGfx(u8 taskId)
return FALSE;
}
FillWindowPixelBuffer(taskData[2], 0x88);
FillWindowPixelBuffer(taskData[2], PIXEL_FILL(8));
LoadPalette(sUnknown_0860EA4C, 0xE0, 0x20);
LoadPalette(sPokeNavIconPalette, 0xF0, 0x20);
ChangeBgY(0, -0x2000, 0);
@ -1241,7 +1241,7 @@ static bool32 sub_81962D8(u8 taskId)
s16 *taskData = gTasks[taskId].data;
if (!ExecuteMatchCallTextPrinter(taskData[2]))
{
FillWindowPixelBuffer(taskData[2], 0x88);
FillWindowPixelBuffer(taskData[2], PIXEL_FILL(8));
if (!gMatchCallState.triggeredFromScript)
SelectMatchCallMessage(gMatchCallState.trainerId, gStringVar4);
@ -1257,7 +1257,7 @@ static bool32 sub_8196330(u8 taskId)
s16 *taskData = gTasks[taskId].data;
if (!ExecuteMatchCallTextPrinter(taskData[2]) && !IsSEPlaying() && gMain.newKeys & (A_BUTTON | B_BUTTON))
{
FillWindowPixelBuffer(taskData[2], 0x88);
FillWindowPixelBuffer(taskData[2], PIXEL_FILL(8));
CopyWindowToVram(taskData[2], 2);
PlaySE(SE_TOREOFF);
return TRUE;

View File

@ -437,7 +437,7 @@ static void BardSong_TextSubPrinter(struct TextPrinterTemplate * printer, u16 a1
static void sub_8120708(const u8 * src)
{
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized(0, 1, src, 0, 1, 1, BardSong_TextSubPrinter);
gUnknown_03002F84 = TRUE;
CopyWindowToVram(0, 3);

View File

@ -124,14 +124,14 @@ const struct MoveMenuInfoIcon gMoveMenuInfoIcons[] =
// Forward declarations
extern void sub_81973A4(void);
extern void DrawStandardFrame(u8, u8, u8, u8, u8, u8);
extern void DrawDialogueFrame(u8, u8, u8, u8, u8, u8);
extern void sub_81977BC(u8, u8, u8, u8, u8, u8);
extern void sub_8197804(u8, u8, u8, u8, u8, u8);
extern void sub_8197BB4(u8, u8, u8, u8, u8, u8);
extern void sub_8197E30(u8, u8, u8, u8, u8, u8);
extern void DrawWindowBorder(u8, u8, u8, u8, u8, u8);
extern void sub_81980A8(u8, u8, u8, u8, u8, u8);
extern void WindowFunc_DrawStandardFrame(u8, u8, u8, u8, u8, u8);
extern void WindowFunc_DrawDialogueFrame(u8, u8, u8, u8, u8, u8);
extern void WindowFunc_ClearStdWindowAndFrame(u8, u8, u8, u8, u8, u8);
extern void WindowFunc_ClearDialogWindowAndFrame(u8, u8, u8, u8, u8, u8);
extern void WindowFunc_DrawDialogFrameWithCustomTileAndPalette(u8, u8, u8, u8, u8, u8);
extern void WindowFunc_ClearDialogWindowAndFrameNullPalette(u8, u8, u8, u8, u8, u8);
extern void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8, u8, u8, u8, u8, u8);
extern void WindowFunc_ClearStdWindowAndFrameToTransparent(u8, u8, u8, u8, u8, u8);
extern u8 Menu_MoveCursor(s8);
extern u8 sub_8199134(s8, s8);
extern void sub_8198C78(void);
@ -210,43 +210,43 @@ void sub_81973A4(void)
LoadUserWindowBorderGfx(0, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM * 0x10);
}
void NewMenuHelpers_DrawDialogueFrame(u8 windowId, bool8 copyToVram)
void DrawDialogueFrame(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, DrawDialogueFrame);
FillWindowPixelBuffer(windowId, 0x11);
CallWindowFunction(windowId, WindowFunc_DrawDialogueFrame);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void NewMenuHelpers_DrawStdWindowFrame(u8 windowId, bool8 copyToVram)
void DrawStdWindowFrame(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, DrawStandardFrame);
FillWindowPixelBuffer(windowId, 0x11);
CallWindowFunction(windowId, WindowFunc_DrawStandardFrame);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void sub_8197434(u8 windowId, bool8 copyToVram)
void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, sub_8197804);
FillWindowPixelBuffer(windowId, 0x11);
CallWindowFunction(windowId, WindowFunc_ClearDialogWindowAndFrame);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
ClearWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void sub_819746C(u8 windowId, bool8 copyToVram)
void ClearStdWindowAndFrame(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, sub_81977BC);
FillWindowPixelBuffer(windowId, 0x11);
CallWindowFunction(windowId, WindowFunc_ClearStdWindowAndFrame);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
ClearWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
void WindowFunc_DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
int i;
@ -313,7 +313,7 @@ void DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height
STD_WINDOW_PALETTE_NUM);
}
void DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
void WindowFunc_DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
FillBgTilemapBufferRect(bg,
DLG_WINDOW_BASE_TILE_NUM + 1,
@ -408,25 +408,25 @@ void DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height
DLG_WINDOW_PALETTE_NUM);
}
void sub_81977BC(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
void WindowFunc_ClearStdWindowAndFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, STD_WINDOW_PALETTE_NUM);
}
void sub_8197804(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
void WindowFunc_ClearDialogWindowAndFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, STD_WINDOW_PALETTE_NUM);
}
void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram)
{
SetWindowBorderStyle(windowId, copyToVram, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM);
DrawStdFrameWithCustomTileAndPalette(windowId, copyToVram, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM);
}
void sub_819786C(u8 windowId, bool8 copyToVram)
{
LoadMessageBoxGfx(windowId, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
sub_8197B1C(windowId, copyToVram, DLG_WINDOW_BASE_TILE_NUM, 0xF);
DrawDialogFrameWithCustomTileAndPalette(windowId, copyToVram, DLG_WINDOW_BASE_TILE_NUM, 0xF);
}
void sub_819789C(void)
@ -458,12 +458,12 @@ void DisplayItemMessageOnField(u8 taskId, const u8 *string, TaskFunc callback)
CopyWindowToVram(0, 3);
}
void DisplayYesNoMenu(void)
void DisplayYesNoMenuDefaultYes(void)
{
CreateYesNoMenu(&sYesNo_WindowTemplates, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 0);
}
void sub_8197948(u8 initialCursorPos)
void DisplayYesNoMenuWithDefault(u8 initialCursorPos)
{
CreateYesNoMenu(&sYesNo_WindowTemplates, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, initialCursorPos);
}
@ -549,29 +549,30 @@ void sub_8197AE8(bool8 copyToVram)
CopyBgTilemapBufferToVram(0);
}
void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 tileNum, u8 paletteNum)
void DrawDialogFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 tileNum, u8 paletteNum)
{
sTileNum = tileNum;
sPaletteNum = paletteNum;
CallWindowFunction(windowId, sub_8197BB4);
FillWindowPixelBuffer(windowId, 0x11);
CallWindowFunction(windowId, WindowFunc_DrawDialogFrameWithCustomTileAndPalette);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void sub_8197B64(u8 windowId, bool8 copyToVram, u16 tileNum)
// Never used.
void DrawDialogFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 tileNum)
{
sTileNum = tileNum;
sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM);
CallWindowFunction(windowId, sub_8197BB4);
FillWindowPixelBuffer(windowId, 0x11);
CallWindowFunction(windowId, WindowFunc_DrawDialogFrameWithCustomTileAndPalette);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void sub_8197BB4(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
void WindowFunc_DrawDialogFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
FillBgTilemapBufferRect(bg,
sTileNum + 1,
@ -666,43 +667,45 @@ void sub_8197BB4(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 p
sPaletteNum);
}
void sub_8197DF8(u8 windowId, bool8 copyToVram)
void ClearDialogWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, sub_8197E30);
FillWindowPixelBuffer(windowId, 0);
// The palette slot doesn't matter, since the tiles are transparent.
CallWindowFunction(windowId, WindowFunc_ClearDialogWindowAndFrameNullPalette);
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
ClearWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void sub_8197E30(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
void WindowFunc_ClearDialogWindowAndFrameNullPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 3, tilemapTop - 1, width + 6, height + 2, 0);
}
void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 baseTileNum, u8 paletteNum)
void DrawStdFrameWithCustomTileAndPalette(u8 windowId, bool8 copyToVram, u16 baseTileNum, u8 paletteNum)
{
sTileNum = baseTileNum;
sPaletteNum = paletteNum;
CallWindowFunction(windowId, DrawWindowBorder);
FillWindowPixelBuffer(windowId, 0x11);
CallWindowFunction(windowId, WindowFunc_DrawStdFrameWithCustomTileAndPalette);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void sub_8197EC8(u8 windowId, bool8 copyToVram, u16 baseTileNum)
// Never used.
void DrawStdFrameWithCustomTile(u8 windowId, bool8 copyToVram, u16 baseTileNum)
{
sTileNum = baseTileNum;
sPaletteNum = GetWindowAttribute(windowId, WINDOW_PALETTE_NUM);
CallWindowFunction(windowId, DrawWindowBorder);
FillWindowPixelBuffer(windowId, 0x11);
CallWindowFunction(windowId, WindowFunc_DrawStdFrameWithCustomTileAndPalette);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
PutWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void DrawWindowBorder(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
void WindowFunc_DrawStdFrameWithCustomTileAndPalette(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
FillBgTilemapBufferRect(bg,
sTileNum + 0,
@ -762,16 +765,16 @@ void DrawWindowBorder(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height,
sPaletteNum);
}
void sub_8198070(u8 windowId, bool8 copyToVram)
void ClearStdWindowAndFrameToTransparent(u8 windowId, bool8 copyToVram)
{
CallWindowFunction(windowId, sub_81980A8);
FillWindowPixelBuffer(windowId, 0);
CallWindowFunction(windowId, WindowFunc_ClearStdWindowAndFrameToTransparent);
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
ClearWindowTilemap(windowId);
if (copyToVram == TRUE)
CopyWindowToVram(windowId, 3);
}
void sub_81980A8(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
void WindowFunc_ClearStdWindowAndFrameToTransparent(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
{
FillBgTilemapBufferRect(bg, 0, tilemapLeft - 1, tilemapTop - 1, width + 2, height + 2, 0);
}
@ -811,7 +814,7 @@ void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram)
if (sWindowId != 0xFF)
{
PutWindowTilemap(sWindowId);
FillWindowPixelBuffer(sWindowId, 0xFF);
FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15));
width = GetStringWidth(0, string, 0);
AddTextPrinterParameterized3(sWindowId,
0,
@ -845,7 +848,7 @@ void sub_8198204(const u8 *string, const u8 *string2, u8 a3, u8 a4, bool8 copyTo
color[2] = 2;
}
PutWindowTilemap(sWindowId);
FillWindowPixelBuffer(sWindowId, 0xFF);
FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15));
if (string2 != NULL)
{
width = GetStringWidth(0, string2, 0);
@ -873,7 +876,7 @@ void sub_81982F0(void)
{
if (sWindowId != 0xFF)
{
FillWindowPixelBuffer(sWindowId, 0xFF);
FillWindowPixelBuffer(sWindowId, PIXEL_FILL(15));
CopyWindowToVram(sWindowId, 3);
}
}
@ -882,7 +885,7 @@ void sub_8198314(void)
{
if (sWindowId != 0xFF)
{
FillWindowPixelBuffer(sWindowId, 0);
FillWindowPixelBuffer(sWindowId, PIXEL_FILL(0));
ClearWindowTilemap(sWindowId);
CopyWindowToVram(sWindowId, 3);
RemoveWindow(sWindowId);
@ -931,7 +934,7 @@ void RedrawMenuCursor(u8 oldPos, u8 newPos)
width = GetMenuCursorDimensionByFont(sMenu.fontId, 0);
height = GetMenuCursorDimensionByFont(sMenu.fontId, 1);
FillWindowPixelRect(sMenu.windowId, 0x11, sMenu.left, sMenu.optionHeight * oldPos + sMenu.top, width, height);
FillWindowPixelRect(sMenu.windowId, PIXEL_FILL(1), sMenu.left, sMenu.optionHeight * oldPos + sMenu.top, width, height);
AddTextPrinterParameterized(sMenu.windowId, sMenu.fontId, gText_SelectorArrow3, sMenu.left, sMenu.optionHeight * newPos + sMenu.top, 0, 0);
}
@ -1175,7 +1178,7 @@ void sub_8198AF8(const struct WindowTemplate *window, u8 fontId, u8 left, u8 top
struct TextPrinterTemplate printer;
sYesNoWindowId = AddWindow(window);
SetWindowBorderStyle(sYesNoWindowId, TRUE, baseTileNum, paletteNum);
DrawStdFrameWithCustomTileAndPalette(sYesNoWindowId, TRUE, baseTileNum, paletteNum);
printer.currentChar = gText_YesNo;
printer.windowId = sYesNoWindowId;
@ -1211,7 +1214,7 @@ s8 Menu_ProcessInputNoWrapClearOnChoose(void)
void sub_8198C78(void)
{
sub_8198070(sYesNoWindowId, TRUE);
ClearStdWindowAndFrameToTransparent(sYesNoWindowId, TRUE);
RemoveWindow(sYesNoWindowId);
}
@ -1310,7 +1313,7 @@ void sub_8199060(u8 oldCursorPos, u8 newCursorPos)
u8 xPos = (oldCursorPos % sMenu.horizontalCount) * sMenu.optionWidth + sMenu.left;
u8 yPos = (oldCursorPos / sMenu.horizontalCount) * sMenu.optionHeight + sMenu.top;
FillWindowPixelRect(sMenu.windowId,
0x11,
PIXEL_FILL(1),
xPos,
yPos,
cursorWidth,
@ -1640,7 +1643,7 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u16 baseTileNum, u8 pa
struct TextPrinterTemplate printer;
sYesNoWindowId = AddWindow(window);
SetWindowBorderStyle(sYesNoWindowId, TRUE, baseTileNum, paletteNum);
DrawStdFrameWithCustomTileAndPalette(sYesNoWindowId, TRUE, baseTileNum, paletteNum);
printer.currentChar = gText_YesNo;
printer.windowId = sYesNoWindowId;

View File

@ -129,7 +129,7 @@ void SetVBlankHBlankCallbacksToNull(void)
void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 arg2, u8 arg3, u8 fontId, u8 textSpeed, const u8 *string, void *taskFunc)
{
gUnknown_0203A140 = windowId;
sub_8197B1C(windowId, TRUE, arg2, arg3);
DrawDialogFrameWithCustomTileAndPalette(windowId, TRUE, arg2, arg3);
if (string != gStringVar4)
StringExpandPlaceholders(gStringVar4, string);

View File

@ -154,7 +154,7 @@ void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed)
void PrintMoneyAmountInMoneyBoxWithBorder(u8 windowId, u16 tileStart, u8 pallete, int amount)
{
SetWindowBorderStyle(windowId, FALSE, tileStart, pallete);
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, tileStart, pallete);
PrintMoneyAmountInMoneyBox(windowId, amount, 0);
}
@ -169,7 +169,7 @@ void DrawMoneyBox(int amount, u8 x, u8 y)
SetWindowTemplateFields(&template, 0, x + 1, y + 1, 10, 2, 15, 8);
sMoneyBoxWindowId = AddWindow(&template);
FillWindowPixelBuffer(sMoneyBoxWindowId, 0);
FillWindowPixelBuffer(sMoneyBoxWindowId, PIXEL_FILL(0));
PutWindowTilemap(sMoneyBoxWindowId);
CopyWindowToVram(sMoneyBoxWindowId, 1);
PrintMoneyAmountInMoneyBoxWithBorder(sMoneyBoxWindowId, 0x214, 14, amount);
@ -179,7 +179,7 @@ void DrawMoneyBox(int amount, u8 x, u8 y)
void HideMoneyBox(void)
{
RemoveMoneyLabelObject();
sub_8198070(sMoneyBoxWindowId, FALSE);
ClearStdWindowAndFrameToTransparent(sMoneyBoxWindowId, FALSE);
CopyWindowToVram(sMoneyBoxWindowId, 2);
RemoveWindow(sMoneyBoxWindowId);
}

View File

@ -90,7 +90,7 @@ void CB2_InitMysteryEventMenu(void)
DeactivateAllTextPrinters();
for (i = 0; i < 2; i++)
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x1E, 0x14);
LoadUserWindowBorderGfx(0, 1u, 0xD0u);
@ -133,7 +133,7 @@ static void CB2_MysteryEventMenu(void)
switch (gMain.state)
{
case 0:
SetWindowBorderStyle(0, 1, 1, 0xD);
DrawStdFrameWithCustomTileAndPalette(0, 1, 1, 0xD);
PutWindowTilemap(0);
CopyWindowToVram(0, 3);
ShowBg(0);
@ -180,7 +180,7 @@ static void CB2_MysteryEventMenu(void)
{
PlaySE(SE_SELECT);
CheckShouldAdvanceLinkState();
SetWindowBorderStyle(1, 1, 1, 0xD);
DrawStdFrameWithCustomTileAndPalette(1, 1, 1, 0xD);
PrintMysteryMenuText(1, gText_LoadingEvent, 1, 2, 0);
PutWindowTilemap(1);
CopyWindowToVram(1, 3);
@ -313,6 +313,6 @@ static void PrintMysteryMenuText(u8 windowId, const u8 *text, u8 x, u8 y, s32 sp
textColor[1] = 2;
textColor[2] = 3;
FillWindowPixelBuffer(windowId, (textColor[0]) | (textColor[0] << 4));
FillWindowPixelBuffer(windowId, PIXEL_FILL(textColor[0]));
AddTextPrinterParameterized4(windowId, 1, x, y, letterSpacing, lineSpacing, textColor, speed, text);
}

View File

@ -557,7 +557,7 @@ static void DisplaySentToPCMessage(void)
stringToDisplay++;
StringExpandPlaceholders(gStringVar4, gUnknown_0858BDB8[stringToDisplay]);
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
gTextFlags.canABSpeedUpPrint = TRUE;
AddTextPrinterParameterized2(0, 1, gStringVar4, GetPlayerTextSpeedDelay(), 0, 2, 1, 3);
CopyWindowToVram(0, 3);
@ -1474,7 +1474,7 @@ static void HandleDpadMovement(struct Task *task)
static void sub_80E4894(void)
{
FillWindowPixelBuffer(gNamingScreenData->windows[3], 0x11);
FillWindowPixelBuffer(gNamingScreenData->windows[3], PIXEL_FILL(1));
AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, gNamingScreenData->template->title, 8, 1, 0, 0);
PutWindowTilemap(gNamingScreenData->windows[3]);
}
@ -1485,7 +1485,7 @@ static void sub_80E48E8(void)
StringCopy(buffer, gSpeciesNames[gNamingScreenData->monSpecies]);
StringAppendN(buffer, gNamingScreenData->template->title, 15);
FillWindowPixelBuffer(gNamingScreenData->windows[3], 0x11);
FillWindowPixelBuffer(gNamingScreenData->windows[3], PIXEL_FILL(1));
AddTextPrinterParameterized(gNamingScreenData->windows[3], 1, buffer, 8, 1, 0, 0);
PutWindowTilemap(gNamingScreenData->windows[3]);
}
@ -1672,7 +1672,7 @@ static void sub_80E4D10(void)
u8 maxChars = gNamingScreenData->template->maxChars;
u16 unk = gNamingScreenData->inputCharBaseXPos - 0x40;
FillWindowPixelBuffer(gNamingScreenData->windows[2], 0x11);
FillWindowPixelBuffer(gNamingScreenData->windows[2], PIXEL_FILL(1));
for (i = 0; i < maxChars; i++)
{
@ -1704,7 +1704,9 @@ static const struct TextColorThing sUnkColorStruct =
static const u8 sFillValues[3] =
{
0xEE, 0xDD, 0xFF
PIXEL_FILL(0xE),
PIXEL_FILL(0xD),
PIXEL_FILL(0xF)
};
static const u8 *const sUnkColors[3] =
@ -1766,7 +1768,7 @@ static void sub_80E4EF0(void)
{
const u8 color[3] = { 15, 1, 2 };
FillWindowPixelBuffer(gNamingScreenData->windows[4], 0xFF);
FillWindowPixelBuffer(gNamingScreenData->windows[4], PIXEL_FILL(15));
AddTextPrinterParameterized3(gNamingScreenData->windows[4], 0, 2, 1, color, 0, gText_MoveOkBack);
PutWindowTilemap(gNamingScreenData->windows[4]);
CopyWindowToVram(gNamingScreenData->windows[4], 3);

View File

@ -620,7 +620,7 @@ static void ButtonMode_DrawChoices(u8 selection)
static void DrawTextOption(void)
{
FillWindowPixelBuffer(WIN_TEXT_OPTION, 0x11);
FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_FILL(1));
AddTextPrinterParameterized(WIN_TEXT_OPTION, 1, gText_Option, 8, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(WIN_TEXT_OPTION, 3);
}
@ -629,7 +629,7 @@ static void DrawOptionMenuTexts(void)
{
u8 i;
FillWindowPixelBuffer(WIN_OPTIONS, 0x11);
FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_FILL(1));
for (i = 0; i < MENUITEM_COUNT; i++)
{
AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL);

View File

@ -2755,7 +2755,7 @@ static void sub_81B1B8C(u8 taskId)
{
if (gTasks[taskId].data[0] == 0)
{
sub_8198070(6, 0);
ClearStdWindowAndFrameToTransparent(6, 0);
ClearWindowTilemap(6);
}
DestroyTask(taskId);
@ -2780,7 +2780,7 @@ static void sub_81B1C1C(u8 taskId)
{
if (sub_81B1BD4() != TRUE)
{
sub_8198070(6, 0);
ClearStdWindowAndFrameToTransparent(6, 0);
ClearWindowTilemap(6);
if (sub_81221AC() == TRUE)
{
@ -3110,7 +3110,7 @@ static void sub_81B239C(u8 a)
}
DeactivateAllTextPrinters();
for (i = 0; i < PARTY_SIZE; i++)
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
LoadUserWindowBorderGfx(0, 0x4F, 0xD0);
LoadPalette(GetOverworldTextboxPalettePtr(), 0xE0, 0x20);
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
@ -3128,7 +3128,7 @@ static void sub_81B2428(bool8 a)
if (a == TRUE)
{
firstWindowId = AddWindow(&gUnknown_08615918);
FillWindowPixelBuffer(firstWindowId, 0);
FillWindowPixelBuffer(firstWindowId, PIXEL_FILL(0));
mainOffset = GetStringCenterAlignXOffset(0, gMenuText_Confirm, 48);
AddTextPrinterParameterized4(firstWindowId, 0, mainOffset, 1, 0, 0, gUnknown_086157FC[0], -1, gMenuText_Confirm);
PutWindowTilemap(firstWindowId);
@ -3141,7 +3141,7 @@ static void sub_81B2428(bool8 a)
windowId = AddWindow(&gUnknown_08615908);
offset = 3;
}
FillWindowPixelBuffer(windowId, 0);
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
if (gUnknown_0203CEC8.unk8_0 != 10)
{
mainOffset = GetStringCenterAlignXOffset(0, gText_Cancel, 48);
@ -3481,8 +3481,9 @@ static void DisplayPartyPokemonHPBar(u16 hp, u16 maxhp, struct Struct203CEDC *pt
FillWindowPixelRect(ptr->windowId, gUnknown_08615AB8[0], ptr->unk0->unk4[20], ptr->unk0->unk4[21] + 1, hpFraction, 2);
if (hpFraction != ptr->unk0->unk4[22])
{
FillWindowPixelRect(ptr->windowId, 13, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21], ptr->unk0->unk4[22] - hpFraction, 1);
FillWindowPixelRect(ptr->windowId, 2, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21] + 1, ptr->unk0->unk4[22] - hpFraction, 2);
// This appears to be an alternating fill
FillWindowPixelRect(ptr->windowId, 0x0D, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21], ptr->unk0->unk4[22] - hpFraction, 1);
FillWindowPixelRect(ptr->windowId, 0x02, ptr->unk0->unk4[20] + hpFraction, ptr->unk0->unk4[21] + 1, ptr->unk0->unk4[22] - hpFraction, 2);
}
CopyWindowToVram(ptr->windowId, 2);
}
@ -3503,7 +3504,7 @@ static void sub_81B302C(u8 *ptr)
{
if (*ptr != 0xFF)
{
sub_8198070(*ptr, 0);
ClearStdWindowAndFrameToTransparent(*ptr, 0);
RemoveWindow(*ptr);
*ptr = 0xFF;
schedule_bg_copy_tilemap_to_vram(2);
@ -3548,7 +3549,7 @@ void display_pokemon_menu_message(u32 stringID)
else if (sub_81B314C() == FALSE)
stringID = 1;
}
SetWindowBorderStyle(*windowPtr, FALSE, 0x4F, 0xD);
DrawStdFrameWithCustomTileAndPalette(*windowPtr, FALSE, 0x4F, 0xD);
StringExpandPlaceholders(gStringVar4, gUnknown_08615AF4[stringID]);
AddTextPrinterParameterized(*windowPtr, 1, gStringVar4, 0, 1, 0, 0);
schedule_bg_copy_tilemap_to_vram(2);
@ -3598,7 +3599,7 @@ static u8 sub_81B31B0(u8 a)
}
gUnknown_0203CEC4->unkC[0] = AddWindow(&window);
SetWindowBorderStyle(gUnknown_0203CEC4->unkC[0], FALSE, 0x4F, 13);
DrawStdFrameWithCustomTileAndPalette(gUnknown_0203CEC4->unkC[0], FALSE, 0x4F, 13);
if (a == 3)
return gUnknown_0203CEC4->unkC[0];
cursorDimension = GetMenuCursorDimensionByFont(1, 0);
@ -3618,7 +3619,7 @@ static u8 sub_81B31B0(u8 a)
static void sub_81B3300(const u8 *text)
{
SetWindowBorderStyle(6, FALSE, 0x4F, 13);
DrawStdFrameWithCustomTileAndPalette(6, FALSE, 0x4F, 13);
gTextFlags.canABSpeedUpPrint = TRUE;
AddTextPrinterParameterized2(6, 1, text, GetPlayerTextSpeedDelay(), 0, 2, 1, 3);
}
@ -3631,7 +3632,7 @@ static void sub_81B334C(void)
static u8 sub_81B3364(void)
{
gUnknown_0203CEC4->unkC[0] = AddWindow(&gUnknown_08615970);
SetWindowBorderStyle(gUnknown_0203CEC4->unkC[0], FALSE, 0x4F, 13);
DrawStdFrameWithCustomTileAndPalette(gUnknown_0203CEC4->unkC[0], FALSE, 0x4F, 13);
return gUnknown_0203CEC4->unkC[0];
}

View File

@ -361,14 +361,14 @@ static void PlayerPCProcessMenuInput(u8 taskId)
break;
case MENU_B_PRESSED:
PlaySE(SE_SELECT);
sub_8198070(data[4], FALSE);
ClearStdWindowAndFrameToTransparent(data[4], FALSE);
ClearWindowTilemap(data[4]);
RemoveWindow(data[4]);
schedule_bg_copy_tilemap_to_vram(0);
gTasks[taskId].func = PlayerPC_TurnOff;
break;
default:
sub_8198070(data[4], FALSE);
ClearStdWindowAndFrameToTransparent(data[4], FALSE);
ClearWindowTilemap(data[4]);
RemoveWindow(data[4]);
schedule_bg_copy_tilemap_to_vram(0);
@ -403,7 +403,7 @@ static void PlayerPC_Mailbox(u8 taskId)
ItemStorage_SetItemAndMailCount(taskId);
if (sub_81D1C44(playerPCItemPageInfo.count) == TRUE)
{
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
Mailbox_DrawMailboxMenu(taskId);
gTasks[taskId].func = Mailbox_ProcessInput;
}
@ -451,7 +451,7 @@ static void InitItemStorageMenu(u8 taskId, u8 var)
static void ItemStorageMenuPrint(const u8 *textPtr)
{
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized(0, 1, textPtr, 0, 1, 0, 0);
}
@ -506,7 +506,7 @@ void sub_816B31C(void)
void Mailbox_DoRedrawMailboxMenuAfterReturn(void)
{
sub_81973A4();
NewMenuHelpers_DrawDialogueFrame(0, 1);
DrawDialogueFrame(0, 1);
InitItemStorageMenu(CreateTask(ItemStorage_HandleReturnToProcessInput, 0), 1);
pal_fill_black();
}
@ -560,7 +560,7 @@ static void ItemStorage_WithdrawToss_Helper(u8 taskId, bool8 toss)
FreeAndReserveObjectSpritePalettes();
LoadListMenuArrowsGfx();
sub_8122344(gUnknown_0203BCC4->spriteIds, 7);
sub_8197434(0,0);
ClearDialogWindowAndFrame(0,0);
gTasks[taskId].func = ItemStorage_ProcessWithdrawTossInput;
}
@ -583,7 +583,7 @@ static void sub_816B4DC(u8 taskId)
{
u16 *data = gTasks[taskId].data;
sub_8198070(data[4], FALSE);
ClearStdWindowAndFrameToTransparent(data[4], FALSE);
ClearWindowTilemap(data[4]);
RemoveWindow(data[4]);
schedule_bg_copy_tilemap_to_vram(0);
@ -761,7 +761,7 @@ static void Mailbox_MoveToBag(u8 taskId)
static void Mailbox_DrawYesNoBeforeMove(u8 taskId)
{
DisplayYesNoMenu();
DisplayYesNoMenuDefaultYes();
gTasks[taskId].func = Mailbox_MoveToBagYesNoPrompt;
}
@ -863,7 +863,7 @@ static void Mailbox_NoPokemonForMail(u8 taskId)
static void Mailbox_Cancel(u8 taskId)
{
sub_81D1D04(2);
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
Mailbox_DrawMailboxMenu(taskId);
schedule_bg_copy_tilemap_to_vram(0);
gTasks[taskId].func = Mailbox_ProcessInput;
@ -892,7 +892,7 @@ static u8 sub_816BC7C(u8 a)
if (*windowIdLoc == 0xFF)
{
*windowIdLoc = AddWindow(&gUnknown_085DFF5C[a]);
SetWindowBorderStyle(*windowIdLoc, FALSE, 0x214, 0xE);
DrawStdFrameWithCustomTileAndPalette(*windowIdLoc, FALSE, 0x214, 0xE);
schedule_bg_copy_tilemap_to_vram(0);
}
return *windowIdLoc;
@ -903,7 +903,7 @@ static void sub_816BCC4(u8 a)
u8 *windowIdLoc = &(gUnknown_0203BCC4->windowIds[a]);
if (*windowIdLoc != 0xFF)
{
sub_8198070(*windowIdLoc, FALSE);
ClearStdWindowAndFrameToTransparent(*windowIdLoc, FALSE);
ClearWindowTilemap(*windowIdLoc);
schedule_bg_copy_tilemap_to_vram(0);
RemoveWindow(*windowIdLoc);
@ -977,7 +977,7 @@ static void sub_816BEF0(s32 id)
description = (u8 *)ItemId_GetDescription(gSaveBlock1Ptr->pcItems[id].itemId);
else
description = ItemStorage_GetItemPcResponse(ITEMPC_GO_BACK_TO_PREV);
FillWindowPixelBuffer(windowId, 17);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
AddTextPrinterParameterized(windowId, 1, description, 0, 1, 0, NULL);
}
@ -1005,7 +1005,7 @@ static void sub_816BFE0(u8 y, u8 b, u8 speed)
{
u8 windowId = gUnknown_0203BCC4->windowIds[0];
if (b == 0xFF)
FillWindowPixelRect(windowId, 17, 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
FillWindowPixelRect(windowId, PIXEL_FILL(1), 0, y, GetMenuCursorDimensionByFont(1, 0), GetMenuCursorDimensionByFont(1, 1));
else
AddTextPrinterParameterized4(windowId, 1, 0, y, 0, 0, gUnknown_085DFF8C, speed, gText_SelectorArrow2);
}
@ -1123,7 +1123,7 @@ static const u8* ItemStorage_GetItemPcResponse(u16 itemId)
static void ItemStorage_PrintItemPcResponse(const u8 *string)
{
u8 windowId = gUnknown_0203BCC4->windowIds[1];
FillWindowPixelBuffer(windowId, 0x11);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
StringExpandPlaceholders(gStringVar4, string);
AddTextPrinterParameterized(windowId, 1, gStringVar4, 0, 1, 0, NULL);
}
@ -1170,7 +1170,7 @@ static void ItemStorage_GoBackToPlayerPCMenu_InitStorage(u8 taskId)
data = gTasks[taskId].data;
if (!IsDma3ManagerBusyWithBgCopy())
{
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
if (!data[3])
InitItemStorageMenu(taskId, ITEMPC_MENU_WITHDRAW);
else

View File

@ -665,7 +665,7 @@ static void HandleInitWindows(void)
for (i = 0; i < ARRAY_COUNT(sWindowTemplatesForPokeblockMenu) - 1; i++)
{
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
}
schedule_bg_copy_tilemap_to_vram(0);
@ -749,7 +749,7 @@ static void sub_8135FCC(s32 pkblId)
struct Pokeblock *pokeblock;
u16 rectTilemapSrc[2];
FillWindowPixelBuffer(7, 0);
FillWindowPixelBuffer(7, PIXEL_FILL(0));
if (pkblId != LIST_CANCEL)
{
@ -1120,7 +1120,7 @@ static void PutPokeblockOptionsWindow(u8 taskId)
data[1] = 9;
sub_8136418();
SetWindowBorderStyle(data[1], 0, 1, 0xE);
DrawStdFrameWithCustomTileAndPalette(data[1], 0, 1, 0xE);
sub_81995E4(data[1], sPokeblockMenu->optionsNo, sPokeblockMenuActions, sPokeblockMenu->pokeblockOptionsIds);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[1], sPokeblockMenu->optionsNo, 0);
PutWindowTilemap(data[1]);
@ -1173,7 +1173,7 @@ static void PokeblockAction_Toss(u8 taskId)
{
s16 *data = gTasks[taskId].data;
sub_8198070(data[1], FALSE);
ClearStdWindowAndFrameToTransparent(data[1], FALSE);
StringCopy(gStringVar1, gPokeblockNames[gSaveBlock1Ptr->pokeblocks[gSpecialVar_ItemId].color]);
StringExpandPlaceholders(gStringVar4, gText_ThrowAwayVar1);
DisplayMessageAndContinueTask(taskId, 10, 10, 13, 1, GetPlayerTextSpeedDelay(), gStringVar4, CreateTossPokeblockYesNoMenu);
@ -1219,7 +1219,7 @@ static void HandleErasePokeblock(u8 taskId)
static void TossPokeblockChoice_No(u8 taskId)
{
sub_8197DF8(10, FALSE);
ClearDialogWindowAndFrameToTransparent(10, FALSE);
schedule_bg_copy_tilemap_to_vram(1);
sub_81363BC();
gTasks[taskId].func = Task_HandlePokeblockMenuInput;
@ -1266,7 +1266,7 @@ static void PokeblockAction_Cancel(u8 taskId)
{
s16 *data = gTasks[taskId].data;
sub_8198070(data[1], FALSE);
ClearStdWindowAndFrameToTransparent(data[1], FALSE);
schedule_bg_copy_tilemap_to_vram(1);
sub_81363BC();
gTasks[taskId].func = Task_HandlePokeblockMenuInput;

View File

@ -581,7 +581,7 @@ static bool8 TransitionToPokeblockFeedScene(void)
gMain.state++;
break;
case 10:
SetWindowBorderStyle(0, 1, 1, 14);
DrawStdFrameWithCustomTileAndPalette(0, 1, 1, 14);
gMain.state++;
break;
case 11:
@ -704,7 +704,7 @@ static void HandleInitWindows(void)
DeactivateAllTextPrinters();
LoadUserWindowBorderGfx(0, 1, 0xE0);
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
PutWindowTilemap(0);
schedule_bg_copy_tilemap_to_vram(0);
}

View File

@ -2152,7 +2152,7 @@ static void CreateCaughtBall(u16 a, u8 x, u8 y, u16 unused)
if (a)
BlitBitmapToWindow(0, gUnknown_0855D2BE, x * 8, y * 8, 8, 16);
else
FillWindowPixelRect(0, 0, x * 8, y * 8, 8, 16);
FillWindowPixelRect(0, PIXEL_FILL(0), x * 8, y * 8, 8, 16);
}
static u8 CreateMonName(u16 num, u8 left, u8 top)
@ -2170,7 +2170,7 @@ static u8 CreateMonName(u16 num, u8 left, u8 top)
void sub_80BD28C(u8 x, u8 y, u16 unused)
{
FillWindowPixelRect(0, 0, x * 8, y * 8, 0x60, 16);
FillWindowPixelRect(0, PIXEL_FILL(0), x * 8, y * 8, 0x60, 16);
}
static void CreateInitialPokemonSprites(u16 selectedMon, u16 b)
@ -2927,7 +2927,7 @@ void sub_80BEA24(u8 taskId)
case 1:
DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0);
CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0);
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
PutWindowTilemap(0);
PutWindowTilemap(1);
sub_80C0D30(1, sPokedexListItem->dexNum);
@ -3222,7 +3222,7 @@ void sub_80BF250(u8 taskId)
case 1:
DecompressAndLoadBgGfxUsingHeap(3, &gPokedexMenu_Gfx, 0x2000, 0, 0);
CopyToBgTilemapBuffer(3, &gPokedexTilemap_CryScreen, 0, 0);
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
PutWindowTilemap(0);
PutWindowTilemap(3);
PutWindowTilemap(2);
@ -3416,7 +3416,7 @@ void sub_80BF82C(u8 taskId)
case 1:
DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0);
CopyToBgTilemapBuffer(3, gPokedexTilemap_SizeScreen, 0, 0);
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
PutWindowTilemap(0);
gMain.state++;
break;
@ -3766,7 +3766,7 @@ void sub_80BFE38(u8 taskId)
case 1:
DecompressAndLoadBgGfxUsingHeap(3, gPokedexMenu_Gfx, 0x2000, 0, 0);
CopyToBgTilemapBuffer(3, gPokedexTilemap_DescriptionScreen, 0, 0);
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
PutWindowTilemap(0);
PutWindowTilemap(1);
sub_80C0D30(1, gTasks[taskId].data[1]);
@ -4784,7 +4784,7 @@ void sub_80C1270(const u8 *str, u32 left, u32 top)
void sub_80C12B0(u32 x, u32 y, u32 width, u32 height)
{
FillWindowPixelRect(0, 0, x, y, width, height);
FillWindowPixelRect(0, PIXEL_FILL(0), x, y, width, height);
}
void sub_80C12E0(u8 taskId)

View File

@ -1552,7 +1552,7 @@ void sub_80C6D80(const u8 *string, void *dst, u8 arg2, u8 arg3, s32 arg4)
winTemplate.width = 24;
winTemplate.height = 2;
windowId = AddWindow(&winTemplate);
FillWindowPixelBuffer(windowId, (arg3 << 4) | arg3);
FillWindowPixelBuffer(windowId, PIXEL_FILL(arg3));
tileData1 = (u8*) GetWindowAttribute(windowId, WINDOW_TILE_DATA);
tileData2 = (winTemplate.width * 32) + tileData1;
@ -1599,7 +1599,7 @@ void sub_80C6EAC(const u8 *string, void *dst, u16 arg2, u8 arg3, u8 clr2, u8 clr
winTemplate.height = 2;
var = winTemplate.width * 32;
windowId = AddWindow(&winTemplate);
FillWindowPixelBuffer(windowId, (arg3 << 4) | arg3);
FillWindowPixelBuffer(windowId, PIXEL_FILL(arg3));
tileData1 = (u8*) GetWindowAttribute(windowId, WINDOW_TILE_DATA);
tileData2 = (winTemplate.width * 32) + tileData1;
txtColor[0] = arg3;
@ -1736,8 +1736,8 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
case 0:
CreatePCMenu(task->data[1], &task->data[15]);
sub_81973A4();
NewMenuHelpers_DrawDialogueFrame(0, 0);
FillWindowPixelBuffer(0, 0x11);
DrawDialogueFrame(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, TEXT_SPEED_FF, NULL, 2, 1, 3);
CopyWindowToVram(0, 3);
CopyWindowToVram(task->data[15], 3);
@ -1763,13 +1763,13 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
if (task->data[1] != task->data[3])
{
task->data[1] = task->data[3];
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
}
break;
case MENU_B_PRESSED:
case 4:
sub_819746C(task->data[15], TRUE);
ClearStdWindowAndFrame(task->data[15], TRUE);
ScriptContext2_Disable();
EnableBothScriptContexts();
RemoveWindow(task->data[15]);
@ -1778,13 +1778,13 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
default:
if (task->data[2] == 0 && CountPartyMons() == PARTY_SIZE)
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gText_PartyFull, 0, NULL, 2, 1, 3);
task->data[0] = 3;
}
else if (task->data[2] == 1 && CountPartyMons() == 1)
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gText_JustOnePkmn, 0, NULL, 2, 1, 3);
task->data[0] = 3;
}
@ -1799,7 +1799,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
case 3:
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
task->data[0] = 2;
}
@ -1809,7 +1809,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
task->data[1] = 4;
Menu_MoveCursor(-1);
task->data[1] = Menu_GetCursorPos();
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
task->data[0] = 2;
}
@ -1819,7 +1819,7 @@ static void Task_PokemonStorageSystemPC(u8 taskId)
task->data[1] = 0;
Menu_MoveCursor(1);
task->data[1] = Menu_GetCursorPos();
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_085716C0[task->data[1]].desc, 0, NULL, 2, 1, 3);
task->data[0] = 2;
}
@ -1865,7 +1865,7 @@ static void CreatePCMenu(u8 whichMenu, s16 *windowIdPtr)
winTemplate.width = GetMaxWidthInMenuTable((void *)gUnknown_085716C0, ARRAY_COUNT(gUnknown_085716C0));
windowId = AddWindow(&winTemplate);
NewMenuHelpers_DrawStdWindowFrame(windowId, FALSE);
DrawStdWindowFrame(windowId, FALSE);
PrintMenuTable(windowId, ARRAY_COUNT(gUnknown_085716C0), (void *)gUnknown_085716C0);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(windowId, ARRAY_COUNT(gUnknown_085716C0), whichMenu);
*windowIdPtr = windowId;
@ -2103,7 +2103,7 @@ static void sub_80C7BE4(void)
winTemplate.height = 4;
windowId = AddWindow(&winTemplate);
FillWindowPixelBuffer(windowId, 0x44);
FillWindowPixelBuffer(windowId, PIXEL_FILL(4));
center = GetStringCenterAlignXOffset(1, boxName, 64);
AddTextPrinterParameterized3(windowId, 1, center, 1, gUnknown_08571734, TEXT_SPEED_FF, boxName);
@ -4107,7 +4107,7 @@ static void LoadCursorMonGfx(u16 species, u32 pid)
static void PrintCursorMonInfo(void)
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
if (sPSSData->boxOption != BOX_OPTION_MOVE_ITEMS)
{
AddTextPrinterParameterized(0, 1, sPSSData->cursorMonNickText, 6, 0, TEXT_SPEED_FF, NULL);
@ -4416,7 +4416,7 @@ static void PrintStorageActionText(u8 id)
}
DynamicPlaceholderTextUtil_ExpandPlaceholders(sPSSData->field_2190, gPCStorageActionTexts[id].text);
FillWindowPixelBuffer(1, 0x11);
FillWindowPixelBuffer(1, PIXEL_FILL(1));
AddTextPrinterParameterized(1, 1, sPSSData->field_2190, 0, 1, TEXT_SPEED_FF, NULL);
sub_8098858(1, 2, 14);
PutWindowTilemap(1);
@ -4432,7 +4432,7 @@ static void ShowYesNoWindow(s8 cursorPos)
static void ClearBottomWindow(void)
{
sub_8198070(1, FALSE);
ClearStdWindowAndFrameToTransparent(1, FALSE);
schedule_bg_copy_tilemap_to_vram(0);
}
@ -6501,7 +6501,7 @@ static void InitCanRelaseMonVars(void)
}
sub_80CE350(sPSSData->field_2176);
sPSSData->field_2174 = GetMonData(&sPSSData->field_2108, MON_DATA_KNOWN_MOVES, sPSSData->field_2176);
sPSSData->field_2174 = GetMonData(&sPSSData->field_2108, MON_DATA_KNOWN_MOVES, (u8*)sPSSData->field_2176);
if (sPSSData->field_2174 != 0)
{
sPSSData->field_216D = 0;
@ -6559,7 +6559,7 @@ static s8 RunCanReleaseMon(void)
{
if (sPSSData->field_2170 != TOTAL_BOXES_COUNT || sPSSData->field_2171 != i)
{
knownMoves = GetMonData(gPlayerParty + i, MON_DATA_KNOWN_MOVES, sPSSData->field_2176);
knownMoves = GetMonData(gPlayerParty + i, MON_DATA_KNOWN_MOVES, (u8*)sPSSData->field_2176);
sPSSData->field_2174 &= ~(knownMoves);
}
}
@ -6578,7 +6578,7 @@ static s8 RunCanReleaseMon(void)
case 1:
for (i = 0; i < IN_BOX_COUNT; i++)
{
knownMoves = GetAndCopyBoxMonDataAt(sPSSData->field_216E, sPSSData->field_216F, MON_DATA_KNOWN_MOVES, sPSSData->field_2176);
knownMoves = GetAndCopyBoxMonDataAt(sPSSData->field_216E, sPSSData->field_216F, MON_DATA_KNOWN_MOVES, (u8*)sPSSData->field_2176);
if (knownMoves != 0
&& !(sPSSData->field_2170 == sPSSData->field_216E && sPSSData->field_2171 == sPSSData->field_216F))
{
@ -8733,7 +8733,7 @@ static void AddMenu(void)
sPSSData->menuWindow.tilemapTop = 15 - sPSSData->menuWindow.height;
sPSSData->field_CB0 = AddWindow(&sPSSData->menuWindow);
ClearWindowTilemap(sPSSData->field_CB0);
SetWindowBorderStyle(sPSSData->field_CB0, FALSE, 11, 14);
DrawStdFrameWithCustomTileAndPalette(sPSSData->field_CB0, FALSE, 11, 14);
PrintMenuTable(sPSSData->field_CB0, sPSSData->menuItemsCount, (void*)sPSSData->menuItems);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sPSSData->field_CB0, sPSSData->menuItemsCount, 0);
schedule_bg_copy_tilemap_to_vram(0);
@ -8787,7 +8787,7 @@ static s16 sub_80D00AC(void)
static void sub_80D013C(void)
{
sub_8198070(sPSSData->field_CB0, TRUE);
ClearStdWindowAndFrameToTransparent(sPSSData->field_CB0, TRUE);
RemoveWindow(sPSSData->field_CB0);
}
@ -8835,7 +8835,7 @@ static bool8 sub_80D0164(void)
sPSSData->field_2200 = AddWindow8Bit(&gUnknown_0857BB1C);
if (sPSSData->field_2200 != 0xFF)
{
FillWindowPixelBuffer(sPSSData->field_2200, 0);
FillWindowPixelBuffer(sPSSData->field_2200, PIXEL_FILL(0));
return TRUE;
}
}
@ -8892,7 +8892,7 @@ static bool8 sub_80D024C(void)
ChangeBgX(0, -1024, 0);
ChangeBgY(0, -1024, 0);
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20);
FillWindowPixelBuffer8Bit(sPSSData->field_2200, 0);
FillWindowPixelBuffer8Bit(sPSSData->field_2200, PIXEL_FILL(0));
sub_80D07B0(sMoveMonsPtr->fromRow, sMoveMonsPtr->fromColumn);
SetBgAttribute(0, BG_ATTR_PALETTEMODE, 1);
PutWindowTilemap(sPSSData->field_2200);
@ -9194,7 +9194,7 @@ static void sub_80D0834(u8 arg0, u8 arg1)
if (species != SPECIES_NONE)
{
FillWindowPixelRect8Bit(sPSSData->field_2200,
0,
PIXEL_FILL(0),
24 * arg0,
24 * arg1,
32,
@ -9911,7 +9911,7 @@ static void PrintItemDescription(void)
else
description = ItemId_GetDescription(sPSSData->cursorMonItem);
FillWindowPixelBuffer(2, 0x11);
FillWindowPixelBuffer(2, PIXEL_FILL(1));
AddTextPrinterParameterized5(2, 1, description, 4, 0, 0, NULL, 0, 1);
}
@ -10357,7 +10357,7 @@ bool32 AnyStorageMonWithMove(u16 moveId)
{
if (GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_SANITY_HAS_SPECIES)
&& !GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_SANITY_IS_EGG)
&& GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_KNOWN_MOVES, moves))
&& GetBoxMonData(&gPokemonStoragePtr->boxes[i][j], MON_DATA_KNOWN_MOVES, (u8*)moves))
return TRUE;
}
}

View File

@ -1349,7 +1349,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *a)
}
break;
case 3:
GetMonData(a, MON_DATA_OT_NAME, &sum->OTName);
GetMonData(a, MON_DATA_OT_NAME, sum->OTName);
ConvertInternationalString((u8*)&sum->OTName, GetMonData(a, MON_DATA_LANGUAGE));
sum->unk7 = sub_81B205C(a);
sum->OTGender = GetMonData(a, MON_DATA_OT_GENDER);
@ -2629,7 +2629,7 @@ static void ResetWindows(void)
for (i = 0; i < 20; i++)
{
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
}
for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++)
{
@ -2644,9 +2644,9 @@ static void SummaryScreen_PrintTextOnWindow(u8 windowId, const u8 *string, u8 x,
static void sub_81C25E8(void)
{
FillWindowPixelBuffer(17, 0);
FillWindowPixelBuffer(18, 0);
FillWindowPixelBuffer(19, 0);
FillWindowPixelBuffer(17, PIXEL_FILL(0));
FillWindowPixelBuffer(18, PIXEL_FILL(0));
FillWindowPixelBuffer(19, PIXEL_FILL(0));
if (!pssData->summary.isEgg)
sub_81C2628();
else
@ -2898,7 +2898,7 @@ static u8 AddWindowFromTemplateList(const struct WindowTemplate *template, u8 te
if (*windowIdPtr == 0xFF)
{
*windowIdPtr = AddWindow(&template[templateId]);
FillWindowPixelBuffer(*windowIdPtr, 0);
FillWindowPixelBuffer(*windowIdPtr, PIXEL_FILL(0));
}
return *windowIdPtr;
}
@ -2920,7 +2920,7 @@ static void PrintPageSpecificText(u8 pageIndex)
for (i = 0; i < ARRAY_COUNT(pssData->windowIds); i++)
{
if (pssData->windowIds[i] != 0xFF)
FillWindowPixelBuffer(pssData->windowIds[i], 0);
FillWindowPixelBuffer(pssData->windowIds[i], PIXEL_FILL(0));
}
sTextPrinterFunctions[pageIndex]();
}
@ -3469,7 +3469,7 @@ static void PrintMovePowerAndAccuracy(u16 moveIndex)
const u8 *text;
if (moveIndex != 0)
{
FillWindowPixelRect(14, 0, 53, 0, 19, 32);
FillWindowPixelRect(14, PIXEL_FILL(0), 53, 0, 19, 32);
if (gBattleMoves[moveIndex].power < 2)
{
@ -3567,7 +3567,7 @@ static void PrintContestMoveDescription(u8 moveSlot)
static void PrintMoveDetails(u16 move)
{
u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, 2);
FillWindowPixelBuffer(windowId, 0);
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
if (move != MOVE_NONE)
{
if (pssData->currPageIndex == 2)
@ -3619,7 +3619,7 @@ static void PrintNewMoveDetailsOrCancelText(void)
static void sub_81C4064(void)
{
u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, 0);
FillWindowPixelRect(windowId, 0, 0, 66, 72, 16);
FillWindowPixelRect(windowId, PIXEL_FILL(0), 0, 66, 72, 16);
CopyWindowToVram(windowId, 2);
}
@ -3628,11 +3628,11 @@ static void sub_81C40A0(u8 moveIndex1, u8 moveIndex2)
u8 windowId1 = AddWindowFromTemplateList(sPageMovesTemplate, 0);
u8 windowId2 = AddWindowFromTemplateList(sPageMovesTemplate, 1);
FillWindowPixelRect(windowId1, 0, 0, moveIndex1 * 16, 0x48, 0x10);
FillWindowPixelRect(windowId1, 0, 0, moveIndex2 * 16, 0x48, 0x10);
FillWindowPixelRect(windowId1, PIXEL_FILL(0), 0, moveIndex1 * 16, 0x48, 0x10);
FillWindowPixelRect(windowId1, PIXEL_FILL(0), 0, moveIndex2 * 16, 0x48, 0x10);
FillWindowPixelRect(windowId2, 0, 0, moveIndex1 * 16, 0x30, 0x10);
FillWindowPixelRect(windowId2, 0, 0, moveIndex2 * 16, 0x30, 0x10);
FillWindowPixelRect(windowId2, PIXEL_FILL(0), 0, moveIndex1 * 16, 0x30, 0x10);
FillWindowPixelRect(windowId2, PIXEL_FILL(0), 0, moveIndex2 * 16, 0x30, 0x10);
PrintMoveNameAndPP(moveIndex1);
PrintMoveNameAndPP(moveIndex2);
@ -3641,7 +3641,7 @@ static void sub_81C40A0(u8 moveIndex1, u8 moveIndex2)
static void PrintHMMovesCantBeForgotten(void)
{
u8 windowId = AddWindowFromTemplateList(sPageMovesTemplate, 2);
FillWindowPixelBuffer(windowId, 0);
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
SummaryScreen_PrintTextOnWindow(windowId, gText_HMMovesCantBeForgotten2, 6, 1, 0, 0);
}

View File

@ -1138,8 +1138,8 @@ bool32 IsDma3ManagerBusyWithBgCopy_(void)
void sub_81C7BF8(u32 windowId)
{
FillWindowPixelBuffer(windowId, 0x44);
FillWindowPixelRect(windowId, 0x55, 0, 0, 0x80, 1);
FillWindowPixelBuffer(windowId, PIXEL_FILL(4));
FillWindowPixelRect(windowId, PIXEL_FILL(5), 0, 0, 0x80, 1);
}
void sub_81C7C28(void)

View File

@ -293,7 +293,7 @@ static void ReceiveExchangePacket(u32 which)
static void PrintTextOnRecordMixing(const u8 *src)
{
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized(0, 1, src, 0, 1, 0, NULL);
CopyWindowToVram(0, 3);
}
@ -372,7 +372,7 @@ static void Task_RecordMixing_Main(u8 taskId)
{
CreateTask(sub_80AF2B4, 10);
}
sub_8197434(0, 1);
ClearDialogWindowAndFrame(0, 1);
DestroyTask(taskId);
EnableBothScriptContexts();
}

View File

@ -1622,7 +1622,7 @@ void MCB2_FlyMap(void)
case 7:
LoadPalette(sRegionMapFramePal, 0x10, 0x20);
PutWindowTilemap(2);
FillWindowPixelBuffer(2, 0x00);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
AddTextPrinterParameterized(2, 1, gText_FlyToWhere, 0, 1, 0, NULL);
schedule_bg_copy_tilemap_to_vram(0);
gMain.state++;
@ -1687,8 +1687,8 @@ static void sub_8124904(void)
{
StringLength(gUnknown_085A1EDC[i].name[sFlyMap->regionMap.posWithinMapSec]);
flag = TRUE;
sub_8198070(0, FALSE);
SetWindowBorderStyle(1, FALSE, 0x65, 0x0d);
ClearStdWindowAndFrameToTransparent(0, FALSE);
DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x65, 0x0d);
AddTextPrinterParameterized(1, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
name = gUnknown_085A1EDC[i].name[sFlyMap->regionMap.posWithinMapSec];
AddTextPrinterParameterized(1, 1, name, GetStringRightAlignXOffset(1, name, 0x60), 0x11, 0, NULL);
@ -1702,12 +1702,12 @@ static void sub_8124904(void)
{
if (gUnknown_03001180 == TRUE)
{
sub_8198070(1, FALSE);
SetWindowBorderStyle(0, FALSE, 0x65, 0x0d);
ClearStdWindowAndFrameToTransparent(1, FALSE);
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x65, 0x0d);
}
else
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
}
AddTextPrinterParameterized(0, 1, sFlyMap->regionMap.mapSecName, 0, 1, 0, NULL);
schedule_bg_copy_tilemap_to_vram(0);
@ -1718,10 +1718,10 @@ static void sub_8124904(void)
{
if (gUnknown_03001180 == TRUE)
{
sub_8198070(1, FALSE);
SetWindowBorderStyle(0, FALSE, 0x65, 0x0d);
ClearStdWindowAndFrameToTransparent(1, FALSE);
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x65, 0x0d);
}
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
CopyWindowToVram(0, 2);
schedule_bg_copy_tilemap_to_vram(0);
gUnknown_03001180 = FALSE;

View File

@ -290,7 +290,7 @@ static void FreeCursorPalette(void)
static void HideChooseTimeWindow(u8 windowId)
{
sub_8198070(windowId, FALSE);
ClearStdWindowAndFrameToTransparent(windowId, FALSE);
RemoveWindow(windowId);
schedule_bg_copy_tilemap_to_vram(0);
}
@ -319,7 +319,7 @@ static void PrintTime(u8 windowId, u8 x, u8 y, u16 days, u8 hours, u8 minutes, u
static void ShowChooseTimeWindow(u8 windowId, u16 days, u8 hours, u8 minutes, u8 seconds)
{
SetWindowBorderStyle(windowId, FALSE, 0x214, 0xE);
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, 0x214, 0xE);
PrintTime(windowId, 0, 1, days, hours, minutes, seconds);
AddTextPrinterParameterized(windowId, 1, gText_Confirm2, 126, 1, 0, NULL);
schedule_bg_copy_tilemap_to_vram(0);
@ -495,7 +495,7 @@ static void VBlankCB(void)
static void ShowMessage(const u8 *str)
{
sub_8197B1C(1, FALSE, 0x200, 0xF);
DrawDialogFrameWithCustomTileAndPalette(1, FALSE, 0x200, 0xF);
AddTextPrinterParameterized(1, 1, str, 0, 1, 0, NULL);
schedule_bg_copy_tilemap_to_vram(0);
}
@ -507,7 +507,7 @@ static void Task_ShowResetRtcPrompt(u8 taskId)
switch (data[0])
{
case 0:
SetWindowBorderStyle(0, FALSE, 0x214, 0xE);
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x214, 0xE);
AddTextPrinterParameterized(0, 1, gText_PresentTime, 0, 1, TEXT_SPEED_FF, 0);
PrintTime(
0,
@ -574,7 +574,7 @@ static void Task_ResetRtcScreen(u8 taskId)
case 2:
if (gTasks[data[1]].isActive != TRUE)
{
sub_8198070(0, FALSE);
ClearStdWindowAndFrameToTransparent(0, FALSE);
ShowMessage(gText_PleaseResetTime);
gLocalTime = gSaveBlock2Ptr->lastBerryTreeUpdate;
data[1] = CreateTask(Task_ResetRtc_0, 80);

View File

@ -387,7 +387,7 @@ void nullsub_89(void)
void sub_80124EC(u8 windowId, u8 arg1, u8 stringId)
{
FillWindowPixelBuffer(windowId, 0x11);
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
switch (arg1 << 8)
{
case 0x200:
@ -506,17 +506,17 @@ void sub_8012780(u8 taskId)
}
data->field_11 = AddWindow(&gUnknown_082F012C);
FillWindowPixelBuffer(data->field_10, 0x22);
FillWindowPixelBuffer(data->field_10, PIXEL_FILL(2));
sub_80173E0(data->field_10, 0, gUnknown_082EDBC4, 8, 1, 4);
PutWindowTilemap(data->field_10);
CopyWindowToVram(data->field_10, 2);
NewMenuHelpers_DrawStdWindowFrame(data->listWindowId, FALSE);
DrawStdWindowFrame(data->listWindowId, FALSE);
gMultiuseListMenuTemplate = gUnknown_082F015C;
gMultiuseListMenuTemplate.windowId = data->listWindowId;
data->listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0);
NewMenuHelpers_DrawStdWindowFrame(data->field_11, FALSE);
DrawStdWindowFrame(data->field_11, FALSE);
PutWindowTilemap(data->field_11);
CopyWindowToVram(data->field_11, 2);
@ -786,10 +786,10 @@ void sub_8012780(u8 taskId)
void sub_8012F64(struct UnkStruct_Leader *data)
{
ClearWindowTilemap(data->field_11);
sub_819746C(data->field_11, FALSE);
ClearStdWindowAndFrame(data->field_11, FALSE);
DestroyListMenuTask(data->listTaskId, 0, 0);
ClearWindowTilemap(data->field_10);
sub_819746C(data->listWindowId, FALSE);
ClearStdWindowAndFrame(data->listWindowId, FALSE);
CopyBgTilemapBufferToVram(0);
RemoveWindow(data->field_11);
RemoveWindow(data->listWindowId);
@ -1075,17 +1075,17 @@ void sub_80134E8(u8 taskId)
data->listWindowId = AddWindow(&gUnknown_082F0174);
data->field_D = AddWindow(&gUnknown_082F017C);
FillWindowPixelBuffer(data->field_C, 0x22);
FillWindowPixelBuffer(data->field_C, PIXEL_FILL(2));
sub_80173E0(data->field_C, 0, gUnknown_082EF7DC, 8, 1, 4);
PutWindowTilemap(data->field_C);
CopyWindowToVram(data->field_C, 2);
NewMenuHelpers_DrawStdWindowFrame(data->listWindowId, FALSE);
DrawStdWindowFrame(data->listWindowId, FALSE);
gMultiuseListMenuTemplate = gUnknown_082F0204;
gMultiuseListMenuTemplate.windowId = data->listWindowId;
data->listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0);
NewMenuHelpers_DrawStdWindowFrame(data->field_D, FALSE);
DrawStdWindowFrame(data->field_D, FALSE);
PutWindowTilemap(data->field_D);
sub_80125BC(data->field_D);
CopyWindowToVram(data->field_D, 2);
@ -1254,10 +1254,10 @@ void sub_80134E8(u8 taskId)
case 18:
case 20:
ClearWindowTilemap(data->field_D);
sub_819746C(data->field_D, FALSE);
ClearStdWindowAndFrame(data->field_D, FALSE);
DestroyListMenuTask(data->listTaskId, 0, 0);
ClearWindowTilemap(data->field_C);
sub_819746C(data->listWindowId, FALSE);
ClearStdWindowAndFrame(data->listWindowId, FALSE);
CopyBgTilemapBufferToVram(0);
RemoveWindow(data->field_D);
RemoveWindow(data->listWindowId);
@ -2155,7 +2155,7 @@ void sub_8014F48(u8 taskId)
data->listTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0);
sub_8018784(data->field_D);
FillWindowPixelBuffer(data->field_D, 0x11);
FillWindowPixelBuffer(data->field_D, PIXEL_FILL(1));
PutWindowTilemap(data->field_D);
sub_80125BC(data->field_D);
CopyWindowToVram(data->field_D, 2);

View File

@ -973,7 +973,7 @@ static void sub_81405CC(void)
sub_814372C(6);
sub_81436D0(0);
sub_81424FC(0);
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5B89, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
gSpriteCoordOffsetX = -60;
@ -1043,8 +1043,8 @@ static void sub_81408A8(u8 taskId)
static void sub_8140914(u8 taskId)
{
DisplayYesNoMenu();
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, 0);
DisplayYesNoMenuDefaultYes();
DrawStdWindowFrame(gUnknown_0203AB8C, 0);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C13, 0, 1, TEXT_SPEED_FF, 0);
CopyWindowToVram(gUnknown_0203AB8C, 3);
DoYesNoFuncWithChoice(taskId, &gUnknown_085B6410);
@ -1052,7 +1052,7 @@ static void sub_8140914(u8 taskId)
static void sub_8140968(u8 taskId)
{
sub_819746C(0, TRUE);
ClearStdWindowAndFrame(0, TRUE);
gTasks[taskId].func = sub_8140BD0;
}
@ -1808,14 +1808,14 @@ static void sub_814189C(u8 taskId)
if (gTasks[taskId].data[2] == 12)
{
PlayFanfare(MUS_ME_B_BIG);
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5BD7, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
}
else
{
PlayFanfare(MUS_ME_B_SMALL);
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5BCB, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
}
@ -1823,7 +1823,7 @@ static void sub_814189C(u8 taskId)
case 0:
default:
m4aSongNumStart(SE_HAZURE);
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5BE0, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
break;
@ -1867,7 +1867,7 @@ static void sub_8141A18(u8 taskId)
{
ConvertIntToDecimalStringN(gStringVar1, (gUnknown_0203AB88->var19 * gTasks[taskId].data[2]), STR_CONV_MODE_LEFT_ALIGN, 2);
StringExpandPlaceholders(gStringVar4, gUnknown_082A5BEF);
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
gTasks[taskId].data[1] = (gUnknown_0203AB88->var19 * gTasks[taskId].data[2]);
@ -1900,14 +1900,14 @@ static void sub_8141B58(u8 taskId)
{
if (gTasks[taskId].data[6] == 6)
{
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C21, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
sub_8141F7C(taskId, dp01t_12_3_battle_menu, 0xFFFF, 3);
}
else if (gTasks[taskId].data[13] == 9999)
{
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C61, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
sub_8141F7C(taskId, sub_8140914, 0xFFFF, 0x3);
@ -1919,7 +1919,7 @@ static void sub_8141B58(u8 taskId)
}
else
{
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C04, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
sub_8141F7C(taskId, sub_8140994, 0x3C, 0x3);
@ -1944,7 +1944,7 @@ static void dp01t_12_3_battle_menu(u8 taskId)
if (gTasks[taskId].data[13] == 9999)
{
NewMenuHelpers_DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
DrawStdWindowFrame(gUnknown_0203AB8C, FALSE);
AddTextPrinterParameterized(gUnknown_0203AB8C, 1, gUnknown_082A5C61, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(gUnknown_0203AB8C, 3);
sub_8141F7C(taskId, sub_8140914, 0xFFFF, 3);
@ -3256,7 +3256,7 @@ static const struct SpriteTemplate gUnknown_085B7AEC =
static void sub_81428C4(u8 r0)
{
DisplayYesNoMenu();
DisplayYesNoMenuDefaultYes();
DoYesNoFuncWithChoice(r0, &gUnknown_085B6408);
}
@ -3272,7 +3272,7 @@ static void sub_81428E4(u8 taskId)
static void sub_8142918(u8 taskId)
{
sub_819746C(0, TRUE);
ClearStdWindowAndFrame(0, TRUE);
HideCoinsWindow();
FreeAllWindowBuffers();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
@ -3283,7 +3283,7 @@ static void sub_8142918(u8 taskId)
static void sub_814297C(u8 taskId)
{
sub_819746C(0, FALSE);
ClearStdWindowAndFrame(0, FALSE);
HideCoinsWindow();
ScriptContext2_Disable();
DestroyTask(taskId);
@ -3296,7 +3296,7 @@ static void sub_81429A0(u8 taskId)
{
gSpecialVar_0x8004 = 1;
HideCoinsWindow();
sub_819746C(0, TRUE);
ClearStdWindowAndFrame(0, TRUE);
ScriptContext2_Disable();
DestroyTask(taskId);
}
@ -3309,7 +3309,7 @@ static void sub_81429F0(u8 taskId)
u32 temp = gUnknown_085B6344[(gSpecialVar_0x8004 & 1) + (gSpecialVar_0x8004 >> 7 << 1)];
ConvertIntToDecimalStringN(gStringVar1, temp, STR_CONV_MODE_LEADING_ZEROS, 1);
StringExpandPlaceholders(gStringVar4, gUnknown_082A5B12);
NewMenuHelpers_DrawStdWindowFrame(0, FALSE);
DrawStdWindowFrame(0, FALSE);
AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(0, 3);
gTasks[taskId].func = sub_81428C4;
@ -3326,7 +3326,7 @@ static void Task_Roulette_0(u8 taskId)
{
if ((gSpecialVar_0x8004 & 0x80) && (gSpecialVar_0x8004 & 1))
{
NewMenuHelpers_DrawStdWindowFrame(0, FALSE);
DrawStdWindowFrame(0, FALSE);
AddTextPrinterParameterized(0, 1, gUnknown_082A5B6B, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(0, 3);
gTasks[taskId].func = sub_81429F0;
@ -3334,7 +3334,7 @@ static void Task_Roulette_0(u8 taskId)
else
{
StringExpandPlaceholders(gStringVar4, gUnknown_082A5B12);
NewMenuHelpers_DrawStdWindowFrame(0, FALSE);
DrawStdWindowFrame(0, FALSE);
AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(0, 3);
gTasks[taskId].func = sub_81428C4;
@ -3343,7 +3343,7 @@ static void Task_Roulette_0(u8 taskId)
else
{
StringExpandPlaceholders(gStringVar4, gUnknown_082A5B4E);
NewMenuHelpers_DrawStdWindowFrame(0, FALSE);
DrawStdWindowFrame(0, FALSE);
AddTextPrinterParameterized(0, 1, gStringVar4, 0, 1, TEXT_SPEED_FF, NULL);
CopyWindowToVram(0, 3);
gTasks[taskId].func = sub_81429A0;

View File

@ -229,10 +229,10 @@ static void CB2_SaveFailedScreen(void)
LoadPalette(sSaveFailedClockPal, 0x100, 0x20);
LoadPalette(gTextWindowFrame1_Pal, 0xE0, 0x20);
LoadPalette(gUnknown_0860F074, 0xF0, 0x20);
SetWindowBorderStyle(gSaveFailedWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE);
SetWindowBorderStyle(gSaveFailedWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE);
FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], 0x11); // backwards?
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
DrawStdFrameWithCustomTileAndPalette(gSaveFailedWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE);
DrawStdFrameWithCustomTileAndPalette(gSaveFailedWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE);
FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], PIXEL_FILL(1)); // backwards?
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1));
CopyWindowToVram(gSaveFailedWindowIds[CLOCK_WIN_ID], 2); // again?
CopyWindowToVram(gSaveFailedWindowIds[TEXT_WIN_ID], 1);
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
@ -265,19 +265,19 @@ static void CB2_WipeSave(void)
{
if (WipeSectors(gDamagedSaveSectors) != FALSE)
{
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1));
SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0);
SetMainCallback2(CB2_GameplayCannotBeContinued);
return;
}
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1));
SaveFailedScreenTextPrint(gText_CheckCompleted, 1, 0);
HandleSavingData(gSaveFailedType);
if (gDamagedSaveSectors != 0)
{
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1));
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
}
@ -286,12 +286,12 @@ static void CB2_WipeSave(void)
if (wipeTries == 3)
{
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1));
SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0);
}
else
{
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1));
if (gGameContinueCallback == NULL)
SaveFailedScreenTextPrint(gText_SaveCompleteGameCannotContinue, 1, 0);
@ -308,7 +308,7 @@ static void CB2_GameplayCannotBeContinued(void)
if (gMain.newKeys & A_BUTTON)
{
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11);
FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], PIXEL_FILL(1));
SaveFailedScreenTextPrint(gText_GamePlayCannotBeContinued, 1, 0);
SetVBlankCallback(VBlankCB);
SetMainCallback2(CB2_FadeAndReturnToTitleScreen);

View File

@ -1302,7 +1302,7 @@ bool8 ScrCmd_cmdDB(struct ScriptContext *ctx)
if (msg == NULL)
msg = (const u8 *)ctx->data[0];
sub_81973A4();
NewMenuHelpers_DrawDialogueFrame(0, 1);
DrawDialogueFrame(0, 1);
AddTextPrinterParameterized(0, 1, msg, 0, 1, 0, 0);
return FALSE;
}
@ -1517,9 +1517,9 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
winTemplate = CreateWindowTemplate(0, xWindow, yWindow + 1, width, height, 0xF, 0x1);
gUnknown_03000F30 = AddWindow(&winTemplate);
LoadUserWindowBorderGfx(gUnknown_03000F30, 0x214, 0xE0);
NewMenuHelpers_DrawStdWindowFrame(gUnknown_03000F30, 0);
DrawStdWindowFrame(gUnknown_03000F30, 0);
PutWindowTilemap(gUnknown_03000F30);
FillWindowPixelBuffer(gUnknown_03000F30, 0x11);
FillWindowPixelBuffer(gUnknown_03000F30, PIXEL_FILL(1));
AddTextPrinterParameterized(gUnknown_03000F30, 6, gStringVar4, xText, yText, 0xFF, 0x0);
CopyWindowToVram(gUnknown_03000F30, 3);
return FALSE;
@ -2254,7 +2254,7 @@ bool8 ScrCmd_setmonmetlocation(struct ScriptContext *ctx)
void sub_809BDB4(void)
{
sub_819746C(gUnknown_03000F30, 1);
ClearStdWindowAndFrame(gUnknown_03000F30, 1);
RemoveWindow(gUnknown_03000F30);
}

View File

@ -1202,7 +1202,7 @@ bool8 ScriptMenu_YesNo(u8 left, u8 top)
else
{
gSpecialVar_Result = 0xFF;
DisplayYesNoMenu();
DisplayYesNoMenuDefaultYes();
taskId = CreateTask(Task_HandleYesNoInput, 0x50);
return TRUE;
}
@ -1630,7 +1630,7 @@ u8 CreateWindowFromRect(u8 x, u8 y, u8 width, u8 height)
void sub_80E2A78(u8 windowId)
{
sub_8198070(windowId, TRUE);
ClearStdWindowAndFrameToTransparent(windowId, TRUE);
RemoveWindow(windowId);
}
@ -1639,27 +1639,27 @@ static void sub_80E2A94(u8 multichoiceId)
switch (multichoiceId)
{
case 77:
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBAC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 76:
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BB9C[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 78:
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBBC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 79:
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBCC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 75:
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBEC[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
case 74:
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0, 1, gUnknown_0858BBE0[Menu_GetCursorPos()], 0, NULL, 2, 1, 3);
break;
}

View File

@ -871,7 +871,7 @@ void sub_80E9C9C(u8 taskId)
{
data[1] = 0;
data[2] = 0;
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
gUnknown_0203A020 = calloc(1, sizeof(struct SecretBaseListMenuBuffer));
data[6] = AddWindow(&gUnknown_0858D06C[0]);
game_continue(taskId);
@ -963,7 +963,7 @@ void sub_80E9E90(u8 taskId)
PlaySE(SE_SELECT);
DestroyListMenuTask(data[5], NULL, NULL);
RemoveScrollIndicatorArrowPair(data[8]);
sub_819746C(data[6], 0);
ClearStdWindowAndFrame(data[6], 0);
ClearWindowTilemap(data[6]);
RemoveWindow(data[6]);
schedule_bg_copy_tilemap_to_vram(0);
@ -1020,8 +1020,8 @@ void sub_80E9FFC(u8 taskId)
s16 *data;
data = gTasks[taskId].data;
sub_819746C(data[6], FALSE);
sub_819746C(data[7], FALSE);
ClearStdWindowAndFrame(data[6], FALSE);
ClearStdWindowAndFrame(data[7], FALSE);
ClearWindowTilemap(data[6]);
ClearWindowTilemap(data[7]);
RemoveWindow(data[7]);
@ -1033,7 +1033,7 @@ void sub_80E9FFC(u8 taskId)
void sub_80EA06C(u8 taskId)
{
DisplayYesNoMenu();
DisplayYesNoMenuDefaultYes();
DoYesNoFuncWithChoice(taskId, &gUnknown_0858D058);
}
@ -1042,7 +1042,7 @@ void sub_80EA08C(u8 taskId)
s16 *data;
data = gTasks[taskId].data;
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
DestroyListMenuTask(data[5], &data[2], &data[1]);
gSaveBlock1Ptr->secretBases[data[4]].sbr_field_1_6 = 0;
game_continue(taskId);
@ -1061,7 +1061,7 @@ void sub_80EA13C(u8 taskId)
s16 *data;
data = gTasks[taskId].data;
sub_8197434(0, 0);
ClearDialogWindowAndFrame(0, 0);
DestroyListMenuTask(data[5], &data[2], &data[1]);
sub_80E9E00(taskId);
gTasks[taskId].func = sub_80E9E90;
@ -1073,7 +1073,7 @@ void sub_80EA18C(u8 taskId)
data = gTasks[taskId].data;
sub_80E9E44(taskId);
sub_819746C(data[7], 0);
ClearStdWindowAndFrame(data[7], 0);
ClearWindowTilemap(data[7]);
RemoveWindow(data[7]);
schedule_bg_copy_tilemap_to_vram(0);

View File

@ -366,7 +366,7 @@ void CB2_ExitSellMenu(void)
static void Task_HandleShopMenuQuit(u8 taskId)
{
sub_8198070(gMartInfo.windowId, 2);
ClearStdWindowAndFrameToTransparent(gMartInfo.windowId, 2);
RemoveWindow(gMartInfo.windowId);
SaveRecordedItemPurchasesForTVShow();
ScriptContext2_Disable();
@ -545,7 +545,7 @@ static void BuyMenuPrintItemDescriptionAndShowItemIcon(int item, bool8 onInit, s
description = gText_QuitShopping;
}
FillWindowPixelBuffer(2, 0);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
BuyMenuPrint(2, description, 3, 1, 0, 0);
}
@ -981,12 +981,12 @@ static void Task_BuyHowManyDialogueInit(u8 taskId)
u16 quantityInBag = CountTotalItemQuantityInBag(tItemId);
u16 maxQuantity;
SetWindowBorderStyle(3, FALSE, 1, 13);
DrawStdFrameWithCustomTileAndPalette(3, FALSE, 1, 13);
ConvertIntToDecimalStringN(gStringVar1, quantityInBag, STR_CONV_MODE_RIGHT_ALIGN, 4);
StringExpandPlaceholders(gStringVar4, gText_InBagVar1);
BuyMenuPrint(3, gStringVar4, 0, 1, 0, 0);
tItemCount = 1;
SetWindowBorderStyle(4, FALSE, 1, 13);
DrawStdFrameWithCustomTileAndPalette(4, FALSE, 1, 13);
BuyMenuPrintItemQuantityAndPrice(taskId);
schedule_bg_copy_tilemap_to_vram(0);
@ -1018,8 +1018,8 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId)
if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
sub_8198070(4, 0);
sub_8198070(3, 0);
ClearStdWindowAndFrameToTransparent(4, 0);
ClearStdWindowAndFrameToTransparent(3, 0);
ClearWindowTilemap(4);
ClearWindowTilemap(3);
PutWindowTilemap(1);
@ -1031,8 +1031,8 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId)
else if (gMain.newKeys & B_BUTTON)
{
PlaySE(SE_SELECT);
sub_8198070(4, 0);
sub_8198070(3, 0);
ClearStdWindowAndFrameToTransparent(4, 0);
ClearStdWindowAndFrameToTransparent(3, 0);
ClearWindowTilemap(4);
ClearWindowTilemap(3);
BuyMenuReturnToItemList(taskId);
@ -1131,7 +1131,7 @@ static void BuyMenuReturnToItemList(u8 taskId)
{
s16 *data = gTasks[taskId].data;
sub_8197DF8(5, 0);
ClearDialogWindowAndFrameToTransparent(5, 0);
BuyMenuPrintCursor(tListTaskId, 1);
PutWindowTilemap(1);
PutWindowTilemap(2);
@ -1144,7 +1144,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId)
{
s16 *data = gTasks[taskId].data;
FillWindowPixelBuffer(4, 0x11);
FillWindowPixelBuffer(4, PIXEL_FILL(1));
PrintMoneyAmount(4, 38, 1, gShopDataPtr->totalCost, TEXT_SPEED_FF);
ConvertIntToDecimalStringN(gStringVar1, tItemCount, 2, 2);
StringExpandPlaceholders(gStringVar4, gText_xVar1);

View File

@ -76,19 +76,19 @@ static void DisableGpioPortRead();
static const char AgbLibRtcVersion[] = "SIIRTC_V001";
void SiiRtcUnprotect()
void SiiRtcUnprotect(void)
{
EnableGpioPortRead();
sLocked = FALSE;
}
void SiiRtcProtect()
void SiiRtcProtect(void)
{
DisableGpioPortRead();
sLocked = TRUE;
}
u8 SiiRtcProbe()
u8 SiiRtcProbe(void)
{
u8 errorCode;
struct SiiRtcInfo rtc;
@ -129,7 +129,7 @@ u8 SiiRtcProbe()
return (errorCode << 4) | 1;
}
bool8 SiiRtcReset()
bool8 SiiRtcReset(void)
{
u8 result;
struct SiiRtcInfo rtc;

View File

@ -1025,7 +1025,7 @@ static bool8 SlotAction_AwaitPlayerInput(struct Task *task)
static bool8 SlotAction_PrintYouDontHaveThreeCoins(struct Task *task)
{
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized(0, 1, gText_YouDontHaveThreeCoins, 0, 1, 0, 0);
CopyWindowToVram(0, 3);
sSlotMachine->state = 7;
@ -1036,7 +1036,7 @@ static bool8 SlotAction_ExitYouDontHaveThreeCoinsMessage(struct Task *task)
{
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
sub_8197434(0, TRUE);
ClearDialogWindowAndFrame(0, TRUE);
sSlotMachine->state = 5;
}
return FALSE;
@ -1274,7 +1274,7 @@ static bool8 SlotAction_NoMatches(struct Task *task)
static bool8 SlotAction_PrintQuitTheGame(struct Task *task)
{
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized(0, 1, gText_QuitTheGame, 0, 1, 0, 0);
CopyWindowToVram(0, 3);
CreateYesNoMenuParameterized(0x15, 7, 0x214, 0x180, 0xE, 0xF);
@ -1287,7 +1287,7 @@ static bool8 SlotAction_SeeIfPlayerQuits(struct Task *task)
s8 input = Menu_ProcessInputNoWrapClearOnChoose();
if (input == 0) // player chooses to quit
{
sub_8197434(0, TRUE);
ClearDialogWindowAndFrame(0, TRUE);
sub_8103D8C(0);
sub_8103D8C(1);
sub_8103D8C(2);
@ -1296,7 +1296,7 @@ static bool8 SlotAction_SeeIfPlayerQuits(struct Task *task)
}
else if (input == 1 || input == -1) // player chooses not to quit
{
sub_8197434(0, TRUE);
ClearDialogWindowAndFrame(0, TRUE);
sSlotMachine->state = 5;
}
return FALSE;
@ -1304,7 +1304,7 @@ static bool8 SlotAction_SeeIfPlayerQuits(struct Task *task)
static bool8 SlotAction_PrintMessage_9999Coins(struct Task *task)
{
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized(0, 1, gText_YouveGot9999Coins, 0, 1, 0, 0);
CopyWindowToVram(0, 3);
sSlotMachine->state = 24;
@ -1315,7 +1315,7 @@ static bool8 SlotAction_ExitMessage_9999Coins(struct Task *task)
{
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
sub_8197434(0, TRUE);
ClearDialogWindowAndFrame(0, TRUE);
sSlotMachine->state = 5;
}
return FALSE;
@ -1323,7 +1323,7 @@ static bool8 SlotAction_ExitMessage_9999Coins(struct Task *task)
static bool8 SlotAction_PrintMessage_NoMoreCoins(struct Task *task)
{
NewMenuHelpers_DrawDialogueFrame(0, 0);
DrawDialogueFrame(0, 0);
AddTextPrinterParameterized(0, 1, gText_YouveRunOutOfCoins, 0, 1, 0, 0);
CopyWindowToVram(0, 3);
sSlotMachine->state = 26;
@ -1334,7 +1334,7 @@ static bool8 SlotAction_ExitMessage_NoMoreCoins(struct Task *task)
{
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
sub_8197434(0, TRUE);
ClearDialogWindowAndFrame(0, TRUE);
sSlotMachine->state = 27;
}
return FALSE;
@ -3120,7 +3120,7 @@ static void InfoBox_8104B80(struct Task *task)
sub_81065DC();
AddWindow(&gUnknown_085A7444);
PutWindowTilemap(1);
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
task->data[0]++;
}
@ -3136,7 +3136,7 @@ static void InfoBox_AwaitPlayerInput(struct Task *task)
{
if (gMain.newKeys & (B_BUTTON | SELECT_BUTTON))
{
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
ClearWindowTilemap(1);
CopyWindowToVram(1, 1);
RemoveWindow(1);

View File

@ -123,7 +123,7 @@ static u8 SaveConfirmSaveCallback(void);
static u8 SaveYesNoCallback(void);
static u8 SaveConfirmInputCallback(void);
static u8 SaveFileExistsCallback(void);
static u8 SaveConfirmOverwriteNoCallback(void);
static u8 SaveConfirmOverwriteDefaultNoCallback(void);
static u8 SaveConfirmOverwriteCallback(void);
static u8 SaveOverwriteInputCallback(void);
static u8 SaveSavingMessageCallback(void);
@ -376,7 +376,7 @@ static void ShowSafariBallsWindow(void)
{
sSafariBallsWindowId = AddWindow(&sSafariBallsWindowTemplate);
PutWindowTilemap(sSafariBallsWindowId);
NewMenuHelpers_DrawStdWindowFrame(sSafariBallsWindowId, FALSE);
DrawStdWindowFrame(sSafariBallsWindowId, FALSE);
ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2);
StringExpandPlaceholders(gStringVar4, gText_SafariBallStock);
AddTextPrinterParameterized(sSafariBallsWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
@ -391,7 +391,7 @@ static void ShowPyramidFloorWindow(void)
sBattlePyramidFloorWindowId = AddWindow(&sPyramidFloorWindowTemplate_2);
PutWindowTilemap(sBattlePyramidFloorWindowId);
NewMenuHelpers_DrawStdWindowFrame(sBattlePyramidFloorWindowId, FALSE);
DrawStdWindowFrame(sBattlePyramidFloorWindowId, FALSE);
StringCopy(gStringVar1, sPyramindFloorNames[gSaveBlock2Ptr->frontier.curChallengeBattleNum]);
StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor);
AddTextPrinterParameterized(sBattlePyramidFloorWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
@ -402,13 +402,13 @@ static void RemoveExtraStartMenuWindows(void)
{
if (GetSafariZoneFlag())
{
sub_8198070(sSafariBallsWindowId, FALSE);
ClearStdWindowAndFrameToTransparent(sSafariBallsWindowId, FALSE);
CopyWindowToVram(sSafariBallsWindowId, 2);
RemoveWindow(sSafariBallsWindowId);
}
if (InBattlePyramid())
{
sub_8198070(sBattlePyramidFloorWindowId, FALSE);
ClearStdWindowAndFrameToTransparent(sBattlePyramidFloorWindowId, FALSE);
RemoveWindow(sBattlePyramidFloorWindowId);
}
}
@ -459,7 +459,7 @@ static bool32 InitStartMenuStep(void)
break;
case 2:
sub_81973A4();
NewMenuHelpers_DrawStdWindowFrame(sub_81979C4(sNumStartMenuActions), FALSE);
DrawStdWindowFrame(sub_81979C4(sNumStartMenuActions), FALSE);
sUnknown_02037619[1] = 0;
sUnknown_02037619[0]++;
break;
@ -751,7 +751,7 @@ static bool8 StartMenuBattlePyramidRetireCallback(void)
void sub_809FDD4(void)
{
sub_8197DF8(0, FALSE);
ClearDialogWindowAndFrameToTransparent(0, FALSE);
ScriptUnfreezeEventObjects();
CreateStartMenuTask(sub_809FA34);
ScriptContext2_Enable();
@ -787,13 +787,13 @@ static bool8 SaveCallback(void)
case SAVE_IN_PROGRESS:
return FALSE;
case SAVE_CANCELED: // Back to start menu
sub_8197DF8(0, FALSE);
ClearDialogWindowAndFrameToTransparent(0, FALSE);
InitStartMenu();
gMenuCallback = HandleStartMenuInput;
return FALSE;
case SAVE_SUCCESS:
case SAVE_ERROR: // Close start menu
sub_8197DF8(0, TRUE);
ClearDialogWindowAndFrameToTransparent(0, TRUE);
ScriptUnfreezeEventObjects();
ScriptContext2_Disable();
SoftResetInBattlePyramid();
@ -830,7 +830,7 @@ static bool8 BattlePyramidRetireCallback(void)
case SAVE_IN_PROGRESS:
return FALSE;
case SAVE_CANCELED: // Yes (Retire from battle pyramid)
sub_8197DF8(0, TRUE);
ClearDialogWindowAndFrameToTransparent(0, TRUE);
ScriptUnfreezeEventObjects();
ScriptContext2_Disable();
ScriptContext1_SetupScript(BattleFrontier_BattlePyramidEmptySquare_EventScript_252C88);
@ -897,7 +897,7 @@ static void SaveGameTask(u8 taskId)
static void sub_80A0014(void)
{
sub_8197434(0, TRUE);
ClearDialogWindowAndFrame(0, TRUE);
}
static void HideSaveInfoWindow(void)
@ -943,7 +943,7 @@ static bool8 SaveErrorTimer(void)
static u8 SaveConfirmSaveCallback(void)
{
sub_819746C(GetStartMenuWindowId(), FALSE);
ClearStdWindowAndFrame(GetStartMenuWindowId(), FALSE);
RemoveStartMenuWindow();
ShowSaveInfoWindow();
@ -961,7 +961,7 @@ static u8 SaveConfirmSaveCallback(void)
static u8 SaveYesNoCallback(void)
{
DisplayYesNoMenu(); // Show Yes/No menu
DisplayYesNoMenuDefaultYes(); // Show Yes/No menu
sSaveDialogCallback = SaveConfirmInputCallback;
return SAVE_IN_PROGRESS;
}
@ -1002,7 +1002,7 @@ static u8 SaveFileExistsCallback(void)
{
if (gDifferentSaveFile == TRUE)
{
ShowSaveMessage(gText_DifferentSaveFile, SaveConfirmOverwriteNoCallback);
ShowSaveMessage(gText_DifferentSaveFile, SaveConfirmOverwriteDefaultNoCallback);
}
else
{
@ -1012,16 +1012,16 @@ static u8 SaveFileExistsCallback(void)
return SAVE_IN_PROGRESS;
}
static u8 SaveConfirmOverwriteNoCallback(void)
static u8 SaveConfirmOverwriteDefaultNoCallback(void)
{
sub_8197948(1); // Show Yes/No menu (No selected as default)
DisplayYesNoMenuWithDefault(1); // Show Yes/No menu (No selected as default)
sSaveDialogCallback = SaveOverwriteInputCallback;
return SAVE_IN_PROGRESS;
}
static u8 SaveConfirmOverwriteCallback(void)
{
DisplayYesNoMenu(); // Show Yes/No menu
DisplayYesNoMenuDefaultYes(); // Show Yes/No menu
sSaveDialogCallback = SaveOverwriteInputCallback;
return SAVE_IN_PROGRESS;
}
@ -1135,7 +1135,7 @@ static void InitBattlePyramidRetire(void)
static u8 BattlePyramidConfirmRetireCallback(void)
{
sub_819746C(GetStartMenuWindowId(), FALSE);
ClearStdWindowAndFrame(GetStartMenuWindowId(), FALSE);
RemoveStartMenuWindow();
ShowSaveMessage(gText_BattlePyramidConfirmRetire, BattlePyramidRetireYesNoCallback);
@ -1144,7 +1144,7 @@ static u8 BattlePyramidConfirmRetireCallback(void)
static u8 BattlePyramidRetireYesNoCallback(void)
{
sub_8197948(1); // Show Yes/No menu (No selected as default)
DisplayYesNoMenuWithDefault(1); // Show Yes/No menu (No selected as default)
sSaveDialogCallback = BattlePyramidRetireInputCallback;
return SAVE_IN_PROGRESS;
@ -1232,7 +1232,7 @@ static void sub_80A0550(u8 taskId)
switch (*step)
{
case 0:
FillWindowPixelBuffer(0, 17);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized2(0,
1,
gText_SavingDontTurnOffPower,
@ -1313,7 +1313,7 @@ static void ShowSaveInfoWindow(void)
}
sSaveInfoWindowId = AddWindow(&saveInfoWindow);
NewMenuHelpers_DrawStdWindowFrame(sSaveInfoWindowId, FALSE);
DrawStdWindowFrame(sSaveInfoWindowId, FALSE);
gender = gSaveBlock2Ptr->playerGender;
color = TEXT_COLOR_RED; // Red when female, blue when male.
@ -1364,7 +1364,7 @@ static void ShowSaveInfoWindow(void)
static void RemoveSaveInfoWindow(void)
{
sub_819746C(sSaveInfoWindowId, FALSE);
ClearStdWindowAndFrame(sSaveInfoWindowId, FALSE);
RemoveWindow(sSaveInfoWindowId);
}
@ -1386,7 +1386,7 @@ void sub_80A08CC(void) // Referenced in data/specials.inc and data/scripts/maps/
static void HideStartMenuWindow(void)
{
sub_819746C(GetStartMenuWindowId(), TRUE);
ClearStdWindowAndFrame(GetStartMenuWindowId(), TRUE);
RemoveStartMenuWindow();
ScriptUnfreezeEventObjects();
ScriptContext2_Disable();

View File

@ -469,7 +469,7 @@ static void MainCallback2_StarterChoose(void)
static void Task_StarterChoose1(u8 taskId)
{
CreateStarterPokemonLabel(gTasks[taskId].tStarterSelection);
SetWindowBorderStyle(0, FALSE, 0x2A8, 0xD);
DrawStdFrameWithCustomTileAndPalette(0, FALSE, 0x2A8, 0xD);
AddTextPrinterParameterized(0, 1, gText_BirchInTrouble, 0, 1, 0, NULL);
PutWindowTilemap(0);
schedule_bg_copy_tilemap_to_vram(0);
@ -523,7 +523,7 @@ static void Task_StarterChoose3(u8 taskId)
static void Task_StarterChoose4(u8 taskId)
{
PlayCry1(GetStarterPokemon(gTasks[taskId].tStarterSelection), 0);
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized(0, 1, gText_ConfirmStarterChoice, 0, 1, 0, NULL);
schedule_bg_copy_tilemap_to_vram(0);
CreateYesNoMenu(&gUnknown_085B1DDC, 0x2A8, 0xD, 0);
@ -579,7 +579,7 @@ static void CreateStarterPokemonLabel(u8 selection)
winTemplate.tilemapTop = gStarterChoose_LabelCoords[selection][1];
sStarterChooseWindowId = AddWindow(&winTemplate);
FillWindowPixelBuffer(sStarterChooseWindowId, 0);
FillWindowPixelBuffer(sStarterChooseWindowId, PIXEL_FILL(0));
width = GetStringCenterAlignXOffset(7, text, 0x68);
AddTextPrinterParameterized3(sStarterChooseWindowId, 7, width, 1, gUnknown_085B1E0C, 0, text);
@ -600,7 +600,7 @@ static void CreateStarterPokemonLabel(u8 selection)
static void sub_8134604(void)
{
FillWindowPixelBuffer(sStarterChooseWindowId, 0);
FillWindowPixelBuffer(sStarterChooseWindowId, PIXEL_FILL(0));
ClearWindowTilemap(sStarterChooseWindowId);
RemoveWindow(sStarterChooseWindowId);
sStarterChooseWindowId = 0xFF;

View File

@ -1581,7 +1581,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
textPrinter->printerTemplate.currentChar++;
return 2;
case 15:
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, textPrinter->printerTemplate.bgColor | textPrinter->printerTemplate.bgColor << 4);
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
return 2;
@ -1702,7 +1702,7 @@ u16 RenderText(struct TextPrinter *textPrinter)
case 2:
if (TextPrinterWaitWithDownArrow(textPrinter))
{
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, (textPrinter->printerTemplate.bgColor << 4) | textPrinter->printerTemplate.bgColor);
FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x;
textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y;
textPrinter->state = 0;
@ -1724,12 +1724,12 @@ u16 RenderText(struct TextPrinter *textPrinter)
int speed = gWindowVerticalScrollSpeeds[scrollSpeed];
if (textPrinter->scrollDistance < speed)
{
ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, textPrinter->printerTemplate.bgColor << 4 | textPrinter->printerTemplate.bgColor);
ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
textPrinter->scrollDistance = 0;
}
else
{
ScrollWindow(textPrinter->printerTemplate.windowId, 0, speed, textPrinter->printerTemplate.bgColor << 4 | textPrinter->printerTemplate.bgColor);
ScrollWindow(textPrinter->printerTemplate.windowId, 0, speed, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
textPrinter->scrollDistance -= speed;
}
CopyWindowToVram(textPrinter->printerTemplate.windowId, 2);

View File

@ -1418,7 +1418,7 @@ static void sub_80772A4(void)
for (i = 0; i < 18; i++)
{
ClearWindowTilemap(i);
FillWindowPixelBuffer(i, 0);
FillWindowPixelBuffer(i, PIXEL_FILL(0));
}
FillBgTilemapBufferRect(0, 0, 0, 0, 30, 20, 15);
@ -2461,7 +2461,7 @@ static void sub_8078DBC(void)
if (gUnknown_0203229C->tradeMenuCursorPosition < 6)
{
sub_8098858(1, 1, 14);
FillWindowPixelBuffer(1, 0x11);
FillWindowPixelBuffer(1, PIXEL_FILL(1));
PrintMenuTable(1, 2, gUnknown_0832DEAC);
InitMenuInUpperLeftCornerPlaySoundWhenAPressed(1, 2, 0);
PutWindowTilemap(1);
@ -2724,7 +2724,7 @@ static void sub_8079408(void)
for (i = 0; i < 4; i++)
{
FillWindowPixelBuffer(i + 14, 0);
FillWindowPixelBuffer(i + 14, PIXEL_FILL(0));
rbox_fill_rectangle(i + 14);
}
@ -3256,7 +3256,7 @@ static void sub_807A0C4(void)
static void sub_807A19C(u8 a0)
{
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
AddTextPrinterParameterized(0, 1, gUnknown_0832DEBC[a0], 0, 1, TEXT_SPEED_FF, NULL);
sub_8098858(0, 20, 12);
PutWindowTilemap(0);
@ -4185,7 +4185,7 @@ void sub_807B140(void)
void sub_807B154(void)
{
FillWindowPixelBuffer(0, 0xFF);
FillWindowPixelBuffer(0, PIXEL_FILL(15));
PutWindowTilemap(0);
CopyWindowToVram(0, 3);
}
@ -4263,7 +4263,7 @@ static void sub_807B270(void)
break;
case 8:
sub_807ACFC(1, 1);
FillWindowPixelBuffer(0, 0xFF);
FillWindowPixelBuffer(0, PIXEL_FILL(15));
PutWindowTilemap(0);
CopyWindowToVram(0, 3);
gMain.state++;
@ -4654,7 +4654,7 @@ static bool8 sub_807BBEC(void)
if (!gPaletteFade.active)
{
sub_807B62C(4);
FillWindowPixelBuffer(0, 0xFF);
FillWindowPixelBuffer(0, PIXEL_FILL(15));
CopyWindowToVram(0, 3);
gUnknown_020322A0->state++;
}
@ -5146,7 +5146,7 @@ static bool8 sub_807CFC8(void)
if (!gPaletteFade.active)
{
sub_807B62C(4);
FillWindowPixelBuffer(0, 0xFF);
FillWindowPixelBuffer(0, PIXEL_FILL(15));
CopyWindowToVram(0, 3);
gUnknown_020322A0->state++;
}
@ -6085,7 +6085,7 @@ void sub_807F19C(void)
void sub_807F1A8(u8 windowId, const u8 *str, u8 speed)
{
FillWindowPixelBuffer(windowId, 0xFF);
FillWindowPixelBuffer(windowId, PIXEL_FILL(15));
gUnknown_020322A0->unk_F6[0] = 15;
gUnknown_020322A0->unk_F6[1] = 1;
gUnknown_020322A0->unk_F6[2] = 6;

View File

@ -73,7 +73,7 @@ void CreateAvailableDecorationsMenu(u8 taskId)
}
windowTemplate.width = convert_pixel_width_to_tile_width(windowWidth);
data[3] = AddWindow(&windowTemplate);
SetWindowBorderStyle(data[3], FALSE, 0x214, 14);
DrawStdFrameWithCustomTileAndPalette(data[3], FALSE, 0x214, 14);
for (i = 0; i < 4; i++)
{
if (trader->decorIds[i] > NUM_DECORATIONS)
@ -98,7 +98,7 @@ void sub_8133BE4(u8 taskId, u8 decorationId)
gSpecialVar_0x8004 = decorationId;
}
sub_8198070(data[3], FALSE);
ClearStdWindowAndFrameToTransparent(data[3], FALSE);
ClearWindowTilemap(data[3]);
RemoveWindow(data[3]);
schedule_bg_copy_tilemap_to_vram(0);

View File

@ -350,7 +350,7 @@ static void sub_80C2760(u8 taskId)
case 0:
if (!IsDma3ManagerBusyWithBgCopy())
{
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
sData->var_0++;
}
break;
@ -363,7 +363,7 @@ static void sub_80C2760(u8 taskId)
sData->var_0++;
break;
case 3:
FillWindowPixelBuffer(2, 0);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
sub_80C4FF0();
sub_80C438C(2);
sData->var_0++;
@ -469,7 +469,7 @@ static void sub_80C2760(u8 taskId)
break;
case 15:
sub_800AC34();
NewMenuHelpers_DrawDialogueFrame(0, 1);
DrawDialogueFrame(0, 1);
AddTextPrinterParameterized(0, 1, gText_WaitingTrainerFinishReading, 0, 1, 255, 0);
CopyWindowToVram(0, 3);
sData->var_0 = 16;
@ -1103,7 +1103,7 @@ static void PrintTimeOnCard(void)
r10 = width + 30;
r7 -= r10;
FillWindowPixelRect(1, 0, r7, r4, r10, 15);
FillWindowPixelRect(1, PIXEL_FILL(0), r7, r4, r10, 15);
ConvertIntToDecimalStringN(gStringVar4, hours, 1, 3);
AddTextPrinterParameterized3(1, 1, r7, r4, gUnknown_0856FB0C, TEXT_SPEED_FF, gStringVar4);
r7 += 18;
@ -1634,7 +1634,7 @@ static bool8 sub_80C4B08(struct Task* task)
switch (sData->var_4)
{
case 0:
FillWindowPixelBuffer(1, 0);
FillWindowPixelBuffer(1, PIXEL_FILL(0));
FillBgTilemapBufferRect_Palette0(3, 0, 0, 0, 0x20, 0x20);
break;
case 1:
@ -1659,7 +1659,7 @@ static bool8 sub_80C4B08(struct Task* task)
if (!sData->var_8)
sub_80C474C();
else
FillWindowPixelBuffer(2, 0);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
break;
case 4:
if (sData->var_8)

View File

@ -613,7 +613,7 @@ void PrintOnTrainerHillRecordsWindow(void)
u32 total, minutes, secondsWhole, secondsFraction;
SetUpDataStruct();
FillWindowPixelBuffer(0, 0);
FillWindowPixelBuffer(0, PIXEL_FILL(0));
x = GetStringCenterAlignXOffset(1, gText_TimeBoard, 0xD0);
AddTextPrinterParameterized3(0, 1, x, 2, sRecordWinColors, TEXT_SPEED_FF, gText_TimeBoard);

Some files were not shown because too many files have changed in this diff Show More