Merge branch 'master' into pokemon_expansion

This commit is contained in:
DizzyEggg 2019-04-11 13:10:35 +02:00
commit b0317adb8c
78 changed files with 2808 additions and 3477 deletions

1
.gitignore vendored
View File

@ -28,3 +28,4 @@ build/
.DS_Store
*.ddump
porymap.project.cfg
.vscode/

View File

@ -377,7 +377,7 @@ _08024C5A:
ldrb r0, [r0]
cmp r0, 0
beq _08024D20
bl sub_800E0E8
bl LoadWirelessStatusIndicatorSpriteGfx
movs r0, 0
movs r1, 0
bl CreateWirelessStatusIndicatorSprite

View File

@ -144,7 +144,7 @@
.byte \pan
.endm
.macro panse_1B se:req, param1:req, param2:req, param3:req, param4
.macro panse_1B se:req, param1:req, param2:req, param3:req, param4:req
.byte 0x1b
.2byte \se
.byte \param1
@ -215,7 +215,7 @@
.byte \param2
.endm
.macro panse_26 se:req, param1:req, param2:req, param3:req, param4
.macro panse_26 se:req, param1:req, param2:req, param3:req, param4:req
.byte 0x26
.2byte \se
.byte \param1
@ -224,7 +224,7 @@
.byte \param4
.endm
.macro panse_27 se:req, param1:req, param2:req, param3:req, param4
.macro panse_27 se:req, param1:req, param2:req, param3:req, param4:req
.byte 0x27
.2byte \se
.byte \param1

File diff suppressed because it is too large Load Diff

View File

@ -61,6 +61,10 @@ UP_ARROW = 79
DOWN_ARROW = 7A
LEFT_ARROW = 7B
RIGHT_ARROW = 7C
SUPER_E = 84
'<' = 85
'>' = 86
SUPER_RE = A0
'0' = A1
'1' = A2
'2' = A3

View File

@ -11,39 +11,40 @@
enum MON_4
.align 2
gContestAIs:: @ 82DE350
.4byte AI_CheckForBadMove
.4byte AI_CheckForCombo
.4byte AI_CheckBoring
.4byte AI_CheckExcitement
.4byte AI_CheckOrder
.4byte AI_CheckForGoodMove
.4byte AI_Erratic
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
.4byte AI_Nothing
gContestAIChecks:: @ 82DE350
.4byte AI_CheckForBadMove // 0x00000001
.4byte AI_CheckForCombo // 0x00000002
.4byte AI_CheckBoring // 0x00000004
.4byte AI_CheckExcitement // 0x00000008
.4byte AI_CheckOrder // 0x00000010
.4byte AI_CheckForGoodMove // 0x00000020
.4byte AI_Erratic // 0x00000040
.4byte AI_Nothing // 0x00000080
.4byte AI_Nothing // 0x00000100
.4byte AI_Nothing // 0x00000200
.4byte AI_Nothing // 0x00000400
.4byte AI_Nothing // 0x00000800
.4byte AI_Nothing // 0x00001000
.4byte AI_Nothing // 0x00002000
.4byte AI_Nothing // 0x00004000
.4byte AI_Nothing // 0x00008000
.4byte AI_Nothing // 0x00010000
.4byte AI_Nothing // 0x00020000
.4byte AI_Nothing // 0x00040000
.4byte AI_Nothing // 0x00080000
.4byte AI_Nothing // 0x00100000
.4byte AI_Nothing // 0x00200000
.4byte AI_Nothing // 0x00400000
.4byte AI_Nothing // 0x00800000
.4byte AI_Nothing // 0x01000000
.4byte AI_Nothing // 0x02000000
.4byte AI_Nothing // 0x04000000
.4byte AI_Nothing // 0x08000000
.4byte AI_Nothing // 0x10000000
.4byte AI_Nothing // 0x20000000
.4byte AI_Nothing // 0x40000000
.4byte AI_Nothing // 0x80000000
@ Unreferenced AI routine to encourage moves that improve condition on the first
@ turn. Additionally, it checks the appeal order of the user and the effect

View File

@ -3460,7 +3460,7 @@ EventScript_GotoTrainerScript:: @ 82742F6
gUnknown_0827E8CE:: @ 827E8CE
.string "Missed turn$"
gUnknown_0827E8DA:: @ 827E8DA
gText_LinkStandby4:: @ 827E8DA
.string "Link standby!$"
gUnknown_0827E8E8:: @ 827E8E8

View File

@ -24,12 +24,14 @@ gUnknown_082FB65C:: @ 82FB65C
.byte 0xee, 0xef, 0xf1, 0xf3, 0xf5, 0xf8, 0xfa, 0xfc
.byte 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xfd, 0xfa, 0xf7, 0xf5, 0xf2, 0xf0, 0xee, 0xec
.byte 0xea, 0xe8, 0xe6, 0xe4, 0xe3, 0xe2, 0xe2, 0xe4
.byte 0xe6, 0xe8, 0xea, 0xec, 0xee, 0xf0, 0xf2, 0xf5
.byte 0xf7, 0xfa, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0xfd, 0xfa, 0xf7, 0xf5, 0xf3, 0xf1, 0xef, 0xed
.byte 0xeb, 0xe9, 0xe7, 0xe5, 0xe4, 0xe3, 0xe2, 0xe2
.byte 0xe2, 0xe2, 0xe3, 0xe3, 0xe4, 0xe4, 0xe5, 0xe5

View File

@ -633,7 +633,7 @@ gText_0827E6C4:: @ 827E6C4
.string "{STR_VAR_1} was\n"
.string "unaffected.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_0827E6E3:: @ 827E6E3
gText_RepeatedAppeal:: @ 827E6E3
.string "{STR_VAR_1} disappointed\n"
.string "by repeating an appeal.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"

View File

@ -62,7 +62,7 @@ void MoveBattlerSpriteToBG(u8 battlerId, bool8 toBG_2, bool8 setSpriteInvisible)
bool8 IsContest(void);
s8 BattleAnimAdjustPanning(s8 pan);
s8 BattleAnimAdjustPanning2(s8 pan);
s16 KeepPanInRange(s16 a);
s16 KeepPanInRange(s16 a, int oldPan);
s16 CalculatePanIncrement(s16 sourcePan, s16 targetPan, s16 incrementPan);
void sub_80A4720(u16 a, u16 *b, u32 c, u8 d);
void sub_80A477C(bool8);

View File

@ -1,6 +1,27 @@
#ifndef GUARD_CONTEST_H
#define GUARD_CONTEST_H
#include "palette.h"
#define CONTESTANT_COUNT 4
#define APPLAUSE_METER_SIZE 5
#define CONTEST_TURN_COUNT 5
enum
{
CONTEST_DEBUG_MODE_OFF,
// Prints the totalPoints value for each contestant.
CONTEST_DEBUG_MODE_PRINT_POINT_TOTAL,
// Prints the ContestResourcesField1C::unk_C value as a bitstring for each contestant.
CONTEST_DEBUG_MODE_PRINT_UNK_C,
// Prints the ContestResourcesField1C::unk_D value as a bitstring for each contestant.
CONTEST_DEBUG_MODE_PRINT_UNK_D
};
#define LINK_CONTEST_FLAG_IS_LINK (1 << 0)
#define LINK_CONTEST_FLAG_IS_WIRELESS (1 << 1)
#define LINK_CONTEST_FLAG_HAS_RS_PLAYER (1 << 2)
enum
{
CONTEST_CATEGORY_COOL,
@ -216,7 +237,7 @@ struct ContestPokemon
/*0x02*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
/*0x0D*/ u8 trainerName[PLAYER_NAME_LENGTH + 1];
/*0x15*/ u8 trainerGfxId;
/*0x18*/ u32 flags;
/*0x18*/ u32 aiChecks;
/*0x1C*/ u8 whichRank:2; // 0x1 0x2
u8 aiPool_Cool:1; // 0x4
u8 aiPool_Beauty:1; // 0x8
@ -235,14 +256,12 @@ struct ContestPokemon
/*0x3C*/ u32 otId; // otId
};
struct Shared18000
struct Shared1A004
{
/*0x18000*/ u8 unk18000;
/*0x18001*/ u8 filler18001[3];
/*0x18004*/ u16 unk18004[16][16];
/*0x18204*/ u16 unk18204[0x200];
/*0x18604*/ u16 unk18604[0x200];
/*0x18A04*/ u8 unk18A04[0x800];
u16 cachedWindowPalettes[16][16]; // Saved palette data before a move happens?
u16 unk18204[PLTT_BUFFER_SIZE]; // Saved copy of gPlttBufferUnfaded
u16 unk18604[PLTT_BUFFER_SIZE]; // Saved copy of gPlttBufferFaded
u8 savedJunk[0x800];
};
struct ContestStruct_field_18
@ -260,14 +279,14 @@ struct Contest
{
/*0x0*/ u8 playerMoveChoice;
/*0x1*/ u8 turnNumber;
/*0x2*/ u8 unk19206[4]; // seems to only be used by an unref function
/*0x2*/ u8 unused2[CONTESTANT_COUNT];
/*0x6*/ u16 unk1920A_0:1; // Task active flags?
u16 unk1920A_1:1;
u16 unk1920A_2:1;
u16 unk1920A_3:1;
u16 unk1920A_4:1;
u16 unk1920A_5:1;
u16 unk1920A_6:1;
u16 isShowingApplauseMeter:1;
u16 applauseMeterIsMoving:1;
u16 unk1920A_7:1;
/*0x7*/ u16 unk1920B_0:1;
u16 unk1920B_1:1;
@ -281,12 +300,12 @@ struct Contest
/*0x11*/ u8 unk19215;
/*0x12*/ u8 unk19216; // sprite ID
/*0x13*/ s8 applauseLevel;
/*0x19218*/ u8 unk19218[4];
/*0x19218*/ u8 prevTurnOrder[CONTESTANT_COUNT];
/*0x1921C*/ u32 unk1921C; // saved RNG value?
u16 unk19220[5][4]; // move history?
u8 unk19248[5][4]; // excitement history
u8 applauseMeterSpriteId; // sprite ID
/*0x1925D*/ u8 unk1925D;
u16 moveHistory[CONTEST_TURN_COUNT][CONTESTANT_COUNT];
u8 excitementHistory[CONTEST_TURN_COUNT][CONTESTANT_COUNT];
u8 applauseMeterSpriteId;
/*0x1925D*/ u8 contestSetupState;
/*0x1925E*/ u8 unk1925E;
};
@ -294,11 +313,11 @@ struct ContestantStatus
{
/*0x00*/ s16 appeal1; // move appeal?
/*0x02*/ s16 appeal2; // final appeal after end of turn, maybe?
/*0x04*/ s16 unk4;
/*0x04*/ s16 pointTotal;
/*0x06*/ u16 currMove;
/*0x08*/ u16 prevMove;
/*0x0A*/ u8 moveCategory;
/*0x0B*/ u8 unkB_0:2;
/*0x0B*/ u8 ranking:2;
u8 unkB_2:2;
u8 moveRepeatCount:3;
u8 noMoreTurns:1; // used a one-time move?
@ -341,24 +360,24 @@ struct ContestantStatus
struct UnknownContestStruct7
{
u8 turnOrder[4];
u8 turnOrder[CONTESTANT_COUNT];
s16 jam;
s16 jam2;
u8 jamQueue[5];
u8 unnervedPokes[4];
u8 unnervedPokes[CONTESTANT_COUNT];
u8 contestant;
};
struct ContestAIInfo
{
/*0x00*/ u8 aiState;
/*0x02*/ u16 unk2;
/*0x04*/ u8 unk4;
/*0x02*/ u16 nextMove;
/*0x04*/ u8 nextMoveIndex;
/*0x05*/ u8 unk5[4];
/*0x09*/ u8 aiAction;
/*0x0A*/ u8 fillerA[0x6]; // TODO: don't know what's here
/*0x10*/ u8 unk10;
/*0x14*/ u32 flags;
/*0x10*/ u8 currentAICheck;
/*0x14*/ u32 aiChecks;
/*0x18*/ s16 scriptResult;
/*0x1A*/ s16 scriptArr[3];
/*0x20*/ const u8 *stack[8];
@ -408,30 +427,31 @@ struct ContestResourcesField20
struct ContestResources
{
struct Contest *field_0;
struct ContestantStatus *field_4;
struct Contest *contest;
struct ContestantStatus *status;
struct UnknownContestStruct7 *field_8;
struct ContestAIInfo *field_C;
struct ContestAIInfo *aiData;
struct UnknownContestStruct5 *field_10;
struct UnknownContestStruct4 *field_14;
struct ContestStruct_field_18 *field_18;
struct ContestResourcesField1C * field_1c;
struct ContestResourcesField20 * field_20;
u8 * field_24[4];
u8 * contestBgTilemaps[CONTESTANT_COUNT];
void * field_34;
void * field_38;
void * field_3c;
};
#define sContest (*gContestResources->field_0)
#define sContestantStatus (gContestResources->field_4)
#define shared192D0 (*gContestResources->field_8)
#define eContestAI (gContestResources->field_C)
#define shared19328 (*gContestResources->field_10)
#define shared19338 (*gContestResources->field_14)
#define shared15800 (gHeap + 0x18000)
#define shared16800 (gHeap + 0x19000)
#define shared18000 (*(struct Shared18000 *)(gHeap + 0x1a000))
#define eContest (*gContestResources->contest)
#define eContestantStatus (gContestResources->status)
#define eContestResources8 (*gContestResources->field_8)
#define eContestAI (*gContestResources->aiData)
#define eContestResources10 (*gContestResources->field_10)
#define eContestResources14 (*gContestResources->field_14)
#define eUnzippedContestAudienceGfx (gHeap + 0x18000)
#define eUnknownHeap19000 (gHeap + 0x19000)
#define eContestDebugMode (gHeap[0x1a000])
#define eUnknownHeap1A004 (*(struct Shared1A004 *)(gHeap + 0x1a004))
extern struct ContestPokemon gContestMons[4];
extern s16 gContestMonConditions[4];
@ -441,8 +461,8 @@ extern s16 gUnknown_02039F18[4];
extern u8 gContestFinalStandings[4];
extern u8 gContestMonPartyIndex;
extern u8 gContestPlayerMonIndex;
extern u8 gUnknown_02039F26[4];
extern u8 gIsLinkContest;
extern u8 gContestantTurnOrder[4];
extern u8 gLinkContestFlags;
extern u8 gUnknown_02039F2B;
extern u16 gSpecialVar_ContestCategory;
extern u16 gSpecialVar_ContestRank;
@ -459,7 +479,7 @@ extern u32 gContestRngValue;
// contest.c
void ResetLinkContestBoolean(void);
void LoadContestBgAfterMoveAnim(void);
void sub_80D7B24(void);
void CB2_StartContest(void);
void sub_80DA8C8(u8 partyIndex);
void sub_80DAB8C(u8 contestType, u8 rank);
void sub_80DACBC(u8 contestType, u8 rank, bool32 isPostgame);
@ -467,8 +487,8 @@ u8 sub_80DAE0C(struct Pokemon *pkmn);
void sub_80DB09C(u8 contestCategory);
bool8 IsSpeciesNotUnown(u16 species);
bool8 Contest_IsMonsTurnDisabled(u8 a);
void sub_80DBED4(void);
void sub_80DCE58(u8 a);
void SaveLinkContestResults(void);
void SortContestants(bool8 a);
void SetContestantEffectStringID(u8 a, u8 b);
void SetContestantEffectStringID2(u8 a, u8 b);
void SetStartledString(u8 contestant, u8 jam);

View File

@ -6404,8 +6404,8 @@ extern const u32 gContestAudienceGfx[];
extern const u8 gContestApplauseMeterGfx[];
extern const u8 gContestNextTurnNumbersGfx[];
extern const u8 gContestNextTurnRandomGfx[];
extern const u32 gUnknown_08C16FA8[];
extern const u32 gUnknown_08C16E90[];
extern const u32 gOldContestGfx[];
extern const u32 gOldContestPalette[];
extern const u32 gUnknown_08C17170[];
extern const u32 gUnknown_08C17980[];
extern const u32 gTiles_8C19450[];

View File

@ -235,7 +235,7 @@ void LinkVSync(void);
void Timer3Intr(void);
void SerialCB(void);
bool32 InUnionRoom(void);
void sub_800E0E8(void);
void LoadWirelessStatusIndicatorSpriteGfx(void);
bool8 IsLinkTaskFinished(void);
void CreateWirelessStatusIndicatorSprite(u8, u8);
void sub_800ADF8(void);

View File

@ -2,7 +2,9 @@
#define GUARD_NEW_GAME_H
extern bool8 gDifferentSaveFile;
extern bool8 gUnknown_020322D5; // The purpose of this variable is unknown as it's read only 3 times(2 times in contest.c and 1 time in berry_blender.c), never written to.
// Shortcuts some randomness in berry_blender.c, and enables debug printing
// in contest.c.
extern bool8 gEnableContestDebugging;
void SetTrainerId(u32 trainerId, u8 *dst);
u32 GetTrainerId(u8 *trainerId);

View File

@ -2936,7 +2936,7 @@ s8 BattleAnimAdjustPanning2(s8 pan)
return pan;
}
s16 KeepPanInRange(s16 panArg)
s16 KeepPanInRange(s16 panArg, int oldPan)
{
s16 pan = panArg;

View File

@ -53,7 +53,7 @@ static void sub_8158B98(u8 taskId)
PlaySE12WithPanning(gTasks[taskId].data[0], pan);
}
pan += panIncrement;
gTasks[taskId].data[2] = KeepPanInRange(pan);
gTasks[taskId].data[2] = KeepPanInRange(pan, panIncrement);
}
}
@ -116,9 +116,12 @@ static void sub_8158D08(u8 taskId)
if (gTasks[taskId].data[10]++ == gTasks[taskId].data[5])
{
u16 dPan, oldPan;
gTasks[taskId].data[10] = 0;
gTasks[taskId].data[11] += gTasks[taskId].data[3];
gTasks[taskId].data[11] = KeepPanInRange(gTasks[taskId].data[11]);
dPan = gTasks[taskId].data[3];
oldPan = gTasks[taskId].data[11] ;
gTasks[taskId].data[11] = dPan + oldPan;
gTasks[taskId].data[11] = KeepPanInRange(gTasks[taskId].data[11], oldPan);
}
}
// task end
@ -368,71 +371,21 @@ void sub_8159278(u8 taskId)
sub_8159308(taskId);
}
#ifdef NONMATCHING
void sub_8159308(u8 taskId)
{
s16 panIncrement = gTasks[taskId].data[3];
u16 panIncrement = gTasks[taskId].data[3];
if (gTasks[taskId].data[10]++ == gTasks[taskId].data[5])
{
u16 oldPan;
gTasks[taskId].data[10] = 0;
gTasks[taskId].data[11] += panIncrement;
gTasks[taskId].data[11] = KeepPanInRange(gTasks[taskId].data[11]);
oldPan = gTasks[taskId].data[11];
gTasks[taskId].data[11] = panIncrement + oldPan;
gTasks[taskId].data[11] = KeepPanInRange(gTasks[taskId].data[11], oldPan);
}
gUnknown_02038440 = gTasks[taskId].data[11];
if (gTasks[taskId].data[11] == gTasks[taskId].data[2])
DestroyAnimVisualTask(taskId);
}
#else
NAKED
void sub_8159308(u8 taskId)
{
asm_unified(" push {r4,r5,lr}\n\
lsls r0, 24\n\
lsrs r0, 24\n\
adds r5, r0, 0\n\
ldr r1, =gTasks\n\
lsls r0, r5, 2\n\
adds r0, r5\n\
lsls r0, 3\n\
adds r4, r0, r1\n\
ldrh r2, [r4, 0xE]\n\
ldrh r0, [r4, 0x1C]\n\
adds r1, r0, 0x1\n\
strh r1, [r4, 0x1C]\n\
lsls r0, 16\n\
asrs r0, 16\n\
movs r3, 0x12\n\
ldrsh r1, [r4, r3]\n\
cmp r0, r1\n\
bne _08159342\n\
movs r0, 0\n\
strh r0, [r4, 0x1C]\n\
ldrh r1, [r4, 0x1E]\n\
adds r0, r2, r1\n\
strh r0, [r4, 0x1E]\n\
movs r2, 0x1E\n\
ldrsh r0, [r4, r2]\n\
bl KeepPanInRange\n\
strh r0, [r4, 0x1E]\n\
_08159342:\n\
ldr r1, =gUnknown_02038440\n\
ldrh r0, [r4, 0x1E]\n\
strb r0, [r1]\n\
movs r3, 0x1E\n\
ldrsh r1, [r4, r3]\n\
movs r2, 0xC\n\
ldrsh r0, [r4, r2]\n\
cmp r1, r0\n\
bne _0815935A\n\
adds r0, r5, 0\n\
bl DestroyAnimVisualTask\n\
_0815935A:\n\
pop {r4,r5}\n\
pop {r0}\n\
bx r0\n\
.pool");
}
#endif

