(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
authorrubidium
Wed, 07 Mar 2007 12:11:48 +0000
changeset 6248 e4a2ed7e5613
parent 6247 7d81e3a5d803
child 6249 e3e0d224edf9
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
src/ai/ai.h
src/ai/default/default.cpp
src/ai/trolly/pathfinder.cpp
src/aircraft.h
src/airport.h
src/airport_movement.h
src/aystar.h
src/bmp.h
src/bridge.h
src/cargotype.h
src/clear_cmd.cpp
src/clear_map.h
src/command.h
src/console.h
src/currency.h
src/date.h
src/debug.cpp
src/depot_gui.cpp
src/direction.h
src/driver.cpp
src/economy.cpp
src/economy.h
src/engine.h
src/engine_gui.cpp
src/fileio.cpp
src/fios.h
src/fontcache.cpp
src/fontcache.h
src/genworld.h
src/genworld_gui.cpp
src/gfx.cpp
src/gfx.h
src/gfxinit.cpp
src/graph_gui.cpp
src/hal.h
src/industry.h
src/industry_map.h
src/livery.h
src/map.h
src/md5.h
src/misc_gui.cpp
src/mixer.h
src/music.h
src/network/core/core.h
src/network/core/game.h
src/network/core/tcp.h
src/network/network.h
src/network/network_data.h
src/network/network_gui.cpp
src/newgrf.cpp
src/newgrf.h
src/newgrf_config.cpp
src/newgrf_config.h
src/newgrf_engine.cpp
src/newgrf_engine.h
src/newgrf_gui.cpp
src/newgrf_sound.h
src/newgrf_spritegroup.h
src/newgrf_station.h
src/newgrf_text.cpp
src/npf.h
src/oldloader.cpp
src/oldpool.h
src/openttd.h
src/order.h
src/pathfind.cpp
src/pathfind.h
src/player.h
src/player_gui.cpp
src/queue.h
src/rail.h
src/rail_cmd.cpp
src/rail_map.h
src/road.h
src/road_cmd.cpp
src/road_map.h
src/roadveh_cmd.cpp
src/saveload.cpp
src/saveload.h
src/screenshot.cpp
src/screenshot.h
src/sdl.h
src/settings.cpp
src/settings.h
src/settings_gui.cpp
src/ship_cmd.cpp
src/signs.h
src/slope.h
src/smallmap_gui.cpp
src/sound.h
src/sprite.h
src/spritecache.cpp
src/spritecache.h
src/station.h
src/station_cmd.cpp
src/station_gui.cpp
src/station_map.h
src/strgen/strgen.cpp
src/string.h
src/strings.cpp
src/table/ai_rail.h
src/table/build_industry.h
src/table/elrail_data.h
src/table/industry_land.h
src/table/namegen.h
src/table/palettes.h
src/table/sprites.h
src/table/town_land.h
src/table/tree_land.h
src/table/unicode.h
src/table/unmovable_land.h
src/table/water_land.h
src/texteff.cpp
src/tgp.cpp
src/thread.h
src/tile.h
src/train.h
src/train_cmd.cpp
src/tree_cmd.cpp
src/tree_map.h
src/tunnelbridge_cmd.cpp
src/unmovable_map.h
src/variables.h
src/vehicle.cpp
src/vehicle.h
src/vehicle_gui.cpp
src/video/cocoa_v.mm
src/video/sdl_v.cpp
src/video/win32_v.cpp
src/viewport.cpp
src/viewport.h
src/water_cmd.cpp
src/water_map.h
src/win32.cpp
src/window.cpp
src/window.h
src/yapf/yapf.h
src/yapf/yapf_settings.h
--- a/src/ai/ai.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/ai/ai.h	Wed Mar 07 12:11:48 2007 +0000
@@ -7,7 +7,7 @@
 #include "../command.h"
 
 /* How DoCommands look like for an AI */
-typedef struct AICommand {
+struct AICommand {
 	uint32 tile;
 	uint32 p1;
 	uint32 p2;
@@ -17,22 +17,22 @@
 	char *text;
 	uint uid;
 
-	struct AICommand *next;
-} AICommand;
+	AICommand *next;
+};
 
 /* The struct for an AIScript Player */
-typedef struct AIPlayer {
+struct AIPlayer {
 	bool active;            ///< Is this AI active?
 	AICommand *queue;       ///< The commands that he has in his queue
 	AICommand *queue_tail;  ///< The tail of this queue
-} AIPlayer;
+};
 
 /* The struct to keep some data about the AI in general */
-typedef struct AIStruct {
+struct AIStruct {
 	/* General */
 	bool enabled;           ///< Is AI enabled?
 	uint tick;              ///< The current tick (something like _frame_counter, only for AIs)
-} AIStruct;
+};
 
 VARDEF AIStruct _ai;
 VARDEF AIPlayer _ai_player[MAX_PLAYERS];
--- a/src/ai/default/default.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/ai/default/default.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -446,12 +446,12 @@
 	_veh_do_replace_proc[v->type - VEH_Train](p);
 }
 
-typedef struct FoundRoute {
+struct FoundRoute {
 	int distance;
 	CargoID cargo;
 	void *from;
 	void *to;
-} FoundRoute;
+};
 
 static Town *AiFindRandomTown()
 {
@@ -1824,12 +1824,12 @@
 	return tile + ToTileIndexDiff(p->tileoffs) - TileOffsByDiagDir(*dir = p->attr);
 }
 
-typedef struct AiRailPathFindData {
+struct AiRailPathFindData {
 	TileIndex tile;
 	TileIndex tile2;
 	int count;
 	bool flag;
-} AiRailPathFindData;
+};
 
 static bool AiEnumFollowTrack(TileIndex tile, AiRailPathFindData *a, int track, uint length, byte *state)
 {
@@ -1858,7 +1858,7 @@
 	return arpfd.count > 8;
 }
 
-typedef struct AiRailFinder {
+struct AiRailFinder {
 	TileIndex final_tile;
 	byte final_dir;
 	byte depth;
@@ -1873,7 +1873,7 @@
 	TileIndex cur_best_tile, best_tile;
 	TileIndex bridge_end_tile;
 	Player *player;
-} AiRailFinder;
+};
 
 static const byte _ai_table_15[4][8] = {
 	{0, 0, 4, 3, 3, 1, 128 + 0, 64},
@@ -2713,7 +2713,7 @@
 	p->ai.state_mode = 255;
 }
 
-typedef struct {
+struct AiRoadFinder {
 	TileIndex final_tile;
 	byte final_dir;
 	byte depth;
@@ -2728,14 +2728,14 @@
 	TileIndex cur_best_tile, best_tile;
 	TileIndex bridge_end_tile;
 	Player *player;
-} AiRoadFinder;
-
-typedef struct AiRoadEnum {
+};
+
+struct AiRoadEnum {
 	TileIndex dest;
 	TileIndex best_tile;
 	int best_track;
 	uint best_dist;
-} AiRoadEnum;
+};
 
 static const byte _dir_by_track[] = {
 	0, 1, 0, 1, 2, 1,
--- a/src/ai/trolly/pathfinder.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/ai/trolly/pathfinder.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -372,9 +372,9 @@
 extern uint GetRailFoundation(Slope tileh, TrackBits bits); // XXX function declaration in .c
 extern uint GetRoadFoundation(Slope tileh, RoadBits bits); // XXX function declaration in .c
 extern uint GetBridgeFoundation(Slope tileh, Axis); // XXX function declaration in .c
-typedef enum BridgeFoundations{
+enum BridgeFoundation {
 	BRIDGE_NO_FOUNDATION = 1 << 0 | 1 << 3 | 1 << 6 | 1 << 9 | 1 << 12,
-} BridgeFoundation;
+};
 
 // The most important function: it calculates the g-value
 static int32 AyStar_AiPathFinder_CalculateG(AyStar *aystar, AyStarNode *current, OpenListNode *parent)
--- a/src/aircraft.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/aircraft.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,12 +8,12 @@
 #include "station_map.h"
 #include "vehicle.h"
 
-typedef enum AircraftSubTypes {
+enum AircraftSubType {
 	AIR_HELICOPTER = 0,
 	AIR_AIRCRAFT   = 2,
 	AIR_SHADOW     = 4,
 	AIR_ROTOR      = 6
-} AircraftSubType;
+};
 
 
 /** Check if the aircraft type is a normal flying device; eg
--- a/src/airport.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/airport.h	Wed Mar 07 12:11:48 2007 +0000
@@ -112,17 +112,17 @@
 
 	NOTHING_block            = 1 << 30;
 
-typedef struct AirportMovingData {
+struct AirportMovingData {
 	int16 x;
 	int16 y;
 	uint16 flag;
 	DirectionByte direction;
-} AirportMovingData;
+};
 
 struct AirportFTAbuildup;
 
 // Finite sTate mAchine --> FTA
-typedef struct AirportFTAClass {
+struct AirportFTAClass {
 	public:
 		enum Flags {
 			AIRPLANES   = 0x1,
@@ -167,19 +167,19 @@
 	byte size_y;
 	byte delta_z;                         // Z adjustment for helicopter pads
 	byte catchment;
-} AirportFTAClass;
+};
 
 DECLARE_ENUM_AS_BIT_SET(AirportFTAClass::Flags)
 
 
 // internal structure used in openttd - Finite sTate mAchine --> FTA
-typedef struct AirportFTA {
-	struct AirportFTA *next; // possible extra movement choices from this position
+struct AirportFTA {
+	AirportFTA *next;        // possible extra movement choices from this position
 	uint64 block;            // 64 bit blocks (st->airport_flags), should be enough for the most complex airports
 	byte position;           // the position that an airplane is at
 	byte next_position;      // next position from this position
 	byte heading;            // heading (current orders), guiding an airplane to its target on an airport
-} AirportFTA;
+};
 
 void InitializeAirports();
 void UnInitializeAirports();
--- a/src/airport_movement.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/airport_movement.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,12 +8,12 @@
 
 // state machine input struct (from external file, etc.)
 // Finite sTate mAchine --> FTA
-typedef struct AirportFTAbuildup {
+struct AirportFTAbuildup {
 	byte position; // the position that an airplane is at
 	byte heading;  // the current orders (eg. TAKEOFF, HANGAR, ENDLANDING, etc.)
 	uint64 block;  // the block this position is on on the airport (st->airport_flags)
 	byte next;     // next position from this position
-} AirportFTAbuildup;
+};
 
 ///////////////////////////////////////////////////////////////////////
 /////*********Movement Positions on Airports********************///////
--- a/src/aystar.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/aystar.h	Wed Mar 07 12:11:48 2007 +0000
@@ -27,7 +27,6 @@
 	AYSTAR_INVALID_NODE = -1,
 };
 
-typedef struct AyStarNode AyStarNode;
 struct AyStarNode {
 	TileIndex tile;
 	int direction;
@@ -35,7 +34,6 @@
 };
 
 // The resulting path has nodes looking like this.
-typedef struct PathNode PathNode;
 struct PathNode {
 	AyStarNode node;
 	// The parent of this item
@@ -45,13 +43,12 @@
 // For internal use only
 // We do not save the h-value, because it is only needed to calculate the f-value.
 //  h-value should _always_ be the distance left to the end-tile.
-typedef struct OpenListNode OpenListNode;
 struct OpenListNode {
 	int g;
 	PathNode path;
 };
 
-typedef struct AyStar AyStar;
+struct AyStar;
 /*
  * This function is called to check if the end-tile is found
  *  return values can be:
--- a/src/bmp.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/bmp.h	Wed Mar 07 12:11:48 2007 +0000
@@ -5,7 +5,7 @@
 #ifndef BMP_H
 #define BMP_H
 
-typedef struct {
+struct BmpInfo {
 	uint32 offset;       ///< offset of bitmap data from .bmp file begining
 	uint32 width;        ///< bitmap width
 	uint32 height;       ///< bitmap height
@@ -13,22 +13,22 @@
 	uint16 bpp;          ///< bits per pixel
 	uint32 compression;  ///< compression method (0 = none, 1 = 8-bit RLE, 2 = 4-bit RLE)
 	uint32 palette_size; ///< number of colors in palette
-} BmpInfo;
+};
 
-typedef struct {
+struct BmpData {
 	Colour *palette;
 	byte   *bitmap;
-} BmpData;
+};
 
 #define BMP_BUFFER_SIZE 1024
 
-typedef struct {
+struct BmpBuffer {
 	byte data[BMP_BUFFER_SIZE];
 	int pos;
 	int read;
 	FILE *file;
 	uint real_pos;
-} BmpBuffer;
+};
 
 void BmpInitializeBuffer(BmpBuffer *buffer, FILE *file);
 bool BmpReadHeader(BmpBuffer *buffer, BmpInfo *info, BmpData *data);
--- a/src/bridge.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/bridge.h	Wed Mar 07 12:11:48 2007 +0000
@@ -11,7 +11,7 @@
 
 /** Struct containing information about a single bridge type
  */
-typedef struct Bridge {
+struct Bridge {
 	Year avail_year;     ///< the year in which the bridge becomes available
 	byte min_length;     ///< the minimum length of the bridge (not counting start and end tile)
 	byte max_length;     ///< the maximum length of the bridge (not counting start and end tile)
@@ -22,7 +22,7 @@
 	StringID material;   ///< the string that contains the bridge description
 	PalSpriteID **sprite_table; ///< table of sprites for drawing the bridge
 	byte flags;          ///< bit 0 set: disable drawing of far pillars.
-} Bridge;
+};
 
 extern const Bridge orig_bridge[MAX_BRIDGES];
 extern Bridge _bridge[MAX_BRIDGES];
--- a/src/cargotype.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/cargotype.h	Wed Mar 07 12:11:48 2007 +0000
@@ -9,7 +9,7 @@
 typedef uint32 CargoLabel;
 
 
-typedef struct CargoSpec {
+struct CargoSpec {
 	uint8 bitnum;
 	CargoLabel label;
 	uint32 grfid;
@@ -35,7 +35,7 @@
 	uint16 classes;
 
 	bool IsValid() const;
-} CargoSpec;
+};
 
 
 extern uint32 _cargo_mask;
--- a/src/clear_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/clear_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -22,12 +22,12 @@
 #include "genworld.h"
 #include "industry.h"
 
-typedef struct TerraformerHeightMod {
+struct TerraformerHeightMod {
 	TileIndex tile;
 	byte height;
-} TerraformerHeightMod;
+};
 
-typedef struct TerraformerState {
+struct TerraformerState {
 	int height[4];
 	uint32 flags;
 
@@ -40,7 +40,7 @@
 	TileIndex *tile_table;
 	TerraformerHeightMod *modheight;
 
-} TerraformerState;
+};
 
 static int TerraformAllowTileProcess(TerraformerState *ts, TileIndex tile)
 {
--- a/src/clear_map.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/clear_map.h	Wed Mar 07 12:11:48 2007 +0000
@@ -12,14 +12,14 @@
 /* ground type, m5 bits 2...4
  * valid densities (bits 0...1) in comments after the enum
  */
-typedef enum ClearGround {
+enum ClearGround {
 	CLEAR_GRASS  = 0, ///< 0-3
 	CLEAR_ROUGH  = 1, ///< 3
 	CLEAR_ROCKS  = 2, ///< 3
 	CLEAR_FIELDS = 3, ///< 3
 	CLEAR_SNOW   = 4, ///< 0-3
 	CLEAR_DESERT = 5  ///< 1,3
-} ClearGround;
+};
 
 
 static inline ClearGround GetClearGround(TileIndex t)
--- a/src/command.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/command.h	Wed Mar 07 12:11:48 2007 +0000
@@ -176,10 +176,10 @@
 
 typedef int32 CommandProc(TileIndex tile, uint32 flags, uint32 p1, uint32 p2);
 
-typedef struct Command {
+struct Command {
 	CommandProc *proc;
 	byte flags;
-} Command;
+};
 
 //#define return_cmd_error(errcode) do { _error_message=(errcode); return CMD_ERROR; } while(0)
 #define return_cmd_error(errcode) do { return CMD_ERROR | (errcode); } while (0)
--- a/src/console.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/console.h	Wed Mar 07 12:11:48 2007 +0000
@@ -10,7 +10,7 @@
 /* maximum length of a totally expanded command */
 #define ICON_MAX_STREAMSIZE 1024
 
-typedef enum IConsoleVarTypes {
+enum IConsoleVarTypes {
 	ICONSOLE_VAR_BOOLEAN,
 	ICONSOLE_VAR_BYTE,
 	ICONSOLE_VAR_UINT16,
@@ -18,19 +18,19 @@
 	ICONSOLE_VAR_INT16,
 	ICONSOLE_VAR_INT32,
 	ICONSOLE_VAR_STRING
-} IConsoleVarTypes;
+};
 
-typedef enum IConsoleModes {
+enum IConsoleModes {
 	ICONSOLE_FULL,
 	ICONSOLE_OPENED,
 	ICONSOLE_CLOSED
-} IConsoleModes;
+};
 
-typedef enum IConsoleHookTypes {
+enum IConsoleHookTypes {
 	ICONSOLE_HOOK_ACCESS,
 	ICONSOLE_HOOK_PRE_ACTION,
 	ICONSOLE_HOOK_POST_ACTION
-} IConsoleHookTypes;
+};
 
 /** --Hooks--
  * Hooks are certain triggers get get accessed/executed on either
@@ -38,11 +38,11 @@
  * for general flow of permissions or special action needed in some cases
  */
 typedef bool IConsoleHook();
-typedef struct IConsoleHooks{
+struct IConsoleHooks{
 	IConsoleHook *access; ///< trigger when accessing the variable/command
 	IConsoleHook *pre;    ///< trigger before the variable/command is changed/executed
 	IConsoleHook *post;   ///< trigger after the variable/command is changed/executed
-} IConsoleHooks;
+};
 
 /** --Commands--
  * Commands are commands, or functions. They get executed once and any
@@ -53,14 +53,13 @@
  */
 typedef bool (IConsoleCmdProc)(byte argc, char *argv[]);
 
-struct IConsoleCmd;
-typedef struct IConsoleCmd {
+struct IConsoleCmd {
 	char *name;               ///< name of command
-	struct IConsoleCmd *next; ///< next command in list
+	IConsoleCmd *next;        ///< next command in list
 
 	IConsoleCmdProc *proc;    ///< process executed when command is typed
 	IConsoleHooks hook;       ///< any special trigger action that needs executing
-} IConsoleCmd;
+};
 
 /** --Variables--
  * Variables are pointers to real ingame variables which allow for
@@ -71,10 +70,9 @@
  * - '++' to increase value by one
  * - '--' to decrease value by one
  */
-struct IConsoleVar;
-typedef struct IConsoleVar {
+struct IConsoleVar {
 	char *name;               ///< name of the variable
-	struct IConsoleVar *next; ///< next variable in list
+	IConsoleVar *next;        ///< next variable in list
 
 	void *addr;               ///< the address where the variable is pointing at
 	uint32 size;              ///< size of the variable, used for strings
@@ -82,7 +80,7 @@
 	IConsoleVarTypes type;    ///< type of variable (for correct assignment/output)
 	IConsoleCmdProc *proc;    ///< some variables need really special handling, use a callback function for that
 	IConsoleHooks hook;       ///< any special trigger action that needs executing
-} IConsoleVar;
+};
 
 /** --Aliases--
  * Aliases are like shortcuts for complex functions, variable assignments,
@@ -95,13 +93,12 @@
  * - "%!" also lists all parameters but presenting them to the aliased command as one argument
  * - ";" allows for combining commands (see example 'ng')
  */
-struct IConsoleAlias;
-typedef struct IConsoleAlias {
+struct IConsoleAlias {
 	char *name;                 ///< name of the alias
-	struct IConsoleAlias *next; ///< next alias in list
+	IConsoleAlias *next;        ///< next alias in list
 
 	char *cmdline;              ///< command(s) that is/are being aliased
-} IConsoleAlias;
+};
 
 /* console parser */
 VARDEF IConsoleCmd   *_iconsole_cmds;    ///< list of registred commands
--- a/src/currency.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/currency.h	Wed Mar 07 12:11:48 2007 +0000
@@ -12,7 +12,7 @@
 	CUSTOM_CURRENCY_ID = NUM_CURRENCY - 1
 };
 
-typedef struct {
+struct CurrencySpec {
 	uint16 rate;
 	char separator;
 	Year to_euro;
@@ -29,7 +29,7 @@
 	 */
 	byte symbol_pos;
 	StringID name;
-} CurrencySpec;
+};
 
 
 extern CurrencySpec _currency_specs[NUM_CURRENCY];
--- a/src/date.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/date.h	Wed Mar 07 12:11:48 2007 +0000
@@ -44,11 +44,11 @@
 typedef uint8  Day;
 typedef uint16 DateFract;
 
-typedef struct YearMonthDay {
+struct YearMonthDay {
 	Year  year;
 	Month month;
 	Day   day;
-} YearMonthDay;
+};
 
 extern Year      _cur_year;
 extern Month     _cur_month;
--- a/src/debug.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/debug.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -33,10 +33,10 @@
 int _debug_station_level;
 
 
-typedef struct DebugLevel {
+struct DebugLevel {
 	const char *name;
 	int *level;
-} DebugLevel;
+};
 
 #define DEBUG_LEVEL(x) { #x, &_debug_##x##_level }
 	static const DebugLevel debug_level[] = {
--- a/src/depot_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/depot_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -290,10 +290,10 @@
 	}
 }
 
-typedef struct GetDepotVehiclePtData {
+struct GetDepotVehiclePtData {
 	Vehicle *head;
 	Vehicle *wagon;
-} GetDepotVehiclePtData;
+};
 
 enum {
 	MODE_ERROR        =  1,
--- a/src/direction.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/direction.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,7 +8,7 @@
 #include "helpers.hpp"
 
 /* Direction as commonly used in v->direction, 8 way. */
-typedef enum Direction {
+enum Direction {
 	DIR_BEGIN = 0,
 	DIR_N   = 0,
 	DIR_NE  = 1,      ///< Northeast, upper right on your monitor
@@ -20,7 +20,7 @@
 	DIR_NW  = 7,
 	DIR_END,
 	INVALID_DIR = 0xFF,
-} Direction;
+};
 
 /** Define basic enum properties */
 template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR> {};
@@ -32,14 +32,14 @@
 }
 
 
