signs.h
author tron
Tue, 25 Jan 2005 21:43:57 +0000
changeset 1174 27e386195965
parent 1165 2cdf7a0e217a
child 1283 b9569cc0644f
permissions -rw-r--r--
(svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and adapt the save/load data and some other parts of the code to that change

WARNING: If i made any mistake here it WILL lead to corrupted savegames!
#ifndef SIGNS_H
#define SIGNS_H

typedef struct SignStruct {
	StringID     str;
	ViewportSign sign;
	int32        x;
	int32        y;
	byte         z;
	byte owner; // placed by this player. Anyone can delete them though.
							// OWNER_NONE for gray signs from old games.

	uint16       index;
} SignStruct;

VARDEF SignStruct _sign_list[40];
VARDEF uint _sign_size;

static inline SignStruct *GetSign(uint index)
{
	assert(index < _sign_size);
	return &_sign_list[index];
}

#define FOR_ALL_SIGNS(s) for(s = _sign_list; s != &_sign_list[_sign_size]; s++)

VARDEF SignStruct *_new_sign_struct;

void UpdateAllSignVirtCoords(void);
void PlaceProc_Sign(uint tile);

/* misc.c */
void ShowRenameSignWindow(SignStruct *ss);

#endif /* SIGNS_H */