(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
--- a/ai/ai.c Fri Oct 21 12:24:55 2005 +0000
+++ b/ai/ai.c Sat Oct 22 06:39:32 2005 +0000
@@ -118,7 +118,7 @@
/**
* Run 1 tick of the AI. Don't overdo it, keep it realistic.
*/
-void AI_RunTick(byte player)
+static void AI_RunTick(byte player)
{
extern void AiNewDoGameLoop(Player *p);
--- a/aircraft_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/aircraft_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -436,14 +436,13 @@
DeleteWindow(w);
break;
- case WE_ON_EDIT_TEXT: {
+ case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
DoCommandP(0, w->window_number, 0, NULL,
CMD_NAME_VEHICLE | CMD_MSG(STR_A031_CAN_T_NAME_AIRCRAFT));
}
- } break;
-
+ break;
}
}
--- a/bridge_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/bridge_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -68,7 +68,7 @@
}
case WE_CLICK:
- if (e->click.widget == 2) {
+ if (e->click.widget == 2) {
uint ind = ((int)e->click.pt.y - 14) / 22;
if (ind < 4 && (ind += w->vscroll.pos) < _bridgedata.count)
BuildBridge(w, ind);
@@ -126,14 +126,13 @@
errmsg = INVALID_STRING_ID;
// only query bridge building possibility once, result is the same for all bridges!
- // returns CMD_ERROR on failure, and priCe on success
+ // returns CMD_ERROR on failure, and price on success
ret = DoCommandByTile(end, start, (bridge_type << 8), DC_AUTO | DC_QUERY_COST, CMD_BUILD_BRIDGE);
if (ret == CMD_ERROR) {
errmsg = _error_message;
- }
- // check which bridges can be built
- else {
+ } else {
+ // check which bridges can be built
int bridge_len; // length of the middle parts of the bridge
int tot_bridgedata_len; // total length of bridge
@@ -144,7 +143,6 @@
tot_bridgedata_len = CalcBridgeLenCostFactor(tot_bridgedata_len);
for (bridge_type = 0; bridge_type != MAX_BRIDGES; bridge_type++) { // loop for all bridgetypes
-
if (CheckBridge_Stuff(bridge_type, bridge_len)) {
const Bridge *b = &_bridge[bridge_type];
// bridge is accepted, add to list
--- a/disaster_cmd.c Fri Oct 21 12:24:55 2005 +0000
+++ b/disaster_cmd.c Sat Oct 22 06:39:32 2005 +0000
@@ -1001,4 +1001,3 @@
{
ResetDisasterDelay();
}
-
--- a/dock_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/dock_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -105,7 +105,7 @@
static OnButtonClick * const _build_docks_button_proc[] = {
BuildDocksClick_Canal,
BuildDocksClick_Lock,
- 0,
+ NULL,
BuildDocksClick_Demolish,
BuildDocksClick_Depot,
BuildDocksClick_Dock,
@@ -120,9 +120,9 @@
DrawWindowWidgets(w);
break;
- case WE_CLICK: {
+ case WE_CLICK:
if (e->click.widget - 3 >= 0 && e->click.widget != 5) _build_docks_button_proc[e->click.widget - 3](w);
- } break;
+ break;
case WE_KEYPRESS: {
switch(e->keypress.keycode) {
--- a/dummy_land.c Fri Oct 21 12:24:55 2005 +0000
+++ b/dummy_land.c Sat Oct 22 06:39:32 2005 +0000
@@ -19,7 +19,8 @@
return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
}
-static uint GetSlopeTileh_Dummy(const TileInfo *ti) {
+static uint GetSlopeTileh_Dummy(const TileInfo* ti)
+{
return ti->tileh;
}
@@ -81,4 +82,3 @@
NULL, /* vehicle_leave_tile_proc */
GetSlopeTileh_Dummy, /* get_slope_tileh_proc */
};
-
--- a/economy.c Fri Oct 21 12:24:55 2005 +0000
+++ b/economy.c Sat Oct 22 06:39:32 2005 +0000
@@ -673,7 +673,7 @@
static void PlayersPayInterest(void)
{
- Player *p;
+ const Player* p;
int interest = _economy.interest_rate * 54;
FOR_ALL_PLAYERS(p) {
--- a/engine.c Fri Oct 21 12:24:55 2005 +0000
+++ b/engine.c Sat Oct 22 06:39:32 2005 +0000
@@ -632,7 +632,8 @@
* @param v The wagon to check
* @return true if it is using an override, false otherwise
*/
-bool UsesWagonOverride(const Vehicle *v) {
+bool UsesWagonOverride(const Vehicle* v)
+{
assert(v->type == VEH_Train);
return GetWagonOverrideSpriteSet(v->engine_type, v->u.rail.first_engine) != NULL;
}
--- a/fileio.c Fri Oct 21 12:24:55 2005 +0000
+++ b/fileio.c Sat Oct 22 06:39:32 2005 +0000
@@ -180,5 +180,3 @@
_fio.handles[slot] = f;
FioSeekToFile(slot << 24);
}
-
-
--- a/gfx.c Fri Oct 21 12:24:55 2005 +0000
+++ b/gfx.c Sat Oct 22 06:39:32 2005 +0000
@@ -115,7 +115,7 @@
void GfxFillRect(int left, int top, int right, int bottom, int color)
{
- DrawPixelInfo *dpi = _cur_dpi;
+ const DrawPixelInfo* dpi = _cur_dpi;
Pixel *dst;
const int otop = top;
const int oleft = left;
@@ -167,7 +167,7 @@
static void GfxSetPixel(int x, int y, int color)
{
- DrawPixelInfo *dpi = _cur_dpi;
+ const DrawPixelInfo* dpi = _cur_dpi;
if ((x-=dpi->left) < 0 || x>=dpi->width || (y-=dpi->top)<0 || y>=dpi->height)
return;
dpi->dst_ptr[y * dpi->pitch + x] = color;
@@ -426,7 +426,7 @@
}
num++;
- str[-1] = 0;
+ str[-1] = '\0';
}
}
@@ -1361,7 +1361,7 @@
static void GfxMainBlitter(const Sprite* sprite, int x, int y, int mode)
{
- DrawPixelInfo *dpi = _cur_dpi;
+ const DrawPixelInfo* dpi = _cur_dpi;
int start_x, start_y;
byte info;
BlitterParams bp;
@@ -1871,7 +1871,7 @@
SetDirtyBlocks(0, 0, _screen.width, _screen.height);
}
-bool FillDrawPixelInfo(DrawPixelInfo *n, 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/gfx.h Fri Oct 21 12:24:55 2005 +0000
+++ b/gfx.h Sat Oct 22 06:39:32 2005 +0000
@@ -76,7 +76,7 @@
void GfxInitPalettes(void);
-bool FillDrawPixelInfo(DrawPixelInfo *n, 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);
/* window.c */
void DrawOverlappedWindowForAll(int left, int top, int right, int bottom);
--- a/industry_cmd.c Fri Oct 21 12:24:55 2005 +0000
+++ b/industry_cmd.c Sat Oct 22 06:39:32 2005 +0000
@@ -403,7 +403,8 @@
return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
}
-static uint GetSlopeTileh_Industry(const TileInfo *ti) {
+static uint GetSlopeTileh_Industry(const TileInfo* ti)
+{
return 0;
}
@@ -1008,7 +1009,7 @@
SetupFarmFieldFence(tile + TileDiffXY(0, size_y - 1), size_x, type, 0);
}
-static void MaybePlantFarmField(Industry *i)
+static void MaybePlantFarmField(const Industry* i)
{
TileIndex tile;
@@ -1402,7 +1403,7 @@
static bool CheckIfTooCloseToIndustry(TileIndex tile, int type)
{
- Industry *i;
+ const Industry* i;
const IndustrySpec *spec;
spec = &_industry_spec[type];
@@ -2022,4 +2023,3 @@
const ChunkHandler _industry_chunk_handlers[] = {
{ 'INDY', Save_INDY, Load_INDY, CH_ARRAY | CH_LAST},
};
-
--- a/landscape.c Fri Oct 21 12:24:55 2005 +0000
+++ b/landscape.c Sat Oct 22 06:39:32 2005 +0000
@@ -186,21 +186,21 @@
// direction=true: check for foundation in east and south corner
// direction=false: check for foundation in west and south corner
-static bool hasFoundation(TileInfo *ti, bool direction)
+static bool hasFoundation(const TileInfo* ti, bool direction)
{
bool south, other; // southern corner and east/west corner
uint slope = _tile_type_procs[ti->type]->get_slope_tileh_proc(ti);
uint tileh = ti->tileh;
- if(slope==0 && slope!=tileh) tileh=15;
+ if (slope == 0 && slope != tileh) tileh = 15;
south = (tileh & 2) != (slope & 2);
- if(direction)
+ if (direction) {
other = (tileh & 4) != (slope & 4);
- else
+ } else {
other = (tileh & 1) != (slope & 1);
+ }
return south || other;
-
}
void DrawFoundation(TileInfo *ti, uint f)
--- a/lzoconf.h Fri Oct 21 12:24:55 2005 +0000
+++ b/lzoconf.h Sat Oct 22 06:39:32 2005 +0000
@@ -450,4 +450,3 @@
#endif
#endif /* LZOCONF_H */
-
--- a/main_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/main_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -71,7 +71,7 @@
DoCommandP(0, id, 0, NULL, CMD_RENAME_SIGN | CMD_MSG(STR_280C_CAN_T_CHANGE_SIGN_NAME));
break;
case 1: /* Rename a waypoint */
- if (*b == 0) return;
+ if (*b == '\0') return;
DoCommandP(0, id, 0, NULL, CMD_RENAME_WAYPOINT | CMD_MSG(STR_CANT_CHANGE_WAYPOINT_NAME));
break;
#ifdef ENABLE_NETWORK
@@ -944,7 +944,7 @@
static void ToolbarBuildRailClick(Window *w)
{
- 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;
--- a/map.c Fri Oct 21 12:24:55 2005 +0000
+++ b/map.c Sat Oct 22 06:39:32 2005 +0000
@@ -39,7 +39,6 @@
_map_size = size_x * size_y;
_map_tile_mask = _map_size - 1;
- // free/malloc uses less memory than realloc.
free(_m);
_m = malloc(_map_size * sizeof(*_m));
@@ -111,9 +110,8 @@
// the result will be tile + TileDiffXY(addx, addy)
uint TileAddWrap(TileIndex tile, int addx, int addy)
{
- uint x, y;
- x = TileX(tile) + addx;
- y = TileY(tile) + addy;
+ uint x = TileX(tile) + addx;
+ uint y = TileY(tile) + addy;
// Are we about to wrap?
if (x < MapMaxX() && y < MapMaxY())
@@ -170,4 +168,3 @@
const uint minh = xh < yh ? xh : yh;
return minl < minh ? minl : minh;
}
-
--- a/map.h Fri Oct 21 12:24:55 2005 +0000
+++ b/map.h Sat Oct 22 06:39:32 2005 +0000
@@ -29,8 +29,6 @@
extern Tile* _m;
-void InitMap(uint log_x, uint log_y);
-
void AllocateMap(uint size_x, uint size_y);
// binary logarithm of the map size, try to avoid using this one
--- a/mersenne.c Fri Oct 21 12:24:55 2005 +0000
+++ b/mersenne.c Sat Oct 22 06:39:32 2005 +0000
@@ -72,4 +72,3 @@
void SeedMT(uint32 seed) {}
#endif /* MERSENNE_TWISTER */
-
--- a/minilzo.c Fri Oct 21 12:24:55 2005 +0000
+++ b/minilzo.c Sat Oct 22 06:39:32 2005 +0000
@@ -1969,5 +1969,3 @@
#endif
/***** End of minilzo.c *****/
-
-
--- a/minilzo.h Fri Oct 21 12:24:55 2005 +0000
+++ b/minilzo.h Sat Oct 22 06:39:32 2005 +0000
@@ -99,4 +99,3 @@
#endif
#endif /* MINILZO_H */
-
--- a/misc.c Fri Oct 21 12:24:55 2005 +0000
+++ b/misc.c Sat Oct 22 06:39:32 2005 +0000
@@ -4,6 +4,7 @@
#include "openttd.h"
#include "currency.h"
#include "functions.h"
+#include "news.h"
#include "player.h"
#include "string.h"
#include "table/strings.h"
@@ -19,7 +20,6 @@
#include "variables.h"
extern void StartupEconomy(void);
-extern void InitNewsItemStructs(void);
char _name_array[512][32];
--- a/music/os2_m.c Fri Oct 21 12:24:55 2005 +0000
+++ b/music/os2_m.c Sat Oct 22 06:39:32 2005 +0000
@@ -75,4 +75,3 @@
OS2MidiIsSongPlaying,
OS2MidiSetVolume,
};
-
--- a/music/qtmidi.c Fri Oct 21 12:24:55 2005 +0000
+++ b/music/qtmidi.c Sat Oct 22 06:39:32 2005 +0000
@@ -375,5 +375,3 @@
SongIsPlaying,
SetVolume,
};
-
-
--- a/music/qtmidi.h Fri Oct 21 12:24:55 2005 +0000
+++ b/music/qtmidi.h Sat Oct 22 06:39:32 2005 +0000
@@ -12,4 +12,3 @@
extern const HalMusicDriver _qtime_music_driver;
#endif /* !MUSIC_MACOSX_QUICKTIME_H */
-
--- a/music/win32_m.c Fri Oct 21 12:24:55 2005 +0000
+++ b/music/win32_m.c Sat Oct 22 06:39:32 2005 +0000
@@ -44,7 +44,8 @@
SetEvent(_midi.wait_obj);
}
-static MCIERROR CDECL MidiSendCommand(const char *cmd, ...) {
+static MCIERROR CDECL MidiSendCommand(const char* cmd, ...)
+{
va_list va;
char buf[512];
--- a/network_server.h Fri Oct 21 12:24:55 2005 +0000
+++ b/network_server.h Sat Oct 22 06:39:32 2005 +0000
@@ -20,7 +20,10 @@
void NetworkServerMonthlyLoop(void);
void NetworkServerYearlyLoop(void);
-static inline const char* GetPlayerIP(const NetworkClientInfo *ci) {return inet_ntoa(*(struct in_addr *)&ci->client_ip);}
+static inline const char* GetPlayerIP(const NetworkClientInfo* ci)
+{
+ return inet_ntoa(*(const struct in_addr*)&ci->client_ip);
+}
#endif /* ENABLE_NETWORK */
--- a/newgrf.h Fri Oct 21 12:24:55 2005 +0000
+++ b/newgrf.h Sat Oct 22 06:39:32 2005 +0000
@@ -46,4 +46,3 @@
void LoadNewGRF(uint load_index, uint file_index);
#endif /* NEWGRF_H */
-
--- a/openttd.c Fri Oct 21 12:24:55 2005 +0000
+++ b/openttd.c Sat Oct 22 06:39:32 2005 +0000
@@ -225,7 +225,7 @@
}
-static void ParseResolution(int res[2], char *s)
+static void ParseResolution(int res[2], const char* s)
{
char *t = strchr(s, 'x');
if (t == NULL) {
--- a/order_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/order_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -18,9 +18,9 @@
#include "depot.h"
#include "waypoint.h"
-static int OrderGetSel(Window *w)
+static int OrderGetSel(const Window* w)
{
- Vehicle *v = GetVehicle(w->window_number);
+ const Vehicle* v = GetVehicle(w->window_number);
int num = WP(w,order_d).sel;
if (num < 0 || num > v->num_orders)
@@ -113,7 +113,6 @@
SETBIT(w->disabled_state, 8); /* full load */
SETBIT(w->disabled_state, 9); /* unload */
SETBIT(w->disabled_state, 10); /* transfer */
-
}
SetDParam(0, v->string_id);
--- a/os2.c Fri Oct 21 12:24:55 2005 +0000
+++ b/os2.c Sat Oct 22 06:39:32 2005 +0000
@@ -633,4 +633,3 @@
{
delay(milliseconds);
}
-
--- a/pathfind.c Fri Oct 21 12:24:55 2005 +0000
+++ b/pathfind.c Sat Oct 22 06:39:32 2005 +0000
@@ -915,4 +915,3 @@
NTPEnum(&tpf, tile, direction);
}
-
--- a/players.c Fri Oct 21 12:24:55 2005 +0000
+++ b/players.c Sat Oct 22 06:39:32 2005 +0000
@@ -1263,4 +1263,3 @@
const ChunkHandler _player_chunk_handlers[] = {
{ 'PLYR', Save_PLYR, Load_PLYR, CH_ARRAY | CH_LAST},
};
-
--- a/rail.c Fri Oct 21 12:24:55 2005 +0000
+++ b/rail.c Sat Oct 22 06:39:32 2005 +0000
@@ -143,4 +143,3 @@
}
return type;
}
-
--- a/rail.h Fri Oct 21 12:24:55 2005 +0000
+++ b/rail.h Sat Oct 22 06:39:32 2005 +0000
@@ -43,10 +43,10 @@
typedef enum SignalTypes {
/* Stored in m4[0..1] for MP_RAILWAY */
- SIGTYPE_NORMAL = 0, // normal signal
- SIGTYPE_ENTRY = 1, // presignal block entry
- SIGTYPE_EXIT = 2, // presignal block exit
- SIGTYPE_COMBO = 3, // presignal inter-block
+ SIGTYPE_NORMAL = 0, // normal signal
+ SIGTYPE_ENTRY = 1, // presignal block entry
+ SIGTYPE_EXIT = 2, // presignal block exit
+ SIGTYPE_COMBO = 3, // presignal inter-block
SIGTYPE_PBS = 4, // pbs signal
SIGTYPE_END,
SIGTYPE_MASK = 7,
@@ -68,66 +68,66 @@
/** These are used to specify a single track. Can be translated to a trackbit
* with TrackToTrackbit */
typedef enum Tracks {
- TRACK_DIAG1 = 0,
- TRACK_DIAG2 = 1,
- TRACK_UPPER = 2,
- TRACK_LOWER = 3,
- TRACK_LEFT = 4,
- TRACK_RIGHT = 5,
- TRACK_END,
- INVALID_TRACK = 0xFF,
+ TRACK_DIAG1 = 0,
+ TRACK_DIAG2 = 1,
+ TRACK_UPPER = 2,
+ TRACK_LOWER = 3,
+ TRACK_LEFT = 4,
+ TRACK_RIGHT = 5,
+ TRACK_END,
+ INVALID_TRACK = 0xFF,
} Track;
/** These are the bitfield variants of the above */
typedef enum TrackBits {
- TRACK_BIT_DIAG1 = 1, // 0
- TRACK_BIT_DIAG2 = 2, // 1
- TRACK_BIT_UPPER = 4, // 2
- TRACK_BIT_LOWER = 8, // 3
- TRACK_BIT_LEFT = 16, // 4
- TRACK_BIT_RIGHT = 32, // 5
+ TRACK_BIT_DIAG1 = 1, // 0
+ TRACK_BIT_DIAG2 = 2, // 1
+ TRACK_BIT_UPPER = 4, // 2
+ TRACK_BIT_LOWER = 8, // 3
+ TRACK_BIT_LEFT = 16, // 4
+ TRACK_BIT_RIGHT = 32, // 5
TRACK_BIT_MASK = 0x3F,
} TrackBits;
/** 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 Trackdirs {
- TRACKDIR_DIAG1_NE = 0,
- TRACKDIR_DIAG2_SE = 1,
- TRACKDIR_UPPER_E = 2,
- TRACKDIR_LOWER_E = 3,
- TRACKDIR_LEFT_S = 4,
- TRACKDIR_RIGHT_S = 5,
+ TRACKDIR_DIAG1_NE = 0,
+ TRACKDIR_DIAG2_SE = 1,
+ TRACKDIR_UPPER_E = 2,
+ TRACKDIR_LOWER_E = 3,
+ TRACKDIR_LEFT_S = 4,
+ TRACKDIR_RIGHT_S = 5,
/* Note the two missing values here. This enables trackdir -> track
* conversion by doing (trackdir & 7) */
- TRACKDIR_DIAG1_SW = 8,
- TRACKDIR_DIAG2_NW = 9,
- TRACKDIR_UPPER_W = 10,
- TRACKDIR_LOWER_W = 11,
- TRACKDIR_LEFT_N = 12,
- TRACKDIR_RIGHT_N = 13,
- TRACKDIR_END,
- INVALID_TRACKDIR = 0xFF,
+ TRACKDIR_DIAG1_SW = 8,
+ TRACKDIR_DIAG2_NW = 9,
+ TRACKDIR_UPPER_W = 10,
+ TRACKDIR_LOWER_W = 11,
+ TRACKDIR_LEFT_N = 12,
+ TRACKDIR_RIGHT_N = 13,
+ TRACKDIR_END,
+ INVALID_TRACKDIR = 0xFF,
} Trackdir;
/** 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 {
- TRACKDIR_BIT_DIAG1_NE = 0x1,
- TRACKDIR_BIT_DIAG2_SE = 0x2,
- TRACKDIR_BIT_UPPER_E = 0x4,
- TRACKDIR_BIT_LOWER_E = 0x8,
- TRACKDIR_BIT_LEFT_S = 0x10,
- TRACKDIR_BIT_RIGHT_S = 0x20,
+ TRACKDIR_BIT_DIAG1_NE = 0x1,
+ TRACKDIR_BIT_DIAG2_SE = 0x2,
+ TRACKDIR_BIT_UPPER_E = 0x4,
+ TRACKDIR_BIT_LOWER_E = 0x8,
+ TRACKDIR_BIT_LEFT_S = 0x10,
+ TRACKDIR_BIT_RIGHT_S = 0x20,
/* Again, note the two missing values here. This enables trackdir -> track conversion by doing (trackdir & 0xFF) */
- TRACKDIR_BIT_DIAG1_SW = 0x0100,
- TRACKDIR_BIT_DIAG2_NW = 0x0200,
- TRACKDIR_BIT_UPPER_W = 0x0400,
- TRACKDIR_BIT_LOWER_W = 0x0800,
- TRACKDIR_BIT_LEFT_N = 0x1000,
- TRACKDIR_BIT_RIGHT_N = 0x2000,
+ TRACKDIR_BIT_DIAG1_SW = 0x0100,
+ TRACKDIR_BIT_DIAG2_NW = 0x0200,
+ TRACKDIR_BIT_UPPER_W = 0x0400,
+ TRACKDIR_BIT_LOWER_W = 0x0800,
+ TRACKDIR_BIT_LEFT_N = 0x1000,
+ TRACKDIR_BIT_RIGHT_N = 0x2000,
TRACKDIR_BIT_MASK = 0x3F3F,
- INVALID_TRACKDIR_BIT = 0xFFFF,
+ INVALID_TRACKDIR_BIT = 0xFFFF,
} TrackdirBits;
/** These are states in which a signal can be. Currently these are only two, so
@@ -270,7 +270,7 @@
static inline RailTileType GetRailTileType(TileIndex tile)
{
assert(IsTileType(tile, MP_RAILWAY));
- return (_m[tile].m5 & RAIL_TILE_TYPE_MASK);
+ return _m[tile].m5 & RAIL_TILE_TYPE_MASK;
}
/**
@@ -598,4 +598,3 @@
void DrawTrainDepotSprite(int x, int y, int image, RailType railtype);
void DrawDefaultWaypointSprite(int x, int y, RailType railtype);
#endif /* RAIL_H */
-
--- a/rail_cmd.c Fri Oct 21 12:24:55 2005 +0000
+++ b/rail_cmd.c Sat Oct 22 06:39:32 2005 +0000
@@ -448,9 +448,10 @@
if (!(flags & DC_EXEC))
return _price.remove_rail;
- SetTileOwner(tile, OWNER_NONE);
+ SetTileOwner(tile, OWNER_NONE);
_m[tile].m5 = _m[tile].m5 & 0xC7;
break;
+
case MP_STREET:
if (!IsLevelCrossing(tile)) return CMD_ERROR;
@@ -472,8 +473,8 @@
SetTileOwner(tile, _m[tile].m3);
_m[tile].m2 = 0;
break;
+
case MP_RAILWAY:
-
if (!IsPlainRailTile(tile))
return CMD_ERROR;
@@ -502,6 +503,7 @@
goto skip_mark_dirty;
}
break;
+
default:
assert(0);
}
@@ -673,13 +675,12 @@
*/
if (tileh != 0 && (
- _is_old_ai_player ||
- !_patches.build_on_slopes ||
- IsSteepTileh(tileh) ||
- !CanBuildDepotByTileh(p2, tileh)
- )
- ) {
- return_cmd_error(STR_0007_FLAT_LAND_REQUIRED);
+ _is_old_ai_player ||
+ !_patches.build_on_slopes ||
+ IsSteepTileh(tileh) ||
+ !CanBuildDepotByTileh(p2, tileh)
+ )) {
+ return_cmd_error(STR_0007_FLAT_LAND_REQUIRED);
}
ret = DoCommandByTile(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
@@ -1783,7 +1784,7 @@
static void SetSignalsAfterProc(TrackPathFinder *tpf)
{
SetSignalsData *ssd = tpf->userdata;
- TrackPathFinderLink *link;
+ const TrackPathFinderLink* link;
uint offs;
uint i;
@@ -2125,11 +2126,11 @@
static void ClickTile_Track(TileIndex tile)
{
- if (IsTileDepotType(tile, TRANSPORT_RAIL))
+ if (IsTileDepotType(tile, TRANSPORT_RAIL)) {
ShowTrainDepotWindow(tile);
- else if (IsRailWaypoint(_m[tile].m5))
+ } else if (IsRailWaypoint(_m[tile].m5)) {
ShowRenameWaypointWindow(GetWaypointByTile(tile));
-
+ }
}
static void GetTileDesc_Track(TileIndex tile, TileDesc *td)
--- a/railtypes.h Fri Oct 21 12:24:55 2005 +0000
+++ b/railtypes.h Sat Oct 22 06:39:32 2005 +0000
@@ -124,4 +124,3 @@
24,
},
};
-
--- a/road_cmd.c Fri Oct 21 12:24:55 2005 +0000
+++ b/road_cmd.c Sat Oct 22 06:39:32 2005 +0000
@@ -745,7 +745,8 @@
#include "table/road_land.h"
-uint GetRoadFoundation(uint tileh, uint bits) {
+uint GetRoadFoundation(uint tileh, uint bits)
+{
int i;
// normal level sloped building
if ((~_valid_tileh_slopes_road[1][tileh] & bits) == 0)
--- a/roadveh_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/roadveh_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -487,13 +487,13 @@
}
break;
- case WE_ON_EDIT_TEXT: {
+ case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
DoCommandP(0, WP(w, buildtrain_d).rename_engine, 0, NULL,
CMD_RENAME_ENGINE | CMD_MSG(STR_9037_CAN_T_RENAME_ROAD_VEHICLE));
}
- } break;
+ break;
case WE_RESIZE: {
if (e->sizing.diff.y == 0)
--- a/saveload.c Fri Oct 21 12:24:55 2005 +0000
+++ b/saveload.c Sat Oct 22 06:39:32 2005 +0000
@@ -1111,11 +1111,11 @@
switch (rt) {
case REF_VEHICLE_OLD: // Old vehicles we save as new onces
- case REF_VEHICLE: return ((Vehicle *)obj)->index + 1;
- case REF_STATION: return ((Station *)obj)->index + 1;
- case REF_TOWN: return ((Town *)obj)->index + 1;
- case REF_ORDER: return ((Order *)obj)->index + 1;
- case REF_ROADSTOPS: return ((RoadStop *)obj)->index + 1;
+ case REF_VEHICLE: return ((const Vehicle*)obj)->index + 1;
+ case REF_STATION: return ((const Station*)obj)->index + 1;
+ case REF_TOWN: return ((const Town*)obj)->index + 1;
+ case REF_ORDER: return ((const Order*)obj)->index + 1;
+ case REF_ROADSTOPS: return ((const RoadStop*)obj)->index + 1;
default: NOT_REACHED();
}
--- a/screenshot.c Fri Oct 21 12:24:55 2005 +0000
+++ b/screenshot.c Sat Oct 22 06:39:32 2005 +0000
@@ -486,7 +486,7 @@
if (_game_mode == GM_EDITOR || _local_player == OWNER_SPECTATOR) {
sprintf(_screenshot_name, "screenshot");
} else {
- Player *p = &_players[_local_player];
+ const Player* p = GetPlayer(_local_player);
SetDParam(0, p->name_1);
SetDParam(1, p->name_2);
SetDParam(2, _date);
--- a/settings_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/settings_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -690,7 +690,6 @@
{PE_BOOL, 0, STR_CONFIG_PATCHES_SMALL_AIRPORTS, "always_small_airport", &_patches.always_small_airport, 0, 0, 0, NULL},
{PE_UINT8, PF_PLAYERBASED, STR_CONFIG_PATCHES_DRAG_SIGNALS_DENSITY, "drag_signals_density", &_patches.drag_signals_density, 1, 20, 1, NULL},
{PE_BOOL, 0, STR_CONFIG_AUTO_PBS_PLACEMENT, "auto_pbs_placement", &_patches.auto_pbs_placement, 1, 20, 1, NULL},
-
};
static const PatchEntry _patches_vehicles[] = {
@@ -734,7 +733,6 @@
{PE_UINT8, 0, STR_CONFIG_PATCHES_STATION_SPREAD, "station_spread", &_patches.station_spread, 4, 64, 1, &InvalidateStationBuildWindow},
{PE_BOOL, 0, STR_CONFIG_PATCHES_SERVICEATHELIPAD, "service_at_helipad", &_patches.serviceathelipad, 0, 0, 0, NULL},
{PE_BOOL, 0, STR_CONFIG_PATCHES_CATCHMENT, "modified_catchment", &_patches.modified_catchment, 0, 0, 0, NULL},
-
};
static const PatchEntry _patches_economy[] = {
--- a/ship_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/ship_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -256,14 +256,13 @@
DeleteWindow(w);
break;
- case WE_ON_EDIT_TEXT: {
+ case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
DoCommandP(0, w->window_number, 0, NULL,
CMD_NAME_VEHICLE | CMD_MSG(STR_9832_CAN_T_NAME_SHIP));
}
- } break;
-
+ break;
}
}
@@ -406,13 +405,13 @@
}
break;
- case WE_ON_EDIT_TEXT: {
+ case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
DoCommandP(0, WP(w, buildtrain_d).rename_engine, 0, NULL,
CMD_RENAME_ENGINE | CMD_MSG(STR_9839_CAN_T_RENAME_SHIP_TYPE));
}
- } break;
+ break;
case WE_RESIZE:
w->vscroll.cap += e->sizing.diff.y / 24;
--- a/smallmap_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/smallmap_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -968,9 +968,9 @@
WP(w2, vp_d).scrollpos_y = y - (w2->viewport->virtual_height - w->viewport->virtual_height) / 2;
} 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);
- int x = WP(w2, vp_d).scrollpos_x;
- int y = WP(w2, vp_d).scrollpos_y;
+ 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;
WP(w, vp_d).scrollpos_x = x + (w2->viewport->virtual_width - w->viewport->virtual_width) / 2;
WP(w, vp_d).scrollpos_y = y + (w2->viewport->virtual_height - w->viewport->virtual_height) / 2;
--- a/sprite.h Fri Oct 21 12:24:55 2005 +0000
+++ b/sprite.h Sat Oct 22 06:39:32 2005 +0000
@@ -19,7 +19,7 @@
typedef struct DrawTileSprites {
SpriteID ground_sprite;
- DrawTileSeqStruct const *seq;
+ const DrawTileSeqStruct* seq;
} DrawTileSprites;
// Iterate through all DrawTileSeqStructs in DrawTileSprites.
--- a/spritecache.c Fri Oct 21 12:24:55 2005 +0000
+++ b/spritecache.c Sat Oct 22 06:39:32 2005 +0000
@@ -4,6 +4,7 @@
#include "openttd.h"
#include "debug.h"
#include "functions.h"
+#include "macros.h"
#include "spritecache.h"
#include "table/sprites.h"
#include "fileio.h"
@@ -334,7 +335,7 @@
/* Align this to an uint32 boundary. This also makes sure that the 2 least
* bits are not used, so we could use those for other things. */
- mem_req = (mem_req + sizeof(uint32) - 1) & ~(sizeof(uint32) - 1);
+ mem_req = ALIGN(mem_req, sizeof(uint32));
for (;;) {
MemBlock* s;
--- a/station.h Fri Oct 21 12:24:55 2005 +0000
+++ b/station.h Sat Oct 22 06:39:32 2005 +0000
@@ -315,7 +315,8 @@
return st->had_vehicle_of_type & HVOT_BUOY; /* XXX: We should really ditch this ugly coding and switch to something sane... */
}
-static inline bool IsBuoyTile(TileIndex tile) {
+static inline bool IsBuoyTile(TileIndex tile)
+{
return IsTileType(tile, MP_STATION) && _m[tile].m5 == 0x52;
}
--- a/station_cmd.c Fri Oct 21 12:24:55 2005 +0000
+++ b/station_cmd.c Sat Oct 22 06:39:32 2005 +0000
@@ -3222,4 +3222,3 @@
{ 'STNS', Save_STNS, Load_STNS, CH_ARRAY },
{ 'ROAD', Save_ROADSTOP, Load_ROADSTOP, CH_ARRAY | CH_LAST},
};
-
--- a/strings.c Fri Oct 21 12:24:55 2005 +0000
+++ b/strings.c Sat Oct 22 06:39:32 2005 +0000
@@ -1122,4 +1122,3 @@
if (!ReadLanguagePack(def))
error("can't read language pack '%s'", dl->ent[def].file);
}
-
--- a/table/ai_rail.h Fri Oct 21 12:24:55 2005 +0000
+++ b/table/ai_rail.h Sat Oct 22 06:39:32 2005 +0000
@@ -478,5 +478,3 @@
_airportdata_ai_1, // country airport
NULL
};
-
-
--- a/table/bridge_land.h Fri Oct 21 12:24:55 2005 +0000
+++ b/table/bridge_land.h Sat Oct 22 06:39:32 2005 +0000
@@ -773,5 +773,3 @@
_bridge_sprite_table_11_poles,
_bridge_sprite_table_12_poles
};
-
-
--- a/table/clear_land.h Fri Oct 21 12:24:55 2005 +0000
+++ b/table/clear_land.h Sat Oct 22 06:39:32 2005 +0000
@@ -60,4 +60,3 @@
0x11B3,
0x11C6,
};
-
--- a/table/landscape_sprite.h Fri Oct 21 12:24:55 2005 +0000
+++ b/table/landscape_sprite.h Sat Oct 22 06:39:32 2005 +0000
@@ -165,4 +165,3 @@
SPR_SLOPES_BASE, SPR_SLOPES_BASE+73,
0xffff,
};
-
--- a/table/sprites.h Fri Oct 21 12:24:55 2005 +0000
+++ b/table/sprites.h Sat Oct 22 06:39:32 2005 +0000
@@ -37,7 +37,7 @@
enum Sprites {
- SPR_SELECT_TILE = 752,
+ SPR_SELECT_TILE = 752,
SPR_DOT = 774, // corner marker for lower/raise land
SPR_DOT_SMALL = 4078,
SPR_WHITE_POINT = 4079,
@@ -48,10 +48,10 @@
SPR_ASCII_SPACE_BIG = 450,
/* Extra graphic spritenumbers */
- SPR_CANALS_BASE = 5382,
- SPR_SLOPES_BASE = SPR_CANALS_BASE + 70,
- SPR_AUTORAIL_BASE = SPR_SLOPES_BASE + 78,
- SPR_OPENTTD_BASE = SPR_AUTORAIL_BASE + 55, // can be lowered once autorail.grf is finalized
+ SPR_CANALS_BASE = 5382,
+ SPR_SLOPES_BASE = SPR_CANALS_BASE + 70,
+ SPR_AUTORAIL_BASE = SPR_SLOPES_BASE + 78,
+ SPR_OPENTTD_BASE = SPR_AUTORAIL_BASE + 55, // can be lowered once autorail.grf is finalized
SPR_BLOT = SPR_OPENTTD_BASE + 32, // colored circle (mainly used as vehicle profit marker and for sever compatibility)
@@ -87,7 +87,7 @@
SPR_SHADOW_CELL = 1004,
/* Sliced view shadow cells */
- /* Maybe we have differen ones in the future */
+ /* Maybe we have different ones in the future */
SPR_MAX_SLICE = SPR_OPENTTD_BASE + 71,
SPR_MIN_SLICE = SPR_OPENTTD_BASE + 71,
@@ -133,11 +133,11 @@
SPR_MGLV_SNOW_OFFSET = 26,
SPR_RAIL_SINGLE_Y = 1005,
- SPR_RAIL_SINGLE_X = 1006,
- SPR_RAIL_SINGLE_NORTH = 1007,
- SPR_RAIL_SINGLE_SOUTH = 1008,
- SPR_RAIL_SINGLE_EAST = 1009,
- SPR_RAIL_SINGLE_WEST = 1010,
+ SPR_RAIL_SINGLE_X = 1006,
+ SPR_RAIL_SINGLE_NORTH = 1007,
+ SPR_RAIL_SINGLE_SOUTH = 1008,
+ SPR_RAIL_SINGLE_EAST = 1009,
+ SPR_RAIL_SINGLE_WEST = 1010,
SPR_RAIL_TRACK_Y = 1011,
SPR_RAIL_TRACK_X = 1012,
SPR_RAIL_TRACK_BASE = 1018,
@@ -169,23 +169,23 @@
SPR_RAIL_ROOF_GLASS_X_TILE_B = 1085, //second half of the roof glass
SPR_RAIL_ROOF_GLASS_Y_TILE_B = 1086,
SPR_MONO_SINGLE_Y = 1087,
- SPR_MONO_SINGLE_X = 1088,
- SPR_MONO_SINGLE_NORTH = 1089,
- SPR_MONO_SINGLE_SOUTH = 1090,
- SPR_MONO_SINGLE_EAST = 1091,
- SPR_MONO_SINGLE_WEST = 1092,
+ SPR_MONO_SINGLE_X = 1088,
+ SPR_MONO_SINGLE_NORTH = 1089,
+ SPR_MONO_SINGLE_SOUTH = 1090,
+ SPR_MONO_SINGLE_EAST = 1091,
+ SPR_MONO_SINGLE_WEST = 1092,
SPR_MONO_TRACK_Y = 1093,
SPR_MONO_TRACK_BASE = 1100,
- SPR_MONO_TRACK_N_S = 1117,
+ SPR_MONO_TRACK_N_S = 1117,
SPR_MGLV_SINGLE_Y = 1169,
- SPR_MGLV_SINGLE_X = 1170,
- SPR_MGLV_SINGLE_NORTH = 1171,
- SPR_MGLV_SINGLE_SOUTH = 1172,
- SPR_MGLV_SINGLE_EAST = 1173,
- SPR_MGLV_SINGLE_WEST = 1174,
+ SPR_MGLV_SINGLE_X = 1170,
+ SPR_MGLV_SINGLE_NORTH = 1171,
+ SPR_MGLV_SINGLE_SOUTH = 1172,
+ SPR_MGLV_SINGLE_EAST = 1173,
+ SPR_MGLV_SINGLE_WEST = 1174,
SPR_MGLV_TRACK_Y = 1175,
SPR_MGLV_TRACK_BASE = 1182,
- SPR_MGLV_TRACK_N_S = 1199,
+ SPR_MGLV_TRACK_N_S = 1199,
SPR_WAYPOINT_X_1 = SPR_OPENTTD_BASE + 18,
SPR_WAYPOINT_X_2 = SPR_OPENTTD_BASE + 19,
SPR_WAYPOINT_Y_1 = SPR_OPENTTD_BASE + 20,
@@ -425,7 +425,7 @@
SPR_CROSSING_OFF_X_MONO = 1382,
SPR_CROSSING_OFF_X_MAGLEV = 1394,
- /* bridge type sprites */
+ /* bridge type sprites */
/* Wooden bridge (type 0) */
SPR_BTWDN_RAIL_Y_REAR = 2545,
--- a/table/track_land.h Fri Oct 21 12:24:55 2005 +0000
+++ b/table/track_land.h Sat Oct 22 06:39:32 2005 +0000
@@ -62,4 +62,3 @@
_track_waypoint_table_0,
_track_waypoint_table_1,
};
-
--- a/table/tree_land.h Fri Oct 21 12:24:55 2005 +0000
+++ b/table/tree_land.h Sat Oct 22 06:39:32 2005 +0000
@@ -221,4 +221,3 @@
};
#endif /* TREE_LAND_H */
-
--- a/texteff.c Fri Oct 21 12:24:55 2005 +0000
+++ b/texteff.c Sat Oct 22 06:39:32 2005 +0000
@@ -39,14 +39,14 @@
TileIndex _animated_tile_list[256];
-int _textmessage_width = 0;
-bool _textmessage_dirty = true;
-bool _textmessage_visible = false;
+static int _textmessage_width = 0;
+static bool _textmessage_dirty = true;
+static bool _textmessage_visible = false;
-const int _textmessage_box_left = 10; // Pixels from left
-const int _textmessage_box_y = 150; // Height of box
-const int _textmessage_box_bottom = 30; // Pixels from bottom
-const int _textmessage_box_max_width = 400; // Max width of box
+static const int _textmessage_box_left = 10; // Pixels from left
+static const int _textmessage_box_y = 150; // Height of box
+static const int _textmessage_box_bottom = 30; // Pixels from bottom
+static const int _textmessage_box_max_width = 400; // Max width of box
static Pixel _textmessage_backup[150 * 400]; // (y * max_width)
@@ -379,5 +379,3 @@
const ChunkHandler _animated_tile_chunk_handlers[] = {
{ 'ANIT', SaveLoad_ANIT, SaveLoad_ANIT, CH_RIFF | CH_LAST},
};
-
-
--- a/town_cmd.c Fri Oct 21 12:24:55 2005 +0000
+++ b/town_cmd.c Sat Oct 22 06:39:32 2005 +0000
@@ -1561,7 +1561,7 @@
static void TownActionRoadRebuild(Town *t, int action)
{
- Player *p;
+ const Player* p;
t->road_build_months = 6;
--- a/town_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/town_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -273,13 +273,13 @@
}
break;
- case WE_ON_EDIT_TEXT: {
+ case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
DoCommandP(0, w->window_number, 0, NULL,
CMD_RENAME_TOWN | CMD_MSG(STR_2008_CAN_T_RENAME_TOWN));
}
- } break;
+ break;
}
}
@@ -525,5 +525,3 @@
w->resize.height = w->height - 10 * 6; // minimum of 10 items in the list, each item 10 high
}
}
-
-
--- a/train_gui.c Fri Oct 21 12:24:55 2005 +0000
+++ b/train_gui.c Sat Oct 22 06:39:32 2005 +0000
@@ -1283,13 +1283,13 @@
DeleteWindow(w);
break;
- case WE_ON_EDIT_TEXT: {
+ case WE_ON_EDIT_TEXT:
if (e->edittext.str[0] != '\0') {
_cmd_text = e->edittext.str;
DoCommandP(0, w->window_number, 0, NULL,
CMD_NAME_VEHICLE | CMD_MSG(STR_8866_CAN_T_NAME_TRAIN));
}
- } break;
+ break;
}
}
--- a/tree_cmd.c Fri Oct 21 12:24:55 2005 +0000
+++ b/tree_cmd.c Sat Oct 22 06:39:32 2005 +0000
@@ -344,7 +344,8 @@
return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z;
}
-static uint GetSlopeTileh_Trees(const TileInfo *ti) {
+static uint GetSlopeTileh_Trees(const TileInfo* ti)
+{
return ti->tileh;
}
--- a/vehicle.h Fri Oct 21 12:24:55 2005 +0000
+++ b/vehicle.h Sat Oct 22 06:39:32 2005 +0000
@@ -305,7 +305,6 @@
void SetSignalsOnBothDir(TileIndex tile, byte track);
Vehicle *CheckClickOnVehicle(const ViewPort *vp, int x, int y);
-//uint GetVehicleWeight(Vehicle *v);
void DecreaseVehicleValue(Vehicle *v);
void CheckVehicleBreakdown(Vehicle *v);
@@ -395,9 +394,7 @@
*/
static inline bool IsVehicleIndex(uint index)
{
- if (index < GetVehiclePoolSize()) return true;
-
- return false;
+ return index < GetVehiclePoolSize();
}
/* Returns order 'index' of a vehicle or NULL when it doesn't exists */
@@ -448,9 +445,6 @@
VARDEF uint16 _aircraft_refit_capacity;
VARDEF byte _cmd_build_rail_veh_score;
-// for each player, for each vehicle type, keep a list of the vehicles.
-//VARDEF Vehicle *_vehicle_arr[8][4];
-
#define INVALID_VEHICLE 0xFFFF
#define INVALID_ENGINE 0xFFFF
--- a/vehicle_gui.h Fri Oct 21 12:24:55 2005 +0000
+++ b/vehicle_gui.h Sat Oct 22 06:39:32 2005 +0000
@@ -47,9 +47,9 @@
extern Sorting _sorting;
enum {
- PLY_WND_PRC__OFFSET_TOP_WIDGET = 26,
- PLY_WND_PRC__SIZE_OF_ROW_SMALL = 26,
- PLY_WND_PRC__SIZE_OF_ROW_BIG = 36,
+ PLY_WND_PRC__OFFSET_TOP_WIDGET = 26,
+ PLY_WND_PRC__SIZE_OF_ROW_SMALL = 26,
+ PLY_WND_PRC__SIZE_OF_ROW_BIG = 36,
};
void ShowReplaceVehicleWindow(byte vehicletype);
--- a/water_cmd.c Fri Oct 21 12:24:55 2005 +0000
+++ b/water_cmd.c Sat Oct 22 06:39:32 2005 +0000
@@ -744,4 +744,3 @@
NULL, /* vehicle_leave_tile_proc */
GetSlopeTileh_Water, /* get_slope_tileh_proc */
};
-
--- a/widget.c Fri Oct 21 12:24:55 2005 +0000
+++ b/widget.c Sat Oct 22 06:39:32 2005 +0000
@@ -159,7 +159,7 @@
void DrawWindowWidgets(const Window *w)
{
const Widget *wi;
- DrawPixelInfo *dpi = _cur_dpi;
+ const DrawPixelInfo* dpi = _cur_dpi;
Rect r;
uint32 cur_click, cur_disabled, cur_hidden;