changeset 4171:99326b5a6994 draft

(svn r5609) CodeChange : Apply coding style
author belugas <belugas@openttd.org>
date Wed, 26 Jul 2006 03:33:12 +0000
parents 5ecfd5b27152
children a45f5f08cd11
files aircraft_gui.c airport.c airport.h airport_gui.c aystar.c aystar.h console.c elrail.c engine.c gfx.c gui.h industry_gui.c intro_gui.c main_gui.c misc_gui.c network_gui.c news_gui.c openttd.c order_gui.c player_gui.c rail_gui.c road_gui.c roadveh_gui.c ship_gui.c smallmap_gui.c sound.c subsidy_gui.c town_gui.c train_gui.c viewport.c water_cmd.c window.c window.h
diffstat 33 files changed, 294 insertions(+), 294 deletions(-) [+]
line wrap: on
line diff
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -32,7 +32,7 @@
 void DrawAircraftPurchaseInfo(int x, int y, EngineID engine_number)
 {
 	const AircraftVehicleInfo *avi = AircraftVehInfo(engine_number);
-	const Engine* e = GetEngine(engine_number);
+	const Engine *e = GetEngine(engine_number);
 	CargoID cargo;
 	YearMonthDay ymd;
 	ConvertDayToYMD(&ymd, e->intro_date);
@@ -93,7 +93,7 @@
 void CcBuildAircraft(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
 	if (success) {
-		const Vehicle* v = GetVehicle(_new_vehicle_id);
+		const Vehicle *v = GetVehicle(_new_vehicle_id);
 
 		if (v->tile == _backup_orders_tile) {
 			_backup_orders_tile = 0;
@@ -127,7 +127,7 @@
 			EngineID eid;
 
 			for (eid = AIRCRAFT_ENGINES_INDEX; eid < AIRCRAFT_ENGINES_INDEX + NUM_AIRCRAFT_ENGINES; eid++) {
-				const AircraftVehicleInfo* avi;
+				const AircraftVehicleInfo *avi;
 
 				if (!HASBIT(GetEngine(eid)->player_avail, _local_player)) continue;
 
@@ -150,7 +150,7 @@
 			EngineID eid;
 
 			for (eid = AIRCRAFT_ENGINES_INDEX; eid < AIRCRAFT_ENGINES_INDEX + NUM_AIRCRAFT_ENGINES; eid++) {
-				const AircraftVehicleInfo* avi;
+				const AircraftVehicleInfo *avi;
 
 				if (!HASBIT(GetEngine(eid)->player_avail, _local_player)) continue;
 
@@ -322,7 +322,7 @@
 	AircraftRefitWndProc
 };
 
-static void ShowAircraftRefitWindow(const Vehicle* v)
+static void ShowAircraftRefitWindow(const Vehicle *v)
 {
 	Window *w;
 
@@ -482,7 +482,7 @@
 };
 
 
-static void ShowAircraftDetailsWindow(const Vehicle* v)
+static void ShowAircraftDetailsWindow(const Vehicle *v)
 {
 	Window *w;
 	VehicleID veh = v->index;
@@ -522,7 +522,7 @@
 {
 	switch (e->event) {
 	case WE_PAINT: {
-		const Vehicle* v = GetVehicle(w->window_number);
+		const Vehicle *v = GetVehicle(w->window_number);
 		uint32 disabled = 1 << 8;
 		StringID str;
 
@@ -576,7 +576,7 @@
 	} break;
 
 	case WE_CLICK: {
-		const Vehicle* v = GetVehicle(w->window_number);
+		const Vehicle *v = GetVehicle(w->window_number);
 
 		switch (e->click.widget) {
 		case 5: /* start stop */
@@ -618,7 +618,7 @@
 		break;
 
 	case WE_MOUSELOOP: {
-		const Vehicle* v = GetVehicle(w->window_number);
+		const Vehicle *v = GetVehicle(w->window_number);
 		uint32 h = IsAircraftInHangarStopped(v) ? 1 << 7 : 1 << 11;
 
 		if (h != w->hidden_state) {
@@ -639,9 +639,9 @@
 };
 
 
-void ShowAircraftViewWindow(const Vehicle* v)
+void ShowAircraftViewWindow(const Vehicle *v)
 {
-	Window* w = AllocateWindowDescFront(&_aircraft_view_desc, v->index);
+	Window *w = AllocateWindowDescFront(&_aircraft_view_desc, v->index);
 
 	if (w != NULL) {
 		w->caption_color = v->owner;
@@ -774,7 +774,7 @@
  * @param *v is the original vehicle to clone
  * @param *w is the window of the hangar where the clone is build
  */
-static void HandleCloneVehClick(const Vehicle* v, const Window* w)
+static void HandleCloneVehClick(const Vehicle *v, const Window *w)
 {
 	if (v == NULL || v->type != VEH_Aircraft) return;
 
@@ -785,9 +785,9 @@
 	ResetObjectToPlace();
 }
 
-static void ClonePlaceObj(const Window* w)
+static void ClonePlaceObj(const Window *w)
 {
-	const Vehicle* v = CheckMouseOverVehicle();
+	const Vehicle *v = CheckMouseOverVehicle();
 
 	if (v != NULL) HandleCloneVehClick(v, w);
 }
@@ -841,7 +841,7 @@
 
 	// check if a vehicle in a depot was clicked..
 	case WE_MOUSELOOP: {
-		const Vehicle* v = _place_clicked_vehicle;
+		const Vehicle *v = _place_clicked_vehicle;
 
 		// since OTTD checks all open depot windows, we will make sure that it triggers the one with a clicked clone button
 		if (v != NULL && HASBIT(w->click_state, 8)) {
@@ -943,7 +943,7 @@
 	}
 }
 
-static void DrawSmallOrderList(const Vehicle* v, int x, int y)
+static void DrawSmallOrderList(const Vehicle *v, int x, int y)
 {
 	const Order *order;
 	int sel, i = 0;
@@ -1088,7 +1088,7 @@
 
 		case 7: { /* Matrix to show vehicles */
 			uint32 id_v = (e->click.pt.y - PLY_WND_PRC__OFFSET_TOP_WIDGET) / PLY_WND_PRC__SIZE_OF_ROW_BIG;
-			const Vehicle* v;
+			const Vehicle *v;
 
 			if (id_v >= w->vscroll.cap) return; // click out of bounds
 
--- a/airport.c
+++ b/airport.c
@@ -9,16 +9,16 @@
 #include "variables.h"
 #include "airport_movement.h"
 
-static AirportFTAClass* CountryAirport;
-static AirportFTAClass* CityAirport;
-static AirportFTAClass* Oilrig;
-static AirportFTAClass* Heliport;
-static AirportFTAClass* MetropolitanAirport;
-static AirportFTAClass* InternationalAirport;
-static AirportFTAClass* CommuterAirport;
-static AirportFTAClass* HeliDepot;
-static AirportFTAClass* IntercontinentalAirport;
-static AirportFTAClass* HeliStation;
+static AirportFTAClass *CountryAirport;
+static AirportFTAClass *CityAirport;
+static AirportFTAClass *Oilrig;
+static AirportFTAClass *Heliport;
+static AirportFTAClass *MetropolitanAirport;
+static AirportFTAClass *InternationalAirport;
+static AirportFTAClass *CommuterAirport;
+static AirportFTAClass *HeliDepot;
+static AirportFTAClass *IntercontinentalAirport;
+static AirportFTAClass *HeliStation;
 
 static void AirportFTAClass_Constructor(AirportFTAClass *Airport,
 	const byte *terminals, const byte *helipads,
@@ -201,7 +201,7 @@
 	byte nofterminals, nofhelipads;
 	byte nofterminalgroups = 0;
 	byte nofhelipadgroups = 0;
-	const byte * curr;
+	const byte *curr;
 	int i;
 	nofterminals = nofhelipads = 0;
 
@@ -329,7 +329,7 @@
 
 		// outgoing nodes from the same position, create linked list
 		while (current->position == FA[internalcounter + 1].position) {
-			AirportFTA* newNode = malloc(sizeof(AirportFTA));
+			AirportFTA *newNode = malloc(sizeof(AirportFTA));
 
 			newNode->position = FA[internalcounter + 1].position;
 			newNode->heading  = FA[internalcounter + 1].heading;
@@ -444,7 +444,7 @@
 }
 #endif
 
-const AirportFTAClass* GetAirport(const byte airport_type)
+const AirportFTAClass *GetAirport(const byte airport_type)
 {
 	//FIXME -- AircraftNextAirportPos_and_Order -> Needs something nicer, don't like this code
 	// needs constant change if more airports are added
--- a/airport.h
+++ b/airport.h
@@ -150,7 +150,7 @@
 
 void InitializeAirports(void);
 void UnInitializeAirports(void);
-const AirportFTAClass* GetAirport(const byte airport_type);
+const AirportFTAClass *GetAirport(const byte airport_type);
 const AirportMovingData *GetAirportMovingData(byte airport_type, byte position);
 
 /** Get buildable airport bitmask.
--- a/airport_gui.c
+++ b/airport_gui.c
@@ -146,7 +146,7 @@
 		int sel;
 		int rad = 4; // default catchment radious
 		uint32 avail_airports;
-		const AirportFTAClass* airport;
+		const AirportFTAClass *airport;
 
 		if (WP(w,def_d).close) return;
 
--- a/aystar.c
+++ b/aystar.c
@@ -25,24 +25,24 @@
 
 // This looks in the Hash if a node exists in ClosedList
 //  If so, it returns the PathNode, else NULL
-static PathNode* AyStarMain_ClosedList_IsInList(AyStar* aystar, const AyStarNode* node)
+static PathNode* AyStarMain_ClosedList_IsInList(AyStar *aystar, const AyStarNode *node)
 {
 	return (PathNode*)Hash_Get(&aystar->ClosedListHash, node->tile, node->direction);
 }
 
 // This adds a node to the ClosedList
 //  It makes a copy of the data
-static void AyStarMain_ClosedList_Add(AyStar* aystar, const PathNode* node)
+static void AyStarMain_ClosedList_Add(AyStar *aystar, const PathNode *node)
 {
 	// Add a node to the ClosedList
-	PathNode* new_node = malloc(sizeof(*new_node));
+	PathNode *new_node = malloc(sizeof(*new_node));
 	*new_node = *node;
 	Hash_Set(&aystar->ClosedListHash, node->node.tile, node->node.direction, new_node);
 }
 
 // Checks if a node is in the OpenList
 //   If so, it returns the OpenListNode, else NULL
-static OpenListNode* AyStarMain_OpenList_IsInList(AyStar* aystar, const AyStarNode* node)
+static OpenListNode *AyStarMain_OpenList_IsInList(AyStar *aystar, const AyStarNode *node)
 {
 	return (OpenListNode*)Hash_Get(&aystar->OpenListHash, node->tile, node->direction);
 }
@@ -53,7 +53,7 @@
 static OpenListNode *AyStarMain_OpenList_Pop(AyStar *aystar)
 {
 	// Return the item the Queue returns.. the best next OpenList item.
-	OpenListNode* res = (OpenListNode*)aystar->OpenListQueue.pop(&aystar->OpenListQueue);
+	OpenListNode *res = (OpenListNode*)aystar->OpenListQueue.pop(&aystar->OpenListQueue);
 	if (res != NULL) {
 		Hash_Delete(&aystar->OpenListHash, res->path.node.tile, res->path.node.direction);
 	}
@@ -63,10 +63,10 @@
 
 // Adds a node to the OpenList
 //  It makes a copy of node, and puts the pointer of parent in the struct
-static void AyStarMain_OpenList_Add(AyStar* aystar, PathNode* parent, const AyStarNode* node, int f, int g)
+static void AyStarMain_OpenList_Add(AyStar *aystar, PathNode *parent, const AyStarNode *node, int f, int g)
 {
 	// Add a new Node to the OpenList
-	OpenListNode* new_node = malloc(sizeof(*new_node));
+	OpenListNode *new_node = malloc(sizeof(*new_node));
 	new_node->g = g;
 	new_node->path.parent = parent;
 	new_node->path.node = *node;
@@ -81,7 +81,7 @@
  *  return values:
  *	AYSTAR_DONE : indicates we are done
  */
-int AyStarMain_CheckTile(AyStar* aystar, AyStarNode* current, OpenListNode* parent)
+int AyStarMain_CheckTile(AyStar *aystar, AyStarNode *current, OpenListNode *parent)
 {
 	int new_f, new_g, new_h;
 	PathNode *closedlist_parent;
@@ -147,7 +147,7 @@
  *	AYSTAR_FOUND_END_NODE : indicates we found the end. Path_found now is true, and in path is the path found.
  *	AYSTAR_STILL_BUSY : indicates we have done this tile, did not found the path yet, and have items left to try.
  */
-int AyStarMain_Loop(AyStar* aystar)
+int AyStarMain_Loop(AyStar *aystar)
 {
 	int i, r;
 
@@ -191,7 +191,7 @@
 /*
  * This function frees the memory it allocated
  */
-void AyStarMain_Free(AyStar* aystar)
+void AyStarMain_Free(AyStar *aystar)
 {
 	aystar->OpenListQueue.free(&aystar->OpenListQueue, false);
 	/* 2nd argument above is false, below is true, to free the values only
@@ -207,7 +207,7 @@
  * This function make the memory go back to zero
  *  This function should be called when you are using the same instance again.
  */
-void AyStarMain_Clear(AyStar* aystar)
+void AyStarMain_Clear(AyStar *aystar)
 {
 	// Clean the Queue, but not the elements within. That will be done by
 	// the hash.
@@ -266,7 +266,7 @@
  * clear() automatically when the algorithm finishes
  * g is the cost for starting with this node.
  */
-void AyStarMain_AddStartNode(AyStar* aystar, AyStarNode* start_node, uint g)
+void AyStarMain_AddStartNode(AyStar *aystar, AyStarNode *start_node, uint g)
 {
 #ifdef AYSTAR_DEBUG
 	printf("[AyStar] Starting A* Algorithm from node (%d, %d, %d)\n",
@@ -275,7 +275,7 @@
 	AyStarMain_OpenList_Add(aystar, NULL, start_node, 0, g);
 }
 
-void init_AyStar(AyStar* aystar, Hash_HashProc hash, uint num_buckets)
+void init_AyStar(AyStar *aystar, Hash_HashProc hash, uint num_buckets)
 {
 	// Allocated the Hash for the OpenList and ClosedList
 	init_Hash(&aystar->OpenListHash, hash, num_buckets);
--- a/aystar.h
+++ b/aystar.h
@@ -99,7 +99,7 @@
 typedef void AyStar_FoundEndNode(AyStar *aystar, OpenListNode *current);
 
 // For internal use, see aystar.c
-typedef void AyStar_AddStartNode(AyStar *aystar, AyStarNode* start_node, uint g);
+typedef void AyStar_AddStartNode(AyStar *aystar, AyStarNode *start_node, uint g);
 typedef int AyStar_Main(AyStar *aystar);
 typedef int AyStar_Loop(AyStar *aystar);
 typedef int AyStar_CheckTile(AyStar *aystar, AyStarNode *current, OpenListNode *parent);
@@ -112,11 +112,11 @@
 
 	/* These should point to the application specific routines that do the
 	 * actual work */
-	AyStar_CalculateG* CalculateG;
-	AyStar_CalculateH* CalculateH;
-	AyStar_GetNeighbours* GetNeighbours;
-	AyStar_EndNodeCheck* EndNodeCheck;
-	AyStar_FoundEndNode* FoundEndNode;
+	AyStar_CalculateG *CalculateG;
+	AyStar_CalculateH *CalculateH;
+	AyStar_GetNeighbours *GetNeighbours;
+	AyStar_EndNodeCheck *EndNodeCheck;
+	AyStar_FoundEndNode *FoundEndNode;
 
 	/* These are completely untouched by AyStar, they can be accesed by
 	 * the application specific routines to input and output data.
@@ -144,12 +144,12 @@
 
 	/* These will contain the methods for manipulating the AyStar. Only
 	 * main() should be called externally */
-	AyStar_AddStartNode* addstart;
-	AyStar_Main* main;
-	AyStar_Loop* loop;
-	AyStar_Free* free;
-	AyStar_Clear* clear;
-	AyStar_CheckTile* checktile;
+	AyStar_AddStartNode *addstart;
+	AyStar_Main *main;
+	AyStar_Loop *loop;
+	AyStar_Free *free;
+	AyStar_Clear *clear;
+	AyStar_CheckTile *checktile;
 
 	/* These will contain the open and closed lists */
 
@@ -173,7 +173,7 @@
 /* Initialize an AyStar. You should fill all appropriate fields before
  * callling init_AyStar (see the declaration of AyStar for which fields are
  * internal */
-void init_AyStar(AyStar* aystar, Hash_HashProc hash, uint num_buckets);
+void init_AyStar(AyStar *aystar, Hash_HashProc hash, uint num_buckets);
 
 
 #endif /* AYSTAR_H */
--- a/console.c
+++ b/console.c
@@ -59,11 +59,11 @@
 static inline void IConsoleResetHistoryPos(void) {_iconsole_historypos = ICON_HISTORY_SIZE - 1;}
 
 
-static void IConsoleHistoryAdd(const char* cmd);
+static void IConsoleHistoryAdd(const char *cmd);
 static void IConsoleHistoryNavigate(int direction);
 
 // ** console window ** //
-static void IConsoleWndProc(Window* w, WindowEvent* e)
+static void IConsoleWndProc(Window *w, WindowEvent *e)
 {
 	switch (e->event) {
 		case WE_PAINT: {
@@ -255,7 +255,7 @@
 	IConsoleClearBuffer();
 }
 
-static void IConsoleWriteToLogFile(const char* string)
+static void IConsoleWriteToLogFile(const char *string)
 {
 	if (_iconsole_output_file != NULL) {
 		// if there is an console output file ... also print it there
@@ -331,7 +331,7 @@
  * scroll, etc. Put it to the beginning as it is the latest text
  * @param cmd Text to be entered into the 'history'
  */
-static void IConsoleHistoryAdd(const char* cmd)
+static void IConsoleHistoryAdd(const char *cmd)
 {
 	free(_iconsole_history[ICON_HISTORY_SIZE - 1]);
 
@@ -376,7 +376,7 @@
  * @param color_code the colour of the command. Red in case of errors, etc.
  * @param string the message entered or output on the console (notice, error, etc.)
  */
-void IConsolePrint(uint16 color_code, const char* string)
+void IConsolePrint(uint16 color_code, const char *string)
 {
 #ifdef ENABLE_NETWORK
 	if (_redirect_console_to_client != 0) {
@@ -433,7 +433,7 @@
  * @debug() in debug.c. You need at least a level 2 (developer) for debugging
  * messages to show up
  */
-void IConsoleDebug(const char* string)
+void IConsoleDebug(const char *string)
 {
 	if (_stdlib_developer > 1)
 		IConsolePrintF(_icolour_dbg, "dbg: %s", string);
@@ -444,7 +444,7 @@
  * errors or mishaps, but non-fatal. You need at least a level 1 (developer) for
  * debugging messages to show up
  */
-void IConsoleWarning(const char* string)
+void IConsoleWarning(const char *string)
 {
 	if (_stdlib_developer > 0)
 		IConsolePrintF(_icolour_warn, "WARNING: %s", string);
@@ -454,7 +454,7 @@
  * It is possible to print error information to the console. This can include
  * game errors, or errors in general you would want the user to notice
  */
-void IConsoleError(const char* string)
+void IConsoleError(const char *string)
 {
 	IConsolePrintF(_icolour_err, "ERROR: %s", string);
 }
@@ -693,7 +693,7 @@
  * @param tokencount the number of parameters passed
  * @param *tokens are the parameters given to the original command (0 is the first param)
  */
-static void IConsoleAliasExec(const IConsoleAlias* alias, byte tokencount, char* tokens[ICON_TOKEN_COUNT])
+static void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char *tokens[ICON_TOKEN_COUNT])
 {
 	const char *cmdptr;
 	char *aliases[ICON_MAX_ALIAS_LINES], aliasstream[ICON_MAX_STREAMSIZE];
@@ -859,7 +859,7 @@
  * @param *var the variable in question
  * @param *value the new value
  */
-static void IConsoleVarSetStringvalue(const IConsoleVar* var, const char* value)
+static void IConsoleVarSetStringvalue(const IConsoleVar *var, const char *value)
 {
 	if (var->type != ICONSOLE_VAR_STRING || var->addr == NULL) return;
 
--- a/elrail.c
+++ b/elrail.c
@@ -126,7 +126,7 @@
   * @param tile The tile to analyse
   * @param *tileh the tileh
   */
-static void AdjustTileh(TileIndex tile, Slope* tileh)
+static void AdjustTileh(TileIndex tile, Slope *tileh)
 {
 	if (IsTileType(tile, MP_TUNNELBRIDGE)) {
 		if (IsTunnel(tile)) {
--- a/engine.c
+++ b/engine.c
@@ -240,7 +240,7 @@
 	if (_cur_year >= 130) return;
 
 	for (i = 0; i != lengthof(_engines); i++) {
-		Engine* e = &_engines[i];
+		Engine *e = &_engines[i];
 
 		if (e->flags & ENGINE_INTRODUCING) {
 			if (e->flags & ENGINE_PREVIEWING) {
@@ -489,7 +489,7 @@
  * engine type from the given renewlist */
 static EngineRenew *GetEngineReplacement(EngineRenewList erl, EngineID engine)
 {
-	EngineRenew* er = (EngineRenew*)erl; /* Fetch first element */
+	EngineRenew *er = (EngineRenew*)erl; /* Fetch first element */
 	while (er) {
 		if (er->from == engine) return er;
 		er = er->next;
@@ -497,9 +497,9 @@
 	return NULL;
 }
 
-void RemoveAllEngineReplacement(EngineRenewList* erl)
+void RemoveAllEngineReplacement(EngineRenewList *erl)
 {
-	EngineRenew* er = (EngineRenew*)(*erl); /* Fetch first element */
+	EngineRenew *er = (EngineRenew*)(*erl); /* Fetch first element */
 	while (er) {
 		er->from = INVALID_ENGINE; /* "Deallocate" all elements */
 		er = er->next;
@@ -513,7 +513,7 @@
 	return er == NULL ? INVALID_ENGINE : er->to;
 }
 
-int32 AddEngineReplacement(EngineRenewList* erl, EngineID old_engine, EngineID new_engine, uint32 flags)
+int32 AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, EngineID new_engine, uint32 flags)
 {
 	EngineRenew *er;
 
@@ -538,10 +538,10 @@
 	return 0;
 }
 
-int32 RemoveEngineReplacement(EngineRenewList* erl, EngineID engine, uint32 flags)
+int32 RemoveEngineReplacement(EngineRenewList *erl, EngineID engine, uint32 flags)
 {
-	EngineRenew* er = (EngineRenew*)(*erl); /* Start at the first element */
-	EngineRenew* prev = NULL;
+	EngineRenew *er = (EngineRenew*)(*erl); /* Start at the first element */
+	EngineRenew *prev = NULL;
 
 	while (er)
 	{
--- a/gfx.c
+++ b/gfx.c
@@ -677,8 +677,8 @@
 
 typedef struct BlitterParams {
 	int start_x, start_y;
-	const byte* sprite;
-	const byte* sprite_org;
+	const byte *sprite;
+	const byte *sprite_org;
 	Pixel *dst;
 	int mode;
 	int width, height;
@@ -690,12 +690,12 @@
 
 static void GfxBlitTileZoomIn(BlitterParams *bp)
 {
-	const byte* src_o = bp->sprite;
-	const byte* src;
+	const byte *src_o = bp->sprite;
+	const byte *src;
 	int num, skip;
 	byte done;
 	Pixel *dst;
-	const byte* ctab;
+	const byte *ctab;
 
 	if (bp->mode & 1) {
 		src_o += ReadLE16Aligned(src_o + bp->start_y * 2);
@@ -892,12 +892,12 @@
 
 static void GfxBlitTileZoomMedium(BlitterParams *bp)
 {
-	const byte* src_o = bp->sprite;
-	const byte* src;
+	const byte *src_o = bp->sprite;
+	const byte *src;
 	int num, skip;
 	byte done;
 	Pixel *dst;
-	const byte* ctab;
+	const byte *ctab;
 
 	if (bp->mode & 1) {
 		src_o += ReadLE16Aligned(src_o + bp->start_y * 2);
@@ -1097,12 +1097,12 @@
 
 static void GfxBlitTileZoomOut(BlitterParams *bp)
 {
-	const byte* src_o = bp->sprite;
-	const byte* src;
+	const byte *src_o = bp->sprite;
+	const byte *src;
 	int num, skip;
 	byte done;
 	Pixel *dst;
-	const byte* ctab;
+	const byte *ctab;
 
 	if (bp->mode & 1) {
 		src_o += ReadLE16Aligned(src_o + bp->start_y * 2);
@@ -1313,7 +1313,7 @@
 
 static void GfxBlitZoomOutUncomp(BlitterParams *bp)
 {
-	const byte* src = bp->sprite;
+	const byte *src = bp->sprite;
 	Pixel *dst = bp->dst;
 	int height = bp->height;
 	int width = bp->width;
@@ -1361,9 +1361,9 @@
 
 typedef void (*BlitZoomFunc)(BlitterParams *bp);
 
-static void GfxMainBlitter(const Sprite* sprite, int x, int y, int mode)
+static void GfxMainBlitter(const Sprite *sprite, int x, int y, int mode)
 {
-	const DrawPixelInfo* dpi = _cur_dpi;
+	const DrawPixelInfo *dpi = _cur_dpi;
 	int start_x, start_y;
 	byte info;
 	BlitterParams bp;
@@ -1496,8 +1496,8 @@
 
 void DoPaletteAnimations(void)
 {
-	const Colour* s;
-	Colour* d;
+	const Colour *s;
+	Colour *d;
 	/* Amount of colors to be rotated.
 	 * A few more for the DOS palette, because the water colors are
 	 * 245-254 for DOS and 217-226 for Windows.  */
@@ -1712,7 +1712,7 @@
 static void DbgScreenRect(int left, int top, int right, int bottom)
 {
 	DrawPixelInfo dp;
-	DrawPixelInfo* old;
+	DrawPixelInfo *old;
 
 	old = _cur_dpi;
 	_cur_dpi = &dp;
@@ -1864,7 +1864,7 @@
 	SetDirtyBlocks(0, 0, _screen.width, _screen.height);
 }
 
-bool FillDrawPixelInfo(DrawPixelInfo* n, const DrawPixelInfo* o, int left, int top, int width, int height)
+bool FillDrawPixelInfo(DrawPixelInfo *n, const DrawPixelInfo *o, int left, int top, int width, int height)
 {
 	int t;
 
--- a/gui.h
+++ b/gui.h
@@ -41,9 +41,9 @@
 /* train_gui.c */
 void ShowPlayerTrains(PlayerID player, StationID station);
 void ShowTrainViewWindow(const Vehicle *v);
-void ShowOrdersWindow(const Vehicle* v);
+void ShowOrdersWindow(const Vehicle *v);
 
-void ShowRoadVehViewWindow(const Vehicle* v);
+void ShowRoadVehViewWindow(const Vehicle *v);
 
 /* road_gui.c */
 void ShowBuildRoadToolbar(void);
@@ -54,7 +54,7 @@
 void ShowBuildDocksToolbar(void);
 void ShowPlayerShips(PlayerID player, StationID station);
 
-void ShowShipViewWindow(const Vehicle* v);
+void ShowShipViewWindow(const Vehicle *v);
 
 /* aircraft_gui.c */
 void ShowBuildAirToolbar(void);
@@ -93,7 +93,7 @@
 void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y);
 
 void DrawStationCoverageAreaText(int sx, int sy, uint mask,int rad);
-void CheckRedrawStationCoverage(const Window* w);
+void CheckRedrawStationCoverage(const Window *w);
 
 void ShowSmallMap(void);
 void ShowExtraViewPortWindow(void);
@@ -134,7 +134,7 @@
 	ZOOM_NONE = 2, // hack, used to update the button status
 };
 
-bool DoZoomInOutWindow(int how, Window * w);
+bool DoZoomInOutWindow(int how, Window *w);
 void ShowBuildIndustryWindow(void);
 void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, WindowClass window_class, WindowNumber window_number);
 void ShowMusicWindow(void);
--- a/industry_gui.c
+++ b/industry_gui.c
@@ -279,7 +279,7 @@
 
 	switch (e->event) {
 	case WE_PAINT: {
-		const Industry* i = GetIndustry(w->window_number);
+		const Industry *i = GetIndustry(w->window_number);
 
 		SetDParam(0, w->window_number);
 		DrawWindowWidgets(w);
@@ -433,7 +433,7 @@
 
 void ShowIndustryViewWindow(int industry)
 {
-	Window* w = AllocateWindowDescFront(&_industry_view_desc, industry);
+	Window *w = AllocateWindowDescFront(&_industry_view_desc, industry);
 
 	if (w != NULL) {
 		w->flags4 |= WF_DISABLE_VP_SCROLL;
@@ -571,7 +571,7 @@
 		n = 0;
 
 		while (p < _num_industry_sort) {
-			const Industry* i = GetIndustry(_industry_sort[p]);
+			const Industry *i = GetIndustry(_industry_sort[p]);
 
 			SetDParam(0, i->index);
 			if (i->produced_cargo[0] != CT_INVALID) {
@@ -658,7 +658,7 @@
 
 void ShowIndustryDirectory(void)
 {
-	Window* w = AllocateWindowDescFront(&_industry_directory_desc, 0);
+	Window *w = AllocateWindowDescFront(&_industry_directory_desc, 0);
 
 	if (w != NULL) {
 		w->vscroll.cap = 16;
--- a/intro_gui.c
+++ b/intro_gui.c
@@ -156,7 +156,7 @@
 {  WIDGETS_END },
 };
 
-static void AskAbandonGameWndProc(Window* w, WindowEvent* e)
+static void AskAbandonGameWndProc(Window *w, WindowEvent *e)
 {
 	switch (e->event) {
 	case WE_PAINT:
@@ -220,7 +220,7 @@
 {  WIDGETS_END },
 };
 
-static void AskQuitGameWndProc(Window* w, WindowEvent* e)
+static void AskQuitGameWndProc(Window *w, WindowEvent *e)
 {
 	switch (e->event) {
 		case WE_PAINT:
--- a/main_gui.c
+++ b/main_gui.c
@@ -537,7 +537,7 @@
 static int GetPlayerIndexFromMenu(int index)
 {
 	if (index >= 0) {
-		const Player* p;
+		const Player *p;
 
 		FOR_ALL_PLAYERS(p) {
 			if (p->is_active && --index < 0) return p->index;
@@ -549,7 +549,7 @@
 static void UpdatePlayerMenuHeight(Window *w)
 {
 	uint num = 0;
-	const Player* p;
+	const Player *p;
 
 	FOR_ALL_PLAYERS(p) {
 		if (p->is_active) num++;
@@ -786,7 +786,7 @@
 
 static void ToolbarTrainClick(Window *w)
 {
-	const Vehicle* v;
+	const Vehicle *v;
 	int dis = -1;
 
 	FOR_ALL_VEHICLES(v) {
@@ -797,7 +797,7 @@
 
 static void ToolbarRoadClick(Window *w)
 {
-	const Vehicle* v;
+	const Vehicle *v;
 	int dis = -1;
 
 	FOR_ALL_VEHICLES(v) {
@@ -808,7 +808,7 @@
 
 static void ToolbarShipClick(Window *w)
 {
-	const Vehicle* v;
+	const Vehicle *v;
 	int dis = -1;
 
 	FOR_ALL_VEHICLES(v) {
@@ -819,7 +819,7 @@
 
 static void ToolbarAirClick(Window *w)
 {
-	const Vehicle* v;
+	const Vehicle *v;
 	int dis = -1;
 
 	FOR_ALL_VEHICLES(v) {
@@ -869,7 +869,7 @@
 
 	// routine to disable/enable the zoom buttons. Didn't know where to place these otherwise
 	{
-		Window* wt = NULL;
+		Window *wt = NULL;
 
 		switch (w->window_class) {
 			case WC_MAIN_WINDOW:
@@ -920,7 +920,7 @@
 
 static void ToolbarBuildRailClick(Window *w)
 {
-	const Player* p = GetPlayer(_local_player);
+	const Player *p = GetPlayer(_local_player);
 	Window *w2;
 	w2 = PopupMainToolbMenu(w, 457, 19, STR_1015_RAILROAD_CONSTRUCTION, RAILTYPE_END, ~p->avail_railtypes);
 	WP(w2,menu_d).sel_index = _last_built_railtype;
@@ -1032,7 +1032,7 @@
 
 void ZoomInOrOutToCursorWindow(bool in, Window *w)
 {
-	ViewPort * vp;
+	ViewPort *vp;
 	Point pt;
 
 	assert(w != 0);
@@ -1629,7 +1629,7 @@
 
 static bool AnyTownExists(void)
 {
-	const Town* t;
+	const Town *t;
 
 	FOR_ALL_TOWNS(t) {
 		if (t->xy != 0) return true;
@@ -1809,7 +1809,7 @@
 
 typedef void ToolbarButtonProc(Window *w);
 
-static ToolbarButtonProc* const _toolbar_button_procs[] = {
+static ToolbarButtonProc * const _toolbar_button_procs[] = {
 	ToolbarPauseClick,
 	ToolbarFastForwardClick,
 	ToolbarOptionsClick,
@@ -2016,7 +2016,7 @@
 {WIDGETS_END},
 };
 
-static ToolbarButtonProc* const _scen_toolbar_button_procs[] = {
+static ToolbarButtonProc * const _scen_toolbar_button_procs[] = {
 	ToolbarPauseClick,
 	ToolbarFastForwardClick,
 	ToolbarOptionsClick,
@@ -2274,7 +2274,7 @@
 
 extern void UpdateAllStationVirtCoord(void);
 
-static void MainWindowWndProc(Window* w, WindowEvent* e)
+static void MainWindowWndProc(Window *w, WindowEvent *e)
 {
 	int off_x;
 
@@ -2392,7 +2392,7 @@
 	int width,height;
 
 	for (i = 0; i != 16; i++) {
-		const byte* b = GetNonSprite(PALETTE_RECOLOR_START + i);
+		const byte *b = GetNonSprite(PALETTE_RECOLOR_START + i);
 
 		assert(b);
 		_color_list[i] = *(const ColorList*)(b + 0xC6);
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -43,7 +43,7 @@
 static void LandInfoWndProc(Window *w, WindowEvent *e)
 {
 	if (e->event == WE_PAINT) {
-		const LandInfoData* lid;
+		const LandInfoData *lid;
 		StringID str;
 		int i;
 
@@ -488,7 +488,7 @@
 					_errmsg_message_1,
 					238);
 		} else {
-			const Player* p = GetPlayer(GetDParamX(_errmsg_decode_params,2));
+			const Player *p = GetPlayer(GetDParamX(_errmsg_decode_params,2));
 			DrawPlayerFace(p->face, p->player_color, 2, 16);
 
 			DrawStringMultiCenter(
@@ -718,7 +718,7 @@
 	}
 }
 
-void CheckRedrawStationCoverage(const Window* w)
+void CheckRedrawStationCoverage(const Window *w)
 {
 	if (_thd.dirty & 1) {
 		_thd.dirty &= ~1;
@@ -1197,9 +1197,9 @@
 	uint s_amount;
 	int i;
 
-	/*	Directories are always above the files (FIOS_TYPE_DIR)
-	 *	Drives (A:\ (windows only) are always under the files (FIOS_TYPE_DRIVE)
-	 *	Only sort savegames/scenarios, not directories
+	/* Directories are always above the files (FIOS_TYPE_DIR)
+	 * Drives (A:\ (windows only) are always under the files (FIOS_TYPE_DRIVE)
+	 * Only sort savegames/scenarios, not directories
 	 */
 	for (i = 0; i < _fios_num; i++) {
 		switch (_fios_list[i].type) {
@@ -1218,7 +1218,7 @@
 {
 	/* Check if we are not a specatator who wants to generate a name..
 	    Let's use the name of player #0 for now. */
-	const Player* p = GetPlayer(_local_player < MAX_PLAYERS ? _local_player : 0);
+	const Player *p = GetPlayer(_local_player < MAX_PLAYERS ? _local_player : 0);
 
 	SetDParam(0, p->name_1);
 	SetDParam(1, p->name_2);
@@ -1274,7 +1274,7 @@
 
 		y = w->widget[7].top + 1;
 		for (pos = w->vscroll.pos; pos < _fios_num; pos++) {
-			const FiosItem* item = _fios_list + pos;
+			const FiosItem *item = _fios_list + pos;
 
 			DoDrawStringTruncated(item->title, 4, y, _fios_colors[item->type], w->width - 18);
 			y += 10;
@@ -1503,7 +1503,7 @@
 {   WIDGETS_END},
 };
 
-static void SelectScenarioWndProc(Window* w, WindowEvent* e)
+static void SelectScenarioWndProc(Window *w, WindowEvent *e)
 {
 	const int list_start = 45;
 
@@ -1560,7 +1560,7 @@
 				GenRandomNewGame(Random(), InteractiveRandom());
 			} else {
 				int y = (e->click.pt.y - list_start) / 10;
-				const char* name;
+				const char *name;
 				const FiosItem *file;
 
 				if (y < 0 || (y += w->vscroll.pos) >= w->vscroll.count) return;
--- a/network_gui.c
+++ b/network_gui.c
@@ -100,7 +100,7 @@
 // called when a new server is found on the network
 void UpdateNetworkGameWindow(bool unselect)
 {
-	Window* w = FindWindowById(WC_NETWORK_WINDOW, 0);
+	Window  *w = FindWindowById(WC_NETWORK_WINDOW, 0);
 
 	if (w != NULL) {
 		if (unselect) WP(w, network_ql_d).n.server = NULL;
@@ -183,7 +183,7 @@
 
 static void SortNetworkGameList(network_ql_d *nqld)
 {
-	static NGameNameSortFunction* const ngame_sorter[] = {
+	static NGameNameSortFunction * const ngame_sorter[] = {
 		&NGameNameSorter,
 		&NGameClientSorter,
 		&NGameAllowedSorter
@@ -564,7 +564,7 @@
 
 	w = AllocateWindowDesc(&_network_game_window_desc);
 	if (w != NULL) {
-		querystr_d* querystr = &WP(w, network_ql_d).q;
+		querystr_d *querystr = &WP(w, network_ql_d).q;
 
 		ttd_strlcpy(_edit_str_buf, _network_player_name, lengthof(_edit_str_buf));
 		w->vscroll.cap = 12;
@@ -1052,9 +1052,9 @@
 };
 
 // Finds the Xth client-info that is active
-static const NetworkClientInfo* NetworkFindClientInfo(byte client_no)
+static const NetworkClientInfo *NetworkFindClientInfo(byte client_no)
 {
-	const NetworkClientInfo* ci;
+	const NetworkClientInfo *ci;
 
 	for (ci = _network_client_info; ci != &_network_client_info[MAX_CLIENT_INFO]; ci++) {
 		// Skip non-active items
@@ -1174,7 +1174,7 @@
 static Window *PopupClientList(Window *w, int client_no, int x, int y)
 {
 	int i, h;
-	const NetworkClientInfo* ci;
+	const NetworkClientInfo *ci;
 	DeleteWindowById(WC_TOOLBAR_MENU, 0);
 
 	// Clean the current actions
@@ -1476,7 +1476,7 @@
 static byte _chat_dest;
 
 
-static void SendChat(const char* buf)
+static void SendChat(const char *buf)
 {
 	if (buf[0] == '\0') return;
 	if (!_network_server) {
--- a/news_gui.c
+++ b/news_gui.c
@@ -459,7 +459,7 @@
 
 		switch (GetNewsDisplayValue(ni->type)) {
 		case 0: { /* Off - show nothing only a small reminder in the status bar */
-			Window* w = FindWindowById(WC_STATUS_BAR, 0);
+			Window *w = FindWindowById(WC_STATUS_BAR, 0);
 
 			if (w != NULL) {
 				WP(w, def_d).data_2 = 91;
@@ -866,7 +866,7 @@
 		if (ni->flags & NF_VEHICLE &&
 				ni->data_a == vid &&
 				(news == INVALID_STRING_ID || ni->string_id == news)) {
-			Window* w;
+			Window *w;
 			byte i;
 
 			if (_forced_news  == n) MoveToNexItem();
--- a/openttd.c
+++ b/openttd.c
@@ -68,7 +68,7 @@
  * caused by the user, i.e. missing files or fatal configuration errors.
  * Post-0.4.0 since Celestar doesn't want this in SVN before. --pasky */
 
-void CDECL error(const char* s, ...)
+void CDECL error(const char *s, ...)
 {
 	va_list va;
 	char buf[512];
@@ -230,7 +230,7 @@
 }
 
 
-static void ParseResolution(int res[2], const char* s)
+static void ParseResolution(int res[2], const char *s)
 {
 	char *t = strchr(s, 'x');
 	if (t == NULL) {
@@ -310,7 +310,7 @@
 extern void DedicatedFork(void);
 #endif
 
-int ttd_main(int argc, char* argv[])
+int ttd_main(int argc, char *argv[])
 {
 	MyGetOptData mgo;
 	int i;
@@ -1001,7 +1001,7 @@
 
 void BeforeSaveGame(void)
 {
-	const Window* w = FindWindowById(WC_MAIN_WINDOW, 0);
+	const Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
 
 	if (w != NULL) {
 		_saved_scrollpos_x = WP(w, const vp_d).scrollpos_x;
@@ -1034,7 +1034,7 @@
 // before savegame version 4, the name of the company determined if it existed
 static void CheckIsPlayerActive(void)
 {
-	Player* p;
+	Player *p;
 
 	FOR_ALL_PLAYERS(p) {
 		if (p->name_1 != 0) p->is_active = true;
@@ -1044,7 +1044,7 @@
 // since savegame version 4.1, exclusive transport rights are stored at towns
 static void UpdateExclusiveRights(void)
 {
-	Town* t;
+	Town *t;
 
 	FOR_ALL_TOWNS(t) {
 		if (t->xy != 0) t->exclusivity = (byte)-1;
@@ -1264,13 +1264,13 @@
 
 	/* Elrails got added in rev 24 */
 	if (CheckSavegameVersion(24)) {
-		Vehicle* v;
+		Vehicle *v;
 		uint i;
 		TileIndex t;
 		RailType min_rail = RAILTYPE_ELECTRIC;
 
 		for (i = 0; i < lengthof(_engines); i++) {
-			Engine* e = GetEngine(i);
+			Engine *e = GetEngine(i);
 			if (e->type == VEH_Train &&
 					(e->railtype != RAILTYPE_RAIL || RailVehInfo(i)->engclass == 2)) {
 				e->railtype++;
--- a/order_gui.c
+++ b/order_gui.c
@@ -22,9 +22,9 @@
 #include "train.h"
 #include "water_map.h"
 
-static int OrderGetSel(const Window* w)
+static int OrderGetSel(const Window *w)
 {
-	const Vehicle* v = GetVehicle(w->window_number);
+	const Vehicle *v = GetVehicle(w->window_number);
 	int num = WP(w,order_d).sel;
 
 	return (num >= 0 && num < v->num_orders) ? num : v->num_orders;
@@ -94,27 +94,27 @@
 				break;
 
 			case OT_GOTO_DEPOT:
-				SETBIT(w->disabled_state, 9);	/* unload */
+				SETBIT(w->disabled_state, 9);  /* unload */
 				SETBIT(w->disabled_state, 10); /* transfer */
 				SetDParam(2,STR_SERVICE);
 				break;
 
 			case OT_GOTO_WAYPOINT:
-				SETBIT(w->disabled_state, 8); /* full load */
-				SETBIT(w->disabled_state, 9); /* unload */
+				SETBIT(w->disabled_state, 8);  /* full load */
+				SETBIT(w->disabled_state, 9);  /* unload */
 				SETBIT(w->disabled_state, 10); /* transfer */
 				break;
 
 			default:
-				SETBIT(w->disabled_state, 6); /* nonstop */
-				SETBIT(w->disabled_state, 8);	/* full load */
-				SETBIT(w->disabled_state, 9);	/* unload */
+				SETBIT(w->disabled_state, 6);  /* nonstop */
+				SETBIT(w->disabled_state, 8);  /* full load */
+				SETBIT(w->disabled_state, 9);  /* unload */
 		}
 	} else {
-		SETBIT(w->disabled_state, 6); /* nonstop */
-		SETBIT(w->disabled_state, 8);	/* full load */
-		SETBIT(w->disabled_state, 9);	/* unload */
-		SETBIT(w->disabled_state, 10); /* transfer */
+		SETBIT(w->disabled_state, 6);          /* nonstop */
+		SETBIT(w->disabled_state, 8);          /* full load */
+		SETBIT(w->disabled_state, 9);          /* unload */
+		SETBIT(w->disabled_state, 10);         /* transfer */
 	}
 
 	SetDParam(0, v->string_id);
@@ -259,7 +259,7 @@
 
 	if (IsTileType(tile, MP_STATION)) {
 		StationID st_index = GetStationIndex(tile);
-		const Station* st = GetStation(st_index);
+		const Station *st = GetStation(st_index);
 
 		if (st->owner == _current_player || st->owner == OWNER_NONE) {
 			byte facil;
@@ -284,7 +284,7 @@
 	return order;
 }
 
-static bool HandleOrderVehClick(const Vehicle* v, const Vehicle* u, Window* w)
+static bool HandleOrderVehClick(const Vehicle *v, const Vehicle *u, Window *w)
 {
 	if (u->type != v->type) return false;
 
@@ -306,10 +306,10 @@
 	return true;
 }
 
-static void OrdersPlaceObj(const Vehicle* v, TileIndex tile, Window* w)
+static void OrdersPlaceObj(const Vehicle *v, TileIndex tile, Window *w)
 {
 	Order cmd;
-	const Vehicle* u;
+	const Vehicle *u;
 
 	// check if we're clicking on a vehicle first.. clone orders in that case.
 	u = CheckMouseOverVehicle();
@@ -324,7 +324,7 @@
 	}
 }
 
-static void OrderClick_Goto(Window* w, const Vehicle* v)
+static void OrderClick_Goto(Window *w, const Vehicle *v)
 {
 	InvalidateWidget(w, 7);
 	TOGGLEBIT(w->click_state, 7);
@@ -336,17 +336,17 @@
 	}
 }
 
-static void OrderClick_FullLoad(Window* w, const Vehicle* v)
+static void OrderClick_FullLoad(Window *w, const Vehicle *v)
 {
 	DoCommandP(v->tile, v->index + (OrderGetSel(w) << 16), OFB_FULL_LOAD, NULL, CMD_MODIFY_ORDER | CMD_MSG(STR_8835_CAN_T_MODIFY_THIS_ORDER));
 }
 
-static void OrderClick_Unload(Window* w, const Vehicle* v)
+static void OrderClick_Unload(Window *w, const Vehicle *v)
 {
 	DoCommandP(v->tile, v->index + (OrderGetSel(w) << 16), OFB_UNLOAD,    NULL, CMD_MODIFY_ORDER | CMD_MSG(STR_8835_CAN_T_MODIFY_THIS_ORDER));
 }
 
-static void OrderClick_Nonstop(Window* w, const Vehicle* v)
+static void OrderClick_Nonstop(Window *w, const Vehicle *v)
 {
 	DoCommandP(v->tile, v->index + (OrderGetSel(w) << 16), OFB_NON_STOP,  NULL, CMD_MODIFY_ORDER | CMD_MSG(STR_8835_CAN_T_MODIFY_THIS_ORDER));
 }
@@ -356,19 +356,19 @@
 	DoCommandP(v->tile, v->index + (OrderGetSel(w) <<  16), OFB_TRANSFER, NULL, CMD_MODIFY_ORDER | CMD_MSG(STR_8835_CAN_T_MODIFY_THIS_ORDER));
 }
 
-static void OrderClick_Skip(Window* w, const Vehicle* v)
+static void OrderClick_Skip(Window *w, const Vehicle *v)
 {
 	DoCommandP(v->tile, v->index, 0, NULL, CMD_SKIP_ORDER);
 }
 
-static void OrderClick_Delete(Window* w, const Vehicle* v)
+static void OrderClick_Delete(Window *w, const Vehicle *v)
 {
 	DoCommandP(v->tile, v->index, OrderGetSel(w), NULL, CMD_DELETE_ORDER | CMD_MSG(STR_8834_CAN_T_DELETE_THIS_ORDER));
 }
 
-typedef void OnButtonClick(Window* w, const Vehicle* v);
+typedef void OnButtonVehClick(Window *w, const Vehicle *v);
 
-static OnButtonClick* const _order_button_proc[] = {
+static OnButtonVehClick* const _order_button_proc[] = {
 	OrderClick_Skip,
 	OrderClick_Delete,
 	OrderClick_Nonstop,
@@ -469,7 +469,7 @@
 	}
 
 	case WE_RCLICK: {
-		const Vehicle* v = GetVehicle(w->window_number);
+		const Vehicle *v = GetVehicle(w->window_number);
 		int s = OrderGetSel(w);
 
 		if (e->click.widget != 8) break;
@@ -491,7 +491,7 @@
 
 	// check if a vehicle in a depot was clicked..
 	case WE_MOUSELOOP: {
-		const Vehicle* v = _place_clicked_vehicle;
+		const Vehicle *v = _place_clicked_vehicle;
 		/*
 		 * Check if we clicked on a vehicle
 		 * and if the GOTO button of this window is pressed
@@ -587,7 +587,7 @@
 	OrdersWndProc
 };
 
-void ShowOrdersWindow(const Vehicle* v)
+void ShowOrdersWindow(const Vehicle *v)
 {
 	Window *w;
 	VehicleID veh = v->index;
--- a/player_gui.c
+++ b/player_gui.c
@@ -151,7 +151,7 @@
 	switch (e->event) {
 	case WE_PAINT: {
 		PlayerID player = w->window_number;
-		const Player* p = GetPlayer(player);
+		const Player *p = GetPlayer(player);
 
 		w->disabled_state = p->current_loan != 0 ? 0 : (1 << 7);
 
@@ -248,7 +248,7 @@
 {
 	switch (e->event) {
 	case WE_PAINT: {
-		const Player* p;
+		const Player *p;
 		uint used_colors = 0;
 		int num_free = 16;
 		int x,y,pos;
@@ -421,7 +421,7 @@
 {
 	const int x = 110;
 	int y = 72;
-	const Vehicle* v;
+	const Vehicle *v;
 	uint train = 0;
 	uint road  = 0;
 	uint air   = 0;
@@ -479,7 +479,7 @@
 
 static void DrawCompanyOwnerText(const Player *p)
 {
-	const Player* p2;
+	const Player *p2;
 	int num = -1;
 
 	FOR_ALL_PLAYERS(p2) {
@@ -502,7 +502,7 @@
 {
 	switch (e->event) {
 	case WE_PAINT: {
-		const Player* p = GetPlayer(w->window_number);
+		const Player *p = GetPlayer(w->window_number);
 		uint32 dis = 0;
 
 		if (!IsWindowOfPrototype(w, _other_player_company_widgets)) {
@@ -577,7 +577,7 @@
 		} break;
 
 		case 5: {/* change president name */
-			const Player* p = GetPlayer(w->window_number);
+			const Player *p = GetPlayer(w->window_number);
 			WP(w, def_d).byte_1 = 0;
 			SetDParam(0, p->president_name_2);
 			ShowQueryString(p->president_name_1, STR_700B_PRESIDENT_S_NAME, 31, 94, w->window_class, w->window_number);
@@ -686,7 +686,7 @@
 
 void ShowPlayerCompany(PlayerID player)
 {
-	Window* w;
+	Window *w;
 
 	w = AllocateWindowDescFront(player == _local_player ? &_my_player_company_desc : &_other_player_company_desc, player);
 	if (w != NULL) w->caption_color = w->window_number;
--- a/rail_gui.c
+++ b/rail_gui.c
@@ -555,7 +555,7 @@
  * @param railtype the railtype to display
  * @param w the window to modify
  */
-static void SetupRailToolbar(RailType railtype, Window* w)
+static void SetupRailToolbar(RailType railtype, Window *w)
 {
 	const RailtypeInfo *rti = GetRailTypeInfo(railtype);
 
--- a/road_gui.c
+++ b/road_gui.c
@@ -179,7 +179,7 @@
 	BuildRoadClick_Landscaping,
 };
 
-static void BuildRoadToolbWndProc(Window* w, WindowEvent* e)
+static void BuildRoadToolbWndProc(Window *w, WindowEvent *e)
 {
 	switch (e->event) {
 	case WE_PAINT:
@@ -346,7 +346,7 @@
 	AllocateWindowDescFront(&_build_road_scen_desc, 0);
 }
 
-static void BuildRoadDepotWndProc(Window* w, WindowEvent* e)
+static void BuildRoadDepotWndProc(Window *w, WindowEvent *e)
 {
 	switch (e->event) {
 	case WE_PAINT:
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -29,7 +29,7 @@
 void DrawRoadVehPurchaseInfo(int x, int y, EngineID engine_number)
 {
 	const RoadVehicleInfo *rvi = RoadVehInfo(engine_number);
-	const Engine* e = GetEngine(engine_number);
+	const Engine *e = GetEngine(engine_number);
 	bool refittable = (_engine_info[engine_number].refit_mask != 0);
 	YearMonthDay ymd;
 	ConvertDayToYMD(&ymd, e->intro_date);
@@ -286,7 +286,7 @@
 	RoadVehDetailsWndProc
 };
 
-static void ShowRoadVehDetailsWindow(const Vehicle* v)
+static void ShowRoadVehDetailsWindow(const Vehicle *v)
 {
 	Window *w;
 	VehicleID veh = v->index;
@@ -365,7 +365,7 @@
 	} break;
 
 	case WE_CLICK: {
-		const Vehicle* v = GetVehicle(w->window_number);
+		const Vehicle *v = GetVehicle(w->window_number);
 
 		switch (e->click.widget) {
 		case 5: /* start stop */
@@ -410,7 +410,7 @@
 
 	case WE_MOUSELOOP:
 		{
-			const Vehicle* v = GetVehicle(w->window_number);
+			const Vehicle *v = GetVehicle(w->window_number);
 			uint32 h = IsRoadVehInDepotStopped(v) ? 1 << 7 | 1 << 8 : 1 << 11 | 1 << 12;
 
 			if (h != w->hidden_state) {
@@ -448,9 +448,9 @@
 	RoadVehViewWndProc,
 };
 
-void ShowRoadVehViewWindow(const Vehicle* v)
+void ShowRoadVehViewWindow(const Vehicle *v)
 {
-	Window* w = AllocateWindowDescFront(&_roadveh_view_desc, v->index);
+	Window *w = AllocateWindowDescFront(&_roadveh_view_desc, v->index);
 
 	if (w != NULL) {
 		w->caption_color = v->owner;
@@ -468,7 +468,7 @@
 	{
 		int count = 0;
 		int num = NUM_ROAD_ENGINES;
-		const Engine* e = GetEngine(ROAD_ENGINES_INDEX);
+		const Engine *e = GetEngine(ROAD_ENGINES_INDEX);
 
 		do {
 			if (HASBIT(e->player_avail, _local_player))
@@ -481,7 +481,7 @@
 
 	{
 		int num = NUM_ROAD_ENGINES;
-		const Engine* e = GetEngine(ROAD_ENGINES_INDEX);
+		const Engine *e = GetEngine(ROAD_ENGINES_INDEX);
 		int x = 1;
 		int y = 15;
 		int sel = WP(w,buildtrain_d).sel_index;
@@ -510,7 +510,7 @@
 
 void CcBuildRoadVeh(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
-	const Vehicle* v;
+	const Vehicle *v;
 
 	if (!success) return;
 
@@ -735,7 +735,7 @@
  * @param *v is the original vehicle to clone
  * @param *w is the window of the depot where the clone is build
  */
-static void HandleCloneVehClick(const Vehicle* v, const Window* w)
+static void HandleCloneVehClick(const Vehicle *v, const Window *w)
 {
 	if (v == NULL || v->type != VEH_Road) return;
 
@@ -746,9 +746,9 @@
 	ResetObjectToPlace();
 }
 
-static void ClonePlaceObj(const Window* w)
+static void ClonePlaceObj(const Window *w)
 {
-	const Vehicle* v = CheckMouseOverVehicle();
+	const Vehicle *v = CheckMouseOverVehicle();
 
 	if (v != NULL) HandleCloneVehClick(v, w);
 }
@@ -801,7 +801,7 @@
 
 	// check if a vehicle in a depot was clicked..
 	case WE_MOUSELOOP: {
-		const Vehicle* v = _place_clicked_vehicle;
+		const Vehicle *v = _place_clicked_vehicle;
 
 		// since OTTD checks all open depot windows, we will make sure that it triggers the one with a clicked clone button
 		if (v != NULL && HASBIT(w->click_state, 8)) {
@@ -891,7 +891,7 @@
 
 void ShowRoadDepotWindow(TileIndex tile)
 {
-	Window* w = AllocateWindowDescFront(&_road_depot_desc, tile);
+	Window *w = AllocateWindowDescFront(&_road_depot_desc, tile);
 
 	if (w != NULL) {
 		w->caption_color = GetTileOwner(w->window_number);
@@ -960,7 +960,7 @@
 
 		/* draw the widgets */
 		if (station == INVALID_STATION) {
-			const Player* p = GetPlayer(owner);
+			const Player *p = GetPlayer(owner);
 
 			/* Company Name -- (###) Road vehicles */
 			SetDParam(0, p->name_1);
@@ -1024,7 +1024,7 @@
 			return;
 		case 7: { /* Matrix to show vehicles */
 			uint32 id_v = (e->click.pt.y - PLY_WND_PRC__OFFSET_TOP_WIDGET) / PLY_WND_PRC__SIZE_OF_ROW_SMALL;
-			const Vehicle* v;
+			const Vehicle *v;
 
 			if (id_v >= w->vscroll.cap) return; // click out of bounds
 
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -30,7 +30,7 @@
 {
 	YearMonthDay ymd;
 	const ShipVehicleInfo *svi = ShipVehInfo(engine_number);
-	const Engine* e;
+	const Engine *e;
 
 	/* Purchase cost - Max speed */
 	SetDParam(0, svi->base_cost * (_price.ship_base>>3)>>5);
@@ -138,7 +138,7 @@
 	ShipRefitWndProc,
 };
 
-static void ShowShipRefitWindow(const Vehicle* v)
+static void ShowShipRefitWindow(const Vehicle *v)
 {
 	Window *w;
 
@@ -282,7 +282,7 @@
 	ShipDetailsWndProc
 };
 
-static void ShowShipDetailsWindow(const Vehicle* v)
+static void ShowShipDetailsWindow(const Vehicle *v)
 {
 	Window *w;
 	VehicleID veh = v->index;
@@ -297,7 +297,7 @@
 
 void CcBuildShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
-	const Vehicle* v;
+	const Vehicle *v;
 	if (!success) return;
 
 	v = GetVehicle(_new_vehicle_id);
@@ -323,7 +323,7 @@
 		{
 			int count = 0;
 			int num = NUM_SHIP_ENGINES;
-			const Engine* e = GetEngine(SHIP_ENGINES_INDEX);
+			const Engine *e = GetEngine(SHIP_ENGINES_INDEX);
 
 			do {
 				if (HASBIT(e->player_avail, _local_player)) count++;
@@ -335,7 +335,7 @@
 
 		{
 			int num = NUM_SHIP_ENGINES;
-			const Engine* e = GetEngine(SHIP_ENGINES_INDEX);
+			const Engine *e = GetEngine(SHIP_ENGINES_INDEX);
 			int x = 2;
 			int y = 15;
 			int sel = WP(w,buildtrain_d).sel_index;
@@ -448,7 +448,7 @@
 }
 
 
-static void ShipViewWndProc(Window* w, WindowEvent* e)
+static void ShipViewWndProc(Window *w, WindowEvent *e)
 {
 	switch (e->event) {
 		case WE_PAINT: {
@@ -511,7 +511,7 @@
 	} break;
 
 		case WE_CLICK: {
-			const Vehicle* v = GetVehicle(w->window_number);
+			const Vehicle *v = GetVehicle(w->window_number);
 
 			switch (e->click.widget) {
 				case 5: /* start stop */
@@ -554,7 +554,7 @@
 
 		case WE_MOUSELOOP:
 		{
-			const Vehicle* v = GetVehicle(w->window_number);
+			const Vehicle *v = GetVehicle(w->window_number);
 			uint32 h = IsShipInDepot(v) ? 1 << 7 : 1 << 11;
 
 			if (h != w->hidden_state) {
@@ -591,9 +591,9 @@
 	ShipViewWndProc
 };
 
-void ShowShipViewWindow(const Vehicle* v)
+void ShowShipViewWindow(const Vehicle *v)
 {
-	Window* w = AllocateWindowDescFront(&_ship_view_desc, v->index);
+	Window *w = AllocateWindowDescFront(&_ship_view_desc, v->index);
 
 	if (w != NULL) {
 		w->caption_color = v->owner;
@@ -722,7 +722,7 @@
  * @param *v is the original vehicle to clone
  * @param *w is the window of the depot where the clone is build
  */
-static void HandleCloneVehClick(const Vehicle* v, const Window* w)
+static void HandleCloneVehClick(const Vehicle *v, const Window *w)
 {
 	if (v == NULL || v->type != VEH_Ship) return;
 
@@ -733,14 +733,14 @@
 	ResetObjectToPlace();
 }
 
-static void ClonePlaceObj(const Window* w)
+static void ClonePlaceObj(const Window *w)
 {
-	const Vehicle* v = CheckMouseOverVehicle();
+	const Vehicle *v = CheckMouseOverVehicle();
 
 	if (v != NULL) HandleCloneVehClick(v, w);
 }
 
-static void ShipDepotWndProc(Window* w, WindowEvent* e)
+static void ShipDepotWndProc(Window *w, WindowEvent *e)
 {
 	switch (e->event) {
 	case WE_PAINT:
@@ -788,7 +788,7 @@
 
 	// check if a vehicle in a depot was clicked..
 	case WE_MOUSELOOP: {
-		const Vehicle* v = _place_clicked_vehicle;
+		const Vehicle *v = _place_clicked_vehicle;
 
 		// since OTTD checks all open depot windows, we will make sure that it triggers the one with a clicked clone button
 		if (v != NULL && HASBIT(w->click_state, 8)) {
@@ -875,7 +875,7 @@
 
 void ShowShipDepotWindow(TileIndex tile)
 {
-	Window* w = AllocateWindowDescFront(&_ship_depot_desc,tile);
+	Window *w = AllocateWindowDescFront(&_ship_depot_desc,tile);
 
 	if (w != NULL) {
 		w->caption_color = GetTileOwner(w->window_number);
@@ -889,7 +889,7 @@
 }
 
 
-static void DrawSmallOrderList(const Vehicle* v, int x, int y)
+static void DrawSmallOrderList(const Vehicle *v, int x, int y)
 {
 	const Order *order;
 	int sel, i = 0;
@@ -1035,7 +1035,7 @@
 			return;
 		case 7: { /* Matrix to show vehicles */
 			uint32 id_v = (e->click.pt.y - PLY_WND_PRC__OFFSET_TOP_WIDGET) / PLY_WND_PRC__SIZE_OF_ROW_BIG;
-			const Vehicle* v;
+			const Vehicle *v;
 
 			if (id_v >= w->vscroll.cap) return; // click out of bounds
 
--- a/smallmap_gui.c
+++ b/smallmap_gui.c
@@ -216,7 +216,7 @@
 	}
 
 /* need to use OR, otherwise we will overwrite the wrong pixels at the edges :( */
-	static inline void WRITE_PIXELS_OR(Pixel* d, uint32 val)
+	static inline void WRITE_PIXELS_OR(Pixel *d, uint32 val)
 	{
 #	if defined(TTD_BIG_ENDIAN)
 		d[0] |= GB(val, 24, 8);
@@ -262,7 +262,7 @@
 	uint32 mand;
 } AndOr;
 
-static inline uint32 ApplyMask(uint32 colour, const AndOr* mask)
+static inline uint32 ApplyMask(uint32 colour, const AndOr *mask)
 {
 	return (colour & mask->mand) | mask->mor;
 }
@@ -605,7 +605,7 @@
 
 	/* setup owner table */
 	if (type == 5) {
-		const Player* p;
+		const Player *p;
 
 		/* fill with some special colors */
 		_owner_colors[OWNER_TOWN] = MKCOLOR(0xB4B4B4B4);
@@ -672,7 +672,7 @@
 		reps = (dpi->height - y + 1) / 2;
 		if (reps > 0) {
 //			assert(ptr >= dpi->dst_ptr);
-			DrawSmallMapStuff(ptr, tile_x, tile_y, dpi->pitch*2, reps, mask, _smallmap_draw_procs[type]);
+			DrawSmallMapStuff(ptr, tile_x, tile_y, dpi->pitch * 2, reps, mask, _smallmap_draw_procs[type]);
 		}
 
 skip_column:
@@ -963,7 +963,7 @@
 		} break;
 
 		case 8: { /* inverse location button (move this view to same spot as main view) 'Copy Location' */
-			const Window* w2 = FindWindowById(WC_MAIN_WINDOW, 0);
+			const Window *w2 = FindWindowById(WC_MAIN_WINDOW, 0);
 			int x = WP(w2, const vp_d).scrollpos_x;
 			int y = WP(w2, const vp_d).scrollpos_y;
 
--- a/sound.c
+++ b/sound.c
@@ -20,7 +20,7 @@
 } FileEntry;
 
 static uint _file_count;
-static FileEntry* _files;
+static FileEntry *_files;
 
 #define SOUND_SLOT 63
 // Number of levels of panning per side
@@ -29,7 +29,7 @@
 
 static void OpenBankFile(const char *filename)
 {
-	FileEntry* fe;
+	FileEntry *fe;
 	uint count;
 	uint i;
 
@@ -102,8 +102,8 @@
 
 static bool SetBankSource(MixerChannel *mc, uint bank)
 {
-	const FileEntry* fe;
-	int8* mem;
+	const FileEntry *fe;
+	int8 *mem;
 	uint i;
 
 	if (bank >= _file_count) return false;
@@ -136,7 +136,7 @@
 // Low level sound player
 static void StartSound(uint sound, int panning, uint volume)
 {
-	MixerChannel* mc;
+	MixerChannel *mc;
 	uint left_vol, right_vol;
 
 	if (volume == 0) return;
@@ -182,7 +182,7 @@
 
 static void SndPlayScreenCoordFx(SoundFx sound, int x, int y)
 {
-	const Window* w;
+	const Window *w;
 
 	if (msf.effect_vol == 0) return;
 
--- a/subsidy_gui.c
+++ b/subsidy_gui.c
@@ -15,7 +15,7 @@
 
 static void HandleSubsidyClick(int y)
 {
-	const Subsidy* s;
+	const Subsidy *s;
 	uint num;
 	int offs;
 	TileIndex xy;
@@ -73,10 +73,10 @@
 	}
 }
 
-static void DrawSubsidiesWindow(const Window* w)
+static void DrawSubsidiesWindow(const Window *w)
 {
 	YearMonthDay ymd;
-	const Subsidy* s;
+	const Subsidy *s;
 	uint num;
 	int x;
 	int y;
@@ -116,7 +116,7 @@
 
 	for (s = _subsidies; s != endof(_subsidies); s++) {
 		if (s->cargo_type != CT_INVALID && s->age >= 12) {
-			const Player* p;
+			const Player *p;
 			int xt;
 
 			SetupSubsidyDecodeParam(s, 1);
--- a/town_gui.c
+++ b/town_gui.c
@@ -110,7 +110,7 @@
 
 		{
 			int y;
-			const Player* p;
+			const Player *p;
 			int r;
 			StringID str;
 
@@ -219,7 +219,7 @@
 
 static void ShowTownAuthorityWindow(uint town)
 {
-	Window* w = AllocateWindowDescFront(&_town_authority_desc, town);
+	Window *w = AllocateWindowDescFront(&_town_authority_desc, town);
 
 	if (w != NULL) {
 		w->vscroll.cap = 5;
@@ -442,7 +442,7 @@
 		DoDrawString(_town_sort_order & 1 ? DOWNARROW : UPARROW, (_town_sort_order <= 1) ? 88 : 187, 15, 0x10);
 
 		{
-			const Town* t;
+			const Town *t;
 			int n = 0;
 			uint16 i = w->vscroll.pos;
 			int y = 28;
@@ -489,7 +489,7 @@
 			if (id_v >= _num_town_sort) return; // click out of town bounds
 
 			{
-				const Town* t = GetTown(_town_sort[id_v]);
+				const Town *t = GetTown(_town_sort[id_v]);
 				assert(t->xy);
 
 				ScrollMainWindowToTile(t->xy);
@@ -519,7 +519,7 @@
 
 void ShowTownDirectory(void)
 {
-	Window* w = AllocateWindowDescFront(&_town_directory_desc, 0);
+	Window *w = AllocateWindowDescFront(&_town_directory_desc, 0);
 
 	if (w != NULL) {
 		w->vscroll.cap = 16;
--- a/train_gui.c
+++ b/train_gui.c
@@ -30,7 +30,7 @@
 void DrawTrainEnginePurchaseInfo(int x, int y, EngineID engine_number)
 {
 	const RailVehicleInfo *rvi = RailVehInfo(engine_number);
-	const Engine* e = GetEngine(engine_number);
+	const Engine *e = GetEngine(engine_number);
 	int multihead = (rvi->flags&RVI_MULTIHEAD?1:0);
 	YearMonthDay ymd;
 	ConvertDayToYMD(&ymd, e->intro_date);
@@ -132,7 +132,7 @@
 
 void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
-	Vehicle *v,*found;
+	Vehicle *v, *found;
 
 	if (!success) return;
 
@@ -158,7 +158,7 @@
 
 void CcBuildLoco(bool success, TileIndex tile, uint32 p1, uint32 p2)
 {
-	const Vehicle* v;
+	const Vehicle *v;
 
 	if (!success) return;
 
@@ -176,7 +176,7 @@
 }
 
 static void engine_drawing_loop(int *x, int *y, int *pos, int *sel,
-	EngineID* selected_id, RailType railtype, byte show_max, bool is_engine)
+	EngineID *selected_id, RailType railtype, byte show_max, bool is_engine)
 {
 	EngineID j;
 
@@ -619,7 +619,7 @@
  * @param *v is the original vehicle to clone
  * @param *w is the window of the depot where the clone is build
  */
-static void HandleCloneVehClick(const Vehicle* v, const Window* w)
+static void HandleCloneVehClick(const Vehicle *v, const Window *w)
 {
 	if (v == NULL || v->type != VEH_Train) return;
 
@@ -637,9 +637,9 @@
 	ResetObjectToPlace();
 }
 
-static void ClonePlaceObj(const Window* w)
+static void ClonePlaceObj(const Window *w)
 {
-	Vehicle* v = CheckMouseOverVehicle();
+	Vehicle *v = CheckMouseOverVehicle();
 
 	if (v != NULL) HandleCloneVehClick(v, w);
 }
@@ -690,7 +690,7 @@
 
 	// check if a vehicle in a depot was clicked..
 	case WE_MOUSELOOP: {
-		const Vehicle* v = _place_clicked_vehicle;
+		const Vehicle *v = _place_clicked_vehicle;
 
 		// since OTTD checks all open depot windows, we will make sure that it triggers the one with a clicked clone button
 		if (v != NULL && HASBIT(w->click_state, 9)) {
@@ -914,7 +914,7 @@
 { WIDGETS_END }
 };
 
-static void ShowTrainDetailsWindow(const Vehicle* v);
+static void ShowTrainDetailsWindow(const Vehicle *v);
 
 static void TrainViewWndProc(Window *w, WindowEvent *e)
 {
@@ -1053,7 +1053,7 @@
 		break;
 
 	case WE_MOUSELOOP: {
-		const Vehicle* v = GetVehicle(w->window_number);
+		const Vehicle *v = GetVehicle(w->window_number);
 		uint32 h;
 
 		assert(v->type == VEH_Train);
@@ -1076,9 +1076,9 @@
 	TrainViewWndProc
 };
 
-void ShowTrainViewWindow(const Vehicle* v)
+void ShowTrainViewWindow(const Vehicle *v)
 {
-	Window* w = AllocateWindowDescFront(&_train_view_desc,v->index);
+	Window *w = AllocateWindowDescFront(&_train_view_desc,v->index);
 
 	if (w != NULL) {
 		w->caption_color = v->owner;
@@ -1341,7 +1341,7 @@
 };
 
 
-static void ShowTrainDetailsWindow(const Vehicle* v)
+static void ShowTrainDetailsWindow(const Vehicle *v)
 {
 	Window *w;
 	VehicleID veh = v->index;
@@ -1485,7 +1485,7 @@
 
 		case 7: { /* Matrix to show vehicles */
 			uint32 id_v = (e->click.pt.y - PLY_WND_PRC__OFFSET_TOP_WIDGET) / PLY_WND_PRC__SIZE_OF_ROW_SMALL;
-			const Vehicle* v;
+			const Vehicle *v;
 
 			if (id_v >= w->vscroll.cap) return; // click out of bounds
 
--- a/viewport.c
+++ b/viewport.c
@@ -215,7 +215,7 @@
 	}
 }
 
-static void SetViewportPosition(Window* w, int x, int y)
+static void SetViewportPosition(Window *w, int x, int y)
 {
 	ViewPort *vp = w->viewport;
 	int old_left = vp->virtual_left;
@@ -420,7 +420,7 @@
 {
 	ViewportDrawer *vd = _cur_vd;
 	ParentSpriteToDraw *ps;
-	const Sprite* spr;
+	const Sprite *spr;
 	Point pt;
 
 	assert((image & SPRITE_MASK) < MAX_SPRITES);
@@ -1018,7 +1018,7 @@
 	} while (ts != NULL);
 }
 
-static void ViewportSortParentSprites(ParentSpriteToDraw* psd[])
+static void ViewportSortParentSprites(ParentSpriteToDraw *psd[])
 {
 	while (*psd != NULL) {
 		ParentSpriteToDraw* ps = *psd;
@@ -1662,9 +1662,9 @@
 	ShowTrainViewWindow(v);
 }
 
-static void Nop(const Vehicle* v) {}
+static void Nop(const Vehicle *v) {}
 
-typedef void OnVehicleClickProc(const Vehicle* v);
+typedef void OnVehicleClickProc(const Vehicle *v);
 static OnVehicleClickProc* const _on_vehicle_click_proc[] = {
 	SafeShowTrainViewWindow,
 	ShowRoadVehViewWindow,
@@ -1676,7 +1676,7 @@
 
 void HandleViewportClicked(const ViewPort *vp, int x, int y)
 {
-	const Vehicle* v;
+	const Vehicle *v;
 
 	if (CheckClickOnTown(vp, x, y)) return;
 	if (CheckClickOnStation(vp, x, y)) return;
@@ -1693,8 +1693,8 @@
 
 Vehicle *CheckMouseOverVehicle(void)
 {
-	const Window* w;
-	const ViewPort* vp;
+	const Window *w;
+	const ViewPort *vp;
 
 	int x = _cursor.pos.x;
 	int y = _cursor.pos.y;
@@ -1737,7 +1737,7 @@
 
 
 /* scrolls the viewport in a window to a given location */
-bool ScrollWindowTo(int x , int y, Window* w)
+bool ScrollWindowTo(int x , int y, Window *w)
 {
 	Point pt;
 
--- a/water_cmd.c
+++ b/water_cmd.c
@@ -479,7 +479,7 @@
 }
 
 
-static uint GetSlopeZ_Water(const TileInfo* ti)
+static uint GetSlopeZ_Water(const TileInfo *ti)
 {
 	return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
 }
@@ -610,7 +610,7 @@
 			v->u.road.crashed_ctr = 2000;	// max 2220, disappear pretty fast
 			RebuildVehicleLists();
 		} else if (v->type == VEH_Train) {
-			Vehicle* u;
+			Vehicle *u;
 
 			v = GetFirstVehicleInChain(v);
 			u = v;
@@ -747,7 +747,7 @@
 	ClearTile_Water,					/* clear_tile_proc */
 	GetAcceptedCargo_Water,		/* get_accepted_cargo_proc */
 	GetTileDesc_Water,				/* get_tile_desc_proc */
-	GetTileTrackStatus_Water,	/* get_tile_track_status_proc */
+	GetTileTrackStatus_Water,/* get_tile_track_status_proc */
 	ClickTile_Water,					/* click_tile_proc */
 	AnimateTile_Water,				/* animate_tile_proc */
 	TileLoop_Water,						/* tile_loop_clear */
--- a/window.c
+++ b/window.c
@@ -24,10 +24,10 @@
 }
 
 
-static Window* StartWindowDrag(Window* w);
-static Window* StartWindowSizing(Window* w);
+static Window *StartWindowDrag(Window *w);
+static Window *StartWindowSizing(Window *w);
 
-static void DispatchLeftClickEvent(Window* w, int x, int y)
+static void DispatchLeftClickEvent(Window *w, int x, int y)
 {
 	WindowEvent e;
 	const Widget *wi;
@@ -86,7 +86,7 @@
 	w->wndproc(w, &e);
 }
 
-static void DispatchRightClickEvent(Window* w, int x, int y)
+static void DispatchRightClickEvent(Window *w, int x, int y)
 {
 	WindowEvent e;
 
@@ -114,7 +114,7 @@
  * @param widget the widget where the scrollwheel was used
  * @param wheel scroll up or down
  */
-static void DispatchMouseWheelEvent(Window* w, int widget, int wheel)
+static void DispatchMouseWheelEvent(Window *w, int widget, int wheel)
 {
 	const Widget *wi1, *wi2;
 	Scrollbar *sb;
@@ -142,7 +142,7 @@
 }
 
 
-static void DrawOverlappedWindow(Window* w, int left, int top, int right, int bottom);
+static void DrawOverlappedWindow(Window *w, int left, int top, int right, int bottom);
 
 void DrawOverlappedWindowForAll(int left, int top, int right, int bottom)
 {
@@ -160,9 +160,9 @@
 	}
 }
 
-static void DrawOverlappedWindow(Window* w, int left, int top, int right, int bottom)
+static void DrawOverlappedWindow(Window *w, int left, int top, int right, int bottom)
 {
-	const Window* v = w;
+	const Window *v = w;
 	int x;
 
 	while (++v != _last_window) {
@@ -219,7 +219,7 @@
 	w->wndproc(w, &e);
 }
 
-void SetWindowDirty(const Window* w)
+void SetWindowDirty(const Window *w)
 {
 	if (w == NULL) return;
 	SetDirtyBlocks(w->left, w->top, w->left + w->width, w->top + w->height);
@@ -293,7 +293,7 @@
 }
 
 
-static Window* BringWindowToFront(Window* w);
+static Window *BringWindowToFront(Window *w);
 
 Window *BringWindowToFrontById(WindowClass cls, WindowNumber number)
 {
@@ -320,7 +320,7 @@
  * - New window, Chatbar (only if open)
  * @param w window that is put into the foreground
  */
-static Window* BringWindowToFront(Window* w)
+static Window *BringWindowToFront(Window *w)
 {
 	Window *v;
 	Window temp;
@@ -378,7 +378,7 @@
 	}
 }
 
-bool IsWindowOfPrototype(const Window* w, const Widget* widget)
+bool IsWindowOfPrototype(const Window *w, const Widget *widget)
 {
 	return (w->original_widget == widget);
 }
@@ -390,7 +390,7 @@
 
 	if (widget != NULL) {
 		uint index = 1;
-		const Widget* wi;
+		const Widget *wi;
 
 		for (wi = widget; wi->type != WWT_LAST; wi++) index++;
 
@@ -1070,7 +1070,7 @@
 	return false;
 }
 
-static Window* StartWindowDrag(Window* w)
+static Window *StartWindowDrag(Window *w)
 {
 	w->flags4 |= WF_DRAGGING;
 	_dragging_window = true;
@@ -1083,7 +1083,7 @@
 	return w;
 }
 
-static Window* StartWindowSizing(Window* w)
+static Window *StartWindowSizing(Window *w)
 {
 	w->flags4 |= WF_SIZING;
 	_dragging_window = true;
@@ -1170,7 +1170,7 @@
 	}
 
 	if (w->window_class != WC_SMALLMAP) {
-		ViewPort* vp = IsPtInWindowViewport(w, _cursor.pos.x, _cursor.pos.y);
+		ViewPort *vp = IsPtInWindowViewport(w, _cursor.pos.x, _cursor.pos.y);
 
 		if (vp == NULL)
 			goto stop_capt;
@@ -1282,7 +1282,7 @@
  * @param wparam Specifies additional message-specific information
  * @param lparam Specifies additional message-specific information
  */
-static void SendWindowMessageW(Window* w, uint msg, uint wparam, uint lparam)
+static void SendWindowMessageW(Window *w, uint msg, uint wparam, uint lparam)
 {
 	WindowEvent e;
 
@@ -1536,14 +1536,14 @@
 
 void InvalidateWindow(WindowClass cls, WindowNumber number)
 {
-	const Window* w;
+	const Window *w;
 
 	for (w = _windows; w != _last_window; w++) {
 		if (w->window_class == cls && w->window_number == number) SetWindowDirty(w);
 	}
 }
 
-void InvalidateWidget(const Window* w, byte widget_index)
+void InvalidateWidget(const Window *w, byte widget_index)
 {
 	const Widget *wi = &w->widget[widget_index];
 
@@ -1555,7 +1555,7 @@
 
 void InvalidateWindowWidget(WindowClass cls, WindowNumber number, byte widget_index)
 {
-	const Window* w;
+	const Window *w;
 
 	for (w = _windows; w != _last_window; w++) {
 		if (w->window_class == cls && w->window_number == number) {
@@ -1566,7 +1566,7 @@
 
 void InvalidateWindowClasses(WindowClass cls)
 {
-	const Window* w;
+	const Window *w;
 
 	for (w = _windows; w != _last_window; w++) {
 		if (w->window_class == cls) SetWindowDirty(w);
--- a/window.h
+++ b/window.h
@@ -249,7 +249,7 @@
 	WindowClass wnd_class;
 	WindowNumber wnd_num;
 	Textbuf text;
-	const char* orig;
+	const char *orig;
 } querystr_d;
 
 #define WP(ptr,str) (*(str*)(ptr)->custom)
@@ -301,11 +301,11 @@
 };
 
 typedef struct {
-	byte item_count; /* follow_vehicle */
-	byte sel_index;		/* scrollpos_x */
-	byte main_button; /* scrollpos_y */
+	byte item_count;      /* follow_vehicle */
+	byte sel_index;       /* scrollpos_x */
+	byte main_button;     /* scrollpos_y */
 	byte action_id;
-	StringID string_id; /* unk30 */
+	StringID string_id;   /* unk30 */
 	uint16 checked_items; /* unk32 */
 	byte disabled_items;
 } menu_d;
@@ -556,7 +556,7 @@
 /* window.c */
 void CallWindowEventNP(Window *w, int event);
 void CallWindowTickEvent(void);
-void SetWindowDirty(const Window* w);
+void SetWindowDirty(const Window *w);
 void SendWindowMessage(WindowClass wnd_class, WindowNumber wnd_num, uint msg, uint wparam, uint lparam);
 
 Window *FindWindowById(WindowClass cls, WindowNumber number);
@@ -564,7 +564,7 @@
 Window *BringWindowToFrontById(WindowClass cls, WindowNumber number);
 Window *FindWindowFromPt(int x, int y);
 
-bool IsWindowOfPrototype(const Window* w, const Widget* widget);
+bool IsWindowOfPrototype(const Window *w, const Widget *widget);
 void AssignWidgetToWindow(Window *w, const Widget *widget);
 Window *AllocateWindow(
 							int x,
@@ -586,7 +586,7 @@
 int GetMenuItemIndex(const Window *w, int x, int y);
 void InputLoop(void);
 void UpdateWindows(void);
-void InvalidateWidget(const Window* w, byte widget_index);
+void InvalidateWidget(const Window *w, byte widget_index);
 
 void GuiShowTooltips(StringID string_id);