View File

@ -33,6 +33,7 @@
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/trainers.h"
#include "constants/rgb.h"
extern struct MusicPlayerInfo gMPlayInfo_BGM;
@ -2405,7 +2406,7 @@ static void PlayerHandleFaintAnimation(void)
static void PlayerHandlePaletteFade(void)
{
BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, RGB_BLACK);
PlayerBufferExecCompleted();
}
@ -2627,7 +2628,7 @@ static void PlayerHandleChooseItem(void)
{
s32 i;
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gBattlerControllerFuncs[gActiveBattler] = OpenBagAndChooseItem;
gBattlerInMenuId = gActiveBattler;
@ -2654,7 +2655,7 @@ static void PlayerHandleChoosePokemon(void)
*(&gBattleStruct->battlerPreventingSwitchout) = gBattleBufferA[gActiveBattler][1] >> 4;
*(&gBattleStruct->field_8B) = gBattleBufferA[gActiveBattler][2];
*(&gBattleStruct->abilityPreventingSwitchout) = gBattleBufferA[gActiveBattler][3];
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gBattlerControllerFuncs[gActiveBattler] = OpenPartyMenuToChooseMon;
gBattlerInMenuId = gActiveBattler;
}
@ -2663,7 +2664,7 @@ static void PlayerHandleChoosePokemon(void)
static void PlayerHandleCmd23(void)
{
BattleStopLowHpSound();
BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, RGB_BLACK);
PlayerBufferExecCompleted();
}

View File

@ -22,6 +22,7 @@
#include "window.h"
#include "constants/battle_anim.h"
#include "constants/songs.h"
#include "constants/rgb.h"
// this file's functions
static void SafariHandleGetMonData(void);
@ -471,7 +472,7 @@ static void SafariHandleChooseItem(void)
{
s32 i;
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gBattlerControllerFuncs[gActiveBattler] = SafariOpenPokeblockCase;
gBattlerInMenuId = gActiveBattler;
}

View File

@ -30,6 +30,7 @@
#include "constants/moves.h"
#include "constants/songs.h"
#include "constants/trainers.h"
#include "constants/rgb.h"
// this file's functions
static void WallyHandleGetMonData(void);
@ -1242,7 +1243,7 @@ static void WallyHandleChooseMove(void)
static void WallyHandleChooseItem(void)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gBattlerControllerFuncs[gActiveBattler] = OpenBagAfterPaletteFade;
gBattlerInMenuId = gActiveBattler;
}

View File

@ -1166,7 +1166,7 @@ static void CB2_InitSelectScreen(void)
ShowBg(0);
ShowBg(1);
SetVBlankCallback(Select_VblankCb);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG0_ON | DISPCNT_BG1_ON | DISPCNT_OBJ_1D_MAP);
if (sFactorySelectScreen->fromSummaryScreen == TRUE)
{
@ -1405,7 +1405,7 @@ static void Task_FromSelectScreenToSummaryScreen(u8 taskId)
{
case 6:
gPlttBufferUnfaded[228] = gPlttBufferFaded[228];
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].data[0] = 7;
break;
case 7:
@ -1442,7 +1442,7 @@ static void Task_CloseSelectionScreen(u8 taskId)
switch (gTasks[taskId].data[0])
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].data[0]++;
break;
case 1:
@ -2274,7 +2274,7 @@ static void Task_FromSwapScreenToSummaryScreen(u8 taskId)
switch (gTasks[taskId].data[0])
{
case 6:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].data[0] = 7;
break;
case 7:
@ -2327,7 +2327,7 @@ static void Task_CloseSwapScreen(u8 taskId)
gTasks[taskId].data[0]++;
break;
case 2:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].data[0]++;
break;
case 3:
@ -3218,7 +3218,7 @@ static void CB2_InitSwapScreen(void)
gMain.state++;
break;
case 14:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
ShowBg(0);
ShowBg(1);

View File

@ -977,7 +977,7 @@ static void CB2_HandleStartBattle(void)
gBattleCommunication[MULTIUSE_STATE] = 1;
}
if (gWirelessCommType)
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
break;
case 1:
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
@ -1172,7 +1172,7 @@ static void CB2_HandleStartMultiPartnerBattle(void)
gBattleCommunication[MULTIUSE_STATE] = 1;
}
if (gWirelessCommType)
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
// fall through
case 1:
if (gBattleTypeFlags & BATTLE_TYPE_LINK)
@ -1572,7 +1572,7 @@ static void CB2_HandleStartMultiBattle(void)
gBattleCommunication[MULTIUSE_STATE] = 1;
}
if (gWirelessCommType)
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
break;
case 1:
if (gBattleTypeFlags & BATTLE_TYPE_LINK)

View File

@ -22,6 +22,7 @@
#include "gpu_regs.h"
#include "constants/game_stat.h"
#include "trainer_hill.h"
#include "constants/rgb.h"
// this file's functions
static void Task_CloseTrainerHillRecordsOnButton(u8 taskId);
@ -364,7 +365,7 @@ static void Task_CloseTrainerHillRecordsOnButton(u8 taskId)
static void Task_BeginPaletteFade(u8 taskId)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_ExitTrainerHillRecords;
}
@ -511,7 +512,7 @@ static void CB2_ShowTrainerHillRecords(void)
gMain.state++;
break;
case 6:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
gMain.state++;
break;
case 7:

View File

@ -50,6 +50,7 @@
#include "pokemon_summary_screen.h"
#include "pokenav.h"
#include "menu_specialized.h"
#include "constants/rgb.h"
#include "data.h"
extern struct MusicPlayerInfo gMPlayInfo_BGM;
@ -5696,7 +5697,7 @@ static void atk5A_yesnoboxlearnmove(void)
if (gBattleCommunication[1] == 0)
{
HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, WINDOW_CLEAR);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gBattleScripting.learnMoveState++;
}
else
@ -10274,7 +10275,7 @@ static void atkF2_displaydexinfo(void)
switch (gBattleCommunication[0])
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gBattleCommunication[0]++;
break;
case 1:
@ -10305,7 +10306,7 @@ static void atkF2_displaydexinfo(void)
case 4:
if (!IsDma3ManagerBusyWithBgCopy())
{
BeginNormalPaletteFade(0xFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFF, 0, 0x10, 0, RGB_BLACK);
ShowBg(0);
ShowBg(3);
gBattleCommunication[0]++;

View File

@ -23,6 +23,7 @@
#include "constants/field_effects.h"
#include "constants/songs.h"
#include "constants/trainers.h"
#include "constants/rgb.h"
struct TransitionData
{
@ -1076,7 +1077,7 @@ static bool8 Phase2_Blur_Func2(struct Task *task)
{
task->tData1 = 4;
if (++task->tData2 == 10)
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, RGB_BLACK);
SetGpuReg(REG_OFFSET_MOSAIC, (task->tData2 & 15) * 17);
if (task->tData2 > 14)
task->tState++;
@ -1103,7 +1104,7 @@ static bool8 Phase2_Swirl_Func1(struct Task *task)
{
sub_8149F08();
ScanlineEffect_Clear();
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, RGB_BLACK);
sub_8149F98(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_14, 0, 2, 0, 160);
SetVBlankCallback(VBlankCB_Phase2_Swirl);
@ -1158,7 +1159,7 @@ static bool8 Phase2_Shuffle_Func1(struct Task *task)
sub_8149F08();
ScanlineEffect_Clear();
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, RGB_BLACK);
memset(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_16, 0x140);
SetVBlankCallback(VBlankCB_Phase2_Shuffle);
@ -1461,7 +1462,7 @@ static bool8 Phase2_Kyogre_Func5(struct Task *task)
static bool8 Phase2_WeatherDuo_Func6(struct Task *task)
{
BeginNormalPaletteFade(0xFFFF8000, 1, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFF8000, 1, 0, 0x10, RGB_BLACK);
task->tState++;
return FALSE;
}
@ -1546,7 +1547,7 @@ static bool8 Phase2_FramesCountdown(struct Task *task)
static bool8 Phase2_WeatherTrio_Func1(struct Task *task)
{
BeginNormalPaletteFade(0x0000FFFF, 1, 0, 0x10, 0);
BeginNormalPaletteFade(0x0000FFFF, 1, 0, 0x10, RGB_BLACK);
task->tState++;
return FALSE;
}
@ -1969,7 +1970,7 @@ static bool8 Phase2_Ripple_Func2(struct Task *task)
if (++task->tData3 == 81)
{
task->tData4++;
BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 0x10, RGB_BLACK);
}
if (task->tData4 != 0 && !gPaletteFade.active)
@ -3159,7 +3160,7 @@ static bool8 Phase2_Rayquaza_Func6(struct Task *task)
{
task->tState++;
task->tData1 = 0;
BeginNormalPaletteFade(0xFFFF8000, 2, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFF8000, 2, 0, 0x10, RGB_BLACK);
}
return FALSE;
@ -3978,7 +3979,7 @@ static bool8 Phase2_30_Func4(struct Task *task)
if (++task->tData3 == 101)
{
task->tData4++;
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
}
if (task->tData4 != 0 && !gPaletteFade.active)

View File

@ -36,6 +36,7 @@
#include "new_game.h"
#include "save.h"
#include "link.h"
#include "constants/rgb.h"
#define BLENDER_SCORE_BEST 0
#define BLENDER_SCORE_GOOD 1
@ -996,7 +997,7 @@ static void sub_807FAC8(void)
}
if (gReceivedRemoteLinkPlayers != 0 && gWirelessCommType)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
}
SetVBlankCallback(VBlankCB0_BerryBlender);
@ -1004,7 +1005,7 @@ static void sub_807FAC8(void)
}
break;
case 2:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
sub_8082D28();
sBerryBlenderData->mainState++;
break;
@ -1018,7 +1019,7 @@ static void sub_807FAC8(void)
sBerryBlenderData->mainState++;
break;
case 5:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
sBerryBlenderData->mainState++;
break;
case 6:
@ -1202,13 +1203,13 @@ static void sub_8080018(void)
}
if (gReceivedRemoteLinkPlayers != 0 && gWirelessCommType)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
}
sBerryBlenderData->mainState++;
break;
case 3:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
sBerryBlenderData->mainState++;
break;
case 4:
@ -1534,7 +1535,7 @@ static void sub_80808D4(void)
sBerryBlenderData->mainState++;
break;
case 3:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
sBerryBlenderData->mainState++;
sBerryBlenderData->framesToWait = 0;
break;
@ -2037,7 +2038,7 @@ static void sub_8081744(void)
sBerryBlenderData->field_4C--;
sBerryBlenderData->field_72 = 0;
}
if (gUnknown_020322D5 && gMain.newKeys & L_BUTTON)
if (gEnableContestDebugging && gMain.newKeys & L_BUTTON)
sBerryBlenderData->field_123 ^= 1;
}
@ -2700,7 +2701,7 @@ static void CB2_HandlePlayerLinkPlayAgainChoice(void)
case 9:
if (IsLinkTaskFinished())
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
sBerryBlenderData->gameEndState++;
}
break;

View File

@ -511,7 +511,7 @@ int sub_802104C(void)
CopyBgTilemapBufferToVram(3);
break;
case 8:
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
sub_8022730(var0);
SetGpuReg(REG_OFFSET_BG1VOFS, -gSpriteCoordOffsetY);

View File

