changeset 82:154714f3ab2e

Move declarations around a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 26 Sep 2011 17:56:33 +0300
parents 7ed31bc85504
children 002bc70a3982
files src/yadex.cc
diffstat 1 files changed, 17 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/yadex.cc	Mon Sep 26 17:40:20 2011 +0300
+++ b/src/yadex.cc	Mon Sep 26 17:56:33 2011 +0300
@@ -60,17 +60,33 @@
 #include <readline/history.h>
 #endif
 
-const char *const yadex_log_filename = "yadex.log";
 
 
 /*
  *        Global variables
  */
+const char *const yadex_log_filename = "yadex.log";
+
+yglf_t yg_level_format = YGLF__;
+ygln_t yg_level_name = YGLN__;
+ygpf_t yg_picture_format = YGPF_NORMAL;
+ygtf_t yg_texture_format = YGTF_NORMAL;
+ygtl_t yg_texture_lumps = YGTL_NORMAL;
+al_llist_t *ldtdef = NULL;
+al_llist_t *ldtgroup = NULL;
+al_llist_t *stdef = NULL;
+al_llist_t *thingdef = NULL;
+al_llist_t *thinggroup = NULL;
+Wad_name sky_flat;
+
+
 Wad_res      wad_res(&cfg.MasterDir);
 YadexConfig  cfg;
 
 void InitializeConfig()
 {
+    memset(cfg, 0, sizeof(cfg));
+
     cfg.install_dir = NULL,        // Where Yadex is installed
     cfg.logfile = NULL,                // Filepointer to the error log
     cfg.Registered = false,        // Registered or shareware game?
@@ -137,20 +153,6 @@
 }
 
 
-// Global variables declared in game.h
-yglf_t yg_level_format = YGLF__;
-ygln_t yg_level_name = YGLN__;
-ygpf_t yg_picture_format = YGPF_NORMAL;
-ygtf_t yg_texture_format = YGTF_NORMAL;
-ygtl_t yg_texture_lumps = YGTL_NORMAL;
-al_llist_t *ldtdef = NULL;
-al_llist_t *ldtgroup = NULL;
-al_llist_t *stdef = NULL;
-al_llist_t *thingdef = NULL;
-al_llist_t *thinggroup = NULL;
-Wad_name sky_flat;
-
-
 /*
  *        Prototypes of private functions
  */