added asking for and uploading tapes to score server (only once)
[rocksndiamonds.git] / src / libgame / snapshot.h
1 // ============================================================================
2 // Artsoft Retro-Game Library
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
5 //                  Holger Schemel
6 //                  info@artsoft.org
7 //                  https://www.artsoft.org/
8 // ----------------------------------------------------------------------------
9 // snapshot.h
10 // ============================================================================
11
12 #ifndef SNAPSHOT_H
13 #define SNAPSHOT_H
14
15 #include "system.h"
16 #include "misc.h"
17
18
19 #define SNAPSHOT_MEMORY_DEFAULT         (512 * 1024 * 1024)
20
21 // needed for comfortably saving engine snapshot buffers
22 #define ARGS_ADDRESS_AND_SIZEOF(x)      (&(x)), (sizeof(x))
23
24 struct SnapshotNodeInfo
25 {
26   void *buffer_orig;
27   void *buffer_copy;
28   int size;
29 };
30
31
32 void SaveSnapshotBuffer(ListNode **, void *, int);
33 void LoadSnapshotBuffers(ListNode *);
34 void FreeSnapshotBuffers(ListNode *);
35
36 void SaveSnapshotSingle(ListNode *);
37 void SaveSnapshotToList(ListNode *);
38 boolean LoadSnapshotSingle(void);
39 boolean LoadSnapshotFromList_Older(int);
40 boolean LoadSnapshotFromList_Newer(int);
41 boolean CheckSnapshotList(void);
42 void FreeSnapshotSingle(void);
43 void FreeSnapshotList(void);
44
45 #endif  // SNAPSHOT_H