Changeset - r2643:318b2a3bc42e
[Not reviewed]
master
0 8 0
tron - 19 years ago 2005-11-15 09:00:02
tron@openttd.org
(svn r3185) const
8 files changed with 12 insertions and 12 deletions:
0 comments (0 inline, 0 general)
ai/default/default.c
Show inline comments
 
@@ -1849,13 +1849,13 @@ static bool AiEnumFollowTrack(TileIndex 
 

	
 
	if (DistanceMax(tile, a->tile2) < 4) a->count++;
 

	
 
	return false;
 
}
 

	
 
static bool AiDoFollowTrack(Player *p)
 
static bool AiDoFollowTrack(const Player* p)
 
{
 
	AiRailPathFindData arpfd;
 

	
 
	arpfd.tile = p->ai.start_tile_a;
 
	arpfd.tile2 = p->ai.cur_tile_a;
 
	arpfd.flag = false;
 
@@ -3191,13 +3191,13 @@ static void AiStateBuildRoadVehicles(Pla
 

	
 
	if (CmdFailed(DoCommandByTile(tile, veh, 0, DC_EXEC, CMD_BUILD_ROAD_VEH))) return;
 

	
 
	loco_id = _new_roadveh_id;
 

	
 
	for (i = 0; p->ai.order_list_blocks[i] != 0xFF; i++) {
 
		AiBuildRec* aib = &p->ai.src + p->ai.order_list_blocks[i];
 
		const AiBuildRec* aib = &p->ai.src + p->ai.order_list_blocks[i];
 
		bool is_pass = (
 
			p->ai.cargo_type == CT_PASSENGERS ||
 
			p->ai.cargo_type == CT_MAIL ||
 
			(_opt.landscape == LT_NORMAL && p->ai.cargo_type == CT_VALUABLES)
 
		);
 
		Order order;
main_gui.c
Show inline comments
 
@@ -2410,13 +2410,13 @@ void SetupColorsAndInitialWindow(void)
 
	int width,height;
 

	
 
	for (i = 0; i != 16; i++) {
 
		const byte* b = GetNonSprite(0x307 + i);
 

	
 
		assert(b);
 
		_color_list[i] = *(ColorList*)(b + 0xC6);
 
		_color_list[i] = *(const ColorList*)(b + 0xC6);
 
	}
 

	
 
	width = _screen.width;
 
	height = _screen.height;
 

	
 
	// XXX: these are not done
openttd.c
Show inline comments
 
@@ -1017,17 +1017,17 @@ void GameLoop(void)
 

	
 
	MusicLoop();
 
}
 

	
 
void BeforeSaveGame(void)
 
{
 
	Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
 
	const Window* w = FindWindowById(WC_MAIN_WINDOW, 0);
 

	
 
	if (w != NULL) {
 
		_saved_scrollpos_x = WP(w,vp_d).scrollpos_x;
 
		_saved_scrollpos_y = WP(w,vp_d).scrollpos_y;
 
		_saved_scrollpos_x = WP(w, const vp_d).scrollpos_x;
 
		_saved_scrollpos_y = WP(w, const vp_d).scrollpos_y;
 
		_saved_scrollpos_zoom = w->viewport->zoom;
 
	}
 
}
 

	
 
static void ConvertTownOwner(void)
 
{
order_gui.c
Show inline comments
 
@@ -469,13 +469,13 @@ static void OrdersWndProc(Window *w, Win
 
			}
 
		}
 
		break;
 
	}
 

	
 
	case WE_RCLICK: {
 
		Vehicle* v = GetVehicle(w->window_number);
 
		const Vehicle* v = GetVehicle(w->window_number);
 
		int s = OrderGetSel(w);
 

	
 
		if (e->click.widget != 8) break;
 
		if (s == v->num_orders || GetVehicleOrder(v, s)->type != OT_GOTO_DEPOT) {
 
			GuiShowTooltips(STR_8857_MAKE_THE_HIGHLIGHTED_ORDER);
 
		} else {
settings_gui.c
Show inline comments
 
@@ -1274,13 +1274,13 @@ void ShowNewgrf(void)
 
	Window *w;
 
	DeleteWindowById(WC_GAME_OPTIONS, 0);
 
	w = AllocateWindowDesc(&_newgrf_desc);
 

	
 
	{ // little helper function to calculate _grffile_count
 
	  // should be REMOVED once _grffile_count is calculated at loading
 
		GRFFile *c = _first_grffile;
 
		const GRFFile* c = _first_grffile;
 

	
 
		_grffile_count = 0;
 
		while (c != NULL) {
 
			_grffile_count++;
 
			c = c->next;
 
		}
station_cmd.c
Show inline comments
 
@@ -148,15 +148,15 @@ RoadStop *AllocateRoadStop(void)
 

	
 
	return NULL;
 
}
 

	
 
/* Calculate the radius of the station. Basicly it is the biggest
 
    radius that is available within the station */
 
static byte FindCatchmentRadius(Station *st)
 
static uint FindCatchmentRadius(const Station* st)
 
{
 
	byte ret = 0;
 
	uint ret = 0;
 

	
 
	if (st->bus_stops != NULL)   ret = max(ret, CA_BUS);
 
	if (st->truck_stops != NULL) ret = max(ret, CA_TRUCK);
 
	if (st->train_tile) ret = max(ret, CA_TRAIN);
 
	if (st->dock_tile)  ret = max(ret, CA_DOCK);
 

	
strings.c
Show inline comments
 
@@ -610,13 +610,13 @@ static char *FormatString(char *buff, co
 
				buff = FormatString(buff, GetStringPtr(STR_LITERS), NULL, modifier >> 24);
 
				modifier = 0;
 
				break;
 
			}
 

	
 
			case 13: { // {G 0 Der Die Das}
 
				byte *s = (byte*)GetStringPtr(argv_orig[(byte)*str++]); // contains the string that determines gender.
 
				const byte* s = (const byte*)GetStringPtr(argv_orig[(byte)*str++]); // contains the string that determines gender.
 
				int len;
 
				int gender = 0;
 
				if (s != NULL && s[0] == 0x87) gender = s[1];
 
				str = ParseStringChoice(str, gender, buff, &len);
 
				buff += len;
 
				break;
window.c
Show inline comments
 
@@ -1545,13 +1545,13 @@ int GetMenuItemIndex(const Window *w, in
 
	}
 
	return -1;
 
}
 

	
 
void InvalidateWindow(byte cls, WindowNumber number)
 
{
 
	Window *w;
 
	const Window* w;
 

	
 
	for (w = _windows; w != _last_window; w++) {
 
		if (w->window_class == cls && w->window_number == number) SetWindowDirty(w);
 
	}
 
}
 

	
0 comments (0 inline, 0 general)