@ -28,6 +28,7 @@
#include "item_menu_icons.h"
#include "decompress.h"
#include "international_string_util.h"
#include "constants/rgb.h"
// There are 4 windows used in berry tag screen.
enum
@ -279,7 +280,7 @@ static bool8 InitBerryTagScreen(void)
gMain.state++;
break;
case 15:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
gPaletteFade.bufferTransferDisabled = 0;
gMain.state++;
break;
@ -513,7 +514,7 @@ static void DestroyFlavorCircleSprites(void)
static void PrepareToCloseBerryTagScreen(u8 taskId)
{
PlaySE(SE_SELECT);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_CloseBerryTagScreen;
}

View File

@ -163,7 +163,7 @@ static bool8 SetupClearSaveDataScreen(void)
ShowBg(3);
SetGpuReg(REG_OFFSET_BLDCNT, 0);
InitClearSaveDataScreenWindows();
BeginNormalPaletteFade(0x0000FFFF, 0, 0x10, 0, 0xFFFF);
BeginNormalPaletteFade(0x0000FFFF, 0, 0x10, 0, RGB_WHITEALPHA);
EnableInterrupts(INTR_FLAG_VBLANK);
SetVBlankCallback(VBlankCB);
gMain.state = 1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -309,7 +309,7 @@ void sub_80F5B00(void)
gBattle_WIN1V = 0x80A0;
CreateTask(sub_80F68B4, 20);
sub_80F7880();
if (gIsLinkContest & 0x2)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS)
gPaletteFade.bufferTransferDisabled = 1;
else
PlayBGM(MUS_CON_K);
@ -351,12 +351,12 @@ static void sub_80F5CE4(u8 taskId)
{
u16 var;
if (gIsLinkContest & 1)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)
{
switch (gTasks[taskId].data[0])
{
case 0:
sub_80DBED4();
SaveLinkContestResults();
if (gContestFinalStandings[gContestPlayerMonIndex] == 0)
{
IncrementGameStat(GAME_STAT_WON_LINK_CONTEST);
@ -381,7 +381,7 @@ static void sub_80F5CE4(u8 taskId)
break;
case 1:
gTasks[taskId].data[0]++;
if (!(gIsLinkContest & 0x2))
if (!(gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS))
gTasks[taskId].data[0] = 100;
break;
case 2:
@ -406,7 +406,7 @@ static void sub_80F5CE4(u8 taskId)
if (!gPaletteFade.active)
{
gTasks[taskId].data[0] = 0;
if (gIsLinkContest & 0x1)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)
{
sub_80F707C(gText_CommunicationStandby);
gTasks[taskId].func = sub_80F5ED8;
@ -742,7 +742,7 @@ static void sub_80F66B4(u8 taskId)
if (gMain.newKeys & A_BUTTON)
{
if (!(gIsLinkContest & 0x1))
if (!(gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK))
{
for (i = 0; i < 4; i++)
{
@ -758,7 +758,7 @@ static void sub_80F66B4(u8 taskId)
static void sub_80F671C(u8 taskId)
{
if (gIsLinkContest & 0x1)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)
{
if (!gTasks[taskId].data[10])
{
@ -777,7 +777,7 @@ static void sub_80F677C(u8 taskId)
{
if (!gReceivedRemoteLinkPlayers)
{
if (gIsLinkContest & 0x2)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS)
DestroyWirelessStatusIndicatorSprite();
sub_80F7144();
@ -787,7 +787,7 @@ static void sub_80F677C(u8 taskId)
static void sub_80F67C4(u8 taskId)
{
if (!(gIsLinkContest & 0x1))
if (!(gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK))
BravoTrainerPokemonProfile_BeforeInterview2(gContestFinalStandings[gContestPlayerMonIndex]);
BeginHardwarePaletteFade(0xFF, 0, 0, 16, 0);
@ -907,9 +907,9 @@ static void sub_80F6AE8(void)
u16 sheet;
u8 spriteId;
if (gIsLinkContest & 0x2)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(8, 8);
gSprites[gWirelessStatusIndicatorSpriteId].subpriority = 1;
sheet = LoadSpriteSheet(&gUnknown_0858D8E0);
@ -1392,7 +1392,7 @@ static void sub_80F71C8(void)
x = 5;
y = 1;
if (gIsLinkContest & 0x1)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)
{
CopyToBgTilemapBufferRect(2, gUnknown_08DC6498, 5, 1, 5, 2);
x = 10;
@ -2830,7 +2830,7 @@ void sub_80F8390(void)
void sub_80F83D0(void)
{
SetMainCallback2(sub_80D7B24);
SetMainCallback2(CB2_StartContest);
}
static void sub_80F83E0(u8 taskId)
@ -2886,7 +2886,7 @@ void sub_80F84C4(u8 taskId)
static void sub_80F8508(u8 taskId)
{
if (gIsLinkContest & 0x4)
if (gLinkContestFlags & LINK_CONTEST_FLAG_HAS_RS_PLAYER)
{
sub_80DA8C8(gContestMonPartyIndex);
SetTaskFuncWithFollowupFunc(taskId, sub_80FC6BC, sub_80F8568);
@ -3069,7 +3069,7 @@ _080F8678:\n\
static void sub_80F86B8(u8 taskId)
{
sub_80DCE58(0);
SortContestants(FALSE);
SetTaskFuncWithFollowupFunc(taskId, sub_80FCFD0, sub_80F8714);
}

View File

@ -72,22 +72,22 @@ static void sub_80FC5DC(u8 taskId)
gContestPlayerMonIndex = GetMultiplayerId();
gNumLinkContestPlayers = GetLinkPlayerCount();
gIsLinkContest = 1;
gLinkContestFlags = LINK_CONTEST_FLAG_IS_LINK;
if (gWirelessCommType == 1)
gIsLinkContest = 3;
gLinkContestFlags = LINK_CONTEST_FLAG_IS_LINK | LINK_CONTEST_FLAG_IS_WIRELESS;
for (i = 0; i < gNumLinkContestPlayers && (u32)(gLinkPlayers[i].version & 0xFF) - 1 > VERSION_RUBY - 1; i++)
;
if (i < gNumLinkContestPlayers)
gIsLinkContest |= 0x4;
gLinkContestFlags |= LINK_CONTEST_FLAG_HAS_RS_PLAYER;
SwitchTaskToFollowupFunc(taskId);
}
bool32 sub_80FC670(s16 *arg0)
{
if (gIsLinkContest & 0x4)
if (gLinkContestFlags & LINK_CONTEST_FLAG_HAS_RS_PLAYER)
return TRUE;
switch (*arg0)
@ -269,7 +269,7 @@ void sub_80FC9F8(u8 taskId)
case 0:
if (IsLinkTaskFinished())
{
if (sub_80FC4F4(&gContestResources->field_4[gContestPlayerMonIndex].currMove, sizeof(gContestResources->field_4[gContestPlayerMonIndex].currMove)) == TRUE)
if (sub_80FC4F4(&eContestantStatus[gContestPlayerMonIndex].currMove, sizeof(eContestantStatus[gContestPlayerMonIndex].currMove)) == TRUE)
gTasks[taskId].data[0]++;
}
break;
@ -277,7 +277,7 @@ void sub_80FC9F8(u8 taskId)
if (sub_80FC55C())
{
for (i = 0; i < gNumLinkContestPlayers; i++)
gContestResources->field_4[i].currMove = gBlockRecvBuffer[i][0];
eContestantStatus[i].currMove = gBlockRecvBuffer[i][0];
gTasks[taskId].data[0]++;
}
@ -373,14 +373,14 @@ void sub_80FCC88(u8 taskId)
case 0:
if (IsLinkTaskFinished())
{
if (sub_80FC4F4(gContestResources->field_4, 4 * sizeof(struct ContestantStatus)) == 1)
if (sub_80FC4F4(eContestantStatus, 4 * sizeof(struct ContestantStatus)) == 1)
gTasks[taskId].data[0]++;
}
break;
case 1:
if (sub_80FC55C())
{
memcpy(gContestResources->field_4, gBlockRecvBuffer[gUnknown_02039F2B], 4 * sizeof(struct ContestantStatus));
memcpy(eContestantStatus, gBlockRecvBuffer[gUnknown_02039F2B], 4 * sizeof(struct ContestantStatus));
gTasks[taskId].data[0]++;
}
break;
@ -425,14 +425,14 @@ void sub_80FCC88(u8 taskId)
case 9:
if (IsLinkTaskFinished())
{
if (sub_80FC4F4(gUnknown_02039F26, sizeof(gUnknown_02039F26)) == 1)
if (sub_80FC4F4(gContestantTurnOrder, sizeof(gContestantTurnOrder)) == 1)
gTasks[taskId].data[0]++;
}
break;
case 10:
if (sub_80FC55C())
{
memcpy(gUnknown_02039F26, gBlockRecvBuffer[gUnknown_02039F2B], sizeof(gUnknown_02039F26));
memcpy(gContestantTurnOrder, gBlockRecvBuffer[gUnknown_02039F2B], sizeof(gContestantTurnOrder));
gTasks[taskId].data[0]++;
}
break;
@ -528,14 +528,14 @@ void sub_80FCFD0(u8 taskId)
case 0:
if (IsLinkTaskFinished())
{
if (sub_80FC4F4(gUnknown_02039F26, sizeof(gUnknown_02039F26)) == 1)
if (sub_80FC4F4(gContestantTurnOrder, sizeof(gContestantTurnOrder)) == 1)
gTasks[taskId].data[0]++;
}
break;
case 1:
if (sub_80FC55C())
{
memcpy(gUnknown_02039F26, gBlockRecvBuffer[gUnknown_02039F2B], sizeof(gUnknown_02039F26));
memcpy(gContestantTurnOrder, gBlockRecvBuffer[gUnknown_02039F2B], sizeof(gContestantTurnOrder));
gTasks[taskId].data[0]++;
}
break;

View File

@ -134,7 +134,7 @@ static void sub_81DA10C(u8 taskId)
static void sub_81DA138(u8 taskId)
{
sub_80DCE58(0);
SortContestants(FALSE);
SetTaskFuncWithFollowupFunc(taskId, sub_80FCFD0, sub_80F8714);
}

View File

@ -183,7 +183,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("POOCHY"),
.trainerName = _("JIMMY"),
.trainerGfxId = EVENT_OBJ_GFX_BOY_1,
.flags = 0xC000FFF,
.aiChecks = 0xC000FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -212,7 +212,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("MUSILLE"),
.trainerName = _("EDITH"),
.trainerGfxId = EVENT_OBJ_GFX_GIRL_1,
.flags = 0x82000FFF,
.aiChecks = 0x82000FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -241,7 +241,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DUSTER"),
.trainerName = _("EVAN"),
.trainerGfxId = EVENT_OBJ_GFX_LITTLE_BOY,
.flags = 0x21000FFF,
.aiChecks = 0x21000FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -270,7 +270,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DOTS"),
.trainerName = _("KELSEY"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_1,
.flags = 0x20800FFF,
.aiChecks = 0x20800FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -299,7 +299,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("TATAY"),
.trainerName = _("MADISON"),
.trainerGfxId = EVENT_OBJ_GFX_POKEFAN_F,
.flags = 0x80400FFF,
.aiChecks = 0x80400FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -328,7 +328,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("NINDA"),
.trainerName = _("RAYMOND"),
.trainerGfxId = EVENT_OBJ_GFX_BLACK_BELT,
.flags = 0x10200FFF,
.aiChecks = 0x10200FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -357,7 +357,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SMISH"),
.trainerName = _("GRANT"),
.trainerGfxId = EVENT_OBJ_GFX_YOUNGSTER,
.flags = 0x20100FFF,
.aiChecks = 0x20100FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -386,7 +386,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SLEAL"),
.trainerName = _("PAIGE"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_4,
.flags = 0x8080FFF,
.aiChecks = 0x8080FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -415,7 +415,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SLOKTH"),
.trainerName = _("ALEC"),
.trainerGfxId = EVENT_OBJ_GFX_CAMPER,
.flags = 0x40040FFF,
.aiChecks = 0x40040FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -444,7 +444,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("WHIRIS"),
.trainerName = _("SYDNEY"),
.trainerGfxId = EVENT_OBJ_GFX_LASS,
.flags = 0x80020FFF,
.aiChecks = 0x80020FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -473,7 +473,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("MAHITA"),
.trainerName = _("MORRIS"),
.trainerGfxId = EVENT_OBJ_GFX_SCHOOL_KID_M,
.flags = 0x8010FFF,
.aiChecks = 0x8010FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -502,7 +502,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("RONAR"),
.trainerName = _("MARIAH"),
.trainerGfxId = EVENT_OBJ_GFX_GIRL_2,
.flags = 0x8008FFF,
.aiChecks = 0x8008FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -531,7 +531,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BATRO"),
.trainerName = _("RUSSELL"),
.trainerGfxId = EVENT_OBJ_GFX_MAN_3,
.flags = 0x90004FFF,
.aiChecks = 0x90004FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -560,7 +560,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("GULIN"),
.trainerName = _("MELANIE"),
.trainerGfxId = EVENT_OBJ_GFX_TWIN,
.flags = 0x40002FFF,
.aiChecks = 0x40002FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -589,7 +589,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("RIKELEC"),
.trainerName = _("CHANCE"),
.trainerGfxId = EVENT_OBJ_GFX_RICH_BOY,
.flags = 0x80001FFF,
.aiChecks = 0x80001FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -618,7 +618,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BULBY"),
.trainerName = _("AGATHA"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_2,
.flags = 0xC000FFF,
.aiChecks = 0xC000FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -647,7 +647,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("FUTTERBE"),
.trainerName = _("BEAU"),
.trainerGfxId = EVENT_OBJ_GFX_HEX_MANIAC,
.flags = 0x82000FFF,
.aiChecks = 0x82000FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -676,7 +676,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("PIDEOT"),
.trainerName = _("KAY"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_5,
.flags = 0x21000FFF,
.aiChecks = 0x21000FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -705,7 +705,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DIGLE"),
.trainerName = _("CALE"),
.trainerGfxId = EVENT_OBJ_GFX_HIKER,
.flags = 0x20800FFF,
.aiChecks = 0x20800FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -734,7 +734,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("WAGIL"),
.trainerName = _("CAITLIN"),
.trainerGfxId = EVENT_OBJ_GFX_TUBER_F,
.flags = 0x80400FFF,
.aiChecks = 0x80400FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -763,7 +763,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("TOTDIL"),
.trainerName = _("COLBY"),
.trainerGfxId = EVENT_OBJ_GFX_NINJA_BOY,
.flags = 0x10200FFF,
.aiChecks = 0x10200FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -792,7 +792,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BALEDY"),
.trainerName = _("KYLIE"),
.trainerGfxId = EVENT_OBJ_GFX_BEAUTY,
.flags = 0x20100FFF,
.aiChecks = 0x20100FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -821,7 +821,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BIRDLY"),
.trainerName = _("LIAM"),
.trainerGfxId = EVENT_OBJ_GFX_MAN_5,
.flags = 0x8080FFF,
.aiChecks = 0x8080FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -850,7 +850,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("TARVITAR"),
.trainerName = _("MILO"),
.trainerGfxId = EVENT_OBJ_GFX_MANIAC,
.flags = 0x40040FFF,
.aiChecks = 0x40040FFF,
.whichRank = CONTEST_RANK_NORMAL,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -879,7 +879,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("RELIA"),
.trainerName = _("KARINA"),
.trainerGfxId = EVENT_OBJ_GFX_PICNICKER,
.flags = 0x24000FFF,
.aiChecks = 0x24000FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -908,7 +908,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DUODO"),
.trainerName = _("BOBBY"),
.trainerGfxId = EVENT_OBJ_GFX_RUNNING_TRIATHLETE_M,
.flags = 0x82000FFF,
.aiChecks = 0x82000FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -937,7 +937,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("PINCHIN"),
.trainerName = _("CLAIRE"),
.trainerGfxId = EVENT_OBJ_GFX_GIRL_1,
.flags = 0x81000FFF,
.aiChecks = 0x81000FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -966,7 +966,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("NACAC"),
.trainerName = _("WILLIE"),
.trainerGfxId = EVENT_OBJ_GFX_LITTLE_BOY,
.flags = 0x80800FFF,
.aiChecks = 0x80800FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -995,7 +995,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SHRAND"),
.trainerName = _("CASSIDY"),
.trainerGfxId = EVENT_OBJ_GFX_POKEFAN_F,
.flags = 0x10400FFF,
.aiChecks = 0x10400FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -1024,7 +1024,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("TOYBAL"),
.trainerName = _("MORGAN"),
.trainerGfxId = EVENT_OBJ_GFX_BLACK_BELT,
.flags = 0x8200FFF,
.aiChecks = 0x8200FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1053,7 +1053,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("CHAMCHAM"),
.trainerName = _("SUMMER"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_4,
.flags = 0x10100FFF,
.aiChecks = 0x10100FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -1082,7 +1082,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SPININ"),
.trainerName = _("MILES"),
.trainerGfxId = EVENT_OBJ_GFX_CAMPER,
.flags = 0x80080FFF,
.aiChecks = 0x80080FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1111,7 +1111,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SWABY"),
.trainerName = _("AUDREY"),
.trainerGfxId = EVENT_OBJ_GFX_LASS,
.flags = 0xA0040FFF,
.aiChecks = 0xA0040FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1140,7 +1140,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("POINKER"),
.trainerName = _("AVERY"),
.trainerGfxId = EVENT_OBJ_GFX_SCHOOL_KID_M,
.flags = 0x80020FFF,
.aiChecks = 0x80020FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1169,7 +1169,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("KECON"),
.trainerName = _("ARIANA"),
.trainerGfxId = EVENT_OBJ_GFX_GIRL_2,
.flags = 0x80010FFF,
.aiChecks = 0x80010FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1198,7 +1198,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("GOLDEN"),
.trainerName = _("ASHTON"),
.trainerGfxId = EVENT_OBJ_GFX_MAN_3,
.flags = 0x80008FFF,
.aiChecks = 0x80008FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -1227,7 +1227,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BOBOACH"),
.trainerName = _("SANDRA"),
.trainerGfxId = EVENT_OBJ_GFX_TWIN,
.flags = 0x80004FFF,
.aiChecks = 0x80004FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1256,7 +1256,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("CORPY"),
.trainerName = _("CARSON"),
.trainerGfxId = EVENT_OBJ_GFX_YOUNGSTER,
.flags = 0x8002FFF,
.aiChecks = 0x8002FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -1285,7 +1285,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("TADO"),
.trainerName = _("KATRINA"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_1,
.flags = 0x8001FFF,
.aiChecks = 0x8001FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1314,7 +1314,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BROWLO"),
.trainerName = _("LUKE"),
.trainerGfxId = EVENT_OBJ_GFX_FAT_MAN,
.flags = 0xC000FFF,
.aiChecks = 0xC000FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1343,7 +1343,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("FETCHIN"),
.trainerName = _("RAUL"),
.trainerGfxId = EVENT_OBJ_GFX_MAN_5,
.flags = 0x82000FFF,
.aiChecks = 0x82000FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -1372,7 +1372,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SEELEY"),
.trainerName = _("JADA"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_2,
.flags = 0x21000FFF,
.aiChecks = 0x21000FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1401,7 +1401,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DROWZIN"),
.trainerName = _("ZEEK"),
.trainerGfxId = EVENT_OBJ_GFX_PSYCHIC_M,
.flags = 0x20800FFF,
.aiChecks = 0x20800FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1430,7 +1430,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("HITEMON"),
.trainerName = _("DIEGO"),
.trainerGfxId = EVENT_OBJ_GFX_EXPERT_M,
.flags = 0x80400FFF,
.aiChecks = 0x80400FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -1459,7 +1459,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BLISS"),
.trainerName = _("ALIYAH"),
.trainerGfxId = EVENT_OBJ_GFX_TEALA,
.flags = 0x10200FFF,
.aiChecks = 0x10200FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1488,7 +1488,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("KIDLEK"),
.trainerName = _("NATALIA"),
.trainerGfxId = EVENT_OBJ_GFX_POKEFAN_F,
.flags = 0x20100FFF,
.aiChecks = 0x20100FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -1517,7 +1517,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SNUBBINS"),
.trainerName = _("DEVIN"),
.trainerGfxId = EVENT_OBJ_GFX_GENTLEMAN,
.flags = 0x8080FFF,
.aiChecks = 0x8080FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1546,7 +1546,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DREAVIS"),
.trainerName = _("TYLOR"),
.trainerGfxId = EVENT_OBJ_GFX_HEX_MANIAC,
.flags = 0x40040FFF,
.aiChecks = 0x40040FFF,
.whichRank = CONTEST_RANK_SUPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1575,7 +1575,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("LAIRN"),
.trainerName = _("RONNIE"),
.trainerGfxId = EVENT_OBJ_GFX_HIKER,
.flags = 0x84000FFF,
.aiChecks = 0x84000FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1604,7 +1604,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SHIFTY"),
.trainerName = _("CLAUDIA"),
.trainerGfxId = EVENT_OBJ_GFX_GIRL_1,
.flags = 0x82000FFF,
.aiChecks = 0x82000FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -1633,7 +1633,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("NINAS"),
.trainerName = _("ELIAS"),
.trainerGfxId = EVENT_OBJ_GFX_LITTLE_BOY,
.flags = 0x81000FFF,
.aiChecks = 0x81000FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1662,7 +1662,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("WELOW"),
.trainerName = _("JADE"),
.trainerGfxId = EVENT_OBJ_GFX_POKEFAN_F,
.flags = 0x80800FFF,
.aiChecks = 0x80800FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -1691,7 +1691,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("YENA"),
.trainerName = _("FRANCIS"),
.trainerGfxId = EVENT_OBJ_GFX_BLACK_BELT,
.flags = 0x80400FFF,
.aiChecks = 0x80400FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1720,7 +1720,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("TIFLY"),
.trainerName = _("ALISHA"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_4,
.flags = 0x80200FFF,
.aiChecks = 0x80200FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1749,7 +1749,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("KINGSEA"),
.trainerName = _("SAUL"),
.trainerGfxId = EVENT_OBJ_GFX_CAMPER,
.flags = 0x80100FFF,
.aiChecks = 0x80100FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -1778,7 +1778,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("CASTER"),
.trainerName = _("FELICIA"),
.trainerGfxId = EVENT_OBJ_GFX_LASS,
.flags = 0x80080FFF,
.aiChecks = 0x80080FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -1807,7 +1807,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("CHOKEM"),
.trainerName = _("EMILIO"),
.trainerGfxId = EVENT_OBJ_GFX_SCHOOL_KID_M,
.flags = 0x80040FFF,
.aiChecks = 0x80040FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -1836,7 +1836,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("LOMBE"),
.trainerName = _("KARLA"),
.trainerGfxId = EVENT_OBJ_GFX_GIRL_2,
.flags = 0x80020FFF,
.aiChecks = 0x80020FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1865,7 +1865,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("VIPES"),
.trainerName = _("DARRYL"),
.trainerGfxId = EVENT_OBJ_GFX_MAN_3,
.flags = 0x80010FFF,
.aiChecks = 0x80010FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1894,7 +1894,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("MERAIL"),
.trainerName = _("SELENA"),
.trainerGfxId = EVENT_OBJ_GFX_EXPERT_F,
.flags = 0x80008FFF,
.aiChecks = 0x80008FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1923,7 +1923,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("KARPAG"),
.trainerName = _("NOEL"),
.trainerGfxId = EVENT_OBJ_GFX_YOUNGSTER,
.flags = 0x80004FFF,
.aiChecks = 0x80004FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -1952,7 +1952,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("LUNONE"),
.trainerName = _("LACEY"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_1,
.flags = 0x80002FFF,
.aiChecks = 0x80002FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -1981,7 +1981,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("ABSO"),
.trainerName = _("CORBIN"),
.trainerGfxId = EVENT_OBJ_GFX_MANIAC,
.flags = 0x80001FFF,
.aiChecks = 0x80001FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -2010,7 +2010,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("EGGSOR"),
.trainerName = _("GRACIE"),
.trainerGfxId = EVENT_OBJ_GFX_PICNICKER,
.flags = 0xC000FFF,
.aiChecks = 0xC000FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2039,7 +2039,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("CUBIN"),
.trainerName = _("COLTIN"),
.trainerGfxId = EVENT_OBJ_GFX_MAN_4,
.flags = 0x82000FFF,
.aiChecks = 0x82000FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2068,7 +2068,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("HITMON"),
.trainerName = _("ELLIE"),
.trainerGfxId = EVENT_OBJ_GFX_EXPERT_F,
.flags = 0x21000FFF,
.aiChecks = 0x21000FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -2097,7 +2097,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SURTLE"),
.trainerName = _("MARCUS"),
.trainerGfxId = EVENT_OBJ_GFX_SAILOR,
.flags = 0x20800FFF,
.aiChecks = 0x20800FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2126,7 +2126,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("KHANKAN"),
.trainerName = _("KIARA"),
.trainerGfxId = EVENT_OBJ_GFX_GIRL_3,
.flags = 0x80400FFF,
.aiChecks = 0x80400FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -2155,7 +2155,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("PINOC"),
.trainerName = _("BRYCE"),
.trainerGfxId = EVENT_OBJ_GFX_BUG_CATCHER,
.flags = 0x10200FFF,
.aiChecks = 0x10200FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -2184,7 +2184,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DILTOT"),
.trainerName = _("JAMIE"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_5,
.flags = 0x20100FFF,
.aiChecks = 0x20100FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2213,7 +2213,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DOOMOND"),
.trainerName = _("JORGE"),
.trainerGfxId = EVENT_OBJ_GFX_GENTLEMAN,
.flags = 0x8080FFF,
.aiChecks = 0x8080FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -2242,7 +2242,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("MILKAN"),
.trainerName = _("DEVON"),
.trainerGfxId = EVENT_OBJ_GFX_POKEFAN_M,
.flags = 0x40040FFF,
.aiChecks = 0x40040FFF,
.whichRank = CONTEST_RANK_HYPER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -2271,7 +2271,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("RADOS"),
.trainerName = _("JUSTINA"),
.trainerGfxId = EVENT_OBJ_GFX_PICNICKER,
.flags = 0x84000FFF,
.aiChecks = 0x84000FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -2300,7 +2300,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("LOUDERD"),
.trainerName = _("RALPH"),
.trainerGfxId = EVENT_OBJ_GFX_EXPERT_M,
.flags = 0x82000FFF,
.aiChecks = 0x82000FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -2329,7 +2329,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SITTY"),
.trainerName = _("ROSA"),
.trainerGfxId = EVENT_OBJ_GFX_GIRL_1,
.flags = 0x81000FFF,
.aiChecks = 0x81000FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -2358,7 +2358,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SLING"),
.trainerName = _("KEATON"),
.trainerGfxId = EVENT_OBJ_GFX_LITTLE_BOY,
.flags = 0x80800FFF,
.aiChecks = 0x80800FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2387,7 +2387,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("TARIA"),
.trainerName = _("MAYRA"),
.trainerGfxId = EVENT_OBJ_GFX_POKEFAN_F,
.flags = 0x80400FFF,
.aiChecks = 0x80400FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -2416,7 +2416,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("LIRKI"),
.trainerName = _("LAMAR"),
.trainerGfxId = EVENT_OBJ_GFX_RICH_BOY,
.flags = 0x80200FFF,
.aiChecks = 0x80200FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -2445,7 +2445,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("BLOSSOM"),
.trainerName = _("AUBREY"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_4,
.flags = 0x80100FFF,
.aiChecks = 0x80100FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -2474,7 +2474,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("EYESAB"),
.trainerName = _("NIGEL"),
.trainerGfxId = EVENT_OBJ_GFX_CAMPER,
.flags = 0x80080FFF,
.aiChecks = 0x80080FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2503,7 +2503,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("UTAN"),
.trainerName = _("CAMILLE"),
.trainerGfxId = EVENT_OBJ_GFX_LASS,
.flags = 0x80040FFF,
.aiChecks = 0x80040FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2532,7 +2532,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("PEDOS"),
.trainerName = _("DEON"),
.trainerGfxId = EVENT_OBJ_GFX_SCHOOL_KID_M,
.flags = 0x80020FFF,
.aiChecks = 0x80020FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -2561,7 +2561,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("LUVIS"),
.trainerName = _("JANELLE"),
.trainerGfxId = EVENT_OBJ_GFX_GIRL_2,
.flags = 0x80010FFF,
.aiChecks = 0x80010FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2590,7 +2590,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("HEROSS"),
.trainerName = _("HEATH"),
.trainerGfxId = EVENT_OBJ_GFX_MAN_3,
.flags = 0x80008FFF,
.aiChecks = 0x80008FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -2619,7 +2619,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("RODLECT"),
.trainerName = _("SASHA"),
.trainerGfxId = EVENT_OBJ_GFX_TWIN,
.flags = 0x80004FFF,
.aiChecks = 0x80004FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -2648,7 +2648,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("CHUPY"),
.trainerName = _("FRANKIE"),
.trainerGfxId = EVENT_OBJ_GFX_YOUNGSTER,
.flags = 0x80002FFF,
.aiChecks = 0x80002FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -2677,7 +2677,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("WOBET"),
.trainerName = _("HELEN"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_1,
.flags = 0x80001FFF,
.aiChecks = 0x80001FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -2706,7 +2706,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("GAREN"),
.trainerName = _("CAMILE"),
.trainerGfxId = EVENT_OBJ_GFX_HEX_MANIAC,
.flags = 0xC000FFF,
.aiChecks = 0xC000FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -2735,7 +2735,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("GONPOR"),
.trainerName = _("MARTIN"),
.trainerGfxId = EVENT_OBJ_GFX_SCIENTIST_1,
.flags = 0x82000FFF,
.aiChecks = 0x82000FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -2764,7 +2764,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("DRITE"),
.trainerName = _("SERGIO"),
.trainerGfxId = EVENT_OBJ_GFX_BOY_1,
.flags = 0x21000FFF,
.aiChecks = 0x21000FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,
@ -2793,7 +2793,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("MEOWY"),
.trainerName = _("KAILEY"),
.trainerGfxId = EVENT_OBJ_GFX_TWIN,
.flags = 0x20800FFF,
.aiChecks = 0x20800FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2822,7 +2822,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("NYX"),
.trainerName = _("PERLA"),
.trainerGfxId = EVENT_OBJ_GFX_BEAUTY,
.flags = 0x80400FFF,
.aiChecks = 0x80400FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = TRUE,
@ -2851,7 +2851,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("GEPITO"),
.trainerName = _("CLARA"),
.trainerGfxId = EVENT_OBJ_GFX_WOMAN_2,
.flags = 0x10200FFF,
.aiChecks = 0x10200FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2880,7 +2880,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SPEON"),
.trainerName = _("JAKOB"),
.trainerGfxId = EVENT_OBJ_GFX_PSYCHIC_M,
.flags = 0x20100FFF,
.aiChecks = 0x20100FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = TRUE,
@ -2909,7 +2909,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("SLOWGO"),
.trainerName = _("TREY"),
.trainerGfxId = EVENT_OBJ_GFX_SAILOR,
.flags = 0x8080FFF,
.aiChecks = 0x8080FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = FALSE,
.aiPool_Beauty = FALSE,
@ -2938,7 +2938,7 @@ const struct ContestPokemon gContestOpponents[] =
.nickname = _("URSING"),
.trainerName = _("LANE"),
.trainerGfxId = EVENT_OBJ_GFX_BLACK_BELT,
.flags = 0x40040FFF,
.aiChecks = 0x40040FFF,
.whichRank = CONTEST_RANK_MASTER,
.aiPool_Cool = TRUE,
.aiPool_Beauty = FALSE,

View File

@ -14,6 +14,7 @@
#include "overworld.h"
#include "menu.h"
#include "pokedex.h"
#include "constants/rgb.h"
extern const u8 gText_DexNational[];
extern const u8 gText_DexHoenn[];
@ -83,7 +84,7 @@ void CB2_ShowDiploma(void)
CopyBgTilemapBufferToVram(1);
DisplayDiplomaText();
BlendPalettes(-1, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
EnableInterrupts(1);
SetVBlankCallback(VBlankCB);
SetMainCallback2(MainCB2);
@ -108,7 +109,7 @@ static void Task_DiplomaWaitForKeyPress(u8 taskId)
{
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
gTasks[taskId].func = Task_DiplomaFadeOut;
}
}

View File

@ -32,6 +32,7 @@
#include "constants/flags.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/rgb.h"
#define EZCHAT_TASK_STATE 0
#define EZCHAT_TASK_TYPE 1
@ -1139,20 +1140,20 @@ static void sub_811A2FC(u8 taskId)
case 0:
SetVBlankCallback(VBlankCallback_EasyChatScreen);
BlendPalettes(0xFFFFFFFF, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
data[EZCHAT_TASK_STATE] = 5;
break;
case 1:
v0 = sub_811AAAC();
if (sub_811A88C(v0))
{
BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, RGB_BLACK);
data[EZCHAT_TASK_STATE] = 3;
data[EZCHAT_TASK_UNK06] = v0;
}
else if (v0 == 0x18)
{
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
data[EZCHAT_TASK_STATE] = 4;
}
else if (v0 != 0)

View File

@ -35,6 +35,7 @@
#include "field_screen_effect.h"
#include "data.h"
#include "battle.h" // to get rid of later
#include "constants/rgb.h"
struct EggHatchData
{
@ -596,7 +597,7 @@ static void CB2_EggHatch_1(void)
switch (sEggHatchData->CB2_state)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
sEggHatchData->eggSpriteID = CreateSprite(&sSpriteTemplate_EggHatch, 120, 75, 5);
ShowBg(0);
ShowBg(1);
@ -679,7 +680,7 @@ static void CB2_EggHatch_1(void)
}
break;
case 11:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
sEggHatchData->CB2_state++;
break;
case 12:
@ -789,7 +790,7 @@ static void SpriteCB_Egg_4(struct Sprite* sprite)
{
s16 i;
if (sprite->data[0] == 0)
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, 0xFFFF);
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, RGB_WHITEALPHA);
if (sprite->data[0] < 4u)
{
for (i = 0; i <= 3; i++)
@ -813,7 +814,7 @@ static void SpriteCB_Egg_5(struct Sprite* sprite)
StartSpriteAffineAnim(&gSprites[sEggHatchData->pokeSpriteID], 1);
}
if (sprite->data[0] == 8)
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0x10, 0, 0xFFFF);
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0x10, 0, RGB_WHITEALPHA);
if (sprite->data[0] <= 9)
gSprites[sEggHatchData->pokeSpriteID].pos1.y -= 1;
if (sprite->data[0] > 40)

View File

@ -8,6 +8,7 @@
#include "sound.h"
#include "constants/songs.h"
#include "palette.h"
#include "constants/rgb.h"
// this file's functions
static void EvoSparkle_DummySpriteCb(struct Sprite* sprite);
@ -268,7 +269,7 @@ static void EvoTask_BeginPreSet1_FadeAndPlaySE(u8 taskID)
{
SetEvoSparklesMatrices();
gTasks[taskID].tFrameCounter = 0;
BeginNormalPaletteFade(3 << gTasks[taskID].data[1], 0xA, 0, 0x10, 0x7FFF);
BeginNormalPaletteFade(3 << gTasks[taskID].data[1], 0xA, 0, 0x10, RGB_WHITE);
gTasks[taskID].func = EvoTask_CreatePreEvoSparkleSet1;
PlaySE(SE_W025);
}
@ -386,7 +387,7 @@ static void EvoTask_BeginPostSparklesSet2_AndFlash(u8 taskID)
SetEvoSparklesMatrices();
gTasks[taskID].tFrameCounter = 0;
CpuSet(&gPlttBufferFaded[0x20], &gPlttBufferUnfaded[0x20], 0x30);
BeginNormalPaletteFade(0xFFF9041C, 0, 0, 0x10, 0x7FFF); // was 0xFFF9001C in R/S
BeginNormalPaletteFade(0xFFF9041C, 0, 0, 0x10, RGB_WHITE); // was 0xFFF9001C in R/S
gTasks[taskID].func = EvoTask_CreatePostEvoSparklesSet2_AndFlash;
PlaySE(SE_W080);
}
@ -407,7 +408,7 @@ static void EvoTask_CreatePostEvoSparklesSet2_AndFlash(u8 taskID)
CreatePostEvoSparkleSet2(i);
break;
case 32:
BeginNormalPaletteFade(0xFFFF041C, 0x10, 0x10, 0, 0x7FFF); // was 0xFFF9001C in R/S
BeginNormalPaletteFade(0xFFFF041C, 0x10, 0x10, 0, RGB_WHITE); // was 0xFFF9001C in R/S
break;
}
gTasks[taskID].tFrameCounter++;
@ -434,7 +435,7 @@ static void EvoTask_BeginPostSparklesSet2_AndFlash_Trade(u8 taskID)
SetEvoSparklesMatrices();
gTasks[taskID].tFrameCounter = 0;
CpuSet(&gPlttBufferFaded[0x20], &gPlttBufferUnfaded[0x20], 0x30);
BeginNormalPaletteFade(0xFFF90400, 0, 0, 0x10, 0x7FFF); // was 0xFFFF0001 in R/S
BeginNormalPaletteFade(0xFFF90400, 0, 0, 0x10, RGB_WHITE); // was 0xFFFF0001 in R/S
gTasks[taskID].func = EvoTask_CreatePostEvoSparklesSet2_AndFlash_Trade;
PlaySE(SE_W080);
}
@ -455,7 +456,7 @@ static void EvoTask_CreatePostEvoSparklesSet2_AndFlash_Trade(u8 taskID)
CreatePostEvoSparkleSet2(i);
break;
case 32:
BeginNormalPaletteFade(0xFFFF0400, 0x10, 0x10, 0, 0x7FFF); // was 0xFFFF0001 in R/S
BeginNormalPaletteFade(0xFFFF0400, 0x10, 0x10, 0, RGB_WHITE); // was 0xFFFF0001 in R/S
break;
}
gTasks[taskID].tFrameCounter++;

View File

@ -32,6 +32,7 @@
#include "constants/battle_string_ids.h"
#include "constants/species.h"
#include "constants/songs.h"
#include "constants/rgb.h"
struct EvoInfo
{
@ -169,7 +170,7 @@ static void Task_BeginEvolutionScene(u8 taskID)
switch (gTasks[taskID].tState)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskID].tState++;
break;
case 1:
@ -366,7 +367,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
SetVBlankCallback(VBlankCB_EvolutionScene);
SetMainCallback2(CB2_EvolutionSceneUpdate);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
ShowBg(0);
ShowBg(1);
@ -443,14 +444,14 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
case 6:
if (gWirelessCommType)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
}
BlendPalettes(-1,0x10, 0);
gMain.state++;
break;
case 7:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
sub_807B140();
ShowBg(0);
ShowBg(1);
@ -603,7 +604,7 @@ static void Task_EvolutionScene(u8 taskID)
switch (gTasks[taskID].tState)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
gSprites[sEvoStructPtr->preEvoSpriteID].invisible = FALSE;
gTasks[taskID].tState++;
ShowBg(0);
@ -638,7 +639,7 @@ static void Task_EvolutionScene(u8 taskID)
{
PlayNewMapMusic(MUS_SHINKA);
gTasks[taskID].tState++;
BeginNormalPaletteFade(0x1C, 4, 0, 0x10, 0);
BeginNormalPaletteFade(0x1C, 4, 0, 0x10, RGB_BLACK);
}
break;
case 5: // launch moving bg task, preapre evo sparkles
@ -696,7 +697,7 @@ static void Task_EvolutionScene(u8 taskID)
m4aMPlayAllStop();
memcpy(&gPlttBufferUnfaded[0x20], sEvoStructPtr->savedPalette, 0x60);
sub_8140174();
BeginNormalPaletteFade(0x1C, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0x1C, 0, 0x10, 0, RGB_BLACK);
gTasks[taskID].tState++;
}
break;
@ -751,7 +752,7 @@ static void Task_EvolutionScene(u8 taskID)
}
else // no move to learn
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskID].tState++;
}
}
@ -779,7 +780,7 @@ static void Task_EvolutionScene(u8 taskID)
if (!gTasks[sEvoGraphicsTaskID].isActive)
{
m4aMPlayAllStop();
BeginNormalPaletteFade(0x6001C, 0, 0x10, 0, 0x7FFF);
BeginNormalPaletteFade(0x6001C, 0, 0x10, 0, RGB_WHITE);
gTasks[taskID].tState++;
}
break;
@ -885,7 +886,7 @@ static void Task_EvolutionScene(u8 taskID)
{
gTasks[taskID].tLearnMoveState = gTasks[taskID].tData7;
if (gTasks[taskID].tLearnMoveState == 5)
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
}
}
if (gMain.newKeys & B_BUTTON)
@ -1007,7 +1008,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
{
PlayBGM(MUS_SHINKA);
gTasks[taskID].tState++;
BeginNormalPaletteFade(0x1C, 4, 0, 0x10, 0);
BeginNormalPaletteFade(0x1C, 4, 0, 0x10, RGB_BLACK);
}
break;
case 4:
@ -1128,7 +1129,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
if (!gTasks[sEvoGraphicsTaskID].isActive)
{
m4aMPlayAllStop();
BeginNormalPaletteFade((1 << (gSprites[sEvoStructPtr->preEvoSpriteID].oam.paletteNum + 16)) | (0x4001C), 0, 0x10, 0, 0x7FFF);
BeginNormalPaletteFade((1 << (gSprites[sEvoStructPtr->preEvoSpriteID].oam.paletteNum + 16)) | (0x4001C), 0, 0x10, 0, RGB_WHITE);
gTasks[taskID].tState++;
}
break;
@ -1211,7 +1212,7 @@ static void Task_TradeEvolutionScene(u8 taskID)
sub_807F1A8(0, gDisplayedStringBattle, 1);
gTasks[taskID].tLearnMoveState = gTasks[taskID].tData7;
if (gTasks[taskID].tLearnMoveState == 5)
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
break;
case 1:
case -1:

View File

@ -11,6 +11,7 @@
#include "text.h"
#include "text_window.h"
#include "window.h"
#include "constants/rgb.h"
// Static type declarations
@ -145,7 +146,7 @@ static void FieldUpdateRegionMap(void)
schedule_bg_copy_tilemap_to_vram(0);
DrawStdFrameWithCustomTileAndPalette(0, 0, 0x27, 0xd);
PrintRegionMapSecName();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
sFieldRegionMapHandler->state++;
break;
case 2:
@ -173,7 +174,7 @@ static void FieldUpdateRegionMap(void)
}
break;
case 5:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
sFieldRegionMapHandler->state++;
break;
case 6:

View File

@ -441,8 +441,8 @@ const u32 gUnusedTilemap_OldContest[] = INCBIN_U32("graphics/unused/old_contest.
const u32 gUnknownTilemap_C15BC0[] = INCBIN_U32("graphics/unknown/unknown_C15BC0.bin.lz");
const u32 gUnusedGfx_OldContest2[] = INCBIN_U32("graphics/unused/old_contest_2.4bpp.lz");
const u32 gUnknown_08C16E90[] = INCBIN_U32("graphics/unused/old_contest_2.gbapal.lz");
const u32 gUnknown_08C16FA8[] = INCBIN_U32("graphics/unused/old_contest_2.bin.lz");
const u32 gOldContestPalette[] = INCBIN_U32("graphics/unused/old_contest_2.gbapal.lz");
const u32 gOldContestGfx[] = INCBIN_U32("graphics/unused/old_contest_2.bin.lz");
const u32 gUnknown_08C17170[] = INCBIN_U32("graphics/unknown/unknown_C17170.bin.lz");

View File

@ -6,6 +6,7 @@
#include "script.h"
#include "script_menu.h"
#include "task.h"
#include "constants/rgb.h"
static void ReshowPCMenuAfterHallOfFamePC(void);
static void Task_WaitForPaletteFade(u8);
@ -28,7 +29,7 @@ static void ReshowPCMenuAfterHallOfFamePC(void)
Overworld_PlaySpecialMapMusic();
ScrSpecial_CreatePCMenu();
ScriptMenu_DisplayPCStartupPrompt();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
CreateTask(Task_WaitForPaletteFade, 10);
}

View File

@ -49,6 +49,7 @@
#include "window.h"
#include "apprentice.h"
#include "battle_pike.h"
#include "constants/rgb.h"
void GoToBagMenu(u8 bagMenuType, u8 pocketId, void ( *postExitMenuMainCallback2)());
void CB2_Bag(void);
@ -659,7 +660,7 @@ bool8 setup_bag_menu(void)
gMain.state++;
break;
case 20:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
gPaletteFade.bufferTransferDisabled = FALSE;
gMain.state++;
break;
@ -942,7 +943,7 @@ void free_bag_item_list_buffers(void)
void unknown_ItemMenu_Confirm(u8 taskId)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
gTasks[taskId].func = task_close_bag_menu_2;
}

View File

@ -27,6 +27,7 @@
#include "battle.h"
#include "link.h"
#include "link_rfu.h"
#include "constants/rgb.h"
extern u16 gHeldKeyCodeToSend;
@ -444,7 +445,7 @@ static void LinkTestProcessKeyInput(void)
}
if (gMain.newKeys & L_BUTTON)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 2);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(2, 0, 0));
}
if (gMain.newKeys & START_BUTTON)
{

View File

@ -2263,7 +2263,7 @@ void DestroyWirelessStatusIndicatorSprite(void)
}
}
void sub_800E0E8(void)
void LoadWirelessStatusIndicatorSpriteGfx(void)
{
if (GetSpriteTileStartByTag(sWirelessStatusIndicatorSpriteSheet.tag) == 0xFFFF)
{

View File

@ -19,6 +19,7 @@
#include "constants/species.h"
#include "alloc.h"
#include "easy_chat.h"
#include "constants/rgb.h"
extern const u16 gMailPalette_Orange[];
extern const u16 gMailPalette_Harbor[];
@ -417,7 +418,7 @@ static bool8 MailReadBuildGraphics(void)
ShowBg(0);
ShowBg(1);
ShowBg(2);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
gPaletteFade.bufferTransferDisabled = FALSE;
sMailRead->callback2 = CB2_WaitForPaletteExitOnKeyPress;
return TRUE;
@ -526,7 +527,7 @@ static void CB2_ExitOnKeyPress(void)
{
if (gMain.newKeys & (A_BUTTON | B_BUTTON))
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
sMailRead->callback2 = CB2_ExitMailReadFreeVars;
}
}

View File

@ -584,9 +584,9 @@ static u32 InitMainMenu(bool8 returningFromOptionsMenu)
ResetSpriteData();
FreeAllSpritePalettes();
if (returningFromOptionsMenu)
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0x0000); // fade to black
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK); // fade to black
else
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0xFFFF); // fade to white
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_WHITEALPHA); // fade to white
ResetBgsAndClearDma3BusyFlags(0);
InitBgsFromTemplates(0, sMainMenuBgTemplates, ARRAY_COUNT(sMainMenuBgTemplates));
ChangeBgX(0, 0, 0);
@ -1098,7 +1098,7 @@ static void Task_HandleMainMenuAPressed(u8 taskId)
SetGpuReg(REG_OFFSET_BG1VOFS, 0);
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
return;
}
FreeAllWindowBuffers();
@ -1287,7 +1287,7 @@ static void Task_NewGameBirchSpeech_Init(u8 taskId)
FreeAllSpritePalettes();
ResetAllPicSprites();
AddBirchSpeechObjects(taskId);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
gTasks[taskId].tBG1HOFS = 0;
gTasks[taskId].func = Task_NewGameBirchSpeech_WaitToShowBirch;
gTasks[taskId].tPlayerSpriteId = 0xFF;
@ -1846,7 +1846,7 @@ static void CB2_NewGameBirchSpeech_ReturnFromNamingScreen(void)
gSprites[spriteId].invisible = FALSE;
gTasks[taskId].tPlayerSpriteId = spriteId;
SetGpuReg(REG_OFFSET_BG1HOFS, -60);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
SetGpuReg(REG_OFFSET_WIN0H, 0);
SetGpuReg(REG_OFFSET_WIN0V, 0);
SetGpuReg(REG_OFFSET_WININ, 0);