-typedef enum DirDiff {
+enum DirDiff {
 	DIRDIFF_SAME    = 0,
 	DIRDIFF_45RIGHT = 1,
 	DIRDIFF_90RIGHT = 2,
 	DIRDIFF_REVERSE = 4,
 	DIRDIFF_90LEFT  = 6,
 	DIRDIFF_45LEFT  = 7
-} DirDiff;
+};
 
 static inline DirDiff DirDifference(Direction d0, Direction d1)
 {
@@ -59,7 +59,7 @@
 
 
 /* Direction commonly used as the direction of entering and leaving tiles, 4-way */
-typedef enum DiagDirection {
+enum DiagDirection {
 	DIAGDIR_BEGIN = 0,
 	DIAGDIR_NE  = 0,      ///< Northeast, upper right on your monitor
 	DIAGDIR_SE  = 1,
@@ -67,7 +67,7 @@
 	DIAGDIR_NW  = 3,
 	DIAGDIR_END,
 	INVALID_DIAGDIR = 0xFF,
-} DiagDirection;
+};
 
 DECLARE_POSTFIX_INCREMENT(DiagDirection);
 
@@ -81,12 +81,12 @@
 }
 
 
-typedef enum DiagDirDiff {
+enum DiagDirDiff {
 	DIAGDIRDIFF_SAME    = 0,
 	DIAGDIRDIFF_90RIGHT = 1,
 	DIAGDIRDIFF_REVERSE = 2,
 	DIAGDIRDIFF_90LEFT  = 3
-} DiagDirDiff;
+};
 
 static inline DiagDirection ChangeDiagDir(DiagDirection d, DiagDirDiff delta)
 {
@@ -107,11 +107,11 @@
 
 
 /* the 2 axis */
-typedef enum Axis {
+enum Axis {
 	AXIS_X = 0,
 	AXIS_Y = 1,
 	AXIS_END
-} Axis;
+};
 
 
 static inline Axis OtherAxis(Axis a)
--- a/src/driver.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/driver.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -30,17 +30,17 @@
 #include "video/cocoa_v.h"
 #include "video/win32_v.h"
 
-typedef struct DriverDesc {
+struct DriverDesc {
 	const char* name;
 	const char* longname;
 	const HalCommonDriver* drv;
-} DriverDesc;
+};
 
-typedef struct DriverClass {
+struct DriverClass {
 	const DriverDesc *descs;
 	const char *name;
 	const HalCommonDriver** drv;
-} DriverClass;
+};
 
 
 #define M(x, y, z) { x, y, (const HalCommonDriver *)(void *)z }
--- a/src/economy.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/economy.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -901,12 +901,12 @@
 		InvalidateWindow(WC_SUBSIDIES_LIST, 0);
 }
 
-typedef struct FoundRoute {
+struct FoundRoute {
 	uint distance;
 	CargoID cargo;
 	void *from;
 	void *to;
-} FoundRoute;
+};
 
 static void FindSubsidyPassengerRoute(FoundRoute *fr)
 {
--- a/src/economy.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/economy.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,24 +8,24 @@
 void ResetPriceBaseMultipliers();
 void SetPriceBaseMultiplier(uint price, byte factor);
 
-typedef struct {
+struct Economy {
 	int32 max_loan;         ///< Maximum possible loan
 	int32 max_loan_unround; ///< Economy fluctuation status
 	int fluct;
 	byte interest_rate;     ///< Interest
 	byte infl_amount;       ///< inflation amount
 	byte infl_amount_pr;    ///< "floating" portion of inflation
-} Economy;
+};
 
 VARDEF Economy _economy;
 
-typedef struct Subsidy {
+struct Subsidy {
 	CargoID cargo_type;
 	byte age;
 	/* from and to can either be TownID, StationID or IndustryID */
 	uint16 from;
 	uint16 to;
-} Subsidy;
+};
 
 
 enum ScoreID {
@@ -48,11 +48,11 @@
 
 DECLARE_POSTFIX_INCREMENT(ScoreID);
 
-typedef struct ScoreInfo {
+struct ScoreInfo {
 	byte id;    ///< Unique ID of the score
 	int needed; ///< How much you need to get the perfect score
 	int score;  ///< How much score it will give
-} ScoreInfo;
+};
 
 extern const ScoreInfo _score_info[];
 extern int _score_part[MAX_PLAYERS][SCORE_END];
--- a/src/engine.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/engine.h	Wed Mar 07 12:11:48 2007 +0000
@@ -16,7 +16,7 @@
 	RAILVEH_WAGON,       ///< simple wagon, not motorized
 };
 
-typedef struct RailVehicleInfo {
+struct RailVehicleInfo {
 	byte image_index;
 	RailVehicleTypes railveh_type;
 	byte base_cost;
@@ -39,9 +39,9 @@
 	byte shorten_factor;   ///< length on main map for this type is 8 - shorten_factor
 	byte tractive_effort; ///< Tractive effort coefficient
 	byte user_def_data;    ///< Property 0x25: "User-defined bit mask" Used only for (very few) NewGRF vehicles
-} RailVehicleInfo;
+};
 
-typedef struct ShipVehicleInfo {
+struct ShipVehicleInfo {
 	byte image_index;
 	byte base_cost;
 	uint16 max_speed;
@@ -50,7 +50,7 @@
 	byte running_cost;
 	SoundFxByte sfx;
 	bool refittable;
-} ShipVehicleInfo;
+};
 
 /* AircraftVehicleInfo subtypes, bitmask type.
  * If bit 0 is 0 then it is a helicopter, otherwise it is a plane
@@ -61,7 +61,7 @@
 	AIR_FAST = 2
 };
 
-typedef struct AircraftVehicleInfo {
+struct AircraftVehicleInfo {
 	byte image_index;
 	byte base_cost;
 	byte running_cost;
@@ -71,9 +71,9 @@
 	uint16 max_speed;
 	byte mail_capacity;
 	uint16 passenger_capacity;
-} AircraftVehicleInfo;
+};
 
-typedef struct RoadVehicleInfo {
+struct RoadVehicleInfo {
 	byte image_index;
 	byte base_cost;
 	byte running_cost;
@@ -81,12 +81,12 @@
 	byte max_speed;
 	byte capacity;
 	CargoID cargo_type;
-} RoadVehicleInfo;
+};
 
 /** Information about a vehicle
  *  @see table/engines.h
  */
-typedef struct EngineInfo {
+struct EngineInfo {
 	Date base_intro;
 	Year lifelength;
 	Year base_life;
@@ -97,9 +97,9 @@
 	byte refit_cost;
 	byte misc_flags;
 	byte callbackmask;
-} EngineInfo;
+};
 
-typedef struct Engine {
+struct Engine {
 	Date intro_date;
 	Date age;
 	uint16 reliability;
@@ -112,7 +112,7 @@
 	byte preview_wait;
 	byte player_avail;
 	byte type; ///< type, ie VEH_Road, VEH_Train, etc. Same as in vehicle.h
-} Engine;
+};
 
 /**
  * EngineInfo.misc_flags is a bitmask, with the following values
@@ -261,11 +261,9 @@
 	EngineRenewID index;
 	EngineID from;
 	EngineID to;
-	struct EngineRenew *next;
+	EngineRenew *next;
 };
 
-typedef struct EngineRenew EngineRenew;
-
 /**
  * Memory pool for engine renew elements. DO NOT USE outside of engine.c. Is
  * placed here so the only exception to this rule, the saveload code, can use
--- a/src/engine_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/engine_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -48,10 +48,10 @@
 typedef void DrawEngineProc(int x, int y, EngineID engine, SpriteID pal);
 typedef void DrawEngineInfoProc(EngineID, int x, int y, int maxw);
 
-typedef struct DrawEngineInfo {
+struct DrawEngineInfo {
 	DrawEngineProc *engine_proc;
 	DrawEngineInfoProc *info_proc;
-} DrawEngineInfo;
+};
 
 static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw);
 static void DrawRoadVehEngineInfo(EngineID engine, int x, int y, int maxw);
--- a/src/fileio.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/fileio.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -18,7 +18,7 @@
 #define FIO_BUFFER_SIZE 512
 #define MAX_HANDLES 64
 
-typedef struct {
+struct Fio {
 	byte *buffer, *buffer_end;          ///< position pointer in local buffer and last valid byte of buffer
 	uint32 pos;                         ///< current (system) position in file
 	FILE *cur_fh;                       ///< current file handle
@@ -29,7 +29,7 @@
 	const char *filename[MAX_HANDLES];  ///< array of filenames we (should) have open
 	uint usage_count[MAX_HANDLES];      ///< count how many times this file has been opened
 #endif /* LIMITED_FDS */
-} Fio;
+};
 
 static Fio _fio;
 
--- a/src/fios.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/fios.h	Wed Mar 07 12:11:48 2007 +0000
@@ -6,12 +6,12 @@
 #define FIOS_H
 
 /* Deals with finding savegames */
-typedef struct {
+struct FiosItem {
 	byte type;
 	uint64 mtime;
 	char title[64];
 	char name[256 - 12 - 64];
-} FiosItem;
+};
 
 enum {
 	FIOS_TYPE_DRIVE        =   0,
@@ -56,15 +56,15 @@
 /* Implementation of opendir/readdir/closedir for Windows */
 #if defined(WIN32)
 #include <windows.h>
-typedef struct DIR DIR;
+struct DIR;
 
-typedef struct dirent { // XXX - only d_name implemented
+struct dirent { // XXX - only d_name implemented
 	wchar_t *d_name; // name of found file
 	/* little hack which will point to parent DIR struct which will
 	 * save us a call to GetFileAttributes if we want information
 	 * about the file (for example in function fio_bla) */
 	DIR *dir;
-} dirent;
+};
 
 struct DIR {
 	HANDLE hFind;
--- a/src/fontcache.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/fontcache.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -315,10 +315,10 @@
 }
 
 
-typedef struct GlyphEntry {
+struct GlyphEntry {
 	Sprite *sprite;
 	byte width;
-} GlyphEntry;
+};
 
 
 /* The glyph cache. This is structured to reduce memory consumption.
--- a/src/fontcache.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/fontcache.h	Wed Mar 07 12:11:48 2007 +0000
@@ -14,14 +14,14 @@
 
 #ifdef WITH_FREETYPE
 
-typedef struct FreeTypeSettings {
+struct FreeTypeSettings {
 	char small_font[260];
 	char medium_font[260];
 	char large_font[260];
 	uint small_size;
 	uint medium_size;
 	uint large_size;
-} FreeTypeSettings;
+};
 
 extern FreeTypeSettings _freetype;
 
--- a/src/genworld.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/genworld.h	Wed Mar 07 12:11:48 2007 +0000
@@ -29,7 +29,7 @@
 typedef void gw_done_proc();
 typedef void gw_abort_proc();
 
-typedef struct gw_info {
+struct gw_info {
 	bool active;           ///< Is generating world active
 	bool abort;            ///< Whether to abort the thread ASAP
 	bool wait_for_draw;    ///< Are we waiting on a draw event
@@ -42,14 +42,14 @@
 	gw_done_proc *proc;    ///< Proc that is called when done (can be NULL)
 	gw_abort_proc *abortp; ///< Proc that is called when aborting (can be NULL)
 	OTTDThread *thread;    ///< The thread we are in (can be NULL)
-} gw_info;
+};
 
 #ifdef TEMPORARY_OTTDTHREAD_DEFINITION
 #undef OTTDThread
 #undef TEMPORARY_OTTDTHREAD_DEFINITION
 #endif
 
-typedef enum gwp_classes {
+enum gwp_class {
 	GWP_MAP_INIT,    ///< Initialize/allocate the map, start economy
 	GWP_LANDSCAPE,   ///< Create the landscape
 	GWP_ROUGH_ROCKY, ///< Make rough and rocky areas
@@ -61,7 +61,7 @@
 	GWP_RUNTILELOOP, ///< Runs the tile loop 1280 times to make snow etc
 	GWP_GAME_START,  ///< Really prepare to start the game
 	GWP_CLASS_COUNT
-} gwp_class;
+};
 
 /**
  * Check if we are currently in the process of generating a world.
--- a/src/genworld_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/genworld_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -29,12 +29,12 @@
 /**
  * In what 'mode' the GenerateLandscapeWindowProc is.
  */
-typedef enum glwp_modes {
+enum glwp_modes {
 	GLWP_GENERATE,
 	GLWP_HEIGHTMAP,
 	GLWP_SCENARIO,
 	GLWP_END
-} glwp_modes;
+};
 
 static uint _heightmap_x = 0;
 static uint _heightmap_y = 0;
@@ -740,13 +740,13 @@
 {   WIDGETS_END},
 };
 
-typedef struct tp_info {
+struct tp_info {
 	uint percent;
 	StringID cls;
 	uint current;
 	uint total;
 	int timer;
-} tp_info;
+};
 
 static tp_info _tp;
 
--- a/src/gfx.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/gfx.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -44,11 +44,11 @@
 Colour _cur_palette[256];
 byte _stringwidth_table[FS_END][224];
 
-typedef enum BlitterModes {
+enum BlitterMode {
 	BM_NORMAL,
 	BM_COLOUR_REMAP,
 	BM_TRANSPARENT,
-} BlitterMode;
+};
 
 static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode);
 
@@ -718,7 +718,7 @@
 	}
 }
 
-typedef struct BlitterParams {
+struct BlitterParams {
 	int start_x, start_y;
 	const byte *sprite;
 	Pixel *dst;
@@ -726,7 +726,7 @@
 	int width, height;
 	int width_org;
 	int pitch;
-} BlitterParams;
+};
 
 static void GfxBlitTileZoomIn(BlitterParams *bp)
 {
--- a/src/gfx.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/gfx.h	Wed Mar 07 12:11:48 2007 +0000
@@ -93,13 +93,13 @@
 typedef int32 CursorID;
 typedef byte Pixel;
 
-typedef struct Point {
+struct Point {
 	int x,y;
-} Point;
+};
 
-typedef struct Rect {
+struct Rect {
 	int left,top,right,bottom;
-} Rect;
+};
 
 /** A single sprite of a list of animated cursors */
 struct AnimCursor {
@@ -108,7 +108,7 @@
 	byte display_time; ///< Amount of ticks this sprite will be shown
 };
 
-typedef struct CursorVars {
+struct CursorVars {
 	Point pos, size, offs, delta; ///< position, size, offset from top-left, and movement
 	Point draw_pos, draw_size;    ///< position and size bounding-box for drawing
 	SpriteID sprite; ///< current image of cursor
@@ -123,20 +123,20 @@
 	bool dirty;      ///< the rect occupied by the mouse is dirty (redraw)
 	bool fix_at;     ///< mouse is moving, but cursor is not (used for scrolling)
 	bool in_window;  ///< mouse inside this window, determines drawing logic
-} CursorVars;
+};
 
-typedef struct DrawPixelInfo {
+struct DrawPixelInfo {
 	Pixel *dst_ptr;
 	int left, top, width, height;
 	int pitch;
 	uint16 zoom;
-} DrawPixelInfo;
+};
 
-typedef struct Colour {
+struct Colour {
 	byte r;
 	byte g;
 	byte b;
-} Colour;
+};
 
 
 
@@ -181,12 +181,12 @@
 
 #include "helpers.hpp"
 
-typedef enum FontSizes {
+enum FontSize {
 	FS_NORMAL,
 	FS_SMALL,
 	FS_LARGE,
 	FS_END,
-} FontSize;
+};
 
 DECLARE_POSTFIX_INCREMENT(FontSize);
 
@@ -292,9 +292,9 @@
 
 VARDEF bool _use_dos_palette;
 
-typedef enum StringColorFlags {
+enum StringColorFlags {
 	IS_PALETTE_COLOR = 0x100, ///< color value is already a real palette color index, not an index of a StringColor
-} StringColorFlags;
+};
 
 
 #ifdef _DEBUG
--- a/src/gfxinit.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/gfxinit.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -18,15 +18,15 @@
 #include "fontcache.h"
 #include <string.h>
 
-typedef struct MD5File {
+struct MD5File {
 	const char * filename;     ///< filename
 	md5_byte_t hash[16];       ///< md5 sum of the file
-} MD5File;
+};
 
-typedef struct FileList {
+struct FileList {
 	MD5File basic[4];          ///< grf files that always have to be loaded
 	MD5File landscape[3];      ///< landscape specific grf files
-} FileList;
+};
 
 enum {
 	SKIP = 0xFFFE,
--- a/src/graph_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/graph_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -43,7 +43,7 @@
 static const int64 INVALID_DATAPOINT     = INT64_MAX; // Value used for a datapoint that shouldn't be drawn.
 static const uint  INVALID_DATAPOINT_POS = UINT_MAX;  // Used to determine if the previous point was drawn.
 
-typedef struct GraphDrawer {
+struct GraphDrawer {
 	uint excluded_data; ///< bitmask of the datasets that shouldn't be displayed.
 	byte num_dataset;
 	byte num_on_x_axis;
@@ -65,7 +65,7 @@
 	StringID format_str_y_axis;
 	byte colors[GRAPH_MAX_DATASETS];
 	int64 cost[GRAPH_MAX_DATASETS][24]; ///< last 2 years
-} GraphDrawer;
+};
 
 static void DrawGraph(const GraphDrawer *gw)
 {
--- a/src/hal.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/hal.h	Wed Mar 07 12:11:48 2007 +0000
@@ -5,26 +5,26 @@
 #ifndef HAL_H
 #define HAL_H
 
-typedef struct {
+struct HalCommonDriver {
 	const char *(*start)(const char * const *parm);
 	void (*stop)();
-} HalCommonDriver;
+};
 
-typedef struct {
+struct HalVideoDriver {
 	const char *(*start)(const char * const *parm);
 	void (*stop)();
 	void (*make_dirty)(int left, int top, int width, int height);
 	void (*main_loop)();
 	bool (*change_resolution)(int w, int h);
 	void (*toggle_fullscreen)(bool fullscreen);
-} HalVideoDriver;
+};
 
-typedef struct {
+struct HalSoundDriver {
 	const char *(*start)(const char * const *parm);
 	void (*stop)();
-} HalSoundDriver;
+};
 
-typedef struct {
+struct HalMusicDriver {
 	const char *(*start)(const char * const *parm);
 	void (*stop)();
 
@@ -32,7 +32,7 @@
 	void (*stop_song)();
 	bool (*is_song_playing)();
 	void (*set_volume)(byte vol);
-} HalMusicDriver;
+};
 
 extern HalMusicDriver *_music_driver;
 extern HalSoundDriver *_sound_driver;
--- a/src/industry.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/industry.h	Wed Mar 07 12:11:48 2007 +0000
@@ -14,11 +14,11 @@
 	INVALID_INDUSTRY = 0xFFFF,
 };
 
-typedef enum IndustryLifeTypes {
+enum IndustryLifeType {
 	INDUSTRYLIFE_NOT_CLOSABLE,     ///< Industry can never close
 	INDUSTRYLIFE_PRODUCTION,       ///< Industry can close and change of production
 	INDUSTRYLIFE_CLOSABLE,         ///< Industry can only close (no production change)
-} IndustryLifeType;
+};
 
 /**
  * Defines the internal data of a functionnal industry
@@ -49,15 +49,15 @@
 	IndustryID index;               ///< index of the industry in the pool of industries
 };
 
-typedef struct IndustryTileTable {
+struct IndustryTileTable {
 	TileIndexDiffC ti;
 	IndustryGfx gfx;
-} IndustryTileTable;
+};
 
 /**
  * Defines the data structure for constructing industry.
  */
-typedef struct IndustrySpec {
+struct IndustrySpec {
 	const IndustryTileTable *const *table;///< List of the tiles composing the industry
 	byte num_table;                       ///< Number of elements in the table
 	byte cost_multiplier;                 ///< Base cost multiplier*/
@@ -74,15 +74,15 @@
 	StringID closure_text;                ///< Message appearing when the industry closes
 	StringID production_up_text;          ///< Message appearing when the industry's production is increasing
 	StringID production_down_text;        ///< Message appearing when the industry's production is decreasing
-} IndustrySpec;
+};
 
 /**
  * Defines the data structure of each indivudual tile of an industry.
  */
-typedef struct IndustryTileSpec {
+struct IndustryTileSpec {
 	CargoID accepts_cargo[3];             ///< Cargo accepted by this tile
 	Slope slopes_refused;                 ///< slope pattern on which this tile cannot be built
-} IndustryTileSpec;
+};
 
 const IndustrySpec *GetIndustrySpec(IndustryType thistype);    ///< Array of industries default data
 const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx);  ///< Array of industry tiles default data
--- a/src/industry_map.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/industry_map.h	Wed Mar 07 12:11:48 2007 +0000
@@ -166,10 +166,10 @@
 	_m[tile].m1 = 0;
 }
 
-typedef struct IndustryTypeSolver {
+struct IndustryTypeSolver {
 	IndustryGfx MinGfx;
 	IndustryGfx MaxGfx;
-} IndustryTypeSolver;
+};
 
 static const IndustryTypeSolver industry_gfx_Solver [IT_END] = {
 	{  0,   6}, ///< IT_COAL_MINE
--- a/src/livery.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/livery.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,7 +8,7 @@
 #include "helpers.hpp"
 
 /* List of different livery schemes. */
-typedef enum LiverySchemes {
+enum LiveryScheme {
 	LS_BEGIN = 0,
 	LS_DEFAULT = 0,
 
@@ -39,25 +39,25 @@
 	LS_LARGE_PLANE,
 
 	LS_END
-} LiveryScheme;
+};
 
 DECLARE_POSTFIX_INCREMENT(LiveryScheme);
 
 /* List of different livery classes, used only by the livery GUI. */
-typedef enum LiveryClasses {
+enum LiveryClass {
 	LC_OTHER,
 	LC_RAIL,
 	LC_ROAD,
 	LC_SHIP,
 	LC_AIRCRAFT,
 	LC_END
-} LiveryClass;
+};
 
 
-typedef struct Livery {
+struct Livery {
 	bool in_use;  ///< Set if this livery should be used instead of the default livery.
 	byte colour1; ///< First colour, for all vehicles.
 	byte colour2; ///< Second colour, for vehicles with 2CC support.
-} Livery;
+};
 
 #endif /* LIVERY_H */
--- a/src/map.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/map.h	Wed Mar 07 12:11:48 2007 +0000
@@ -18,7 +18,7 @@
 #define TILE_MASK(x) ((x) & _map_tile_mask)
 #define TILE_ASSERT(x) assert(TILE_MASK(x) == (x));
 
-typedef struct Tile {
+struct Tile {
 	byte type_height;
 	byte m1;
 	uint16 m2;
@@ -26,7 +26,7 @@
 	byte m4;
 	byte m5;
 	byte m6;
-} Tile;
+};
 
 extern Tile* _m;
 
@@ -92,10 +92,10 @@
 }
 
 
