summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data/party_menu.h36
-rw-r--r--src/evolution_graphics.c10
-rwxr-xr-xsrc/item_use.c8
-rw-r--r--src/m4a.c2
-rw-r--r--src/money.c2
-rwxr-xr-xsrc/party_menu.c24
6 files changed, 31 insertions, 51 deletions
diff --git a/src/data/party_menu.h b/src/data/party_menu.h
index f8093a9b6..7735dae58 100644
--- a/src/data/party_menu.h
+++ b/src/data/party_menu.h
@@ -571,34 +571,14 @@ static const struct WindowTemplate sUnusedWindowTemplate2 =
.baseBlock = 0x39D,
};
-// Tile nums
-static const u8 sMainSlotTileNums[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26,
- 32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
- 32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
- 32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
- 40, 59, 60, 58, 58, 58, 58, 58, 58, 61,
- 15, 16, 16, 16, 16, 16, 16, 16, 16, 17,
- 46, 47, 47, 47, 47, 47, 47, 47, 47, 48};
-
-static const u8 sMainSlotTileNums_Egg[] = {24, 25, 25, 25, 25, 25, 25, 25, 25, 26,
- 32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
- 32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
- 32, 33, 33, 33, 33, 33, 33, 33, 33, 34,
- 40, 41, 41, 41, 41, 41, 41, 41, 41, 42,
- 15, 16, 16, 16, 16, 16, 16, 16, 16, 17,
- 46, 47, 47, 47, 47, 47, 47, 47, 47, 48};
-
-static const u8 sOtherSlotsTileNums[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45,
- 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54,
- 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57};
-
-static const u8 sOtherSlotsTileNums_Egg[] = {43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45,
- 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50,
- 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57};
-
-static const u8 sEmptySlotTileNums[] = {21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23,
- 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31,
- 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39};
+// Plain tilemaps for party menu slots.
+// The versions with no HP bar are used by eggs, and in certain displays like registering at a battle facility.
+// There is no empty version of the main slot because it shouldn't ever be empty.
+static const u8 sSlotTilemap_Main[] = INCBIN_U8("graphics/party_menu/slot_main.bin");
+static const u8 sSlotTilemap_MainNoHP[] = INCBIN_U8("graphics/party_menu/slot_main_no_hp.bin");
+static const u8 sSlotTilemap_Wide[] = INCBIN_U8("graphics/party_menu/slot_wide.bin");
+static const u8 sSlotTilemap_WideNoHP[] = INCBIN_U8("graphics/party_menu/slot_wide_no_hp.bin");
+static const u8 sSlotTilemap_WideEmpty[] = INCBIN_U8("graphics/party_menu/slot_wide_empty.bin");
// Palette offsets
static const u8 sGenderPalOffsets[] = {11, 12};
diff --git a/src/evolution_graphics.c b/src/evolution_graphics.c
index 50098743d..5d17cca84 100644
--- a/src/evolution_graphics.c
+++ b/src/evolution_graphics.c
@@ -501,12 +501,12 @@ static void SpriteCB_EvolutionMonSprite(struct Sprite* sprite)
u8 CycleEvolutionMonSprite(u8 preEvoSpriteId, u8 postEvoSpriteId)
{
u16 i;
- u16 stack[16];
+ u16 monPalette[16];
u8 taskId;
s32 toDiv;
- for (i = 0; i < ARRAY_COUNT(stack); i++)
- stack[i] = 0x7FFF;
+ for (i = 0; i < ARRAY_COUNT(monPalette); i++)
+ monPalette[i] = RGB_WHITE;
taskId = CreateTask(Task_CycleEvolutionMonSprite_Init, 0);
gTasks[taskId].tPreEvoSpriteId = preEvoSpriteId;
@@ -522,13 +522,13 @@ u8 CycleEvolutionMonSprite(u8 preEvoSpriteId, u8 postEvoSpriteId)
gSprites[preEvoSpriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL;
gSprites[preEvoSpriteId].oam.matrixNum = MATRIX_PRE_EVO;
gSprites[preEvoSpriteId].invisible = FALSE;
- CpuSet(stack, &gPlttBufferFaded[0x100 + (gSprites[preEvoSpriteId].oam.paletteNum * 16)], 16);
+ CpuSet(monPalette, &gPlttBufferFaded[0x100 + (gSprites[preEvoSpriteId].oam.paletteNum * 16)], 16);
gSprites[postEvoSpriteId].callback = SpriteCB_EvolutionMonSprite;
gSprites[postEvoSpriteId].oam.affineMode = ST_OAM_AFFINE_NORMAL;
gSprites[postEvoSpriteId].oam.matrixNum = MATRIX_POST_EVO;
gSprites[postEvoSpriteId].invisible = FALSE;
- CpuSet(stack, &gPlttBufferFaded[0x100 + (gSprites[postEvoSpriteId].oam.paletteNum * 16)], 16);
+ CpuSet(monPalette, &gPlttBufferFaded[0x100 + (gSprites[postEvoSpriteId].oam.paletteNum * 16)], 16);
gTasks[taskId].tEvoStopped = FALSE;
return taskId;
diff --git a/src/item_use.c b/src/item_use.c
index c9a7fe1c7..c03ede61b 100755
--- a/src/item_use.c
+++ b/src/item_use.c
@@ -403,25 +403,25 @@ static bool8 IsHiddenItemPresentInConnection(struct MapConnection *connection, i
switch (connection->direction)
{
// same weird temp variable behavior seen in IsHiddenItemPresentAtCoords
- case 2:
+ case CONNECTION_NORTH:
localOffset = connection->offset + MAP_OFFSET;
localX = x - localOffset;
localLength = mapHeader->mapLayout->height - MAP_OFFSET;
localY = localLength + y; // additions are reversed for some reason
break;
- case 1:
+ case CONNECTION_SOUTH:
localOffset = connection->offset + MAP_OFFSET;
localX = x - localOffset;
localLength = gMapHeader.mapLayout->height + MAP_OFFSET;
localY = y - localLength;
break;
- case 3:
+ case CONNECTION_WEST:
localLength = mapHeader->mapLayout->width - MAP_OFFSET;
localX = localLength + x; // additions are reversed for some reason
localOffset = connection->offset + MAP_OFFSET;
localY = y - localOffset;
break;
- case 4:
+ case CONNECTION_EAST:
localLength = gMapHeader.mapLayout->width + MAP_OFFSET;
localX = x - localLength;
localOffset = connection->offset + MAP_OFFSET;
diff --git a/src/m4a.c b/src/m4a.c
index b159e3873..faeef83e7 100644
--- a/src/m4a.c
+++ b/src/m4a.c
@@ -83,7 +83,7 @@ void m4aSoundInit(void)
for (i = 0; i < NUM_MUSIC_PLAYERS; i++)
{
struct MusicPlayerInfo *mplayInfo = gMPlayTable[i].info;
- MPlayOpen(mplayInfo, gMPlayTable[i].track, gMPlayTable[i].unk_8);
+ MPlayOpen(mplayInfo, gMPlayTable[i].track, gMPlayTable[i].numTracks);
mplayInfo->unk_B = gMPlayTable[i].unk_A;
mplayInfo->memAccArea = gMPlayMemAccArea;
}
diff --git a/src/money.c b/src/money.c
index 592ce9f75..5723974a8 100644
--- a/src/money.c
+++ b/src/money.c
@@ -132,7 +132,7 @@ void SubtractMoneyFromVar0x8005(void)
void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, u8 speed)
{
- PrintMoneyAmount(windowId, 0x26, 1, amount, speed);
+ PrintMoneyAmount(windowId, 38, 1, amount, speed);
}
void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed)
diff --git a/src/party_menu.c b/src/party_menu.c
index 36e83a168..e15d001c6 100755
--- a/src/party_menu.c
+++ b/src/party_menu.c
@@ -97,7 +97,7 @@ enum
struct PartyMenuBoxInfoRects
{
- void (*blitFunc)(u8, u8, u8, u8, u8, u8);
+ void (*blitFunc)(u8, u8, u8, u8, u8, bool8);
u8 dimensions[24];
u8 descTextLeft;
u8 descTextTop;
@@ -377,8 +377,8 @@ static void Task_ChooseMonForMoveRelearner(u8);
static void CB2_ChooseMonForMoveRelearner(void);
static void Task_BattlePyramidChooseMonHeldItems(u8);
static void ShiftMoveSlot(struct Pokemon*, u8, u8);
-static void BlitBitmapToPartyWindow_LeftColumn(u8, u8, u8, u8, u8, u8);
-static void BlitBitmapToPartyWindow_RightColumn(u8, u8, u8, u8, u8, u8);
+static void BlitBitmapToPartyWindow_LeftColumn(u8, u8, u8, u8, u8, bool8);
+static void BlitBitmapToPartyWindow_RightColumn(u8, u8, u8, u8, u8, bool8);
static void CursorCb_Summary(u8);
static void CursorCb_Switch(u8);
static void CursorCb_Cancel1(u8);
@@ -2086,35 +2086,35 @@ static void BlitBitmapToPartyWindow(u8 windowId, const u8 *b, u8 c, u8 x, u8 y,
}
}
-static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg)
+static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP)
{
if (width == 0 && height == 0)
{
width = 10;
height = 7;
}
- if (isEgg == FALSE)
- BlitBitmapToPartyWindow(windowId, sMainSlotTileNums, 10, x, y, width, height);
+ if (hideHP == FALSE)
+ BlitBitmapToPartyWindow(windowId, sSlotTilemap_Main, 10, x, y, width, height);
else
- BlitBitmapToPartyWindow(windowId, sMainSlotTileNums_Egg, 10, x, y, width, height);
+ BlitBitmapToPartyWindow(windowId, sSlotTilemap_MainNoHP, 10, x, y, width, height);
}
-static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg)
+static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP)
{
if (width == 0 && height == 0)
{
width = 18;
height = 3;
}
- if (isEgg == FALSE)
- BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums, 18, x, y, width, height);
+ if (hideHP == FALSE)
+ BlitBitmapToPartyWindow(windowId, sSlotTilemap_Wide, 18, x, y, width, height);
else
- BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums_Egg, 18, x, y, width, height);
+ BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideNoHP, 18, x, y, width, height);
}
static void DrawEmptySlot(u8 windowId)
{
- BlitBitmapToPartyWindow(windowId, sEmptySlotTileNums, 18, 0, 0, 18, 3);
+ BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideEmpty, 18, 0, 0, 18, 3);
}
#define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \