Put all screens in SaveVRAMBuffer

This removes 6400 bytes from the Z_Malloc heap. There is about 27 kB
left in the secondary VRAM for further use.
This commit is contained in:
Lephenixnoir 2021-08-04 09:57:03 +02:00
parent 4c3b0b8fe6
commit 6d2bac49a2
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 2 additions and 6 deletions

View File

@ -1103,5 +1103,5 @@ void ST_Init (void)
{
veryfirsttime = 0;
ST_loadData();
screens[4] = (byte *) Z_Malloc(ST_WIDTH*ST_HEIGHT, PU_STATIC, 0);
screens[4] = SaveVRAMBuffer + 2 * SCREENWIDTH * SCREENHEIGHT;
}

View File

@ -351,14 +351,10 @@ void V_GetBlock( int x, int y, int scrn, int width, int height, byte* dest
//
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[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) */