-typedef struct TileIndexDiffC {
+struct TileIndexDiffC {
 	int16 x;
 	int16 y;
-} TileIndexDiffC;
+};
 
 static inline TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc)
 {
--- a/src/md5.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/md5.h	Wed Mar 07 12:11:48 2007 +0000
@@ -68,11 +68,11 @@
 typedef unsigned int md5_word_t; /* 32-bit word */
 
 /* Define the state of the MD5 Algorithm. */
-typedef struct md5_state_s {
+struct md5_state_t {
     md5_word_t count[2]; /* message length in bits, lsw first */
     md5_word_t abcd[4];  /* digest buffer */
     md5_byte_t buf[64];  /* accumulate block */
-} md5_state_t;
+};
 
 /* Initialize the algorithm. */
 void md5_init(md5_state_t *pms);
--- a/src/misc_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/misc_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -1191,12 +1191,12 @@
 };
 
 
-typedef struct query_d {
+struct query_d {
 	void (*proc)(Window*, bool); ///< callback function executed on closing of popup. Window* points to parent, bool is true if 'yes' clicked, false otherwise
 	StringID message;            ///< message shown for query window
 	uint32 params[20];           ///< local copy of _decode_parameters
 	bool calledback;             ///< has callback been executed already (internal usage for WE_DESTROY event)
-} query_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(query_d));
 
 
@@ -1766,7 +1766,7 @@
 typedef TinyEnumT<ce_flags_long> ce_flags;
 
 
