1 #ifndef PLAYBACKSTRUCTS_H_INCLUDED 2 #define PLAYBACKSTRUCTS_H_INCLUDED 3 4 #include "../offlinebattle.h" 5 6 struct Replay 7 { 8 int id; 9 int playernum; 10 bool can_watch; 11 int duration; //in seconds 12 int size; //in bytes 13 wxString MapName; 14 wxString ModName; 15 wxString SpringVersion; 16 wxString Filename; 17 time_t date; 18 wxString date_string; 19 OfflineBattle battle; 20 Replay( const size_t idx = 0): idReplay21 id(idx), 22 playernum(0), 23 can_watch(false), 24 duration(0), 25 size(0), 26 date(0) 27 { 28 } 29 EqualsReplay30 bool Equals( const Replay& other ) const { return Filename == other.Filename; } 31 }; 32 33 struct Savegame 34 { 35 int id; 36 int playernum; 37 bool can_watch; 38 int duration; //in seconds 39 unsigned long size; //in bytes 40 wxString MapName; 41 wxString ModName; 42 wxString SpringVersion; 43 wxString Filename; 44 time_t date; 45 wxString date_string; 46 OfflineBattle battle; 47 Savegame(const size_t idx = 0): idSavegame48 id(idx), 49 playernum(0), 50 can_watch(false), 51 duration(0), 52 size(0), 53 date(0) 54 { 55 } 56 EqualsSavegame57 bool Equals( const Savegame& other ) const { return Filename == other.Filename; } 58 }; 59 60 61 62 #endif // PLAYBACKSTRUCTS_H_INCLUDED 63