Demote labeltype to uint8_t

This commit is contained in:
Richard C. Gobeille 2020-04-04 23:40:11 -07:00 committed by Christoph Oelckers
parent 3610609659
commit c8f15f8e4b
2 changed files with 5 additions and 5 deletions

View file

@ -5201,8 +5201,8 @@ static void G_CompileScripts(void)
{
#if !defined LUNATIC
label = (char *)&sprite[0]; // V8: 16384*44/64 = 11264 V7: 4096*44/64 = 2816
labelcode = (int32_t *)&sector[0]; // V8: 4096*40/4 = 40960 V7: 1024*40/4 = 10240
labeltype = (int32_t *)&wall[0]; // V8: 16384*32/4 = 131072 V7: 8192*32/4 = 65536
labelcode = (int32_t *)&sector[0]; // V8: 4096*40/4 = 40960 V7: 1024*40/4 = 10240
labeltype = (uint8_t *)&wall[0]; // V8: 16384*32 = 524288 V7: 8192*32/4 = 262144
#endif
#if defined LUNATIC
@ -5216,11 +5216,11 @@ static void G_CompileScripts(void)
auto newlabel = (char *)Xmalloc(g_labelCnt << 6);
auto newlabelcode = (int32_t *)Xmalloc(g_labelCnt * sizeof(int32_t));
auto newlabeltype = (int32_t *)Xmalloc(g_labelCnt * sizeof(int32_t));
auto newlabeltype = (uint8_t *)Xmalloc(g_labelCnt * sizeof(uint8_t));
Bmemcpy(newlabel, label, g_labelCnt * 64);
Bmemcpy(newlabelcode, labelcode, g_labelCnt * sizeof(int32_t));
Bmemcpy(newlabeltype, labeltype, g_labelCnt * sizeof(int32_t));
Bmemcpy(newlabeltype, labeltype, g_labelCnt * sizeof(uint8_t));
label = newlabel;
labelcode = newlabelcode;

View file

@ -120,7 +120,7 @@ G_EXTERN int16_t g_cyclers[MAXCYCLERS][6];
G_EXTERN int16_t g_mirrorSector[64];
G_EXTERN int16_t g_mirrorWall[64];
G_EXTERN int32_t *labelcode;
G_EXTERN int32_t *labeltype;
G_EXTERN uint8_t *labeltype;
G_EXTERN ClockTicks lockclock;
G_EXTERN ClockTicks ototalclock;