-typedef struct CheatEntry {
+struct CheatEntry {
 	VarType type;          ///< type of selector
 	ce_flags flags;        ///< selector flags
 	StringID str;          ///< string with descriptive text
@@ -1774,7 +1774,7 @@
 	bool *been_used;       ///< has this cheat been used before?
 	CheckButtonClick *proc;///< procedure
 	int16 min, max;        ///< range for spinbox setting
-} CheatEntry;
+};
 
 static const CheatEntry _cheats_ui[] = {
 	{SLE_BOOL, {CE_CLICK}, STR_CHEAT_MONEY,          &_cheats.money.value,           &_cheats.money.been_used,           &ClickMoneyCheat,         0,  0},
--- a/src/mixer.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/mixer.h	Wed Mar 07 12:11:48 2007 +0000
@@ -5,7 +5,7 @@
 #ifndef MIXER_H
 #define MIXER_H
 
-typedef struct MixerChannel MixerChannel;
+struct MixerChannel;
 
 enum {
 	MX_AUTOFREE = 1,
--- a/src/music.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/music.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,10 +8,10 @@
 #define NUM_SONGS_PLAYLIST 33
 #define NUM_SONGS_AVAILABLE 22
 
-typedef struct SongSpecs {
+struct SongSpecs {
 	char filename[256];
 	char song_name[64];
-} SongSpecs;
+};
 
 extern const SongSpecs origin_songs_specs[NUM_SONGS_AVAILABLE];
 
--- a/src/network/core/core.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/network/core/core.h	Wed Mar 07 12:11:48 2007 +0000
@@ -16,7 +16,7 @@
 void NetworkCoreShutdown();
 
 /** Status of a network client; reasons why a client has quit */
-typedef enum {
+enum NetworkRecvStatus {
 	NETWORK_RECV_STATUS_OKAY,             ///< Everything is okay
 	NETWORK_RECV_STATUS_DESYNC,           ///< A desync did occur
 	NETWORK_RECV_STATUS_NEWGRF_MISMATCH,  ///< We did not have the required NewGRFs
@@ -27,7 +27,7 @@
 	NETWORK_RECV_STATUS_SERVER_FULL,      ///< The server is full
 	NETWORK_RECV_STATUS_SERVER_BANNED,    ///< The server has banned us
 	NETWORK_RECV_STATUS_CLOSE_QUERY,      ///< Done quering the server
-} NetworkRecvStatus;
+};
 
 /** Forward declaration due to circular dependencies */
 struct Packet;
--- a/src/network/core/game.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/network/core/game.h	Wed Mar 07 12:11:48 2007 +0000
@@ -19,7 +19,7 @@
  * some fields will be empty on the client (like game_password) by default
  * and only filled with data a player enters.
  */
-typedef struct NetworkGameInfo {
+struct NetworkGameInfo {
 	byte game_info_version;                         ///< Version of the game info
 	char server_name[NETWORK_NAME_LENGTH];          ///< Server name
 	char hostname[NETWORK_HOSTNAME_LENGTH];         ///< Hostname of the server (if any)
@@ -43,8 +43,8 @@
 	byte map_set;                                   ///< Graphical set
 	bool dedicated;                                 ///< Is this a dedicated server?
 	char rcon_password[NETWORK_PASSWORD_LENGTH];    ///< RCon password for the server. "" if rcon is disabled
-	struct GRFConfig *grfconfig;                    ///< List of NewGRF files used
-} NetworkGameInfo;
+	GRFConfig *grfconfig;                           ///< List of NewGRF files used
+};
 
 #endif /* ENABLE_NETWORK */
 
--- a/src/network/core/tcp.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/network/core/tcp.h	Wed Mar 07 12:11:48 2007 +0000
@@ -58,8 +58,8 @@
 };
 
 /** Packet that wraps a command */
-typedef struct CommandPacket {
-	struct CommandPacket *next; ///< the next command packet (if in queue)
+struct CommandPacket {
+	CommandPacket *next; ///< the next command packet (if in queue)
 	PlayerByte player; ///< player that is executing the command
 	uint32 cmd;        ///< command being executed
 	uint32 p1;         ///< parameter p1
@@ -68,10 +68,10 @@
 	char text[80];     ///< possible text sent for name changes etc
 	uint32 frame;      ///< the frame in which this packet is executed
 	byte callback;     ///< any callback function executed upon successful completion of the command
-} CommandPacket;
+};
 
 /** Status of a client */
-typedef enum {
+enum ClientStatus {
 	STATUS_INACTIVE,   ///< The client is not connected nor active
 	STATUS_AUTHORIZING,///< The client is authorizing
 	STATUS_AUTH,       ///< The client is authorized
@@ -80,7 +80,7 @@
 	STATUS_DONE_MAP,   ///< The client has downloaded the map
 	STATUS_PRE_ACTIVE, ///< The client is catching up the delayed frames
 	STATUS_ACTIVE,     ///< The client is an active player in the game
-} ClientStatus;
+};
 
 /** Base socket handler for all TCP sockets */
 class NetworkTCPSocketHandler : public NetworkSocketHandler {
--- a/src/network/network.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/network/network.h	Wed Mar 07 12:11:48 2007 +0000
@@ -40,7 +40,7 @@
 #define NETWORK_VEHICLE_TYPES 5
 #define NETWORK_STATION_TYPES 5
 
-typedef struct NetworkPlayerInfo {
+struct NetworkPlayerInfo {
 	char company_name[NETWORK_NAME_LENGTH];         // Company name
 	char password[NETWORK_PASSWORD_LENGTH];         // The password for the player
 	Year inaugurated_year;                          // What year the company started in
@@ -53,9 +53,9 @@
 	uint16 num_station[NETWORK_STATION_TYPES];      // How many stations are there of this type?
 	char players[NETWORK_PLAYERS_LENGTH];           // The players that control this company (Name1, name2, ..)
 	uint16 months_empty;                            // How many months the company is empty
-} NetworkPlayerInfo;
+};
 
-typedef struct NetworkClientInfo {
+struct NetworkClientInfo {
 	uint16 client_index;                            // Index of the client (same as ClientState->index)
 	char client_name[NETWORK_CLIENT_NAME_LENGTH];   // Name of the client
 	byte client_lang;                               // The language of the client
@@ -63,9 +63,9 @@
 	uint32 client_ip;                               // IP-address of the client (so he can be banned)
 	Date join_date;                                 // Gamedate the player has joined
 	char unique_id[NETWORK_NAME_LENGTH];            // Every play sends an unique id so we can indentify him
-} NetworkClientInfo;
+};
 
-typedef enum {
+enum NetworkJoinStatus {
 	NETWORK_JOIN_STATUS_CONNECTING,
 	NETWORK_JOIN_STATUS_AUTHORIZING,
 	NETWORK_JOIN_STATUS_WAITING,
@@ -74,15 +74,15 @@
 	NETWORK_JOIN_STATUS_REGISTERING,
 
 	NETWORK_JOIN_STATUS_GETTING_COMPANY_INFO,
-} NetworkJoinStatus;
+};
 
 // language ids for server_lang and client_lang
-typedef enum {
+enum NetworkLanguage {
 	NETLANG_ANY     = 0,
 	NETLANG_ENGLISH = 1,
 	NETLANG_GERMAN  = 2,
 	NETLANG_FRENCH  = 3,
-} NetworkLanguage;
+};
 
 VARDEF NetworkGameInfo _network_game_info;
 VARDEF NetworkPlayerInfo _network_player_info[MAX_PLAYERS];
--- a/src/network/network_data.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/network/network_data.h	Wed Mar 07 12:11:48 2007 +0000
@@ -20,13 +20,13 @@
 #define NETWORK_SERVER_INDEX 1
 #define NETWORK_EMPTY_INDEX 0
 
-typedef enum {
+enum MapPacket {
 	MAP_PACKET_START,
 	MAP_PACKET_NORMAL,
 	MAP_PACKET_END,
-} MapPacket;
+};
 
-typedef enum {
+enum NetworkErrorCode {
 	NETWORK_ERROR_GENERAL, // Try to use thisone like never
 
 	// Signals from clients
@@ -46,10 +46,10 @@
 	NETWORK_ERROR_KICKED,
 	NETWORK_ERROR_CHEATER,
 	NETWORK_ERROR_FULL,
-} NetworkErrorCode;
+};
 
 // Actions that can be used for NetworkTextMessage
-typedef enum {
+enum NetworkAction {
 	NETWORK_ACTION_JOIN,
 	NETWORK_ACTION_LEAVE,
 	NETWORK_ACTION_SERVER_MESSAGE,
@@ -58,18 +58,18 @@
 	NETWORK_ACTION_CHAT_CLIENT,
 	NETWORK_ACTION_GIVE_MONEY,
 	NETWORK_ACTION_NAME_CHANGE,
-} NetworkAction;
+};
 
-typedef enum {
+enum NetworkPasswordType {
 	NETWORK_GAME_PASSWORD,
 	NETWORK_COMPANY_PASSWORD,
-} NetworkPasswordType;
+};
 
-typedef enum {
+enum DestType {
 	DESTTYPE_BROADCAST, ///< Send message/notice to all players (All)
 	DESTTYPE_TEAM,    ///< Send message/notice to everyone playing the same company (Team)
 	DESTTYPE_CLIENT,    ///< Send message/notice to only a certain player (Private)
-} DestType;
+};
 
 // following externs are instantiated at network.cpp
 extern CommandPacket *_local_command_queue;
--- a/src/network/network_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/network/network_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -32,20 +32,20 @@
 #define BGC 5
 #define BTC 15
 
-typedef struct network_d {
+struct network_d {
 	PlayerID company;        // select company in network lobby
 	byte field;              // select text-field in start-server and game-listing
 	NetworkGameList *server; // selected server in lobby and game-listing
 	FiosItem *map;           // selected map in start-server
-} network_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(network_d));
 
-typedef struct network_ql_d {
+struct network_ql_d {
 	network_d n;                 // see above; general stuff
 	querystr_d q;                // text-input in start-server and game-listing
 	NetworkGameList **sort_list; // list of games (sorted)
 	list_d l;                    // accompanying list-administration
-} network_ql_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(network_ql_d));
 
 /* Global to remember sorting after window has been closed */
--- a/src/newgrf.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -73,15 +73,15 @@
 static CargoLabel _default_cargo_list[_default_cargo_max];
 
 
-typedef enum GrfDataType {
+enum GrfDataType {
 	GDT_SOUND,
-} GrfDataType;
+};
 
 static byte _grf_data_blocks;
 static GrfDataType _grf_data_type;
 
 
-typedef enum grfspec_feature {
+enum grfspec_feature {
 	GSF_TRAIN,
 	GSF_ROAD,
 	GSF_SHIP,
@@ -95,7 +95,7 @@
 	GSF_INDUSTRIES,
 	GSF_CARGOS,
 	GSF_SOUNDFX,
-} grfspec_feature;
+};
 
 
 typedef void (*SpecialSpriteHandler)(byte *buf, int len);
--- a/src/newgrf.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,31 +8,31 @@
 #include "helpers.hpp"
 #include "cargotype.h"
 
-typedef enum GrfLoadingStage {
+enum GrfLoadingStage {
 	GLS_FILESCAN,
 	GLS_SAFETYSCAN,
 	GLS_LABELSCAN,
 	GLS_INIT,
 	GLS_ACTIVATION,
 	GLS_END,
-} GrfLoadingStage;
+};
 
 DECLARE_POSTFIX_INCREMENT(GrfLoadingStage);
 
 
-typedef struct GRFLabel {
+struct GRFLabel {
 	byte label;
 	uint32 nfo_line;
 	uint32 pos;
 	struct GRFLabel *next;
-} GRFLabel;
+};
 
-typedef struct GRFFile {
+struct GRFFile {
 	char *filename;
 	uint32 grfid;
 	uint16 sprite_offset;
 	byte grf_version;
-	struct GRFFile *next;
+	GRFFile *next;
 
 	/* A sprite group contains all sprites of a given vehicle (or multiple
 	 * vehicles) when carrying given cargo. It consists of several sprite
@@ -65,7 +65,7 @@
 	uint8 cargo_max;
 	CargoLabel *cargo_list;
 	uint8 cargo_map[NUM_CARGO];
-} GRFFile;
+};
 
 extern GRFFile *_first_grffile;
 
--- a/src/newgrf_config.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf_config.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -364,7 +364,6 @@
 #ifdef ENABLE_NETWORK
 
 /** Structure for UnknownGRFs; this is a lightweight variant of GRFConfig */
-typedef struct UnknownGRF UnknownGRF;
 struct UnknownGRF : public GRFIdentifier {
 	UnknownGRF *next;
 	char   name[NETWORK_GRF_NAME_LENGTH];
--- a/src/newgrf_config.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf_config.h	Wed Mar 07 12:11:48 2007 +0000
@@ -6,42 +6,42 @@
 #include "openttd.h"
 
 /* GRF config bit flags */
-typedef enum {
+enum GCF_Flags {
 	GCF_SYSTEM,    ///< GRF file is an openttd-internal system grf
 	GCF_UNSAFE,    ///< GRF file is unsafe for static usage
 	GCF_STATIC,    ///< GRF file is used statically (can be used in any MP game)
 	GCF_COMPATIBLE,///< GRF file does not exactly match the requested GRF (different MD5SUM), but grfid matches)
 	GCF_COPY,      ///< The data is copied from a grf in _all_grfs
-} GCF_Flags;
+};
 
-typedef enum {
+enum GRFStatus {
 	GCS_UNKNOWN,      ///< The status of this grf file is unknown
 	GCS_DISABLED,     ///< GRF file is disabled
 	GCS_NOT_FOUND,    ///< GRF file was not found in the local cache
 	GCS_INITIALISED,  ///< GRF file has been initialised
 	GCS_ACTIVATED     ///< GRF file has been activated
-} GRFStatus;
+};
 
-typedef enum {
+enum GRFListCompatibility{
 	GLC_ALL_GOOD,
 	GLC_COMPATIBLE,
 	GLC_NOT_FOUND
-} GRFListCompatibility;
+};
 
-typedef struct GRFIdentifier {
+struct GRFIdentifier {
 	uint32 grfid;
 	uint8 md5sum[16];
-} GRF;
+};
 
-typedef struct GRFError {
+struct GRFError {
 	StringID message;
 	StringID data;
 	StringID severity;
 	uint8 num_params;
 	uint8 param_number[2];
-} GRFError;
+};
 
-typedef struct GRFConfig : public GRFIdentifier {
+struct GRFConfig : public GRFIdentifier {
 	char *filename;
 	char *name;
 	char *info;
@@ -53,7 +53,7 @@
 	uint8 num_params;
 
 	struct GRFConfig *next;
-} GRFConfig;
+};
 
 /* First item in list of all scanned NewGRFs */
 extern GRFConfig *_all_grfs;
--- a/src/newgrf_engine.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf_engine.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -24,17 +24,17 @@
 int _traininfo_vehicle_pitch = 0;
 int _traininfo_vehicle_width = 29;
 
-typedef struct WagonOverride {
+struct WagonOverride {
 	byte *train_id;
 	int trains;
 	CargoID cargo;
 	const SpriteGroup *group;
-} WagonOverride;
+};
 
-typedef struct WagonOverrides {
+struct WagonOverrides {
 	int overrides_count;
 	WagonOverride *overrides;
-} WagonOverrides;
+};
 
 static WagonOverrides _engine_wagon_overrides[TOTAL_NUM_ENGINES];
 
--- a/src/newgrf_engine.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf_engine.h	Wed Mar 07 12:11:48 2007 +0000
@@ -36,7 +36,7 @@
 #define GetCustomVehicleSprite(v, direction) GetCustomEngineSprite(v->engine_type, v, direction)
 #define GetCustomVehicleIcon(et, direction) GetCustomEngineSprite(et, NULL, direction)
 
-typedef enum VehicleTrigger {
+enum VehicleTrigger {
 	VEHICLE_TRIGGER_NEW_CARGO     = 1,
 	// Externally triggered only for the first vehicle in chain
 	VEHICLE_TRIGGER_DEPOT         = 2,
@@ -44,7 +44,7 @@
 	VEHICLE_TRIGGER_EMPTY         = 4,
 	// Not triggered externally (called for the whole chain if we got NEW_CARGO)
 	VEHICLE_TRIGGER_ANY_NEW_CARGO = 8,
-} VehicleTrigger;
+};
 void TriggerVehicle(Vehicle *veh, VehicleTrigger trigger);
 
 void SetCustomEngineName(EngineID engine, StringID name);
--- a/src/newgrf_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -106,10 +106,10 @@
 
 
 /* Dialogue for adding NewGRF files to the selection */
-typedef struct newgrf_add_d {
+struct newgrf_add_d {
 	GRFConfig **list;
 	const GRFConfig *sel;
-} newgrf_add_d;
+};
 
 
 static void NewGRFAddDlgWndProc(Window *w, WindowEvent *e)
@@ -236,14 +236,14 @@
 
 
 /* 'NewGRF Settings' dialogue */
-typedef struct newgrf_d {
+struct newgrf_d {
 	GRFConfig **orig_list; ///< grf list the window is shown with
 	GRFConfig **list;      ///< temporary grf list to which changes are made
 	GRFConfig *sel;        ///< selected grf item
 	bool editable;         ///< is the window editable
 	bool show_params;      ///< are the grf-parameters shown in the info-panel
 	bool execute;          ///< on pressing 'apply changes' are grf changes applied immediately, or only list is updated
-} newgrf_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(newgrf_d));
 
 
--- a/src/newgrf_sound.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf_sound.h	Wed Mar 07 12:11:48 2007 +0000
@@ -3,7 +3,7 @@
 #ifndef NEWGRF_SOUND_H
 #define NEWGRF_SOUND_H
 
-typedef enum VehicleSoundEvents {
+enum VehicleSoundEvent {
 	VSE_START        = 1,
 	VSE_TUNNEL       = 2,
 	VSE_BREAKDOWN    = 3,
@@ -13,7 +13,7 @@
 	VSE_RUNNING_16   = 7,
 	VSE_STOPPED_16   = 8,
 	VSE_LOAD_UNLOAD  = 9,
-} VehicleSoundEvent;
+};
 
 
 FileEntry *AllocateFileEntry();
--- a/src/newgrf_spritegroup.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf_spritegroup.h	Wed Mar 07 12:11:48 2007 +0000
@@ -4,12 +4,12 @@
 #define NEWGRF_SPRITEGROUP_H
 
 
-typedef struct SpriteGroup SpriteGroup;
+struct SpriteGroup;
 
 
 /* 'Real' sprite groups contain a list of other result or callback sprite
  * groups. */
-typedef struct RealSpriteGroup {
+struct RealSpriteGroup {
 	// Loaded = in motion, loading = not moving
 	// Each group contains several spritesets, for various loading stages
 
@@ -21,28 +21,28 @@
 	byte num_loading;      ///< Number of loading groups
 	const SpriteGroup **loaded;  ///< List of loaded groups (can be SpriteIDs or Callback results)
 	const SpriteGroup **loading; ///< List of loading groups (can be SpriteIDs or Callback results)
-} RealSpriteGroup;
+};
 
 /* Shared by deterministic and random groups. */
-typedef enum VarSpriteGroupScopes {
+enum VarSpriteGroupScope {
 	VSG_SCOPE_SELF,
 	// Engine of consists for vehicles, city for stations.
 	VSG_SCOPE_PARENT,
-} VarSpriteGroupScope;
+};
 
-typedef enum DeterministicSpriteGroupSizes {
+enum DeterministicSpriteGroupSize {
 	DSG_SIZE_BYTE,
 	DSG_SIZE_WORD,
 	DSG_SIZE_DWORD,
-} DeterministicSpriteGroupSize;
+};
 
-typedef enum DeterministicSpriteGroupAdjustTypes {
+enum DeterministicSpriteGroupAdjustType {
 	DSGA_TYPE_NONE,
 	DSGA_TYPE_DIV,
 	DSGA_TYPE_MOD,
-} DeterministicSpriteGroupAdjustType;
+};
 
-typedef enum DeterministicSpriteGroupAdjustOperations {
+enum DeterministicSpriteGroupAdjustOperation {
 	DSGA_OP_ADD,  // a + b
 	DSGA_OP_SUB,  // a - b
 	DSGA_OP_SMIN, // (signed) min(a, b)
@@ -57,10 +57,10 @@
 	DSGA_OP_AND,  // a & b
 	DSGA_OP_OR,   // a | b
 	DSGA_OP_XOR,  // a ^ b
-} DeterministicSpriteGroupAdjustOperation;
+};
 
 
-typedef struct DeterministicSpriteGroupAdjust {
+struct DeterministicSpriteGroupAdjust {
 	DeterministicSpriteGroupAdjustOperation operation;
 	DeterministicSpriteGroupAdjustType type;
 	byte variable;
@@ -70,17 +70,17 @@
 	uint32 add_val;
 	uint32 divmod_val;
 	const SpriteGroup *subroutine;
-} DeterministicSpriteGroupAdjust;
+};
 
 
-typedef struct DeterministicSpriteGroupRange {
+struct DeterministicSpriteGroupRange {
 	const SpriteGroup *group;
 	uint32 low;
 	uint32 high;
-} DeterministicSpriteGroupRange;
+};
 
 
-typedef struct DeterministicSpriteGroup {
+struct DeterministicSpriteGroup {
 	VarSpriteGroupScope var_scope;
 	DeterministicSpriteGroupSize size;
 	byte num_adjusts;
@@ -90,14 +90,14 @@
 
 	// Dynamically allocated, this is the sole owner
 	const SpriteGroup *default_group;
-} DeterministicSpriteGroup;
+};
 
-typedef enum RandomizedSpriteGroupCompareModes {
+enum RandomizedSpriteGroupCompareMode {
 	RSG_CMP_ANY,
 	RSG_CMP_ALL,
-} RandomizedSpriteGroupCompareMode;
+};
 
-typedef struct RandomizedSpriteGroup {
+struct RandomizedSpriteGroup {
 	// Take this object:
 	VarSpriteGroupScope var_scope;
 
@@ -111,32 +111,32 @@
 
 	// Take the group with appropriate index:
 	const SpriteGroup **groups;
-} RandomizedSpriteGroup;
+};
 
 
 /* This contains a callback result. A failed callback has a value of
  * CALLBACK_FAILED */
-typedef struct CallbackResultSpriteGroup {
+struct CallbackResultSpriteGroup {
 	uint16 result;
-} CallbackResultSpriteGroup;
+};
 
 
 /* A result sprite group returns the first SpriteID and the number of
  * sprites in the set */
-typedef struct ResultSpriteGroup {
+struct ResultSpriteGroup {
 	SpriteID sprite;
 	byte num_sprites;
-} ResultSpriteGroup;
+};
 
 /* List of different sprite group types */
-typedef enum SpriteGroupType {
+enum SpriteGroupType {
 	SGT_INVALID,
 	SGT_REAL,
 	SGT_DETERMINISTIC,
 	SGT_RANDOMIZED,
 	SGT_CALLBACK,
 	SGT_RESULT,
-} SpriteGroupType;
+};
 
 /* Common wrapper for all the different sprite group types */
 struct SpriteGroup {
@@ -156,7 +156,7 @@
 void InitializeSpriteGroupPool();
 
 
-typedef struct ResolverObject {
+struct ResolverObject {
 	uint16 callback;
 	uint32 callback_param1;
 	uint32 callback_param2;
@@ -187,7 +187,7 @@
 	void (*SetTriggers)(const struct ResolverObject*, int);
 	uint32 (*GetVariable)(const struct ResolverObject*, byte, byte, bool*);
 	const SpriteGroup *(*ResolveReal)(const struct ResolverObject*, const SpriteGroup*);
-} ResolverObject;
+};
 
 
 /* Base sprite group resolver */
--- a/src/newgrf_station.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf_station.h	Wed Mar 07 12:11:48 2007 +0000
@@ -9,12 +9,12 @@
 #include "newgrf_cargo.h"
 #include "helpers.hpp"
 
-typedef enum {
+enum StationClassID {
 	STAT_CLASS_BEGIN = 0,    ///< the lowest valid value
 	STAT_CLASS_DFLT = 0,     ///< Default station class.
 	STAT_CLASS_WAYP,         ///< Waypoint class.
 	STAT_CLASS_MAX = 32,     ///< Maximum number of classes.
-} StationClassID;
+};
 
 /** Define basic enum properties */
 template <> struct EnumPropsT<StationClassID> : MakeEnumPropsT<StationClassID, byte, STAT_CLASS_BEGIN, STAT_CLASS_MAX, STAT_CLASS_MAX> {};
@@ -27,7 +27,7 @@
  * where index is computed as (x * platforms) + platform. */
 typedef byte *StationLayout;
 
-typedef struct StationSpec {
+struct StationSpec {
 	uint32 grfid; ///< ID of GRF file station belongs to.
 	int localidx; ///< Index within GRF file of station.
 
@@ -84,17 +84,17 @@
 	 * evaluating callbacks.
 	 */
 	const struct SpriteGroup *spritegroup[NUM_CARGO + 3];
-} StationSpec;
+};
 
 /**
  * Struct containing information relating to station classes.
  */
-typedef struct StationClass {
+struct StationClass {
 	uint32 id;          ///< ID of this class, e.g. 'DFLT', 'WAYP', etc.
 	StringID name;      ///< Name of this class.
 	uint stations;      ///< Number of stations in this class.
 	StationSpec **spec; ///< Array of station specifications.
-} StationClass;
+};
 
 void ResetStationClasses();
 StationClassID AllocateStationClass(uint32 cls);
--- a/src/newgrf_text.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/newgrf_text.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -30,16 +30,16 @@
  * the grf base will not be used in order to find the string, but rather for
  * jumping from standard langID scheme to the new one.
  */
-typedef enum grf_base_languages {
+enum grf_base_languages {
 	GRFLB_AMERICAN    = 0x01,
 	GRFLB_ENGLISH     = 0x02,
 	GRFLB_GERMAN      = 0x04,
 	GRFLB_FRENCH      = 0x08,
 	GRFLB_SPANISH     = 0x10,
 	GRFLB_GENERIC     = 0x80,
-} grf_base_language;
+};
 
-typedef enum grf_extended_languages {
+enum grf_extended_languages {
 	GRFLX_AMERICAN    = 0x00,
 	GRFLX_ENGLISH     = 0x01,
 	GRFLX_GERMAN      = 0x02,
@@ -73,13 +73,13 @@
 	GRFLX_CROATIAN    = 0x38,
 	GRFLX_TURKISH     = 0x3E,
 	GRFLX_UNSPECIFIED = 0x7F,
-} grf_language;
+};
 
 
-typedef struct iso_grf {
+struct iso_grf {
 	char code[6];
 	byte grfLangID;
-} iso_grf;
+};
 
 /**
  * ISO code VS NewGrf langID conversion array.
@@ -170,12 +170,12 @@
  * Putting both grfid and stringid together allows us to avoid duplicates,
  * since it is NOT SUPPOSED to happen.
  */
-typedef struct GRFTextEntry {
+struct GRFTextEntry {
 	uint32 grfid;
 	uint16 stringid;
 	StringID def_string;
 	GRFText *textholder;
-} GRFTextEntry;
+};
 
 
 static uint _num_grf_texts = 0;
--- a/src/npf.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/npf.h	Wed Mar 07 12:11:48 2007 +0000
@@ -35,10 +35,10 @@
 	NPF_INFINITE_PENALTY = 1000 * NPF_TILE_LENGTH
 };
 
-typedef struct NPFFindStationOrTileData { /* Meant to be stored in AyStar.targetdata */
+struct NPFFindStationOrTileData { /* Meant to be stored in AyStar.targetdata */
 	TileIndex dest_coords; /* An indication of where the station is, for heuristic purposes, or the target tile */
 	StationID station_index; /* station index we're heading for, or INVALID_STATION when we're heading for a tile */
-} NPFFindStationOrTileData;
+};
 
 enum { /* Indices into AyStar.userdata[] */
 	NPF_TYPE = 0, /* Contains a TransportTypes value */
@@ -51,18 +51,18 @@
 	NPF_NODE_FLAGS,
 };
 
-typedef enum { /* Flags for AyStarNode.userdata[NPF_NODE_FLAGS]. Use NPFGetBit() and NPFGetBit() to use them. */
+enum NPFNodeFlag { /* Flags for AyStarNode.userdata[NPF_NODE_FLAGS]. Use NPFGetBit() and NPFGetBit() to use them. */
 	NPF_FLAG_SEEN_SIGNAL, /* Used to mark that a signal was seen on the way, for rail only */
 	NPF_FLAG_REVERSE, /* Used to mark that this node was reached from the second start node, if applicable */
 	NPF_FLAG_LAST_SIGNAL_RED, /* Used to mark that the last signal on this path was red */
-} NPFNodeFlag;
+};
 
-typedef struct NPFFoundTargetData { /* Meant to be stored in AyStar.userpath */
+struct NPFFoundTargetData { /* Meant to be stored in AyStar.userpath */
 	uint best_bird_dist; /* The best heuristic found. Is 0 if the target was found */
 	uint best_path_dist; /* The shortest path. Is (uint)-1 if no path is found */
 	Trackdir best_trackdir; /* The trackdir that leads to the shortest path/closest birds dist */
 	AyStarNode node; /* The node within the target the search led us to */
-} NPFFoundTargetData;
+};
 
 /* These functions below are _not_ re-entrant, in favor of speed! */
 
--- a/src/oldloader.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/oldloader.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -27,7 +27,7 @@
 	OLD_MAP_SIZE = 256 * 256
 };
 
-typedef struct LoadgameState {
+struct LoadgameState {
 	FILE *file;
 
 	uint chunk_size;
@@ -41,10 +41,10 @@
 
 	uint total_read;
 	bool failed;
-} LoadgameState;
+};
 
 /* OldChunk-Type */
-typedef enum OldChunkTypes {
+enum OldChunkType {
 	OC_SIMPLE    = 0,
 	OC_NULL      = 1,
 	OC_CHUNK     = 2,
@@ -78,20 +78,20 @@
 	OC_TILE      = OC_VAR_U32  | OC_FILE_U16,
 
 	OC_END       = 0 ///< End of the whole chunk, all 32bits set to zero
-} OldChunkType;
+};
 
 DECLARE_ENUM_AS_BIT_SET(OldChunkType);
 
 typedef bool OldChunkProc(LoadgameState *ls, int num);
 
-typedef struct OldChunks {
+struct OldChunks {
 	OldChunkType type;   ///< Type of field
 	uint32 amount;       ///< Amount of fields
 
 	void *ptr;           ///< Pointer where to save the data (may only be set if offset is 0)
 	uint offset;         ///< Offset from basepointer (may only be set if ptr is NULL)
 	OldChunkProc *proc;  ///< Pointer to function that is called with OC_CHUNK
-} OldChunks;
+};
 
 /* If it fails, check lines above.. */
 assert_compile(sizeof(TileIndex) == 4);
--- a/src/oldpool.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/oldpool.h	Wed Mar 07 12:11:48 2007 +0000
@@ -3,7 +3,7 @@
 #ifndef OLDPOOL_H
 #define OLDPOOL_H
 
-typedef struct OldMemoryPool OldMemoryPool;
+struct OldMemoryPool;
 
 /* The function that is called after a new block is added
      start_item is the first item of the new made block */
--- a/src/openttd.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/openttd.h	Wed Mar 07 12:11:48 2007 +0000
@@ -11,43 +11,43 @@
 #include "hal.h"
 #include "helpers.hpp"
 
-typedef struct Oblong {
+struct Oblong {
 	int x, y;
 	int width, height;
-} Oblong;
+};
 
-typedef struct BoundingRect {
+struct BoundingRect {
 	int width;
 	int height;
-} BoundingRect;
+};
 
-typedef struct Pair {
+struct Pair {
 	int a;
 	int b;
-} Pair;
+};
 
 #include "map.h"
 #include "slope.h"
 
 // Forward declarations of structs.
-typedef struct Vehicle Vehicle;
-typedef struct Depot Depot;
-typedef struct Waypoint Waypoint;
-typedef struct Window Window;
-typedef struct Station Station;
-typedef struct ViewPort ViewPort;
-typedef struct Town Town;
-typedef struct NewsItem NewsItem;
-typedef struct Industry Industry;
-typedef struct DrawPixelInfo DrawPixelInfo;
+struct Vehicle;
+struct Depot;
+struct Waypoint;
+struct Window;
+struct Station;
+struct ViewPort;
+struct Town;
+struct NewsItem;
+struct Industry;
+struct DrawPixelInfo;
 typedef byte VehicleOrderID;  ///< The index of an order within its current vehicle (not pool related)
 typedef byte CargoID;
 typedef byte LandscapeID;
 typedef uint32 SpriteID;      ///< The number of a sprite, without mapping bits and colortables
-typedef struct PalSpriteID {
+struct PalSpriteID {
 	SpriteID sprite;
 	SpriteID pal;
-} PalSpriteID;
+};
 typedef uint16 EngineID;
 typedef uint16 UnitID;
 typedef uint16 StringID;
@@ -140,7 +140,7 @@
 typedef OwnerByte PlayerByte;
 
 
-typedef enum TransportTypes {
+enum TransportType {
 	/* These constants are for now linked to the representation of bridges
 	 * and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge.
 	 * In an ideal world, these constants would be used everywhere when
@@ -153,20 +153,20 @@
 	TRANSPORT_WATER, // = 2
 	TRANSPORT_END,
 	INVALID_TRANSPORT = 0xff,
-} TransportType;
+};
 
 /** Define basic enum properties */
 template <> struct EnumPropsT<TransportType> : MakeEnumPropsT<TransportType, byte, TRANSPORT_BEGIN, TRANSPORT_END, INVALID_TRANSPORT> {};
 typedef TinyEnumT<TransportType> TransportTypeByte;
 
 
-typedef struct TileInfo {
+struct TileInfo {
 	uint x;
 	uint y;
 	Slope tileh;
 	TileIndex tile;
 	uint z;
-} TileInfo;
+};
 
 
 /* Display Options */
@@ -195,7 +195,7 @@
 	NUM_PRICES = 49,
 };
 
-typedef struct Prices {
+struct Prices {
 	int32 station_value;
 	int32 build_rail;
 	int32 build_road;
@@ -243,11 +243,11 @@
 	int32 roadveh_running;
 	int32 ship_running;
 	int32 build_industry;
-} Prices;
+};
 
 #define GAME_DIFFICULTY_NUM 18
 
-typedef struct GameDifficulty {
+struct GameDifficulty {
 	int max_no_competitors;
 	int competitor_start_time;
 	int number_towns;
@@ -266,7 +266,7 @@
 	int line_reverse_mode;
 	int disasters;
 	int town_council_tolerance; // minimum required town ratings to be allowed to demolish stuff
-} GameDifficulty;
+};
 
 enum {
 	// Temperate
@@ -317,18 +317,18 @@
 
 typedef uint AcceptedCargo[NUM_CARGO];
 
-typedef struct TileDesc {
+struct TileDesc {
 	StringID str;
 	Owner owner;
 	Date build_date;
 	uint32 dparam[2];
-} TileDesc;
+};
 
-typedef struct {
+struct ViewportSign {
 	int32 left;
 	int32 top;
 	byte width_1, width_2;
-} ViewportSign;
+};
 
 
 typedef void DrawTileProc(TileInfo *ti);
@@ -365,7 +365,7 @@
 typedef uint32 VehicleEnterTileProc(Vehicle *v, TileIndex tile, int x, int y);
 typedef Slope GetSlopeTilehProc(TileIndex, Slope tileh);
 
-typedef struct {
+struct TileTypeProcs {
 	DrawTileProc *draw_tile_proc;
 	GetSlopeZProc *get_slope_z_proc;
 	ClearTileProc *clear_tile_proc;
@@ -379,7 +379,7 @@
 	GetProducedCargoProc *get_produced_cargo_proc;
 	VehicleEnterTileProc *vehicle_enter_tile_proc;
 	GetSlopeTilehProc *get_slope_tileh_proc;
-} TileTypeProcs;
+};
 
 
 enum WindowClass {
@@ -575,11 +575,11 @@
 /** To have a concurrently running thread interface with the main program, use
  * the OTTD_SendThreadMessage() function. Actions to perform upon the message are handled
  * in the ProcessSentMessage() function */
-typedef enum ThreadMsgs {
+enum ThreadMsg {
 	MSG_OTTD_NO_MESSAGE,
 	MSG_OTTD_SAVETHREAD_DONE,
 	MSG_OTTD_SAVETHREAD_ERROR,
-} ThreadMsg;
+};
 
 void OTTD_SendThreadMessage(ThreadMsg msg);
 
--- a/src/order.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/order.h	Wed Mar 07 12:11:48 2007 +0000
@@ -88,8 +88,8 @@
  * - Vehicle -> current_order
  * - REF_SHEDULE (all REFs are currently limited to 16 bits!!)
  */
-typedef struct Order {
-	struct Order *next;   ///< Pointer to next order. If NULL, end of list
+struct Order {
+	Order *next;          ///< Pointer to next order. If NULL, end of list
 
 	OrderTypeByte type;
 	uint8  flags;
@@ -99,17 +99,17 @@
 
 	CargoID refit_cargo; // Refit CargoID
 	byte refit_subtype; // Refit subtype
-} Order;
+};
 
 #define MAX_BACKUP_ORDER_COUNT 40
 
-typedef struct {
+struct BackuppedOrders {
 	VehicleID clone;
 	VehicleOrderID orderindex;
 	Order order[MAX_BACKUP_ORDER_COUNT + 1];
 	uint16 service_interval;
 	char name[32];
-} BackuppedOrders;
+};
 
 VARDEF TileIndex _backup_orders_tile;
 VARDEF BackuppedOrders _backup_orders_data[1];
--- a/src/pathfind.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/pathfind.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -423,7 +423,7 @@
 		after_proc(&tpf);
 }
 
-typedef struct {
+struct StackedItem {
 	TileIndex tile;
 	uint16 cur_length; // This is the current length to this tile.
 	uint16 priority; // This is the current length + estimated length to the goal.
@@ -431,7 +431,7 @@
 	byte depth;
 	byte state;
 	byte first_track;
-} StackedItem;
+};
 
 static const Trackdir _new_trackdir[6][4] = {
 {TRACKDIR_X_NE,    INVALID_TRACKDIR, TRACKDIR_X_SW,    INVALID_TRACKDIR,},
@@ -442,13 +442,13 @@
 {INVALID_TRACKDIR, INVALID_TRACKDIR, TRACKDIR_RIGHT_S, TRACKDIR_RIGHT_N,},
 };
 
-typedef struct HashLink {
+struct HashLink {
 	TileIndex tile;
 	uint16 typelength;
 	uint16 next;
-} HashLink;
+};
 
-typedef struct {
+struct NewTrackPathFinder {
 	NTPEnumProc *enum_proc;
 	void *userdata;
 	TileIndex dest;
@@ -468,7 +468,7 @@
 
 	HashLink links[0x400]; // hash links
 
-} NewTrackPathFinder;
+};
 #define NTP_GET_LINK_OFFS(tpf, link) ((byte*)(link) - (byte*)tpf->links)
 #define NTP_GET_LINK_PTR(tpf, link_offs) (HashLink*)((byte*)tpf->links + (link_offs))
 
--- a/src/pathfind.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/pathfind.h	Wed Mar 07 12:11:48 2007 +0000
@@ -14,7 +14,7 @@
 //#define PF_BENCH // perform simple benchmarks on the train pathfinder (not
 //supported on all archs)
 
-typedef struct TrackPathFinder TrackPathFinder;
+struct TrackPathFinder;
 typedef bool TPFEnumProc(TileIndex tile, void *data, Trackdir trackdir, uint length, byte *state);
 typedef void TPFAfterProc(TrackPathFinder *tpf);
 
@@ -30,17 +30,17 @@
  */
 #define PATHFIND_HASH_TILE(tile) (TileX(tile) & 0x1F) + ((TileY(tile) & 0x1F) << 5)
 
-typedef struct TrackPathFinderLink {
+struct TrackPathFinderLink {
 	TileIndex tile;
 	uint16 flags;
 	uint16 next;
-} TrackPathFinderLink;
+};
 
-typedef struct RememberData {
+struct RememberData {
 	uint16 cur_length;
 	byte depth;
 	byte pft_var6;
-} RememberData;
+};
 
 struct TrackPathFinder {
 	int num_links_left;
@@ -67,10 +67,10 @@
 
 void FollowTrack(TileIndex tile, uint16 flags, DiagDirection direction, TPFEnumProc* enum_proc, TPFAfterProc* after_proc, void* data);
 
-typedef struct {
+struct FindLengthOfTunnelResult {
 	TileIndex tile;
 	int length;
-} FindLengthOfTunnelResult;
+};
 FindLengthOfTunnelResult FindLengthOfTunnel(TileIndex tile, DiagDirection direction);
 
 void NewTrainPathfind(TileIndex tile, TileIndex dest, RailTypeMask railtypes, DiagDirection direction, NTPEnumProc* enum_proc, void* data);
--- a/src/player.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/player.h	Wed Mar 07 12:11:48 2007 +0000
@@ -9,15 +9,15 @@
 #include "engine.h"
 #include "livery.h"
 
-typedef struct PlayerEconomyEntry {
+struct PlayerEconomyEntry {
 	int32 income;
 	int32 expenses;
 	int32 delivered_cargo;
 	int32 performance_history; // player score (scale 0-1000)
 	int64 company_value;
-} PlayerEconomyEntry;
+};
 
-typedef struct AiBuildRec {
+struct AiBuildRec {
 	TileIndex spec_tile;
 	TileIndex use_tile;
 	byte rand_rng;
@@ -28,9 +28,9 @@
 	byte buildcmd_b;
 	byte direction;
 	CargoID cargo;
-} AiBuildRec;
+};
 
-typedef struct PlayerAI {
+struct PlayerAI {
 	byte state;
 	byte tick;            // Used to determine how often to move
 	uint32 state_counter; // Can hold tile index!
@@ -68,9 +68,9 @@
 
 	TileIndex banned_tiles[16];
 	byte banned_val[16];
-} PlayerAI;
+};
 
-typedef struct Ai_PathFinderInfo {
+struct Ai_PathFinderInfo {
 	TileIndex start_tile_tl; // tl = top-left
 	TileIndex start_tile_br; // br = bottom-right
 	TileIndex end_tile_tl;   // tl = top-left
@@ -84,17 +84,17 @@
 	int position;            // Current position in the build-path, needed to build the path
 
 	bool rail_or_road;       // true = rail, false = road
-} Ai_PathFinderInfo;
+};
 
 // The amount of memory reserved for the AI-special-vehicles
 #define AI_MAX_SPECIAL_VEHICLES 100
 
-typedef struct Ai_SpecialVehicle {
+struct Ai_SpecialVehicle {
 	VehicleID veh_id;
 	uint32 flag;
-} Ai_SpecialVehicle;
+};
 
-typedef struct PlayerAiNew {
+struct PlayerAiNew {
 	uint8 state;
 	uint tick;
 	uint idle;
@@ -144,12 +144,12 @@
 	int to_ic;
 	byte to_type;
 
-} PlayerAiNew;
+};
 
 
 typedef uint32 PlayerFace;
 
-typedef struct Player {
+struct Player {
 	uint32 name_2;
 	uint16 name_1;
 
@@ -198,7 +198,7 @@
 	int16 engine_renew_months;
 	uint32 engine_renew_money;
 	uint16 num_engines[TOTAL_NUM_ENGINES]; // caches the number of engines of each type the player owns (no need to save this)
-} Player;
+};
 
 uint16 GetDrawStringPlayerColor(PlayerID player);
 
@@ -282,11 +282,11 @@
 	return RAILTYPE_RAIL;
 }
 
-typedef struct HighScore {
+struct HighScore {
 	char company[100];
 	StringID title; // NO_SAVE, has troubles with changing string-numbers.
 	uint16 score;   // do NOT change type, will break hs.dat
-} HighScore;
+};
 
 VARDEF HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
 void SaveToHighScore();
--- a/src/player_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/player_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -286,10 +286,10 @@
 	3,
 };
 
-typedef struct livery_d {
+struct livery_d {
 	uint32 sel;
 	LiveryClass livery_class;
-} livery_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(livery_d));
 
 static void ShowColourDropDownMenu(Window *w, uint32 widget)
--- a/src/queue.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/queue.h	Wed Mar 07 12:11:48 2007 +0000
@@ -9,21 +9,19 @@
 //#define HASH_STATS
 
 
-typedef struct Queue Queue;
+struct Queue;
 typedef bool Queue_PushProc(Queue* q, void* item, int priority);
 typedef void* Queue_PopProc(Queue* q);
 typedef bool Queue_DeleteProc(Queue* q, void* item, int priority);
 typedef void Queue_ClearProc(Queue* q, bool free_values);
 typedef void Queue_FreeProc(Queue* q, bool free_values);
 
-typedef struct InsSortNode InsSortNode;
 struct InsSortNode {
 	void* item;
 	int priority;
 	InsSortNode* next;
 };
 
-typedef struct BinaryHeapNode BinaryHeapNode;
 struct BinaryHeapNode {
 	void* item;
 	int priority;
@@ -99,7 +97,6 @@
 /*
  * Hash
  */
-typedef struct HashNode HashNode;
 struct HashNode {
 	uint key1;
 	uint key2;
@@ -111,7 +108,7 @@
  * the resulting range is clearly defined.
  */
 typedef uint Hash_HashProc(uint key1, uint key2);
-typedef struct Hash {
+struct Hash {
 	/* The hash function used */
 	Hash_HashProc* hash;
 	/* The amount of items in the hash */
@@ -123,7 +120,7 @@
 	/* A pointer to an array of numbuckets booleans, which will be true if
 	 * there are any Nodes in the bucket */
 	bool* buckets_in_use;
-} Hash;
+};
 
 /* Call these function to manipulate a hash */
 
--- a/src/rail.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/rail.h	Wed Mar 07 12:11:48 2007 +0000
@@ -9,7 +9,7 @@
 #include "direction.h"
 #include "tile.h"
 
-typedef enum RailTypes {
+enum RailType {
 	RAILTYPE_BEGIN    = 0,
 	RAILTYPE_RAIL     = 0,
 	RAILTYPE_ELECTRIC = 1,
@@ -17,7 +17,7 @@
 	RAILTYPE_MAGLEV   = 3,
 	RAILTYPE_END,
 	INVALID_RAILTYPE  = 0xFF
-} RailType;
+};
 
 typedef byte RailTypeMask;
 
@@ -30,7 +30,7 @@
 
 /** These are used to specify a single track.
  * Can be translated to a trackbit with TrackToTrackbit */
-typedef enum Track {
+enum Track {
 	TRACK_BEGIN = 0,
 	TRACK_X     = 0,
 	TRACK_Y     = 1,
@@ -40,7 +40,7 @@
 	TRACK_RIGHT = 5,
 	TRACK_END,
 	INVALID_TRACK = 0xFF
-} Track;
+};
 
 /** Allow incrementing of Track variables */
 DECLARE_POSTFIX_INCREMENT(Track);
@@ -61,7 +61,7 @@
 
 
 /** Bitfield corresponding to Track */
-typedef enum TrackBits {
+enum TrackBits {
 	TRACK_BIT_NONE    = 0U,
 	TRACK_BIT_X       = 1U << TRACK_X,
 	TRACK_BIT_Y       = 1U << TRACK_Y,
@@ -81,7 +81,7 @@
 	TRACK_BIT_WORMHOLE = 0x40U,
 	TRACK_BIT_DEPOT   = 0x80U,
 	INVALID_TRACK_BIT = 0xFF
-} TrackBits;
+};
 
 /** Define basic enum properties */
 template <> struct EnumPropsT<TrackBits> : MakeEnumPropsT<TrackBits, byte, TRACK_BIT_NONE, TRACK_BIT_ALL, INVALID_TRACK_BIT> {};
@@ -110,7 +110,7 @@
  * reversing track dirs are not considered to be 'valid' except in a small
  * corner in the road vehicle controller.
  */
-typedef enum Trackdirs {
+enum Trackdir {
 	TRACKDIR_BEGIN    =  0,
 	TRACKDIR_X_NE     =  0,
 	TRACKDIR_Y_SE     =  1,
@@ -130,7 +130,7 @@
 	TRACKDIR_RVREV_NW = 15,
 	TRACKDIR_END,
 	INVALID_TRACKDIR  = 0xFF,
-} Trackdir;
+};
 
 /** Define basic enum properties */
 template <> struct EnumPropsT<Trackdir> : MakeEnumPropsT<Trackdir, byte, TRACKDIR_BEGIN, TRACKDIR_END, INVALID_TRACKDIR> {};
@@ -138,7 +138,7 @@
 
 /** These are a combination of tracks and directions. Values are 0-5 in one
  * direction (corresponding to the Track enum) and 8-13 in the other direction. */
-typedef enum TrackdirBits {
+enum TrackdirBits {
 	TRACKDIR_BIT_NONE     = 0x0000,
 	TRACKDIR_BIT_X_NE     = 0x0001,
 	TRACKDIR_BIT_Y_SE     = 0x0002,
@@ -155,7 +155,7 @@
 	TRACKDIR_BIT_RIGHT_N  = 0x2000,
 	TRACKDIR_BIT_MASK     = 0x3F3F,
 	INVALID_TRACKDIR_BIT  = 0xFFFF,
-} TrackdirBits;
+};
 
 /** Define basic enum properties */
 template <> struct EnumPropsT<TrackdirBits> : MakeEnumPropsT<TrackdirBits, uint16, TRACKDIR_BIT_NONE, TRACKDIR_BIT_MASK, INVALID_TRACKDIR_BIT> {};
@@ -164,7 +164,7 @@
 
 /** This struct contains all the info that is needed to draw and construct tracks.
  */
-typedef struct RailtypeInfo {
+struct RailtypeInfo {
 	/** Struct containing the main sprites. @note not all sprites are listed, but only
 	 *  the ones used directly in the code */
 	struct {
@@ -237,7 +237,7 @@
 	 * Offset to add to ground sprite when drawing custom waypoints / stations
 	 */
 	byte custom_ground_offset;
-} RailtypeInfo;
+};
 
 
 // these are the maximums used for updating signal blocks, and checking if a depot is in a pbs block
--- a/src/rail_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/rail_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -1417,7 +1417,7 @@
 	DrawTileSequence(x, y, dts->ground_sprite + offset, dts->seq, 0);
 }
 
-typedef struct SetSignalsData {
+struct SetSignalsData {
 	int cur;
 	int cur_stack;
 	bool stop;
@@ -1435,7 +1435,7 @@
 	TileIndex next_tile[NUM_SSD_STACK];
 	DiagDirectionByte next_dir[NUM_SSD_STACK];
 
-} SetSignalsData;
+};
 
 static bool SetSignalsEnumProc(TileIndex tile, void* data, Trackdir trackdir, uint length, byte* state)
 {
@@ -1473,10 +1473,10 @@
 }
 
 /* Struct to parse data from VehicleFromPos to SignalVehicleCheckProc */
-typedef struct SignalVehicleCheckStruct {
+struct SignalVehicleCheckStruct {
 	TileIndex tile;
 	uint track;
-} SignalVehicleCheckStruct;
+};
 
 static void *SignalVehicleCheckProc(Vehicle *v, void *data)
 {
--- a/src/rail_map.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/rail_map.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,12 +8,12 @@
 #include "tile.h"
 
 
-typedef enum RailTileType {
+enum RailTileType {
 	RAIL_TILE_NORMAL   = 0,
 	RAIL_TILE_SIGNALS  = 1,
 	RAIL_TILE_WAYPOINT = 2,
 	RAIL_TILE_DEPOT    = 3,
-} RailTileType;
+};
 
 static inline RailTileType GetRailTileType(TileIndex t)
 {
@@ -118,12 +118,12 @@
 	return (WaypointID)_m[t].m2;
 }
 
-typedef enum SignalType {
+enum SignalType {
 	SIGTYPE_NORMAL  = 0, // normal signal
 	SIGTYPE_ENTRY   = 1, // presignal block entry
 	SIGTYPE_EXIT    = 2, // presignal block exit
 	SIGTYPE_COMBO   = 3  // presignal inter-block
-} SignalType;
+};
 
 static inline SignalType GetSignalType(TileIndex t)
 {
@@ -159,10 +159,10 @@
 }
 
 
-typedef enum SignalVariant {
+enum SignalVariant {
 	SIG_ELECTRIC  = 0,
 	SIG_SEMAPHORE = 1
-} SignalVariant;
+};
 
 static inline SignalVariant GetSignalVariant(TileIndex t)
 {
@@ -183,10 +183,10 @@
  * simple boolean logic will do. But do try to compare to this enum instead of
  * normal boolean evaluation, since that will make future additions easier.
  */
-typedef enum SignalStates {
+enum SignalState {
 	SIGNAL_STATE_RED   = 0,
 	SIGNAL_STATE_GREEN = 1,
-} SignalState;
+};
 
 static inline SignalState GetSingleSignalState(TileIndex t, byte signalbit)
 {
@@ -242,7 +242,7 @@
 RailType GetTileRailType(TileIndex tile);
 
 
-typedef enum RailGroundType {
+enum RailGroundType {
 	RAIL_GROUND_BARREN       =  0,
 	RAIL_GROUND_GRASS        =  1,
 	RAIL_GROUND_FENCE_NW     =  2,
@@ -256,7 +256,7 @@
 	RAIL_GROUND_FENCE_HORIZ1 = 10,
 	RAIL_GROUND_FENCE_HORIZ2 = 11,
 	RAIL_GROUND_ICE_DESERT   = 12,
-} RailGroundType;
+};
 
 static inline void SetRailGroundType(TileIndex t, RailGroundType rgt)
 {
--- a/src/road.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/road.h	Wed Mar 07 12:11:48 2007 +0000
@@ -5,7 +5,7 @@
 
 #include "helpers.hpp"
 
-typedef enum RoadBits {
+enum RoadBits {
 	ROAD_NONE = 0U,
 	ROAD_NW  = 1U,
 	ROAD_SW  = 2U,
@@ -14,7 +14,7 @@
 	ROAD_X   = ROAD_SW | ROAD_NE,
 	ROAD_Y   = ROAD_NW | ROAD_SE,
 	ROAD_ALL = ROAD_X  | ROAD_Y
-} RoadBits;
+};
 
 DECLARE_ENUM_AS_BIT_SET(RoadBits);
 
--- a/src/road_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/road_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -599,11 +599,11 @@
 }
 
 
-typedef struct DrawRoadTileStruct {
+struct DrawRoadTileStruct {
 	uint16 image;
 	byte subcoord_x;
 	byte subcoord_y;
-} DrawRoadTileStruct;
+};
 
 #include "table/road_land.h"
 
--- a/src/road_map.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/road_map.h	Wed Mar 07 12:11:48 2007 +0000
@@ -9,11 +9,11 @@
 #include "tile.h"
 
 
-typedef enum RoadTileType {
+enum RoadTileType {
 	ROAD_TILE_NORMAL,
 	ROAD_TILE_CROSSING,
 	ROAD_TILE_DEPOT
-} RoadTileType;
+};
 
 static inline RoadTileType GetRoadTileType(TileIndex t)
 {
@@ -105,7 +105,7 @@
 }
 
 
-typedef enum Roadside {
+enum Roadside {
 	ROADSIDE_BARREN           = 0,
 	ROADSIDE_GRASS            = 1,
 	ROADSIDE_PAVED            = 2,
@@ -113,7 +113,7 @@
 	ROADSIDE_TREES            = 5,
 	ROADSIDE_GRASS_ROAD_WORKS = 6,
 	ROADSIDE_PAVED_ROAD_WORKS = 7
-} Roadside;
+};
 
 static inline Roadside GetRoadside(TileIndex tile)
 {
--- a/src/roadveh_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/roadveh_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -306,11 +306,11 @@
 	return -(int32)v->value;
 }
 
-typedef struct RoadFindDepotData {
+struct RoadFindDepotData {
 	uint best_length;
 	TileIndex tile;
 	OwnerByte owner;
-} RoadFindDepotData;
+};
 
 static const DiagDirection _road_pf_directions[] = {
 	DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_NE, DIAGDIR_SE, DIAGDIR_SW, DIAGDIR_SE, INVALID_DIAGDIR, INVALID_DIAGDIR,
@@ -785,12 +785,12 @@
 	}
 }
 
-typedef struct RoadVehFindData {
+struct RoadVehFindData {
 	int x;
 	int y;
 	const Vehicle* veh;
 	Direction dir;
-} RoadVehFindData;
+};
 
 static void* EnumCheckRoadVehClose(Vehicle *v, void* data)
 {
@@ -933,12 +933,12 @@
 	return ChangeDir(old_dir, delta);
 }
 
-typedef struct OvertakeData {
+struct OvertakeData {
 	const Vehicle* u;
 	const Vehicle* v;
 	TileIndex tile;
 	byte tilebits;
-} OvertakeData;
+};
 
 static void* EnumFindVehToOvertake(Vehicle* v, void* data)
 {
@@ -1030,11 +1030,11 @@
 	return i;
 }
 
-typedef struct {
+struct FindRoadToChooseData {
 	TileIndex dest;
 	uint maxtracklen;
 	uint mindist;
-} FindRoadToChooseData;
+};
 
 static bool EnumRoadTrackFindDist(TileIndex tile, void* data, Trackdir trackdir, uint length, byte* state)
 {
@@ -1256,9 +1256,9 @@
 	RVC_DRIVE_THROUGH_STOP_FRAME = 7
 };
 
-typedef struct RoadDriveEntry {
-	byte x,y;
-} RoadDriveEntry;
+struct RoadDriveEntry {
+	byte x, y;
+};
 
 #include "table/roadveh.h"
 
--- a/src/saveload.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/saveload.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -1045,12 +1045,12 @@
 #include "gfx.h"
 #include "gui.h"
 
-typedef struct ThreadedSave {
+struct ThreadedSave {
 	uint count;
 	byte ff_state;
 	bool saveinprogress;
 	CursorID cursor;
-} ThreadedSave;
+};
 
 /* A maximum size of of 128K * 500 = 64.000KB savegames */
 STATIC_OLD_POOL(Savegame, byte, 17, 500, NULL, NULL)
@@ -1326,7 +1326,7 @@
 }
 
 /** The format for a reader/writer type of a savegame */
-typedef struct {
+struct SaveLoadFormat {
 	const char *name;           ///< name of the compressor/decompressor (debug-only)
 	uint32 tag;                 ///< the 4-letter tag by which it is identified in the savegame
 
@@ -1337,7 +1337,7 @@
 	bool (*init_write)();       ///< function executed upon intialization of the saver
 	WriterProc *writer;         ///< function that saves the data to the file
 	void (*uninit_write)();     ///< function executed when writing is done
-} SaveLoadFormat;
+};
 
 static const SaveLoadFormat _saveload_formats[] = {
 	{"memory", 0,                NULL,         NULL,       NULL,           InitMem,       WriteMem,    UnInitMem},
--- a/src/saveload.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/saveload.h	Wed Mar 07 12:11:48 2007 +0000
@@ -9,20 +9,20 @@
 
 #define SIZE_MAX ((size_t)-1)
 
-typedef enum SaveOrLoadResult {
+enum SaveOrLoadResult {
 	SL_OK     = 0, // completed successfully
 	SL_ERROR  = 1, // error that was caught before internal structures were modified
 	SL_REINIT = 2, // error that was caught in the middle of updating game state, need to clear it. (can only happen during load)
-} SaveOrLoadResult;
+};
 
-typedef enum SaveOrLoadMode {
+enum SaveOrLoadMode {
 	SL_INVALID  = -1,
 	SL_LOAD     =  0,
 	SL_SAVE     =  1,
 	SL_OLD_LOAD =  2,
 	SL_PNG      =  3,
 	SL_BMP      =  4,
-} SaveOrLoadMode;
+};
 
 SaveOrLoadResult SaveOrLoad(const char *filename, int mode);
 void WaitTillSaved();
@@ -32,18 +32,18 @@
 typedef void ChunkSaveLoadProc();
 typedef void AutolengthProc(void *arg);
 
-typedef struct {
+struct ChunkHandler {
 	uint32 id;
 	ChunkSaveLoadProc *save_proc;
 	ChunkSaveLoadProc *load_proc;
 	uint32 flags;
-} ChunkHandler;
+};
 
-typedef struct {
+struct NullStruct {
 	byte null;
-} NullStruct;
+};
 
-typedef enum SLRefType {
+enum SLRefType {
 	REF_ORDER         = 0,
 	REF_VEHICLE       = 1,
 	REF_STATION       = 2,
@@ -51,7 +51,7 @@
 	REF_VEHICLE_OLD   = 4,
 	REF_ROADSTOPS     = 5,
 	REF_ENGINE_RENEWS = 6,
-} SLRefType;
+};
 
 #define SL_MAX_VERSION 255
 
@@ -166,7 +166,7 @@
 typedef byte SaveLoadType;
 
 /** SaveLoad type struct. Do NOT use this directly but use the SLE_ macros defined just below! */
-typedef struct SaveLoad {
+struct SaveLoad {
 	SaveLoadType cmd;    ///< the action to take with the saved/loaded type, All types need different action
 	VarType conv;        ///< type of the variable to be saved, int
 	uint16 length;       ///< (conditional) length of the variable (eg. arrays) (max array size is 65536 elements)
@@ -177,7 +177,7 @@
 	 * during runtime. Decision on which one to use is controlled by the function
 	 * that is called to save it. address: SlGlobList, offset: SlObject */
 	void *address;       ///< address of variable OR offset of variable in the struct (max offset is 65536)
-} SaveLoad;
+};
 
 /* Same as SaveLoad but global variables are used (for better readability); */
 typedef SaveLoad SaveLoadGlobVarList;
--- a/src/screenshot.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/screenshot.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -24,11 +24,11 @@
 typedef void ScreenshotCallback(void *userdata, Pixel *buf, uint y, uint pitch, uint n);
 typedef bool ScreenshotHandlerProc(const char *name, ScreenshotCallback *callb, void *userdata, uint w, uint h, int pixelformat, const Colour *palette);
 
-typedef struct {
+struct ScreenshotFormat {
 	const char *name;
 	const char *extension;
 	ScreenshotHandlerProc *proc;
-} ScreenshotFormat;
+};
 
 //************************************************
 //*** SCREENSHOT CODE FOR WINDOWS BITMAP (.BMP)
@@ -37,29 +37,29 @@
 #pragma pack(push, 1)
 #endif
 
-typedef struct BitmapFileHeader {
+struct BitmapFileHeader {
 	uint16 type;
 	uint32 size;
 	uint32 reserved;
 	uint32 off_bits;
-} GCC_PACK BitmapFileHeader;
+} GCC_PACK;
 assert_compile(sizeof(BitmapFileHeader) == 14);
 
 #if defined(_MSC_VER) || defined(__WATCOMC__)
 #pragma pack(pop)
 #endif
 
-typedef struct BitmapInfoHeader {
+struct BitmapInfoHeader {
 	uint32 size;
 	int32 width, height;
 	uint16 planes, bitcount;
 	uint32 compression, sizeimage, xpels, ypels, clrused, clrimp;
-} BitmapInfoHeader;
+};
 assert_compile(sizeof(BitmapInfoHeader) == 40);
 
-typedef struct RgbQuad {
+struct RgbQuad {
 	byte blue, green, red, reserved;
-} RgbQuad;
+};
 assert_compile(sizeof(RgbQuad) == 4);
 
 // generic .BMP writer
@@ -260,7 +260,7 @@
 //*** SCREENSHOT CODE FOR ZSOFT PAINTBRUSH (.PCX)
 //************************************************
 
-typedef struct {
+struct PcxHeader {
 	byte manufacturer;
 	byte version;
 	byte rle;
@@ -276,7 +276,7 @@
 	uint16 width;
 	uint16 height;
 	byte filler[54];
-} PcxHeader;
+};
 assert_compile(sizeof(PcxHeader) == 128);
 
 static bool MakePCXImage(const char *name, ScreenshotCallback *callb, void *userdata, uint w, uint h, int pixelformat, const Colour *palette)
--- a/src/screenshot.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/screenshot.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,11 +8,11 @@
 const char *GetScreenshotFormatDesc(int i);
 void SetScreenshotFormat(int i);
 
-typedef enum ScreenshotType {
+enum ScreenshotType {
 	SC_NONE,
 	SC_VIEWPORT,
 	SC_WORLD
-} ScreenshotType;
+};
 
 bool MakeScreenshot();
 void SetScreenshotType(ScreenshotType t);
--- a/src/sdl.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/sdl.h	Wed Mar 07 12:11:48 2007 +0000
@@ -13,7 +13,7 @@
 #ifdef DYNAMICALLY_LOADED_SDL
 	#include <SDL.h>
 
-	typedef struct SDLProcs {
+	struct SDLProcs {
 		int (SDLCALL *SDL_Init)(Uint32);
 		int (SDLCALL *SDL_InitSubSystem)(Uint32);
 		char *(SDLCALL *SDL_GetError)();
@@ -46,7 +46,7 @@
 		int (SDLCALL *SDL_SetColorKey)(SDL_Surface *, Uint32, Uint32);
 		void (SDLCALL *SDL_WM_SetIcon)(SDL_Surface *, Uint8 *);
 		Uint32 (SDLCALL *SDL_MapRGB)(SDL_PixelFormat *, Uint8, Uint8, Uint8);
-	} SDLProcs;
+	};
 
 	extern SDLProcs sdl_proc;
 
--- a/src/settings.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/settings.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -49,10 +49,10 @@
 /** The patch values that are used for new games and/or modified in config file */
 Patches _patches_newgame;
 
-typedef struct IniFile IniFile;
-typedef struct IniItem IniItem;
-typedef struct IniGroup IniGroup;
-typedef struct SettingsMemoryPool SettingsMemoryPool;
+struct IniFile;
+struct IniItem;
+struct IniGroup;
+struct SettingsMemoryPool;
 
 typedef const char *SettingListCallbackProc(const IniItem *item, uint index);
 typedef void SettingDescProc(IniFile *ini, const SettingDesc *desc, const char *grpname, void *object);
--- a/src/settings.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/settings.h	Wed Mar 07 12:11:48 2007 +0000
@@ -46,7 +46,7 @@
 
 typedef int32 OnChange(int32 var);
 
-typedef struct SettingDescBase {
+struct SettingDescBase {
 	const char *name;       ///< name of the setting. Used in configuration file and for console
 	const void *def;        ///< default value given when none is present
 	SettingDescType cmd;    ///< various flags for the variable
@@ -56,12 +56,12 @@
 	const char *many;       ///< ONE/MANY_OF_MANY: string of possible values for this type
 	StringID str;           ///< (translated) string with descriptive text; gui and console
 	OnChange *proc;         ///< callback procedure for when the value is changed
-} SettingDescBase;
+};
 
-typedef struct SettingDesc {
+struct SettingDesc {
 	SettingDescBase desc;   ///< Settings structure (going to configuration file)
 	SaveLoad save;          ///< Internal structure (going to savegame, parts to config)
-} SettingDesc;
+};
 
 /* NOTE: The only difference between SettingDesc and SettingDescGlob is
  * that one uses global variables as a source and the other offsets
@@ -72,10 +72,10 @@
  * offset in a certain struct */
 typedef SettingDesc SettingDescGlobVarList;
 
-typedef enum {
+enum IniGroupType {
 	IGT_VARIABLES = 0, ///< values of the form "landscape = hilly"
 	IGT_LIST      = 1, ///< a list of values, seperated by \n and terminated by the next group block
-} IniGroupType;
+};
 
 /** The patch values that are used for new games and/or modified in config file */
 extern Patches _patches_newgame;
--- a/src/settings_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/settings_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -295,12 +295,12 @@
 	AllocateWindowDesc(&_game_options_desc);
 }
 
-typedef struct {
+struct GameSettingData {
 	int16 min;
 	int16 max;
 	int16 step;
 	StringID str;
-} GameSettingData;
+};
 
 static const GameSettingData _game_setting_info[] = {
 	{  0,   7,  1, STR_NULL},
@@ -655,16 +655,16 @@
 	"freight_trains",
 };
 
-typedef struct PatchEntry {
+struct PatchEntry {
 	const SettingDesc *setting;
 	uint index;
-} PatchEntry;
+};
 
-typedef struct PatchPage {
+struct PatchPage {
 	const char **names;
 	PatchEntry *entries;
 	byte num;
-} PatchPage;
+};
 
 /* PatchPage holds the categories, the number of elements in each category
  * and (in NULL) a dynamic array of settings based on the string-representations
--- a/src/ship_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/ship_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -447,12 +447,12 @@
 	}
 }
 
-typedef struct {
+struct PathFindShip {
 	TileIndex skiptile;
 	TileIndex dest_coords;
 	uint best_bird_dist;
 	uint best_length;
-} PathFindShip;
+};
 
 static bool ShipTrackFollower(TileIndex tile, PathFindShip *pfs, int track, uint length, byte *state)
 {
--- a/src/signs.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/signs.h	Wed Mar 07 12:11:48 2007 +0000
@@ -5,7 +5,7 @@
 
 #include "oldpool.h"
 
-typedef struct Sign {
+struct Sign {
 	StringID     str;
 	ViewportSign sign;
 	int32        x;
@@ -14,7 +14,7 @@
 	PlayerByte   owner; // placed by this player. Anyone can delete them though. OWNER_NONE for gray signs from old games.
 
 	SignID       index;
-} Sign;
+};
 
 DECLARE_OLD_POOL(Sign, Sign, 2, 16000)
 
--- a/src/slope.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/slope.h	Wed Mar 07 12:11:48 2007 +0000
@@ -3,7 +3,7 @@
 #ifndef SLOPE_H
 #define SLOPE_H
 
-typedef enum Slope {
+enum Slope {
 	SLOPE_FLAT     = 0x00,
 	SLOPE_W        = 0x01,
 	SLOPE_S        = 0x02,
@@ -25,7 +25,7 @@
 	SLOPE_STEEP_S  = SLOPE_STEEP | SLOPE_WSE,
 	SLOPE_STEEP_E  = SLOPE_STEEP | SLOPE_SEN,
 	SLOPE_STEEP_N  = SLOPE_STEEP | SLOPE_ENW
-} Slope;
+};
 
 static inline bool IsSteepSlope(Slope s)
 {
--- a/src/smallmap_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/smallmap_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -256,10 +256,10 @@
 	MKCOLOR(0x27272727),
 };
 
-typedef struct AndOr {
+struct AndOr {
 	uint32 mor;
 	uint32 mand;
-} AndOr;
+};
 
 static inline uint32 ApplyMask(uint32 colour, const AndOr *mask)
 {
--- a/src/sound.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/sound.h	Wed Mar 07 12:11:48 2007 +0000
@@ -5,7 +5,7 @@
 
 #include "helpers.hpp"
 
-typedef struct MusicFileSettings {
+struct MusicFileSettings {
 	byte playlist;
 	byte music_vol;
 	byte effect_vol;
@@ -14,11 +14,11 @@
 	bool playing;
 	bool shuffle;
 	char extmidi[80];
-} MusicFileSettings;
+};
 
 VARDEF MusicFileSettings msf;
 
-typedef struct FileEntry {
+struct FileEntry {
 	uint32 file_offset;
 	uint32 file_size;
 	uint16 rate;
@@ -26,12 +26,12 @@
 	uint8 channels;
 	uint8 volume;
 	uint8 priority;
-} FileEntry;
+};
 
 bool SoundInitialize(const char *filename);
 uint GetNumOriginalSounds();
 
-typedef enum SoundFx {
+enum SoundFx {
 	SND_BEGIN = 0,
 	SND_02_SPLAT = 0,                          //  0 == 0x00 !
 	SND_03_FACTORY_WHISTLE,
@@ -107,7 +107,7 @@
 	SND_47_MAGLEV_2,
 	SND_48_DISTANT_BIRD,                    // 72 == 0x48
 	SND_END
-} SoundFx;
+};
 
 /** Define basic enum properties */
 template <> struct EnumPropsT<SoundFx> : MakeEnumPropsT<SoundFx, byte, SND_BEGIN, SND_END, SND_END> {};
--- a/src/sprite.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/sprite.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,7 +8,7 @@
  * bounding box. Used especially for various multi-sprite buildings (like
  * depots or stations): */
 
-typedef struct DrawTileSeqStruct {
+struct DrawTileSeqStruct {
 	int8 delta_x; // 0x80 is sequence terminator
 	int8 delta_y;
 	int8 delta_z;
@@ -17,19 +17,19 @@
 	byte size_z;
 	SpriteID image;
 	SpriteID pal;
-} DrawTileSeqStruct;
+};
 
-typedef struct DrawTileSprites {
+struct DrawTileSprites {
 	SpriteID ground_sprite;
 	SpriteID ground_pal;
 	const DrawTileSeqStruct* seq;
-} DrawTileSprites;
+};
 
 /**
  * This structure is the same for both Industries and Houses.
  * Buildings here reference a general type of construction
  */
-typedef struct DrawBuildingsTileStruct {
+struct DrawBuildingsTileStruct {
 	PalSpriteID ground;
 	PalSpriteID building;
 	byte subtile_x:4;
@@ -38,7 +38,7 @@
 	byte height:4;
 	byte dz;
 	byte draw_proc;  /* this allows to specify a special drawing procedure.*/
-} DrawBuildingsTileStruct;
+};
 
 // Iterate through all DrawTileSeqStructs in DrawTileSprites.
 #define foreach_draw_tile_seq(idx, list) for (idx = list; ((byte) idx->delta_x) != 0x80; idx++)
--- a/src/spritecache.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/spritecache.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -15,11 +15,11 @@
 #endif /* SPRITE_CACHE_SIZE */
 
 
-typedef struct SpriteCache {
+struct SpriteCache {
 	void *ptr;
 	uint32 file_pos;
 	int16 lru;
-} SpriteCache;
+};
 
 
 static uint _spritecache_items = 0;
@@ -55,10 +55,10 @@
 }
 
 
-typedef struct MemBlock {
+struct MemBlock {
 	uint32 size;
 	byte data[VARARRAY_SIZE];
-} MemBlock;
+};
 
 static uint _sprite_lru_counter;
 static MemBlock *_spritecache_ptr;
--- a/src/spritecache.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/spritecache.h	Wed Mar 07 12:11:48 2007 +0000
@@ -3,14 +3,14 @@
 #ifndef SPRITECACHE_H
 #define SPRITECACHE_H
 
-typedef struct Sprite {
+struct Sprite {
 	byte info;
 	byte height;
 	uint16 width;
 	int16 x_offs;
 	int16 y_offs;
 	byte data[VARARRAY_SIZE];
-} Sprite;
+};
 
 const void *GetRawSprite(SpriteID sprite);
 bool SpriteExists(SpriteID sprite);
--- a/src/station.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/station.h	Wed Mar 07 12:11:48 2007 +0000
@@ -12,7 +12,7 @@
 
 static const StationID INVALID_STATION = 0xFFFF;
 
-typedef struct GoodsEntry {
+struct GoodsEntry {
 	GoodsEntry() :
 		waiting_acceptance(0),
 		unload_pending(0),
@@ -35,7 +35,7 @@
 	byte last_speed;
 	byte last_age;
 	int32 feeder_profit;
-} GoodsEntry;
+};
 
 /** A Stop for a Road Vehicle */
 struct RoadStop {
@@ -79,11 +79,11 @@
 	static RoadStop *AllocateRaw();
 };
 
-typedef struct StationSpecList {
+struct StationSpecList {
 	const StationSpec *spec;
 	uint32 grfid;      /// GRF ID of this custom station
 	uint8  localidx;   /// Station ID within GRF of station
-} StationSpecList;
+};
 
 /** StationRect - used to track station spread out rectangle - cheaper than scanning whole map */
 struct StationRect : public Rect {
@@ -207,13 +207,13 @@
 	HVOT_BUOY     = 1 << 6
 };
 
-typedef enum CatchmentAreas {
+enum CatchmentArea {
 	CA_NONE            =  0,
 	CA_BUS             =  3,
 	CA_TRUCK           =  3,
 	CA_TRAIN           =  4,
 	CA_DOCK            =  5
-} CatchmentArea;
+};
 
 void ModifyStationRatingAround(TileIndex tile, PlayerID owner, int amount, uint radius);
 
--- a/src/station_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/station_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -449,12 +449,12 @@
 	}
 }
 
-typedef struct ottd_Rectangle {
+struct ottd_Rectangle {
 	uint min_x;
 	uint min_y;
 	uint max_x;
 	uint max_y;
-} ottd_Rectangle;
+};
 
 static inline void MergePoint(ottd_Rectangle* rect, TileIndex tile)
 {
@@ -2071,11 +2071,11 @@
 
 static void AnimateTile_Station(TileIndex tile)
 {
-	typedef struct AnimData {
+	struct AnimData {
 		StationGfx from; // first sprite
 		StationGfx to;   // last sprite
 		byte delay;
-	} AnimData;
+	};
 
 	static const AnimData data[] = {
 		{ GFX_RADAR_LARGE_FIRST,         GFX_RADAR_LARGE_LAST,         3 },
--- a/src/station_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/station_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -153,21 +153,21 @@
 	return (_internal_sort_order & 1) ? maxr2 - maxr1 : maxr1 - maxr2;
 }
 
-typedef enum StationListFlags {
+enum StationListFlags {
 	SL_ORDER   = 0x01,
 	SL_RESORT  = 0x02,
 	SL_REBUILD = 0x04,
-} StationListFlags;
+};
 
 DECLARE_ENUM_AS_BIT_SET(StationListFlags);
 
-typedef struct plstations_d {
+struct plstations_d {
 	const Station** sort_list;
 	uint16 list_length;
 	byte sort_type;
 	StationListFlags flags;
 	uint16 resort_timer;  //was byte refresh_counter;
-} plstations_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(plstations_d));
 
 void RebuildStationLists()
--- a/src/station_map.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/station_map.h	Wed Mar 07 12:11:48 2007 +0000
@@ -58,16 +58,16 @@
 	BUS_SIZE_EXT = GFX_BASE_END - GFX_BUS_BASE_EXT,
 };
 
-typedef enum HangarTiles {
+enum HangarTile {
 	HANGAR_TILE_0 = 32,
 	HANGAR_TILE_1 = 65,
 	HANGAR_TILE_2 = 86,
 	HANGAR_TILE_3 = 129, // added for west facing hangar
 	HANGAR_TILE_4 = 130, // added for north facing hangar
 	HANGAR_TILE_5 = 131 // added for east facing hangar
-} HangarTiles;
+};
 
-typedef enum StationType {
+enum StationType {
 	STATION_RAIL,
 	STATION_AIRPORT,
 	STATION_TRUCK,
@@ -75,7 +75,7 @@
 	STATION_OILRIG,
 	STATION_DOCK,
 	STATION_BUOY
-} StationType;
+};
 
 StationType GetStationType(TileIndex);
 
--- a/src/strgen/strgen.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/strgen/strgen.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -31,7 +31,7 @@
 
 typedef void (*ParseCmdProc)(char *buf, int value);
 
-typedef struct LanguagePackHeader {
+struct LanguagePackHeader {
 	uint32 ident;
 	uint32 version;     // 32-bits of auto generated version info which is basically a hash of strings.h
 	char name[32];      // the international name of this language
@@ -40,15 +40,15 @@
 	uint16 offsets[32]; // the offsets
 	byte plural_form;   // plural form index
 	byte pad[3];        // pad header to be a multiple of 4
-} LanguagePackHeader;
+};
 
-typedef struct CmdStruct {
+struct CmdStruct {
 	const char *cmd;
 	ParseCmdProc proc;
 	long value;
 	int8 consumes;
 	byte flags;
-} CmdStruct;
+};
 
 enum {
 	C_DONTCOUNT = 1,
@@ -56,11 +56,11 @@
 };
 
 
-typedef struct Case {
+struct Case {
 	int caseidx;
 	char *string;
-	struct Case *next;
-} Case;
+	Case *next;
+};
 
 static bool _masterlang;
 static bool _translated;
@@ -68,7 +68,7 @@
 static int _cur_line;
 static int _errors, _warnings;
 
-typedef struct LangString {
+struct LangString {
 	char *name;            // Name of the string
 	char *english;         // English text
 	char *translated;      // Translated text
@@ -77,7 +77,7 @@
 	int line;              // line of string in source-file
 	Case *english_case;    // cases for english
 	Case *translated_case; // cases for foreign
-} LangString;
+};
 
 static LangString *_strings[65536];
 
@@ -106,16 +106,16 @@
 
 static const char *_cur_ident;
 
-typedef struct CmdPair {
+struct CmdPair {
 	const CmdStruct *a;
 	const char *v;
-} CmdPair;
+};
 
-typedef struct ParsedCommandStruct {
+struct ParsedCommandStruct {
 	int np;
 	CmdPair pairs[32];
 	const CmdStruct *cmd[32]; // ordered by param #
-} ParsedCommandStruct;
+};
 
 // Used when generating some advanced commands.
 static ParsedCommandStruct _cur_pcs;
--- a/src/string.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/string.h	Wed Mar 07 12:11:48 2007 +0000
@@ -37,11 +37,11 @@
 /**
  * Valid filter types for IsValidChar.
  */
-typedef enum CharSetFilter {
+enum CharSetFilter {
 	CS_ALPHANUMERAL,      //! Both numeric and alphabetic and spaces and stuff
 	CS_NUMERAL,           //! Only numeric ones
 	CS_ALPHA,             //! Only alphabetic values
-} CharSetFilter;
+};
 
 /** Convert the given string to lowercase, only works with ASCII! */
 void strtolower(char *str);
--- a/src/strings.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/strings.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -35,7 +35,7 @@
 
 static char *FormatString(char *buff, const char *str, const int32 *argv, uint casei, const char* last);
 
-typedef struct LanguagePack {
+struct LanguagePack {
 	uint32 ident;
 	uint32 version;     // 32-bits of auto generated version info which is basically a hash of strings.h
 	char name[32];      // the international name of this language
@@ -45,7 +45,7 @@
 	byte plural_form;   // how to compute plural forms
 	byte pad[3];        // pad header to be a multiple of 4
 	char data[VARARRAY_SIZE];
-} LanguagePack;
+};
 
 static char **_langpack_offs;
 static LanguagePack *_langpack;
@@ -461,7 +461,7 @@
 	return b + pos;
 }
 
-typedef struct Units {
+struct Units {
 	int s_m;           ///< Multiplier for velocity
 	int s_s;           ///< Shift for velocity
 	StringID velocity; ///< String for velocity
@@ -479,7 +479,7 @@
 	int f_m;           ///< Multiplier for force
 	int f_s;           ///< Shift for force
 	StringID force;    ///< String for force
-} Units;
+};
 
 /* Unit conversions */
 static const Units units[] = {
--- a/src/table/ai_rail.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/ai_rail.h	Wed Mar 07 12:11:48 2007 +0000
@@ -1,24 +1,24 @@
 /* $Id$ */
 
-typedef struct {
+struct AiDefaultBlockData {
 	byte mode;
 	byte attr;
 	TileIndexDiffC tileoffs;
-} AiDefaultBlockData;
+};
 
-typedef struct {
+struct AiDefaultRailBlock {
 	byte p0;
 	byte p1;
 	byte p2;
 	byte p3;
 	byte dir;
 	const AiDefaultBlockData *data;
-} AiDefaultRailBlock;
+};
 
-typedef struct {
+struct AiDefaultRoadBlock {
 	byte dir;
 	const AiDefaultBlockData *data;
-} AiDefaultRoadBlock;
+};
 
 
 #define MKHDR(a,b,c,d,e) a,b,c,d,e,
--- a/src/table/build_industry.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/build_industry.h	Wed Mar 07 12:11:48 2007 +0000
@@ -1068,7 +1068,7 @@
 
 /* Procedures that can be run to check whether an industry may
  * build at location the given to the procedure */
-typedef enum CheckProcs {
+enum CheckProc {
 	CHECK_NOTHING    = 0,
 	CHECK_FOREST     = 1,
 	CHECK_REFINERY   = 2,
@@ -1079,7 +1079,7 @@
 	CHECK_BUBBLEGEN  = 7,
 	CHECK_OIL_RIG    = 8,
 	CHECK_END,
-} CheckProc;
+};
 
 #define MK(tbl, d, c1, c2, c3, proc, p1, r1, p2, r2, m, a1, a2, a3, pr, clim, in, s1, s2, s3) \
 	{tbl, lengthof(tbl), d, {c1, c2, c3}, proc, {p1, p2}, {r1, r2}, m,            \
--- a/src/table/elrail_data.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/elrail_data.h	Wed Mar 07 12:11:48 2007 +0000
@@ -7,23 +7,23 @@
 
 /** Tile Location group.
  * This defines whether the X and or Y coordinate of a tile is even */
-typedef enum TLG {
+enum TLG {
 	XEVEN_YEVEN = 0,
 	XEVEN_YODD  = 1,
 	XODD_YEVEN  = 2,
 	XODD_YODD   = 3,
 	TLG_END
-} TLG;
+};
 
 /** When determining the pylon configuration on the edge, two tiles are taken
  * into account: the tile being drawn itself (the home tile, the one in
  * ti->tile), and the neighbouring tile */
-typedef enum {
+enum TileSource {
 	TS_HOME      = 0,
 	TS_NEIGHBOUR = 1,
 
 	TS_END
-} TileSource;
+};
 
 enum {
 	NUM_TRACKS_AT_PCP = 6
@@ -253,7 +253,7 @@
 	SPR_PYLON_Y_SW
 };
 
-typedef struct {
+struct SortableSpriteStruct {
 	SpriteID image;
 	int8 x_offset;
 	int8 y_offset;
@@ -261,7 +261,7 @@
 	int8 y_size;
 	int8 z_size;
 	int8 z_offset;
-} SortableSpriteStruct;
+};
 
 enum {
 	/** Distance between wire and rail */
@@ -351,7 +351,7 @@
  * <li>Position of the Pylon relative to the track</li>
  * <li>Position of the Pylon inside the tile</li></ol>
  */
-typedef enum {
+enum CatenarySprite {
 	WIRE_X_FLAT_SW,
 	WIRE_X_FLAT_NE,
 	WIRE_X_FLAT_BOTH,
@@ -395,7 +395,7 @@
 	WIRE_EW_S_E,
 
 	INVALID_CATENARY = 0xFF
-} CatenarySprite;
+};
 
 /* Selects a Wire (with white and grey ends) depending on whether:
  * a) none (should never happen)
--- a/src/table/industry_land.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/industry_land.h	Wed Mar 07 12:11:48 2007 +0000
@@ -1,17 +1,17 @@
 /* $Id$ */
 
-typedef struct DrawIndustrySpec1Struct {
+struct DrawIndustrySpec1Struct {
 	byte x;
 	byte image_1;
 	byte image_2;
 	byte image_3;
-} DrawIndustrySpec1Struct;
+};
 
-typedef struct DrawIndustrySpec4Struct {
+struct DrawIndustrySpec4Struct {
 	byte image_1;
 	byte image_2;
 	byte image_3;
-} DrawIndustrySpec4Struct;
+};
 
 #define M(s1, p1, s2, p2, sx, sy, w, h, dz, p) { { s1, p1 }, { s2, p2 }, sx, sy, w - 1, h - 1, dz, p }
 
--- a/src/table/namegen.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/namegen.h	Wed Mar 07 12:11:48 2007 +0000
@@ -1690,7 +1690,7 @@
  * with cloning this for your own language. */
 
 // Sing., pl.
-typedef enum CzechGender {
+enum CzechGender {
 	CZG_SMASC,
 	CZG_SFEM,
 	CZG_SNEUT,
@@ -1701,12 +1701,14 @@
 	CZG_FREE,
 	// Like CZG_FREE, but disallow CZG_SNEUT.
 	CZG_NFREE
-} CzechGender;
-typedef enum CzechPattern {
+};
+
+enum CzechPattern {
 	CZP_JARNI,
 	CZP_MLADY,
 	CZP_PRIVL
-} CzechPattern;
+};
+
 /* [CzechGender][CzechPattern] - replaces the last character of the adjective
  * by this. */
 // XXX: [CZG_SMASC][CZP_PRIVL] needs special handling: -ovX -> -uv.
@@ -1721,38 +1723,38 @@
 
 // This way the substantives can choose only some adjectives/endings:
 // At least one of these flags must be satisfied:
-typedef enum CzechAllow {
+enum CzechAllow {
 	CZA_SHORT = 1,
 	CZA_MIDDLE = 2,
 	CZA_LONG = 4,
 	CZA_ALL = ~0
-} CzechAllow;
+};
 
 DECLARE_ENUM_AS_BIT_SET(CzechAllow);
 
 // All these flags must be satisfied (in the stem->others direction):
-typedef enum CzechChoose {
+enum CzechChoose {
 	CZC_NONE = 0, // No requirements.
 	CZC_COLOR = 1,
 	CZC_POSTFIX = 2, // Matched if postfix was inserted.
 	CZC_NOPOSTFIX = 4, // Matched if no postfix was inserted.
 	CZC_ANY = ~0
-} CzechChoose;
+};
 
 DECLARE_ENUM_AS_BIT_SET(CzechChoose);
 
-typedef struct CzechNameSubst {
+struct CzechNameSubst {
 	CzechGender gender;
 	CzechAllow allow;
 	CzechChoose choose;
 	const char *name;
-} CzechNameSubst;
+};
 
-typedef struct CzechNameAdj {
+struct CzechNameAdj {
 	CzechPattern pattern;
 	CzechChoose choose;
 	const char *name;
-} CzechNameAdj;
+};
 
 // Some of items which should be common are doubled.
 static const CzechNameAdj name_czech_adj[] = {
--- a/src/table/palettes.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/palettes.h	Wed Mar 07 12:11:48 2007 +0000
@@ -141,7 +141,7 @@
 
 #define GET_PALETTE(x) _palettes[x]
 
-typedef struct {
+struct ExtraPaletteValues {
 	Colour a[15];  // dark blue water
 	Colour ac[15]; // dark blue water Toyland
 	Colour lighthouse[12]; // lighthouse & stadium
@@ -149,7 +149,7 @@
 	Colour e[15];  // ???
 	Colour b[45];  // glittery water
 	Colour bc[45]; // glittery water Toyland
-} ExtraPaletteValues;
+};
 
 static const ExtraPaletteValues _extra_palette_values = {
 	{ M( 32,  68, 112), M( 36,  72, 116), M( 40,  76, 120), M( 44,  80, 124),
@@ -173,10 +173,10 @@
 #undef M
 
 // Color table for colors in lang files (e.g. {BLACK})
-typedef struct StringColor {
+struct StringColor {
 	byte text;
 	byte shadow;
-} StringColor;
+};
 
 static const StringColor _string_colormap[] = {
 	{ 150, 215 }, // BLUE
--- a/src/table/sprites.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/sprites.h	Wed Mar 07 12:11:48 2007 +0000
@@ -1191,7 +1191,7 @@
 };
 
 /** Cursor sprite numbers */
-typedef enum CursorSprites {
+enum CursorSprite {
 	/* Terraform */
 	/* Cursors */
 	SPR_CURSOR_MOUSE          = 0,
@@ -1278,7 +1278,7 @@
 	SPR_CURSOR_CLONE_ROADVEH  = SPR_OPENTTD_BASE + 110,
 	SPR_CURSOR_CLONE_SHIP     = SPR_OPENTTD_BASE + 112,
 	SPR_CURSOR_CLONE_AIRPLANE = SPR_OPENTTD_BASE + 114,
-} CursorSprite;
+};
 
 /// Animation macro in table/animcursors.h (_animcursors[])
 enum AnimCursors {
--- a/src/table/town_land.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/town_land.h	Wed Mar 07 12:11:48 2007 +0000
@@ -2017,9 +2017,9 @@
 assert_compile(lengthof(_housetype_remove_ratingmod) == HOUSE_MAX);
 
 
-typedef struct {
+struct HousetypeYear {
 	Year min, max;
-} HousetypeYear;
+};
 
 static const HousetypeYear _housetype_years[] = {
 	{ 1963, MAX_YEAR },
--- a/src/table/tree_land.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/tree_land.h	Wed Mar 07 12:11:48 2007 +0000
@@ -13,10 +13,10 @@
 static const byte _tree_base_by_landscape[4] = {0, 12, 20, 32};
 static const byte _tree_count_by_landscape[4] = {12, 8, 12, 9};
 
-typedef struct TreePos {
+struct TreePos {
 	uint8 x;
 	uint8 y;
-} TreePos;
+};
 
 static const TreePos _tree_layout_xy[][4] = {
 	{ { 9, 3 }, { 1, 8 }, { 0, 0 }, { 8, 9 } },
--- a/src/table/unicode.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/unicode.h	Wed Mar 07 12:11:48 2007 +0000
@@ -1,10 +1,10 @@
 /* $Id$ */
 
 
-typedef struct DefaultUnicodeMapping {
+struct DefaultUnicodeMapping {
 	WChar code; ///< Unicode value
 	byte key;   ///< Character index of sprite
-} DefaultUnicodeMapping;
+};
 
 
 /* Default unicode mapping table for sprite based glyphs.
--- a/src/table/unmovable_land.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/unmovable_land.h	Wed Mar 07 12:11:48 2007 +0000
@@ -1,6 +1,6 @@
 /* $Id$ */
 
-typedef struct DrawTileUnmovableStruct {
+struct DrawTileUnmovableStruct {
 	uint16 image;
 	byte subcoord_x;
 	byte subcoord_y;
@@ -8,7 +8,7 @@
 	byte height;
 	byte z_size;
 	byte unused;
-} DrawTileUnmovableStruct;
+};
 
 #define TILE_SEQ_END() { (byte)0x80, 0, 0, 0, 0, 0, 0, 0 }
 
--- a/src/table/water_land.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/table/water_land.h	Wed Mar 07 12:11:48 2007 +0000
@@ -1,6 +1,6 @@
 /* $Id$ */
 
-typedef struct WaterDrawTileStruct {
+struct WaterDrawTileStruct {
 	byte delta_x;
 	byte delta_y;
 	byte delta_z;
@@ -8,7 +8,7 @@
 	byte height;
 	byte unk;
 	SpriteID image;
-} WaterDrawTileStruct;
+};
 
 #define BEGIN(image) { 0, 0, 0, 0, 0, 0, image }
 #define END(y) { 0x80, y, 0, 0, 0, 0, 0 }
--- a/src/texteff.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/texteff.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -23,7 +23,7 @@
 	MAX_ANIMATED_TILES     = 256,
 };
 
-typedef struct TextEffect {
+struct TextEffect {
 	StringID string_id;
 	int32 x;
 	int32 y;
@@ -32,14 +32,14 @@
 	uint16 duration;
 	uint32 params_1;
 	uint32 params_2;
-} TextEffect;
+};
 
 
-typedef struct TextMessage {
+struct TextMessage {
 	char message[MAX_TEXTMESSAGE_LENGTH];
 	uint16 color;
 	Date end_date;
-} TextMessage;
+};
 
 static TextEffect _text_effect_list[MAX_TEXT_MESSAGES];
 static TextMessage _textmsg_list[MAX_CHAT_MESSAGES];
--- a/src/tgp.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/tgp.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -165,14 +165,14 @@
 static const int amplitude_decimal_bits = 10;
 
 /** Height map - allocated array of heights (MapSizeX() + 1) x (MapSizeY() + 1) */
-typedef struct HeightMap
+struct HeightMap
 {
 	height_t *h;         //! array of heights
 	uint     dim_x;      //! height map size_x MapSizeX() + 1
 	uint     total_size; //! height map total size
 	uint     size_x;     //! MapSizeX()
 	uint     size_y;     //! MapSizeY()
-} HeightMap;
+};
 
 /** Global height map instance */
 static HeightMap _height_map = {NULL, 0, 0, 0, 0};
--- a/src/thread.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/thread.h	Wed Mar 07 12:11:48 2007 +0000
@@ -3,7 +3,7 @@
 #ifndef THREAD_H
 #define THREAD_H
 
-typedef struct OTTDThread OTTDThread;
+struct OTTDThread;
 
 typedef void* (*OTTDThreadFunc)(void*);
 
--- a/src/tile.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/tile.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,7 +8,7 @@
 #include "map.h"
 #include "slope.h"
 
-typedef enum TileTypes {
+enum TileType {
 	MP_CLEAR,
 	MP_RAILWAY,
 	MP_STREET,
@@ -20,13 +20,13 @@
 	MP_INDUSTRY,
 	MP_TUNNELBRIDGE,
 	MP_UNMOVABLE,
-} TileType;
+};
 
-typedef enum TropicZones {
+enum TropicZone {
 	TROPICZONE_INVALID    = 0,
 	TROPICZONE_DESERT     = 1,
 	TROPICZONE_RAINFOREST = 2,
-} TropicZone;
+};
 
 Slope GetTileSlope(TileIndex tile, uint *h);
 uint GetTileZ(TileIndex tile);
--- a/src/train.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/train.h	Wed Mar 07 12:11:48 2007 +0000
@@ -13,14 +13,14 @@
  * This is an enum to tell what bit to access as it is a bitmask
  */
 
-typedef enum TrainSubtypes {
+enum TrainSubtype {
 	Train_Front             = 0, // Leading engine of a train
 	Train_Articulated_Part  = 1, // Articulated part of an engine
 	Train_Wagon             = 2, // Wagon
 	Train_Engine            = 3, // Engine, that can be front engines, but might be placed behind another engine
 	Train_Free_Wagon        = 4, // First in a wagon chain (in depot)
 	Train_Multiheaded       = 5, // Engine is a multiheaded
-} TrainSubtype;
+};
 
 
 /** Check if a vehicle is front engine
--- a/src/train_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/train_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -1822,7 +1822,7 @@
 	return cost;
 }
 
-typedef struct TrainFindDepotData {
+struct TrainFindDepotData {
 	uint best_length;
 	TileIndex tile;
 	PlayerID owner;
@@ -1831,7 +1831,7 @@
 	 * This value is unused when new depot finding and NPF are both disabled
 	 */
 	bool reverse;
-} TrainFindDepotData;
+};
 
 static bool NtpCallbFindDepot(TileIndex tile, TrainFindDepotData *tfdd, int track, uint length)
 {
@@ -2134,13 +2134,13 @@
 }
 
 /* Check for station tiles */
-typedef struct TrainTrackFollowerData {
+struct TrainTrackFollowerData {
 	TileIndex dest_coords;
 	StationID station_index; // station index we're heading for
 	uint best_bird_dist;
 	uint best_track_dist;
 	TrackdirByte best_track;
-} TrainTrackFollowerData;
+};
 
 static bool NtpCallbFindStation(TileIndex tile, TrainTrackFollowerData *ttfd, Trackdir track, uint length)
 {
@@ -2712,11 +2712,11 @@
 		);
 }
 
-typedef struct {
+struct RailtypeSlowdownParams {
 	byte small_turn, large_turn;
 	byte z_up; // fraction to remove when moving up
 	byte z_down; // fraction to remove when moving down
-} RailtypeSlowdownParams;
+};
 
 static const RailtypeSlowdownParams _railtype_slowdown[] = {
 	// normal accel
@@ -2768,10 +2768,10 @@
 }
 
 
-typedef struct TrainCollideChecker {
+struct TrainCollideChecker {
 	const Vehicle *v;
 	const Vehicle *v_skip;
-} TrainCollideChecker;
+};
 
 static void *FindTrainCollideEnum(Vehicle *v, void *data)
 {
@@ -2861,10 +2861,10 @@
 	SndPlayVehicleFx(SND_13_BIG_CRASH, v);
 }
 
-typedef struct VehicleAtSignalData {
+struct VehicleAtSignalData {
 	TileIndex tile;
 	Direction direction;
-} VehicleAtSignalData;
+};
 
 static void *CheckVehicleAtSignal(Vehicle *v, void *data)
 {
--- a/src/tree_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/tree_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -310,11 +310,11 @@
 	}
 }
 
-typedef struct TreeListEnt {
+struct TreeListEnt {
 	SpriteID image;
 	SpriteID pal;
 	byte x,y;
-} TreeListEnt;
+};
 
 static void DrawTile_Trees(TileInfo *ti)
 {
--- a/src/tree_map.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/tree_map.h	Wed Mar 07 12:11:48 2007 +0000
@@ -5,7 +5,7 @@
 
 #include "macros.h"
 
-typedef enum TreeType {
+enum TreeType {
 	TREE_INVALID      = -1,
 	TREE_TEMPERATE    = 0,
 	TREE_SUB_ARCTIC   = 12,
@@ -13,7 +13,7 @@
 	TREE_CACTUS       = 27,
 	TREE_SUB_TROPICAL = 28,
 	TREE_TOYLAND      = 32
-} TreeType;
+};
 
 enum {
 	TREE_COUNT_TEMPERATE    = TREE_SUB_ARCTIC   - TREE_TEMPERATE,
@@ -25,11 +25,11 @@
 
 /* ground type, m2 bits 4...5
  * valid densities (bits 6...7) in comments after the enum */
-typedef enum TreeGround {
+enum TreeGround {
 	TREE_GROUND_GRASS       = 0, // 0
 	TREE_GROUND_ROUGH       = 1, // 0
 	TREE_GROUND_SNOW_DESERT = 2  // 0-3 for snow, 3 for desert
-} TreeGround;
+};
 
 
 static inline TreeType GetTreeType(TileIndex t)
--- a/src/tunnelbridge_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/tunnelbridge_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -77,7 +77,7 @@
 }
 
 #define M(x) (1 << (x))
-typedef enum BridgeFoundations{
+enum BridgeFoundation {
 	// foundation, whole tile is leveled up --> 3 corners raised
 	BRIDGE_FULL_LEVELED_FOUNDATION = M(SLOPE_WSE) | M(SLOPE_NWS) | M(SLOPE_ENW) | M(SLOPE_SEN),
 	// foundation, tile is partly leveled up --> 1 corner raised
@@ -85,7 +85,7 @@
 	// no foundations (X,Y direction)
 	BRIDGE_NO_FOUNDATION = M(SLOPE_FLAT) | M(SLOPE_SW) | M(SLOPE_SE) | M(SLOPE_NW) | M(SLOPE_NE),
 	BRIDGE_HORZ_RAMP = (BRIDGE_PARTLY_LEVELED_FOUNDATION | BRIDGE_NO_FOUNDATION) & ~M(SLOPE_FLAT)
-} BridgeFoundataion;
+};
 #undef M
 
 static inline const PalSpriteID *GetBridgeSpriteTable(int index, byte table)
--- a/src/unmovable_map.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/unmovable_map.h	Wed Mar 07 12:11:48 2007 +0000
@@ -8,7 +8,7 @@
 	HQ_NUM_SIZE = 5
 };
 
-typedef enum UnmovableType {
+enum UnmovableType {
 	UNMOVABLE_TRANSMITTER = 0,
 	UNMOVABLE_LIGHTHOUSE  = 1,
 	UNMOVABLE_STATUE      = 2,
@@ -19,7 +19,7 @@
 	UNMOVABLE_HQ_SOUTH    = 0x83,
 
 	UNMOVABLE_HQ_END      = UNMOVABLE_HQ_NORTH + HQ_NUM_SIZE * HQ_NUM_TILE
-} UnmovableType;
+};
 
 
 
--- a/src/variables.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/variables.h	Wed Mar 07 12:11:48 2007 +0000
@@ -19,7 +19,7 @@
 VARDEF uint32 _cargo_payment_rates[NUM_CARGO];
 VARDEF uint16 _cargo_payment_rates_frac[NUM_CARGO];
 
-typedef struct {
+struct GameOptions {
 	GameDifficulty diff;
 	byte diff_level;
 	byte currency;
@@ -29,7 +29,7 @@
 	byte snow_line;
 	byte autosave;
 	byte road_side;
-} GameOptions;
+};
 
 /* These are the options for the current game
  * either ingame, or loaded. Also used for networking games */
@@ -80,7 +80,7 @@
 
 // ********* END OF SAVE REGION
 
-typedef struct Patches {
+struct Patches {
 	bool modified_catchment;            // different-size catchment areas
 	bool vehicle_speed;                 // show vehicle speed
 	bool build_on_slopes;               // allow building on slopes
@@ -221,22 +221,22 @@
 	/** YAPF settings */
 	YapfSettings  yapf;
 
-} Patches;
+};
 
 VARDEF Patches _patches;
 
 
-typedef struct Cheat {
+struct Cheat {
 	bool been_used; // has this cheat been used before?
 	bool value;     // tells if the bool cheat is active or not
-} Cheat;
+};
 
 
 // WARNING! Do _not_ remove entries in Cheats struct or change the order
 // of the existing ones! Would break downward compatibility.
 // Only add new entries at the end of the struct!
 
-typedef struct Cheats {
+struct Cheats {
 	Cheat magic_bulldozer;  // dynamite industries, unmovables
 	Cheat switch_player;    // change to another player
 	Cheat money;            // get rich
@@ -247,11 +247,11 @@
 	Cheat change_date;      // changes date ingame
 	Cheat setup_prod;       // setup raw-material production in game
 	Cheat dummy;            // empty cheat (enable running el-engines on normal rail)
-} Cheats;
+};
 
 VARDEF Cheats _cheats;
 
-typedef struct Paths {
+struct Paths {
 	char *personal_dir;  // includes cfg file and save folder
 	char *game_data_dir; // includes data, gm, lang
 	char *data_dir;
@@ -262,7 +262,7 @@
 	char *scenario_dir;
 	char *heightmap_dir;
 	char *second_data_dir;
-} Paths;
+};
 
 VARDEF Paths _paths;
 
@@ -296,11 +296,11 @@
 VARDEF bool _generating_world;
 
 // Deals with the type of the savegame, independent of extension
-typedef struct {
+struct SmallFiosItem {
 	int mode;             // savegame/scenario type (old, new)
 	char name[MAX_PATH];  // name
 	char title[255];      // internal name of the game
-} SmallFiosItem;
+};
 
 // Used when switching from the intro menu.
 VARDEF byte _switch_mode;
@@ -314,7 +314,7 @@
 VARDEF char _ini_videodriver[32], _ini_musicdriver[32], _ini_sounddriver[32];
 
 // Used for dynamic language support
-typedef struct {
+struct DynamicLanguages {
 	int num; // number of languages
 	int curr; // currently selected language index
 	char curr_file[MAX_LANG]; // currently selected language file
@@ -323,7 +323,7 @@
 		char *name;
 		char *file;
 	} ent[MAX_LANG];
-} DynamicLanguages;
+};
 
 VARDEF DynamicLanguages _dynlang;
 
--- a/src/vehicle.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/vehicle.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -1098,11 +1098,11 @@
 	v->u.special.unk2 = 0;
 }
 
-typedef struct BulldozerMovement {
+struct BulldozerMovement {
 	byte direction:2;
 	byte image:2;
 	byte duration:3;
-} BulldozerMovement;
+};
 
 static const BulldozerMovement _bulldozer_movement[] = {
 	{ 0, 0, 4 },
@@ -1172,12 +1172,12 @@
 	v->progress = 0;
 }
 
-typedef struct BubbleMovement {
+struct BubbleMovement {
 	int8 x:4;
 	int8 y:4;
 	int8 z:4;
 	byte image:4;
-} BubbleMovement;
+};
 
 #define MK(x, y, z, i) { x, y, z, i }
 #define ME(i) { i, 4, 0, 0 }
--- a/src/vehicle.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/vehicle.h	Wed Mar 07 12:11:48 2007 +0000
@@ -90,7 +90,7 @@
 };
 
 /* Effect vehicle types */
-typedef enum EffectVehicle {
+enum EffectVehicle {
 	EV_CHIMNEY_SMOKE   = 0,
 	EV_STEAM_SMOKE     = 1,
 	EV_DIESEL_SMOKE    = 2,
@@ -101,9 +101,9 @@
 	EV_EXPLOSION_SMALL = 7,
 	EV_BULLDOZER       = 8,
 	EV_BUBBLE          = 9
-} EffectVehicle;
+};
 
-typedef struct VehicleRail {
+struct VehicleRail {
 	uint16 last_speed; // NOSAVE: only used in UI
 	uint16 crash_anim_pos;
 	uint16 days_since_order_progr;
@@ -140,7 +140,7 @@
 
 	// Link between the two ends of a multiheaded engine
 	Vehicle *other_multiheaded_part;
-} VehicleRail;
+};
 
 enum {
 	VRF_REVERSING         = 0,
@@ -162,15 +162,15 @@
 	VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL = 6,
 };
 
-typedef struct VehicleAir {
+struct VehicleAir {
 	uint16 crashed_counter;
 	byte pos;
 	byte previous_pos;
 	StationID targetairport;
 	byte state;
-} VehicleAir;
+};
 
-typedef struct VehicleRoad {
+struct VehicleRoad {
 	byte state;             /// @see RoadVehicleStates
 	byte frame;
 	uint16 blocked_ctr;
@@ -180,21 +180,21 @@
 	byte reverse_ctr;
 	struct RoadStop *slot;
 	byte slot_age;
-} VehicleRoad;
+};
 
-typedef struct VehicleSpecial {
+struct VehicleSpecial {
 	uint16 unk0;
 	byte unk2;
-} VehicleSpecial;
+};
 
-typedef struct VehicleDisaster {
+struct VehicleDisaster {
 	uint16 image_override;
 	uint16 unk2;
-} VehicleDisaster;
+};
 
-typedef struct VehicleShip {
+struct VehicleShip {
 	TrackBitsByte state;
-} VehicleShip;
+};
 
 
 struct Vehicle {
@@ -409,11 +409,11 @@
 	DEPOT_LOCATE_HANGAR = (1 << 3), // Find another airport if the target one lacks a hangar
 };
 
-typedef struct GetNewVehiclePosResult {
+struct GetNewVehiclePosResult {
 	int x,y;
 	TileIndex old_tile;
 	TileIndex new_tile;
-} GetNewVehiclePosResult;
+};
 
 /**
  * Returns the Trackdir on which the vehicle is currently located.
--- a/src/vehicle_gui.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/vehicle_gui.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -30,22 +30,22 @@
 #include "helpers.hpp"
 #include "cargotype.h"
 
-typedef struct Sorting {
+struct Sorting {
 	Listing aircraft;
 	Listing roadveh;
 	Listing ship;
 	Listing train;
-} Sorting;
+};
 
 static Sorting _sorting;
 
-typedef struct vehiclelist_d {
+struct vehiclelist_d {
 	const Vehicle** sort_list;  // List of vehicles (sorted)
 	Listing *_sorting;          // pointer to the appropiate subcategory of _sorting
 	uint16 length_of_sort_list; // Keeps track of how many vehicle pointers sort list got space for
 	byte vehicle_type;          // The vehicle type that is sorted
 	list_d l;                   // General list struct
-} vehiclelist_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(vehiclelist_d));
 
 static bool   _internal_sort_order;     // descending/ascending
@@ -180,17 +180,17 @@
 	DrawSprite(SPR_BLOT, pal, x, y);
 }
 
-typedef struct RefitOption {
+struct RefitOption {
 	CargoID cargo;
 	byte subtype;
 	uint16 value;
 	EngineID engine;
-} RefitOption;
+};
 
-typedef struct RefitList {
+struct RefitList {
 	uint num_lines;
 	RefitOption *items;
-} RefitList;
+};
 
 static RefitList *BuildRefitList(const Vehicle *v)
 {
--- a/src/video/cocoa_v.mm	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/video/cocoa_v.mm	Wed Mar 07 12:11:48 2007 +0000
@@ -31,10 +31,10 @@
 
 
 /* Portions of CPS.h */
-typedef struct CPSProcessSerNum {
+struct CPSProcessSerNum {
 	UInt32 lo;
 	UInt32 hi;
-} CPSProcessSerNum;
+};
 
 extern "C" OSErr CPSGetCurrentProcess(CPSProcessSerNum* psn);
 extern "C" OSErr CPSEnableForegroundOperation(CPSProcessSerNum* psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
@@ -103,11 +103,11 @@
  */
 #define QZ_GAMMA_TABLE_SIZE 256
 
-typedef struct {
+struct OTTD_QuartzGammaTable {
 	CGGammaValue red[QZ_GAMMA_TABLE_SIZE];
 	CGGammaValue green[QZ_GAMMA_TABLE_SIZE];
 	CGGammaValue blue[QZ_GAMMA_TABLE_SIZE];
-} OTTD_QuartzGammaTable;
+};
 
 /* Add methods to get at private members of NSScreen.
  * Since there is a bug in Apple's screen switching code that does not update
@@ -210,10 +210,10 @@
 
 
 
-typedef struct VkMapping {
+struct VkMapping {
 	unsigned short vk_from;
 	byte map_to;
-} VkMapping;
+};
 
 #define AS(x, z) {x, z}
 
--- a/src/video/sdl_v.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/video/sdl_v.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -209,11 +209,11 @@
 	return true;
 }
 
-typedef struct VkMapping {
+struct VkMapping {
 	uint16 vk_from;
 	byte vk_count;
 	byte map_to;
-} VkMapping;
+};
 
 #define AS(x, z) {x, 0, z}
 #define AM(x, y, z, w) {x, y - x, z}
--- a/src/video/win32_v.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/video/win32_v.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -73,11 +73,11 @@
 	SetDIBColorTable(dc, start, count, rgb);
 }
 
-typedef struct {
+struct VkMapping {
 	byte vk_from;
 	byte vk_count;
 	byte map_to;
-} VkMapping;
+};
 
 #define AS(x, z) {x, 0, z}
 #define AM(x, y, z, w) {x, y - x, z}
--- a/src/viewport.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/viewport.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -47,34 +47,34 @@
  *   X <                             > Y         *
  */
 
-typedef struct StringSpriteToDraw {
+struct StringSpriteToDraw {
 	uint16 string;
 	uint16 color;
-	struct StringSpriteToDraw *next;
+	StringSpriteToDraw *next;
 	int32 x;
 	int32 y;
 	uint32 params[2];
 	uint16 width;
-} StringSpriteToDraw;
-
-typedef struct TileSpriteToDraw {
+};
+
+struct TileSpriteToDraw {
 	SpriteID image;
 	SpriteID pal;
-	struct TileSpriteToDraw *next;
+	TileSpriteToDraw *next;
 	int32 x;
 	int32 y;
 	byte z;
-} TileSpriteToDraw;
-
-typedef struct ChildScreenSpriteToDraw {
+};
+
+struct ChildScreenSpriteToDraw {
 	SpriteID image;
 	SpriteID pal;
 	int32 x;
 	int32 y;
-	struct ChildScreenSpriteToDraw *next;
-} ChildScreenSpriteToDraw;
-
-typedef struct ParentSpriteToDraw {
+	ChildScreenSpriteToDraw *next;
+};
+
+struct ParentSpriteToDraw {
 	SpriteID image;
 	SpriteID pal;
 	int32 left;
@@ -89,13 +89,13 @@
 	byte unk16;
 	byte zmin;
 	byte zmax;
-} ParentSpriteToDraw;
+};
 
 // Quick hack to know how much memory to reserve when allocating from the spritelist
 // to prevent a buffer overflow.
 #define LARGEST_SPRITELIST_STRUCT ParentSpriteToDraw
 
-typedef struct ViewportDrawer {
+struct ViewportDrawer {
 	DrawPixelInfo dpi;
 
 	byte *spritelist_mem;
@@ -112,7 +112,7 @@
 	byte combine_sprites;
 
 	int offs_x, offs_y; // used when drawing ground sprites relative
-} ViewportDrawer;
+};
 
 static ViewportDrawer *_cur_vd;
 
--- a/src/viewport.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/viewport.h	Wed Mar 07 12:11:48 2007 +0000
@@ -109,7 +109,7 @@
 	HT_DIR_MASK = 0x7 ///< masks the drag-direction
 };
 
-typedef struct TileHighlightData {
+struct TileHighlightData {
 	Point size;
 	Point outersize;
 	Point pos;
@@ -135,7 +135,7 @@
 
 	int userdata;
 	TileIndex redsq;
-} TileHighlightData;
+};
 
 
 // common button handler
--- a/src/water_cmd.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/water_cmd.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -401,11 +401,11 @@
 	}
 }
 
-typedef struct LocksDrawTileStruct {
+struct LocksDrawTileStruct {
 	int8 delta_x, delta_y, delta_z;
 	byte width, height, depth;
 	SpriteID image;
-} LocksDrawTileStruct;
+};
 
 #include "table/water_land.h"
 
--- a/src/water_map.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/water_map.h	Wed Mar 07 12:11:48 2007 +0000
@@ -3,25 +3,25 @@
 #ifndef WATER_MAP_H
 #define WATER_MAP_H
 
-typedef enum WaterTileType {
+enum WaterTileType {
 	WATER_TILE_CLEAR,
 	WATER_TILE_COAST,
 	WATER_TILE_LOCK,
 	WATER_TILE_DEPOT,
-} WaterTileType;
+};
 
-typedef enum DepotPart {
+enum DepotPart {
 	DEPOT_NORTH = 0x80,
 	DEPOT_SOUTH = 0x81,
 	DEPOT_END   = 0x84,
-} DepotPart;
+};
 
-typedef enum LockPart {
+enum LockPart {
 	LOCK_MIDDLE = 0x10,
 	LOCK_LOWER  = 0x14,
 	LOCK_UPPER  = 0x18,
 	LOCK_END    = 0x1C
-} LockPart;
+};
 
 static inline WaterTileType GetWaterTileType(TileIndex t)
 {
--- a/src/win32.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/win32.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -100,11 +100,11 @@
 static bool _did_emerg_save;
 static int _ident;
 
-typedef struct DebugFileInfo {
+struct DebugFileInfo {
 	uint32 size;
 	uint32 crc32;
 	SYSTEMTIME file_time;
-} DebugFileInfo;
+};
 
 static uint32 *_crc_table;
 
@@ -230,14 +230,14 @@
 /* Disable the crash-save submit code as it's not used */
 #if 0
 
-typedef struct {
+struct WinInetProcs {
 	HINTERNET (WINAPI *InternetOpen)(LPCTSTR,DWORD, LPCTSTR, LPCTSTR, DWORD);
 	HINTERNET (WINAPI *InternetConnect)(HINTERNET, LPCTSTR, INTERNET_PORT, LPCTSTR, LPCTSTR, DWORD, DWORD, DWORD);
 	HINTERNET (WINAPI *HttpOpenRequest)(HINTERNET, LPCTSTR, LPCTSTR, LPCTSTR, LPCTSTR, LPCTSTR *, DWORD, DWORD);
 	BOOL (WINAPI *HttpSendRequest)(HINTERNET, LPCTSTR, DWORD, LPVOID, DWORD);
 	BOOL (WINAPI *InternetCloseHandle)(HINTERNET);
 	BOOL (WINAPI *HttpQueryInfo)(HINTERNET, DWORD, LPVOID, LPDWORD, LPDWORD);
-} WinInetProcs;
+};
 
 #define M(x) x "\0"
 #if defined(UNICODE)
--- a/src/window.cpp	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/window.cpp	Wed Mar 07 12:11:48 2007 +0000
@@ -665,9 +665,9 @@
 	return LocalAllocateWindow(x, y, width, height, proc, cls, widget, 0);
 }
 
-typedef struct SizeRect {
+struct SizeRect {
 	int left,top,width,height;
-} SizeRect;
+};
 
 
 static SizeRect _awap_r;
--- a/src/window.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/window.h	Wed Mar 07 12:11:48 2007 +0000
@@ -11,7 +11,7 @@
 #include "rail.h"
 #include "airport.h"
 
-typedef struct WindowEvent WindowEvent;
+struct WindowEvent;
 
 typedef void WindowProc(Window *w, WindowEvent *e);
 
@@ -42,7 +42,7 @@
      w->resize.width or w->resize.height.
    That was all.. good luck, and enjoy :) -- TrueLight */
 
-typedef enum ResizeFlags {
+enum ResizeFlag {
 	RESIZE_NONE   = 0,  ///< no resize required
 
 	RESIZE_LEFT   = 1,  ///< left resize flag
@@ -64,28 +64,28 @@
 	WIDG_DISABLED = 4,  ///< widget is greyed out, not available
 	WIDG_HIDDEN   = 5,  ///< widget is made invisible
 	WIDG_LOWERED  = 6,  ///< widget is paint lowered, a pressed button in fact
-} ResizeFlag;
+};
 
 enum {
 	WIDGET_LIST_END = -1, ///< indicate the end of widgets' list for vararg functions
 };
 
-typedef struct Widget {
+struct Widget {
 	byte type;                        ///< Widget type, see WindowWidgetTypes
 	byte display_flags;               ///< Resize direction, alignment, etc. during resizing, see ResizeFlags
 	byte color;                       ///< Widget colour, see docs/ottd-colourtext-palette.png
 	int16 left, right, top, bottom;   ///< The position offsets inside the window
 	uint16 data;                      ///< The String/Image or special code (list-matrixes) of a widget
 	StringID tooltips;                ///< Tooltips that are shown when rightclicking on a widget
-} Widget;
+};
 
-typedef enum FrameFlags {
+enum FrameFlags {
 	FR_NONE         = 0x00,
 	FR_TRANSPARENT  = 0x01,  ///< Makes the background transparent if set
 	FR_BORDERONLY   = 0x10,  ///< Draw border only, no background
 	FR_LOWERED      = 0x20,  ///< If set the frame is lowered and the background color brighter (ie. buttons when pressed)
 	FR_DARKENED     = 0x40,  ///< If set the background is darker, allows for lowered frames with normal background color when used with FR_LOWERED (ie. dropdown boxes)
-} FrameFlags;
+};
 
 DECLARE_ENUM_AS_BIT_SET(FrameFlags);
 
@@ -186,14 +186,14 @@
 	} we;
 };
 
