Merge pull request #576 from GriffinRichards/doc-misc
Sync/document files with few undocumented symbols
This commit is contained in:
@@ -46,7 +46,6 @@ struct EReaderTrainerTowerSet
|
||||
bool32 ValidateTrainerTowerData(struct EReaderTrainerTowerSet * ttdata);
|
||||
bool32 CEReaderTool_SaveTrainerTower(struct EReaderTrainerTowerSet * ttdata);
|
||||
bool32 CEReaderTool_LoadTrainerTower(struct EReaderTrainerTowerSet * ttdata);
|
||||
u8 sub_815D654(void);
|
||||
bool32 ReadTrainerTowerAndValidate(void);
|
||||
|
||||
#endif //GUARD_CEREADER_TOOL_H
|
||||
|
||||
@@ -16,8 +16,7 @@ s32 CountDigits(s32 number);
|
||||
void TV_PrintIntToStringVar(u8 varidx, s32 number);
|
||||
u16 GetStarterSpecies(void);
|
||||
void StopPokemonLeagueLightingEffectTask(void);
|
||||
void nullsub_60(void);
|
||||
void nullsub_61(void);
|
||||
void FieldCB_ShowPortholeView(void);
|
||||
u8 ContextNpcGetTextColor(void);
|
||||
void SetPCBoxToSendMon(u8);
|
||||
u16 GetPCBoxToSendMon(void);
|
||||
|
||||
@@ -7,6 +7,6 @@ void DestroyHelpMessageWindow(u8 a0);
|
||||
u8 CreateHelpMessageWindow(void);
|
||||
void PrintTextOnHelpMessageWindow(const u8 * text, u8 mode);
|
||||
void MapNamePopupWindowIdSetDummy(void);
|
||||
void sub_8112F18(u8 windowId);
|
||||
void DrawHelpMessageWindowTilesById(u8 windowId);
|
||||
|
||||
#endif //GUARD_HELP_MESSAGE_H
|
||||
|
||||
+1
-1
@@ -303,6 +303,6 @@ void sub_80FB030(u32 a0);
|
||||
void ClearRecvCommands(void);
|
||||
|
||||
#include "mevent_server.h"
|
||||
extern const struct mevent_server_cmd gMEventSrvScript_OtherTrainerCanceled[];
|
||||
extern const struct mevent_server_cmd gServerScript_ClientCanceledCard[];
|
||||
|
||||
#endif //GUARD_LINK_RFU_H
|
||||
|
||||
@@ -35,7 +35,7 @@ void ClearDialogWindowAndFrame(u8 windowId, bool8 copyToVram);
|
||||
void ClearStdWindowAndFrame(u8 windowId, bool8 copyNow);
|
||||
void EraseFieldMessageBox(bool8 copyToVram);
|
||||
void SetStdWindowBorderStyle(u8 windowId, bool8 copyToVram);
|
||||
void sub_80F7768(u8 windowId, bool8 copyToVram);
|
||||
void LoadMessageBoxAndFrameGfx(u8 windowId, bool8 copyToVram);
|
||||
void Menu_LoadStdPal(void);
|
||||
void Menu_LoadStdPalAt(u16 offset);
|
||||
void DisplayItemMessageOnField(u8 taskId, u8 fontId, const u8 *src, TaskFunc callback);
|
||||
|
||||
+1
-1
@@ -761,7 +761,7 @@ extern const u8 gText_QuitLooking[];
|
||||
extern const u8 gText_FreshWater[];
|
||||
extern const u8 gText_SodaPop[];
|
||||
extern const u8 gText_Lemonade[];
|
||||
extern const u8 gText_Bicycle_1000000[];
|
||||
extern const u8 gText_Bicycle_Price[];
|
||||
extern const u8 gText_NoThanks[];
|
||||
extern const u8 gText_Abra_180Coins[];
|
||||
extern const u8 gText_Clefairy_500Coins[];
|
||||
|
||||
@@ -189,7 +189,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static const u8 sUnused_8453174[] = {16, 8, 4};
|
||||
static const u8 sUnused[] = {16, 8, 4};
|
||||
|
||||
static EWRAM_DATA u8 sOpenWindows[11] = {};
|
||||
|
||||
|
||||
@@ -151,8 +151,8 @@ static void (*const sOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
OpponentCmdEnd
|
||||
};
|
||||
|
||||
// not used
|
||||
static const u8 gUnknown_8250B18[] = { 0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20 };
|
||||
// unknown unused data
|
||||
static const u8 sUnused[] = { 0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20 };
|
||||
|
||||
static void OpponentDummy(void)
|
||||
{
|
||||
|
||||
@@ -170,8 +170,8 @@ static void (*const sPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
|
||||
static const u8 sTargetIdentities[] = { B_POSITION_PLAYER_LEFT, B_POSITION_PLAYER_RIGHT, B_POSITION_OPPONENT_RIGHT, B_POSITION_OPPONENT_LEFT };
|
||||
|
||||
// not used
|
||||
static const u8 gUnknown_8250984[] = { 0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58 };
|
||||
// unknown unused data
|
||||
static const u8 sUnused[] = { 0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58 };
|
||||
|
||||
void BattleControllerDummy(void)
|
||||
{
|
||||
|
||||
@@ -181,8 +181,8 @@ static void (*const sPokedudeBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
PokedudeCmdEnd,
|
||||
};
|
||||
|
||||
// not used
|
||||
static const u8 gUnknown_8479000[] = { 0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58 };
|
||||
// unknown unused data
|
||||
static const u8 sUnused[] = { 0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58 };
|
||||
|
||||
#define pdHealthboxPal1 simulatedInputState[0]
|
||||
#define pdHealthboxPal2 simulatedInputState[1]
|
||||
|
||||
+2
-2
@@ -479,8 +479,8 @@ void CopyBattlerSpriteToBg(s32 bgId, u8 x, u8 y, u8 battlerPosition, u8 palno, u
|
||||
LoadBgTilemap(bgId, tilemapDest, BG_SCREEN_SIZE, 0);
|
||||
}
|
||||
|
||||
// not used
|
||||
static void sub_80BCFCC(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7)
|
||||
// Unused
|
||||
static void DrawBattlerOnBgDMA(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7)
|
||||
{
|
||||
s32 i, j, offset;
|
||||
|
||||
|
||||
@@ -813,8 +813,8 @@ static const u8 sBallCatchBonuses[] =
|
||||
[ITEM_SAFARI_BALL - ITEM_ULTRA_BALL] = 15
|
||||
};
|
||||
|
||||
// not used
|
||||
static const u32 gUnknown_8250898 = 0xFF7EAE60;
|
||||
// unknown unused data
|
||||
static const u32 sUnused = 0xFF7EAE60;
|
||||
|
||||
static void Cmd_attackcanceler(void)
|
||||
{
|
||||
|
||||
+5
-5
@@ -390,20 +390,20 @@ void StartRegiBattle(void)
|
||||
IncrementGameStat(GAME_STAT_WILD_BATTLES);
|
||||
}
|
||||
|
||||
// not used
|
||||
static void sub_807FAF8(void)
|
||||
// Unused
|
||||
static void EndPokedudeBattle(void)
|
||||
{
|
||||
LoadPlayerParty();
|
||||
CB2_EndWildBattle();
|
||||
}
|
||||
|
||||
// not used
|
||||
static void sub_807FB08(void)
|
||||
// Unused
|
||||
static void StartPokedudeBattle(void)
|
||||
{
|
||||
LockPlayerFieldControls();
|
||||
FreezeObjectEvents();
|
||||
StopPlayerAvatar();
|
||||
gMain.savedCallback = sub_807FAF8;
|
||||
gMain.savedCallback = EndPokedudeBattle;
|
||||
SavePlayerParty();
|
||||
InitPokedudePartyAndOpponent();
|
||||
CreateBattleStartTask(GetWildBattleTransition(), 0);
|
||||
|
||||
+6
-5
@@ -41,13 +41,14 @@ static u16 GetCurrentBattleTowerWinStreak(u8 levelType);
|
||||
static void SetEReaderTrainerChecksum(struct BattleTowerEReaderTrainer * eReaderTrainer);
|
||||
static void PrintEReaderTrainerFarewellMessage(void);
|
||||
|
||||
const u8 unref_83FFAAC[] = {
|
||||
0x05, 0x04, 0x01, 0x10, 0x04, 0x02, 0x05, 0x06,
|
||||
0x03, 0x10, 0x06, 0x04, 0x00, 0x01, 0x02, 0x03,
|
||||
0x00, 0x02, 0x03
|
||||
// unknown unused data
|
||||
static const u8 sUnused[] = {
|
||||
5, 4, 1, 16, 4, 2, 5, 6,
|
||||
3, 16, 6, 4, 0, 1, 2, 3,
|
||||
0, 2, 3
|
||||
};
|
||||
|
||||
const u8 unref_83FFABF[] = _("100");
|
||||
static const u8 sText_100[] = _("100");
|
||||
|
||||
static const struct BattleTowerTrainer sBattleTowerTrainers[] =
|
||||
{
|
||||
|
||||
+2
-2
@@ -659,7 +659,7 @@ static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/berry_crush/bg.bin.lz");
|
||||
|
||||
// Takes the number of players - 2 and a player id and returns the
|
||||
// index into sPlayerCoords where that player should be seated
|
||||
static const u8 gUnknown_846F280[MAX_RFU_PLAYERS - 1][MAX_RFU_PLAYERS] = {
|
||||
static const u8 sPlayerIdToPosId[MAX_RFU_PLAYERS - 1][MAX_RFU_PLAYERS] = {
|
||||
{1, 3},
|
||||
{0, 1, 3},
|
||||
{1, 3, 2, 4},
|
||||
@@ -3221,7 +3221,7 @@ static void CreatePlayerNameWindows(struct BerryCrushGame * game)
|
||||
|
||||
for (i = 0; i < game->playerCount; ++i)
|
||||
{
|
||||
game->gfx.playerCoords[i] = &sPlayerCoords[gUnknown_846F280[game->playerCount - 2][i]];
|
||||
game->gfx.playerCoords[i] = &sPlayerCoords[sPlayerIdToPosId[game->playerCount - 2][i]];
|
||||
game->gfx.nameWindowIds[i] = AddWindow(&sWindowTemplates_PlayerNames[game->gfx.playerCoords[i]->playerId]);
|
||||
PutWindowTilemap(game->gfx.nameWindowIds[i]);
|
||||
FillWindowPixelBuffer(game->gfx.nameWindowIds[i], PIXEL_FILL(0));
|
||||
|
||||
+8
-4
@@ -4,7 +4,11 @@
|
||||
#include "text.h"
|
||||
#include "sound.h"
|
||||
|
||||
static const u8 gUnknown_846FB08[] = {1, 2, 4};
|
||||
static const u8 sScrollDistances[] = {
|
||||
[OPTIONS_TEXT_SPEED_SLOW] = 1,
|
||||
[OPTIONS_TEXT_SPEED_MID] = 2,
|
||||
[OPTIONS_TEXT_SPEED_FAST] = 4,
|
||||
};
|
||||
static const u16 sFont6BrailleGlyphs[] = INCBIN_U16("graphics/fonts/font6.fwjpnfont");
|
||||
|
||||
static void DecompressGlyphFont6(u16);
|
||||
@@ -163,15 +167,15 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
||||
case 4:
|
||||
if (textPrinter->scrollDistance)
|
||||
{
|
||||
if (textPrinter->scrollDistance < gUnknown_846FB08[gSaveBlock2Ptr->optionsTextSpeed])
|
||||
if (textPrinter->scrollDistance < sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed])
|
||||
{
|
||||
ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||
textPrinter->scrollDistance = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScrollWindow(textPrinter->printerTemplate.windowId, 0, gUnknown_846FB08[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||
textPrinter->scrollDistance -= gUnknown_846FB08[gSaveBlock2Ptr->optionsTextSpeed];
|
||||
ScrollWindow(textPrinter->printerTemplate.windowId, 0, sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||
textPrinter->scrollDistance -= sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed];
|
||||
}
|
||||
CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
// The trainer tower data exceeds SECTOR_DATA_SIZE. They're allowed to use the full save sector up to the counter field.
|
||||
STATIC_ASSERT(SEC30_SIZE + SEC31_SIZE <= SECTOR_COUNTER_OFFSET * 2, EReaderTrainerTowerSetFreeSpace);
|
||||
|
||||
u8 sub_815D654(void)
|
||||
static u8 GetTrainerHillUnkVal(void)
|
||||
{
|
||||
return (gSaveBlock1Ptr->trainerTower[0].unk9 + 1) % 256;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ static bool32 CEReaderTool_SaveTrainerTower_r(struct EReaderTrainerTowerSet * tt
|
||||
|
||||
memset(buffer, 0, SECTOR_SIZE);
|
||||
memcpy(buffer, ttdata, SEC30_SIZE);
|
||||
buffer[1] = sub_815D654();
|
||||
buffer[1] = GetTrainerHillUnkVal();
|
||||
if (TryWriteSpecialSaveSector(SECTOR_ID_TRAINER_TOWER_1, buffer) != TRUE)
|
||||
return FALSE;
|
||||
memset(buffer, 0, SECTOR_SIZE);
|
||||
|
||||
+3
-2
@@ -49,14 +49,15 @@ bool8 RemoveCoins(u16 toSub)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void PrintCoinsString_Parameterized(u8 windowId, u32 coinAmount, u8 x, u8 y, u8 speed)
|
||||
static void PrintCoinsString_Parameterized(u8 windowId, u32 coinAmount, u8 x, u8 y, u8 speed)
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar1, coinAmount, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Coins);
|
||||
AddTextPrinterParameterized(windowId, FONT_0, gStringVar4, x, y, speed, NULL);
|
||||
}
|
||||
|
||||
void sub_80D0674(u8 windowId, u16 tileStart, u8 palette, u32 coinAmount)
|
||||
// Unused
|
||||
static void ShowCoinsWindow_Parameterized(u8 windowId, u16 tileStart, u8 palette, u32 coinAmount)
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, tileStart, palette);
|
||||
AddTextPrinterParameterized(windowId, FONT_2, gText_Coins_2, 0, 0, 0xFF, 0);
|
||||
|
||||
+1
-1
@@ -346,7 +346,7 @@ static const u32 sWindow2Map_Blastoise[] = INCBIN_U32("graphics/credits/unk_840F
|
||||
static const u32 sWindow1Map_Pikachu[] = INCBIN_U32("graphics/credits/unk_8410198.bin.lz");
|
||||
static const u32 sWindow2Map_Pikachu[] = INCBIN_U32("graphics/credits/unk_84105B4.bin.lz");
|
||||
|
||||
static const u32 filler_8410AFC = 0xF0;
|
||||
static const u32 sUnused = 0xF0;
|
||||
|
||||
static const u16 sTheEndGfxPal[] = INCBIN_U16("graphics/credits/unk_8410B20.gbapal");
|
||||
static const u8 sTheEndGfxTiles[] = INCBIN_U8("graphics/credits/unk_8410B20.4bpp.lz");
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ static void Unused_LZDecompressWramIndirect(const void **src, void *dest)
|
||||
LZ77UnCompWram(*src, dest);
|
||||
}
|
||||
|
||||
static void sub_800EDDC(s32 object_size, s32 object_count, u8 *src_tiles, u8 *dest_tiles)
|
||||
static void StitchObjectsOn8x8Canvas(s32 object_size, s32 object_count, u8 *src_tiles, u8 *dest_tiles)
|
||||
{
|
||||
/*
|
||||
This function appears to emulate behaviour found in the GB(C) versions regarding how the Pokemon images
|
||||
|
||||
@@ -79,7 +79,7 @@ static const u16 sEvolutionSparkleMatrixScales[12] = {
|
||||
0x100
|
||||
};
|
||||
|
||||
static const s16 sUnref_841EF28[][2] = {
|
||||
static const s16 sUnused[][2] = {
|
||||
{-4, 0x10},
|
||||
{-3, 0x30},
|
||||
{-2, 0x50},
|
||||
|
||||
@@ -72,9 +72,9 @@ static const u16 sBgAnim_Pal[] = INCBIN_U16("graphics/evolution_scene/transition
|
||||
|
||||
static const u8 sText_ShedinjaJapaneseName[] = _("ヌケニン");
|
||||
|
||||
static const u8 unref_83F8445[] = _("{COLOR DARK_GRAY}{HIGHLIGHT WHITE}{SHADOW LIGHT_GRAY}");
|
||||
static const u8 sText_UnusedColors[] = _("{COLOR DARK_GRAY}{HIGHLIGHT WHITE}{SHADOW LIGHT_GRAY}");
|
||||
|
||||
static const u8 unref_83F844F[][10] = {
|
||||
static const u8 sText_UnusedArrows[][10] = {
|
||||
_("▶\n "),
|
||||
_(" \n▶"),
|
||||
_(" \n ")
|
||||
|
||||
+1
-1
@@ -530,7 +530,7 @@ static const struct SpriteTemplate sSpriteTemplate_SelectorCursor = {
|
||||
SPRITETAG_SELECTOR_CURSOR, SPRITETAG_SELECTOR_CURSOR, &sSelectorCursorOamData, sSelectorCursorAnims, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const u8 filler_845FC5C[8] = {}; // ???
|
||||
static const u8 sUnused[8] = {}; // ???
|
||||
|
||||
static const struct OamData sQuestionMarkTileOamData = {
|
||||
.shape = ST_OAM_V_RECTANGLE,
|
||||
|
||||
+5
-5
@@ -34,7 +34,7 @@ static void CameraPanningCB_PanAhead(void);
|
||||
static struct FieldCameraOffset sFieldCameraOffset;
|
||||
static s16 sHorizontalCameraPan;
|
||||
static s16 sVerticalCameraPan;
|
||||
static u8 gUnknown_3000E9C;
|
||||
static u8 sBikeCameraPanFlag;
|
||||
static void (*sFieldCameraPanningCallback)(void);
|
||||
|
||||
struct CameraObject gFieldCamera;
|
||||
@@ -513,7 +513,7 @@ void SetCameraPanning(s16 a, s16 b)
|
||||
void InstallCameraPanAheadCallback(void)
|
||||
{
|
||||
sFieldCameraPanningCallback = CameraPanningCB_PanAhead;
|
||||
gUnknown_3000E9C = 0;
|
||||
sBikeCameraPanFlag = FALSE;
|
||||
sHorizontalCameraPan = 0;
|
||||
sVerticalCameraPan = 32;
|
||||
}
|
||||
@@ -540,13 +540,13 @@ static void CameraPanningCB_PanAhead(void)
|
||||
// this code is never reached.
|
||||
if (gPlayerAvatar.tileTransitionState == 1)
|
||||
{
|
||||
gUnknown_3000E9C ^= 1;
|
||||
if (gUnknown_3000E9C == 0)
|
||||
sBikeCameraPanFlag ^= 1;
|
||||
if (sBikeCameraPanFlag == FALSE)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_3000E9C = 0;
|
||||
sBikeCameraPanFlag = FALSE;
|
||||
}
|
||||
|
||||
var = GetPlayerMovementDirection();
|
||||
|
||||
@@ -616,7 +616,7 @@ static void DoPortholeWarp(void) // Unused
|
||||
LockPlayerFieldControls();
|
||||
WarpFadeOutScreen();
|
||||
CreateTask(Task_Teleport2Warp, 10);
|
||||
gFieldCallback = nullsub_60;
|
||||
gFieldCallback = FieldCB_ShowPortholeView;
|
||||
}
|
||||
|
||||
static void Task_CableClubWarp(u8 taskId)
|
||||
|
||||
@@ -442,7 +442,7 @@ static bool8 ForcedMovement_MatSpin(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void (*const gUnknown_835B814[])(u8, u16) = {
|
||||
static void (*const sPlayerNotOnBikeFuncs[])(u8, u16) = {
|
||||
PlayerNotOnBikeNotMoving,
|
||||
PlayerNotOnBikeTurningInPlace,
|
||||
PlayerNotOnBikeMoving
|
||||
@@ -450,7 +450,7 @@ static void (*const gUnknown_835B814[])(u8, u16) = {
|
||||
|
||||
void MovePlayerNotOnBike(u8 direction, u16 heldKeys)
|
||||
{
|
||||
gUnknown_835B814[CheckMovementInputNotOnBike(direction)](direction, heldKeys);
|
||||
sPlayerNotOnBikeFuncs[CheckMovementInputNotOnBike(direction)](direction, heldKeys);
|
||||
}
|
||||
|
||||
static u8 CheckMovementInputNotOnBike(u8 direction)
|
||||
@@ -1733,7 +1733,7 @@ static bool8 Fishing4(struct Task *task)
|
||||
{
|
||||
u32 randVal;
|
||||
|
||||
sub_80F7768(0, TRUE);
|
||||
LoadMessageBoxAndFrameGfx(0, TRUE);
|
||||
task->tStep++;
|
||||
task->tFrameCounter = 0;
|
||||
task->tNumDots = 0;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
#include "global.h"
|
||||
|
||||
static u32 sub_80A0E78(void)
|
||||
static u32 FieldSpecialScene_Dummy0(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void nullsub_57(void)
|
||||
static void FieldSpecialScene_Dummy1(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void nullsub_58(void)
|
||||
static void FieldSpecialScene_Dummy2(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void nullsub_59(void)
|
||||
static void FieldSpecialScene_Dummy3(void)
|
||||
{
|
||||
}
|
||||
|
||||
void nullsub_60(void)
|
||||
void FieldCB_ShowPortholeView(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ void SpawnCameraObject(void)
|
||||
void RemoveCameraObject(void)
|
||||
{
|
||||
CameraObjectSetFollowedObjectId(GetPlayerAvatarObjectId());
|
||||
RemoveObjectEventByLocalIdAndMap(127, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
RemoveObjectEventByLocalIdAndMap(OBJ_EVENT_ID_CAMERA, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
}
|
||||
|
||||
void BufferEReaderTrainerName(void)
|
||||
@@ -333,7 +333,8 @@ void BufferEReaderTrainerName(void)
|
||||
CopyEReaderTrainerName5(gStringVar1);
|
||||
}
|
||||
|
||||
static const u8 sUnused_83F5B04[] = {
|
||||
// Unused
|
||||
static const u8 sSlotMachineRandomSeeds[] = {
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
@@ -752,7 +753,8 @@ static const u8 *const sFloorNamePointers[] = {
|
||||
gText_Rooftop
|
||||
};
|
||||
|
||||
static const u8 sUnused_83F5B84[] = {
|
||||
// Unused
|
||||
static const u8 sFloorNameWidthPadding[] = {
|
||||
26,
|
||||
26,
|
||||
26,
|
||||
|
||||
+2
-1
@@ -288,7 +288,8 @@ static void CrackedFloorPerStepCallback(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_806ED38(void)
|
||||
// Unused
|
||||
static void SetHasPokedexAndPokemon(void)
|
||||
{
|
||||
FlagSet(FLAG_SYS_POKEDEX_GET);
|
||||
FlagSet(FLAG_SYS_POKEMON_GET);
|
||||
|
||||
+14
-13
@@ -47,13 +47,14 @@ void DestroyHelpMessageWindow(u8 a0)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8112F18(u8 windowId)
|
||||
// Creates the bottom bar window that displays help text for e.g. the options in the Start menu
|
||||
void DrawHelpMessageWindowTilesById(u8 windowId)
|
||||
{
|
||||
const u8 *ptr = gHelpMessageWindow_Gfx;
|
||||
u8 *buffer;
|
||||
u8 i, j;
|
||||
u8 width, height;
|
||||
u8 k;
|
||||
u8 tileId;
|
||||
|
||||
width = (u8)GetWindowAttribute(windowId, WINDOW_WIDTH);
|
||||
height = (u8)GetWindowAttribute(windowId, WINDOW_HEIGHT);
|
||||
@@ -66,15 +67,15 @@ void sub_8112F18(u8 windowId)
|
||||
{
|
||||
for (j = 0; j < width; j++)
|
||||
{
|
||||
if (i == 0)
|
||||
k = 0;
|
||||
else if (i == height - 1)
|
||||
k = 14;
|
||||
else
|
||||
k = 5;
|
||||
if (i == 0) // Top row
|
||||
tileId = 0;
|
||||
else if (i == height - 1) // Bottom row
|
||||
tileId = 14;
|
||||
else // Middle row
|
||||
tileId = 5;
|
||||
CpuCopy32(
|
||||
&ptr[k * 0x20],
|
||||
&buffer[(i * width + j) * 0x20],
|
||||
&ptr[tileId * 32],
|
||||
&buffer[(i * width + j) * 32],
|
||||
32
|
||||
);
|
||||
}
|
||||
@@ -84,9 +85,9 @@ void sub_8112F18(u8 windowId)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8112FD0(void)
|
||||
static void DrawHelpMessageWindowTiles(void)
|
||||
{
|
||||
sub_8112F18(sHelpMessageWindowId);
|
||||
DrawHelpMessageWindowTilesById(sHelpMessageWindowId);
|
||||
}
|
||||
|
||||
static const u8 sHelpMessageTextColors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_DYNAMIC_COLOR_1, TEXT_COLOR_DARK_GRAY};
|
||||
@@ -98,7 +99,7 @@ static void PrintHelpMessageText(const u8 *text)
|
||||
|
||||
void PrintTextOnHelpMessageWindow(const u8 *text, u8 mode)
|
||||
{
|
||||
sub_8112FD0();
|
||||
DrawHelpMessageWindowTiles();
|
||||
PrintHelpMessageText(text);
|
||||
if (mode)
|
||||
CopyWindowToVram(sHelpMessageWindowId, mode);
|
||||
|
||||
+1
-1
@@ -1646,7 +1646,7 @@ static const u8 *const sHelpSystemSubmenuItemLists[HELPCONTEXT_COUNT * (TOPIC_CO
|
||||
NULL, NULL, NULL, NULL, NULL // HELPCONTEXT_UNUSED
|
||||
};
|
||||
|
||||
static const u16 unref_845BCB0[] = INCBIN_U16("graphics/help_system/unused.bin");
|
||||
static const u16 sUnused[] = INCBIN_U16("graphics/help_system/unused.bin");
|
||||
|
||||
static const u8 sHelpSystemContextTopicOrder[TOPIC_COUNT] = {
|
||||
TOPIC_ABOUT_GAME,
|
||||
|
||||
+1
-1
@@ -1662,7 +1662,7 @@ void Task_ReturnToBagFromContextMenu(u8 taskId)
|
||||
Task_RedrawArrowsAndReturnToBagMenuSelect(taskId);
|
||||
}
|
||||
|
||||
static void unref_sub_810A288(u8 taskId)
|
||||
static void Task_UnusedReturnToBag(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u16 itemsAbove;
|
||||
|
||||
+4
-2
@@ -70,8 +70,10 @@ static void Task_UseFameCheckerFromField(u8 taskId);
|
||||
static void Task_BattleUse_StatBooster_DelayAndPrint(u8 taskId);
|
||||
static void Task_BattleUse_StatBooster_WaitButton_ReturnToBattle(u8 taskId);
|
||||
|
||||
// No clue what this is
|
||||
static const u8 sUnref_83E27B4[] = {
|
||||
// unknown unused data.
|
||||
// It's curiously about the size of an array of values indexed by species (including padding),
|
||||
// but the arrangement of values is not sensible (e.g., not giving all "old unown" the same value).
|
||||
static const u8 sUnused[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
+3
-3
@@ -104,7 +104,7 @@ static const union AffineAnimCmd *const sArrowAndStarSpriteAffineAnimTable[] = {
|
||||
sAffineAnim_Up
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_84647E4 = {
|
||||
static const struct SpriteTemplate sSpriteTemplate_ArrowAndStar = {
|
||||
.tileTag = ARROW_TILE_TAG,
|
||||
.paletteTag = 0xFFFF,
|
||||
.oam = &sArrowAndStarSpriteOamData,
|
||||
@@ -534,7 +534,7 @@ static void DestroyArrowAndStarTiles(void)
|
||||
|
||||
static void CreateArrowSprite(u8 animNum, u8 direction)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gUnknown_84647E4, 120, 76, 0);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_ArrowAndStar, 120, 76, 0);
|
||||
gSprites[spriteId].oam.paletteNum = 0;
|
||||
StartSpriteAnim(&gSprites[spriteId], animNum);
|
||||
gSprites[spriteId].spAnimNum = animNum;
|
||||
@@ -614,7 +614,7 @@ static void SpriteCallback_DestroyArrow(struct Sprite *sprite)
|
||||
|
||||
static u8 CreateStarSprite(void)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gUnknown_84647E4, 120, 76, 0);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_ArrowAndStar, 120, 76, 0);
|
||||
gSprites[spriteId].oam.paletteNum = 0;
|
||||
gSprites[spriteId].callback = SpriteCallback_Star;
|
||||
StartSpriteAnim(&gSprites[spriteId], 4);
|
||||
|
||||
+5
-5
@@ -326,7 +326,7 @@ static const struct WindowTemplate sWindowTemplates[9] = {
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_83FFA8C = {
|
||||
static const struct WindowTemplate sMoveRelearnerYesNoMenuTemplate = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 8,
|
||||
@@ -506,7 +506,7 @@ static void MoveRelearnerStateMachine(void)
|
||||
MoveRelearnerMenuHandleInput();
|
||||
break;
|
||||
case MENU_STATE_PRINT_TEACH_MOVE_PROMPT:
|
||||
CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
sMoveRelearner->state++;
|
||||
break;
|
||||
case MENU_STATE_TEACH_MOVE_CONFIRM :
|
||||
@@ -531,7 +531,7 @@ static void MoveRelearnerStateMachine(void)
|
||||
}
|
||||
break;
|
||||
case MENU_STATE_PRINT_GIVE_UP_PROMPT:
|
||||
CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
sMoveRelearner->state++;
|
||||
break;
|
||||
case MENU_STATE_GIVE_UP_CONFIRM:
|
||||
@@ -552,7 +552,7 @@ static void MoveRelearnerStateMachine(void)
|
||||
sMoveRelearner->state++;
|
||||
break;
|
||||
case MENU_STATE_WAIT_FOR_TRYING_TO_LEARN:
|
||||
CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
sMoveRelearner->state = 18;
|
||||
break;
|
||||
case MENU_STATE_CONFIRM_DELETE_OLD_MOVE:
|
||||
@@ -573,7 +573,7 @@ static void MoveRelearnerStateMachine(void)
|
||||
sMoveRelearner->state++;
|
||||
break;
|
||||
case MENU_STATE_WAIT_FOR_STOP_TEACHING:
|
||||
CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
sMoveRelearner->state = 26;
|
||||
break;
|
||||
case MENU_STATE_CONFIRM_STOP_TEACHING:
|
||||
|
||||
+47
-36
@@ -559,49 +559,60 @@ static bool8 RfuUnusedQueue_Enqueue(struct RfuUnusedQueue *queue, u8 *dest)
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void sub_80FC9B8(u8 *q1, u8 mode)
|
||||
// Populates an array with a sequence of numbers (which numbers depends on the mode)
|
||||
// and sets the final element to the total of the other elements
|
||||
#define SEQ_ARRAY_MAX_SIZE 200
|
||||
static void PopulateArrayWithSequence(u8 *arr, u8 mode)
|
||||
{
|
||||
s32 i;
|
||||
u8 rval;
|
||||
u16 r5 = 0;
|
||||
u16 total = 0;
|
||||
static u8 counter;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case 0:
|
||||
for (i = 0; i < 200; i++)
|
||||
{
|
||||
q1[i] = i + 1;
|
||||
r5 += i + 1;
|
||||
}
|
||||
*((u16 *)(q1 + i)) = r5;
|
||||
break;
|
||||
case 1:
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
q1[i] = i + 1;
|
||||
r5 += i + 1;
|
||||
}
|
||||
*((u16 *)(q1 + 200)) = r5;
|
||||
break;
|
||||
case 2:
|
||||
for (i = 0; i < 200; i++)
|
||||
{
|
||||
rval = Random();
|
||||
q1[i] = rval;
|
||||
r5 += rval;
|
||||
}
|
||||
*((u16 *)(q1 + i)) = r5;
|
||||
break;
|
||||
case 3:
|
||||
for (i = 0; i < 200; i++)
|
||||
{
|
||||
q1[i] = i + 1 + counter;
|
||||
r5 += (i + 1 + counter) & 0xFF;
|
||||
}
|
||||
*((u16 *)(q1 + i)) = r5;
|
||||
counter++;
|
||||
break;
|
||||
case 0:
|
||||
// Populate with numbers 1-200
|
||||
// Total will be 20100
|
||||
for (i = 0; i < SEQ_ARRAY_MAX_SIZE; i++)
|
||||
{
|
||||
arr[i] = i + 1;
|
||||
total += i + 1;
|
||||
}
|
||||
*((u16 *)(arr + i)) = total;
|
||||
break;
|
||||
case 1:
|
||||
// Populate with numbers 1-100
|
||||
// Total will be 5050
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
arr[i] = i + 1;
|
||||
total += i + 1;
|
||||
}
|
||||
*((u16 *)(arr + SEQ_ARRAY_MAX_SIZE)) = total;
|
||||
break;
|
||||
case 2:
|
||||
// Populate with random numbers 0-255
|
||||
// Total will be a number 0-51000
|
||||
for (i = 0; i < SEQ_ARRAY_MAX_SIZE; i++)
|
||||
{
|
||||
rval = Random();
|
||||
arr[i] = rval;
|
||||
total += rval;
|
||||
}
|
||||
*((u16 *)(arr + i)) = total;
|
||||
break;
|
||||
case 3:
|
||||
// Populate with numbers 1-200 + counter
|
||||
// Total will be a number 20100-51000
|
||||
for (i = 0; i < SEQ_ARRAY_MAX_SIZE; i++)
|
||||
{
|
||||
arr[i] = i + 1 + counter;
|
||||
total += (i + 1 + counter) & 0xFF;
|
||||
}
|
||||
*((u16 *)(arr + i)) = total;
|
||||
counter++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+21
-19
@@ -302,7 +302,7 @@ _081DD044:
|
||||
ldrb r0, [r4, o_SoundChannel_type]
|
||||
tst r0, 0x30
|
||||
beq _081DD068
|
||||
bl sub_81DC460
|
||||
bl SoundMainRAM_Unk1
|
||||
b _081DD228
|
||||
_081DD068:
|
||||
mov r10, r10, lsl 16
|
||||
@@ -465,8 +465,9 @@ _081DD25E:
|
||||
.pool
|
||||
thumb_func_end SoundMainRAM
|
||||
|
||||
arm_func_start sub_81DC460
|
||||
sub_81DC460:
|
||||
@ Not present in GBA SDK 3.0
|
||||
arm_func_start SoundMainRAM_Unk1
|
||||
SoundMainRAM_Unk1:
|
||||
ldr r6, [r4, o_SoundChannel_wav]
|
||||
ldrb r0, [r4, o_SoundChannel_status]
|
||||
tst r0, 0x20
|
||||
@@ -505,10 +506,10 @@ _081DD2B4:
|
||||
ldrb r0, [r4, o_SoundChannel_type]
|
||||
tst r0, 0x10
|
||||
bne _081DD3C0
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
mov r0, r1
|
||||
add r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
sub r1, r1, r0
|
||||
_081DD308:
|
||||
ldr r6, [r5]
|
||||
@@ -534,11 +535,11 @@ _081DD310:
|
||||
b _081DD364
|
||||
_081DD358:
|
||||
add r3, r3, lr
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
mov r0, r1
|
||||
_081DD364:
|
||||
add r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
sub r1, r1, r0
|
||||
_081DD370:
|
||||
adds r5, r5, 0x40000000
|
||||
@@ -565,10 +566,10 @@ _081DD3B0:
|
||||
b _081DD3B0
|
||||
_081DD3C0:
|
||||
sub r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
mov r0, r1
|
||||
sub r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
sub r1, r1, r0
|
||||
_081DD3D8:
|
||||
ldr r6, [r5]
|
||||
@@ -594,11 +595,11 @@ _081DD3E0:
|
||||
b _081DD434
|
||||
_081DD428:
|
||||
sub r3, r3, lr
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
mov r0, r1
|
||||
_081DD434:
|
||||
sub r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
sub r1, r1, r0
|
||||
_081DD440:
|
||||
adds r5, r5, 0x40000000
|
||||
@@ -663,10 +664,11 @@ _081DD4F4:
|
||||
str r7, [r5, 0x630]
|
||||
str r6, [r5], 0x4
|
||||
pop {r8,r12,pc}
|
||||
arm_func_end sub_81DC460
|
||||
arm_func_end SoundMainRAM_Unk1
|
||||
|
||||
arm_func_start sub_81DC71C
|
||||
sub_81DC71C:
|
||||
@ Not present in GBA SDK 3.0
|
||||
arm_func_start SoundMainRAM_Unk2
|
||||
SoundMainRAM_Unk2:
|
||||
push {r0,r2,r5-r7,lr}
|
||||
mov r0, r3, lsr 6
|
||||
ldr r1, [r4, o_SoundChannel_xpi]
|
||||
@@ -678,7 +680,7 @@ sub_81DC71C:
|
||||
ldr r1, [r4, o_SoundChannel_wav]
|
||||
add r2, r2, r1
|
||||
add r2, r2, 0x10
|
||||
ldr r5, =gUnknown_030007B8
|
||||
ldr r5, =sDecodingBuffer
|
||||
ldr r6, =gDeltaEncodingTable
|
||||
mov r7, 0x40
|
||||
ldrb lr, [r2], 1
|
||||
@@ -699,12 +701,12 @@ _081DD57C:
|
||||
subs r7, r7, 2
|
||||
bgt _081DD568
|
||||
_081DD594:
|
||||
ldr r5, =gUnknown_030007B8
|
||||
ldr r5, =sDecodingBuffer
|
||||
and r0, r3, 0x3F
|
||||
ldrsb r1, [r5, r0]
|
||||
pop {r0,r2,r5-r7,pc}
|
||||
.pool
|
||||
arm_func_end sub_81DC71C
|
||||
arm_func_end SoundMainRAM_Unk2
|
||||
|
||||
thumb_func_start SoundMainBTM
|
||||
SoundMainBTM:
|
||||
@@ -1910,9 +1912,9 @@ _081DDD90:
|
||||
|
||||
.bss
|
||||
.align 3
|
||||
gUnknown_030007B8:
|
||||
sDecodingBuffer:
|
||||
.space 0x40
|
||||
.size gUnknown_030007B8, .-gUnknown_030007B8
|
||||
.size sDecodingBuffer, .-sDecodingBuffer
|
||||
|
||||
.global gMPlayTrack_BGM
|
||||
gMPlayTrack_BGM:
|
||||
|
||||
+1
-1
@@ -508,7 +508,7 @@ void Menu_PrintFormatIntlPlayerName(u8 windowId, const u8 * src, u16 x, u16 y)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_812E768(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
static void UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
{
|
||||
s32 loopSrcY, loopDstY, loopSrcX, loopDstX, xEnd, yEnd, multiplierSrcY, multiplierDstY;
|
||||
u16 toOrr;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "mevent_server.h"
|
||||
|
||||
extern const struct mevent_server_cmd gMEventSrvScript_OtherTrainerCanceled[];
|
||||
extern const struct mevent_server_cmd gServerScript_ClientCanceledCard[];
|
||||
|
||||
// Unreferenced
|
||||
const u8 gUnknown_84687A0[] = _("You have collected all STAMPs!\nWant to input a CARD as a prize?");
|
||||
@@ -148,7 +148,7 @@ const struct mevent_server_cmd gMEventSrvScript_AskClientToOverwriteCard[] = {
|
||||
SRV_RECV(0x13),
|
||||
SRV_READWORD,
|
||||
SRV_BRANCHIF(0x00, gMEventSrvScript_SendCardSuccess),
|
||||
SRV_BRANCH(gMEventSrvScript_OtherTrainerCanceled)
|
||||
SRV_BRANCH(gServerScript_ClientCanceledCard)
|
||||
};
|
||||
|
||||
const struct mevent_server_cmd gMEventSrvScript_OtherTrnHasCard[] = {
|
||||
|
||||
+4
-4
@@ -17,9 +17,9 @@ static void SpriteCB_Marking(struct Sprite *);
|
||||
static void SpriteCB_Cursor(struct Sprite *);
|
||||
static struct Sprite *CreateMarkingComboSprite(u16, u16, const u16 *, u16);
|
||||
|
||||
static const u16 sMonMarkingsPal[] = INCBIN_U16("graphics/misc/mon_markings.gbapal");
|
||||
static const u16 sMonMarkings_Pal[] = INCBIN_U16("graphics/misc/mon_markings.gbapal");
|
||||
static const u16 sMonMarkings_Gfx[] = INCBIN_U16("graphics/misc/mon_markings.4bpp");
|
||||
static const u8 sUnref_83EE828[] = {0x09, 0x50, 0x13, 0x02, 0xFF};
|
||||
static const u8 sUnused[] = {0x09, 0x50, 0x13, 0x02, 0xFF};
|
||||
|
||||
static const struct OamData sOamData_MenuWindow =
|
||||
{
|
||||
@@ -558,7 +558,7 @@ static void SpriteCB_Cursor(struct Sprite *sprite)
|
||||
struct Sprite *CreateMonMarkingAllCombosSprite(u16 tileTag, u16 paletteTag, const u16 *palette)
|
||||
{
|
||||
if (palette == NULL)
|
||||
palette = sMonMarkingsPal;
|
||||
palette = sMonMarkings_Pal;
|
||||
return CreateMarkingComboSprite(tileTag, paletteTag, palette, 1 << NUM_MON_MARKINGS);
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ struct Sprite *CreateMonMarkingAllCombosSprite(u16 tileTag, u16 paletteTag, cons
|
||||
struct Sprite *CreateMonMarkingComboSprite(u16 tileTag, u16 paletteTag, const u16 *palette)
|
||||
{
|
||||
if (palette == NULL)
|
||||
palette = sMonMarkingsPal;
|
||||
palette = sMonMarkings_Pal;
|
||||
return CreateMarkingComboSprite(tileTag, paletteTag, palette, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ const struct ListMenuTemplate sListMenu_Receive = {
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
const u8 *const Unref_08366ED8[] = {
|
||||
static const u8 *const sUnusedMenuTexts[] = {
|
||||
gText_VarietyOfEventsImportedWireless,
|
||||
gText_WonderCardsInPossession,
|
||||
gText_ReadNewsThatArrived,
|
||||
@@ -344,8 +344,8 @@ ALIGNED(4) const u8 sMG_Ereader_TextColor_1[3] = { 0, 1, 2 };
|
||||
ALIGNED(4) const u8 sMG_Ereader_TextColor_1_Copy[3] = { 0, 1, 2 };
|
||||
ALIGNED(4) const u8 sMG_Ereader_TextColor_2[3] = { 1, 2, 3 };
|
||||
|
||||
const u8 gUnknown_8466EF3[] = _("テスト");
|
||||
const u8 gUnknown_8466EF7[] = _("むげんのチケット");
|
||||
static const u8 sText_Test[] = _("テスト");
|
||||
static const u8 sText_EonTicket[] = _("むげんのチケット");
|
||||
|
||||
void vblankcb_mystery_gift_e_reader_run(void)
|
||||
{
|
||||
|
||||
@@ -609,7 +609,7 @@ void SetStdWindowBorderStyle(u8 windowId, bool8 copyToVram)
|
||||
DrawStdFrameWithCustomTileAndPalette(windowId, copyToVram, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM);
|
||||
}
|
||||
|
||||
void sub_80F7768(u8 windowId, bool8 copyToVram)
|
||||
void LoadMessageBoxAndFrameGfx(u8 windowId, bool8 copyToVram)
|
||||
{
|
||||
if (gQuestLogState == QL_STATE_PLAYBACK)
|
||||
{
|
||||
|
||||
+2
-2
@@ -807,7 +807,7 @@ static void LoadMapFromWarp(bool32 unused)
|
||||
InitMap();
|
||||
}
|
||||
|
||||
static void sub_80559A8(void)
|
||||
static void QL_LoadMapNormal(void)
|
||||
{
|
||||
bool8 isOutdoors;
|
||||
|
||||
@@ -2249,7 +2249,7 @@ static bool32 LoadMap_QLPlayback(u8 *state)
|
||||
else
|
||||
{
|
||||
gExitStairsMovementDisabled = TRUE;
|
||||
sub_80559A8();
|
||||
QL_LoadMapNormal();
|
||||
}
|
||||
(*state)++;
|
||||
break;
|
||||
|
||||
+1
-1
@@ -2636,7 +2636,7 @@ static void ToggleFieldMoveDescriptionWindow(u8 action)
|
||||
{
|
||||
if (ptr->windowId[2] == WINDOW_NONE)
|
||||
ptr->windowId[2] = AddWindow(&sFieldMoveDescriptionWindowTemplate);
|
||||
sub_8112F18(ptr->windowId[2]);
|
||||
DrawHelpMessageWindowTilesById(ptr->windowId[2]);
|
||||
letterSpacing = GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING);
|
||||
AddTextPrinterParameterized4(ptr->windowId[2], FONT_2, 3, 6, letterSpacing, 0, sFontColorTable[5], 0, sFieldMoveDescriptionTable[action - CURSOR_OPTION_FIELD_MOVES]);
|
||||
PutWindowTilemap(ptr->windowId[2]);
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
#include "event_data.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
static void sub_80BF97C(u8 taskId);
|
||||
static void Task_ChoosePartyMon(u8 taskId);
|
||||
|
||||
void ChoosePartyMon(void)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
LockPlayerFieldControls();
|
||||
taskId = CreateTask(sub_80BF97C, 10);
|
||||
taskId = CreateTask(Task_ChoosePartyMon, 10);
|
||||
gTasks[taskId].data[0] = PARTY_MENU_TYPE_CHOOSE_SINGLE_MON;
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
@@ -26,12 +26,12 @@ void SelectMoveTutorMon(void)
|
||||
u8 taskId;
|
||||
|
||||
LockPlayerFieldControls();
|
||||
taskId = CreateTask(sub_80BF97C, 10);
|
||||
taskId = CreateTask(Task_ChoosePartyMon, 10);
|
||||
gTasks[taskId].data[0] = PARTY_MENU_TYPE_MOVE_RELEARNER;
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
|
||||
static void sub_80BF97C(u8 taskId)
|
||||
static void Task_ChoosePartyMon(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
|
||||
+4
-4
@@ -88,8 +88,8 @@ static const struct MenuAction sMenuActions_TopMenu[] = {
|
||||
{gText_TurnOff, Task_PlayerPcTurnOff}
|
||||
};
|
||||
|
||||
static const u8 gUnknown_8402200[] = { 0, 1, 2 };
|
||||
static const u8 gUnknown_8402203[] = { 0, 1, 2 };
|
||||
static const u8 sItemOrder_BedroomPC[] = { 0, 1, 2 };
|
||||
static const u8 sItemOrder_PlayerPC[] = { 0, 1, 2 };
|
||||
|
||||
static const struct MenuAction sMenuActions_ItemPc[] = {
|
||||
{gText_WithdrawItem2, Task_PlayerPcWithdrawItem},
|
||||
@@ -154,7 +154,7 @@ void BedroomPC(void)
|
||||
|
||||
gPlayerPcMenuManager.notInRoom = FALSE;
|
||||
BackupHelpContext();
|
||||
sItemOrder = gUnknown_8402200;
|
||||
sItemOrder = sItemOrder_BedroomPC;
|
||||
sTopMenuItemCount = 3;
|
||||
taskId = CreateTask(TaskDummy, 0);
|
||||
DisplayItemMessageOnField(taskId, FONT_2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu);
|
||||
@@ -166,7 +166,7 @@ void PlayerPC(void)
|
||||
|
||||
gPlayerPcMenuManager.notInRoom = TRUE;
|
||||
BackupHelpContext();
|
||||
sItemOrder = gUnknown_8402203;
|
||||
sItemOrder = sItemOrder_PlayerPC;
|
||||
sTopMenuItemCount = 3;
|
||||
taskId = CreateTask(TaskDummy, 0);
|
||||
DisplayItemMessageOnField(taskId, FONT_2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu);
|
||||
|
||||
@@ -601,7 +601,7 @@ static void Task_CleanUp(u8 taskId)
|
||||
static const struct {
|
||||
u16 itemId;
|
||||
u16 animType;
|
||||
} gUnknown_8459634[2] = {
|
||||
} sItemAnimMap[2] = {
|
||||
{ITEM_RARE_CANDY, 0},
|
||||
{ITEM_POTION, 1}
|
||||
};
|
||||
@@ -610,10 +610,10 @@ static u16 GetAnimTypeByItemId(u16 itemId)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NELEMS(gUnknown_8459634); i++)
|
||||
for (i = 0; i < ARRAY_COUNT(sItemAnimMap); i++)
|
||||
{
|
||||
if (gUnknown_8459634[i].itemId == itemId)
|
||||
return gUnknown_8459634[i].animType;
|
||||
if (sItemAnimMap[i].itemId == itemId)
|
||||
return sItemAnimMap[i].animType;
|
||||
}
|
||||
|
||||
if (itemId >= ITEM_TM01 && itemId <= ITEM_HM08)
|
||||
|
||||
+10
-9
@@ -86,15 +86,16 @@ static const u8 sUnionRoomLocalIds[] = {
|
||||
3
|
||||
};
|
||||
|
||||
static const u16 sUnref_8457128[] = {
|
||||
0x63,
|
||||
0x64,
|
||||
0x65,
|
||||
0x66,
|
||||
0x67,
|
||||
0x68,
|
||||
0x69,
|
||||
0x6A
|
||||
// Unused
|
||||
static const u16 sHidePlayerFlags[] = {
|
||||
FLAG_HIDE_UNION_ROOM_PLAYER_1,
|
||||
FLAG_HIDE_UNION_ROOM_PLAYER_2,
|
||||
FLAG_HIDE_UNION_ROOM_PLAYER_3,
|
||||
FLAG_HIDE_UNION_ROOM_PLAYER_4,
|
||||
FLAG_HIDE_UNION_ROOM_PLAYER_5,
|
||||
FLAG_HIDE_UNION_ROOM_PLAYER_6,
|
||||
FLAG_HIDE_UNION_ROOM_PLAYER_7,
|
||||
FLAG_HIDE_UNION_ROOM_PLAYER_8
|
||||
};
|
||||
|
||||
static bool32 is_walking_or_running(void)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
bool32 sIsInSaveFailedScreen;
|
||||
|
||||
static EWRAM_DATA u16 sSaveType = SAVE_NORMAL;
|
||||
static EWRAM_DATA u16 unused_203AB4E = 0;
|
||||
static EWRAM_DATA u16 sUnused = 0;
|
||||
static EWRAM_DATA u8 sSaveFailedScreenState = 0;
|
||||
|
||||
static void BlankPalettes(void);
|
||||
|
||||
+18
-16
@@ -7,7 +7,7 @@ static bool32 IsCurMapInLocationList(const u16 *list)
|
||||
s32 i;
|
||||
u16 locSum = (gSaveBlock1Ptr->location.mapGroup << 8) + (gSaveBlock1Ptr->location.mapNum);
|
||||
|
||||
for (i = 0; list[i] != 0xFFFF; i++)
|
||||
for (i = 0; list[i] != MAP_UNDEFINED; i++)
|
||||
{
|
||||
if (list[i] == locSum)
|
||||
return TRUE;
|
||||
@@ -40,7 +40,7 @@ static const u16 sSaveLocationPokeCenterList[] =
|
||||
MAP_TRADE_CENTER,
|
||||
MAP_BATTLE_COLOSSEUM_4P,
|
||||
MAP_UNION_ROOM,
|
||||
0xFFFF,
|
||||
MAP_UNDEFINED,
|
||||
};
|
||||
|
||||
bool32 IsCurMapPokeCenter(void)
|
||||
@@ -48,18 +48,19 @@ bool32 IsCurMapPokeCenter(void)
|
||||
return IsCurMapInLocationList(sSaveLocationPokeCenterList);
|
||||
}
|
||||
|
||||
static const u16 sSaveLocationReloadLocList[] = { 0xFFFF };
|
||||
static const u16 sSaveLocationReloadLocList[] = { MAP_UNDEFINED };
|
||||
|
||||
static bool32 IsCurMapReloadLocation(void)
|
||||
{
|
||||
return IsCurMapInLocationList(sSaveLocationReloadLocList);
|
||||
}
|
||||
|
||||
static const u16 sUnknown_8453094[] = { 0xFFFF };
|
||||
// Nulled out list. Unknown what this would have been.
|
||||
static const u16 sEmptyMapList[] = { MAP_UNDEFINED };
|
||||
|
||||
static bool32 sub_810B75C(void)
|
||||
static bool32 IsCurMapInEmptyList(void)
|
||||
{
|
||||
return IsCurMapInLocationList(sUnknown_8453094);
|
||||
return IsCurMapInLocationList(sEmptyMapList);
|
||||
}
|
||||
|
||||
static void TrySetPokeCenterWarpStatus(void)
|
||||
@@ -78,9 +79,10 @@ static void TrySetReloadWarpStatus(void)
|
||||
gSaveBlock2Ptr->specialSaveWarpFlags |= LOBBY_SAVEWARP;
|
||||
}
|
||||
|
||||
static void sub_810B7CC(void)
|
||||
// Unknown save warp flag. Never set because map list is empty.
|
||||
static void TrySetUnknownWarpStatus(void)
|
||||
{
|
||||
if (!sub_810B75C())
|
||||
if (!IsCurMapInEmptyList())
|
||||
gSaveBlock2Ptr->specialSaveWarpFlags &= ~(UNK_SPECIAL_SAVE_WARP_FLAG_3);
|
||||
else
|
||||
gSaveBlock2Ptr->specialSaveWarpFlags |= UNK_SPECIAL_SAVE_WARP_FLAG_3;
|
||||
@@ -90,21 +92,21 @@ void TrySetMapSaveWarpStatus(void)
|
||||
{
|
||||
TrySetPokeCenterWarpStatus();
|
||||
TrySetReloadWarpStatus();
|
||||
sub_810B7CC();
|
||||
TrySetUnknownWarpStatus();
|
||||
}
|
||||
|
||||
void SetUnlockedPokedexFlags(void)
|
||||
{
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= 0x1;
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= 0x10;
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= 0x20;
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= (1 << 0);
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= (1 << 4);
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= (1 << 5);
|
||||
}
|
||||
|
||||
void SetPostgameFlags(void)
|
||||
{
|
||||
gSaveBlock2Ptr->specialSaveWarpFlags |= CHAMPION_SAVEWARP;
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= 0x2;
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= 0x4;
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= 0x8;
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= 0x8000;
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= (1 << 1);
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= (1 << 2);
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= (1 << 3);
|
||||
gSaveBlock2Ptr->gcnLinkFlags |= (1 << 15);
|
||||
}
|
||||
|
||||
+4
-3
@@ -306,7 +306,7 @@ static const struct MenuAction sScriptMultiChoiceMenu_Eeveelutions[] = {
|
||||
};
|
||||
|
||||
static const struct MenuAction sScriptMultiChoiceMenu_BikeShop[] = {
|
||||
{ gText_Bicycle_1000000 },
|
||||
{ gText_Bicycle_Price },
|
||||
{ gText_NoThanks }
|
||||
};
|
||||
|
||||
@@ -853,7 +853,8 @@ bool8 ScriptMenu_YesNo(u8 unused, u8 stuff)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_809CE38(void)
|
||||
// Unused
|
||||
static bool8 IsScriptActive(void)
|
||||
{
|
||||
if (gSpecialVar_Result == SCR_MENU_UNSET)
|
||||
return FALSE;
|
||||
@@ -1002,7 +1003,7 @@ static void CreatePCMenuWindow(void)
|
||||
|
||||
void ScriptMenu_DisplayPCStartupPrompt(void)
|
||||
{
|
||||
sub_80F7768(0, TRUE);
|
||||
LoadMessageBoxAndFrameGfx(0, TRUE);
|
||||
AddTextPrinterParameterized2(0, FONT_2, Text_AccessWhichPC, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -620,7 +620,7 @@ void Field_AskSaveTheGame(void)
|
||||
static void PrintSaveTextWithFollowupFunc(const u8 *str, bool8 (*saveDialogCB)(void))
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, str);
|
||||
sub_80F7768(0, TRUE);
|
||||
LoadMessageBoxAndFrameGfx(0, TRUE);
|
||||
AddTextPrinterForMessage(TRUE);
|
||||
sSaveDialogIsPrinting = TRUE;
|
||||
sSaveDialogCB = saveDialogCB;
|
||||
|
||||
+1
-1
@@ -485,7 +485,7 @@ const u8 gText_FreshWater[] = _("FRESH WATER");
|
||||
const u8 gText_SodaPop[] = _("SODA POP");
|
||||
const u8 gText_Lemonade[] = _("LEMONADE");
|
||||
const u8 gText_Coins_2[] = _("COINS");
|
||||
const u8 gText_Bicycle_1000000[] = _("BICYCLE{CLEAR_TO 0x49}{FONT_0}¥1,000,000");
|
||||
const u8 gText_Bicycle_Price[] = _("BICYCLE{CLEAR_TO 0x49}{FONT_0}¥1,000,000");
|
||||
const u8 gText_NoThanks[] = _("NO THANKS");
|
||||
const u8 gText_Abra_180Coins[] = _("ABRA{CLEAR_TO 0x55}{FONT_0} 180 COINS");
|
||||
const u8 gText_Clefairy_500Coins[] = _("CLEFAIRY{CLEAR_TO 0x55}{FONT_0} 500 COINS");
|
||||
|
||||
+16
-16
@@ -80,7 +80,7 @@ static const u16 sTilesetAnims_CeladonCity_Fountain_Frame1[] = INCBIN_U16("data/
|
||||
static const u16 sTilesetAnims_CeladonCity_Fountain_Frame2[] = INCBIN_U16("data/tilesets/secondary/celadon_city/anim/fountain/2.4bpp");
|
||||
static const u16 sTilesetAnims_CeladonCity_Fountain_Frame3[] = INCBIN_U16("data/tilesets/secondary/celadon_city/anim/fountain/3.4bpp");
|
||||
static const u16 sTilesetAnims_CeladonCity_Fountain_Frame4[] = INCBIN_U16("data/tilesets/secondary/celadon_city/anim/fountain/4.4bpp");
|
||||
static const u16 gUnknown_83ABD94[16] = {};
|
||||
static const u16 sTilesetAnims_CeladonCity_Fountain_Empty[16] = {};
|
||||
|
||||
static const u16 *const sTilesetAnims_CeladonCity_Fountain[] = {
|
||||
sTilesetAnims_CeladonCity_Fountain_Frame0,
|
||||
@@ -94,7 +94,7 @@ static const u16 sTilesetAnims_SilphCo_Fountain_Frame0[] = INCBIN_U16("data/tile
|
||||
static const u16 sTilesetAnims_SilphCo_Fountain_Frame1[] = INCBIN_U16("data/tilesets/secondary/silph_co/anim/fountain/1.4bpp");
|
||||
static const u16 sTilesetAnims_SilphCo_Fountain_Frame2[] = INCBIN_U16("data/tilesets/secondary/silph_co/anim/fountain/2.4bpp");
|
||||
static const u16 sTilesetAnims_SilphCo_Fountain_Frame3[] = INCBIN_U16("data/tilesets/secondary/silph_co/anim/fountain/3.4bpp");
|
||||
static const u16 gUnknown_83AC1C8[16] = {};
|
||||
static const u16 sTilesetAnims_SilphCo_Fountain_Empty[16] = {};
|
||||
|
||||
static const u16 *const sTilesetAnims_SilphCo_Fountain[] = {
|
||||
sTilesetAnims_SilphCo_Fountain_Frame0,
|
||||
@@ -207,27 +207,27 @@ static void _InitSecondaryTilesetAnimation(void)
|
||||
|
||||
static void QueueAnimTiles_General_Flower(u16 timer)
|
||||
{
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_General_Flower[timer % NELEMS(sTilesetAnims_General_Flower)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(508)), 4 * TILE_SIZE_4BPP);
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_General_Flower[timer % ARRAY_COUNT(sTilesetAnims_General_Flower)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(508)), 4 * TILE_SIZE_4BPP);
|
||||
}
|
||||
|
||||
static void QueueAnimTiles_General_Water_Current_LandWatersEdge(u16 timer)
|
||||
{
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_General_Water_Current_LandWatersEdge[timer % NELEMS(sTilesetAnims_General_Water_Current_LandWatersEdge)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(416)), 48 * TILE_SIZE_4BPP);
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_General_Water_Current_LandWatersEdge[timer % ARRAY_COUNT(sTilesetAnims_General_Water_Current_LandWatersEdge)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(416)), 48 * TILE_SIZE_4BPP);
|
||||
}
|
||||
|
||||
static void QueueAnimTiles_General_SandWatersEdge(u16 timer)
|
||||
{
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_General_SandWatersEdge[timer % NELEMS(sTilesetAnims_General_SandWatersEdge)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(464)), 18 * TILE_SIZE_4BPP);
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_General_SandWatersEdge[timer % ARRAY_COUNT(sTilesetAnims_General_SandWatersEdge)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(464)), 18 * TILE_SIZE_4BPP);
|
||||
}
|
||||
|
||||
static void TilesetAnim_General(u16 timer)
|
||||
{
|
||||
if (timer % 8 == 0)
|
||||
QueueAnimTiles_General_SandWatersEdge(timer >> 3);
|
||||
QueueAnimTiles_General_SandWatersEdge(timer / 8);
|
||||
if (timer % 16 == 1)
|
||||
QueueAnimTiles_General_Water_Current_LandWatersEdge(timer >> 4);
|
||||
QueueAnimTiles_General_Water_Current_LandWatersEdge(timer / 16);
|
||||
if (timer % 16 == 2)
|
||||
QueueAnimTiles_General_Flower(timer >> 4);
|
||||
QueueAnimTiles_General_Flower(timer / 16);
|
||||
}
|
||||
|
||||
void InitTilesetAnim_General(void)
|
||||
@@ -239,7 +239,7 @@ void InitTilesetAnim_General(void)
|
||||
|
||||
static void QueueAnimTiles_CeladonCity_Fountain(u16 timer)
|
||||
{
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_CeladonCity_Fountain[timer % NELEMS(sTilesetAnims_CeladonCity_Fountain)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(744)), 8 * TILE_SIZE_4BPP);
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_CeladonCity_Fountain[timer % ARRAY_COUNT(sTilesetAnims_CeladonCity_Fountain)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(744)), 8 * TILE_SIZE_4BPP);
|
||||
}
|
||||
|
||||
static void TilesetAnim_CeladonCity(u16 timer)
|
||||
@@ -257,7 +257,7 @@ void InitTilesetAnim_CeladonCity(void)
|
||||
|
||||
static void QueueAnimTiles_SilphCo_Fountain(u16 timer)
|
||||
{
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_SilphCo_Fountain[timer % NELEMS(sTilesetAnims_SilphCo_Fountain)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(976)), 8 * TILE_SIZE_4BPP);
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_SilphCo_Fountain[timer % ARRAY_COUNT(sTilesetAnims_SilphCo_Fountain)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(976)), 8 * TILE_SIZE_4BPP);
|
||||
}
|
||||
|
||||
static void TilesetAnim_SilphCo(u16 timer)
|
||||
@@ -275,13 +275,13 @@ void InitTilesetAnim_SilphCo(void)
|
||||
|
||||
static void QueueAnimTiles_MtEmber_Steam(u16 timer)
|
||||
{
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_MtEmber_Steam[timer % NELEMS(sTilesetAnims_MtEmber_Steam)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(896)), 8 * TILE_SIZE_4BPP);
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_MtEmber_Steam[timer % ARRAY_COUNT(sTilesetAnims_MtEmber_Steam)], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(896)), 8 * TILE_SIZE_4BPP);
|
||||
}
|
||||
|
||||
static void TilesetAnim_MtEmber(u16 timer)
|
||||
{
|
||||
if (timer % 16 == 0)
|
||||
QueueAnimTiles_MtEmber_Steam(timer >> 4);
|
||||
QueueAnimTiles_MtEmber_Steam(timer / 16);
|
||||
}
|
||||
|
||||
void InitTilesetAnim_MtEmber(void)
|
||||
@@ -293,7 +293,7 @@ void InitTilesetAnim_MtEmber(void)
|
||||
|
||||
static void QueueAnimTiles_VermilionGym_MotorizedDoor(u16 timer)
|
||||
{
|
||||
u16 i = timer % NELEMS(sTilesetAnims_VermilionGym_MotorizedDoor);
|
||||
u16 i = timer % ARRAY_COUNT(sTilesetAnims_VermilionGym_MotorizedDoor);
|
||||
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_VermilionGym_MotorizedDoor[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(880)), 7 * TILE_SIZE_4BPP);
|
||||
}
|
||||
@@ -301,7 +301,7 @@ static void QueueAnimTiles_VermilionGym_MotorizedDoor(u16 timer)
|
||||
static void TilesetAnim_VermilionGym(u16 timer)
|
||||
{
|
||||
if (timer % 2 == 0)
|
||||
QueueAnimTiles_VermilionGym_MotorizedDoor(timer >> 1);
|
||||
QueueAnimTiles_VermilionGym_MotorizedDoor(timer / 2);
|
||||
}
|
||||
|
||||
void InitTilesetAnim_VermilionGym(void)
|
||||
@@ -313,7 +313,7 @@ void InitTilesetAnim_VermilionGym(void)
|
||||
|
||||
static void QueueAnimTiles_CeladonGym_Flowers(u16 timer)
|
||||
{
|
||||
u16 i = timer % NELEMS(sTilesetAnims_CeladonGym_Flowers);
|
||||
u16 i = timer % ARRAY_COUNT(sTilesetAnims_CeladonGym_Flowers);
|
||||
|
||||
AppendTilesetAnimToBuffer(sTilesetAnims_CeladonGym_Flowers[i], (u16 *)(BG_VRAM + TILE_OFFSET_4BPP(739)), 4 * TILE_SIZE_4BPP);
|
||||
}
|
||||
@@ -321,7 +321,7 @@ static void QueueAnimTiles_CeladonGym_Flowers(u16 timer)
|
||||
static void TilesetAnim_CeladonGym(u16 timer)
|
||||
{
|
||||
if (timer % 16 == 0)
|
||||
QueueAnimTiles_CeladonGym_Flowers(timer >> 4);
|
||||
QueueAnimTiles_CeladonGym_Flowers(timer / 16);
|
||||
}
|
||||
|
||||
void InitTilesetAnim_CeladonGym(void)
|
||||
|
||||
+21
-21
@@ -99,9 +99,9 @@ static void HandleGpuRegs(void);
|
||||
static void UpdateCardFlipRegs(u16 cardTop);
|
||||
static void ResetGpuRegs(void);
|
||||
static void TrainerCardNull(void);
|
||||
static void sub_8089C5C(void);
|
||||
static void sub_8089C80(void);
|
||||
static void sub_8089CA4(void);
|
||||
static void DmaClearOam(void);
|
||||
static void DmaClearPltt(void);
|
||||
static void ResetBgRegs(void);
|
||||
static void InitBgsAndWindows(void);
|
||||
static void SetTrainerCardCB2(void);
|
||||
static void SetUpTrainerCardTask(void);
|
||||
@@ -713,15 +713,15 @@ static void CB2_InitTrainerCard(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 2:
|
||||
sub_8089C5C();
|
||||
DmaClearOam();
|
||||
gMain.state++;
|
||||
break;
|
||||
case 3:
|
||||
sub_8089C80();
|
||||
DmaClearPltt();
|
||||
gMain.state++;
|
||||
// fallthrough
|
||||
case 4:
|
||||
sub_8089CA4();
|
||||
ResetBgRegs();
|
||||
gMain.state++;
|
||||
break;
|
||||
case 5:
|
||||
@@ -984,30 +984,30 @@ static void TrainerCardNull(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void sub_8089C5C(void)
|
||||
static void DmaClearOam(void)
|
||||
{
|
||||
DmaClear32(3, (void *)OAM, OAM_SIZE);
|
||||
}
|
||||
|
||||
static void sub_8089C80(void)
|
||||
static void DmaClearPltt(void)
|
||||
{
|
||||
DmaClear16(3, (void *)PLTT, PLTT_SIZE);
|
||||
}
|
||||
|
||||
static void sub_8089CA4(void)
|
||||
static void ResetBgRegs(void)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_BG0CNT, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG1CNT, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG2CNT, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG3CNT, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG2HOFS, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG2VOFS, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG3HOFS, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG3VOFS, DISPCNT_MODE_0);
|
||||
SetGpuReg(REG_OFFSET_BG0CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3CNT, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG2VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3VOFS, 0);
|
||||
}
|
||||
|
||||
static void InitBgsAndWindows(void)
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@ struct TrainerEncounterMusicPairs
|
||||
|
||||
static EWRAM_DATA struct TrainerTowerState * sTrainerTowerState = NULL;
|
||||
static EWRAM_DATA struct TrainerTowerOpponent * sTrainerTowerOpponent = NULL;
|
||||
static EWRAM_DATA u8 sUnused_203F460 = 0;
|
||||
static EWRAM_DATA u8 sUnused = 0;
|
||||
|
||||
static void SetUpTrainerTowerDataStruct(void);
|
||||
static void FreeTrainerTowerDataStruct(void);
|
||||
@@ -321,7 +321,7 @@ static const struct WindowTemplate sTimeBoardWindowTemplate[] = {
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const u32 sUnused_847A228 = 0x70;
|
||||
static const u32 sUnusedValue = 112;
|
||||
|
||||
static const u8 sTextColors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY};
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const u8 gUnknown_84571A8[] = {1, 2, 3};
|
||||
static const u8 sTextColors[] = {1, 2, 3};
|
||||
|
||||
static void SetUpPartiesAndStartBattle(void)
|
||||
{
|
||||
@@ -66,8 +66,8 @@ static void UnionRoomBattle_CreateTextPrinter(u8 windowId, const u8 * str, u8 x,
|
||||
{
|
||||
s32 letterSpacing = 1;
|
||||
s32 lineSpacing = 1;
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(gUnknown_84571A8[0]));
|
||||
AddTextPrinterParameterized4(windowId, FONT_3, x, y, letterSpacing, lineSpacing, gUnknown_84571A8, speed, str);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(sTextColors[0]));
|
||||
AddTextPrinterParameterized4(windowId, FONT_3, x, y, letterSpacing, lineSpacing, sTextColors, speed, str);
|
||||
}
|
||||
|
||||
static bool32 UnionRoomBattle_PrintTextOnWindow0(s16 * state, const u8 * str, s32 speed)
|
||||
|
||||
@@ -123,7 +123,7 @@ static const u16 sUnionRoomChatPanelBgPal_C[] = INCBIN_U16("graphics/union_room_
|
||||
static const u16 sBg1Pal8[] = INCBIN_U16("graphics/union_room_chat/unk_845AA44.gbapal");
|
||||
static const u16 sWin0PalF[] = INCBIN_U16("graphics/union_room_chat/unk_845AA64.gbapal");
|
||||
|
||||
static const struct BgTemplate gUnknown_845AA84[] = {
|
||||
static const struct BgTemplate sBgTemplates[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.charBaseIndex = 0,
|
||||
@@ -159,7 +159,7 @@ static const struct BgTemplate gUnknown_845AA84[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_845AA94[] = {
|
||||
static const struct WindowTemplate sWindowTemplates[] = {
|
||||
{
|
||||
.bg = 3,
|
||||
.tilemapLeft = 8,
|
||||
@@ -349,8 +349,8 @@ bool8 UnionRoomChat_TryAllocGraphicsWork(void)
|
||||
if (sWork && UnionRoomChat_TryAllocSpriteWork())
|
||||
{
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gUnknown_845AA84, NELEMS(gUnknown_845AA84));
|
||||
InitWindows(gUnknown_845AA94);
|
||||
InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates));
|
||||
InitWindows(sWindowTemplates);
|
||||
ResetTempTileDataBuffers();
|
||||
InitScanlineEffect();
|
||||
InitWork(sWork);
|
||||
|
||||
@@ -558,15 +558,15 @@ const u8 *const gTexts_UR_GladToMeetYou[GENDER_COUNT] = {
|
||||
ALIGNED(4) const u8 gText_UR_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {SPECIAL_F7 0x01}'s\nTRAINER CARD.{PAUSE 60}");
|
||||
ALIGNED(4) static const u8 sText_CanceledReadingCard[] = _("Canceled reading the Card.");
|
||||
|
||||
const struct mevent_client_cmd gUnknown_84595CC[] = {
|
||||
static const struct mevent_client_cmd sClientScript_DynamicError[] = {
|
||||
CLI_RECEIVE(0x15),
|
||||
CLI_RECVBUF,
|
||||
CLI_SENDALL,
|
||||
CLI_RETURN(0x0e)
|
||||
};
|
||||
|
||||
const struct mevent_server_cmd gMEventSrvScript_OtherTrainerCanceled[] = {
|
||||
SRV_SEND(0x20, gUnknown_84595CC),
|
||||
const struct mevent_server_cmd gServerScript_ClientCanceledCard[] = {
|
||||
SRV_SEND(0x20, sClientScript_DynamicError),
|
||||
SRV_WAITSND,
|
||||
SRV_SENDSTR(0x1b, sText_CanceledReadingCard),
|
||||
SRV_WAITSND,
|
||||
|
||||
Reference in New Issue
Block a user