- PlayField8 = checked_calloc((SP_MAX_PLAYFIELD_WIDTH +
- SP_MAX_PLAYFIELD_SIZE +
- SP_HEADER_SIZE) * sizeof(byte));
- PlayField8 = &PlayField8[SP_MAX_PLAYFIELD_WIDTH];
+ PlayField8Mem = checked_calloc((SP_MAX_PLAYFIELD_WIDTH +
+ SP_MAX_PLAYFIELD_SIZE +
+ SP_HEADER_SIZE) * sizeof(byte));
+ PlayField8 = &PlayField8Mem[SP_MAX_PLAYFIELD_WIDTH];
+}
+
+void FreeGlobals(void)
+{
+ checked_free(PlayField16Mem);
+ checked_free(PlayField8Mem);