-typedef struct WindowDesc {
+struct WindowDesc {
 	int16 left, top, width, height;
 	WindowClass cls;
 	WindowClass parent_cls;
 	uint32 flags;
 	const Widget *widgets;
 	WindowProc *proc;
-} WindowDesc;
+};
 
 enum WindowDefaultFlag {
 	WDF_STD_TOOLTIPS    =   1, ///< use standard routine when displaying tooltips
@@ -214,14 +214,14 @@
 	WDP_ALIGN_TBL = -4, ///< Align the left side of the window with the left side of the main toolbar
 };
 
-typedef struct Textbuf {
+struct Textbuf {
 	char *buf;                  ///< buffer in which text is saved
 	uint16 maxlength, maxwidth; ///< the maximum size of the buffer. Maxwidth specifies screensize in pixels, maxlength is in bytes
 	uint16 length, width;       ///< the current size of the string. Width specifies screensize in pixels, length is in bytes
 	bool caret;                 ///< is the caret ("_") visible or not
 	uint16 caretpos;            ///< the current position of the caret in the buffer, in bytes
 	uint16 caretxoffs;          ///< the current position of the caret in pixels
-} Textbuf;
+};
 
 #define WP(ptr,str) (*(str*)(ptr)->custom)
 /* You cannot 100% reliably calculate the biggest custom struct as
@@ -229,22 +229,22 @@
  * 96 is the largest window-size for 64-bit machines currently */
 #define WINDOW_CUSTOM_SIZE 96
 
