Give tileset palettes proper type, name compressed secret base tiles
This commit is contained in:
parent
4f407a1066
commit
65d3944a93
4 changed files with 12 additions and 16 deletions
|
@ -40,7 +40,7 @@ struct Tileset
|
|||
/*0x00*/ bool8 isCompressed;
|
||||
/*0x01*/ bool8 isSecondary;
|
||||
/*0x04*/ const u32 *tiles;
|
||||
/*0x08*/ const void *palettes;
|
||||
/*0x08*/ const u16 (*palettes)[16];
|
||||
/*0x0c*/ const u16 *metatiles;
|
||||
/*0x10*/ const u16 *metatileAttributes;
|
||||
/*0x14*/ TilesetCB callback;
|
||||
|
|
|
@ -681,7 +681,7 @@ const u16 gTilesetPalettes_RusturfTunnel[][16] =
|
|||
INCBIN_U16("data/tilesets/secondary/rusturf_tunnel/palettes/15.gbapal"),
|
||||
};
|
||||
|
||||
const u32 gUnusedTilesetTiles_SecretBaseBrownCave[] = INCBIN_U32("data/tilesets/secondary/secret_base/brown_cave/unused_tiles.4bpp.lz");
|
||||
const u32 gTilesetTiles_SecretBaseBrownCaveCompressed[] = INCBIN_U32("data/tilesets/secondary/secret_base/brown_cave/unused_tiles.4bpp.lz");
|
||||
|
||||
const u16 gTilesetPalettes_SecretBaseBrownCave[][16] =
|
||||
{
|
||||
|
@ -703,7 +703,7 @@ const u16 gTilesetPalettes_SecretBaseBrownCave[][16] =
|
|||
INCBIN_U16("data/tilesets/secondary/secret_base/brown_cave/palettes/15.gbapal"),
|
||||
};
|
||||
|
||||
const u32 gUnusedTilesetTiles_SecretBaseTree[] = INCBIN_U32("data/tilesets/secondary/secret_base/tree/unused_tiles.4bpp.lz");
|
||||
const u32 gTilesetTiles_SecretBaseTreeCompressed[] = INCBIN_U32("data/tilesets/secondary/secret_base/tree/unused_tiles.4bpp.lz");
|
||||
|
||||
const u16 gTilesetPalettes_SecretBaseTree[][16] =
|
||||
{
|
||||
|
@ -725,7 +725,7 @@ const u16 gTilesetPalettes_SecretBaseTree[][16] =
|
|||
INCBIN_U16("data/tilesets/secondary/secret_base/tree/palettes/15.gbapal"),
|
||||
};
|
||||
|
||||
const u32 gUnusedTilesetTiles_SecretBaseShrub[] = INCBIN_U32("data/tilesets/secondary/secret_base/shrub/unused_tiles.4bpp.lz");
|
||||
const u32 gTilesetTiles_SecretBaseShrubCompressed[] = INCBIN_U32("data/tilesets/secondary/secret_base/shrub/unused_tiles.4bpp.lz");
|
||||
|
||||
const u16 gTilesetPalettes_SecretBaseShrub[][16] =
|
||||
{
|
||||
|
@ -747,7 +747,7 @@ const u16 gTilesetPalettes_SecretBaseShrub[][16] =
|
|||
INCBIN_U16("data/tilesets/secondary/secret_base/shrub/palettes/15.gbapal"),
|
||||
};
|
||||
|
||||
const u32 gUnusedTilesetTiles_SecretBaseBlueCave[] = INCBIN_U32("data/tilesets/secondary/secret_base/blue_cave/unused_tiles.4bpp.lz");
|
||||
const u32 gTilesetTiles_SecretBaseBlueCaveCompressed[] = INCBIN_U32("data/tilesets/secondary/secret_base/blue_cave/unused_tiles.4bpp.lz");
|
||||
|
||||
const u16 gTilesetPalettes_SecretBaseBlueCave[][16] =
|
||||
{
|
||||
|
@ -769,7 +769,7 @@ const u16 gTilesetPalettes_SecretBaseBlueCave[][16] =
|
|||
INCBIN_U16("data/tilesets/secondary/secret_base/blue_cave/palettes/15.gbapal"),
|
||||
};
|
||||
|
||||
const u32 gUnusedTilesetTiles_SecretBaseYellowCave[] = INCBIN_U32("data/tilesets/secondary/secret_base/yellow_cave/unused_tiles.4bpp.lz");
|
||||
const u32 gTilesetTiles_SecretBaseYellowCaveCompressed[] = INCBIN_U32("data/tilesets/secondary/secret_base/yellow_cave/unused_tiles.4bpp.lz");
|
||||
|
||||
const u16 gTilesetPalettes_SecretBaseYellowCave[][16] =
|
||||
{
|
||||
|
@ -791,7 +791,7 @@ const u16 gTilesetPalettes_SecretBaseYellowCave[][16] =
|
|||
INCBIN_U16("data/tilesets/secondary/secret_base/yellow_cave/palettes/15.gbapal"),
|
||||
};
|
||||
|
||||
const u32 gUnusedTilesetTiles_SecretBaseRedCave[] = INCBIN_U32("data/tilesets/secondary/secret_base/red_cave/unused_tiles.4bpp.lz");
|
||||
const u32 gTilesetTiles_SecretBaseRedCaveCompressed[] = INCBIN_U32("data/tilesets/secondary/secret_base/red_cave/unused_tiles.4bpp.lz");
|
||||
|
||||
const u16 gTilesetPalettes_SecretBaseRedCave[][16] =
|
||||
{
|
||||
|
|
|
@ -880,17 +880,17 @@ void LoadTilesetPalette(struct Tileset const *tileset, u16 destOffset, u16 size)
|
|||
if (tileset->isSecondary == FALSE)
|
||||
{
|
||||
LoadPalette(&black, destOffset, 2);
|
||||
LoadPalette(((u16 *)tileset->palettes) + 1, destOffset + 1, size - 2);
|
||||
LoadPalette(tileset->palettes[0] + 1, destOffset + 1, size - 2);
|
||||
ApplyGlobalTintToPaletteEntries(destOffset + 1, (size - 2) >> 1);
|
||||
}
|
||||
else if (tileset->isSecondary == TRUE)
|
||||
{
|
||||
LoadPalette(((u16 *)tileset->palettes) + (NUM_PALS_IN_PRIMARY * 16), destOffset, size);
|
||||
LoadPalette(tileset->palettes[NUM_PALS_IN_PRIMARY], destOffset, size);
|
||||
ApplyGlobalTintToPaletteEntries(destOffset, size >> 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadCompressedPalette((u32 *)tileset->palettes, destOffset, size);
|
||||
LoadCompressedPalette((const u32 *)tileset->palettes, destOffset, size);
|
||||
ApplyGlobalTintToPaletteEntries(destOffset, size >> 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -746,13 +746,9 @@ static void BuyMenuDrawMapBg(void)
|
|||
metatileLayerType = METATILE_LAYER_TYPE_COVERED;
|
||||
|
||||
if (metatile < NUM_METATILES_IN_PRIMARY)
|
||||
{
|
||||
BuyMenuDrawMapMetatile(i, j, (u16 *)mapLayout->primaryTileset->metatiles + metatile * 8, metatileLayerType);
|
||||
}
|
||||
BuyMenuDrawMapMetatile(i, j, mapLayout->primaryTileset->metatiles + metatile * 8, metatileLayerType);
|
||||
else
|
||||
{
|
||||
BuyMenuDrawMapMetatile(i, j, (u16 *)mapLayout->secondaryTileset->metatiles + ((metatile - NUM_METATILES_IN_PRIMARY) * 8), metatileLayerType);
|
||||
}
|
||||
BuyMenuDrawMapMetatile(i, j, mapLayout->secondaryTileset->metatiles + ((metatile - NUM_METATILES_IN_PRIMARY) * 8), metatileLayerType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue