summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/battle_dome.c4
-rwxr-xr-xsrc/berry_crush.c8
-rw-r--r--src/berry_tag_screen.c2
-rw-r--r--src/bike.c26
-rw-r--r--src/data/graphics/berries.h10
-rw-r--r--src/data/graphics/interface_pokeballs.h37
-rw-r--r--src/data/graphics/pokeballs.h37
-rw-r--r--src/data/party_menu.h36
-rw-r--r--src/decoration.c2
-rw-r--r--src/diploma.c8
-rw-r--r--src/field_control_avatar.c2
-rw-r--r--src/field_effect.c41
-rw-r--r--src/field_player_avatar.c2
-rw-r--r--src/field_specials.c22
-rw-r--r--src/field_tasks.c2
-rw-r--r--src/fldeff_flash.c12
-rw-r--r--src/graphics.c114
-rwxr-xr-xsrc/item_menu.c2
-rw-r--r--src/item_menu_icons.c8
-rw-r--r--src/link.c12
-rw-r--r--src/link_rfu_3.c4
-rw-r--r--src/m4a_1.s26
-rw-r--r--src/main_menu.c4
-rw-r--r--src/map_name_popup.c38
-rw-r--r--src/menu_helpers.c4
-rw-r--r--src/minigame_countdown.c8
-rw-r--r--src/mon_markings.c4
-rw-r--r--src/money.c6
-rw-r--r--src/option_menu.c4
-rw-r--r--src/pokeball.c60
-rw-r--r--src/pokemon.c89
-rw-r--r--src/pokemon_summary_screen.c33
-rw-r--r--src/region_map.c37
-rw-r--r--src/rotating_gate.c28
-rw-r--r--src/scrcmd.c12
-rwxr-xr-xsrc/shop.c6
-rw-r--r--src/starter_choose.c18
-rw-r--r--src/trainer_hill.c2
-rw-r--r--src/trainer_see.c6
-rw-r--r--src/wallclock.c84
-rw-r--r--src/wireless_communication_status_screen.c6
41 files changed, 445 insertions, 421 deletions
diff --git a/src/battle_dome.c b/src/battle_dome.c
index 2f77491c9..aadd85afd 100644
--- a/src/battle_dome.c
+++ b/src/battle_dome.c
@@ -5304,10 +5304,10 @@ static void Task_ShowTourneyTree(u8 taskId)
break;
case 2:
sTilemapBuffer = AllocZeroed(BG_SCREEN_SIZE);
- LZDecompressWram(gDomeTourneyLineMask_Tilemap, sTilemapBuffer);
+ LZDecompressWram(gDomeTourneyTree_Tilemap, sTilemapBuffer);
SetBgTilemapBuffer(1, sTilemapBuffer);
CopyBgTilemapBufferToVram(1);
- DecompressAndLoadBgGfxUsingHeap(1, gDomeTourneyBg_Gfx, 0x2000, 0, 0);
+ DecompressAndLoadBgGfxUsingHeap(1, gDomeTourneyTree_Gfx, 0x2000, 0, 0);
DecompressAndLoadBgGfxUsingHeap(2, gDomeTourneyLine_Gfx, 0x2000, 0, 0);
DecompressAndLoadBgGfxUsingHeap(2, gDomeTourneyLineDown_Tilemap, 0x2000, 0, 1);
DecompressAndLoadBgGfxUsingHeap(3, gDomeTourneyLineUp_Tilemap, 0x2000, 0, 1);
diff --git a/src/berry_crush.c b/src/berry_crush.c
index 9b8323e2d..e7a5df951 100755
--- a/src/berry_crush.c
+++ b/src/berry_crush.c
@@ -1947,15 +1947,15 @@ static void DrawPlayerNameWindows(struct BerryCrushGame *game)
static void CopyPlayerNameWindowGfxToBg(struct BerryCrushGame *game)
{
u8 i = 0;
- u8 * crusherGfx;
+ u8 * windowGfx;
- LZ77UnCompWram(gBerryCrush_Crusher_Tilemap, gDecompressionBuffer);
+ LZ77UnCompWram(gBerryCrush_TextWindows_Tilemap, gDecompressionBuffer);
- for (crusherGfx = gDecompressionBuffer; i < game->playerCount; i++)
+ for (windowGfx = gDecompressionBuffer; i < game->playerCount; i++)
{
CopyToBgTilemapBufferRect(
3,
- &crusherGfx[game->gfx.playerCoords[i]->playerId * 40],
+ &windowGfx[game->gfx.playerCoords[i]->playerId * 40],
game->gfx.playerCoords[i]->windowGfxX,
game->gfx.playerCoords[i]->windowGfxY,
10,
diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c
index 92b1f65d1..219454ab2 100644
--- a/src/berry_tag_screen.c
+++ b/src/berry_tag_screen.c
@@ -92,7 +92,7 @@ static const struct BgTemplate sBackgroundTemplates[] =
}
};
-static const u16 sFontPalette[] = INCBIN_U16("graphics/interface/berry_tag_screen.gbapal");
+static const u16 sFontPalette[] = INCBIN_U16("graphics/bag/berry_tag_screen.gbapal");
static const u8 sTextColors[2][3] =
{
diff --git a/src/bike.c b/src/bike.c
index f1a95d7ed..ae30ce288 100644
--- a/src/bike.c
+++ b/src/bike.c
@@ -108,7 +108,7 @@ static u8 (*const sAcroBikeInputHandlers[])(u8 *, u16, u16) =
};
// used with bikeFrameCounter from mach bike
-static const u16 sMachBikeSpeeds[] = {BIKE_SPEED_NORMAL, BIKE_SPEED_FAST, BIKE_SPEED_FASTEST};
+static const u16 sMachBikeSpeeds[] = {PLAYER_SPEED_NORMAL, PLAYER_SPEED_FAST, PLAYER_SPEED_FASTEST};
// this is a list of timers to compare against later, terminated with 0. the only timer being compared against is 4 frames in this list.
static const u8 sAcroBikeJumpTimerList[] = {4, 0};
@@ -147,7 +147,7 @@ static u8 GetMachBikeTransition(u8 *dirTraveling)
if (*dirTraveling == 0)
{
*dirTraveling = direction; // update the direction, since below we either faced a direction or we started moving.
- if (gPlayerAvatar.bikeSpeed == BIKE_SPEED_STANDING)
+ if (gPlayerAvatar.bikeSpeed == PLAYER_SPEED_STANDING)
{
gPlayerAvatar.runningState = NOT_MOVING;
return MACH_TRANS_FACE_DIRECTION;
@@ -159,7 +159,7 @@ static u8 GetMachBikeTransition(u8 *dirTraveling)
// we need to check if the last traveled direction changed from the new direction as well as ensuring that we dont update the state while the player is moving: see the else check.
if (*dirTraveling != direction && gPlayerAvatar.runningState != MOVING)
{
- if (gPlayerAvatar.bikeSpeed != BIKE_SPEED_STANDING)
+ if (gPlayerAvatar.bikeSpeed != PLAYER_SPEED_STANDING)
{
*dirTraveling = direction; // implement the new direction
gPlayerAvatar.runningState = MOVING;
@@ -246,7 +246,7 @@ static void MachBikeTransition_TrySlowDown(u8 direction)
{
u8 collision;
- if (gPlayerAvatar.bikeSpeed != BIKE_SPEED_STANDING)
+ if (gPlayerAvatar.bikeSpeed != PLAYER_SPEED_STANDING)
gPlayerAvatar.bikeFrameCounter = --gPlayerAvatar.bikeSpeed;
collision = GetBikeCollision(direction);
@@ -306,7 +306,7 @@ static u8 AcroBikeHandleInputNormal(u8 *newDirection, u16 newKeys, u16 heldKeys)
return ACRO_TRANS_FACE_DIRECTION;
}
}
- if (*newDirection == direction && (heldKeys & B_BUTTON) && gPlayerAvatar.bikeSpeed == BIKE_SPEED_STANDING)
+ if (*newDirection == direction && (heldKeys & B_BUTTON) && gPlayerAvatar.bikeSpeed == PLAYER_SPEED_STANDING)
{
gPlayerAvatar.bikeSpeed++;
gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_MOVING;
@@ -342,7 +342,7 @@ static u8 AcroBikeHandleInputTurning(u8 *newDirection, u16 newKeys, u16 heldKeys
if (*newDirection == AcroBike_GetJumpDirection())
{
Bike_SetBikeStill(); // Bike_SetBikeStill sets speed to standing, but the next line immediately overrides it. could have just reset acroBikeState to 0 here instead of wasting a jump.
- gPlayerAvatar.bikeSpeed = BIKE_SPEED_NORMAL;
+ gPlayerAvatar.bikeSpeed = PLAYER_SPEED_NORMAL;
if (*newDirection == GetOppositeDirection(direction))
{
// do a turn jump.
@@ -775,7 +775,7 @@ static void AcroBike_TryHistoryUpdate(u16 newKeys, u16 heldKeys) // newKeys is u
else
{
Bike_UpdateDirTimerHistory(direction);
- gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING;
+ gPlayerAvatar.bikeSpeed = PLAYER_SPEED_STANDING;
}
direction = heldKeys & (A_BUTTON | B_BUTTON | SELECT_BUTTON | START_BUTTON); // directions is reused for some reason.
@@ -787,7 +787,7 @@ static void AcroBike_TryHistoryUpdate(u16 newKeys, u16 heldKeys) // newKeys is u
else
{
Bike_UpdateABStartSelectHistory(direction);
- gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING;
+ gPlayerAvatar.bikeSpeed = PLAYER_SPEED_STANDING;
}
}
@@ -994,7 +994,7 @@ void BikeClearState(int newDirHistory, int newAbStartHistory)
gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
gPlayerAvatar.newDirBackup = DIR_NONE;
gPlayerAvatar.bikeFrameCounter = 0;
- gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING;
+ gPlayerAvatar.bikeSpeed = PLAYER_SPEED_STANDING;
gPlayerAvatar.directionHistory = newDirHistory;
gPlayerAvatar.abStartSelectHistory = newAbStartHistory;
@@ -1014,7 +1014,7 @@ void Bike_UpdateBikeCounterSpeed(u8 counter)
static void Bike_SetBikeStill(void)
{
gPlayerAvatar.bikeFrameCounter = 0;
- gPlayerAvatar.bikeSpeed = BIKE_SPEED_STANDING;
+ gPlayerAvatar.bikeSpeed = PLAYER_SPEED_STANDING;
}
s16 GetPlayerSpeed(void)
@@ -1027,11 +1027,11 @@ s16 GetPlayerSpeed(void)
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_MACH_BIKE)
return machSpeeds[gPlayerAvatar.bikeFrameCounter];
else if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_ACRO_BIKE)
- return BIKE_SPEED_FASTER;
+ return PLAYER_SPEED_FASTER;
else if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_SURFING | PLAYER_AVATAR_FLAG_DASH))
- return BIKE_SPEED_FAST;
+ return PLAYER_SPEED_FAST;
else
- return BIKE_SPEED_NORMAL;
+ return PLAYER_SPEED_NORMAL;
}
void Bike_HandleBumpySlopeJump(void)
diff --git a/src/data/graphics/berries.h b/src/data/graphics/berries.h
index eb3f9f4dc..e33384a84 100644
--- a/src/data/graphics/berries.h
+++ b/src/data/graphics/berries.h
@@ -1,10 +1,10 @@
-const u32 gBerryCheck_Gfx[] = INCBIN_U32("graphics/interface/check_berry.4bpp.lz");
-const u32 gBerryCheck_Pal[] = INCBIN_U32("graphics/interface/check_berry.gbapal.lz");
+const u32 gBerryCheck_Gfx[] = INCBIN_U32("graphics/bag/check_berry.4bpp.lz");
+const u32 gBerryCheck_Pal[] = INCBIN_U32("graphics/bag/check_berry.gbapal.lz");
-const u32 gBerryTag_Gfx[] = INCBIN_U32("graphics/interface/berry_tag.bin.lz");
-const u32 gBerryTag_Pal[] = INCBIN_U32("graphics/interface/berry_tag_title.bin.lz");
+const u32 gBerryTag_Gfx[] = INCBIN_U32("graphics/bag/berry_tag.bin.lz");
+const u32 gBerryTag_Pal[] = INCBIN_U32("graphics/bag/berry_tag_title.bin.lz");
-const u32 gBerryCheckCircle_Gfx[] = INCBIN_U32("graphics/interface/check_berry_circle.4bpp.lz");
+const u32 gBerryCheckCircle_Gfx[] = INCBIN_U32("graphics/bag/check_berry_circle.4bpp.lz");
const u32 gBerryPic_Cheri[] = INCBIN_U32("graphics/berries/cheri.4bpp.lz");
const u32 gBerryPic_Oran[] = INCBIN_U32("graphics/berries/oran.4bpp.lz");
diff --git a/src/data/graphics/interface_pokeballs.h b/src/data/graphics/interface_pokeballs.h
deleted file mode 100644
index fe9a4e5be..000000000
--- a/src/data/graphics/interface_pokeballs.h
+++ /dev/null
@@ -1,37 +0,0 @@
-const u32 gInterfaceGfx_PokeBall[] = INCBIN_U32("graphics/interface/ball/poke.4bpp.lz");
-const u32 gInterfacePal_PokeBall[] = INCBIN_U32("graphics/interface/ball/poke.gbapal.lz");
-
-const u32 gInterfaceGfx_GreatBall[] = INCBIN_U32("graphics/interface/ball/great.4bpp.lz");
-const u32 gInterfacePal_GreatBall[] = INCBIN_U32("graphics/interface/ball/great.gbapal.lz");
-
-const u32 gInterfaceGfx_SafariBall[] = INCBIN_U32("graphics/interface/ball/safari.4bpp.lz");
-const u32 gInterfacePal_SafariBall[] = INCBIN_U32("graphics/interface/ball/safari.gbapal.lz");
-
-const u32 gInterfaceGfx_UltraBall[] = INCBIN_U32("graphics/interface/ball/ultra.4bpp.lz");
-const u32 gInterfacePal_UltraBall[] = INCBIN_U32("graphics/interface/ball/ultra.gbapal.lz");
-
-const u32 gInterfaceGfx_MasterBall[] = INCBIN_U32("graphics/interface/ball/master.4bpp.lz");
-const u32 gInterfacePal_MasterBall[] = INCBIN_U32("graphics/interface/ball/master.gbapal.lz");
-
-const u32 gInterfaceGfx_NetBall[] = INCBIN_U32("graphics/interface/ball/net.4bpp.lz");
-const u32 gInterfacePal_NetBall[] = INCBIN_U32("graphics/interface/ball/net.gbapal.lz");
-
-const u32 gInterfaceGfx_DiveBall[] = INCBIN_U32("graphics/interface/ball/dive.4bpp.lz");
-const u32 gInterfacePal_DiveBall[] = INCBIN_U32("graphics/interface/ball/dive.gbapal.lz");
-
-const u32 gInterfaceGfx_NestBall[] = INCBIN_U32("graphics/interface/ball/nest.4bpp.lz");
-const u32 gInterfacePal_NestBall[] = INCBIN_U32("graphics/interface/ball/nest.gbapal.lz");
-
-const u32 gInterfaceGfx_RepeatBall[] = INCBIN_U32("graphics/interface/ball/repeat.4bpp.lz");
-const u32 gInterfacePal_RepeatBall[] = INCBIN_U32("graphics/interface/ball/repeat.gbapal.lz");
-
-const u32 gInterfaceGfx_TimerBall[] = INCBIN_U32("graphics/interface/ball/timer.4bpp.lz");
-const u32 gInterfacePal_TimerBall[] = INCBIN_U32("graphics/interface/ball/timer.gbapal.lz");
-
-const u32 gInterfaceGfx_LuxuryBall[] = INCBIN_U32("graphics/interface/ball/luxury.4bpp.lz");
-const u32 gInterfacePal_LuxuryBall[] = INCBIN_U32("graphics/interface/ball/luxury.gbapal.lz");
-
-const u32 gInterfaceGfx_PremierBall[] = INCBIN_U32("graphics/interface/ball/premier.4bpp.lz");
-const u32 gInterfacePal_PremierBall[] = INCBIN_U32("graphics/interface/ball/premier.gbapal.lz");
-
-const u32 gOpenPokeballGfx[] = INCBIN_U32("graphics/interface/ball_open.4bpp.lz");
diff --git a/src/data/graphics/pokeballs.h b/src/data/graphics/pokeballs.h
new file mode 100644
index 000000000..8203fca53
--- /dev/null
+++ b/src/data/graphics/pokeballs.h
@@ -0,0 +1,37 @@
+const u32 gBallGfx_Poke[] = INCBIN_U32("graphics/balls/poke.4bpp.lz");
+const u32 gBallPal_Poke[] = INCBIN_U32("graphics/balls/poke.gbapal.lz");
+
+const u32 gBallGfx_Great[] = INCBIN_U32("graphics/balls/great.4bpp.lz");
+const u32 gBallPal_Great[] = INCBIN_U32("graphics/balls/great.gbapal.lz");
+
+const u32 gBallGfx_Safari[] = INCBIN_U32("graphics/balls/safari.4bpp.lz");
+const u32 gBallPal_Safari[] = INCBIN_U32("graphics/balls/safari.gbapal.lz");
+
+const u32 gBallGfx_Ultra[] = INCBIN_U32("graphics/balls/ultra.4bpp.lz");
+const u32 gBallPal_Ultra[] = INCBIN_U32("graphics/balls/ultra.gbapal.lz");
+
+const u32 gBallGfx_Master[] = INCBIN_U32("graphics/balls/master.4bpp.lz");
+const u32 gBallPal_Master[] = INCBIN_U32("graphics/balls/master.gbapal.lz");
+
+const u32 gBallGfx_Net[] = INCBIN_U32("graphics/balls/net.4bpp.lz");
+const u32 gBallPal_Net[] = INCBIN_U32("graphics/balls/net.gbapal.lz");
+
+const u32 gBallGfx_Dive[] = INCBIN_U32("graphics/balls/dive.4bpp.lz");
+const u32 gBallPal_Dive[] = INCBIN_U32("graphics/balls/dive.gbapal.lz");
+
+const u32 gBallGfx_Nest[] = INCBIN_U32("graphics/balls/nest.4bpp.lz");
+const u32 gBallPal_Nest[] = INCBIN_U32("graphics/balls/nest.gbapal.lz");
+
+const u32 gBallGfx_Repeat[] = INCBIN_U32("graphics/balls/repeat.4bpp.lz");
+const u32 gBallPal_Repeat[] = INCBIN_U32("graphics/balls/repeat.gbapal.lz");
+
+const u32 gBallGfx_Timer[] = INCBIN_U32("graphics/balls/timer.4bpp.lz");
+const u32 gBallPal_Timer[] = INCBIN_U32("graphics/balls/timer.gbapal.lz");
+
+const u32 gBallGfx_Luxury[] = INCBIN_U32("graphics/balls/luxury.4bpp.lz");
+const u32 gBallPal_Luxury[] = INCBIN_U32("graphics/balls/luxury.gbapal.lz");
+
+const u32 gBallGfx_Premier[] = INCBIN_U32("graphics/balls/premier.4bpp.lz");
+const u32 gBallPal_Premier[] = INCBIN_U32("graphics/balls/premier.gbapal.lz");
+
+const u32 gOpenPokeballGfx[] = INCBIN_U32("graphics/balls/open.4bpp.lz");
diff --git a/src/data/party_menu.h b/src/data/party_menu.h
index f3a8a50ec..f8093a9b6 100644
--- a/src/data/party_menu.h
+++ b/src/data/party_menu.h
@@ -1,3 +1,9 @@
+enum {
+ TAG_POKEBALL = 1200,
+ TAG_POKEBALL_SMALL,
+ TAG_STATUS_ICONS,
+};
+
static const struct BgTemplate sPartyMenuBgTemplates[] =
{
{
@@ -112,8 +118,8 @@ static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] =
};
// Used only when both Cancel and Confirm are present
-static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_confirm_button.bin");
-static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_cancel_button.bin");
+static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/party_menu/confirm_button.bin");
+static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/party_menu/cancel_button.bin");
// Text colors for BG, FG, and Shadow in that order
static const u8 sFontColorTable[][3] =
@@ -873,8 +879,8 @@ static const u8 *const sUnionRoomTradeMessages[] =
[UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2 - 1] = gText_CantTradeWithTrainer,
};
-static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/interface/hold_icons.4bpp");
-static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/interface/hold_icons.gbapal");
+static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/party_menu/hold_icons.4bpp");
+static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/party_menu/hold_icons.gbapal");
static const struct OamData sOamData_HeldItem =
{
@@ -969,19 +975,19 @@ static const union AnimCmd *const sSpriteAnimTable_MenuPokeball[] =
static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeball =
{
- gPartyMenuPokeball_Gfx, 0x400, 0x04b0
+ gPartyMenuPokeball_Gfx, 0x400, TAG_POKEBALL
};
static const struct CompressedSpritePalette sSpritePalette_MenuPokeball =
{
- gPartyMenuPokeball_Pal, 0x04b0
+ gPartyMenuPokeball_Pal, TAG_POKEBALL
};
// Used for the pokeball sprite on each party slot / Cancel button
static const struct SpriteTemplate sSpriteTemplate_MenuPokeball =
{
- .tileTag = 0x04b0,
- .paletteTag = 0x04b0,
+ .tileTag = TAG_POKEBALL,
+ .paletteTag = TAG_POKEBALL,
.oam = &sOamData_MenuPokeball,
.anims = sSpriteAnimTable_MenuPokeball,
.images = NULL,
@@ -1055,14 +1061,14 @@ static const union AnimCmd *const sSpriteAnimTable_MenuPokeballSmall[] =
static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeballSmall =
{
- gPartyMenuPokeballSmall_Gfx, 0x0300, 0x04b1
+ gPartyMenuPokeballSmall_Gfx, 0x0300, TAG_POKEBALL_SMALL
};
// Used for the pokeball sprite next to Cancel and Confirm when both are present, otherwise sSpriteTemplate_MenuPokeball is used
static const struct SpriteTemplate sSpriteTemplate_MenuPokeballSmall =
{
- .tileTag = 1201,
- .paletteTag = 1200,
+ .tileTag = TAG_POKEBALL_SMALL,
+ .paletteTag = TAG_POKEBALL,
.oam = &sOamData_MenuPokeballSmall,
.anims = sSpriteAnimTable_MenuPokeballSmall,
.images = NULL,
@@ -1149,18 +1155,18 @@ static const union AnimCmd *const sSpriteTemplate_StatusCondition[] =
static const struct CompressedSpriteSheet sSpriteSheet_StatusIcons =
{
- gStatusGfx_Icons, 0x400, 1202
+ gStatusGfx_Icons, 0x400, TAG_STATUS_ICONS
};
static const struct CompressedSpritePalette sSpritePalette_StatusIcons =
{
- gStatusPal_Icons, 1202
+ gStatusPal_Icons, TAG_STATUS_ICONS
};
static const struct SpriteTemplate sSpriteTemplate_StatusIcons =
{
- .tileTag = 1202,
- .paletteTag = 1202,
+ .tileTag = TAG_STATUS_ICONS,
+ .paletteTag = TAG_STATUS_ICONS,
.oam = &sOamData_StatusCondition,
.anims = sSpriteTemplate_StatusCondition,
.images = NULL,
diff --git a/src/decoration.c b/src/decoration.c
index 7538e85b5..7e102251a 100644
--- a/src/decoration.c
+++ b/src/decoration.c
@@ -440,7 +440,7 @@ static const struct YesNoFuncTable sStopPuttingAwayDecorationsYesNoFunctions =
.noFunc = ContinuePuttingAwayDecorations,
};
-static const u8 sDecorationPuttingAwayCursor[] = INCBIN_U8("graphics/misc/decoration_putting_away_cursor.4bpp");
+static const u8 sDecorationPuttingAwayCursor[] = INCBIN_U8("graphics/decorations/put_away_cursor.4bpp");
static const struct SpritePalette sSpritePal_PuttingAwayCursorBrendan =
{
diff --git a/src/diploma.c b/src/diploma.c
index 76b4ae65c..ce31578dc 100644
--- a/src/diploma.c
+++ b/src/diploma.c
@@ -40,12 +40,12 @@ static void VBlankCB(void)
static const u16 sDiplomaPalettes[][16] =
{
- INCBIN_U16("graphics/misc/diploma_national.gbapal"),
- INCBIN_U16("graphics/misc/diploma_hoenn.gbapal"),
+ INCBIN_U16("graphics/diploma/national.gbapal"),
+ INCBIN_U16("graphics/diploma/hoenn.gbapal"),
};
-static const u32 sDiplomaTilemap[] = INCBIN_U32("graphics/misc/diploma_map.bin.lz");
-static const u32 sDiplomaTiles[] = INCBIN_U32("graphics/misc/diploma.4bpp.lz");
+static const u32 sDiplomaTilemap[] = INCBIN_U32("graphics/diploma/tilemap.bin.lz");
+static const u32 sDiplomaTiles[] = INCBIN_U32("graphics/diploma/tiles.4bpp.lz");
void CB2_ShowDiploma(void)
{
diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c
index 490b152ce..cdb0db6d1 100644
--- a/src/field_control_avatar.c
+++ b/src/field_control_avatar.c
@@ -94,7 +94,7 @@ void FieldGetPlayerInput(struct FieldInput *input, u16 newKeys, u16 heldKeys)
if ((tileTransitionState == T_TILE_CENTER && forcedMove == FALSE) || tileTransitionState == T_NOT_MOVING)
{
- if (GetPlayerSpeed() != 4)
+ if (GetPlayerSpeed() != PLAYER_SPEED_FASTEST)
{
if (newKeys & START_BUTTON)
input->pressedStartButton = TRUE;
diff --git a/src/field_effect.c b/src/field_effect.c
index 3f0ba2455..f57ce8cdd 100644
--- a/src/field_effect.c
+++ b/src/field_effect.c
@@ -243,32 +243,33 @@ extern u8 *gFieldEffectScriptPointers[];
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
static const u32 sNewGameBirch_Gfx[] = INCBIN_U32("graphics/birch_speech/birch.4bpp");
-static const u32 sUnusedBirchBeauty[] = INCBIN_U32("graphics/unused/intro_birch_beauty.4bpp");
+static const u32 sUnusedBirchBeauty[] = INCBIN_U32("graphics/birch_speech/unused_beauty.4bpp");
static const u16 sNewGameBirch_Pal[16] = INCBIN_U16("graphics/birch_speech/birch.gbapal");
-static const u32 sPokeballGlow_Gfx[] = INCBIN_U32("graphics/misc/pokeball_glow.4bpp");
+
+static const u32 sPokeballGlow_Gfx[] = INCBIN_U32("graphics/field_effects/pics/pokeball_glow.4bpp");
static const u16 sPokeballGlow_Pal[16] = INCBIN_U16("graphics/field_effects/palettes/pokeball_glow.gbapal");
-static const u32 sPokecenterMonitor0_Gfx[] = INCBIN_U32("graphics/misc/pokecenter_monitor/0.4bpp");
-static const u32 sPokecenterMonitor1_Gfx[] = INCBIN_U32("graphics/misc/pokecenter_monitor/1.4bpp");
-static const u32 sHofMonitorBig_Gfx[] = INCBIN_U32("graphics/misc/hof_monitor_big.4bpp");
-static const u8 sHofMonitorSmall_Gfx[] = INCBIN_U8("graphics/misc/hof_monitor_small.4bpp");
+static const u32 sPokecenterMonitor0_Gfx[] = INCBIN_U32("graphics/field_effects/pics/pokecenter_monitor/0.4bpp");
+static const u32 sPokecenterMonitor1_Gfx[] = INCBIN_U32("graphics/field_effects/pics/pokecenter_monitor/1.4bpp");
+static const u32 sHofMonitorBig_Gfx[] = INCBIN_U32("graphics/field_effects/pics/hof_monitor_big.4bpp");
+static const u8 sHofMonitorSmall_Gfx[] = INCBIN_U8("graphics/field_effects/pics/hof_monitor_small.4bpp");
static const u16 sHofMonitor_Pal[16] = INCBIN_U16("graphics/field_effects/palettes/hof_monitor.gbapal");
// Graphics for the lights streaking past your Pokemon when it uses a field move.
-static const u32 sFieldMoveStreaksOutdoors_Gfx[] = INCBIN_U32("graphics/misc/field_move_streaks.4bpp");
-static const u16 sFieldMoveStreaksOutdoors_Pal[16] = INCBIN_U16("graphics/misc/field_move_streaks.gbapal");
-static const u16 sFieldMoveStreaksOutdoors_Tilemap[320] = INCBIN_U16("graphics/misc/field_move_streaks_map.bin");
+static const u32 sFieldMoveStreaksOutdoors_Gfx[] = INCBIN_U32("graphics/field_effects/pics/field_move_streaks.4bpp");
+static const u16 sFieldMoveStreaksOutdoors_Pal[16] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks.gbapal");
+static const u16 sFieldMoveStreaksOutdoors_Tilemap[320] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks.bin");
// The following light streaks effect is used when the map is indoors
-static const u32 sFieldMoveStreaksIndoors_Gfx[] = INCBIN_U32("graphics/misc/darkness_field_move_streaks.4bpp");
-static const u16 sFieldMoveStreaksIndoors_Pal[16] = INCBIN_U16("graphics/misc/darkness_field_move_streaks.gbapal");
-static const u16 sFieldMoveStreaksIndoors_Tilemap[320] = INCBIN_U16("graphics/misc/darkness_field_move_streaks_map.bin");
+static const u32 sFieldMoveStreaksIndoors_Gfx[] = INCBIN_U32("graphics/field_effects/pics/field_move_streaks_indoors.4bpp");
+static const u16 sFieldMoveStreaksIndoors_Pal[16] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks_indoors.gbapal");
+static const u16 sFieldMoveStreaksIndoors_Tilemap[320] = INCBIN_U16("graphics/field_effects/pics/field_move_streaks_indoors.bin");
-static const u16 sSpotlight_Pal[16] = INCBIN_U16("graphics/misc/spotlight.gbapal");
-static const u8 sSpotlight_Gfx[] = INCBIN_U8("graphics/misc/spotlight.4bpp");
-static const u8 sRockFragment_TopLeft[] = INCBIN_U8("graphics/misc/deoxys_rock_fragment_top_left.4bpp");
-static const u8 sRockFragment_TopRight[] = INCBIN_U8("graphics/misc/deoxys_rock_fragment_top_right.4bpp");
-static const u8 sRockFragment_BottomLeft[] = INCBIN_U8("graphics/misc/deoxys_rock_fragment_bottom_left.4bpp");
-static const u8 sRockFragment_BottomRight[] = INCBIN_U8("graphics/misc/deoxys_rock_fragment_bottom_right.4bpp");
+static const u16 sSpotlight_Pal[16] = INCBIN_U16("graphics/field_effects/pics/spotlight.gbapal");
+static const u8 sSpotlight_Gfx[] = INCBIN_U8("graphics/field_effects/pics/spotlight.4bpp");
+static const u8 sRockFragment_TopLeft[] = INCBIN_U8("graphics/field_effects/pics/deoxys_rock_fragment_top_left.4bpp");
+static const u8 sRockFragment_TopRight[] = INCBIN_U8("graphics/field_effects/pics/deoxys_rock_fragment_top_right.4bpp");
+static const u8 sRockFragment_BottomLeft[] = INCBIN_U8("graphics/field_effects/pics/deoxys_rock_fragment_bottom_left.4bpp");
+static const u8 sRockFragment_BottomRight[] = INCBIN_U8("graphics/field_effects/pics/deoxys_rock_fragment_bottom_right.4bpp");
bool8 (*const gFieldEffectScriptFuncs[])(u8 **, u32 *) =
{
@@ -2619,7 +2620,7 @@ static void FieldMoveShowMonOutdoorsEffect_LoadGfx(struct Task *task)
u16 delta = ((REG_BG0CNT >> 8) << 11);
CpuCopy16(sFieldMoveStreaksOutdoors_Gfx, (void *)(VRAM + offset), 0x200);
CpuFill32(0, (void *)(VRAM + delta), 0x800);
- LoadPalette(sFieldMoveStreaksOutdoors_Pal, 0xf0, 0x20);
+ LoadPalette(sFieldMoveStreaksOutdoors_Pal, 0xf0, sizeof(sFieldMoveStreaksOutdoors_Pal));
LoadFieldMoveOutdoorStreaksTilemap(delta);
task->tState++;
}
@@ -2782,7 +2783,7 @@ static void FieldMoveShowMonIndoorsEffect_LoadGfx(struct Task *task)
task->data[12] = delta;
CpuCopy16(sFieldMoveStreaksIndoors_Gfx, (void *)(VRAM + offset), 0x80);
CpuFill32(0, (void *)(VRAM + delta), 0x800);
- LoadPalette(sFieldMoveStreaksIndoors_Pal, 0xf0, 0x20);
+ LoadPalette(sFieldMoveStreaksIndoors_Pal, 0xf0, sizeof(sFieldMoveStreaksIndoors_Pal));
task->tState++;
}
diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c
index 188b31833..964a62187 100644
--- a/src/field_player_avatar.c
+++ b/src/field_player_avatar.c
@@ -565,7 +565,7 @@ static bool8 ForcedMovement_MuddySlope(void)
{
struct ObjectEvent *playerObjEvent = &gObjectEvents[gPlayerAvatar.objectEventId];
- if (playerObjEvent->movementDirection != DIR_NORTH || GetPlayerSpeed() <= 3)
+ if (playerObjEvent->movementDirection != DIR_NORTH || GetPlayerSpeed() < PLAYER_SPEED_FASTEST)
{
Bike_UpdateBikeCounterSpeed(0);
playerObjEvent->facingDirectionLocked = TRUE;
diff --git a/src/field_specials.c b/src/field_specials.c
index f676600c0..f749ea8fc 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -3194,17 +3194,17 @@ void DoDeoxysRockInteraction(void)
}
static const u16 sDeoxysRockPalettes[][16] = {
- INCBIN_U16("graphics/misc/deoxys1.gbapal"),
- INCBIN_U16("graphics/misc/deoxys2.gbapal"),
- INCBIN_U16("graphics/misc/deoxys3.gbapal"),
- INCBIN_U16("graphics/misc/deoxys4.gbapal"),
- INCBIN_U16("graphics/misc/deoxys5.gbapal"),
- INCBIN_U16("graphics/misc/deoxys6.gbapal"),
- INCBIN_U16("graphics/misc/deoxys7.gbapal"),
- INCBIN_U16("graphics/misc/deoxys8.gbapal"),
- INCBIN_U16("graphics/misc/deoxys9.gbapal"),
- INCBIN_U16("graphics/misc/deoxys10.gbapal"),
- INCBIN_U16("graphics/misc/deoxys11.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_1.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_2.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_3.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_4.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_5.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_6.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_7.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_8.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_9.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_10.gbapal"),
+ INCBIN_U16("graphics/field_effects/palettes/deoxys_rock_11.gbapal"),
};
static const u8 sDeoxysRockCoords[][2] = {
diff --git a/src/field_tasks.c b/src/field_tasks.c
index e6197505d..8e8875993 100644
--- a/src/field_tasks.c
+++ b/src/field_tasks.c
@@ -820,7 +820,7 @@ static void CrackedFloorPerStepCallback(u8 taskId)
tPrevY = y;
if (MetatileBehavior_IsCrackedFloor(behavior))
{
- if (GetPlayerSpeed() != BIKE_SPEED_FASTEST)
+ if (GetPlayerSpeed() != PLAYER_SPEED_FASTEST)
VarSet(VAR_ICE_STEP_COUNT, 0); // this var does double duty
if (tFloor1Delay == 0)
diff --git a/src/fldeff_flash.c b/src/fldeff_flash.c
index 9c166d008..a303b8423 100644
--- a/src/fldeff_flash.c
+++ b/src/fldeff_flash.c
@@ -61,13 +61,13 @@ static const struct FlashStruct sTransitionTypes[] =
{},
};
-static const u16 sCaveTransitionPalette_White[] = INCBIN_U16("graphics/misc/cave_transition_white.gbapal");
-static const u16 sCaveTransitionPalette_Black[] = INCBIN_U16("graphics/misc/cave_transition_black.gbapal");
+static const u16 sCaveTransitionPalette_White[] = INCBIN_U16("graphics/cave_transition/white.gbapal");
+static const u16 sCaveTransitionPalette_Black[] = INCBIN_U16("graphics/cave_transition/black.gbapal");
-static const u16 sCaveTransitionPalette_Enter[] = INCBIN_U16("graphics/misc/cave_transition_enter.gbapal");
-static const u16 sCaveTransitionPalette_Exit[] = INCBIN_U16("graphics/misc/cave_transition_exit.gbapal");
-static const u32 sCaveTransitionTilemap[] = INCBIN_U32("graphics/misc/cave_transition_map.bin.lz");
-static const u32 sCaveTransitionTiles[] = INCBIN_U32("graphics/misc/cave_transition.4bpp.lz");
+static const u16 sCaveTransitionPalette_Enter[] = INCBIN_U16("graphics/cave_transition/enter.gbapal");
+static const u16 sCaveTransitionPalette_Exit[] = INCBIN_U16("graphics/cave_transition/exit.gbapal");
+static const u32 sCaveTransitionTilemap[] = INCBIN_U32("graphics/cave_transition/tilemap.bin.lz");
+static const u32 sCaveTransitionTiles[] = INCBIN_U32("graphics/cave_transition/tiles.4bpp.lz");
bool8 SetUpFieldMove_Flash(void)
{
diff --git a/src/graphics.c b/src/graphics.c
index 47b82b6b7..9f708f18b 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -16,7 +16,7 @@ const u32 gUnusedPal_OldCharmap[] = INCBIN_U32("graphics/unused/old_charmap.gbap
const u32 gSmokescreenImpactTiles[] = INCBIN_U32("graphics/battle_anims/sprites/smokescreen_impact.4bpp.lz");
const u32 gSmokescreenImpactPalette[] = INCBIN_U32("graphics/battle_anims/sprites/smokescreen_impact.gbapal.lz");
-#include "data/graphics/interface_pokeballs.h"
+#include "data/graphics/pokeballs.h"
const u32 gBlankGfxCompressed[] = INCBIN_U32("graphics/interface/blank.4bpp.lz");
@@ -147,7 +147,7 @@ const u32 gBattleAnimSpriteGfx_ClawSlash[] = INCBIN_U32("graphics/battle_anims/s
const u32 gBattleAnimSpriteGfx_Scratch3[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_3.4bpp.lz");
const u32 gBattleAnimSpriteGfx_Scratch2[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_2.4bpp.lz");
-const u32 gPartyMenuHpBar_Gfx[] = INCBIN_U32("graphics/interface/party_menu_hpbar.4bpp.lz");
+const u32 gUnusedHpBar_Gfx[] = INCBIN_U32("graphics/battle_interface/hpbar_unused.4bpp.lz");
const u32 gBattleAnimSpriteGfx_BubbleBurst2[] = INCBIN_U32("graphics/battle_anims/sprites/bubble_burst_2.4bpp.lz");
@@ -165,7 +165,7 @@ const u32 gBattleAnimSpriteGfx_PinkHeart2[] = INCBIN_U32("graphics/battle_anims/
const u32 gBattleInterfaceGfx_UnusedWindow1[] = INCBIN_U32("graphics/battle_interface/unused_window.4bpp.lz");
const u32 gBattleInterfacePal_UnusedWindow1[] = INCBIN_U32("graphics/battle_interface/unused_window.gbapal.lz");
-const u32 gBattleInterfaceGfx_BattleBar[] = INCBIN_U32("graphics/interface/battle_bar.4bpp.lz");
+const u32 gBattleInterfaceGfx_BattleBar[] = INCBIN_U32("graphics/battle_interface/battle_bar.4bpp.lz");
const u32 gBattleAnimSpriteGfx_SapDrip[] = INCBIN_U32("graphics/battle_anims/sprites/sap_drip.4bpp.lz");
const u32 gBattleAnimSpritePal_SapDrip[] = INCBIN_U32("graphics/battle_anims/sprites/sap_drip.gbapal.lz");
@@ -950,9 +950,9 @@ const u32 gVsLettersGfx[] = INCBIN_U32("graphics/battle_transitions/vs.4bpp.lz")
#include "data/graphics/battle_terrain.h"
// Battle Dome
-const u32 gDomeTourneyBg_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_bg.4bpp.lz");
+const u32 gDomeTourneyTree_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_tree.4bpp.lz");
const u32 gDomeTourneyLine_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_line.4bpp.lz"); // the red glow mask for the tourney advancement lines
-const u32 gDomeTourneyLineMask_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_line_mask_map.bin.lz");
+const u32 gDomeTourneyTree_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_tree.bin.lz");
const u32 gDomeTourneyLineDown_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_line_down_map.bin.lz");
const u32 gDomeTourneyLineUp_Tilemap[] = INCBIN_U32("graphics/battle_frontier/tourney_line_up_map.bin.lz");
const u32 gDomeTourneyInfoCard_Gfx[] = INCBIN_U32("graphics/battle_frontier/tourney_info_card.4bpp.lz");
@@ -967,7 +967,7 @@ const u32 gBattleArenaJudgementSymbolsGfx[] = INCBIN_U32("graphics/battle_fronti
const u32 gBattleArenaJudgementSymbolsPalette[] = INCBIN_U32("graphics/battle_frontier/arena_judgement_symbols.gbapal.lz");
const u32 gBattleWindowTextPalette[] = INCBIN_U32("graphics/battle_interface/text.gbapal.lz");
-const u16 gPPTextPalette[] = INCBIN_U16("graphics/battle_frontier/text_pp.gbapal");
+const u16 gPPTextPalette[] = INCBIN_U16("graphics/battle_interface/text_pp.gbapal");
const u16 gTilesetAnims_BattleDomePals0_0[] = INCBIN_U16("graphics/battle_frontier/dome_anim1.gbapal");
const u16 gTilesetAnims_BattleDomePals0_1[] = INCBIN_U16("graphics/battle_frontier/dome_anim2.gbapal");
@@ -1112,13 +1112,13 @@ const u32 gBattleAnimSpritePal_Slash2[] = INCBIN_U32("graphics/battle_anims/spri
const u32 gBattleAnimSpriteGfx_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.4bpp.lz");
const u32 gBattleAnimSpritePal_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.gbapal.lz");
-const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/interface/party_menu_bg.4bpp.lz");
-const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/interface/party_menu_bg.gbapal.lz");
-const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_bg.bin.lz");
+const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/party_menu/bg.4bpp.lz");
+const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/party_menu/bg.gbapal.lz");
+const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/party_menu/bg.bin.lz");
-const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball.4bpp.lz");
-const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball_small.4bpp.lz"); //unused
-const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/interface/party_menu_pokeball.gbapal.lz");
+const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball.4bpp.lz");
+const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball_small.4bpp.lz"); //unused
+const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/party_menu/pokeball.gbapal.lz");
const u32 gStatusGfx_Icons[] = INCBIN_U32("graphics/interface/status_icons.4bpp.lz");
const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapal.lz");
@@ -1126,50 +1126,50 @@ const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapa
const u32 gMoveTypes_Gfx[] = INCBIN_U32("graphics/types/move_types.4bpp.lz");
const u32 gMoveTypes_Pal[] = INCBIN_U32("graphics/types/move_types.gbapal.lz");
-const u32 gSummaryMoveSelect_Gfx[] = INCBIN_U32("graphics/interface/summary_frames.4bpp.lz");
-const u32 gSummaryMoveSelect_Pal[] = INCBIN_U32("graphics/interface/summary_frames.gbapal.lz");
+const u32 gSummaryMoveSelect_Gfx[] = INCBIN_U32("graphics/summary_screen/move_select.4bpp.lz");
+const u32 gSummaryMoveSelect_Pal[] = INCBIN_U32("graphics/summary_screen/move_select.gbapal.lz");
-const u32 gSummaryScreen_Gfx[] = INCBIN_U32("graphics/interface/summary_screen.4bpp.lz");
-const u32 gSummaryScreen_Pal[] = INCBIN_U32("graphics/interface/summary_screen.gbapal.lz");
-const u32 gSummaryPage_Info_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info.bin.lz");
-const u32 gSummaryPage_Skills_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_skills.bin.lz");
-const u32 gSummaryPage_BattleMoves_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_battle_moves.bin.lz");
-const u32 gSummaryPage_ContestMoves_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_contest_moves.bin.lz");
-const u32 gSummaryPage_InfoCopy_Tilemap[] = INCBIN_U32("graphics/interface/summary_page_info_copy.bin.lz");
+const u32 gSummaryScreen_Gfx[] = INCBIN_U32("graphics/summary_screen/tiles.4bpp.lz");
+const u32 gSummaryScreen_Pal[] = INCBIN_U32("graphics/summary_screen/tiles.gbapal.lz");
+const u32 gSummaryPage_Info_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info.bin.lz");
+const u32 gSummaryPage_Skills_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_skills.bin.lz");
+const u32 gSummaryPage_BattleMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_battle_moves.bin.lz");
+const u32 gSummaryPage_ContestMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_contest_moves.bin.lz");
+const u32 gSummaryPage_InfoEgg_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info_egg.bin.lz");
-const u32 gBagMaleTiles[] = INCBIN_U32("graphics/misc/bag_male.4bpp.lz");
-const u32 gBagFemaleTiles[] = INCBIN_U32("graphics/misc/bag_female.4bpp.lz");
-const u32 gBagPalette[] = INCBIN_U32("graphics/misc/bag.gbapal.lz");
+const u32 gBagMaleTiles[] = INCBIN_U32("graphics/bag/bag_male.4bpp.lz");
+const u32 gBagFemaleTiles[] = INCBIN_U32("graphics/bag/bag_female.4bpp.lz");
+const u32 gBagPalette[] = INCBIN_U32("graphics/bag/bag.gbapal.lz");
-const u32 gBagScreenMale_Pal[] = INCBIN_U32("graphics/interface/bag_screen_male.gbapal.lz");
-const u32 gBagScreenFemale_Pal[] = INCBIN_U32("graphics/interface/bag_screen_female.gbapal.lz");
+const u32 gBagScreenMale_Pal[] = INCBIN_U32("graphics/bag/menu_male.gbapal.lz");
+const u32 gBagScreenFemale_Pal[] = INCBIN_U32("graphics/bag/menu_female.gbapal.lz");
-const u32 gBagScreen_Gfx[] = INCBIN_U32("graphics/interface/bag_screen.4bpp.lz");
-const u32 gBagScreen_GfxTileMap[] = INCBIN_U32("graphics/interface/bag_screen_tilemap.bin.lz");
+const u32 gBagScreen_Gfx[] = INCBIN_U32("graphics/bag/menu.4bpp.lz");
+const u32 gBagScreen_GfxTileMap[] = INCBIN_U32("graphics/bag/menu.bin.lz");
-const u32 gBattlePyramidBag_Gfx[] = INCBIN_U32("graphics/interface/bag_pyramid.4bpp.lz");
-const u32 gBattlePyramidBag_Pal[] = INCBIN_U32("graphics/interface/bag_pyramid.gbapal.lz"); // female palette is first and male is second.
-const u32 gBattlePyramidBagTilemap[] = INCBIN_U32("graphics/interface/bag_pyramid_tilemap.bin.lz");
-const u32 gBattlePyramidBagInterface_Pal[] = INCBIN_U32("graphics/interface/bag_pyramid_interface.gbapal.lz");
+const u32 gBattlePyramidBag_Gfx[] = INCBIN_U32("graphics/bag/bag_pyramid.4bpp.lz");
+const u32 gBattlePyramidBag_Pal[] = INCBIN_U32("graphics/bag/bag_pyramid.gbapal.lz"); // female palette is first and male is second.
+const u32 gBattlePyramidBagTilemap[] = INCBIN_U32("graphics/bag/menu_pyramid.bin.lz");
+const u32 gBattlePyramidBagInterface_Pal[] = INCBIN_U32("graphics/bag/menu_pyramid.gbapal.lz");
-const u32 gBagSwapLineGfx[] = INCBIN_U32("graphics/interface/bag_swap.4bpp.lz");
-const u32 gBagSwapLinePal[] = INCBIN_U32("graphics/interface/bag_swap.gbapal.lz");
+const u32 gSwapLineGfx[] = INCBIN_U32("graphics/interface/swap_line.4bpp.lz");
+const u32 gSwapLinePal[] = INCBIN_U32("graphics/interface/swap_line.gbapal.lz");
-const u32 gBuyMenuFrame_Gfx[] = INCBIN_U32("graphics/interface/mart_frame.4bpp.lz");
-const u32 gMenuMoneyPal[] = INCBIN_U32("graphics/interface/mart_frame.gbapal.lz");
-const u32 gBuyMenuFrame_Tilemap[] = INCBIN_U32("graphics/interface/mart_frame.bin.lz");
-
-const u32 gMenuMoneyGfx[] = INCBIN_U32("graphics/interface/money.4bpp.lz");
+const u32 gShopMenu_Gfx[] = INCBIN_U32("graphics/shop/menu.4bpp.lz");
+const u32 gShopMenu_Pal[] = INCBIN_U32("graphics/shop/menu.gbapal.lz");
+const u32 gShopMenu_Tilemap[] = INCBIN_U32("graphics/shop/menu.bin.lz");
+const u32 gShopMenuMoney_Gfx[] = INCBIN_U32("graphics/shop/money.4bpp.lz");
// Pokeblock
-const u32 gMenuPokeblock_Gfx[] = INCBIN_U32("graphics/interface/pokeblock_case_frame.4bpp.lz");
-const u32 gMenuPokeblock_Pal[] = INCBIN_U32("graphics/interface/pokeblock_case_frame.gbapal.lz");
+const u32 gMenuPokeblock_Gfx[] = INCBIN_U32("graphics/pokeblock/menu.4bpp.lz");
+const u32 gMenuPokeblock_Pal[] = INCBIN_U32("graphics/pokeblock/menu.gbapal.lz");
+
+const u32 gMenuPokeblockDevice_Gfx[] = INCBIN_U32("graphics/pokeblock/device.4bpp.lz");
+const u32 gMenuPokeblockDevice_Pal[] = INCBIN_U32("graphics/pokeblock/device.gbapal.lz");
-const u32 gMenuPokeblockDevice_Gfx[] = INCBIN_U32("graphics/interface/pokeblock_device.4bpp.lz");
-const u32 gMenuPokeblockDevice_Pal[] = INCBIN_U32("graphics/interface/pokeblock_device.gbapal.lz");
+const u32 gMenuPokeblock_Tilemap[] = INCBIN_U32("graphics/pokeblock/menu.bin.lz");
-const u32 gMenuPokeblock_Tilemap[] = INCBIN_U32("graphics/interface/pokeblock.bin.lz");
const u32 gPokeblock_Gfx[] = INCBIN_U32("graphics/pokeblock/pokeblock.4bpp.lz");
const u32 gPokeblockRed_Pal[] = INCBIN_U32("graphics/pokeblock/red.gbapal.lz");
const u32 gPokeblockBlue_Pal[] = INCBIN_U32("graphics/pokeblock/blue.gbapal.lz");
@@ -1186,7 +1186,7 @@ const u32 gPokeblockBlack_Pal[] = INCBIN_U32("graphics/pokeblock/black.gbapal.lz
const u32 gPokeblockWhite_Pal[] = INCBIN_U32("graphics/pokeblock/white.gbapal.lz");
const u32 gPokeblockGold_Pal[] = INCBIN_U32("graphics/pokeblock/gold.gbapal.lz");
-const u32 gPokeblockFeedBg_Tilemap[] = INCBIN_U32("graphics/interface/pokeblock_feeding_bg_map.bin.lz");
+const u32 gPokeblockFeedBg_Tilemap[] = INCBIN_U32("graphics/pokeblock/feeding_bg.bin.lz");
#include "data/graphics/berries.h"
#include "data/graphics/rayquaza_scene.h"
@@ -1259,9 +1259,9 @@ const u32 gPokedexSearchMenu_Gfx[] = INCBIN_U32("graphics/pokedex/search_menu.4b
const u32 gPokedexSearchMenuNational_Tilemap[] = INCBIN_U32("graphics/pokedex/search_menu_national.bin.lz");
const u32 gPokedexSearchMenuHoenn_Tilemap[] = INCBIN_U32("graphics/pokedex/search_menu_hoenn.bin.lz");
-const u16 gSummaryScreenPowAcc_Tilemap[] = INCBIN_U16("graphics/interface/powacc_tilemap.bin");
-const u16 gSummaryScreenAppealJam_Tilemap[] = INCBIN_U16("graphics/interface/appealjam_tilemap.bin");
-const u16 gSummaryScreenWindow_Tilemap[] = INCBIN_U16("graphics/interface/summary.bin");
+const u16 gSummaryScreen_MoveEffect_Battle_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_battle.bin");
+const u16 gSummaryScreen_MoveEffect_Contest_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_contest.bin");
+const u16 gSummaryScreen_MoveEffect_Cancel_Tilemap[] = INCBIN_U16("graphics/summary_screen/effect_cancel.bin");
const u16 gIntroCopyright_Pal[] = INCBIN_U16("graphics/intro/copyright.gbapal");
const u32 gIntroCopyright_Gfx[] = INCBIN_U32("graphics/intro/copyright.4bpp.lz");
@@ -1270,14 +1270,12 @@ const u32 gIntroCopyright_Tilemap[] = INCBIN_U32("graphics/intro/copyright.bin.l
const u16 gPokedexAreaScreenAreaUnknown_Pal[] = INCBIN_U16("graphics/pokedex/area_unknown.gbapal");
const u32 gPokedexAreaScreenAreaUnknown_Gfx[] = INCBIN_U32("graphics/pokedex/area_unknown.4bpp.lz");
-// seems to be fire red leftovers, but the menu elements is reused in the item menu for TM descriptions.
-
const u16 gMenuInfoElements1_Pal[] = INCBIN_U16("graphics/interface/menu_info1.gbapal");
const u16 gMenuInfoElements2_Pal[] = INCBIN_U16("graphics/interface/menu_info2.gbapal");
const u16 gMenuInfoElements3_Pal[] = INCBIN_U16("graphics/interface/menu_info3.gbapal");
-const u8 gMenuInfoElements_Gfx[] = INCBIN_U8("graphics/interface/menu_info.4bpp"); //the types are reused for item menu
+const u8 gMenuInfoElements_Gfx[] = INCBIN_U8("graphics/interface/menu_info.4bpp");
-const u8 gBagMenuHMIcon_Gfx[] = INCBIN_U8("graphics/interface/hm.4bpp");
+const u8 gBagMenuHMIcon_Gfx[] = INCBIN_U8("graphics/bag/hm.4bpp");
// contest results screen
@@ -1331,8 +1329,8 @@ const u32 gRegionMapCityZoomText_Gfx[] = INCBIN_U32("graphics/pokenav/city_zoom_
const u16 gPokenavConditionCancel_Pal[] = INCBIN_U16("graphics/pokenav/condition/cancel.gbapal");
const u8 gPokenavConditionCancel_Gfx[] = INCBIN_U8("graphics/pokenav/condition/cancel.4bpp");
-const u16 gMonMarkingsMenu_Pal[] = INCBIN_U16("graphics/misc/mon_markings_menu.gbapal");
-const u8 gMonMarkingsMenu_Gfx[] = INCBIN_U8("graphics/misc/mon_markings_menu.4bpp");
+const u16 gMonMarkingsMenu_Pal[] = INCBIN_U16("graphics/interface/mon_markings_menu.gbapal");
+const u8 gMonMarkingsMenu_Gfx[] = INCBIN_U8("graphics/interface/mon_markings_menu.4bpp");
const u16 gBerryBlenderMiscPalette[] = INCBIN_U16("graphics/berry_blender/misc.gbapal");
const u16 gBerryBlenderArrowPalette[] = INCBIN_U16("graphics/berry_blender/arrow.gbapal");
@@ -1449,9 +1447,9 @@ const u32 gTilesetTiles_General[] = INCBIN_U32("data/tilesets/primary/general/ti
// trade/egg hatch
-const u16 gTradeGba_Pal[] = INCBIN_U16("graphics/link/gba.gbapal");
-const u16 gTradeGba2_Pal[] = INCBIN_U16("graphics/link/gba_pal2.gbapal");
-const u8 gTradeGba_Gfx[] = INCBIN_U8("graphics/link/gba.4bpp");
+const u16 gTradeGba_Pal[] = INCBIN_U16("graphics/trade/gba.gbapal");
+const u16 gTradeGba2_Pal[] = INCBIN_U16("graphics/trade/gba_pal2.gbapal");
+const u8 gTradeGba_Gfx[] = INCBIN_U8("graphics/trade/gba.4bpp");
static const u16 sEmptyPal[16] = {0};
@@ -1523,7 +1521,7 @@ const u16 gFrontierPassCancelButtonHighlighted_Tilemap[] = INCBIN_U16("graphics/
// Berry Crush
const u16 gBerryCrush_Crusher_Pal[] = INCBIN_U16("graphics/berry_crush/crusher.gbapal");
const u32 gBerryCrush_Crusher_Gfx[] = INCBIN_U32("graphics/berry_crush/crusher.4bpp.lz");
-const u32 gBerryCrush_Crusher_Tilemap[] = INCBIN_U32("graphics/berry_crush/crusher.bin.lz");
+const u32 gBerryCrush_TextWindows_Tilemap[] = INCBIN_U32("graphics/berry_crush/text_windows.bin.lz");
// random garbage at the end.
static const u8 sEmpty3[0x54BAC] = {0};
diff --git a/src/item_menu.c b/src/item_menu.c
index 56ef3cba3..9eaca9597 100755
--- a/src/item_menu.c
+++ b/src/item_menu.c
@@ -372,7 +372,7 @@ static const struct ScrollArrowsTemplate sBagScrollArrowsTemplate = {
.palNum = 0,
};
-static const u8 sRegisteredSelect_Gfx[] = INCBIN_U8("graphics/interface/select_button.4bpp");
+static const u8 sRegisteredSelect_Gfx[] = INCBIN_U8("graphics/bag/select_button.4bpp");
enum {
COLORID_NORMAL,
diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c
index 60de132b0..a5c265f90 100644
--- a/src/item_menu_icons.c
+++ b/src/item_menu_icons.c
@@ -33,8 +33,8 @@ static void SpriteCB_SwitchPocketRotatingBallInit(struct Sprite *sprite);
static void SpriteCB_SwitchPocketRotatingBallContinue(struct Sprite *sprite);
// static const rom data
-static const u16 gRotatingBall_Pal[] = INCBIN_U16("graphics/interface/bag_spinner.gbapal");
-static const u8 gRotatingBall[] = INCBIN_U8("graphics/interface/bag_spinner.4bpp");
+static const u16 sRotatingBall_Pal[] = INCBIN_U16("graphics/bag/rotating_ball.gbapal");
+static const u8 sRotatingBall_Gfx[] = INCBIN_U8("graphics/bag/rotating_ball.4bpp");
static const u8 gCherryUnused[] = INCBIN_U8("graphics/unused/cherry.4bpp");
static const u16 gCherryUnused_Pal[] = INCBIN_U16("graphics/unused/cherry.gbapal");
@@ -200,12 +200,12 @@ static const union AffineAnimCmd *const sRotatingBallAnimCmds_FullRotation[] =
static const struct SpriteSheet sRotatingBallTable =
{
- gRotatingBall, 0x80, TAG_ROTATING_BALL_GFX
+ sRotatingBall_Gfx, 0x80, TAG_ROTATING_BALL_GFX
};
static const struct SpritePalette sRotatingBallPaletteTable =
{
- gRotatingBall_Pal, TAG_ROTATING_BALL_GFX
+ sRotatingBall_Pal, TAG_ROTATING_BALL_GFX
};
static const struct SpriteTemplate sRotatingBallSpriteTemplate =
diff --git a/src/link.c b/src/link.c
index 1084d4a6d..aa9a0d73d 100644
--- a/src/link.c
+++ b/src/link.c
@@ -158,13 +158,13 @@ static void DoSend(void);
static void StopTimer(void);
static void SendRecvDone(void);
-static const u16 sWirelessLinkDisplayPal[] = INCBIN_U16("graphics/interface/wireless_link_display.gbapal");
-static const u32 sWirelessLinkDisplayGfx[] = INCBIN_U32("graphics/interface/wireless_link_display.4bpp.lz");
-static const u32 sWirelessLinkDisplayTilemap[] = INCBIN_U32("graphics/interface/wireless_link_display.bin.lz");
-static const u16 sLinkTestDigitsPal[] = INCBIN_U16("graphics/interface/link_test_digits.gbapal");
-static const u16 sLinkTestDigitsGfx[] = INCBIN_U16("graphics/interface/link_test_digits.4bpp");
+static const u16 sWirelessLinkDisplayPal[] = INCBIN_U16("graphics/link/wireless_display.gbapal");
+static const u32 sWirelessLinkDisplayGfx[] = INCBIN_U32("graphics/link/wireless_display.4bpp.lz");
+static const u32 sWirelessLinkDisplayTilemap[] = INCBIN_U32("graphics/link/wireless_display.bin.lz");
+static const u16 sLinkTestDigitsPal[] = INCBIN_U16("graphics/link/test_digits.gbapal");
+static const u16 sLinkTestDigitsGfx[] = INCBIN_U16("graphics/link/test_digits.4bpp");
static const u8 sUnusedTransparentWhite[] = _("{HIGHLIGHT TRANSPARENT}{COLOR WHITE}");
-static const u16 sCommErrorBg_Gfx[] = INCBIN_U16("graphics/interface/comm_error_bg.4bpp");
+static const u16 sCommErrorBg_Gfx[] = INCBIN_U16("graphics/link/comm_error_bg.4bpp");
static const struct BlockRequest sBlockRequests[] = {
[BLOCK_REQ_SIZE_NONE] = {gBlockSendBuffer, 200},
[BLOCK_REQ_SIZE_200] = {gBlockSendBuffer, 200},
diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c
index 571f305d0..1e1fe5b34 100644
--- a/src/link_rfu_3.c
+++ b/src/link_rfu_3.c
@@ -34,8 +34,8 @@ EWRAM_DATA u8 gWirelessStatusIndicatorSpriteId = 0;
static u8 sSequenceArrayValOffset;
-static const u16 sWirelessLinkIconPalette[] = INCBIN_U16("graphics/interface/wireless_link_icon.gbapal");
-static const u32 sWirelessLinkIconPic[] = INCBIN_U32("graphics/interface/wireless_link_icon.4bpp.lz");
+static const u16 sWirelessLinkIconPalette[] = INCBIN_U16("graphics/link/wireless_icon.gbapal");
+static const u32 sWirelessLinkIconPic[] = INCBIN_U32("graphics/link/wireless_icon.4bpp.lz");
// Most of the below two tables won't make sense with ASCII encoding.
static const u8 sWireless_ASCIItoRSETable[256] = {
diff --git a/src/m4a_1.s b/src/m4a_1.s
index f71a5546e..cc5d3238d 100644
--- a/src/m4a_1.s
+++ b/src/m4a_1.s
@@ -1910,27 +1910,7 @@ _081DDD90:
.align 2, 0 @ Don't pad with nop.
- .bss
+ .bss
gDecodingBuffer: @ Used as a buffer for audio decoded from compressed DPCM
- .space 0x40
- .size gDecodingBuffer, .-gDecodingBuffer
-
- .global gMPlayTrack_BGM
-gMPlayTrack_BGM:
- .space 0x320
- .size gMPlayTrack_BGM, .-gMPlayTrack_BGM
-
- .global gMPlayTrack_SE1
-gMPlayTrack_SE1:
- .space 0xF0
- .size gMPlayTrack_SE1, .-gMPlayTrack_SE1
-
- .global gMPlayTrack_SE2
-gMPlayTrack_SE2:
- .space 0x2D0
- .size gMPlayTrack_SE2, .-gMPlayTrack_SE2
-
- .global gMPlayTrack_SE3
-gMPlayTrack_SE3:
- .space 0x50
- .size gMPlayTrack_SE3, .-gMPlayTrack_SE3
+ .space 0x40
+ .size gDecodingBuffer, .-gDecodingBuffer
diff --git a/src/main_menu.c b/src/main_menu.c
index e7802b1e7..54a4f6891 100644
--- a/src/main_menu.c
+++ b/src/main_menu.c
@@ -403,8 +403,8 @@ static const struct WindowTemplate gNewGameBirchSpeechTextWindows[] =
DUMMY_WIN_TEMPLATE
};
-static const u16 sMainMenuBgPal[] = INCBIN_U16("graphics/misc/main_menu_bg.gbapal");
-static const u16 sMainMenuTextPal[] = INCBIN_U16("graphics/misc/main_menu_text.gbapal");
+static const u16 sMainMenuBgPal[] = INCBIN_U16("graphics/interface/main_menu_bg.gbapal");
+static const u16 sMainMenuTextPal[] = INCBIN_U16("graphics/interface/main_menu_text.gbapal");
static const u8 sTextColor_Headers[] = {TEXT_DYNAMIC_COLOR_1, TEXT_DYNAMIC_COLOR_2, TEXT_DYNAMIC_COLOR_3};
static const u8 sTextColor_MenuInfo[] = {TEXT_DYNAMIC_COLOR_1, TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_3};
diff --git a/src/map_name_popup.c b/src/map_name_popup.c
index e44fb3383..8cf1a6bab 100644
--- a/src/map_name_popup.c
+++ b/src/map_name_popup.c
@@ -38,35 +38,35 @@ static EWRAM_DATA u8 sPopupTaskId = 0;
// .rodata
static const u8 sMapPopUp_Table[][960] =
{
- [MAPPOPUP_THEME_WOOD] = INCBIN_U8("graphics/interface/map_popup/wood.4bpp"),
- [MAPPOPUP_THEME_MARBLE] = INCBIN_U8("graphics/interface/map_popup/marble.4bpp"),
- [MAPPOPUP_THEME_STONE] = INCBIN_U8("graphics/interface/map_popup/stone.4bpp"),
- [MAPPOPUP_THEME_BRICK] = INCBIN_U8("graphics/interface/map_popup/brick.4bpp"),
- [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U8("graphics/interface/map_popup/underwater.4bpp"),
- [MAPPOPUP_THEME_STONE2] = INCBIN_U8("graphics/interface/map_popup/stone2.4bpp"),
+ [MAPPOPUP_THEME_WOOD] = INCBIN_U8("graphics/map_popup/wood.4bpp"),
+ [MAPPOPUP_THEME_MARBLE] = INCBIN_U8("graphics/map_popup/marble.4bpp"),
+ [MAPPOPUP_THEME_STONE] = INCBIN_U8("graphics/map_popup/stone.4bpp"),
+ [MAPPOPUP_THEME_BRICK] = INCBIN_U8("graphics/map_popup/brick.4bpp"),
+ [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U8("graphics/map_popup/underwater.4bpp"),
+ [MAPPOPUP_THEME_STONE2] = INCBIN_U8("graphics/map_popup/stone2.4bpp"),
};
static const u8 sMapPopUp_OutlineTable[][960] =
{
- [MAPPOPUP_THEME_WOOD] = INCBIN_U8("graphics/interface/map_popup/wood_outline.4bpp"),
- [MAPPOPUP_THEME_MARBLE] = INCBIN_U8("graphics/interface/map_popup/marble_outline.4bpp"),
- [MAPPOPUP_THEME_STONE] = INCBIN_U8("graphics/interface/map_popup/stone_outline.4bpp"),
- [MAPPOPUP_THEME_BRICK] = INCBIN_U8("graphics/interface/map_popup/brick_outline.4bpp"),
- [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U8("graphics/interface/map_popup/underwater_outline.4bpp"),
- [MAPPOPUP_THEME_STONE2] = INCBIN_U8("graphics/interface/map_popup/stone2_outline.4bpp"),
+ [MAPPOPUP_THEME_WOOD] = INCBIN_U8("graphics/map_popup/wood_outline.4bpp"),
+ [MAPPOPUP_THEME_MARBLE] = INCBIN_U8("graphics/map_popup/marble_outline.4bpp"),
+ [MAPPOPUP_THEME_STONE] = INCBIN_U8("graphics/map_popup/stone_outline.4bpp"),
+ [MAPPOPUP_THEME_BRICK] = INCBIN_U8("graphics/map_popup/brick_outline.4bpp"),
+ [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U8("graphics/map_popup/underwater_outline.4bpp"),
+ [MAPPOPUP_THEME_STONE2] = INCBIN_U8("graphics/map_popup/stone2_outline.4bpp"),
};
static const u16 sMapPopUp_PaletteTable[][16] =
{
- [MAPPOPUP_THEME_WOOD] = INCBIN_U16("graphics/interface/map_popup/wood.gbapal"),
- [MAPPOPUP_THEME_MARBLE] = INCBIN_U16("graphics/interface/map_popup/marble_outline.gbapal"),
- [MAPPOPUP_THEME_STONE] = INCBIN_U16("graphics/interface/map_popup/stone_outline.gbapal"),
- [MAPPOPUP_THEME_BRICK] = INCBIN_U16("graphics/interface/map_popup/brick_outline.gbapal"),
- [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U16("graphics/interface/map_popup/underwater_outline.gbapal"),
- [MAPPOPUP_THEME_STONE2] = INCBIN_U16("graphics/interface/map_popup/stone2_outline.gbapal"),
+ [MAPPOPUP_THEME_WOOD] = INCBIN_U16("graphics/map_popup/wood.gbapal"),
+ [MAPPOPUP_THEME_MARBLE] = INCBIN_U16("graphics/map_popup/marble_outline.gbapal"),
+ [MAPPOPUP_THEME_STONE] = INCBIN_U16("graphics/map_popup/stone_outline.gbapal"),
+ [MAPPOPUP_THEME_BRICK] = INCBIN_U16("graphics/map_popup/brick_outline.gbapal"),
+ [MAPPOPUP_THEME_UNDERWATER] = INCBIN_U16("graphics/map_popup/underwater_outline.gbapal"),
+ [MAPPOPUP_THEME_STONE2] = INCBIN_U16("graphics/map_popup/stone2_outline.gbapal"),
};
-static const u16 sMapPopUp_Palette_Underwater[16] = INCBIN_U16("graphics/interface/map_popup/underwater.gbapal");
+static const u16 sMapPopUp_Palette_Underwater[16] = INCBIN_U16("graphics/map_popup/underwater.gbapal");
static const u8 sRegionMapSectionId_To_PopUpThemeIdMapping[] =
{
diff --git a/src/menu_helpers.c b/src/menu_helpers.c
index d5cf83bd2..e9f3e571f 100644
--- a/src/menu_helpers.c
+++ b/src/menu_helpers.c
@@ -71,12 +71,12 @@ static const union AnimCmd *const sAnims_SwapLine[] =
static const struct CompressedSpriteSheet sSpriteSheet_SwapLine =
{
- gBagSwapLineGfx, 0x100, TAG_SWAP_LINE
+ gSwapLineGfx, 0x100, TAG_SWAP_LINE
};
static const struct CompressedSpritePalette sSpritePalette_SwapLine =
{
- gBagSwapLinePal, TAG_SWAP_LINE
+ gSwapLinePal, TAG_SWAP_LINE
};
static const struct SpriteTemplate sSpriteTemplate_SwapLine =
diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c
index 178b6d5b7..4c72136d4 100644
--- a/src/minigame_countdown.c
+++ b/src/minigame_countdown.c
@@ -48,8 +48,8 @@ static void Task_StaticCountdown_Free(u8 taskId);
static void Task_StaticCountdown_Start(u8 taskId);
static void Task_StaticCountdown_Run(u8 taskId);
-static const u16 s321Start_Static_Pal[] = INCBIN_U16("graphics/minigame_countdown/321start_static.gbapal");
-static const u32 s321Start_Static_Gfx[] = INCBIN_U32("graphics/minigame_countdown/321start_static.4bpp.lz");
+static const u16 s321Start_Static_Pal[] = INCBIN_U16("graphics/link/321start_static.gbapal");
+static const u32 s321Start_Static_Gfx[] = INCBIN_U32("graphics/link/321start_static.4bpp.lz");
static const struct CompressedSpriteSheet sSpriteSheet_321Start_Static[] =
{
@@ -374,8 +374,8 @@ static void CreateStartSprite(u16 tileTag, u16 palTag, s16 x, s16 y, u8 subprior
static void InitStartGraphic(u8 spriteId1, u8 spriteId2, u8 spriteId3);
static void SpriteCB_Start(struct Sprite *sprite);
-static const u16 s321Start_Pal[] = INCBIN_U16("graphics/minigame_countdown/321start.gbapal");
-static const u32 s321Start_Gfx[] = INCBIN_U32("graphics/minigame_countdown/321start.4bpp.lz");
+static const u16 s321Start_Pal[] = INCBIN_U16("graphics/link/321start.gbapal");
+static const u32 s321Start_Gfx[] = INCBIN_U32("graphics/link/321start.4bpp.lz");
#define tState data[0]
#define tTilesTag data[2]
diff --git a/src/mon_markings.c b/src/mon_markings.c
index dbd5a2fa8..1e03179e9 100644
--- a/src/mon_markings.c
+++ b/src/mon_markings.c
@@ -22,8 +22,8 @@ static void SpriteCB_Marking(struct Sprite *);
static void SpriteCB_Cursor(struct Sprite *);
static struct Sprite *CreateMarkingComboSprite(u16, u16, const u16 *, u16);
-static const u16 sMonMarkings_Pal[] = INCBIN_U16("graphics/misc/mon_markings.gbapal");
-static const u8 sMonMarkings_Gfx[] = INCBIN_U8("graphics/misc/mon_markings.4bpp");
+static const u16 sMonMarkings_Pal[] = INCBIN_U16("graphics/interface/mon_markings.gbapal");
+static const u8 sMonMarkings_Gfx[] = INCBIN_U8("graphics/interface/mon_markings.4bpp");
static const struct OamData sOamData_MenuWindow =
{
diff --git a/src/money.c b/src/money.c
index c331462d4..592ce9f75 100644
--- a/src/money.c
+++ b/src/money.c
@@ -58,14 +58,14 @@ static const struct SpriteTemplate sSpriteTemplate_MoneyLabel =
static const struct CompressedSpriteSheet sSpriteSheet_MoneyLabel =
{
- .data = gMenuMoneyGfx,
+ .data = gShopMenuMoney_Gfx,
.size = 256,
.tag = MONEY_LABEL_TAG,
};
static const struct CompressedSpritePalette sSpritePalette_MoneyLabel =
{
- .data = gMenuMoneyPal,
+ .data = gShopMenu_Pal,
.tag = MONEY_LABEL_TAG
};
@@ -146,7 +146,7 @@ void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed)
txtPtr = gStringVar4;
while (strLength-- > 0)
- *(txtPtr++) = 0x77;
+ *(txtPtr++) = CHAR_SPACER;
StringExpandPlaceholders(txtPtr, gText_PokedollarVar1);
AddTextPrinterParameterized(windowId, FONT_NORMAL, gStringVar4, x, y, speed, NULL);
diff --git a/src/option_menu.c b/src/option_menu.c
index e66bddd7f..2991913d7 100644
--- a/src/option_menu.c
+++ b/src/option_menu.c
@@ -79,9 +79,9 @@ static void DrawBgWindowFrames(void);
EWRAM_DATA static bool8 sArrowPressed = FALSE;
-static const u16 sOptionMenuText_Pal[] = INCBIN_U16("graphics/misc/option_menu_text.gbapal");
+static const u16 sOptionMenuText_Pal[] = INCBIN_U16("graphics/interface/option_menu_text.gbapal");
// note: this is only used in the Japanese release
-static const u8 sEqualSignGfx[] = INCBIN_U8("graphics/misc/option_menu_equals_sign.4bpp");
+static const u8 sEqualSignGfx[] = INCBIN_U8("graphics/interface/option_menu_equals_sign.4bpp");
static const u8 *const sOptionMenuItemsNames[MENUITEM_COUNT] =
{
diff --git a/src/pokeball.c b/src/pokeball.c
index cb68d6883..a9ccd42d6 100644
--- a/src/pokeball.c
+++ b/src/pokeball.c
@@ -59,34 +59,34 @@ static u16 GetBattlerPokeballItemId(u8 battlerId);
const struct CompressedSpriteSheet gBallSpriteSheets[POKEBALL_COUNT] =
{
- [BALL_POKE] = {gInterfaceGfx_PokeBall, 384, GFX_TAG_POKEBALL},
- [BALL_GREAT] = {gInterfaceGfx_GreatBall, 384, GFX_TAG_GREATBALL},
- [BALL_SAFARI] = {gInterfaceGfx_SafariBall, 384, GFX_TAG_SAFARIBALL},
- [BALL_ULTRA] = {gInterfaceGfx_UltraBall, 384, GFX_TAG_ULTRABALL},
- [BALL_MASTER] = {gInterfaceGfx_MasterBall, 384, GFX_TAG_MASTERBALL},
- [BALL_NET] = {gInterfaceGfx_NetBall, 384, GFX_TAG_NETBALL},
- [BALL_DIVE] = {gInterfaceGfx_DiveBall, 384, GFX_TAG_DIVEBALL},
- [BALL_NEST] = {gInterfaceGfx_NestBall, 384, GFX_TAG_NESTBALL},
- [BALL_REPEAT] = {gInterfaceGfx_RepeatBall, 384, GFX_TAG_REPEATBALL},
- [BALL_TIMER] = {gInterfaceGfx_TimerBall, 384, GFX_TAG_TIMERBALL},
- [BALL_LUXURY] = {gInterfaceGfx_LuxuryBall, 384, GFX_TAG_LUXURYBALL},
- [BALL_PREMIER] = {gInterfaceGfx_PremierBall, 384, GFX_TAG_PREMIERBALL},
+ [BALL_POKE] = {gBallGfx_Poke, 384, GFX_TAG_POKEBALL},
+ [BALL_GREAT] = {gBallGfx_Great, 384, GFX_TAG_GREATBALL},
+ [BALL_SAFARI] = {gBallGfx_Safari, 384, GFX_TAG_SAFARIBALL},
+ [BALL_ULTRA] = {gBallGfx_Ultra, 384, GFX_TAG_ULTRABALL},
+ [BALL_MASTER] = {gBallGfx_Master, 384, GFX_TAG_MASTERBALL},
+ [BALL_NET] = {gBallGfx_Net, 384, GFX_TAG_NETBALL},
+ [BALL_DIVE] = {gBallGfx_Dive, 384, GFX_TAG_DIVEBALL},
+ [BALL_NEST] = {gBallGfx_Nest, 384, GFX_TAG_NESTBALL},
+ [BALL_REPEAT] = {gBallGfx_Repeat, 384, GFX_TAG_REPEATBALL},
+ [BALL_TIMER] = {gBallGfx_Timer, 384, GFX_TAG_TIMERBALL},
+ [BALL_LUXURY] = {gBallGfx_Luxury, 384, GFX_TAG_LUXURYBALL},
+ [BALL_PREMIER] = {gBallGfx_Premier, 384, GFX_TAG_PREMIERBALL},
};
const struct CompressedSpritePalette gBallSpritePalettes[POKEBALL_COUNT] =
{
- [BALL_POKE] = {gInterfacePal_PokeBall, GFX_TAG_POKEBALL},
- [BALL_GREAT] = {gInterfacePal_GreatBall, GFX_TAG_GREATBALL},
- [BALL_SAFARI] = {gInterfacePal_SafariBall, GFX_TAG_SAFARIBALL},
- [BALL_ULTRA] = {gInterfacePal_UltraBall, GFX_TAG_ULTRABALL},
- [BALL_MASTER] = {gInterfacePal_MasterBall, GFX_TAG_MASTERBALL},
- [BALL_NET] = {gInterfacePal_NetBall, GFX_TAG_NETBALL},
- [BALL_DIVE] = {gInterfacePal_DiveBall, GFX_TAG_DIVEBALL},
- [BALL_NEST] = {gInterfacePal_NestBall, GFX_TAG_NESTBALL},
- [BALL_REPEAT] = {gInterfacePal_RepeatBall, GFX_TAG_REPEATBALL},
- [BALL_TIMER] = {gInterfacePal_TimerBall, GFX_TAG_TIMERBALL},
- [BALL_LUXURY] = {gInterfacePal_LuxuryBall, GFX_TAG_LUXURYBALL},
- [BALL_PREMIER] = {gInterfacePal_PremierBall, GFX_TAG_PREMIERBALL},
+ [BALL_POKE] = {gBallPal_Poke, GFX_TAG_POKEBALL},
+ [BALL_GREAT] = {gBallPal_Great, GFX_TAG_GREATBALL},
+ [BALL_SAFARI] = {gBallPal_Safari, GFX_TAG_SAFARIBALL},
+ [BALL_ULTRA] = {gBallPal_Ultra, GFX_TAG_ULTRABALL},
+ [BALL_MASTER] = {gBallPal_Master, GFX_TAG_MASTERBALL},
+ [BALL_NET] = {gBallPal_Net, GFX_TAG_NETBALL},
+ [BALL_DIVE] = {gBallPal_Dive, GFX_TAG_DIVEBALL},
+ [BALL_NEST] = {gBallPal_Nest, GFX_TAG_NESTBALL},
+ [BALL_REPEAT] = {gBallPal_Repeat, GFX_TAG_REPEATBALL},
+ [BALL_TIMER] = {gBallPal_Timer, GFX_TAG_TIMERBALL},
+ [BALL_LUXURY] = {gBallPal_Luxury, GFX_TAG_LUXURYBALL},
+ [BALL_PREMIER] = {gBallPal_Premier, GFX_TAG_PREMIERBALL},
};
static const struct OamData sBallOamData =
@@ -204,6 +204,7 @@ static const union AffineAnimCmd *const sAffineAnim_BallRotate[] =
const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
{
+ [BALL_POKE] =
{
.tileTag = GFX_TAG_POKEBALL,
.paletteTag = GFX_TAG_POKEBALL,
@@ -213,6 +214,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_GREAT] =
{
.tileTag = GFX_TAG_GREATBALL,
.paletteTag = GFX_TAG_GREATBALL,
@@ -222,6 +224,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_SAFARI] =
{
.tileTag = GFX_TAG_SAFARIBALL,
.paletteTag = GFX_TAG_SAFARIBALL,
@@ -231,6 +234,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_ULTRA] =
{
.tileTag = GFX_TAG_ULTRABALL,
.paletteTag = GFX_TAG_ULTRABALL,
@@ -240,6 +244,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_MASTER] =
{
.tileTag = GFX_TAG_MASTERBALL,
.paletteTag = GFX_TAG_MASTERBALL,
@@ -249,6 +254,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_NET] =
{
.tileTag = GFX_TAG_NETBALL,
.paletteTag = GFX_TAG_NETBALL,
@@ -258,6 +264,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_DIVE] =
{
.tileTag = GFX_TAG_DIVEBALL,
.paletteTag = GFX_TAG_DIVEBALL,
@@ -267,6 +274,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_NEST] =
{
.tileTag = GFX_TAG_NESTBALL,
.paletteTag = GFX_TAG_NESTBALL,
@@ -276,6 +284,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_REPEAT] =
{
.tileTag = GFX_TAG_REPEATBALL,
.paletteTag = GFX_TAG_REPEATBALL,
@@ -285,6 +294,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_TIMER] =
{
.tileTag = GFX_TAG_TIMERBALL,
.paletteTag = GFX_TAG_TIMERBALL,
@@ -294,6 +304,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_LUXURY] =
{
.tileTag = GFX_TAG_LUXURYBALL,
.paletteTag = GFX_TAG_LUXURYBALL,
@@ -303,6 +314,7 @@ const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] =
.affineAnims = sAffineAnim_BallRotate,
.callback = SpriteCB_BallThrow,
},
+ [BALL_PREMIER] =
{
.tileTag = GFX_TAG_PREMIERBALL,
.paletteTag = GFX_TAG_PREMIERBALL,
diff --git a/src/pokemon.c b/src/pokemon.c
index 9476dbb2e..08a6fd0f9 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -1345,10 +1345,10 @@ static const u16 sHoennToNationalOrder[NUM_SPECIES - 1] =
const struct SpindaSpot gSpindaSpotGraphics[] =
{
- {16, 7, INCBIN_U16("graphics/spinda_spots/spot_0.bin")},
- {40, 8, INCBIN_U16("graphics/spinda_spots/spot_1.bin")},
- {22, 25, INCBIN_U16("graphics/spinda_spots/spot_2.bin")},
- {34, 26, INCBIN_U16("graphics/spinda_spots/spot_3.bin")}
+ {.x = 16, .y = 7, .image = INCBIN_U16("graphics/spinda_spots/spot_0.bin")},
+ {.x = 40, .y = 8, .image = INCBIN_U16("graphics/spinda_spots/spot_1.bin")},
+ {.x = 22, .y = 25, .image = INCBIN_U16("graphics/spinda_spots/spot_2.bin")},
+ {.x = 34, .y = 26, .image = INCBIN_U16("graphics/spinda_spots/spot_3.bin")}
};
#include "data/pokemon/item_effects.h"
@@ -5653,42 +5653,81 @@ u16 SpeciesToCryId(u16 species)
return gSpeciesIdToCryId[species - (SPECIES_TREECKO - 1)];
}
-#define DRAW_SPINDA_SPOTS \
+// Spots can be drawn on Spinda's color indexes 1, 2, or 3
+#define FIRST_SPOT_COLOR 1
+#define LAST_SPOT_COLOR 3
+
+// To draw a spot pixel, add 4 to the color index
+#define SPOT_COLOR_ADJUSTMENT 4
+/*
+ The macro below handles drawing the randomly-placed spots on Spinda's front sprite.
+ Spinda has 4 spots, each with an entry in gSpindaSpotGraphics. Each entry contains
+ a base x and y coordinate for the spot and a 16x16 binary image. Each bit in the image
+ determines whether that pixel should be considered part of the spot.
+
+ The position of each spot is randomized using the Spinda's personality. The entire 32 bit
+ personality value is used, 4 bits for each coordinate of the 4 spots. If the personality
+ value is 0x87654321, then 0x1 will be used for the 1st spot's x coord, 0x2 will be used for
+ the 1st spot's y coord, 0x3 will be used for the 2nd spot's x coord, and so on. Each
+ coordinate is calculated as (baseCoord + (given 4 bits of personality) - 8). In effect this
+ means each spot can start at any position -8 to +7 off of its base coordinates (256 possibilities).
+
+ The macro then loops over the 16x16 spot image. For each bit in the spot's binary image, if
+ the bit is set then it's part of the spot; try to draw it. A pixel is drawn on Spinda if the
+ pixel on Spinda satisfies the following formula: ((u8)(colorIndex - 1) <= 2). The -1 excludes
+ transparent pixels, as these are index 0. Therefore only colors 1, 2, or 3 on Spinda will
+ allow a spot to be drawn. These color indexes are Spinda's light brown body colors. To create
+ the spot it adds 4 to the color index, so Spinda's spots will be colors 5, 6, and 7.
+
+ The above is done two different ways in the macro: one with << 4, and one without. This
+ is because Spinda's sprite is a 4 bits per pixel image, but the pointer to Spinda's pixels
+ (destPixels) is an 8 bit pointer, so it addresses two pixels. Shifting by 4 accesses the 2nd
+ of these pixels, so this is done every other time.
+*/
+#define DRAW_SPINDA_SPOTS(personality, dest) \
{ \
- int i; \
- for (i = 0; i < 4; i++) \
+ s32 i; \
+ for (i = 0; i < (s32)ARRAY_COUNT(gSpindaSpotGraphics); i++) \
{ \
- int j; \
+ s32 row; \
u8 x = gSpindaSpotGraphics[i].x + ((personality & 0x0F) - 8); \
u8 y = gSpindaSpotGraphics[i].y + (((personality & 0xF0) >> 4) - 8); \
\
- for (j = 0; j < 16; j++) \
+ for (row = 0; row < SPINDA_SPOT_HEIGHT; row++) \
{ \
- int k; \
- s32 row = gSpindaSpotGraphics[i].image[j]; \
+ s32 column; \
+ s32 spotPixelRow = gSpindaSpotGraphics[i].image[row]; \
\
- for (k = x; k < x + 16; k++) \
+ for (column = x; column < x + SPINDA_SPOT_WIDTH; column++) \
{ \
- u8 *val = dest + ((k / 8) * 32) + \
- ((k % 8) / 2) + \
- ((y >> 3) << 8) + \
- ((y & 7) << 2); \
+ /* Get target pixels on Spinda's sprite */ \
+ u8 *destPixels = dest + ((column / 8) * TILE_SIZE_4BPP) + \
+ ((column % 8) / 2) + \
+ ((y / 8) * TILE_SIZE_4BPP * 8) + \
+ ((y % 8) * 4); \
\
- if (row & 1) \
+ /* Is this pixel in the 16x16 spot image part of the spot? */ \
+ if (spotPixelRow & 1) \
{ \
- if (k & 1) \
+ /* destPixels addressess two pixels, alternate which */ \
+ /* of the two pixels is being considered for drawing */ \
+ if (column & 1) \
{ \
- if ((u8)((*val & 0xF0) - 0x10) <= 0x20) \
- *val += 0x40; \
+ /* Draw spot pixel if this is Spinda's body color */ \
+ if ((u8)((*destPixels & 0xF0) - (FIRST_SPOT_COLOR << 4))\
+ <= ((LAST_SPOT_COLOR - FIRST_SPOT_COLOR) << 4))\
+ *destPixels += (SPOT_COLOR_ADJUSTMENT << 4); \
} \
else \
{ \
- if ((u8)((*val & 0xF) - 0x01) <= 0x02) \
- *val += 0x04; \
+ /* Draw spot pixel if this is Spinda's body color */ \
+ if ((u8)((*destPixels & 0xF) - FIRST_SPOT_COLOR) \
+ <= (LAST_SPOT_COLOR - FIRST_SPOT_COLOR)) \
+ *destPixels += SPOT_COLOR_ADJUSTMENT; \
} \
} \
\
- row >>= 1; \
+ spotPixelRow >>= 1; \
} \
\
y++; \
@@ -5705,13 +5744,13 @@ static void DrawSpindaSpotsUnused(u16 species, u32 personality, u8 *dest)
if (species == SPECIES_SPINDA
&& dest != gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT]
&& dest != gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_RIGHT])
- DRAW_SPINDA_SPOTS;
+ DRAW_SPINDA_SPOTS(personality, dest);
}
void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, bool8 isFrontPic)
{
if (species == SPECIES_SPINDA && isFrontPic)
- DRAW_SPINDA_SPOTS;
+ DRAW_SPINDA_SPOTS(personality, dest);
}
void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies)
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index c5aeb6b47..10c69a422 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -365,7 +365,7 @@ struct TilemapCtrl
u8 field_9;
};
-static const u16 sStatusTilemap[] = INCBIN_U16("graphics/interface/status_tilemap.bin");
+static const u16 sStatusTilemap[] = INCBIN_U16("graphics/summary_screen/status_tilemap.bin");
static const struct TilemapCtrl sStatusTilemapCtrl1 =
{
sStatusTilemap, 1, 10, 2, 0, 18
@@ -376,11 +376,11 @@ static const struct TilemapCtrl sStatusTilemapCtrl2 =
};
static const struct TilemapCtrl sBattleMoveTilemapCtrl =
{
- gSummaryScreenPowAcc_Tilemap, 0, 10, 7, 0, 45
+ gSummaryScreen_MoveEffect_Battle_Tilemap, 0, 10, 7, 0, 45
};
static const struct TilemapCtrl sContestMoveTilemapCtrl =
{
- gSummaryScreenAppealJam_Tilemap, 0, 10, 7, 0, 45
+ gSummaryScreen_MoveEffect_Contest_Tilemap, 0, 10, 7, 0, 45
};
static const s8 sMultiBattleOrder[] = {0, 2, 3, 1, 4, 5};
static const struct WindowTemplate sSummaryTemplate[] =
@@ -701,8 +701,8 @@ static const u8 sTextColors[][3] =
{0, 7, 8}
};
-static const u8 sSummaryAButtonBitmap[] = INCBIN_U8("graphics/interface/summary_a_button.4bpp");
-static const u8 sSummaryBButtonBitmap[] = INCBIN_U8("graphics/interface/summary_b_button.4bpp");
+static const u8 sAButton_Gfx[] = INCBIN_U8("graphics/summary_screen/a_button.4bpp");
+static const u8 sBButton_Gfx[] = INCBIN_U8("graphics/summary_screen/b_button.4bpp");
static void (*const sTextPrinterFunctions[])(void) =
{
@@ -1071,7 +1071,7 @@ static const struct SpriteTemplate sSpriteTemplate_StatusCondition =
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy
};
-static const u16 sSummaryMarkingsPalette[] = INCBIN_U16("graphics/interface/summary_markings.gbapal");
+static const u16 sMarkings_Pal[] = INCBIN_U16("graphics/summary_screen/markings.gbapal");
// code
void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void))
@@ -1312,7 +1312,7 @@ static bool8 DecompressGraphics(void)
}
break;
case 2:
- LZDecompressWram(gSummaryPage_InfoCopy_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]);
+ LZDecompressWram(gSummaryPage_InfoEgg_Tilemap, sMonSummaryScreen->bgTilemapBuffers[PSS_PAGE_INFO][1]);
sMonSummaryScreen->switchCounter++;
break;
case 3:
@@ -2551,6 +2551,7 @@ static void Task_ShowStatusWindow(u8 taskId)
}
}
+// Toggles the "Cancel" window that appears when selecting a move
static void TilemapFiveMovesDisplay(u16 *dst, u16 palette, bool8 remove)
{
u16 i, id;
@@ -2561,18 +2562,18 @@ static void TilemapFiveMovesDisplay(u16 *dst, u16 palette, bool8 remove)
{
for (i = 0; i < 20; i++)
{
- dst[id + i] = gSummaryScreenWindow_Tilemap[i] + palette;
- dst[id + i + 0x20] = gSummaryScreenWindow_Tilemap[i] + palette;
- dst[id + i + 0x40] = gSummaryScreenWindow_Tilemap[i + 20] + palette;
+ dst[id + i] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i] + palette;
+ dst[id + i + 0x20] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i] + palette;
+ dst[id + i + 0x40] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 20] + palette;
}
}
else // Remove
{
for (i = 0; i < 20; i++)
{
- dst[id + i] = gSummaryScreenWindow_Tilemap[i + 20] + palette;
- dst[id + i + 0x20] = gSummaryScreenWindow_Tilemap[i + 40] + palette;
- dst[id + i + 0x40] = gSummaryScreenWindow_Tilemap[i + 40] + palette;
+ dst[id + i] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 20] + palette;
+ dst[id + i + 0x20] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 40] + palette;
+ dst[id + i + 0x40] = gSummaryScreen_MoveEffect_Cancel_Tilemap[i + 40] + palette;
}
}
}
@@ -2788,8 +2789,8 @@ static void PrintGenderSymbol(struct Pokemon *mon, u16 species)
static void PrintAOrBButtonIcon(u8 windowId, bool8 bButton, u32 x)
{
- // sSummaryBButtonBitmap - 0x80 = sSummaryAButtonBitmap
- BlitBitmapToWindow(windowId, (bButton) ? sSummaryBButtonBitmap : sSummaryBButtonBitmap - 0x80, x, 0, 16, 16);
+ // sBButton_Gfx - sizeof(sBButton_Gfx) = sAButton_Gfx
+ BlitBitmapToWindow(windowId, (bButton) ? sBButton_Gfx : sBButton_Gfx - sizeof(sBButton_Gfx), x, 0, 16, 16);
}
static void PrintPageNamesAndStats(void)
@@ -4011,7 +4012,7 @@ static void StopPokemonAnimations(void) // A subtle effect, this function stops
static void CreateMonMarkingsSprite(struct Pokemon *mon)
{
- struct Sprite *sprite = CreateMonMarkingAllCombosSprite(TAG_MON_MARKINGS, TAG_MON_MARKINGS, sSummaryMarkingsPalette);
+ struct Sprite *sprite = CreateMonMarkingAllCombosSprite(TAG_MON_MARKINGS, TAG_MON_MARKINGS, sMarkings_Pal);
sMonSummaryScreen->markingsSprite = sprite;
if (sprite != NULL)
diff --git a/src/region_map.c b/src/region_map.c
index 0dc902674..09e2d69bf 100644
--- a/src/region_map.c
+++ b/src/region_map.c
@@ -1516,28 +1516,26 @@ static void UnhideRegionMapPlayerIcon(void)
}
}
+#define sY data[0]
+#define sX data[1]
+#define sVisible data[2]
+#define sTimer data[7]
+
static void SpriteCB_PlayerIconMapZoomed(struct Sprite *sprite)
{
sprite->x2 = -2 * gRegionMap->scrollX;
sprite->y2 = -2 * gRegionMap->scrollY;
- sprite->data[0] = sprite->y + sprite->y2 + sprite->centerToCornerVecY;
- sprite->data[1] = sprite->x + sprite->x2 + sprite->centerToCornerVecX;
- if (sprite->data[0] < -8 || sprite->data[0] > 0xa8 || sprite->data[1] < -8 || sprite->data[1] > 0xf8)
- {
- sprite->data[2] = FALSE;
- }
+ sprite->sY = sprite->y + sprite->y2 + sprite->centerToCornerVecY;
+ sprite->sX = sprite->x + sprite->x2 + sprite->centerToCornerVecX;
+ if (sprite->sY < -8 || sprite->sY > DISPLAY_HEIGHT + 8 || sprite->sX < -8 || sprite->sX > DISPLAY_WIDTH + 8)
+ sprite->sVisible = FALSE;
else
- {
- sprite->data[2] = TRUE;
- }
- if (sprite->data[2] == TRUE)
- {
+ sprite->sVisible = TRUE;
+
+ if (sprite->sVisible == TRUE)
SpriteCB_PlayerIcon(sprite);
- }
else
- {
sprite->invisible = TRUE;
- }
}
static void SpriteCB_PlayerIconMapFull(struct Sprite *sprite)
@@ -1549,9 +1547,9 @@ static void SpriteCB_PlayerIcon(struct Sprite *sprite)
{
if (gRegionMap->blinkPlayerIcon)
{
- if (++sprite->data[7] > 16)
+ if (++sprite->sTimer > 16)
{
- sprite->data[7] = 0;
+ sprite->sTimer = 0;
sprite->invisible = sprite->invisible ? FALSE : TRUE;
}
}
@@ -1567,6 +1565,11 @@ void TrySetPlayerIconBlink(void)
gRegionMap->blinkPlayerIcon = TRUE;
}
+#undef sY
+#undef sX
+#undef sVisible
+#undef sTimer
+
u8 *GetMapName(u8 *dest, u16 regionMapId, u16 padLength)
{
u8 *str;
@@ -1709,7 +1712,7 @@ void CB2_OpenFlyMap(void)
gMain.state++;
break;
case 7:
- LoadPalette(sRegionMapFramePal, 0x10, 0x20);
+ LoadPalette(sRegionMapFramePal, 0x10, sizeof(sRegionMapFramePal));
PutWindowTilemap(2);
FillWindowPixelBuffer(2, PIXEL_FILL(0));
AddTextPrinterParameterized(2, FONT_NORMAL, gText_FlyToWhere, 0, 1, 0, NULL);
diff --git a/src/rotating_gate.c b/src/rotating_gate.c
index 23fbb3e1d..f839d22c3 100644
--- a/src/rotating_gate.c
+++ b/src/rotating_gate.c
@@ -219,14 +219,14 @@ static const struct RotatingGatePuzzle sRotatingGate_TrickHousePuzzleConfig[] =
{10, 19, GATE_SHAPE_L3, GATE_ORIENTATION_180},
};
-static const u8 sRotatingGateTiles_1[] = INCBIN_U8("graphics/misc/rotating_gate_1.4bpp");
-static const u8 sRotatingGateTiles_2[] = INCBIN_U8("graphics/misc/rotating_gate_2.4bpp");
-static const u8 sRotatingGateTiles_3[] = INCBIN_U8("graphics/misc/rotating_gate_3.4bpp");
-static const u8 sRotatingGateTiles_4[] = INCBIN_U8("graphics/misc/rotating_gate_4.4bpp");
-static const u8 sRotatingGateTiles_5[] = INCBIN_U8("graphics/misc/rotating_gate_5.4bpp");
-static const u8 sRotatingGateTiles_6[] = INCBIN_U8("graphics/misc/rotating_gate_6.4bpp");
-static const u8 sRotatingGateTiles_7[] = INCBIN_U8("graphics/misc/rotating_gate_7.4bpp");
-static const u8 sRotatingGateTiles_8[] = INCBIN_U8("graphics/misc/rotating_gate_8.4bpp");
+static const u8 sRotatingGateTiles_1[] = INCBIN_U8("graphics/rotating_gates/l1.4bpp");
+static const u8 sRotatingGateTiles_2[] = INCBIN_U8("graphics/rotating_gates/l2.4bpp");
+static const u8 sRotatingGateTiles_3[] = INCBIN_U8("graphics/rotating_gates/l3.4bpp");
+static const u8 sRotatingGateTiles_4[] = INCBIN_U8("graphics/rotating_gates/l4.4bpp");
+static const u8 sRotatingGateTiles_5[] = INCBIN_U8("graphics/rotating_gates/t1.4bpp");
+static const u8 sRotatingGateTiles_6[] = INCBIN_U8("graphics/rotating_gates/t2.4bpp");
+static const u8 sRotatingGateTiles_7[] = INCBIN_U8("graphics/rotating_gates/t3.4bpp");
+static const u8 sRotatingGateTiles_8[] = INCBIN_U8("graphics/rotating_gates/t4.4bpp");
static const struct OamData sOamData_RotatingGateLarge =
{
@@ -684,13 +684,11 @@ static void RotatingGate_LoadPuzzleConfig(void)
{
case PUZZLE_FORTREE_CITY_GYM:
gRotatingGate_PuzzleConfig = sRotatingGate_FortreePuzzleConfig;
- gRotatingGate_PuzzleCount =
- sizeof(sRotatingGate_FortreePuzzleConfig) / sizeof(struct RotatingGatePuzzle);
+ gRotatingGate_PuzzleCount = ARRAY_COUNT(sRotatingGate_FortreePuzzleConfig);
break;
case PUZZLE_ROUTE110_TRICK_HOUSE_PUZZLE6:
gRotatingGate_PuzzleConfig = sRotatingGate_TrickHousePuzzleConfig;
- gRotatingGate_PuzzleCount =
- sizeof(sRotatingGate_TrickHousePuzzleConfig) / sizeof(struct RotatingGatePuzzle);
+ gRotatingGate_PuzzleCount = ARRAY_COUNT(sRotatingGate_TrickHousePuzzleConfig);
break;
case PUZZLE_NONE:
default:
@@ -698,9 +696,7 @@ static void RotatingGate_LoadPuzzleConfig(void)
}
for (i = 0; i < ROTATING_GATE_PUZZLE_MAX - 1; i++)
- {
gRotatingGate_GateSpriteIds[i] = MAX_SPRITES;
- }
}
static void RotatingGate_CreateGatesWithinViewport(s16 deltaX, s16 deltaY)
@@ -773,7 +769,7 @@ static void SpriteCallback_RotatingGate(struct Sprite *sprite)
{
affineAnimation = orientation + 4;
- if (GetPlayerSpeed() != 1)
+ if (GetPlayerSpeed() != PLAYER_SPEED_NORMAL)
affineAnimation += 8;
PlaySE(SE_ROTATING_GATE);
@@ -783,7 +779,7 @@ static void SpriteCallback_RotatingGate(struct Sprite *sprite)
{
affineAnimation = orientation + 8;
- if (GetPlayerSpeed() != 1)
+ if (GetPlayerSpeed() != PLAYER_SPEED_NORMAL)
affineAnimation += 8;
PlaySE(SE_ROTATING_GATE);
diff --git a/src/scrcmd.c b/src/scrcmd.c
index a5a380759..44bd14c28 100644
--- a/src/scrcmd.c
+++ b/src/scrcmd.c
@@ -999,7 +999,7 @@ bool8 ScrCmd_applymovement(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_applymovement_at(struct ScriptContext *ctx)
+bool8 ScrCmd_applymovementat(struct ScriptContext *ctx)
{
u16 localId = VarGet(ScriptReadHalfword(ctx));
const void *movementScript = (const void *)ScriptReadWord(ctx);
@@ -1028,7 +1028,7 @@ bool8 ScrCmd_waitmovement(struct ScriptContext *ctx)
return TRUE;
}
-bool8 ScrCmd_waitmovement_at(struct ScriptContext *ctx)
+bool8 ScrCmd_waitmovementat(struct ScriptContext *ctx)
{
u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup;
@@ -1052,7 +1052,7 @@ bool8 ScrCmd_removeobject(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_removeobject_at(struct ScriptContext *ctx)
+bool8 ScrCmd_removeobjectat(struct ScriptContext *ctx)
{
u16 objectId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx);
@@ -1070,7 +1070,7 @@ bool8 ScrCmd_addobject(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_addobject_at(struct ScriptContext *ctx)
+bool8 ScrCmd_addobjectat(struct ScriptContext *ctx)
{
u16 objectId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx);
@@ -1108,7 +1108,7 @@ bool8 ScrCmd_copyobjectxytoperm(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_showobject_at(struct ScriptContext *ctx)
+bool8 ScrCmd_showobjectat(struct ScriptContext *ctx)
{
u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx);
@@ -1118,7 +1118,7 @@ bool8 ScrCmd_showobject_at(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_hideobject_at(struct ScriptContext *ctx)
+bool8 ScrCmd_hideobjectat(struct ScriptContext *ctx)
{
u16 localId = VarGet(ScriptReadHalfword(ctx));
u8 mapGroup = ScriptReadByte(ctx);
diff --git a/src/shop.c b/src/shop.c
index e011c4f62..700a53e37 100755
--- a/src/shop.c
+++ b/src/shop.c
@@ -674,9 +674,9 @@ static void BuyMenuInitBgs(void)
static void BuyMenuDecompressBgGraphics(void)
{
- DecompressAndCopyTileDataToVram(1, gBuyMenuFrame_Gfx, 0x3A0, 0x3E3, 0);
- LZDecompressWram(gBuyMenuFrame_Tilemap, sShopData->tilemapBuffers[0]);
- LoadCompressedPalette(gMenuMoneyPal, 0xC0, 0x20);
+ DecompressAndCopyTileDataToVram(1, gShopMenu_Gfx, 0x3A0, 0x3E3, 0);
+ LZDecompressWram(gShopMenu_Tilemap, sShopData->tilemapBuffers[0]);
+ LoadCompressedPalette(gShopMenu_Pal, 0xC0, 0x20);
}
static void BuyMenuInitWindows(void)
diff --git a/src/starter_choose.c b/src/starter_choose.c
index ca393c4d8..81a88e771 100644
--- a/src/starter_choose.c
+++ b/src/starter_choose.c
@@ -53,17 +53,17 @@ static u16 sStarterLabelWindowId;
const u16 gBirchBagGrassPal[][16] =
{
- INCBIN_U16("graphics/misc/birch_bag.gbapal"),
- INCBIN_U16("graphics/misc/birch_grass.gbapal"),
+ INCBIN_U16("graphics/starter_choose/birch_bag.gbapal"),
+ INCBIN_U16("graphics/starter_choose/birch_grass.gbapal"),
};
-static const u16 sPokeballSelection_Pal[] = INCBIN_U16("graphics/misc/pokeball_selection.gbapal");
-static const u16 sStarterCircle_Pal[] = INCBIN_U16("graphics/misc/starter_circle.gbapal");
-const u32 gBirchBagTilemap[] = INCBIN_U32("graphics/misc/birch_bag_map.bin.lz");
-const u32 gBirchGrassTilemap[] = INCBIN_U32("graphics/misc/birch_grass_map.bin.lz");
-const u32 gBirchHelpGfx[] = INCBIN_U32("graphics/misc/birch_help.4bpp.lz"); // Birch bag and grass combined
-const u32 gPokeballSelection_Gfx[] = INCBIN_U32("graphics/misc/pokeball_selection.4bpp.lz");
-static const u32 sStarterCircle_Gfx[] = INCBIN_U32("graphics/misc/starter_circle.4bpp.lz");
+static const u16 sPokeballSelection_Pal[] = INCBIN_U16("graphics/starter_choose/pokeball_selection.gbapal");
+static const u16 sStarterCircle_Pal[] = INCBIN_U16("graphics/starter_choose/starter_circle.gbapal");
+const u32 gBirchBagTilemap[] = INCBIN_U32("graphics/starter_choose/birch_bag.bin.lz");
+const u32 gBirchGrassTilemap[] = INCBIN_U32("graphics/starter_choose/birch_grass.bin.lz");
+const u32 gBirchHelpGfx[] = INCBIN_U32("graphics/starter_choose/birch_help.4bpp.lz"); // Birch bag and grass combined
+const u32 gPokeballSelection_Gfx[] = INCBIN_U32("graphics/starter_choose/pokeball_selection.4bpp.lz");
+static const u32 sStarterCircle_Gfx[] = INCBIN_U32("graphics/starter_choose/starter_circle.4bpp.lz");
static const struct WindowTemplate sWindowTemplates[] =
{
diff --git a/src/trainer_hill.c b/src/trainer_hill.c
index bf988b49a..39c6202a0 100644
--- a/src/trainer_hill.c
+++ b/src/trainer_hill.c
@@ -199,7 +199,7 @@ static const u16 *const *const sPrizeListSets[] =
sPrizeLists2
};
-static const u16 sEReader_Pal[] = INCBIN_U16("graphics/misc/trainer_hill_ereader.gbapal");
+static const u16 sEReader_Pal[] = INCBIN_U16("graphics/trainer_hill/ereader.gbapal");
static const u8 sRecordWinColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY};
static const struct TrHillTag *const sDataPerTag[] =
diff --git a/src/trainer_see.c b/src/trainer_see.c
index ce06c5e9c..07021a316 100644
--- a/src/trainer_see.c
+++ b/src/trainer_see.c
@@ -59,9 +59,9 @@ bool8 gTrainerApproachedPlayer;
EWRAM_DATA u8 gApproachingTrainerId = 0;
// const rom data
-static const u8 sEmotion_ExclamationMarkGfx[] = INCBIN_U8("graphics/misc/emotion_exclamation.4bpp");
-static const u8 sEmotion_QuestionMarkGfx[] = INCBIN_U8("graphics/misc/emotion_question.4bpp");
-static const u8 sEmotion_HeartGfx[] = INCBIN_U8("graphics/misc/emotion_heart.4bpp");
+static const u8 sEmotion_ExclamationMarkGfx[] = INCBIN_U8("graphics/field_effects/pics/emotion_exclamation.4bpp");
+static const u8 sEmotion_QuestionMarkGfx[] = INCBIN_U8("graphics/field_effects/pics/emotion_question.4bpp");
+static const u8 sEmotion_HeartGfx[] = INCBIN_U8("graphics/field_effects/pics/emotion_heart.4bpp");
static u8 (*const sDirectionalApproachDistanceFuncs[])(struct ObjectEvent *trainerObj, s16 range, s16 x, s16 y) =
{
diff --git a/src/wallclock.c b/src/wallclock.c
index 759b1d11f..5e0fae3a1 100644
--- a/src/wallclock.c
+++ b/src/wallclock.c
@@ -41,6 +41,8 @@ static void SpriteCB_HourHand(struct Sprite *sprite);
static void SpriteCB_PMIndicator(struct Sprite *sprite);
static void SpriteCB_AMIndicator(struct Sprite *sprite);
+#define sTaskId data[0]
+
#define tMinuteHandAngle data[0]
#define tHourHandAngle data[1]
#define tHours data[2]
@@ -696,21 +698,21 @@ void CB2_StartWallClock(void)
gTasks[taskId].tHourHandAngle = 300;
spriteId = CreateSprite(&sSpriteTemplate_MinuteHand, 120, 80, 1);
- gSprites[spriteId].data[0] = taskId;
+ gSprites[spriteId].sTaskId = taskId;
gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL;
gSprites[spriteId].oam.matrixNum = 0;
spriteId = CreateSprite(&sSpriteTemplate_HourHand, 120, 80, 0);
- gSprites[spriteId].data[0] = taskId;
+ gSprites[spriteId].sTaskId = taskId;
gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL;
gSprites[spriteId].oam.matrixNum = 1;
spriteId = CreateSprite(&sSpriteTemplate_PM, 120, 80, 2);
- gSprites[spriteId].data[0] = taskId;
+ gSprites[spriteId].sTaskId = taskId;
gSprites[spriteId].data[1] = 45;
spriteId = CreateSprite(&sSpriteTemplate_AM, 120, 80, 2);
- gSprites[spriteId].data[0] = taskId;
+ gSprites[spriteId].sTaskId = taskId;
gSprites[spriteId].data[1] = 90;
WallClockInit();
@@ -744,21 +746,21 @@ void CB2_ViewWallClock(void)
}
spriteId = CreateSprite(&sSpriteTemplate_MinuteHand, 120, 80, 1);
- gSprites[spriteId].data[0] = taskId;
+ gSprites[spriteId].sTaskId = taskId;
gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL;
gSprites[spriteId].oam.matrixNum = 0;
spriteId = CreateSprite(&sSpriteTemplate_HourHand, 120, 80, 0);
- gSprites[spriteId].data[0] = taskId;
+ gSprites[spriteId].sTaskId = taskId;
gSprites[spriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL;
gSprites[spriteId].oam.matrixNum = 1;
spriteId = CreateSprite(&sSpriteTemplate_PM, 120, 80, 2);
- gSprites[spriteId].data[0] = taskId;
+ gSprites[spriteId].sTaskId = taskId;
gSprites[spriteId].data[1] = angle1;
spriteId = CreateSprite(&sSpriteTemplate_AM, 120, 80, 2);
- gSprites[spriteId].data[0] = taskId;
+ gSprites[spriteId].sTaskId = taskId;
gSprites[spriteId].data[1] = angle2;
WallClockInit();
@@ -1015,7 +1017,7 @@ static void InitClockWithRtc(u8 taskId)
static void SpriteCB_MinuteHand(struct Sprite *sprite)
{
- u16 angle = gTasks[sprite->data[0]].tMinuteHandAngle;
+ u16 angle = gTasks[sprite->sTaskId].tMinuteHandAngle;
s16 sin = Sin2(angle) / 16;
s16 cos = Cos2(angle) / 16;
u16 x, y;
@@ -1035,7 +1037,7 @@ static void SpriteCB_MinuteHand(struct Sprite *sprite)
static void SpriteCB_HourHand(struct Sprite *sprite)
{
- u16 angle = gTasks[sprite->data[0]].tHourHandAngle;
+ u16 angle = gTasks[sprite->sTaskId].tHourHandAngle;
s16 sin = Sin2(angle) / 16;
s16 cos = Cos2(angle) / 16;
u16 x, y;
@@ -1053,58 +1055,44 @@ static void SpriteCB_HourHand(struct Sprite *sprite)
sprite->y2 = y;
}
+#define sAngle data[1]
+
static void SpriteCB_PMIndicator(struct Sprite *sprite)
{
- if (gTasks[sprite->data[0]].tPeriod != PERIOD_AM)
+ if (gTasks[sprite->sTaskId].tPeriod != PERIOD_AM)
{
- if (sprite->data[1] >= 60 && sprite->data[1] < 90)
- {
- sprite->data[1] += 5;
- }
- if (sprite->data[1] < 60)
- {
- sprite->data[1]++;
- }
+ if (sprite->sAngle >= 60 && sprite->sAngle < 90)
+ sprite->sAngle += 5;
+ if (sprite->sAngle < 60)
+ sprite->sAngle++;
}
else
{
- if (sprite->data[1] >= 46 && sprite->data[1] < 76)
- {
- sprite->data[1] -= 5;
- }
- if (sprite->data[1] > 75)
- {
- sprite->data[1]--;
- }
+ if (sprite->sAngle >= 46 && sprite->sAngle < 76)
+ sprite->sAngle -= 5;
+ if (sprite->sAngle > 75)
+ sprite->sAngle--;
}
- sprite->x2 = Cos2(sprite->data[1]) * 30 / 0x1000;
- sprite->y2 = Sin2(sprite->data[1]) * 30 / 0x1000;
+ sprite->x2 = Cos2(sprite->sAngle) * 30 / 0x1000;
+ sprite->y2 = Sin2(sprite->sAngle) * 30 / 0x1000;
}
static void SpriteCB_AMIndicator(struct Sprite *sprite)
{
- if (gTasks[sprite->data[0]].tPeriod != PERIOD_AM)
+ if (gTasks[sprite->sTaskId].tPeriod != PERIOD_AM)
{
- if (sprite->data[1] >= 105 && sprite->data[1] < 135)
- {
- sprite->data[1] += 5;
- }
- if (sprite->data[1] < 105)
- {
- sprite->data[1]++;
- }
+ if (sprite->sAngle >= 105 && sprite->sAngle < 135)
+ sprite->sAngle += 5;
+ if (sprite->sAngle < 105)
+ sprite->sAngle++;
}
else
{
- if (sprite->data[1] >= 91 && sprite->data[1] < 121)
- {
- sprite->data[1] -= 5;
- }
- if (sprite->data[1] > 120)
- {
- sprite->data[1]--;
- }
+ if (sprite->sAngle >= 91 && sprite->sAngle < 121)
+ sprite->sAngle -= 5;
+ if (sprite->sAngle > 120)
+ sprite->sAngle--;
}
- sprite->x2 = Cos2(sprite->data[1]) * 30 / 0x1000;
- sprite->y2 = Sin2(sprite->data[1]) * 30 / 0x1000;
+ sprite->x2 = Cos2(sprite->sAngle) * 30 / 0x1000;
+ sprite->y2 = Sin2(sprite->sAngle) * 30 / 0x1000;
}
diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c
index ffb86488a..1fbd83fcd 100644
--- a/src/wireless_communication_status_screen.c
+++ b/src/wireless_communication_status_screen.c
@@ -51,9 +51,9 @@ static void Task_WirelessCommunicationScreen(u8);
static void WCSS_AddTextPrinterParameterized(u8, u8, const u8 *, u8, u8, u8);
static bool32 UpdateCommunicationCounts(u32 *, u32 *, u32 *, u8);
-static const u16 sBgTiles_Pal[] = INCBIN_U16("graphics/interface/wireless_info_screen.gbapal");
-static const u32 sBgTiles_Gfx[] = INCBIN_U32("graphics/interface/wireless_info_screen.4bpp.lz");
-static const u32 sBgTiles_Tilemap[] = INCBIN_U32("graphics/interface/wireless_info_screen.bin.lz");
+static const u16 sBgTiles_Pal[] = INCBIN_U16("graphics/link/wireless_info_screen.gbapal");
+static const u32 sBgTiles_Gfx[] = INCBIN_U32("graphics/link/wireless_info_screen.4bpp.lz");
+static const u32 sBgTiles_Tilemap[] = INCBIN_U32("graphics/link/wireless_info_screen.bin.lz");
static const struct BgTemplate sBgTemplates[] = {
{