Removed gettextdbg() which apparently served no purpose whatsoever.
[neverball] / share / config.h
index b5c7646..b8ceda1 100644 (file)
 #ifndef CONFIG_H
 #define CONFIG_H
 
-#include <SDL.h>
-#include <stdio.h>
-
-/*---------------------------------------------------------------------------*/
-
-#define CONFIG_DATA "./data"
-#define CONFIG_USER ".neverball"
-
 /*
- * Global settings are stored in USER_CONFIG_FILE.  Replays are stored
- * in  USER_REPLAY_FILE.  These files  are placed  in the  user's home
- * directory as given by the HOME environment var.  If the config file
- * is deleted, it will be recreated using the defaults.
+ * This file contains:
+ * 1- some global config methods (stored in a config file)
+ * 2- some SDL based functions
+ *
+ * If you're looking for constants, you should also see base_config.h
  */
-#define USER_CONFIG_FILE "neverballrc"
-#define USER_REPLAY_FILE "Last"
 
-/*---------------------------------------------------------------------------*/
-
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
-#define RMASK 0xFF000000
-#define GMASK 0x00FF0000
-#define BMASK 0x0000FF00
-#define AMASK 0x000000FF
-#else
-#define RMASK 0x000000FF
-#define GMASK 0x0000FF00
-#define BMASK 0x00FF0000
-#define AMASK 0xFF000000
-#endif
-
-#ifdef _WIN32
-#define FMODE_RB "rb"
-#define FMODE_WB "wb"
-#else
-#define FMODE_RB "r"
-#define FMODE_WB "w"
-#endif
-
-#ifdef _WIN32
-#define AUDIO_BUFF_HI 4096
-#define AUDIO_BUFF_LO 2048
-#else
-#define AUDIO_BUFF_HI 2048
-#define AUDIO_BUFF_LO 1024
-#endif
+#include <SDL.h>
+#include "base_config.h"
 
 /*---------------------------------------------------------------------------*/
 
@@ -106,6 +70,8 @@ enum {
     CONFIG_VIEW_DZ,
     CONFIG_ROTATE_FAST,
     CONFIG_ROTATE_SLOW,
+    CONFIG_MODE,
+    CONFIG_CHEAT,
 
     CONFIG_OPTION_D_COUNT
 };
@@ -113,7 +79,8 @@ enum {
 enum {
     CONFIG_PLAYER,
     CONFIG_BALL,
-    CONFIG_COIN,
+    CONFIG_BALL_BONUS,
+    CONFIG_LANG,
 
     CONFIG_OPTION_S_COUNT
 };
@@ -161,18 +128,12 @@ enum {
 #define DEFAULT_VIEW_DZ              200
 #define DEFAULT_ROTATE_SLOW          100
 #define DEFAULT_ROTATE_FAST          200
-#define DEFAULT_PLAYER               "Player"
+#define DEFAULT_MODE                 1
+#define DEFAULT_CHEAT                0
+#define DEFAULT_PLAYER               ""
 #define DEFAULT_BALL                 "png/ball.png"
-#define DEFAULT_COIN                 "png/coin.png"
-
-/*---------------------------------------------------------------------------*/
-
-#define JOY_MAX 32767
-#define JOY_MID 16383
-
-#define MAXSTR 256
-#define MAXLVL 26
-#define MAXNAM 9
+#define DEFAULT_BALL_BONUS           "png/ball-bonus.png"
+#define DEFAULT_LANG                 ""
 
 /*---------------------------------------------------------------------------*/
 
@@ -181,12 +142,6 @@ void config_load(void);
 void config_save(void);
 int  config_mode(int, int, int);
 
-const char *config_data(const char *);
-const char *config_user(const char *);
-
-int  config_data_path(const char *, const char *);
-int  config_user_path(const char *);
-
 /*---------------------------------------------------------------------------*/
 
 void config_set_d(int, int);
@@ -194,8 +149,10 @@ void config_tgl_d(int);
 int  config_tst_d(int, int);
 int  config_get_d(int);
 
-void config_set_s(int, char *);
+void config_set_s(int, const char *);
 void config_get_s(int, char *, int);
+const char *config_simple_get_s(int i);
+
 
 /*---------------------------------------------------------------------------*/