Files @ r5124:e841fbeef573
Branch filter:

Location: cpp/openttd-patchpack/source/void_map.h

Darkvater
(svn r7205) -Fix [FS#350, SF#1560913]: Window allocation and deletion messed with the actual window
structs inside their array, and possibly invalidating pointers higher up.
Meaning that any function called within an wndproc could cause unknown/invalid pointers
once control was returned to this function. Solved by the introduction of an extra
abstraction layer, an array of z-window positions that is only concerned with the
pointers.
/* $Id$ */

#ifndef VOID_MAP_H
#define VOID_MAP_H

static inline void MakeVoid(TileIndex t)
{
	SetTileType(t, MP_VOID);
	SetTileHeight(t, 0);
	_m[t].m1 = 0;
	_m[t].m2 = 0;
	_m[t].m3 = 0;
	_m[t].m4 = 0;
	_m[t].m5 = 0;
	_m[t].extra = 0;
}

#endif /* VOID_MAP_H */