26 UISystem::getInstance().setSFXComponent(
sfxCmpt);
30 videoSetMode(MODE_5_2D);
32 videoSetModeSub(MODE_3_2D | DISPLAY_BG3_ACTIVE);
35 vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
36 vramSetBankD(VRAM_D_MAIN_BG_0x06020000);
38 vramSetBankB(VRAM_B_MAIN_SPRITE);
40 vramSetBankC(VRAM_C_SUB_BG);
46 int bgTextSub = bgInitSub(3, BgType_Bmp8, BgSize_B8_256x256, 4, 0);
47 uint16_t* textVideoBufferSub = bgGetGfxPtr(bgTextSub);
48 bgSetPriority(bgTextSub, 0);
68 bg[0] = bgInit(0, BgType_Text8bpp, BgSize_T_512x512, 4, 0);
69 bg[1] = bgInit(1, BgType_Text8bpp, BgSize_T_256x256, 9, 2);
70 bg[2] = bgInit(2, BgType_ExRotation, BgSize_ER_256x256, 8, 5);
74 bgSetPriority(
bg[0], 0);
75 bgSetPriority(
bg[2], 1);
76 bgSetPriority(
bg[1], 2);
79 dmaFillHalfWords(0, bgGetMapPtr(
bg[0]), 8192);
80 dmaFillHalfWords(1, bgGetMapPtr(
bg[1]), 2048);
81 dmaFillHalfWords(2, bgGetMapPtr(
bg[2]), 2048);
84 std::string bgPath =
"graphics/MainMenuView/backgrounds/";
85 GraphicAsset silhouetteBg =
graphics->loadGraphic(bgPath +
"menuSilhouetteBackground/menuSilhouetteBackground");
93 dmaCopy(silhouetteBg.
map, bgGetMapPtr(
bg[0]), silhouetteBg.
mapLen);
94 dmaCopy(doorBg.
map, bgGetMapPtr(
bg[1]), doorBg.
mapLen);
95 dmaCopy(fogBg.
map, bgGetMapPtr(
bg[2]), fogBg.
mapLen);
97 vramSetBankE(VRAM_E_LCD);
98 dmaCopy(silhouetteBg.
pal, &VRAM_E_EXT_PALETTE[0][0], silhouetteBg.
palLen);
99 dmaCopy(doorBg.
pal, &VRAM_E_EXT_PALETTE[1][0], doorBg.
palLen);
100 dmaCopy(fogBg.
pal, &VRAM_E_EXT_PALETTE[2][0], fogBg.
palLen);
101 vramSetBankE(VRAM_E_BG_EXT_PALETTE);
103 graphics->unloadGraphic(silhouetteBg);
108 bgSetCenter(
bg[2], 128, 96);
109 bgSetScroll(
bg[2], 128, 96);
115 setBrightness(3, -16);
118 REG_BLDCNT = BLEND_ALPHA | BLEND_SRC_BG1 | BLEND_DST_BACKDROP;
119 REG_BLDALPHA = 0 | (16 << 8);
bool isSilhouetteStillMoving
TransitionPhase transitionPhase
MusicComponent * musicCmpt
ViewState update() override
GraphicsComponent * graphics
static MainMenu * getInstance()
void logMessage(LogSeverity severity, std::string_view message, std::source_location location)
Logs a diagnostic message and halts only for fatal messages.
A struct that holds initial config values for the TextComponent.