View File

@ -14,6 +14,7 @@
#include "link_rfu.h"
#include "mevent.h"
#include "mystery_gift.h"
#include "constants/rgb.h"
struct UnkStruct_8467FB8
{
@ -186,7 +187,7 @@ s32 FadeToWonderCardMenu(void)
switch(sWonderCardData->unk_0174)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
break;
case 1:
if (UpdatePaletteFade())
@ -231,7 +232,7 @@ s32 FadeToWonderCardMenu(void)
ShowBg(2);
gPaletteFade.bufferTransferDisabled = FALSE;
sub_801C4C0();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
UpdatePaletteFade();
break;
default:
@ -251,7 +252,7 @@ s32 FadeOutFromWonderCard(bool32 flag)
switch (sWonderCardData->unk_0174)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
break;
case 1:
if (UpdatePaletteFade())
@ -279,7 +280,7 @@ s32 FadeOutFromWonderCard(bool32 flag)
case 5:
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag);
CopyBgTilemapBufferToVram(0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
break;
default:
if (UpdatePaletteFade())
@ -575,7 +576,7 @@ s32 FadeToWonderNewsMenu(void)
switch (sWonderNewsData->unk_01C0_1)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
break;
case 1:
if (UpdatePaletteFade())
@ -629,7 +630,7 @@ s32 FadeToWonderNewsMenu(void)
ShowBg(3);
gPaletteFade.bufferTransferDisabled = FALSE;
sWonderNewsData->unk_01C1 = AddScrollIndicatorArrowPair(&sWonderNewsData->unk_0394, &sWonderNewsData->unk_01C6);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
UpdatePaletteFade();
break;
default:
@ -650,7 +651,7 @@ s32 FadeOutFromWonderNews(bool32 flag)
switch (sWonderNewsData->unk_01C0_1)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
break;
case 1:
if (UpdatePaletteFade())
@ -692,7 +693,7 @@ s32 FadeOutFromWonderNews(bool32 flag)
MG_DrawCheckerboardPattern(3);
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(3);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
break;
default:
if (UpdatePaletteFade())

View File

@ -18,6 +18,7 @@
#include "gpu_regs.h"
#include "text_window.h"
#include "decompress.h"
#include "constants/rgb.h"
// this file's functions
static void CB2_MysteryEventMenu(void);
@ -137,7 +138,7 @@ static void CB2_MysteryEventMenu(void)
PutWindowTilemap(0);
CopyWindowToVram(0, 3);
ShowBg(0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
gMain.state++;
break;
case 1:
@ -280,7 +281,7 @@ static void CB2_MysteryEventMenu(void)
}
break;
case 15:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gMain.state++;
break;
case 16:

View File

@ -27,6 +27,7 @@
#include "text_window.h"
#include "overworld.h"
#include "constants/event_objects.h"
#include "constants/rgb.h"
EWRAM_DATA static struct NamingScreenData *gNamingScreenData = NULL;
extern u16 gKeyRepeatStartDelay;
@ -463,7 +464,7 @@ static bool8 MainState_BeginFadeIn(void)
CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(3);
BlendPalettes(-1, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
gNamingScreenData->state++;
return FALSE;
}
@ -517,7 +518,7 @@ static bool8 MainState_6(void)
static bool8 MainState_BeginFadeInOut(void)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
gNamingScreenData->state++;
return FALSE;
}

