Changeset - r15322:29a1524c8399
src/saveload/ai_sl.cpp
Show inline comments
 
@@ -118,13 +118,13 @@ static void Save_AIPL()
 
		SlSetArrayIndex(i);
 
		SlAutolength((AutolengthProc *)SaveReal_AIPL, &i);
 
	}
 
}
 

	
 
extern const ChunkHandler _ai_chunk_handlers[] = {
 
	{ 'AIPL', Save_AIPL, Load_AIPL, NULL, CH_ARRAY | CH_LAST},
 
	{ 'AIPL', Save_AIPL, Load_AIPL, NULL, NULL, CH_ARRAY | CH_LAST},
 
};
 
#else
 

	
 
/** The type of the data that follows in the savegame. */
 
enum SQSaveLoadType {
 
	SQSL_INT             = 0x00, ///< The following data is an integer.
 
@@ -194,9 +194,9 @@ static void Load_AIPL()
 
		if (_ai_sl_byte == 0) continue;
 
		LoadObjects();
 
	}
 
}
 

	
 
extern const ChunkHandler _ai_chunk_handlers[] = {
 
	{ 'AIPL', NULL, Load_AIPL, NULL, CH_ARRAY | CH_LAST},
 
	{ 'AIPL', NULL, Load_AIPL, NULL, NULL, CH_ARRAY | CH_LAST},
 
};
 
#endif /* ENABLE_AI */
src/saveload/airport_sl.cpp
Show inline comments
 
@@ -47,8 +47,8 @@ static void Load_APID()
 
		if ((uint)index >= max_id) break;
 
		SlObject(&_airport_mngr.mapping_ID[index], _airport_id_mapping_desc);
 
	}
 
}
 

	
 
extern const ChunkHandler _airport_chunk_handlers[] = {
 
	{ 'APID', Save_APID, Load_APID, NULL, CH_ARRAY | CH_LAST },
 
	{ 'APID', Save_APID, Load_APID, NULL, NULL, CH_ARRAY | CH_LAST },
 
};
src/saveload/animated_tile_sl.cpp
Show inline comments
 
@@ -56,8 +56,8 @@ static void Load_ANIT()
 

	
 
/**
 
 * "Definition" imported by the saveload code to be able to load and save
 
 * the animated tile table.
 
 */
 
extern const ChunkHandler _animated_tile_chunk_handlers[] = {
 
	{ 'ANIT', Save_ANIT, Load_ANIT, NULL, CH_RIFF | CH_LAST},
 
	{ 'ANIT', Save_ANIT, Load_ANIT, NULL, NULL, CH_RIFF | CH_LAST},
 
};
src/saveload/autoreplace_sl.cpp
Show inline comments
 
@@ -57,8 +57,8 @@ static void Ptrs_ERNW()
 
	FOR_ALL_ENGINE_RENEWS(er) {
 
		SlObject(er, _engine_renew_desc);
 
	}
 
}
 

	
 
extern const ChunkHandler _autoreplace_chunk_handlers[] = {
 
	{ 'ERNW', Save_ERNW, Load_ERNW, Ptrs_ERNW, CH_ARRAY | CH_LAST},
 
	{ 'ERNW', Save_ERNW, Load_ERNW, Ptrs_ERNW, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/cargopacket_sl.cpp
Show inline comments
 
@@ -119,8 +119,8 @@ static void Load_CAPA()
 
		CargoPacket *cp = new (index) CargoPacket();
 
		SlObject(cp, GetCargoPacketDesc());
 
	}
 
}
 

	
 
extern const ChunkHandler _cargopacket_chunk_handlers[] = {
 
	{ 'CAPA', Save_CAPA, Load_CAPA, NULL, CH_ARRAY | CH_LAST},
 
	{ 'CAPA', Save_CAPA, Load_CAPA, NULL, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/cheat_sl.cpp
Show inline comments
 
@@ -37,8 +37,8 @@ static void Load_CHTS()
 
		cht[i].been_used = (SlReadByte() != 0);
 
		cht[i].value     = (SlReadByte() != 0);
 
	}
 
}
 

	
 
extern const ChunkHandler _cheat_chunk_handlers[] = {
 
	{ 'CHTS', Save_CHTS, Load_CHTS, NULL, CH_RIFF | CH_LAST},
 
	{ 'CHTS', Save_CHTS, Load_CHTS, NULL, NULL, CH_RIFF | CH_LAST},
 
};
src/saveload/company_sl.cpp
Show inline comments
 
