refactor: JD8_* a namespace Jd8::
This commit is contained in:
@@ -50,7 +50,7 @@ namespace {
|
||||
// IntroScene només s'activa quan use_new_logo == false, així que la
|
||||
// branca use_new_logo d'aquell helper aquí no es necessita.
|
||||
void drawWordmark(const Uint8* gfx) {
|
||||
JD8_Blit(43, 78, gfx, 43, 155, 231, 45);
|
||||
Jd8::blit(43, 78, gfx, 43, 155, 231, 45);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -59,7 +59,7 @@ namespace scenes {
|
||||
|
||||
IntroScene::IntroScene() = default;
|
||||
|
||||
// No alliberem `pal_`: JD8_SetScreenPalette n'ha pres ownership i el
|
||||
// No alliberem `pal_`: Jd8::setScreenPalette n'ha pres ownership i el
|
||||
// proper SetScreenPalette / FadeToPal la lliurarà. Alliberar-la ací
|
||||
// provocaria double free.
|
||||
IntroScene::~IntroScene() = default;
|
||||
@@ -68,10 +68,10 @@ namespace scenes {
|
||||
playMusic("music/menu.ogg");
|
||||
|
||||
gfx_ = SurfaceHandle("gfx/logo.gif");
|
||||
pal_ = JD8_LoadPalette("gfx/logo.gif");
|
||||
JD8_SetScreenPalette(pal_);
|
||||
pal_ = Jd8::loadPalette("gfx/logo.gif");
|
||||
Jd8::setScreenPalette(pal_);
|
||||
|
||||
JD8_ClearScreen(0);
|
||||
Jd8::clearScreen(0);
|
||||
|
||||
phase_ = Phase::InitialWait;
|
||||
phase_acc_ms_ = 0;
|
||||
@@ -82,21 +82,21 @@ namespace scenes {
|
||||
void IntroScene::render() {
|
||||
switch (phase_) {
|
||||
case Phase::InitialWait:
|
||||
JD8_ClearScreen(0);
|
||||
Jd8::clearScreen(0);
|
||||
break;
|
||||
|
||||
case Phase::Reveal: {
|
||||
const RevealStep& s = REVEAL_STEPS[reveal_index_];
|
||||
if (s.clear) {
|
||||
JD8_ClearScreen(0);
|
||||
Jd8::clearScreen(0);
|
||||
}
|
||||
if (s.wordmark) {
|
||||
drawWordmark(gfx_);
|
||||
} else if (s.body_w > 0) {
|
||||
JD8_Blit(43, 78, gfx_, 43, 155, s.body_w, 45);
|
||||
Jd8::blit(43, 78, gfx_, 43, 155, s.body_w, 45);
|
||||
}
|
||||
if (s.plane_x >= 0) {
|
||||
JD8_Blit(s.plane_x, 78, gfx_, 274, 155, 27, 45);
|
||||
Jd8::blit(s.plane_x, 78, gfx_, 274, 155, 27, 45);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ namespace scenes {
|
||||
// Wordmark complet fix mentre cicla la paleta — l'últim
|
||||
// pas del revelat (PAS 15) deixa la pantalla en aquest mateix
|
||||
// estat, i el vell doIntro no redibuixava durant el cicle.
|
||||
JD8_ClearScreen(0);
|
||||
Jd8::clearScreen(0);
|
||||
drawWordmark(gfx_);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user