Emulator progress: E1M1 loads, can move around

This commit is contained in:
Lephenixnoir 2021-09-20 15:42:22 +02:00
parent b870324682
commit 4da88c1318
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
3 changed files with 3 additions and 5 deletions

View File

@ -69,9 +69,7 @@ byte* I_ZoneBase (int* size, int i)
byte *I_ScreenBase(int screen)
{
if (screen == 0)
return malloc(320 * 200);
if (screen == 1)
if (screen == 0 || screen == 1 || screen == 2 || screen == 3)
return malloc(320 * 200);
if (screen == 4)
return malloc(320 * 32);

View File

@ -662,7 +662,7 @@ void P_GroupLines (void)
}
// build line tables for each sector
linebuffer = (line_t **)Z_Malloc (total*4, PU_LEVEL, 0);
linebuffer = (line_t **)Z_Malloc (total*sizeof(void *), PU_LEVEL, 0);
sector = sectors;
for (i=0 ; i<numsectors ; i++, sector++)
{

View File

@ -236,7 +236,7 @@ void* Z_Malloc( int size, int tag, void* user )
memblock_t* newblock;
memblock_t* base;
size = (size + 3) & ~3;
size = (size + (sizeof(void *)-1)) & ~(sizeof(void *)-1);
// scan through the block list,
// looking for the first free block