openttd.c
changeset 2026 02dfa0aa2c2f
parent 1993 7410864cfac8
child 2033 1eb15b79b6f3
equal deleted inserted replaced
2025:b0b897359fdf 2026:02dfa0aa2c2f
   139 	int i = 1000;
   139 	int i = 1000;
   140 	do {
   140 	do {
   141 		GameLoop();
   141 		GameLoop();
   142 		_screen.dst_ptr = _null_video_mem;
   142 		_screen.dst_ptr = _null_video_mem;
   143 		UpdateWindows();
   143 		UpdateWindows();
   144 	}	while (--i);
   144 	} while (--i);
   145 	return ML_QUIT;
   145 	return ML_QUIT;
   146 }
   146 }
   147 
   147 
   148 static bool NullVideoChangeRes(int w, int h) { return false; }
   148 static bool NullVideoChangeRes(int w, int h) { return false; }
   149 static void NullVideoFullScreen(bool fs) {}
   149 static void NullVideoFullScreen(bool fs) {}
   582 		}
   582 		}
   583 		case 'c':
   583 		case 'c':
   584 			_config_file = strdup(mgo.opt);
   584 			_config_file = strdup(mgo.opt);
   585 			break;
   585 			break;
   586 		case -2:
   586 		case -2:
   587  		case 'h':
   587 		case 'h':
   588 			showhelp();
   588 			showhelp();
   589 			return 0;
   589 			return 0;
   590 		}
   590 		}
   591 	}
   591 	}
   592 
   592 
   749 	GenerateWorld(0, _patches.map_x, _patches.map_y);
   749 	GenerateWorld(0, _patches.map_x, _patches.map_y);
   750 
   750 
   751 	// In a dedicated server, the server does not play
   751 	// In a dedicated server, the server does not play
   752 	if (_network_dedicated) {
   752 	if (_network_dedicated) {
   753 		_local_player = OWNER_SPECTATOR;
   753 		_local_player = OWNER_SPECTATOR;
   754 	}	else {
   754 	} else {
   755 		// Create a single player
   755 		// Create a single player
   756 		DoStartupNewPlayer(false);
   756 		DoStartupNewPlayer(false);
   757 
   757 
   758 		_local_player = 0;
   758 		_local_player = 0;
   759 	}
   759 	}
  1218 			could be implemented this way:
  1218 			could be implemented this way:
  1219 			1.) Go through all stations
  1219 			1.) Go through all stations
  1220 					Build an array town_blocked[ town_id ][ player_id ]
  1220 					Build an array town_blocked[ town_id ][ player_id ]
  1221 				 that stores if at least one station in that town is blocked for a player
  1221 				 that stores if at least one station in that town is blocked for a player
  1222 			2.) Go through that array, if you find a town that is not blocked for
  1222 			2.) Go through that array, if you find a town that is not blocked for
  1223 				 	one player, but for all others, then give him exclusivity.
  1223 					one player, but for all others, then give him exclusivity.
  1224 	*/
  1224 	*/
  1225 }
  1225 }
  1226 
  1226 
  1227 const byte convert_currency[] = {
  1227 const byte convert_currency[] = {
  1228 	 0,  1, 12,  8,  3,
  1228 	 0,  1, 12,  8,  3,