projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed "http" to "https" in URLs
[rocksndiamonds.git]
/
src
/
libgame
/
snapshot.c
diff --git
a/src/libgame/snapshot.c
b/src/libgame/snapshot.c
index 1059eb954fc858616754b7f4722467fafd644400..010db6e66314dde452f6c7e00fe3ffd370ac1772 100644
(file)
--- a/
src/libgame/snapshot.c
+++ b/
src/libgame/snapshot.c
@@
-4,7
+4,7
@@
// (c) 1995-2014 by Artsoft Entertainment
// Holger Schemel
// info@artsoft.org
// (c) 1995-2014 by Artsoft Entertainment
// Holger Schemel
// info@artsoft.org
-// http://www.artsoft.org/
+// http
s
://www.artsoft.org/
// ----------------------------------------------------------------------------
// snapshot.c
// ============================================================================
// ----------------------------------------------------------------------------
// snapshot.c
// ============================================================================
@@
-16,12
+16,6
@@
#define DEBUG_SNAPSHOTS 0
#endif
#define DEBUG_SNAPSHOTS 0
#endif
-#if DEBUG_SNAPSHOTS
-#define MAX_SNAPSHOT_BYTES (50 * 1024 * 1024)
-#else
-#define MAX_SNAPSHOT_BYTES (500 * 1024 * 1024)
-#endif
-
static ListNode *snapshot_single = NULL;
static ListNode *snapshot_list = NULL;
static ListNode *snapshot_current = NULL;
static ListNode *snapshot_single = NULL;
static ListNode *snapshot_list = NULL;
static ListNode *snapshot_current = NULL;
@@
-94,7
+88,7
@@
static void FreeSnapshot(void *snapshot_buffers_ptr)
FreeSnapshotBuffers(snapshot_buffers_ptr);
}
FreeSnapshotBuffers(snapshot_buffers_ptr);
}
-void FreeSnapshotSingle()
+void FreeSnapshotSingle(
void
)
{
FreeSnapshotBuffers(snapshot_single);
{
FreeSnapshotBuffers(snapshot_single);
@@
-117,7
+111,7
@@
static void FreeSnapshotList_UpToNode(ListNode *node)
}
}
}
}
-void FreeSnapshotList()
+void FreeSnapshotList(
void
)
{
#if DEBUG_SNAPSHOTS
printf("::: FreeSnapshotList()\n");
{
#if DEBUG_SNAPSHOTS
printf("::: FreeSnapshotList()\n");
@@
-133,7
+127,7
@@
void FreeSnapshotList()
snapshot_current = NULL;
}
snapshot_current = NULL;
}
-
void ReduceSnapshotList(
)
+
static void ReduceSnapshotList(void
)
{
#if DEBUG_SNAPSHOTS
printf("::: (Reducing number of snapshots from %d ",
{
#if DEBUG_SNAPSHOTS
printf("::: (Reducing number of snapshots from %d ",
@@
-204,11
+198,11
@@
void SaveSnapshotToList(ListNode *snapshot_buffers)
num_snapshots++;
next_snapshot_key++;
num_snapshots++;
next_snapshot_key++;
- if (num_snapshot_bytes >
MAX_SNAPSHOT_BYTES
)
+ if (num_snapshot_bytes >
setup.engine_snapshot_memory
)
ReduceSnapshotList();
}
ReduceSnapshotList();
}
-boolean LoadSnapshotSingle()
+boolean LoadSnapshotSingle(
void
)
{
if (snapshot_single)
{
{
if (snapshot_single)
{
@@
-258,7
+252,7
@@
boolean LoadSnapshotFromList_Newer(int steps)
return FALSE;
}
return FALSE;
}
-boolean CheckSnapshotList()
+boolean CheckSnapshotList(
void
)
{
return (snapshot_list ? TRUE : FALSE);
}
{
return (snapshot_list ? TRUE : FALSE);
}