(svn r3622) - Partly revert r3214. The patch setting max_num_autosaves stays to help control PDA-troubles which the commit was intended for. Didn't revert makefile-config version since it would cause trouble. But Bjarni promised to rewrite it :)
authorDarkvater
Mon, 20 Feb 2006 17:54:25 +0000
changeset 3042 e0716d89aba0
parent 3041 105098f42dfa
child 3043 cb8509834e42
(svn r3622) - Partly revert r3214. The patch setting max_num_autosaves stays to help control PDA-troubles which the commit was intended for. Didn't revert makefile-config version since it would cause trouble. But Bjarni promised to rewrite it :)
Makefile
makefiledir/Makefile.config_writer
settings.c
--- a/Makefile	Mon Feb 20 17:49:26 2006 +0000
+++ b/Makefile	Mon Feb 20 17:54:25 2006 +0000
@@ -59,9 +59,6 @@
 # WITH_DIRECTMUSIC: enable DirectMusic MIDI support
 # WITH_NETWORK: enable networking
 # DEDICATED: allows compilation on UNIX without SDL. Useful for dedicated servers
-# MAX_NUM_AUTOSAVES: sets the number of autosaves the games will make before starting
-#		to overwrite the old ones. If not set, the game will use 16.
-#		NOTE: assign a number, not a string of a number
 #
 # Paths:
 # INSTALL: If not set, the game uses the directory of the binary to
@@ -534,10 +531,6 @@
 endif
 endif
 
-ifdef MAX_NUM_AUTOSAVES
-CDEFS += -DMAX_NUM_AUTOSAVES=$(MAX_NUM_AUTOSAVES)
-endif
-
 ifdef WITH_NETWORK
 CDEFS += -DENABLE_NETWORK
 ifdef QNX
--- a/makefiledir/Makefile.config_writer	Mon Feb 20 17:49:26 2006 +0000
+++ b/makefiledir/Makefile.config_writer	Mon Feb 20 17:54:25 2006 +0000
@@ -18,7 +18,6 @@
 	$(call CONFIG_LINE,\# SUPRESS_LANG_ERRORS: supresses output about missing and mismatched strings)
 	$(call CONFIG_LINE,\# WITH_NETWORK: makes OpenTTD able to play multiplayer using TCP and UDP)
 	$(call CONFIG_LINE,\# DEDICATED: compiles a dedicated server. This one can only host using a CLI, but do not need SDL)
-	$(call CONFIG_LINE,\# MAX_NUM_AUTOSAVES: sets the max number of autosaves the game keeps before overwriting old ones)
 	$(call CONFIG_LINE,STATIC:=$(STATIC))
 	$(call CONFIG_LINE,TRANSLATOR:=$(TRANSLATOR))
 	$(call CONFIG_LINE,DEBUG:=$(DEBUG))
@@ -29,7 +28,6 @@
 	$(call CONFIG_LINE,WITH_DIRECTMUSIC:=$(WITH_DIRECTMUSIC))
 	$(call CONFIG_LINE,WITH_NETWORK:=$(WITH_NETWORK))
 	$(call CONFIG_LINE,DEDICATED:=$(DEDICATED))
-	$(call CONFIG_LINE,MAX_NUM_AUTOSAVES:=$(MAX_NUM_AUTOSAVES))
 	$(call CONFIG_LINE,)
 
 	$(call CONFIG_LINE,\# Disable asserts. Leave them on for easier bug finding)
--- a/settings.c	Mon Feb 20 17:49:26 2006 +0000
+++ b/settings.c	Mon Feb 20 17:54:25 2006 +0000
@@ -863,11 +863,6 @@
   {NULL,          0,                          NULL,     NULL,                     NULL}
 };
 
-#if !defined(MAX_NUM_AUTOSAVES)
-// no custom default max number of autosaves have been set in the makefile, so we will set the default max to 16
-#define MAX_NUM_AUTOSAVES 16
-#endif
-
 // The player-based settings (are not send over the network)
 // Not everything can just be added to this list. For example, service_interval
 //  can not be done, because every client assigns the service_interval value to the
@@ -892,7 +887,7 @@
 	{"toolbar_pos",					SDT_UINT8,	(void*)0,			&_patches.toolbar_pos,					NULL},
 	{"keep_all_autosave",		SDT_BOOL,		(void*)false, &_patches.keep_all_autosave,		NULL},
 	{"autosave_on_exit",		SDT_BOOL,		(void*)false, &_patches.autosave_on_exit,			NULL},
-	{"max_autosave_num",			SDT_UINT8, (void*)MAX_NUM_AUTOSAVES,		&_patches.max_num_autosaves,			NULL},
+	{"max_autosave_num",			SDT_UINT8, (void*)16,		&_patches.max_num_autosaves,			NULL},
 
 	{"bridge_pillars",			SDT_BOOL,		(void*)true,	&_patches.bridge_pillars,				NULL},
 	{"invisible_trees",			SDT_BOOL,		(void*)false, &_patches.invisible_trees,			NULL},