@@ -297,8 +297,8 @@ static void Ptrs_PLYR()
 
		SlObject(c, _company_desc);
 
	}
 
}
 

	
 

	
 
extern const ChunkHandler _company_chunk_handlers[] = {
 
	{ 'PLYR', Save_PLYR, Load_PLYR, Ptrs_PLYR, CH_ARRAY | CH_LAST},
 
	{ 'PLYR', Save_PLYR, Load_PLYR, Ptrs_PLYR, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/depot_sl.cpp
Show inline comments
 
@@ -58,8 +58,8 @@ static void Ptrs_DEPT()
 
		SlObject(depot, _depot_desc);
 
		if (CheckSavegameVersion(141)) depot->town = Town::Get((size_t)depot->town);
 
	}
 
}
 

	
 
extern const ChunkHandler _depot_chunk_handlers[] = {
 
	{ 'DEPT', Save_DEPT, Load_DEPT, Ptrs_DEPT, CH_ARRAY | CH_LAST},
 
	{ 'DEPT', Save_DEPT, Load_DEPT, Ptrs_DEPT, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/economy_sl.cpp
Show inline comments
 
@@ -96,11 +96,11 @@ static void Ptrs_CAPY()
 
		SlObject(cp, _cargopayment_desc);
 
	}
 
}
 

	
 

	
 
extern const ChunkHandler _economy_chunk_handlers[] = {
 
	{ 'CAPY', Save_CAPY,     Load_CAPY,     Ptrs_CAPY, CH_ARRAY},
 
	{ 'PRIC', NULL,          Load_PRIC,     NULL,      CH_RIFF | CH_AUTO_LENGTH},
 
	{ 'CAPR', NULL,          Load_CAPR,     NULL,      CH_RIFF | CH_AUTO_LENGTH},
 
	{ 'ECMY', Save_ECMY,     Load_ECMY,     NULL,      CH_RIFF | CH_LAST},
 
	{ 'CAPY', Save_CAPY,     Load_CAPY,     Ptrs_CAPY, NULL, CH_ARRAY},
 
	{ 'PRIC', NULL,          Load_PRIC,     NULL,      NULL, CH_RIFF | CH_AUTO_LENGTH},
 
	{ 'CAPR', NULL,          Load_CAPR,     NULL,      NULL, CH_RIFF | CH_AUTO_LENGTH},
 
	{ 'ECMY', Save_ECMY,     Load_ECMY,     NULL,      NULL, CH_RIFF | CH_LAST},
 
};
src/saveload/engine_sl.cpp
Show inline comments
 
@@ -146,10 +146,10 @@ static void Load_EIDS()
 
		EngineIDMapping *eid = _engine_mngr.Append();
 
		SlObject(eid, _engine_id_mapping_desc);
 
	}
 
}
 

	
 
extern const ChunkHandler _engine_chunk_handlers[] = {
 
	{ 'EIDS', Save_EIDS, Load_EIDS, NULL, CH_ARRAY          },
 
	{ 'ENGN', Save_ENGN, Load_ENGN, NULL, CH_ARRAY          },
 
	{ 'ENGS', NULL,      Load_ENGS, NULL, CH_RIFF | CH_LAST },
 
	{ 'EIDS', Save_EIDS, Load_EIDS, NULL, NULL, CH_ARRAY          },
 
	{ 'ENGN', Save_ENGN, Load_ENGN, NULL, NULL, CH_ARRAY          },
 
	{ 'ENGS', NULL,      Load_ENGS, NULL, NULL, CH_RIFF | CH_LAST },
 
};
src/saveload/gamelog_sl.cpp
Show inline comments
 
@@ -165,8 +165,8 @@ static void Save_GLOG()
 
	}
 
	SlWriteByte(GLAT_NONE);
 
}
 

	
 

	
 
extern const ChunkHandler _gamelog_chunk_handlers[] = {
 
	{ 'GLOG', Save_GLOG, Load_GLOG, NULL, CH_RIFF | CH_LAST }
 
	{ 'GLOG', Save_GLOG, Load_GLOG, NULL, NULL, CH_RIFF | CH_LAST }
 
};
src/saveload/group_sl.cpp
Show inline comments
 
@@ -43,8 +43,8 @@ static void Load_GRPS()
 
		Group *g = new (index) Group();
 
		SlObject(g, _group_desc);
 
	}
 
}
 

	
 