View File

@ -56,7 +56,7 @@ static void ResetMiniGamesResults(void);
// EWRAM vars
EWRAM_DATA bool8 gDifferentSaveFile = FALSE;
EWRAM_DATA bool8 gUnknown_020322D5 = FALSE;
EWRAM_DATA bool8 gEnableContestDebugging = FALSE;
// const rom data
static const struct ContestWinner sContestWinnerPicDummy =

View File

@ -14,6 +14,7 @@
#include "international_string_util.h"
#include "strings.h"
#include "gba/m4a_internal.h"
#include "constants/rgb.h"
// Task data
enum
@ -250,7 +251,7 @@ void CB2_InitOptionMenu(void)
break;
}
case 11:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
SetVBlankCallback(VBlankCB);
SetMainCallback2(MainCB2);
return;
@ -359,7 +360,7 @@ static void Task_OptionMenuSave(u8 taskId)
gSaveBlock2Ptr->optionsButtonMode = gTasks[taskId].data[TD_BUTTONMODE];
gSaveBlock2Ptr->optionsWindowFrameType = gTasks[taskId].data[TD_FRAMETYPE];
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_OptionMenuFadeOut;
}

View File

@ -1874,7 +1874,7 @@ static bool32 map_loading_iteration_3(u8 *state)
case 11:
if (gWirelessCommType != 0)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
}
(*state)++;
@ -2046,7 +2046,7 @@ static bool32 map_loading_iteration_2_link(u8 *state)
case 11:
if (gWirelessCommType != 0)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
}
(*state)++;

