removed unused code for writable game data directory
authorHolger Schemel <info@artsoft.org>
Fri, 14 May 2021 16:54:23 +0000 (18:54 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 14 May 2021 16:57:27 +0000 (18:57 +0200)
Makefile
src/Makefile
src/libgame/misc.c
src/libgame/system.h

index ae6b318d4c73c45706a88eb7d617e335fed18045..3e03456bb89f7c0ffe20260e2dc1d7716820adfd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,13 +28,6 @@ MAKE = make
 # use the following setting for Debian / Ubuntu installations:
 # RO_GAME_DIR = /usr/share/games/rocksndiamonds
 
-# directory for writable game data (like highscore files)
-# (if no "scores" directory exists, scores are saved in user data directory)
-# default is '.' to be able to run program without installation
-# RW_GAME_DIR = .
-# use the following setting for Debian / Ubuntu installations:
-# RW_GAME_DIR = /var/games/rocksndiamonds
-
 # uncomment if system has no joystick include file
 # JOYSTICK = -DNO_JOYSTICK
 
index f40ada2966c14b4c33ee06d2f5f2ae02ed648949..5f57dd34f0a2825547463c8a568b83322456bbb9 100644 (file)
@@ -118,11 +118,7 @@ ifdef RO_GAME_DIR                  # path to read-only game data specified
 CONFIG_RO_GAME_DIR = -DRO_GAME_DIR="\"$(RO_GAME_DIR)\""
 endif
 
-ifdef RW_GAME_DIR                      # path to writable game data specified
-CONFIG_RW_GAME_DIR = -DRW_GAME_DIR="\"$(RW_GAME_DIR)\""
-endif
-
-CONFIG = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR) $(JOYSTICK)
+CONFIG = $(CONFIG_RO_GAME_DIR) $(JOYSTICK)
 
 DEBUG = -DDEBUG -g
 
index 8dda88bcf6a700392953cf0ae77c71f929647e96..a81f15532538efaa163fb591c1261108fc7dd53c 100644 (file)
@@ -1241,7 +1241,6 @@ void GetOptions(int argc, char *argv[],
                void (*print_version_function)(void))
 {
   char *ro_base_path = getProgramMainDataPath(argv[0], RO_BASE_PATH);
-  char *rw_base_path = getProgramMainDataPath(argv[0], RW_BASE_PATH);
   char **argvplus = checked_calloc((argc + 1) * sizeof(char **));
   char **options_left = &argvplus[1];
 
@@ -1254,7 +1253,6 @@ void GetOptions(int argc, char *argv[],
   options.server_port = 0;
 
   options.ro_base_directory = ro_base_path;
-  options.rw_base_directory = rw_base_path;
   options.level_directory    = getPath2(ro_base_path, LEVELS_DIRECTORY);
   options.graphics_directory = getPath2(ro_base_path, GRAPHICS_DIRECTORY);
   options.sounds_directory   = getPath2(ro_base_path, SOUNDS_DIRECTORY);
@@ -1334,9 +1332,7 @@ void GetOptions(int argc, char *argv[],
       if (option_arg == NULL)
        FailWithHelp("option '%s' requires an argument", option_str);
 
-      // this should be extended to separate options for ro and rw data
       options.ro_base_directory = ro_base_path = getStringCopy(option_arg);
-      options.rw_base_directory = rw_base_path = getStringCopy(option_arg);
       if (option_arg == next_option)
        options_left++;
 
index 9d44373cf42c54cf0f4d036f98c843fe2b43aed5..e93122a8099b33d9daf44d567e7faf2020ff7227 100644 (file)
 #define RO_GAME_DIR            "."
 #endif
 
-#ifndef RW_GAME_DIR
-#define RW_GAME_DIR            "."
-#endif
-
 #define RO_BASE_PATH           RO_GAME_DIR
-#define RW_BASE_PATH           RW_GAME_DIR
 
 // directory names
 #define GRAPHICS_DIRECTORY     "graphics"
@@ -1046,7 +1041,6 @@ struct OptionInfo
   int server_port;
 
   char *ro_base_directory;
-  char *rw_base_directory;
   char *level_directory;
   char *graphics_directory;
   char *sounds_directory;