extern const ChunkHandler _group_chunk_handlers[] = {
 
	{ 'GRPS', Save_GRPS, Load_GRPS, NULL, CH_ARRAY | CH_LAST},
 
	{ 'GRPS', Save_GRPS, Load_GRPS, NULL, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/industry_sl.cpp
Show inline comments
 
@@ -159,10 +159,10 @@ static void Ptrs_INDY()
 
	FOR_ALL_INDUSTRIES(i) {
 
		SlObject(i, _industry_desc);
 
	}
 
}
 

	
 
extern const ChunkHandler _industry_chunk_handlers[] = {
 
	{ 'INDY', Save_INDY, Load_INDY, Ptrs_INDY, CH_ARRAY},
 
	{ 'IIDS', Save_IIDS, Load_IIDS,      NULL, CH_ARRAY},
 
	{ 'TIDS', Save_TIDS, Load_TIDS,      NULL, CH_ARRAY | CH_LAST},
 
	{ 'INDY', Save_INDY, Load_INDY, Ptrs_INDY, NULL, CH_ARRAY},
 
	{ 'IIDS', Save_IIDS, Load_IIDS,      NULL, NULL, CH_ARRAY},
 
	{ 'TIDS', Save_TIDS, Load_TIDS,      NULL, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/labelmaps_sl.cpp
Show inline comments
 
@@ -115,9 +115,9 @@ static void Load_RAIL()
 
		SlObject(&lo, _label_object_desc);
 
		*_railtype_list.Append() = (RailTypeLabel)lo.label;
 
	}
 
}
 

	
 
extern const ChunkHandler _labelmaps_chunk_handlers[] = {
 
	{ 'RAIL', Save_RAIL, Load_RAIL, NULL, CH_ARRAY | CH_LAST},
 
	{ 'RAIL', Save_RAIL, Load_RAIL, NULL, NULL, CH_ARRAY | CH_LAST},
 
};
 

	
src/saveload/map_sl.cpp
Show inline comments
 
@@ -238,16 +238,16 @@ static void Save_MAP7()
 
		for (uint j = 0; j != MAP_SL_BUF_SIZE; j++) buf[j] = _me[i++].m7;
 
		SlArray(buf, MAP_SL_BUF_SIZE, SLE_UINT8);
 
	}
 
}
 

	
 
extern const ChunkHandler _map_chunk_handlers[] = {
 
	{ 'MAPS', Save_MAPS, Load_MAPS, NULL, CH_RIFF },
 
	{ 'MAPT', Save_MAPT, Load_MAPT, NULL, CH_RIFF },
 
	{ 'MAPO', Save_MAP1, Load_MAP1, NULL, CH_RIFF },
 
	{ 'MAP2', Save_MAP2, Load_MAP2, NULL, CH_RIFF },
 
	{ 'M3LO', Save_MAP3, Load_MAP3, NULL, CH_RIFF },
 
	{ 'M3HI', Save_MAP4, Load_MAP4, NULL, CH_RIFF },
 
	{ 'MAP5', Save_MAP5, Load_MAP5, NULL, CH_RIFF },
 
	{ 'MAPE', Save_MAP6, Load_MAP6, NULL, CH_RIFF },
 
	{ 'MAP7', Save_MAP7, Load_MAP7, NULL, CH_RIFF | CH_LAST },
 
	{ 'MAPS', Save_MAPS, Load_MAPS, NULL, NULL, CH_RIFF },
 
	{ 'MAPT', Save_MAPT, Load_MAPT, NULL, NULL, CH_RIFF },
 
	{ 'MAPO', Save_MAP1, Load_MAP1, NULL, NULL, CH_RIFF },
 
	{ 'MAP2', Save_MAP2, Load_MAP2, NULL, NULL, CH_RIFF },
 
	{ 'M3LO', Save_MAP3, Load_MAP3, NULL, NULL, CH_RIFF },
 
	{ 'M3HI', Save_MAP4, Load_MAP4, NULL, NULL, CH_RIFF },
 
	{ 'MAP5', Save_MAP5, Load_MAP5, NULL, NULL, CH_RIFF },
 
	{ 'MAPE', Save_MAP6, Load_MAP6, NULL, NULL, CH_RIFF },
 
	{ 'MAP7', Save_MAP7, Load_MAP7, NULL, NULL, CH_RIFF | CH_LAST },
 
};
src/saveload/misc_sl.cpp
Show inline comments
 