View File

@ -32,6 +32,7 @@
#include "text_window.h"
#include "constants/items.h"
#include "constants/songs.h"
#include "constants/rgb.h"
#define POKEBLOCK_MAX_FEEL 99
#define FIELD_E75_COUNT 7
@ -585,7 +586,7 @@ static bool8 InitPokeblockMenu(void)
gMain.state++;
break;
case 18:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
gPaletteFade.bufferTransferDisabled = 0;
gMain.state++;
break;
@ -948,7 +949,7 @@ static void sub_8136470(struct Sprite *sprite)
static void FadePaletteAndSetTaskToClosePokeblockCase(u8 taskId)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_FreeDataAndExitPokeblockCase;
}

View File

@ -24,6 +24,7 @@
#include "text_window.h"
#include "trig.h"
#include "util.h"
#include "constants/rgb.h"
struct PokeblockFeedStruct
{
@ -590,7 +591,7 @@ static bool8 TransitionToPokeblockFeedScene(void)
gMain.state++;
break;
case 13:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
gPaletteFade.bufferTransferDisabled = 0;
gMain.state++;
break;
@ -804,7 +805,7 @@ static void Task_ReturnAfterPaletteFade(u8 taskId)
static void Task_PaletteFadeToReturn(u8 taskId)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_ReturnAfterPaletteFade;
}

View File

@ -2969,7 +2969,7 @@ void sub_80BEA24(u8 taskId)
r3 = 0x14;
if (gTasks[taskId].data[1] != 0)
r3 |= (1 << (gSprites[gTasks[taskId].data[4]].oam.paletteNum + 16));
BeginNormalPaletteFade(~r3, 0, 16, 0, 0);
BeginNormalPaletteFade(~r3, 0, 16, 0, RGB_BLACK);
SetVBlankCallback(gUnknown_030060B4);
gMain.state++;
}

View File

