Set unused tiles to transparent, document adjacent files
This commit is contained in:
+12
-12
@@ -1123,18 +1123,18 @@ const u32 gBag_Pal[] = INCBIN_U32("graphics/interface/bag.gbapal.lz");
|
||||
const u32 gSwapLine_Gfx[] = INCBIN_U32("graphics/interface/bag_swap.4bpp.lz");
|
||||
const u32 gSwapLine_Pal[] = INCBIN_U32("graphics/interface/bag_swap.gbapal.lz");
|
||||
|
||||
const u32 gUnknown_8E845D8[] = INCBIN_U32("graphics/tm_case/unk_8E845D8.4bpp.lz");
|
||||
const u32 gUnknown_8E84A24[] = INCBIN_U32("graphics/tm_case/unk_8E84A24.bin.lz");
|
||||
const u32 gUnknown_8E84B70[] = INCBIN_U32("graphics/tm_case/unk_8E84B70.bin.lz");
|
||||
const u32 gUnknown_8E84CB0[] = INCBIN_U32("graphics/tm_case/unk_8E84CB0.gbapal.lz");
|
||||
const u32 gUnknown_8E84D20[] = INCBIN_U32("graphics/tm_case/unk_8E84D20.gbapal.lz");
|
||||
const u32 gTMCase_TMSpriteGfx[] = INCBIN_U32("graphics/tm_case/unk_8E84D90.4bpp.lz");
|
||||
const u32 gUnknown_8E84F20[] = INCBIN_U32("graphics/tm_case/unk_8E84F20.gbapal.lz");
|
||||
const u32 gUnknown_8E85068[] = INCBIN_U32("graphics/tm_case/unk_8E85068.gbapal.lz");
|
||||
const u32 gTMCase_Gfx[] = INCBIN_U32("graphics/tm_case/tm_case.4bpp.lz");
|
||||
const u32 gTMCaseMenu_Tilemap[] = INCBIN_U32("graphics/tm_case/menu.bin.lz");
|
||||
const u32 gTMCase_Tilemap[] = INCBIN_U32("graphics/tm_case/tm_case.bin.lz");
|
||||
const u32 gTMCaseMenu_Male_Pal[] = INCBIN_U32("graphics/tm_case/menu_male.gbapal.lz");
|
||||
const u32 gTMCaseMenu_Female_Pal[] = INCBIN_U32("graphics/tm_case/menu_female.gbapal.lz");
|
||||
const u32 gTMCaseDisc_Gfx[] = INCBIN_U32("graphics/tm_case/disc.4bpp.lz");
|
||||
const u32 gTMCaseDiscTypes1_Pal[] = INCBIN_U32("graphics/tm_case/disc_types_1.gbapal.lz");
|
||||
const u32 gTMCaseDiscTypes2_Pal[] = INCBIN_U32("graphics/tm_case/disc_types_2.gbapal.lz");
|
||||
|
||||
const u8 gItemPcTiles[] = INCBIN_U8("graphics/item_pc/unk_8E85090.4bpp.lz");
|
||||
const u32 gItemPcBgPals[] = INCBIN_U32("graphics/item_pc/unk_8E85408.gbapal.lz");
|
||||
const u8 gItemPcTilemap[] = INCBIN_U8("graphics/item_pc/unk_8E85458.bin.lz");
|
||||
const u8 gItemPcTiles[] = INCBIN_U8("graphics/item_pc/bg.4bpp.lz");
|
||||
const u32 gItemPcBgPals[] = INCBIN_U32("graphics/item_pc/bg.gbapal.lz");
|
||||
const u8 gItemPcTilemap[] = INCBIN_U8("graphics/item_pc/bg.bin.lz");
|
||||
|
||||
const u32 gBerryPouchSpriteTiles[] = INCBIN_U32("graphics/berry_pouch/berry_pouch.4bpp.lz");
|
||||
const u8 gBerryPouchBgGfx[] = INCBIN_U8("graphics/berry_pouch/background.4bpp.lz");
|
||||
@@ -1212,7 +1212,7 @@ const u32 gNamingScreenPageSwapButton_Gfx[] = INCBIN_U32("graphics/naming_screen
|
||||
const u32 gNamingScreenInputArrow_Gfx[] = INCBIN_U32("graphics/naming_screen/input_arrow.4bpp");
|
||||
const u32 gNamingScreenUnderscore_Gfx[] = INCBIN_U32("graphics/naming_screen/underscore.4bpp");
|
||||
|
||||
const u8 gUnknown_8E99118[] = INCBIN_U8("graphics/tm_case/unk_8E99118.4bpp");
|
||||
const u8 gTMCaseHM_Gfx[] = INCBIN_U8("graphics/tm_case/hm.4bpp");
|
||||
|
||||
const u16 gKantoTrainerCard_Pal[] = INCBIN_U16("graphics/trainer_card/0star.gbapal");
|
||||
const u32 gKantoTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card.4bpp.lz");
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@ static void WakeSpriteCallback(struct Sprite *sprite);
|
||||
static void CreateSmokeSprite(void);
|
||||
static void SmokeSpriteCallback(struct Sprite *sprite);
|
||||
|
||||
static const u16 sWakeTiles[] = INCBIN_U16("graphics/ss_anne/unk_8479838.4bpp");
|
||||
static const u16 sSmokeTiles[] = INCBIN_U16("graphics/ss_anne/unk_8479A38.4bpp");
|
||||
static const u16 sWakeTiles[] = INCBIN_U16("graphics/ss_anne/wake.4bpp");
|
||||
static const u16 sSmokeTiles[] = INCBIN_U16("graphics/ss_anne/smoke.4bpp");
|
||||
|
||||
static const struct SpriteSheet sSpriteSheets[] = {
|
||||
{(const void *)sWakeTiles, sizeof(sWakeTiles), SPRITE_TAG_WAKE},
|
||||
|
||||
+20
-17
@@ -226,7 +226,7 @@ static const union AnimCmd *const sTMSpriteAnims[] = {
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet sTMSpriteSheet = {
|
||||
(const void *)gTMCase_TMSpriteGfx,
|
||||
(const void *)gTMCaseDisc_Gfx,
|
||||
0x400,
|
||||
TM_CASE_TM_TAG
|
||||
};
|
||||
@@ -241,7 +241,7 @@ static const struct SpriteTemplate sTMSpriteTemplate = {
|
||||
SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const u16 sTMSpritePaletteOffsetByType[] = {
|
||||
static const u16 sTMSpritePaletteOffsetByType[NUMBER_OF_MON_TYPES] = {
|
||||
[TYPE_NORMAL] = 0x000,
|
||||
[TYPE_FIRE] = 0x010,
|
||||
[TYPE_WATER] = 0x020,
|
||||
@@ -440,25 +440,25 @@ static bool8 HandleLoadTMCaseGraphicsAndPalettes(void)
|
||||
{
|
||||
case 0:
|
||||
ResetTempTileDataBuffers();
|
||||
DecompressAndCopyTileDataToVram(1, gUnknown_8E845D8, 0, 0, 0);
|
||||
DecompressAndCopyTileDataToVram(1, gTMCase_Gfx, 0, 0, 0);
|
||||
sTMCaseDynamicResources->seqId++;
|
||||
break;
|
||||
case 1:
|
||||
if (FreeTempTileDataBuffersIfPossible() != TRUE)
|
||||
{
|
||||
LZDecompressWram(gUnknown_8E84A24, sTilemapBuffer);
|
||||
LZDecompressWram(gTMCaseMenu_Tilemap, sTilemapBuffer);
|
||||
sTMCaseDynamicResources->seqId++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
LZDecompressWram(gUnknown_8E84B70, GetBgTilemapBuffer(1));
|
||||
LZDecompressWram(gTMCase_Tilemap, GetBgTilemapBuffer(1));
|
||||
sTMCaseDynamicResources->seqId++;
|
||||
break;
|
||||
case 3:
|
||||
if (gSaveBlock2Ptr->playerGender == MALE)
|
||||
LoadCompressedPalette(gUnknown_8E84CB0, 0, 0x80);
|
||||
LoadCompressedPalette(gTMCaseMenu_Male_Pal, 0, 0x80);
|
||||
else
|
||||
LoadCompressedPalette(gUnknown_8E84D20, 0, 0x80);
|
||||
LoadCompressedPalette(gTMCaseMenu_Female_Pal, 0, 0x80);
|
||||
sTMCaseDynamicResources->seqId++;
|
||||
break;
|
||||
case 4:
|
||||
@@ -1387,7 +1387,7 @@ static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId)
|
||||
|
||||
static void PlaceHMTileInWindow(u8 windowId, u8 x, u8 y)
|
||||
{
|
||||
BlitBitmapToWindow(windowId, gUnknown_8E99118, x, y, 16, 12);
|
||||
BlitBitmapToWindow(windowId, gTMCaseHM_Gfx, x, y, 16, 12);
|
||||
}
|
||||
|
||||
static void HandlePrintMoneyOnHand(void)
|
||||
@@ -1423,7 +1423,7 @@ static void RemoveTMContextMenu(u8 * a0)
|
||||
static u8 CreateTMSprite(u16 itemId)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&sTMSpriteTemplate, 0x29, 0x2E, 0);
|
||||
u8 r5;
|
||||
u8 tmIdx;
|
||||
if (itemId == ITEM_NONE)
|
||||
{
|
||||
UpdateTMSpritePosition(&gSprites[spriteId], 0xFF);
|
||||
@@ -1431,17 +1431,17 @@ static u8 CreateTMSprite(u16 itemId)
|
||||
}
|
||||
else
|
||||
{
|
||||
r5 = itemId - 33;
|
||||
SetTMSpriteAnim(&gSprites[spriteId], r5);
|
||||
tmIdx = itemId - ITEM_TM01;
|
||||
SetTMSpriteAnim(&gSprites[spriteId], tmIdx);
|
||||
TintTMSpriteByType(gBattleMoves[ItemIdToBattleMoveId(itemId)].type);
|
||||
UpdateTMSpritePosition(&gSprites[spriteId], r5);
|
||||
UpdateTMSpritePosition(&gSprites[spriteId], tmIdx);
|
||||
return spriteId;
|
||||
}
|
||||
}
|
||||
|
||||
static void SetTMSpriteAnim(struct Sprite *sprite, u8 idx)
|
||||
{
|
||||
if (idx >= 50)
|
||||
if (idx >= NUM_TECHNICAL_MACHINES)
|
||||
StartSpriteAnim(sprite, 1);
|
||||
else
|
||||
StartSpriteAnim(sprite, 0);
|
||||
@@ -1517,14 +1517,17 @@ static void SpriteCB_MoveTMSpriteInCase(struct Sprite *sprite)
|
||||
}
|
||||
}
|
||||
|
||||
// - 1 excludes TYPE_MYSTERY
|
||||
#define NUM_TM_COLORS ((NUMBER_OF_MON_TYPES - 1) * 16)
|
||||
|
||||
static void LoadTMTypePalettes(void)
|
||||
{
|
||||
struct SpritePalette spritePalette;
|
||||
|
||||
sTMSpritePaletteBuffer = Alloc(0x110 * sizeof(u16));
|
||||
LZDecompressWram(gUnknown_8E84F20, sTMSpritePaletteBuffer);
|
||||
LZDecompressWram(gUnknown_8E85068, sTMSpritePaletteBuffer + 0x100);
|
||||
spritePalette.data = sTMSpritePaletteBuffer + 0x110;
|
||||
sTMSpritePaletteBuffer = Alloc(NUM_TM_COLORS * sizeof(u16));
|
||||
LZDecompressWram(gTMCaseDiscTypes1_Pal, sTMSpritePaletteBuffer); // Decompress the first 16
|
||||
LZDecompressWram(gTMCaseDiscTypes2_Pal, sTMSpritePaletteBuffer + 0x100); // Decompress the rest (Only 17 total, this is just Dragon type)
|
||||
spritePalette.data = sTMSpritePaletteBuffer + NUM_TM_COLORS;
|
||||
spritePalette.tag = TM_CASE_TM_TAG;
|
||||
LoadSpritePalette(&spritePalette);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user