git repos / blockattack-game

blame: source/code/replayhandler.hpp

normal view · raw

76514d10 sago007 2016-06-05 20:25 1
/*
76514d10 sago007 2016-06-05 20:25 2
===========================================================================
76514d10 sago007 2016-06-05 20:25 3
blockattack - Block Attack - Rise of the Blocks
76514d10 sago007 2016-06-05 20:25 4
Copyright (C) 2005-2016 Poul Sander
76514d10 sago007 2016-06-05 20:25 5
76514d10 sago007 2016-06-05 20:25 6
This program is free software: you can redistribute it and/or modify
76514d10 sago007 2016-06-05 20:25 7
it under the terms of the GNU General Public License as published by
76514d10 sago007 2016-06-05 20:25 8
the Free Software Foundation, either version 2 of the License, or
76514d10 sago007 2016-06-05 20:25 9
(at your option) any later version.
76514d10 sago007 2016-06-05 20:25 10
76514d10 sago007 2016-06-05 20:25 11
This program is distributed in the hope that it will be useful,
76514d10 sago007 2016-06-05 20:25 12
but WITHOUT ANY WARRANTY; without even the implied warranty of
76514d10 sago007 2016-06-05 20:25 13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
76514d10 sago007 2016-06-05 20:25 14
GNU General Public License for more details.
76514d10 sago007 2016-06-05 20:25 15
76514d10 sago007 2016-06-05 20:25 16
You should have received a copy of the GNU General Public License
76514d10 sago007 2016-06-05 20:25 17
along with this program.  If not, see http://www.gnu.org/licenses/
76514d10 sago007 2016-06-05 20:25 18
76514d10 sago007 2016-06-05 20:25 19
Source information and contacts persons can be found at
76514d10 sago007 2016-06-05 20:25 20
http://www.blockattack.net
76514d10 sago007 2016-06-05 20:25 21
===========================================================================
76514d10 sago007 2016-06-05 20:25 22
*/
76514d10 sago007 2016-06-05 20:25 23
76514d10 sago007 2016-06-05 20:25 24
#include "BlockGame.hpp"
76514d10 sago007 2016-06-05 20:25 25
#include "cereal/types/vector.hpp"
76514d10 sago007 2016-06-05 20:25 26
76514d10 sago007 2016-06-05 20:25 27
struct SavedReplayStruct {
76514d10 sago007 2016-06-05 20:25 28
	int numberOfPlayers = 0;
76514d10 sago007 2016-06-05 20:25 29
	std::vector<BlockGameInfo> playerInfo;
76514d10 sago007 2016-06-05 20:25 30
	template <class Archive>
5d601060 Poul Sander 2023-10-26 21:00 31
	void serialize( Archive& ar ) {
76514d10 sago007 2016-06-05 20:25 32
		ar( CEREAL_NVP(numberOfPlayers), CEREAL_NVP(playerInfo) );
76514d10 sago007 2016-06-05 20:25 33
	}
76514d10 sago007 2016-06-05 20:25 34
};
76514d10 sago007 2016-06-05 20:25 35
76514d10 sago007 2016-06-05 20:25 36
void SaveReplay(const BlockGameInfo& game1);
76514d10 sago007 2016-06-05 20:25 37
76514d10 sago007 2016-06-05 20:25 38
void SaveReplay(const BlockGameInfo& game1, const BlockGameInfo& game2);