-typedef struct Scrollbar {
+struct Scrollbar {
 	uint16 count, cap, pos;
-} Scrollbar;
+};
 
-typedef struct ResizeInfo {
+struct ResizeInfo {
 	uint width; ///< Minimum width and height
 	uint height;
 	uint step_width; ///< In how big steps the width and height go
 	uint step_height;
-} ResizeInfo;
+};
 
-typedef struct WindowMessage {
-		int msg;
-		int wparam;
-		int lparam;
-} WindowMessage;
+struct WindowMessage {
+	int msg;
+	int wparam;
+	int lparam;
+};
 
 struct Window {
 	uint16 flags4;
@@ -271,16 +271,16 @@
 	byte custom[WINDOW_CUSTOM_SIZE];
 };
 
-typedef struct querystr_d {
+struct querystr_d {
 	StringID caption;
 	Textbuf text;
 	const char *orig;
 	CharSetFilter afilter;
 	bool handled;
-} querystr_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(querystr_d));
 
-typedef struct {
+struct menu_d {
 	byte item_count;      ///< follow_vehicle
 	byte sel_index;       ///< scrollpos_x
 	byte main_button;     ///< scrollpos_y
@@ -288,36 +288,36 @@
 	StringID string_id;   ///< unk30
 	uint16 checked_items; ///< unk32
 	byte disabled_items;
-} menu_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(menu_d));
 
