diff --git a/src/md/error.c b/src/md/error.c index 35897667..1faedd24 100644 --- a/src/md/error.c +++ b/src/md/error.c @@ -45,6 +45,8 @@ void _error() { char buf[16]; // Don't completely clear the screen or rewrite the palettes // Only what is needed to display the error + disable_ints(); + vdp_sprites_clear(); vdp_sprites_update(); vdp_font_load(UFTC_SysFont); diff --git a/src/stage.c b/src/stage.c index 2853a158..99bf222d 100644 --- a/src/stage.c +++ b/src/stage.c @@ -507,23 +507,28 @@ void stage_draw_background() { void stage_draw_moonback() { const uint16_t *topTiles, *btmTiles; const uint16_t *topMap, *btmMap; + uint16_t topNum, btmNum; if(stageBackgroundType == 1) { // Moon topTiles = UFTC_bkMoonTop; btmTiles = UFTC_bkMoonBtm; topMap = MAP_bkMoonTop; btmMap = MAP_bkMoonBtm; + topNum = 12; + btmNum = 188; } else { // Fog topTiles = UFTC_bkFogTop; btmTiles = UFTC_bkFogBtm; topMap = MAP_bkFogTop; btmMap = MAP_bkFogBtm; + topNum = 5; + btmNum = 174; } // Load the top section in the designated background area - vdp_tiles_load_uftc(topTiles, TILE_BACKINDEX, 0, 12); + vdp_tiles_load_uftc(topTiles, TILE_BACKINDEX, 0, topNum); // Load the clouds under the map, it just fits - vdp_tiles_load_uftc(btmTiles, TILE_MOONINDEX, 0, 188); + vdp_tiles_load_uftc(btmTiles, TILE_MOONINDEX, 0, btmNum); memset(hscrollTable, 0, 128); //for(uint8_t y = 0; y < 60; y++) hscrollTable[y] = 0; vdp_vscroll(VDP_PLANE_B, 0); diff --git a/src/window.c b/src/window.c index feff9015..c61a5ef9 100644 --- a/src/window.c +++ b/src/window.c @@ -107,7 +107,7 @@ void window_open(uint8_t mode) { window_clear(); if(!paused) { - if(showingFace > 0) window_draw_face(showingFace); + if(showingFace > 0) window_draw_face(); vdp_set_window(0, mode ? 8 : (pal_mode ? 245 : 244)); } else showingFace = 0;