Switch allocation of sprite/wall/sector to individual aligned allocations instead of the weird thing I was doing with multiple pointers to different parts of a single large block

git-svn-id: https://svn.eduke32.com/eduke32@6381 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2017-07-27 09:13:15 +00:00
parent 9b9b6baecd
commit fa02c6433b

View file

@ -7633,6 +7633,7 @@ int32_t preinitengine(void)
// Bprintf("FIXME: Allocating additional space beyond wall[] for editor bugs.\n");
}
#if 0
for (i=0; i<(signed)ARRAY_SIZE(dynarray); i++)
size += dynarray[i].size;
@ -7646,6 +7647,13 @@ int32_t preinitengine(void)
*dynarray[i].ptr = (int8_t *)blockptr + size;
size += dynarray[i].size;
}
#else
for (i = 0; i < (signed) ARRAY_SIZE(dynarray); i++)
{
Baligned_free(*dynarray[i].ptr);
*dynarray[i].ptr = Xaligned_alloc(16, dynarray[i].size);
}
#endif
}
#elif !defined DEBUG_MAIN_ARRAYS