gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 3dc08207eacf529db09bcc0f2de741126945437e parent 39ea4bf6a3a4766c77ede89d485161c57d9309da Author: Michel Iwaniec <46843052+michel-iwaniec@users.noreply.github.com> Date: Thu, 16 May 2024 02:10:41 +0100 Merge pull request #670 from michel-iwaniec/platformer_template_blank_during_screen_transitions * Change platformer template to blank screen during all of level loading Diffstat:
| M | gbdk-lib/examples/cross-platform/platformer_template/src/level.c | 6 | ------ |
| M | gbdk-lib/examples/cross-platform/platformer_template/src/main.c | 4 | ++++ |
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/gbdk-lib/examples/cross-platform/platformer_template/src/level.c b/gbdk-lib/examples/cross-platform/platformer_template/src/level.c @@ -71,10 +71,6 @@ uint8_t IsTileSolid(uint16_t worldX,uint16_t worldY) NONBANKED{ void SetupCurrentLevel(void) NONBANKED{ - DISPLAY_OFF; - - - uint8_t _previous_bank = CURRENT_BANK; for(uint8_t i=0;i<DEVICE_SCREEN_BUFFER_WIDTH;i++){ @@ -161,6 +157,4 @@ void SetupCurrentLevel(void) NONBANKED{ } SWITCH_ROM(_previous_bank); - - DISPLAY_ON; } diff --git a/gbdk-lib/examples/cross-platform/platformer_template/src/main.c b/gbdk-lib/examples/cross-platform/platformer_template/src/main.c @@ -54,6 +54,8 @@ void main(void) // Update what our current level is currentLevel=nextLevel; + + DISPLAY_OFF; // Setup the new level SetupCurrentLevel(); @@ -66,6 +68,8 @@ void main(void) // The platformer template will only scroll horizontally SetCurrentLevelSubmap(0,0,DEVICE_SCREEN_WIDTH+1,DEVICE_SCREEN_HEIGHT); + DISPLAY_ON; + #if DEVICE_SCREEN_BUFFER_WIDTH == DEVICE_SCREEN_WIDTH // On platforms where screen buffer has no more space than physical screen, // the next map column will be written to the leftmost screen column.
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.