(svn r3185) const
This commit is contained in:
		| @@ -1852,7 +1852,7 @@ static bool AiEnumFollowTrack(TileIndex tile, AiRailPathFindData *a, int track, | |||||||
| 	return false; | 	return false; | ||||||
| } | } | ||||||
|  |  | ||||||
| static bool AiDoFollowTrack(Player *p) | static bool AiDoFollowTrack(const Player* p) | ||||||
| { | { | ||||||
| 	AiRailPathFindData arpfd; | 	AiRailPathFindData arpfd; | ||||||
|  |  | ||||||
| @@ -3194,7 +3194,7 @@ static void AiStateBuildRoadVehicles(Player *p) | |||||||
| 	loco_id = _new_roadveh_id; | 	loco_id = _new_roadveh_id; | ||||||
|  |  | ||||||
| 	for (i = 0; p->ai.order_list_blocks[i] != 0xFF; i++) { | 	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 = ( | 		bool is_pass = ( | ||||||
| 			p->ai.cargo_type == CT_PASSENGERS || | 			p->ai.cargo_type == CT_PASSENGERS || | ||||||
| 			p->ai.cargo_type == CT_MAIL || | 			p->ai.cargo_type == CT_MAIL || | ||||||
|   | |||||||
| @@ -2413,7 +2413,7 @@ void SetupColorsAndInitialWindow(void) | |||||||
| 		const byte* b = GetNonSprite(0x307 + i); | 		const byte* b = GetNonSprite(0x307 + i); | ||||||
|  |  | ||||||
| 		assert(b); | 		assert(b); | ||||||
| 		_color_list[i] = *(ColorList*)(b + 0xC6); | 		_color_list[i] = *(const ColorList*)(b + 0xC6); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	width = _screen.width; | 	width = _screen.width; | ||||||
|   | |||||||
| @@ -1020,11 +1020,11 @@ void GameLoop(void) | |||||||
|  |  | ||||||
| void BeforeSaveGame(void) | void BeforeSaveGame(void) | ||||||
| { | { | ||||||
| 	Window *w = FindWindowById(WC_MAIN_WINDOW, 0); | 	const Window* w = FindWindowById(WC_MAIN_WINDOW, 0); | ||||||
|  |  | ||||||
| 	if (w != NULL) { | 	if (w != NULL) { | ||||||
| 		_saved_scrollpos_x = WP(w,vp_d).scrollpos_x; | 		_saved_scrollpos_x = WP(w, const vp_d).scrollpos_x; | ||||||
| 		_saved_scrollpos_y = WP(w,vp_d).scrollpos_y; | 		_saved_scrollpos_y = WP(w, const vp_d).scrollpos_y; | ||||||
| 		_saved_scrollpos_zoom = w->viewport->zoom; | 		_saved_scrollpos_zoom = w->viewport->zoom; | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
| @@ -472,7 +472,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e) | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	case WE_RCLICK: { | 	case WE_RCLICK: { | ||||||
| 		Vehicle* v = GetVehicle(w->window_number); | 		const Vehicle* v = GetVehicle(w->window_number); | ||||||
| 		int s = OrderGetSel(w); | 		int s = OrderGetSel(w); | ||||||
|  |  | ||||||
| 		if (e->click.widget != 8) break; | 		if (e->click.widget != 8) break; | ||||||
|   | |||||||
| @@ -1277,7 +1277,7 @@ void ShowNewgrf(void) | |||||||
|  |  | ||||||
| 	{ // little helper function to calculate _grffile_count | 	{ // little helper function to calculate _grffile_count | ||||||
| 	  // should be REMOVED once _grffile_count is calculated at loading | 	  // should be REMOVED once _grffile_count is calculated at loading | ||||||
| 		GRFFile *c = _first_grffile; | 		const GRFFile* c = _first_grffile; | ||||||
|  |  | ||||||
| 		_grffile_count = 0; | 		_grffile_count = 0; | ||||||
| 		while (c != NULL) { | 		while (c != NULL) { | ||||||
|   | |||||||
| @@ -151,9 +151,9 @@ RoadStop *AllocateRoadStop(void) | |||||||
|  |  | ||||||
| /* Calculate the radius of the station. Basicly it is the biggest | /* Calculate the radius of the station. Basicly it is the biggest | ||||||
|     radius that is available within the station */ |     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->bus_stops != NULL)   ret = max(ret, CA_BUS); | ||||||
| 	if (st->truck_stops != NULL) ret = max(ret, CA_TRUCK); | 	if (st->truck_stops != NULL) ret = max(ret, CA_TRUCK); | ||||||
|   | |||||||
| @@ -613,7 +613,7 @@ static char *FormatString(char *buff, const char *str, const int32 *argv, uint c | |||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			case 13: { // {G 0 Der Die Das} | 			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 len; | ||||||
| 				int gender = 0; | 				int gender = 0; | ||||||
| 				if (s != NULL && s[0] == 0x87) gender = s[1]; | 				if (s != NULL && s[0] == 0x87) gender = s[1]; | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								window.c
									
									
									
									
									
								
							| @@ -1548,7 +1548,7 @@ int GetMenuItemIndex(const Window *w, int x, int y) | |||||||
|  |  | ||||||
| void InvalidateWindow(byte cls, WindowNumber number) | void InvalidateWindow(byte cls, WindowNumber number) | ||||||
| { | { | ||||||
| 	Window *w; | 	const Window* w; | ||||||
|  |  | ||||||
| 	for (w = _windows; w != _last_window; w++) { | 	for (w = _windows; w != _last_window; w++) { | ||||||
| 		if (w->window_class == cls && w->window_number == number) SetWindowDirty(w); | 		if (w->window_class == cls && w->window_number == number) SetWindowDirty(w); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 tron
					tron