@ -2,6 +2,7 @@
#include "alloc.h"
#include "item.h"
#include "link.h"
#include "link_rfu.h"
#include "main.h"
#include "menu.h"
#include "palette.h"
@ -9,6 +10,7 @@
#include "save.h"
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
#include "task.h"
#include "pokemon.h"
#include "pokemon_jump.h"
@ -34,7 +36,7 @@ struct PokemonJump1_82E4
u16 unk12;
int unk14;
int unk18;
u8 filler1C[0xC];
u8 unk1C[11];
};
struct PokemonJump1
@ -48,16 +50,16 @@ struct PokemonJump1
u16 unkA;
u16 unkC;
u16 unkE;
u8 filler10[0x4];
int unk14;
int unk18;
int unk10;
u32 unk14;
u32 unk18;
int unk1C;
u8 filler20[0x4];
int unk24;
u8 filler28[0x4];
u32 unk20;
u32 unk24;
u32 unk28;
int unk2C;
u32 unk30;
u8 filler34[0x2];
u16 unk34;
u16 unk36;
u8 filler38[0x2];
u16 unk3A;
@ -74,7 +76,10 @@ struct PokemonJump1
u16 unk4A;
u8 unk4C;
u8 unk4D;
u8 filler4E[0x6];
u16 unk4E;
u8 unk50;
u8 unk51;
u8 filler52[0x2];
int unk54;
int unk58;
int unk5C;
@ -86,16 +91,17 @@ struct PokemonJump1
u8 unk71;
u16 unk72;
u16 unk74;
int unk78;
u8 unk7C[5];
u8 filler81[0xA];
u8 unk8B[5];
u16 unk90[5];
u16 unk9A[5];
u32 unk78;
u8 unk7C[MAX_RFU_PLAYERS];
u8 unk81[MAX_RFU_PLAYERS];
u8 unk86[MAX_RFU_PLAYERS];
u8 unk8B[MAX_RFU_PLAYERS];
u16 unk90[MAX_RFU_PLAYERS];
u16 unk9A[MAX_RFU_PLAYERS];
void **unkA4;
u8 fillerA8[0x8200];
struct PokemonJump1_MonInfo unk82A8[5];
struct PokemonJump1_82E4 unk82E4[5];
struct PokemonJump1_MonInfo unk82A8[MAX_RFU_PLAYERS];
struct PokemonJump1_82E4 unk82E4[MAX_RFU_PLAYERS];
struct PokemonJump1_82E4 *unk83AC;
};
@ -150,28 +156,44 @@ static bool32 sub_802BA58(void);
static bool32 sub_802BB84(void);
static bool32 sub_802BC60(void);
static bool32 sub_802BD30(void);
void sub_802BD84(u8 taskId);
void sub_802BE60(TaskFunc func, u8 taskPriority);
void sub_802BE80(void);
void sub_802BEA0(void);
void sub_802BEE4(void);
void sub_802C0B8(void);
void sub_802C0E8(void);
void sub_802C114(void);
void sub_802C164(void);
void sub_802C1DC(void);
bool32 sub_802C130(u16);
void sub_802C260(void);
void sub_802C270(void);
void sub_802C43C(void);
void sub_802C808(u16, u16 *, u16 *);
bool32 sub_802C538(void);
bool32 sub_802C650(void);
bool32 sub_802C5DC(void);
bool32 sub_802C70C(void);
bool32 sub_802C7BC(void);
u16 sub_802C7E0(void);
static void sub_802BD84(u8 taskId);
static void sub_802BE60(TaskFunc func, u8 taskPriority);
static void sub_802BE80(void);
static void sub_802BEA0(void);
static void sub_802BEE4(void);
static int sub_802BF48(void);
static void sub_802BF7C(void);
static int sub_802C098(void);
static void sub_802C0B8(void);
static void sub_802C0E8(void);
static void sub_802C114(void);
static bool32 sub_802C130(u16);
static void sub_802C164(void);
static void sub_802C1DC(void);
static void sub_802C240(void);
static void sub_802C260(void);
static void sub_802C270(void);
static void sub_802C280(void);
static void sub_802C398(int);
static void sub_802C43C(void);
static bool32 sub_802C538(void);
static bool32 sub_802C5DC(void);
static bool32 sub_802C618(void);
static bool32 sub_802C650(void);
static void sub_802C688(int);
static int sub_802C6B0(void);
static bool32 sub_802C70C(void);
static int sub_802C73C(u8 *);
static void sub_802C780(void);
static int sub_802C790(int);
static void sub_802C7A0(u16);
static bool32 sub_802C7BC(void);
static u16 sub_802C7E0(void);
static void sub_802C808(u16, u16 *, u16 *);
static u16 sub_802C818(void);
u16 sub_802C838(void);
u16 sub_802C880(u16, u16);
void sub_802DC9C(u32);
void sub_802D074(void *);
void sub_802D0AC(void);
void sub_802D0C8(int);
@ -183,15 +205,21 @@ void sub_802D884(u16);
void sub_802D8FC(u16);
bool32 sub_802D974(void);
void sub_802DA14(void);
void sub_802DC80(int, s8);
void sub_802DD88(u8);
bool32 sub_802DA44(void);
void sub_802DD64(int);
s8 sub_802DA8C(void);
int sub_802DCCC(u8);
void sub_802DD74(u16);
void sub_802DDA0(u8);
int sub_802DDB8(int);
void sub_802DDCC(void);
void sub_802DDE0(void);
void sub_802DDF4(int);
int sub_802DE08(void);
void sub_802E0AC(struct PokemonJump1_MonInfo *);
bool32 sub_802E0D0(int, struct PokemonJump1_MonInfo *);
void sub_802E138(struct PokemonJump1_82E4 *, u8 *);
bool32 sub_802E1BC(struct PokemonJump1_82E4 *, struct Unk802B078 *);
void sub_802E234(struct PokemonJump1_82E4 *, u8 , u16);
@ -332,6 +360,14 @@ bool32 (* const gUnknown_082FB618[])(void) =
sub_802B720,
};
extern const u16 gUnknown_082FB63C[];
extern const u16 gUnknown_082FB64C[4];
extern const u16 gUnknown_082FB654[];
extern s8 gUnknown_082FB65C[][48];
extern int gUnknown_082FB6EC[];
extern int gUnknown_082FB714[];
extern u16 gUnknown_082FB704[8];
void sub_802A9A8(u16 partyIndex, MainCallback callback)
{
u8 taskId;
@ -371,7 +407,7 @@ static void sub_802AA60(struct PokemonJump1 *arg0)
arg0->unk72 = 0;
sub_802AB20();
sub_802AA94(arg0);
if (arg0->unk5 == 5)
if (arg0->unk5 == MAX_RFU_PLAYERS)
sub_802E3A8();
}
@ -408,7 +444,7 @@ void sub_802AA94(struct PokemonJump1 *arg0)
sub_802AB98();
sub_802C0E8();
for (i = 0; i < 5; i++)
for (i = 0; i < MAX_RFU_PLAYERS; i++)
{
arg0->unk7C[i] = 0;
arg0->unk9A[i] = 0;
@ -421,7 +457,7 @@ void sub_802AB20(void)
int i;
s16 index;
for (i = 0; i < 5; i++)
for (i = 0; i < MAX_RFU_PLAYERS; i++)
{
index = sub_802AC00(gUnknown_02022CFC->unk82A8[i].species);
gUnknown_02022CFC->unk82E4[i].unkC = gPkmnJumpSpecies[index].unk2;
@ -489,7 +525,7 @@ static void sub_802AB98(void)
{
int i;
for (i = 0; i < 5; i++)
for (i = 0; i < MAX_RFU_PLAYERS; i++)
{
gUnknown_02022CFC->unk82E4[i].unkE = 0;
gUnknown_02022CFC->unk82E4[i].unk10 = 0;
@ -557,7 +593,7 @@ static void sub_802ACA0(u8 taskId)
if (!FuncIsActiveTask(sub_802BD84))
{
sub_802D074(&gUnknown_02022CFC->unkA4);
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
gUnknown_02022CFC->unk8++;
}
@ -602,7 +638,7 @@ static void sub_802ACA0(u8 taskId)
}
}
void sub_802AE14(int arg0)
static void sub_802AE14(int arg0)
{
if (arg0 == 0)
{
@ -1464,3 +1500,582 @@ static bool32 sub_802BD30(void)
return TRUE;
}
static void sub_802BD84(u8 taskId)
{
int i;
s16 *taskData = gTasks[taskId].data;
struct PokemonJump1 *ptr = (struct PokemonJump1 *)GetWordTaskArg(taskId, 14);
switch (taskData[0])
{
case 0:
for (i = 0; i < MAX_RFU_PLAYERS; i++)
taskData[i + 2] = 0;
taskData[0]++;
// fall through
case 1:
sub_802E0AC(&ptr->unk82A8[ptr->unk6]);
for (i = 0; i < MAX_RFU_PLAYERS; i++)
{
if (!taskData[i + 2] && sub_802E0D0(i, &ptr->unk82A8[i]))
{
StringCopy(ptr->unk82E4[i].unk1C, gLinkPlayers[i].name);
taskData[i + 2] = 1;
taskData[1]++;
if (taskData[1] == ptr->unk5)
{
sub_802AB20();
DestroyTask(taskId);
break;
}
}
}
break;
}
}
static void sub_802BE60(TaskFunc func, u8 taskPriority)
{
u8 taskId = CreateTask(func, taskPriority);
SetWordTaskArg(taskId, 14, (u32)gUnknown_02022CFC);
}
static void sub_802BE80(void)
{
gUnknown_02022CFC->unk4A = 0;
gUnknown_02022CFC->unk14 = 6;
gUnknown_02022CFC->unk34 = 0;
gUnknown_02022CFC->unk1C = 0;
gUnknown_02022CFC->unk36 = 0;
gUnknown_02022CFC->unk10 = 0;
}
static void sub_802BEA0(void)
{
gUnknown_02022CFC->unk4A = 0;
gUnknown_02022CFC->unk34 = 0x6FF;
gUnknown_02022CFC->unk14 = 7;
gUnknown_02022CFC->unk36 = 0;
gUnknown_02022CFC->unk10 = 0;
gUnknown_02022CFC->unk51 = 0;
gUnknown_02022CFC->unk50 = 0;
gUnknown_02022CFC->unk20 = 0;
gUnknown_02022CFC->unk4E = 0;
gUnknown_02022CFC->unk6C = 0;
sub_802BF7C();
}
static void sub_802BEE4(void)
{
if (gUnknown_02022CFC->unk46)
{
gUnknown_02022CFC->unk4A++;
gUnknown_02022CFC->unk34 += sub_802BF48();
if (gUnknown_02022CFC->unk34 >= 0x9FF)
gUnknown_02022CFC->unk34 -= 0x9FF;
gUnknown_02022CFC->unk18 = gUnknown_02022CFC->unk14;
gUnknown_02022CFC->unk14 = gUnknown_02022CFC->unk34 >> 8;
if (gUnknown_02022CFC->unk14 > 6 && gUnknown_02022CFC->unk18 < 7)
{
gUnknown_02022CFC->unk36++;
sub_802BF7C();
}
}
}
static int sub_802BF48(void)
{
int result;
if (gUnknown_02022CFC->unk10)
return 0;
result = gUnknown_02022CFC->unk1C;
if (gUnknown_02022CFC->unk34 <= 0x5FF)
{
gUnknown_02022CFC->unk20 += 80;
result += gUnknown_02022CFC->unk20 >> 8;
}
return result;
}
static void sub_802BF7C(void)
{
int var0;
gUnknown_02022CFC->unk20 = 0;
if (gUnknown_02022CFC->unk4E)
{
gUnknown_02022CFC->unk4E--;
if (gUnknown_02022CFC->unk6C)
{
if (sub_802C098() % 4 != 0)
{
gUnknown_02022CFC->unk1C = gUnknown_02022CFC->unk28;
}
else
{
if (gUnknown_02022CFC->unk28 > 54)
gUnknown_02022CFC->unk1C = 30;
else
gUnknown_02022CFC->unk1C = 82;
}
}
}
else
{
if (!(gUnknown_02022CFC->unk50 & 8))
{
gUnknown_02022CFC->unk28 = gUnknown_082FB63C[gUnknown_02022CFC->unk50] + (gUnknown_02022CFC->unk51 * 7);
gUnknown_02022CFC->unk4E = gUnknown_082FB64C[sub_802C098() % ARRAY_COUNT(gUnknown_082FB64C)] + 2;
gUnknown_02022CFC->unk50++;
}
else
{
if (gUnknown_02022CFC->unk50 == 8)
{
if (gUnknown_02022CFC->unk51 < 3)
gUnknown_02022CFC->unk51++;
else
gUnknown_02022CFC->unk6C = 1;
}
var0 = gUnknown_082FB63C[15 - gUnknown_02022CFC->unk50];
gUnknown_02022CFC->unk28 = var0 + (gUnknown_02022CFC->unk51 * 7);
if (++gUnknown_02022CFC->unk50 > 15)
{
if (sub_802C098() % 4 == 0)
gUnknown_02022CFC->unk28 -= 5;
gUnknown_02022CFC->unk50 = 0;
}
}
gUnknown_02022CFC->unk1C = gUnknown_02022CFC->unk28;
}
}
static int sub_802C098(void)
{
// The number 1103515245 comes from the example implementation of rand and srand
gUnknown_02022CFC->unk24 = gUnknown_02022CFC->unk24 * 1103515245 + 24691;
return gUnknown_02022CFC->unk24 >> 16;
}
static void sub_802C0B8(void)
{
gUnknown_02022CFC->unk10 = 1;
gUnknown_02022CFC->unk14 = 6;
gUnknown_02022CFC->unk34 = 0x5FF;
sub_802C270();
}
static int sub_802C0DC(void)
{
return gUnknown_02022CFC->unk10;
}
static void sub_802C0E8(void)
{
int i;
for (i = 0; i < MAX_RFU_PLAYERS; i++)
gUnknown_02022CFC->unk82E4[i].unk14 = 0;
}
static void sub_802C114(void)
{
gUnknown_02022CFC->unk83AC->unk10 = 0;
gUnknown_02022CFC->unk83AC->unk12 = 0;
}
static bool32 sub_802C130(u16 arg0)
{
if (gUnknown_02022CFC->unk82E4[gUnknown_02022CFC->unk6].unk10 == arg0)
return TRUE;
else
return FALSE;
}
static void sub_802C164(void)
{
gUnknown_02022CFC->unk83AC->unkE = gUnknown_02022CFC->unk4A;
gUnknown_02022CFC->unk83AC->unk12 = gUnknown_02022CFC->unk83AC->unk10;
gUnknown_02022CFC->unk83AC->unk10 = 1;
}
static void sub_802C18C(void)
{
gUnknown_02022CFC->unk83AC->unk12 = gUnknown_02022CFC->unk83AC->unk10;
gUnknown_02022CFC->unk83AC->unk10 = 2;
gUnknown_02022CFC->unk83AC->unkE = gUnknown_02022CFC->unk4A;
gUnknown_02022CFC->unk83AC->unk14 = 2;
}
static void sub_802C1BC(void)
{
gUnknown_02022CFC->unk83AC->unk12 = gUnknown_02022CFC->unk83AC->unk10;
gUnknown_02022CFC->unk83AC->unk10 = 0;
}
static void sub_802C1DC(void)
{
if (gUnknown_02022CFC->unk5C)
{
sub_802DD64(gUnknown_02022CFC->unk78);
gUnknown_02022CFC->unk5C = 0;
if (gUnknown_02022CFC->unk4D)
{
int index = sub_802DCCC(gUnknown_02022CFC->unk71);
PlaySE(gUnknown_082FB654[index - 2]);
gUnknown_02022CFC->unk4D = 0;
}
}
sub_802DD74(gUnknown_02022CFC->unk74);
sub_802C280();
sub_802C240();
}
static void sub_802C240(void)
{
if (gUnknown_02022CFC->unk46)
sub_802DC9C(gUnknown_02022CFC->unk14);
}
static void sub_802C260(void)
{
gUnknown_02022CFC->unk46 = 0;
}
static void sub_802C270(void)
{
gUnknown_02022CFC->unk46 = 1;
}
static void sub_802C280(void)
{
int i;
int whichSound = 0;
int numLinkPlayers = gUnknown_02022CFC->unk5;
for (i = 0; i < numLinkPlayers; i++)
{
switch (gUnknown_02022CFC->unk82E4[i].unk10)
{
case 0:
sub_802DC80(i, 0);
break;
case 1:
if (gUnknown_02022CFC->unk82E4[i].unk12 != 1 || gUnknown_02022CFC->unk82E4[i].unkE != gUnknown_02022CFC->unk9A[i])
{
if (i == gUnknown_02022CFC->unk6)
gUnknown_02022CFC->unk82E4[i].unk12 = 1;
whichSound |= 0x1;
gUnknown_02022CFC->unk82E4[i].unk4 = 0x7FFFFFFF;
gUnknown_02022CFC->unk9A[i] = gUnknown_02022CFC->unk82E4[i].unkE;
}
sub_802C398(i);
break;
case 2:
if (gUnknown_02022CFC->unk82E4[i].unk12 != 2)
{
if (i == gUnknown_02022CFC->unk6)
gUnknown_02022CFC->unk82E4[i].unk12 = 2;
whichSound |= 0x2;
sub_802DD88(i);
}
break;
}
}
if (whichSound & 0x2)
PlaySE(SE_RG_NAWAMISS);
else if (whichSound & 0x1)
PlaySE(SE_DANSA);
}
static void sub_802C398(int multiplayerId)
{
int var0;
int var1;
struct PokemonJump1_82E4 *player;
if (gUnknown_02022CFC->unk68)
return;
player = &gUnknown_02022CFC->unk82E4[multiplayerId];
if (player->unk4 != 0x7FFFFFFF)
{
player->unk4++;
var0 = player->unk4;
}
else
{
var0 = gUnknown_02022CFC->unk4A - player->unkE;
if (var0 >= 65000)
{
var0 -= 65000;
var0 += gUnknown_02022CFC->unk4A;
}
player->unk4 = var0;
}
if (var0 < 4)
return;
var0 -= 4;
if (var0 < 48)
var1 = gUnknown_082FB65C[player->unkC][var0];
else
var1 = 0;
sub_802DC80(multiplayerId, var1);
if (!var1 && multiplayerId == gUnknown_02022CFC->unk6)
sub_802C1BC();
player->unk0 = var1;
}
static void sub_802C43C(void)
{
if (gUnknown_02022CFC->unk14 == 8 && gUnknown_02022CFC->unk18 == 7)
{
if (gUnknown_02022CFC->unk58 == 0)
{
sub_802C780();
gUnknown_02022CFC->unk54 = 0;
gUnknown_02022CFC->unk58 = 1;
gUnknown_02022CFC->unk71 = 0;
}
else
{
if (gUnknown_02022CFC->unk54 == 5)
{
gUnknown_02022CFC->unkC++;
sub_802C7A0(gUnknown_02022CFC->unkC);
}
else
{
gUnknown_02022CFC->unkC = 0;
}
if (gUnknown_02022CFC->unk54 > 1)
{
gUnknown_02022CFC->unk64 = 1;
memcpy(gUnknown_02022CFC->unk86, gUnknown_02022CFC->unk81, sizeof(u8) * MAX_RFU_PLAYERS);
}
sub_802C780();
gUnknown_02022CFC->unk54 = 0;
gUnknown_02022CFC->unk58 = 1;
gUnknown_02022CFC->unk71 = 0;
if (gUnknown_02022CFC->unk74 < 9999)
gUnknown_02022CFC->unk74++;
sub_802C688(10);
sub_802AE14(3);
}
}
if (gUnknown_02022CFC->unk64 && (sub_802C618() == TRUE || !gUnknown_02022CFC->unk14))
{
int var0 = sub_802C73C(gUnknown_02022CFC->unk86);
sub_802C688(sub_802C790(var0));
sub_802AE14(3);
gUnknown_02022CFC->unk64 = 0;
}
if (gUnknown_02022CFC->unk58)
{
int var1 = sub_802C6B0();
if (var1 > gUnknown_02022CFC->unk54)
{
gUnknown_02022CFC->unk54 = var1;
memcpy(gUnknown_02022CFC->unk81, gUnknown_02022CFC->unk7C, sizeof(u8) * MAX_RFU_PLAYERS);
}
}
}
static bool32 sub_802C538(void)
{
int i;
if (gUnknown_02022CFC->unk14 == 6 && !gUnknown_02022CFC->unk83AC->unk0)
{
if (gUnknown_02022CFC->unk83AC->unk12 == 1 && sub_802C0DC() == 1)
{
gUnknown_02022CFC->unk83AC->unk14 = 1;
}
else
{
sub_802C18C();
sub_802AE14(3);
}
}
if (gUnknown_02022CFC->unk14 == 7
&& gUnknown_02022CFC->unk18 == 6
&& gUnknown_02022CFC->unk83AC->unk10 != 2)
{
gUnknown_02022CFC->unk83AC->unk14 = 1;
sub_802AE14(3);
}
for (i = 0; i < gUnknown_02022CFC->unk5; i++)
{
if (gUnknown_02022CFC->unk82E4[i].unk10 == 2)
return FALSE;
}
return TRUE;
}
static bool32 sub_802C5DC(void)
{
int i;
int numPlayers = gUnknown_02022CFC->unk5;
int count = 0;
for (i = 0; i < numPlayers; i++)
{
if (gUnknown_02022CFC->unk82E4[i].unk14)
count++;
}
return count == numPlayers;
}
static bool32 sub_802C618(void)
{
int i;
for (i = 0; i < gUnknown_02022CFC->unk5; i++)
{
if (gUnknown_02022CFC->unk82E4[i].unk14 != 1)
return FALSE;
}
return TRUE;
}
static bool32 sub_802C650(void)
{
int i;
if (gUnknown_02022CFC->unk45 == 1)
return FALSE;
for (i = 1; i < gUnknown_02022CFC->unk5; i++)
{
if (gUnknown_02022CFC->unk90[i] == 1)
return FALSE;
}
return TRUE;
}
static void sub_802C688(int arg0)
{
gUnknown_02022CFC->unk78 += arg0;
gUnknown_02022CFC->unk5C = 1;
if (gUnknown_02022CFC->unk78 >= 99990)
gUnknown_02022CFC->unk78 = 99990;
}
static int sub_802C6B0(void)
{
int i;
int count = 0;
int numPlayers = gUnknown_02022CFC->unk5;
for (i = 0; i < numPlayers; i++)
{
if (gUnknown_02022CFC->unk82E4[i].unk0 == -30)
{
gUnknown_02022CFC->unk7C[i] = 1;
count++;
}
else
{
gUnknown_02022CFC->unk7C[i] = 0;
}
}
return count;
}
static bool32 sub_802C70C(void)
{
return !gUnknown_03005000.unk_124.unk_8c2 && !gUnknown_03005000.unk_9e8.unk_232;
}
static int sub_802C73C(u8 *arg0)
{
int i;
int flags;
int count;
for (i = 0, flags = 0, count = 0; i < MAX_RFU_PLAYERS; i++)
{
if (arg0[i])
{
flags |= 1 << i;
count++;
}
}
gUnknown_02022CFC->unk71 = flags;
if (flags)
gUnknown_02022CFC->unk4D = 1;
return count;
}
static void sub_802C780(void)
{
gUnknown_02022CFC->unk44 = 0;
}
static int sub_802C790(int arg0)
{
return gUnknown_082FB6EC[arg0];
}
static void sub_802C7A0(u16 arg0)
{
if (arg0 > gUnknown_02022CFC->unkE)
gUnknown_02022CFC->unkE = arg0;
}
static bool32 sub_802C7BC(void)
{
if (gUnknown_02022CFC->unk78 >= gUnknown_082FB714[0])
return TRUE;
else
return FALSE;
}
static u16 sub_802C7E0(void)
{
u16 lo = sub_802C818();
u16 hi = sub_802C838();
return (hi << 12) | (lo & 0xFFF);
}
static void sub_802C808(u16 arg0, u16 *arg1, u16 *arg2)
{
*arg2 = arg0 >> 12;
*arg1 = arg0 & 0xFFF;
}
static u16 sub_802C818(void)
{
u16 index = Random() % ARRAY_COUNT(gUnknown_082FB704);
return gUnknown_082FB704[index];
}

View File

@ -6,18 +6,6 @@
#include "field_weather.h"
#include "palette.h"
#include "pokemon_storage_system.h"
#include "sound.h"
#include "constants/songs.h"
#include "window.h"
#include "gpu_regs.h"
#include "bg.h"
#include "menu.h"
#include "graphics.h"
#include "dma3.h"
#include "gba/macro.h"
#include "decompress.h"
#include "strings.h"
#include "constants/rgb.h"
#include "pokenav.h"
enum

View File

@ -1563,7 +1563,7 @@ static void Task_DuoFightAnim(u8 taskId)
}
BlendPalettes(-1, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
SetVBlankCallback(VBlankCB_DuoFight);
PlaySE(SE_T_OOAME);
}
@ -1715,7 +1715,7 @@ static void sub_81D752C(u8 taskId)
static void DuoFightEnd(u8 taskId, s8 palDelay)
{
PlaySE(SE_T_OOAME_E);
BeginNormalPaletteFade(0xFFFFFFFF, palDelay, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, palDelay, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_DuoFightEnd;
}
@ -1971,7 +1971,7 @@ static void Task_HandleRayTakesFlight(u8 taskId)
case 0:
if (data[1] == 8)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
data[2] = 0;
data[3] = 30;
data[4] = 0;
@ -2012,7 +2012,7 @@ static void Task_HandleRayTakesFlight(u8 taskId)
if (data[1] > 295)
{
data[0]++;
BeginNormalPaletteFade(0xFFFFFFFF, 6, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 6, 0, 0x10, RGB_BLACK);
}
}
break;
@ -2174,7 +2174,7 @@ static void Task_HandleRayDescends(u8 taskId)
case 0:
if (data[1] == 8)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
data[1] = 0;
data[0]++;
}
@ -2219,7 +2219,7 @@ static void Task_HandleRayDescends(u8 taskId)
}
break;
case 4:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_RayDescendsEnd;
break;
}
@ -2366,7 +2366,7 @@ static void Task_HandleRayCharges(u8 taskId)
case 0:
if (data[1] == 8)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
data[1] = 0;
data[0]++;
}
@ -2399,7 +2399,7 @@ static void Task_HandleRayCharges(u8 taskId)
}
break;
case 3:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_RayChargesEnd;
break;
}
@ -2532,7 +2532,7 @@ static void Task_HandleRayChasesAway(u8 taskId)
if (data[1] == 8)
{
sub_81D90A8(taskId);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
data[1] = 0;
data[0]++;
}
@ -2574,7 +2574,7 @@ static void Task_HandleRayChasesAway(u8 taskId)
}
break;
case 3:
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, RGB_BLACK);
gTasks[taskId].func = Task_RayChasesAwayEnd;
break;
}

