File diff r25773:457e167f3c9e → r25774:14ee6e7f4ecc
src/saveload/gamelog_sl.cpp
Show inline comments
 
@@ -339,28 +339,25 @@ public:
 
	}
 

	
 
	void LoadCheck(LoggedAction *la) const override { this->Load(la); }
 
};
 

	
 
static const SaveLoad _gamelog_desc[] = {
 
	SLE_CONDVAR(LoggedAction, at,            SLE_UINT8,   SLV_RIFF_TO_ARRAY, SL_MAX_VERSION),
 
	SLE_VAR(LoggedAction, tick,              SLE_UINT16),
 
	SLEG_STRUCTLIST("action", SlGamelogAction),
 
};
 

	
 
struct GLOGChunkHandler : ChunkHandler {
 
	GLOGChunkHandler() : ChunkHandler('GLOG', CH_TABLE)
 
	{
 
		this->load_check = true;
 
	}
 
	GLOGChunkHandler() : ChunkHandler('GLOG', CH_TABLE) {}
 

	
 
	void LoadCommon(LoggedAction *&gamelog_action, uint &gamelog_actions) const
 
	{
 
		assert(gamelog_action == nullptr);
 
		assert(gamelog_actions == 0);
 

	
 
		const std::vector<SaveLoad> slt = SlCompatTableHeader(_gamelog_desc, _gamelog_sl_compat);
 

	
 
		if (IsSavegameVersionBefore(SLV_RIFF_TO_ARRAY)) {
 
			byte type;
 
			while ((type = SlReadByte()) != GLAT_NONE) {
 
				if (type >= GLAT_END) SlErrorCorrupt("Invalid gamelog action type");