-typedef struct {
+struct def_d {
 	int16 data_1, data_2, data_3;
 	int16 data_4, data_5;
 	bool close;
 	byte byte_1;
-} def_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(def_d));
 
-typedef struct {
+struct void_d {
 	void *data;
-} void_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(void_d));
 
-typedef struct {
+struct tree_d {
 	uint16 base;
 	uint16 count;
-} tree_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(tree_d));
 
-typedef struct {
+struct tooltips_d {
 	StringID string_id;
 	byte paramcount;
 	uint32 params[5];
-} tooltips_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(tooltips_d));
 
-typedef struct {
+struct buildvehicle_d {
 	byte vehicle_type;
 	union {
 		RailTypeByte railtype;
@@ -330,10 +330,10 @@
 	EngineID sel_engine;
 	EngineID rename_engine;
 	EngineList eng_list;
-} buildvehicle_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(buildvehicle_d));
 
-typedef struct {
+struct replaceveh_d {
 	byte sel_index[2];
 	EngineID sel_engine[2];
 	uint16 count[2];
@@ -342,10 +342,10 @@
 	bool update_left;
 	bool update_right;
 	bool init_lists;
-} replaceveh_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(replaceveh_d));
 
-typedef struct {
+struct depot_d {
 	VehicleID sel;
 	byte type;
 	bool generate_list;
@@ -355,110 +355,110 @@
 	uint16 wagon_count;
 	Vehicle **vehicle_list;
 	Vehicle **wagon_list;
-} depot_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(depot_d));
 
-typedef struct {
+struct order_d {
 	int sel;
-} order_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(order_d));
 
-typedef struct {
+struct traindetails_d {
 	byte tab;
-} traindetails_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(traindetails_d));
 
-typedef struct {
+struct smallmap_d {
 	int32 scroll_x;
 	int32 scroll_y;
 	int32 subscroll;
-} smallmap_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(smallmap_d));
 
-typedef struct {
+struct facesel_d {
 	uint32 face;
 	byte gender;
-} facesel_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(facesel_d));
 
-typedef struct {
+struct refit_d {
 	int sel;
 	struct RefitOption *cargo;
 	struct RefitList *list;
 	uint length;
 	VehicleOrderID order;
-} refit_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(refit_d));
 
-typedef struct {
+struct vp_d {
 	VehicleID follow_vehicle;
 	int32 scrollpos_x;
 	int32 scrollpos_y;
-} vp_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(vp_d));
 
 /* vp2_d is the same as vp_d, except for the data_# values.. */
-typedef struct {
+struct vp2_d {
 	VehicleID follow_vehicle;
 	int32 scrollpos_x;
 	int32 scrollpos_y;
 	byte data_1;
 	byte data_2;
 	byte data_3;
-} vp2_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(vp2_d));
 
-typedef struct {
+struct news_d {
 	uint16 follow_vehicle;
 	int32 scrollpos_x;
 	int32 scrollpos_y;
 	NewsItem *ni;
-} news_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(news_d));
 
-typedef struct {
+struct highscore_d {
 	uint32 background_img;
 	int8 rank;
-} highscore_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(highscore_d));
 
-typedef struct {
+struct scroller_d {
 	int height;
 	uint16 counter;
-} scroller_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(scroller_d));
 
-typedef enum SortListFlags {
+enum SortListFlags {
 	VL_NONE    = 0x00,  ///< no sort
 	VL_DESC    = 0x01,  ///< sort descending or ascending
 	VL_RESORT  = 0x02,  ///< instruct the code to resort the list in the next loop
 	VL_REBUILD = 0x04,  ///< create sort-listing to use for qsort and friends
 	VL_END     = 0x08
-} SortListFlags;
+};
 
 DECLARE_ENUM_AS_BIT_SET(SortListFlags);
 
-typedef struct Listing {
+struct Listing {
 	bool order;    ///< Ascending/descending
 	byte criteria; ///< Sorting criteria
-} Listing;
+};
 
-typedef struct list_d {
+struct list_d {
 	uint16 list_length;  ///< length of the list being sorted
 	byte sort_type;      ///< what criteria to sort on
 	SortListFlags flags; ///< used to control sorting/resorting/etc.
 	uint16 resort_timer; ///< resort list after a given amount of ticks if set
-} list_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(list_d));
 
-typedef struct message_d {
+struct message_d {
 	int msg;
 	int wparam;
 	int lparam;
-} message_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(message_d));
 
-typedef struct dropdown_d {
+struct dropdown_d {
 	uint32 disabled_state;
 	uint32 hidden_state;
 	WindowClass parent_wnd_class;
@@ -469,7 +469,7 @@
 	const StringID *items;
 	byte click_delay;
 	bool drag_mode;
-} dropdown_d;
+};
 assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(dropdown_d));
 
 
