diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 06105c8be..c09a13211 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -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 *)§or[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 *)§or[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; diff --git a/source/duke3d/src/global.h b/source/duke3d/src/global.h index 7be73c3b3..d61e2a6d6 100644 --- a/source/duke3d/src/global.h +++ b/source/duke3d/src/global.h @@ -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;