Rename union room chat graphics

This commit is contained in:
cbt6
2023-03-16 22:13:05 +08:00
parent 62f745d646
commit 981d4a34d8
17 changed files with 69 additions and 41 deletions
+7 -7
View File
@@ -1232,10 +1232,10 @@ const u16 gFameCheckerBgTiles[] = INCBIN_U16("graphics/fame_checker/bg.4bpp");
const u16 gFameCheckerBg3Tilemap[] = INCBIN_U16("graphics/fame_checker/tilemap3.bin");
const u16 gFameCheckerBg2Tilemap[] = INCBIN_U16("graphics/fame_checker/tilemap2.bin");
const u16 gLinkMiscMenu_Pal[] = INCBIN_U16("graphics/interface/union_room_chat.gbapal");
const u32 gLinkMiscMenu_Gfx[] = INCBIN_U32("graphics/interface/union_room_chat.4bpp.lz");
const u32 gLinkMiscMenu_Tilemap[] = INCBIN_U32("graphics/interface/union_room_chat.bin.lz");
const u32 gUnionRoomChatIcons[] = INCBIN_U32("graphics/interface/union_room_chat_icons.4bpp.lz");
const u16 gUnionRoomChat_Bg_Pal[] = INCBIN_U16("graphics/union_room_chat/bg.gbapal");
const u32 gUnionRoomChat_Bg_Gfx[] = INCBIN_U32("graphics/union_room_chat/bg.4bpp.lz");
const u32 gUnionRoomChat_Bg_Tilemap[] = INCBIN_U32("graphics/union_room_chat/bg.bin.lz");
const u32 gUnionRoomChat_Icons_Gfx[] = INCBIN_U32("graphics/union_room_chat/icons.4bpp.lz");
const u16 gTilesetPalettes_General[][16] =
{
@@ -1322,9 +1322,9 @@ const u16 gTilesetPalettes_DepartmentStore[][16] =
const u32 gTilesetTiles_DepartmentStore[] = INCBIN_U32("data/tilesets/secondary/department_store/tiles.4bpp.lz");
const u16 gUnionRoomChatPanelBgPal_7[] = INCBIN_U16("graphics/interface/union_room_chat_panel.gbapal");
const u32 gUnionRoomChatPanelBgTiles[] = INCBIN_U32("graphics/interface/union_room_chat_panel.4bpp.lz");
const u32 gUnionRoomChatPanelBgMap[] = INCBIN_U32("graphics/interface/union_room_chat_panel.bin.lz");
const u16 gUnionRoomChat_Panel_Pal[] = INCBIN_U16("graphics/union_room_chat/panel.gbapal");
const u32 gUnionRoomChat_Panel_Gfx[] = INCBIN_U32("graphics/union_room_chat/panel.4bpp.lz");
const u32 gUnionRoomChat_Panel_Tilemap[] = INCBIN_U32("graphics/union_room_chat/panel.bin.lz");
const u16 gCreditsMonPokeball_Pals[][16] =
{
+12 -12
View File
@@ -119,9 +119,9 @@ static void InitScanlineEffect(void);
static void FillScanlineEffectWithValue1col(s16 a0);
static void FillScanlineEffectWithValue2col(s16 a0);
static const u16 sUnionRoomChatPanelBgPal_C[] = INCBIN_U16("graphics/union_room_chat/unk_845AA24.gbapal");
static const u16 sBg1Pal8[] = INCBIN_U16("graphics/union_room_chat/unk_845AA44.gbapal");
static const u16 sWin0PalF[] = INCBIN_U16("graphics/union_room_chat/unk_845AA64.gbapal");
static const u16 sUnionRoomChat_TextEntry_Pal[] = INCBIN_U16("graphics/union_room_chat/text_entry.gbapal");
static const u16 gUnionRoomChat_Unused_Pal[] = INCBIN_U16("graphics/union_room_chat/unused.gbapal"); // Loaded, but nothing uses it
static const u16 sUnionRoomChat_Messages_Pal[] = INCBIN_U16("graphics/union_room_chat/messages.gbapal");
static const struct BgTemplate sBgTemplates[] = {
{
@@ -1259,10 +1259,10 @@ static void ClearBg0(void)
static void LoadUnionRoomChatPanelGfx(void)
{
LoadPalette(gUnionRoomChatPanelBgPal_7, 0x70, 0x20);
LoadPalette(sUnionRoomChatPanelBgPal_C, 0xC0, 0x20);
DecompressAndCopyTileDataToVram(1, gUnionRoomChatPanelBgTiles, 0, 0, 0);
CopyToBgTilemapBuffer(1, gUnionRoomChatPanelBgMap, 0, 0);
LoadPalette(gUnionRoomChat_Panel_Pal, 0x70, 0x20);
LoadPalette(sUnionRoomChat_TextEntry_Pal, 0xC0, 0x20);
DecompressAndCopyTileDataToVram(1, gUnionRoomChat_Panel_Gfx, 0, 0, 0);
CopyToBgTilemapBuffer(1, gUnionRoomChat_Panel_Tilemap, 0, 0);
CopyBgTilemapBufferToVram(1);
}
@@ -1270,21 +1270,21 @@ static void LoadLinkMiscMenuGfx(void)
{
u8 *ptr;
LoadPalette(gLinkMiscMenu_Pal, 0, 0x20);
ptr = DecompressAndCopyTileDataToVram(2, gLinkMiscMenu_Gfx, 0, 0, 0);
CopyToBgTilemapBuffer(2, gLinkMiscMenu_Tilemap, 0, 0);
LoadPalette(gUnionRoomChat_Bg_Pal, 0, 0x20);
ptr = DecompressAndCopyTileDataToVram(2, gUnionRoomChat_Bg_Gfx, 0, 0, 0);
CopyToBgTilemapBuffer(2, gUnionRoomChat_Bg_Tilemap, 0, 0);
CopyBgTilemapBufferToVram(2);
}
static void LoadBg1Pal8(void)
{
LoadPalette(sBg1Pal8, 0x80, 0x20);
LoadPalette(gUnionRoomChat_Unused_Pal, 0x80, 0x20);
RequestDma3Fill(0, (void *)BG_CHAR_ADDR(1) + 0x20, 0x20, DMA3_32BIT);
}
static void LoadWin0(void)
{
LoadPalette(sWin0PalF, 0xF0, 0x20);
LoadPalette(sUnionRoomChat_Messages_Pal, 0xF0, 0x20);
PutWindowTilemap(0);
FillWindowPixelBuffer(0, PIXEL_FILL(1));
CopyWindowToVram(0, COPYWIN_FULL);
+43 -15
View File
@@ -4,6 +4,14 @@
#include "graphics.h"
#include "union_room_chat.h"
enum {
GFXTAG_SELECTOR_CURSOR,
GFXTAG_CHAR_SELECT_CURSOR,
GFXTAG_TEXT_ENTRY_CURSOR,
GFXTAG_R_BUTTON,
GFXTAG_ICONS,
};
struct UnionRoomChat3
{
struct Sprite *selectorCursorSprite;
@@ -19,18 +27,38 @@ static EWRAM_DATA struct UnionRoomChat3 *sWork = NULL;
static void SpriteCB_TextEntryCursor(struct Sprite *sprite);
static void SpriteCB_CharacterSelectCursor(struct Sprite *sprite);
static const u16 sUnionRoomChatInterfacePal[] = INCBIN_U16("graphics/union_room_chat/unk_845AC14.gbapal");
static const u32 sSelectorCursorGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AC34.4bpp.lz");
static const u32 sHorizontalBarGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AEB8.4bpp.lz");
static const u32 sMenuCursorGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AED8.4bpp.lz");
static const u32 sRButtonGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AF04.4bpp.lz");
static const u16 sUnionRoomChatInterfacePal[] = INCBIN_U16("graphics/union_room_chat/objects.gbapal");
static const u32 sSelectorCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/selector_cursor.4bpp.lz");
static const u32 sTextEntryCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/text_entry_cursor.4bpp.lz");
static const u32 sCharacterSelectCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/character_select_cursor.4bpp.lz");
static const u32 sRButton_Gfx[] = INCBIN_U32("graphics/union_room_chat/r_button.4bpp.lz");
static const struct CompressedSpriteSheet sSpriteSheets[] = {
{sSelectorCursorGfxTiles, 0x1000, 0},
{sMenuCursorGfxTiles, 0x0040, 1},
{sHorizontalBarGfxTiles, 0x0040, 2},
{sRButtonGfxTiles, 0x0080, 3},
{gUnionRoomChatIcons, 0x0400, 4}
{
.data = sSelectorCursor_Gfx,
.size = 128 * TILE_SIZE_4BPP,
.tag = GFXTAG_SELECTOR_CURSOR
},
{
.data = sCharacterSelectCursor_Gfx,
.size = 2 * TILE_SIZE_4BPP,
.tag = GFXTAG_CHAR_SELECT_CURSOR
},
{
.data = sTextEntryCursor_Gfx,
.size = 2 * TILE_SIZE_4BPP,
.tag = GFXTAG_TEXT_ENTRY_CURSOR
},
{
.data = sRButton_Gfx,
.size = 4 * TILE_SIZE_4BPP,
.tag = GFXTAG_R_BUTTON
},
{
.data = gUnionRoomChat_Icons_Gfx,
.size = 32 * TILE_SIZE_4BPP,
.tag = GFXTAG_ICONS
},
};
static const struct SpritePalette sSpritePalette = {
@@ -71,7 +99,7 @@ static const union AnimCmd *const sSpriteAnims_SelectorCursor[] = {
};
static const struct SpriteTemplate sSpriteTemplate_SelectorCursor = {
.tileTag = 0,
.tileTag = GFXTAG_SELECTOR_CURSOR,
.paletteTag = 0,
.oam = &sOamData_64x32_1,
.anims = sSpriteAnims_SelectorCursor,
@@ -86,7 +114,7 @@ static const struct OamData sOamData_8x16_2 = {
};
static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = {
.tileTag = 2,
.tileTag = GFXTAG_TEXT_ENTRY_CURSOR,
.paletteTag = 0,
.oam = &sOamData_8x16_2,
.anims = gDummySpriteAnimTable,
@@ -95,7 +123,7 @@ static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = {
};
static const struct SpriteTemplate sSpriteTemplate_CharacterSelectCursor = {
.tileTag = 1,
.tileTag = GFXTAG_CHAR_SELECT_CURSOR,
.paletteTag = 0,
.oam = &sOamData_8x16_2,
.anims = gDummySpriteAnimTable,
@@ -143,7 +171,7 @@ static const union AnimCmd *const sSpriteAnimTable_UnionRoomChatIcons[] = {
};
static const struct SpriteTemplate sSpriteTemplate_RButton = {
.tileTag = 3,
.tileTag = GFXTAG_R_BUTTON,
.paletteTag = 0,
.oam = &sOamData_16x16_2,
.anims = gDummySpriteAnimTable,
@@ -152,7 +180,7 @@ static const struct SpriteTemplate sSpriteTemplate_RButton = {
};
static const struct SpriteTemplate sSpriteTemplate_UnionRoomChatIcons = {
.tileTag = 4,
.tileTag = GFXTAG_ICONS,
.paletteTag = 0,
.oam = &sOamData_32x16_2,
.anims = sSpriteAnimTable_UnionRoomChatIcons,