From dc7519fe3e151367c48f76653b7afac6a48898eb Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Thu, 29 Jul 2021 09:58:23 +0200 Subject: [PATCH] Fix level end screen This was using screens[1] which I had deallocated when fixing the status bar (I incorrectly assumed it was used only for that). While the CGDOOM technique to share screens[1] to avoid allocating the 320x20 buffer for the status bar makes clear sense with that new information, I think I'll keep this 6.4 kB buffer there and rather search for ways to use more memory zones. --- README | 1 - cgdoom/v_video.c | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README b/README index 11aaf0e..9921c06 100644 --- a/README +++ b/README @@ -7,7 +7,6 @@ Credit goes to: * Lephenixnoir for the final fixes and fx-CG 50 version. TODO: --> Fix level recap texture -> Fix screen not cleared when changing resolution, add larger resolutions -> Try and support more WADs -> Reenable LTO if possible diff --git a/cgdoom/v_video.c b/cgdoom/v_video.c index 04e78a5..7806d83 100644 --- a/cgdoom/v_video.c +++ b/cgdoom/v_video.c @@ -354,7 +354,13 @@ void V_Init (void) /*int i; for (i=0 ; i< SCREEN_COUNT; i++) screens[i] = CGDMalloc(SCREENWIDTH*SCREENHEIGHT);*/ + + /* screens[0] is the main screen */ screens[0] = SaveVRAMBuffer; + /* screens[1] is used for the level end sequence (intermission) */ + screens[1] = SaveVRAMBuffer + SCREENWIDTH*SCREENHEIGHT; + /* screens[2] and screens[3] are used for wipe effects (disabled here) */ + /* screens[4] is used for the status bar (allocated by st_stuff.c) */ //Blank the screen, to indicate on real hardware that SOMETHING is going on //Done since loading on real hardware takes so damn long