File diff r4325:5bd2a8c976a4 → r4326:7102aa7f4fb2
oldloader.c
Show inline comments
 
@@ -699,13 +699,13 @@ static const OldChunks industry_chunk[] 
 
	OCL_SVAR( OC_UINT16, Industry, total_transported[0] ),
 
	OCL_SVAR( OC_UINT16, Industry, total_transported[1] ),
 

	
 
	OCL_SVAR(  OC_UINT8, Industry, type ),
 
	OCL_SVAR(  OC_UINT8, Industry, owner ),
 
	OCL_SVAR(  OC_UINT8, Industry, color_map ),
 
	OCL_SVAR(  OC_UINT8, Industry, last_prod_year ),
 
	OCL_SVAR( OC_FILE_U8 | OC_VAR_I32, Industry, last_prod_year ),
 
	OCL_SVAR( OC_UINT16, Industry, counter ),
 
	OCL_SVAR(  OC_UINT8, Industry, was_cargo_delivered ),
 

	
 
	OCL_NULL( 9 ), // Random junk at the end of this chunk
 

	
 
	OCL_END()
 
@@ -992,13 +992,13 @@ static bool LoadOldPlayer(LoadgameState 
 
	Ps: this also means that if you had exact 893288 pounds, you will go back
 
	to 10000.. this is a very VERY small chance ;) */
 
	if (p->player_money == 893288)
 
		p->money64 = p->player_money = p->current_loan = 100000;
 

	
 
	_player_colors[num] = p->player_color;
 
	p->inaugurated_year = _old_inaugurated_year - BASE_YEAR;
 
	p->inaugurated_year = _old_inaugurated_year;
 
	if (p->location_of_house == 0xFFFF)
 
		p->location_of_house = 0;
 

	
 
	/* State 20 for AI players is sell vehicle. Since the AI struct is not
 
	 * really figured out as of now, p->ai.cur_veh; needed for 'sell vehicle'
 
	 * is NULL and the function will crash. To fix this, just change the state
 
@@ -1119,13 +1119,13 @@ static const OldChunks vehicle_chunk[] =
 
	OCL_VAR ( OC_UINT16,   1, &_old_order ),
 

	
 
	OCL_SVAR(  OC_UINT8, Vehicle, num_orders ),
 
	OCL_SVAR(  OC_UINT8, Vehicle, cur_order_index ),
 
	OCL_SVAR(   OC_TILE, Vehicle, dest_tile ),
 
	OCL_SVAR( OC_UINT16, Vehicle, load_unload_time_rem ),
 
	OCL_SVAR( OC_UINT16, Vehicle, date_of_last_service ),
 
	OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Vehicle, date_of_last_service ),
 
	OCL_SVAR( OC_UINT16, Vehicle, service_interval ),
 
	OCL_SVAR( OC_FILE_U8 | OC_VAR_U16, Vehicle, last_station_visited ),
 
	OCL_SVAR(  OC_UINT8, Vehicle, tick_counter ),
 
	OCL_SVAR( OC_UINT16, Vehicle, max_speed ),
 

	
 
	OCL_SVAR( OC_FILE_U16 | OC_VAR_I32, Vehicle, x_pos ),
 
@@ -1153,15 +1153,15 @@ static const OldChunks vehicle_chunk[] =
 
	OCL_SVAR(  OC_UINT8, Vehicle, cargo_type ),
 
	OCL_SVAR( OC_UINT16, Vehicle, cargo_cap ),
 
	OCL_SVAR( OC_UINT16, Vehicle, cargo_count ),
 
	OCL_SVAR( OC_FILE_U8 | OC_VAR_U16, Vehicle, cargo_source ),
 
	OCL_SVAR(  OC_UINT8, Vehicle, cargo_days ),
 

	
 
	OCL_SVAR( OC_UINT16, Vehicle, age ),
 
	OCL_SVAR( OC_UINT16, Vehicle, max_age ),
 
	OCL_SVAR(  OC_UINT8, Vehicle, build_year ),
 
	OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Vehicle, age ),
 
	OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Vehicle, max_age ),
 
	OCL_SVAR( OC_FILE_U8 | OC_VAR_I32, Vehicle, build_year ),
 
	OCL_SVAR( OC_FILE_U8 | OC_VAR_U16, Vehicle, unitnumber ),
 

	
 
	OCL_SVAR( OC_UINT16, Vehicle, engine_type ),
 

	
 
	OCL_SVAR(  OC_UINT8, Vehicle, spritenum ),
 
	OCL_SVAR(  OC_UINT8, Vehicle, day_counter ),
 
@@ -1256,14 +1256,14 @@ static bool LoadOldSign(LoadgameState *l
 

	
 
	return LoadChunk(ls, GetSign(num), sign_chunk);
 
}
 

	
 
static const OldChunks engine_chunk[] = {
 
	OCL_SVAR( OC_UINT16, Engine, player_avail ),
 
	OCL_SVAR( OC_UINT16, Engine, intro_date ),
 
	OCL_SVAR( OC_UINT16, Engine, age ),
 
	OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Engine, intro_date ),
 
	OCL_SVAR( OC_FILE_U16 | OC_VAR_U32, Engine, age ),
 
	OCL_SVAR( OC_UINT16, Engine, reliability ),
 
	OCL_SVAR( OC_UINT16, Engine, reliability_spd_dec ),
 
	OCL_SVAR( OC_UINT16, Engine, reliability_start ),
 
	OCL_SVAR( OC_UINT16, Engine, reliability_max ),
 
	OCL_SVAR( OC_UINT16, Engine, reliability_final ),
 
	OCL_SVAR( OC_UINT16, Engine, duration_phase_1 ),
 
@@ -1372,13 +1372,13 @@ static bool LoadOldMapPart2(LoadgameStat
 
	return !ls->failed;
 
}
 

	
 
static uint32 _old_cur_town_ctr;
 
static const OldChunks main_chunk[] = {
 
	OCL_ASSERT( 0 ),
 
	OCL_VAR ( OC_UINT16,   1, &_date ),
 
	OCL_VAR ( OC_FILE_U16 | OC_VAR_U32, 1, &_date ),
 
	OCL_VAR ( OC_UINT16,   1, &_date_fract ),
 
	OCL_NULL( 600 ),            // TextEffects
 
	OCL_VAR ( OC_UINT32,   2, &_random_seeds[0] ),
 

	
 
	OCL_ASSERT( 0x264 ),
 
	OCL_CHUNK(  70, LoadOldTown ),