@@ -106,9 +106,9 @@ static const SaveLoadGlobVarList _view_d
 
static void SaveLoad_VIEW()
 
{
 
	SlGlobList(_view_desc);
 
}
 

	
 
extern const ChunkHandler _misc_chunk_handlers[] = {
 
	{ 'DATE', SaveLoad_DATE, SaveLoad_DATE, NULL, CH_RIFF},
 
	{ 'VIEW', SaveLoad_VIEW, SaveLoad_VIEW, NULL, CH_RIFF | CH_LAST},
 
	{ 'DATE', SaveLoad_DATE, SaveLoad_DATE, NULL, NULL, CH_RIFF},
 
	{ 'VIEW', SaveLoad_VIEW, SaveLoad_VIEW, NULL, NULL, CH_RIFF | CH_LAST},
 
};
src/saveload/newgrf_sl.cpp
Show inline comments
 
@@ -52,8 +52,8 @@ static void Load_NGRF()
 

	
 
	/* Append static NewGRF configuration */
 
	AppendStaticGRFConfigs(&_grfconfig);
 
}
 

	
 
extern const ChunkHandler _newgrf_chunk_handlers[] = {
 
	{ 'NGRF', Save_NGRF, Load_NGRF, NULL, CH_ARRAY | CH_LAST }
 
	{ 'NGRF', Save_NGRF, Load_NGRF, NULL, NULL, CH_ARRAY | CH_LAST }
 
};
src/saveload/order_sl.cpp
Show inline comments
 
@@ -231,9 +231,9 @@ static void Ptrs_ORDL()
 
	FOR_ALL_ORDER_LISTS(list) {
 
		SlObject(list, GetOrderListDescription());
 
	}
 
}
 

	
 
extern const ChunkHandler _order_chunk_handlers[] = {
 
	{ 'ORDR', Save_ORDR, Load_ORDR, Ptrs_ORDR, CH_ARRAY},
 
	{ 'ORDL', Save_ORDL, Load_ORDL, Ptrs_ORDL, CH_ARRAY | CH_LAST},
 
	{ 'ORDR', Save_ORDR, Load_ORDR, Ptrs_ORDR, NULL, CH_ARRAY},
 
	{ 'ORDL', Save_ORDL, Load_ORDL, Ptrs_ORDL, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/saveload.h
Show inline comments
 
@@ -57,12 +57,13 @@ typedef void AutolengthProc(void *arg);
 

	
 
struct ChunkHandler {
 
	uint32 id;
 
	ChunkSaveLoadProc *save_proc;
 
	ChunkSaveLoadProc *load_proc;
 
	ChunkSaveLoadProc *ptrs_proc;
 
	ChunkSaveLoadProc *load_check_proc;
 
	uint32 flags;
 
};
 

	
 
struct NullStruct {
 
	byte null;
 
};
src/saveload/signs_sl.cpp
Show inline comments
 
@@ -54,8 +54,8 @@ static void Load_SIGN()
 
			si->owner = OWNER_NONE;
 
		}
 
	}
 
}
 

	
 