--- a/src/yapf/yapf.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/yapf/yapf.h	Wed Mar 07 12:11:48 2007 +0000
@@ -88,7 +88,7 @@
  */
 
 /** Base struct for track followers. */
-typedef struct FollowTrack_t
+struct FollowTrack_t
 {
 	const Vehicle*      m_veh;           ///< moving vehicle
 	TileIndex           m_old_tile;      ///< the origin (vehicle moved from) before move
@@ -100,7 +100,7 @@
 	bool                m_is_bridge;     ///< last turn passed bridge ramp
 	bool                m_is_station;    ///< last turn passed station
 	int                 m_tiles_skipped; ///< number of skipped tunnel or station tiles
-} FollowTrack_t;
+};
 
 /** Initializes FollowTrack_t structure */
 void FollowTrackInit(FollowTrack_t *This, const Vehicle* v);
--- a/src/yapf/yapf_settings.h	Wed Mar 07 11:47:46 2007 +0000
+++ b/src/yapf/yapf_settings.h	Wed Mar 07 12:11:48 2007 +0000
@@ -11,17 +11,17 @@
 # ifndef YS_DEF
 /*
  *  if YS_DEF is not defined, we will only do following declaration:
- *  typedef struct YapfSettings {
+ *  struct YapfSettings {
  *    bool   disable_node_optimization;
  *    uint32 max_search_nodes;
  *    .... all other yapf related settings ...
- *  } YapfSettings;
+ *  };
  *
  *  otherwise we will just expand YS_DEF_xx macros and then #undef them
  */
-#  define YS_DEF_BEGIN typedef struct YapfSettings {
+#  define YS_DEF_BEGIN struct YapfSettings {
 #  define YS_DEF(type, name) type name;
-#  define YS_DEF_END } YapfSettings;
+#  define YS_DEF_END };
 
 # endif /* !YS_DEF */