View File

@ -17,6 +17,7 @@
#include "battle_setup.h"
#include "frontier_util.h"
#include "constants/trainers.h"
#include "constants/rgb.h"
#define BATTLER_RECORD_SIZE 664
#define ILLEGAL_BATTLE_TYPES ((BATTLE_TYPE_LINK | BATTLE_TYPE_SAFARI | BATTLE_TYPE_FIRST_BATTLE \
@ -220,7 +221,7 @@ u8 RecordedBattle_GetBattlerAction(u8 battlerId)
{
gSpecialVar_Result = gBattleOutcome = B_OUTCOME_PLAYER_TELEPORTED; // hah
ResetPaletteFadeControl();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
SetMainCallback2(CB2_QuitRecordedBattle);
return 0xFF;
}

View File

@ -26,6 +26,7 @@
#include "heal_location.h"
#include "constants/heal_locations.h"
#include "constants/map_types.h"
#include "constants/rgb.h"
#define MAP_WIDTH 28
#define MAP_HEIGHT 15
@ -1941,7 +1942,7 @@ static void sub_8124D14(void)
switch (sFlyMap->unk_004)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
sFlyMap->unk_004++;
break;
case 1:
@ -1988,7 +1989,7 @@ static void sub_8124E0C(void)
switch (sFlyMap->unk_004)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
sFlyMap->unk_004++;
break;
case 1:

View File

@ -17,6 +17,7 @@
#include "bg.h"
#include "window.h"
#include "gpu_regs.h"
#include "constants/rgb.h"
struct ResetRtcStruct
{
@ -552,7 +553,7 @@ static void Task_ResetRtcScreen(u8 taskId)
switch (data[0])
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0x10, 0, 0xFFFF);
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0x10, 0, RGB_WHITEALPHA);
data[0] = 1;
break;
case 1:
@ -621,7 +622,7 @@ static void Task_ResetRtcScreen(u8 taskId)
case 5:
if (gMain.newKeys & A_BUTTON)
{
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0, 0x10, 0xFFFF);
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0, 0x10, RGB_WHITEALPHA);
data[0] = 6;
}
else

View File

@ -152,7 +152,7 @@ static void CB2_ReshowBattleScreenAfterMenu(void)
if (gWirelessCommType != 0 && gReceivedRemoteLinkPlayers != 0)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
}
}

View File

@ -321,7 +321,7 @@ static void CB2_FadeAndReturnToTitleScreen(void)
if (gMain.newKeys & A_BUTTON)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
SetVBlankCallback(VBlankCB);
SetMainCallback2(CB2_ReturnToTitleScreen);
}

View File

@ -227,7 +227,7 @@ void sub_80F8AFC(void)
{
int i;
if (gIsLinkContest & 1)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)
{
for (i = 0; i < gNumLinkContestPlayers; i++)
{
@ -256,7 +256,7 @@ void sub_80F8B94(void)
struct Sprite *sprite;
gReservedSpritePaletteCount = 12;
if (gIsLinkContest & 1)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)
{
for (i = 0; i < gNumLinkContestPlayers; i++)
{
@ -339,9 +339,9 @@ void ShowContestEntryMonPic(void)
gMultiuseSpriteTemplate.paletteTag = palette->tag;
spriteId = CreateSprite(&gMultiuseSpriteTemplate, (left + 1) * 8 + 32, (top * 8) + 40, 0);
if (gIsLinkContest & 1)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)
{
if (!(gIsLinkContest & 4))
if (!(gLinkContestFlags & LINK_CONTEST_FLAG_HAS_RS_PLAYER))
DoMonFrontSpriteAnimation(&gSprites[spriteId], species, FALSE, 0);
}
else
@ -403,7 +403,7 @@ static void sub_80F8EE8(u8 taskId)
void ScriptGetMultiplayerId(void)
{
if ((gIsLinkContest & 1) && gNumLinkContestPlayers == 4 && !(gIsLinkContest & 2))
if ((gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK) && gNumLinkContestPlayers == 4 && !(gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS))
gSpecialVar_Result = GetMultiplayerId();
else
gSpecialVar_Result = 4;
@ -414,7 +414,7 @@ void ScriptRandom(void)
u16 random;
u16 *scriptPtr;
if (gIsLinkContest & 1)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_LINK)
{
gContestRngValue = 1103515245 * gContestRngValue + 24691;
random = gContestRngValue >> 16;
@ -436,7 +436,7 @@ u16 sub_80F903C(void)
u8 sub_80F905C(void)
{
if (gIsLinkContest & 2)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS)
{
CreateTask(sub_80F9088, 5);
return 1;
@ -473,11 +473,11 @@ static void sub_80F9088(u8 taskId)
void sub_80F90DC(void)
{
if (gIsLinkContest & 2)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS)
{
if (gReceivedRemoteLinkPlayers)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(8, 8);
}
}
@ -485,7 +485,7 @@ void sub_80F90DC(void)
void sub_80F910C(void)
{
if (gIsLinkContest & 2)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS)
{
if (gReceivedRemoteLinkPlayers)
DestroyWirelessStatusIndicatorSprite();
@ -494,7 +494,7 @@ void sub_80F910C(void)
u8 sub_80F9134(void)
{
if (gIsLinkContest & 4)
if (gLinkContestFlags & LINK_CONTEST_FLAG_HAS_RS_PLAYER)
return 1;
else
return 0;
@ -502,12 +502,12 @@ u8 sub_80F9134(void)
void sub_80F9154(void)
{
gIsLinkContest = 0;
gLinkContestFlags = 0;
}
u8 sub_80F9160(void)
{
if (gIsLinkContest & 2)
if (gLinkContestFlags & LINK_CONTEST_FLAG_IS_WIRELESS)
return 1;
else
return 0;

View File

@ -1154,7 +1154,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId)
static void ExitBuyMenu(u8 taskId)
{
gFieldCallback = MapPostLoadHook_ReturnToShopMenu;
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
gTasks[taskId].func = Task_ExitBuyMenu;
}

View File

@ -658,7 +658,7 @@ static void Task_FadeToSlotMachine(u8 taskId)
switch (gTasks[taskId].tState)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
gTasks[taskId].tState++;
break;
case 1:
@ -718,7 +718,7 @@ static void CB2_SlotMachineSetup(void)
gMain.state++;
break;
case 7:
BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
BeginNormalPaletteFade(-1, 0, 0x10, 0, RGB_BLACK);
ShowBg(0);
ShowBg(1);
ShowBg(2);

View File

@ -45,6 +45,7 @@
#include "constants/songs.h"
#include "rom_8011DC0.h"
#include "union_room.h"
#include "constants/rgb.h"
// Menu actions
enum
@ -1237,7 +1238,7 @@ static void sub_80A0550(u8 taskId)
DrawTextBorderOuter(0, 8, 14);
PutWindowTilemap(0);
CopyWindowToVram(0, 3);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
if (gWirelessCommType != 0 && InUnionRoom())
{
@ -1270,7 +1271,7 @@ static void sub_80A0550(u8 taskId)
}
break;
case 3:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
*step = 4;
break;
case 4:

View File

@ -22,6 +22,7 @@
#include "window.h"
#include "constants/songs.h"
#include "constants/species.h"
#include "constants/rgb.h"
#define STARTER_MON_COUNT 3
@ -429,7 +430,7 @@ void CB2_ChooseStarter(void)
LoadCompressedSpriteSheet(&gUnknown_085B1ED8[0]);
LoadCompressedSpriteSheet(&gUnknown_085B1EE8[0]);
LoadSpritePalettes(gUnknown_085B1EF8);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
EnableInterrupts(DISPSTAT_VBLANK);
SetVBlankCallback(VblankCB_StarterChoose);

View File

@ -162,8 +162,8 @@ const u8 gText_DexSearchTypeNone[] = _("NONE");
const u8 gText_SelectorArrow[] = _("");
const u8 gUnknown_085E8B3C[] = _(" ");
const u8 gText_WelcomeToHOF[] = _("Welcome to the HALL OF FAME!");
const u8 gUnknown_085E8B5B[] = _("Spotted POKéMON: {STR_VAR_1}!\nOwned POKéMON: {STR_VAR_2}!\pPROF. BIRCH's POKéDEX rating!\pPROF. BIRCH: Let's see…\p");
const u8 gUnknown_085E8BBA[] = _("SAVING…\nDON'T TURN OFF THE POWER.");
const u8 gText_HOFDexRating[] = _("Spotted POKéMON: {STR_VAR_1}!\nOwned POKéMON: {STR_VAR_2}!\pPROF. BIRCH's POKéDEX rating!\pPROF. BIRCH: Let's see…\p");
const u8 gText_HOFDexSaving[] = _("SAVING…\nDON'T TURN OFF THE POWER.");
const u8 gText_HOFCorrupted[] = _("The HALL OF FAME data is corrupted.");
const u8 gText_HOFNumber[] = _("HALL OF FAME No. {STR_VAR_1}");
const u8 gText_LeagueChamp[] = _("LEAGUE CHAMPION!\nCONGRATULATIONS!");

View File

@ -575,7 +575,7 @@ void CB2_InitTitleScreen(void)
break;
}
case 3:
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0x10, 0, 0xFFFF);
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0x10, 0, RGB_WHITEALPHA);
SetVBlankCallback(VBlankCB);
gMain.state = 4;
break;
@ -725,7 +725,7 @@ static void Task_TitleScreenPhase3(u8 taskId)
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & START_BUTTON))
{
FadeOutBGM(4);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0xFFFF);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITEALPHA);
SetMainCallback2(CB2_GoToMainMenu);
}
else if ((gMain.heldKeys & CLEAR_SAVE_BUTTON_COMBO) == CLEAR_SAVE_BUTTON_COMBO)
@ -736,13 +736,13 @@ static void Task_TitleScreenPhase3(u8 taskId)
&& CanResetRTC() == TRUE)
{
FadeOutBGM(4);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
SetMainCallback2(CB2_GoToResetRtcScreen);
}
else if ((gMain.heldKeys & BERRY_UPDATE_BUTTON_COMBO) == BERRY_UPDATE_BUTTON_COMBO)
{
FadeOutBGM(4);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
SetMainCallback2(CB2_GoToBerryFixScreen);
}
else
@ -759,7 +759,7 @@ static void Task_TitleScreenPhase3(u8 taskId)
UpdateLegendaryMarkingColor(gTasks[taskId].tCounter);
if ((gMPlayInfo_BGM.status & 0xFFFF) == 0)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0xFFFF);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITEALPHA);
SetMainCallback2(CB2_GoToCopyrightScreen);
}
}

View File

@ -1622,7 +1622,7 @@ static void sub_80773D0(void)
if (sub_8010500())
{
gMain.state++;
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
}
}
@ -1816,7 +1816,7 @@ static void sub_8077B74(void)
case 5:
if (gWirelessCommType)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
}
gMain.state++;
@ -4242,7 +4242,7 @@ void sub_807AE50(void)
{
if (gWirelessCommType)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
}
SetMainCallback2(sub_807EA2C);

View File

@ -30,6 +30,7 @@
#include "constants/flags.h"
#include "constants/game_stat.h"
#include "constants/battle_frontier.h"
#include "constants/rgb.h"
enum
{
@ -381,7 +382,7 @@ static void sub_80C2760(u8 taskId)
case 7:
if (gWirelessCommType == 1 && gReceivedRemoteLinkPlayers == TRUE)
{
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(230, 150);
}
BlendPalettes(0xFFFFFFFF, 16, sData->var_52C);

View File

@ -1404,7 +1404,7 @@ void sub_8012780(u8 taskId)
switch (sub_80170B8(&data->textState, sub_801064C(ReadAsU16(data->field_0->arr[data->field_13].unk.field_0.unk_00.playerTrainerId), data->field_0->arr[data->field_13].unk.playerName)))
{
case 0:
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
data->field_19 = 5;
sub_8010688(5, ReadAsU16(data->field_0->arr[data->field_13].unk.field_0.unk_00.playerTrainerId), data->field_0->arr[data->field_13].unk.playerName);
@ -2130,7 +2130,7 @@ u32 sub_8013B8C(struct UnkStruct_Group *arg0, s32 id)
void sub_8013BD8(struct UnkStruct_Group *data, s32 id)
{
data->field_F = id;
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
RedrawListMenu(data->listTaskId);
sub_8018404(gStringVar1, &data->field_0->arr[data->field_F]);
@ -2782,7 +2782,7 @@ void sub_8014A40(u8 taskId)
switch (mevent_message_print_and_prompt_yes_no(&data->textState, &data->field_14, 0, gStringVar4))
{
case 0:
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
data->field_0->arr[data->field_13].field_1B = 0;
RedrawListMenu(data->listTaskId);
@ -2985,7 +2985,7 @@ void sub_8014F48(u8 taskId)
if (data->field_0->arr[id].field_1A_0 == 1 && !data->field_0->arr[id].unk.field_0.unk_0a_7)
{
data->field_F = id;
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
RedrawListMenu(data->listTaskId);
sub_8018404(gStringVar1, &data->field_0->arr[data->field_F]);
@ -3148,7 +3148,7 @@ void sub_80152F4(u8 taskId)
{
data->field_F = 0;
data->field_14 = 0;
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(0, 0);
sub_8011FC8(data->field_0->arr[0].unk.playerName, ReadAsU16(data->field_0->arr[0].unk.field_0.unk_00.playerTrainerId));
PlaySE(SE_PN_ON);
@ -3905,7 +3905,7 @@ void sub_80156E0(u8 taskId)
}
break;
case 53:
BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
BeginNormalPaletteFade(-1, 0, 0, 0x10, RGB_BLACK);
data->state = 54;
break;
case 54:

View File

@ -610,7 +610,7 @@ static void c2_081284E0(void)
SetMainCallback2(sub_801DF38);
gUnknown_02022C84->unkE = CreateTask(sub_801DF54, 8);
gUnknown_02022C84->unkF = CreateTask(sub_801F2B4, 7);
sub_800E0E8();
LoadWirelessStatusIndicatorSpriteGfx();
CreateWirelessStatusIndicatorSprite(232, 150);
}
break;

View File

@ -8,6 +8,7 @@
#include "trig.h"
#include "bg.h"
#include "gpu_regs.h"
#include "constants/rgb.h"
typedef bool8 (*TransitionStateFunc)(struct Task *task);
@ -361,7 +362,7 @@ static bool8 sub_81DAB4C(struct Task *task)
{
if (task->data[3] == 31)
{
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, 0);
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, RGB_BLACK);
task->tState++;
}
else

View File

@ -18,6 +18,7 @@
#include "trig.h"
#include "wallclock.h"
#include "window.h"
#include "constants/rgb.h"
#include "constants/songs.h"
// static declarations
@ -671,7 +672,7 @@ static void LoadWallClockGraphics(void)
static void WallClockInit(void)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
EnableInterrupts(INTR_FLAG_VBLANK);
SetVBlankCallback(WallClockVblankCallback);
SetMainCallback2(WallClockMainCallback);
@ -864,7 +865,7 @@ static void Task_SetClock4(u8 taskId)
static void Task_SetClock5(u8 taskId)
{
RtcInitLocalTimeOffset(gTasks[taskId].tHours, gTasks[taskId].tMinutes);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
gTasks[taskId].func = Task_SetClock6;
}
@ -896,7 +897,7 @@ static void Task_ViewClock2(u8 taskId)
static void Task_ViewClock3(u8 taskId)
{
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
gTasks[taskId].func = Task_ViewClock4;
}