extern const ChunkHandler _sign_chunk_handlers[] = {
 
	{ 'SIGN', Save_SIGN, Load_SIGN, NULL, CH_ARRAY | CH_LAST},
 
	{ 'SIGN', Save_SIGN, Load_SIGN, NULL, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/station_sl.cpp
Show inline comments
 
@@ -472,10 +472,10 @@ static void Ptrs_ROADSTOP()
 
	FOR_ALL_ROADSTOPS(rs) {
 
		SlObject(rs, _roadstop_desc);
 
	}
 
}
 

	
 
extern const ChunkHandler _station_chunk_handlers[] = {
 
	{ 'STNS', NULL,          Load_STNS,     Ptrs_STNS,     CH_ARRAY },
 
	{ 'STNN', Save_STNN,     Load_STNN,     Ptrs_STNN,     CH_ARRAY },
 
	{ 'ROAD', Save_ROADSTOP, Load_ROADSTOP, Ptrs_ROADSTOP, CH_ARRAY | CH_LAST},
 
	{ 'STNS', NULL,          Load_STNS,     Ptrs_STNS,     NULL, CH_ARRAY },
 
	{ 'STNN', Save_STNN,     Load_STNN,     Ptrs_STNN,     NULL, CH_ARRAY },
 
	{ 'ROAD', Save_ROADSTOP, Load_ROADSTOP, Ptrs_ROADSTOP, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/strings_sl.cpp
Show inline comments
 
@@ -122,8 +122,8 @@ static void Load_NAME()
 
	while ((index = SlIterateArray()) != -1) {
 
		SlArray(&_old_name_array[32 * index], SlGetFieldLength(), SLE_UINT8);
 
	}
 
}
 

	
 
extern const ChunkHandler _name_chunk_handlers[] = {
 
	{ 'NAME', NULL, Load_NAME, NULL, CH_ARRAY | CH_LAST},
 
	{ 'NAME', NULL, Load_NAME, NULL, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/subsidy_sl.cpp
Show inline comments
 
@@ -43,8 +43,8 @@ static void Load_SUBS()
 
		Subsidy *s = new (index) Subsidy();
 
		SlObject(s, _subsidies_desc);
 
	}
 
}
 

	
 
extern const ChunkHandler _subsidy_chunk_handlers[] = {
 
	{ 'SUBS', Save_SUBS, Load_SUBS, NULL, CH_ARRAY | CH_LAST},
 
	{ 'SUBS', Save_SUBS, Load_SUBS, NULL, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/town_sl.cpp
Show inline comments
 
@@ -189,9 +189,9 @@ static void Load_TOWN()
 
		Town *t = new (index) Town();
 
		SlObject(t, _town_desc);
 
	}
 
}
 

	
 
extern const ChunkHandler _town_chunk_handlers[] = {
 
	{ 'HIDS', Save_HOUSEIDS, Load_HOUSEIDS, NULL, CH_ARRAY },
 
	{ 'CITY', Save_TOWN,     Load_TOWN,     NULL, CH_ARRAY | CH_LAST},
 
	{ 'HIDS', Save_HOUSEIDS, Load_HOUSEIDS, NULL, NULL, CH_ARRAY },
 
	{ 'CITY', Save_TOWN,     Load_TOWN,     NULL, NULL, CH_ARRAY | CH_LAST},
 
};
src/saveload/vehicle_sl.cpp
Show inline comments
 
@@ -754,8 +754,8 @@ static void Ptrs_VEHS()
 
	FOR_ALL_VEHICLES(v) {
 
		SlObject(v, GetVehicleDescription(v->type));
 
	}
 
}
 

	
 
extern const ChunkHandler _veh_chunk_handlers[] = {
 
	{ 'VEHS', Save_VEHS, Load_VEHS, Ptrs_VEHS, CH_SPARSE_ARRAY | CH_LAST},
 
	{ 'VEHS', Save_VEHS, Load_VEHS, Ptrs_VEHS, NULL, CH_SPARSE_ARRAY | CH_LAST},
 
};
src/saveload/waypoint_sl.cpp
Show inline comments
 
@@ -196,8 +196,8 @@ static void Ptrs_WAYP()
 
			wp->name = CopyFromOldName(wp->string_id);
 
		}
 
	}
 
}
 

	
 
extern const ChunkHandler _waypoint_chunk_handlers[] = {
 
	{ 'CHKP', NULL, Load_WAYP, Ptrs_WAYP, CH_ARRAY | CH_LAST},
 
	{ 'CHKP', NULL, Load_WAYP, Ptrs_WAYP, NULL, CH_ARRAY | CH_LAST},
 
};
src/settings.cpp
Show inline comments
 
@@ -1982,14 +1982,14 @@ void CheckConfig()
 
		_settings_newgame.pf.opf.pf_maxdepth = 48;
 
		_settings_newgame.pf.opf.pf_maxlength = 4096;
 
	}
 
}
 

	
 
extern const ChunkHandler _setting_chunk_handlers[] = {
 
	{ 'OPTS', NULL,      Load_OPTS, NULL, CH_RIFF},
 
	{ 'PATS', Save_PATS, Load_PATS, NULL, CH_RIFF | CH_LAST},
 
	{ 'OPTS', NULL,      Load_OPTS, NULL, NULL, CH_RIFF},
 
	{ 'PATS', Save_PATS, Load_PATS, NULL, NULL, CH_RIFF | CH_LAST},
 
};
 

	
 
static bool IsSignedVarMemType(VarType vt)
 
{
 
	switch (GetVarMemType(vt)) {
 
		case SLE_VAR_I8:
0 comments (0 inline, 0 general)