Skip to content

Commit dbdc62e

Browse files
Fix logo fading out on title screen
1 parent 5d2df5f commit dbdc62e

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

src/classic.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,12 +1382,12 @@ void _draw() {
13821382
c = 0;
13831383
}
13841384
if(c < 10) {
1385-
pal(6, c);
1386-
pal(12, c);
1387-
pal(13, c);
1388-
pal(5, c);
1389-
pal(1, c);
1390-
pal(7, c);
1385+
pal(6, c, 1);
1386+
pal(12, c, 1);
1387+
pal(13, c, 1);
1388+
pal(5, c, 1);
1389+
pal(1, c, 1);
1390+
pal(7, c, 1);
13911391
}
13921392
}
13931393

src/emu.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ void spr(uint8_t n, int x, int y, uint8_t w, uint8_t h, bool flip_x, bool flip_y
280280
}
281281

282282
void pal() {
283+
gfx_SetPalette(mypalette, sizeof mypalette, 0);
283284
for(uint8_t i = 0; i < 16; i++) {
284285
pal_map[i] = i | (i << 4);
285286
}
@@ -291,6 +292,15 @@ void pal(int c0, int c1) {
291292
default_pal = c0 == c1;
292293
}
293294

295+
void pal(int c0, int c1, int p) {
296+
if(p == 0) {
297+
pal(c0, c1);
298+
} else {
299+
gfx_palette[c0] = mypalette[c1];
300+
default_pal = c0 == c1;
301+
}
302+
}
303+
294304

295305
bool btn(uint8_t index) {
296306
kb_lkey_t keys[6] = {kb_KeyLeft, kb_KeyRight, kb_KeyUp, kb_KeyDown, kb_Key2nd, kb_KeyAlpha};

src/emu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ void spr(uint8_t n, int x, int y);
3434
void spr(uint8_t n, int x, int y, uint8_t w, uint8_t h, bool flip_x, bool flip_y);
3535
void pal();
3636
void pal(int a, int b);
37+
void pal(int a, int b, int p);
3738

3839
bool btn(uint8_t index);
3940

0 commit comments

Comments
 (0)