changeset 83:002bc70a3982

More cleanups. Mostly variable renames.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 26 Sep 2011 18:06:30 +0300
parents 154714f3ab2e
children c518e08d5961
files src/cfgfile.cc src/checks.cc src/editlev.cc src/editloop.cc src/editobj.cc src/levels.cc src/locate.cc src/s_door.cc src/v_merge.cc src/wads.cc src/wads2.cc src/yadex.cc src/yadex.h
diffstat 13 files changed, 82 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/src/cfgfile.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/cfgfile.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -114,7 +114,7 @@
 /* The first option has neither long name nor short name.
    It is used for "lonely" arguments (i.e. file names). */
 OptionDesc options[] = {
-    {NULL,                        NULL, OPT_STRINGPTRACC,  NULL, "Patch wad file", &cfg.PatchWads },
+    {NULL,                        NULL, OPT_STRINGPTRACC,  NULL, "Patch wad file", &cfg.patchwads },
     {"autoscroll",                NULL, OPT_BOOLEAN,       NULL, "Enable autoscrolling", &cfg.autoscroll },
     {"autoscroll_amp",            NULL, OPT_UNSIGNED,      NULL, "Amp. of scrolling (% of screen size)", &cfg.autoscroll_amp},
     {"autoscroll_edge",           NULL, OPT_UNSIGNED,      NULL, "Max. dist. to edge (pixels)", &cfg.autoscroll_edge},
@@ -122,7 +122,7 @@
     {"blindly_swap_sidedefs",     NULL, OPT_BOOLEAN,       NULL, "Blindly swap sidedefs on a linedef",     &cfg.blindly_swap_sidedefs},
     {"config_file",               "f",  OPT_STRINGPTR,     "1",  "Config file",     &cfg.config_file},
     {"copy_linedef_reuse_sidedefs",NULL,OPT_BOOLEAN,       NULL, "Use same sidedefs as original linedef",     &cfg.copy_linedef_reuse_sidedefs},
-    {"debug",                     "d",  OPT_BOOLEAN,       NULL, "Debug mode",     &cfg.Debug},
+    {"debug",                     "d",  OPT_BOOLEAN,       NULL, "Debug mode",     &cfg.debug},
 
     {"default_ceiling_height",    NULL, OPT_INTEGER,       NULL, "Default ceiling height",     &cfg.def.ceiling_height},
     {"default_ceiling_texture",   NULL, OPT_STRINGBUF8,    NULL, "Default ceiling texture",     cfg.def.ceiling_texture},
@@ -137,8 +137,8 @@
     {"digit_zoom_base",           NULL, OPT_INTEGER,       NULL, "[0]-[9]: base zoom factor (in %)",     &cfg.digit_zoom_base},
     {"digit_zoom_step",           NULL, OPT_INTEGER,       NULL, "[0]-[9]: step between factors (in %)",     &cfg.digit_zoom_step},
     {"double_click_timeout",      NULL, OPT_INTEGER,       NULL, "Max delay in ms between clicks",     &cfg.double_click_timeout},
-    {"expert",                    NULL, OPT_BOOLEAN,       NULL, "Expert mode",     &cfg.Expert},
-    {"file",                      NULL, OPT_STRINGPTRLIST, NULL, "Patch wad file",     &cfg.PatchWads},
+    {"expert",                    NULL, OPT_BOOLEAN,       NULL, "Expert mode",     &cfg.expert},
+    {"file",                      NULL, OPT_STRINGPTRLIST, NULL, "Patch wad file",     &cfg.patchwads},
     {"font",                      "fn", OPT_STRINGPTR,     NULL, "(X11 only) Font name",     &font_name},
     {"game",                      "g",  OPT_STRINGPTR,     NULL, "Game",     &cfg.Game},
     {"grid_max",                  NULL, OPT_INTEGER,       NULL, "Max grid step (map units)",     &cfg.GridMax},
@@ -150,25 +150,25 @@
     {"info_bar",                  NULL, OPT_BOOLEAN,       NULL, "Show the info bar",     &cfg.InfoShown},
     {"insert_vertex_split_linedef",NULL,OPT_CONFIRM,       NULL, "Split ld after ins. vertex",     &cfg.insert_vertex_split_linedef},
     {"insert_vertex_merge_vertices",NULL,OPT_CONFIRM,      NULL, "Merge vertices after ins. vertex",     &cfg.insert_vertex_merge_vertices},
-    {"iwad1",                     "i1", OPT_STRINGPTR,     NULL, "The name of the Doom/Ultimate D. iwad",    &cfg.Iwad[0]},
-    {"iwad2",                     "i2", OPT_STRINGPTR,     NULL, "The name of the Doom II/Final D. iwad",    &cfg.Iwad[1]},
-    {"iwad3",                     "i3", OPT_STRINGPTR,     NULL, "The name of the Heretic iwad",             &cfg.Iwad[2]},
-    {"iwad4",                     "i4", OPT_STRINGPTR,     NULL, "The name of the Hexen iwad",               &cfg.Iwad[3]},
-    {"iwad5",                     "i5", OPT_STRINGPTR,     NULL, "The name of the Strife iwad",              &cfg.Iwad[4]},
-    {"iwad6",                     "i6", OPT_STRINGPTR,     NULL, "The name of the Doom alpha 0.2 iwad",      &cfg.Iwad[5]},
-    {"iwad7",                     "i7", OPT_STRINGPTR,     NULL, "The name of the Doom alpha 0.4 iwad",      &cfg.Iwad[6]},
-    {"iwad8",                     "i8", OPT_STRINGPTR,     NULL, "The name of the Doom alpha 0.5 iwad",      &cfg.Iwad[7]},
-    {"iwad9",                     "i9", OPT_STRINGPTR,     NULL, "The name of the Doom press rel. iwad",     &cfg.Iwad[8]},
-    {"iwad10",                    "i10",OPT_STRINGPTR,     NULL, "The name of the Strife 1.0 iwad",          &cfg.Iwad[9]},
+    {"iwad1",                     "i1", OPT_STRINGPTR,     NULL, "The name of the Doom/Ultimate D. iwad",    &cfg.iwadnames[0]},
+    {"iwad2",                     "i2", OPT_STRINGPTR,     NULL, "The name of the Doom II/Final D. iwad",    &cfg.iwadnames[1]},
+    {"iwad3",                     "i3", OPT_STRINGPTR,     NULL, "The name of the Heretic iwad",             &cfg.iwadnames[2]},
+    {"iwad4",                     "i4", OPT_STRINGPTR,     NULL, "The name of the Hexen iwad",               &cfg.iwadnames[3]},
+    {"iwad5",                     "i5", OPT_STRINGPTR,     NULL, "The name of the Strife iwad",              &cfg.iwadnames[4]},
+    {"iwad6",                     "i6", OPT_STRINGPTR,     NULL, "The name of the Doom alpha 0.2 iwad",      &cfg.iwadnames[5]},
+    {"iwad7",                     "i7", OPT_STRINGPTR,     NULL, "The name of the Doom alpha 0.4 iwad",      &cfg.iwadnames[6]},
+    {"iwad8",                     "i8", OPT_STRINGPTR,     NULL, "The name of the Doom alpha 0.5 iwad",      &cfg.iwadnames[7]},
+    {"iwad9",                     "i9", OPT_STRINGPTR,     NULL, "The name of the Doom press rel. iwad",     &cfg.iwadnames[8]},
+    {"iwad10",                    "i10",OPT_STRINGPTR,     NULL, "The name of the Strife 1.0 iwad",          &cfg.iwadnames[9]},
     {"no_pixmap",                 "P",  OPT_BOOLEAN,       NULL, "(X11 only) Use no pixmap",     &cfg.no_pixmap},
-    {"pwad",                      "pw", OPT_STRINGPTRACC,  NULL, "Pwad file to load",     &cfg.PatchWads},
-    {"quiet",                     "q",  OPT_BOOLEAN,       NULL, "Quiet mode",     &cfg.Quiet},
-    {"quieter",                   "qq", OPT_BOOLEAN,       NULL, "Quieter mode",     &cfg.Quieter},
+    {"pwad",                      "pw", OPT_STRINGPTRACC,  NULL, "Pwad file to load",     &cfg.patchwads},
+    {"quiet",                     "q",  OPT_BOOLEAN,       NULL, "Quiet mode",     &cfg.quiet},
+    {"quieter",                   "qq", OPT_BOOLEAN,       NULL, "Quieter mode",     &cfg.quieter},
     {"scroll_less",               NULL, OPT_UNSIGNED,      NULL, "Amp. of scrolling (% of screen size)",     &cfg.scroll_less},
     {"scroll_more",               NULL, OPT_UNSIGNED,      NULL, "Amp. of scrolling (% of screen size)",     &cfg.scroll_more},
-    {"select0",                   "s0", OPT_BOOLEAN,       NULL, "Automatic selection of 0th object",     &cfg.Select0},
+    {"select0",                   "s0", OPT_BOOLEAN,       NULL, "Automatic selection of 0th object",     &cfg.autoselect0},
     {"sprite_scale",              NULL, OPT_INTEGER,       NULL, "Relative scale of sprites",     &cfg.sprite_scale},
-    {"swap_buttons",              "sb", OPT_BOOLEAN,       NULL, "Swap mouse buttons",     &cfg.SwapButtons},
+    {"swap_buttons",              "sb", OPT_BOOLEAN,       NULL, "Swap mouse buttons",     &cfg.swap_buttons},
     {"text_dot",                  "td", OPT_BOOLEAN,       NULL, "DrawScreenText debug flag",     &cfg.text_dot},
     {"verbose",                   "v",  OPT_BOOLEAN,       "1",  "Verbose mode",     &cfg.verbose},
     {"welcome_message",           NULL, OPT_BOOLEAN,       NULL, "Print welcome message",     &cfg.welcome_message},
--- a/src/checks.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/checks.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -60,7 +60,7 @@
 {
     const char *line5 = 0;
 
-    if (cfg.Registered)
+    if (cfg.registered)
     {
         /* Commented out AYM 19971130 - wouldn't work with Doom 2
            if (! FindMasterDir (cfg.MasterDir, "TEXTURE2"))
@@ -443,7 +443,7 @@
             }
     }
     if (cur
-        && (cfg.Expert
+        && (cfg.expert
             || Confirm(-1, -1,
                        "There are multiple linedefs between the same vertices",
                        "Do you want to delete the redundant linedefs?")))
@@ -456,7 +456,7 @@
     for (n = 0; n < NumLineDefs; n++)
         if ((LineDefs[n].flags & 0x01) == 0 && LineDefs[n].sidedef2 < 0)
             SelectObject(&cur, n);
-    if (cur && (cfg.Expert
+    if (cur && (cfg.expert
                 || Confirm(-1, -1,
                            "Some linedefs have only one side but their I flag is"
                            " not set",
@@ -476,7 +476,7 @@
         if ((LineDefs[n].flags & 0x04) != 0 && LineDefs[n].sidedef2 < 0)
             SelectObject(&cur, n);
     if (cur
-        && (cfg.Expert
+        && (cfg.expert
             || Confirm(-1, -1,
                        "Some linedefs have only one side but their 2 flag"
                        " is set",
@@ -497,7 +497,7 @@
         if ((LineDefs[n].flags & 0x04) == 0 && LineDefs[n].sidedef2 >= 0)
             SelectObject(&cur, n);
     if (cur
-        && (cfg.Expert
+        && (cfg.expert
             || Confirm(-1, -1,
                        "Some linedefs have two sides but their 2S bit is not set",
                        "Do you want to set the 'two-sided' flag?")))
@@ -528,7 +528,7 @@
     }
 /* check if there are any Vertices left */
     if (cur
-        && (cfg.Expert
+        && (cfg.expert
             || Confirm(-1, -1, "Some vertices are not bound to any linedef",
                        "Do you want to delete these unused Vertices?")))
     {
@@ -554,7 +554,7 @@
     }
 /* check if there are any SideDefs left */
     if (cur
-        && (cfg.Expert
+        && (cfg.expert
             || Confirm(-1, -1, "Some sidedefs are not bound to any linedef",
                        "Do you want to delete these unused sidedefs?")))
         DeleteObjects(OBJ_SIDEDEFS, &cur);
@@ -578,7 +578,7 @@
     }
 /* check if there are any Sectors left */
     if (cur
-        && (cfg.Expert
+        && (cfg.expert
             || Confirm(-1, -1, "Some sectors are not bound to any sidedef",
                        "Do you want to delete these unused sectors?")))
         DeleteObjects(OBJ_SECTORS, &cur);
@@ -901,7 +901,7 @@
         else
             return true;        // No point in doing further checking !
     }
-    if (cfg.Expert)
+    if (cfg.expert)
         return true;
     if (!p2 || !p3 || !p4)
     {
--- a/src/editlev.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/editlev.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -143,7 +143,7 @@
     }
   done:
     TermGfx();
-    if (!cfg.Registered)
+    if (!cfg.registered)
         printf("Please register the game"
                " if you want to be able to save your changes.\n");
 
--- a/src/editloop.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/editloop.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -1234,7 +1234,7 @@
 
             /* [F2] save level into pwad, prompt for the file name
                every time but keep the same level name. */
-            else if (is.key == YK_F2 && cfg.Registered)
+            else if (is.key == YK_F2 && cfg.registered)
             {
                 if (!CheckStartingPos())
                     goto cancel_save;
@@ -1261,7 +1261,7 @@
 
             /* [F3] save level into pwad, prompt for the file name and
                level name. */
-            else if (is.key == YK_F3 && cfg.Registered)
+            else if (is.key == YK_F3 && cfg.registered)
             {
                 char *outfile;
                 const char *newlevelname;
@@ -1638,7 +1638,7 @@
                     else
                         ForgetSelection(&e.Selected);
                 }
-                if (GetMaxObjectNum(e.obj_type) >= 0 && cfg.Select0 && !e.global)
+                if (GetMaxObjectNum(e.obj_type) >= 0 && cfg.autoselect0 && !e.global)
                 {
                     e.highlighted.type = e.obj_type;
                     e.highlighted.num = 0;
@@ -2065,7 +2065,7 @@
             else if (is.key == YK_DEL && (e.Selected || e.highlighted()))        /* 'Del' */
             {
                 if (e.obj_type == OBJ_THINGS
-                    || cfg.Expert
+                    || cfg.expert
                     || Confirm(-1, -1,
                                (e.Selected && e.Selected->next ?
                                 "Do you really want to delete these objects?"
--- a/src/editobj.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/editobj.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -937,7 +937,7 @@
         // Linedefs -> Swap sidedefs
         if (objtype == OBJ_LINEDEFS)
         {
-            if (cfg.Expert
+            if (cfg.expert
                 || cfg.blindly_swap_sidedefs
                 || Confirm(-1, -1,
                            "Warning: the sector references are also swapped",
--- a/src/levels.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/levels.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -195,7 +195,7 @@
         {
             offset = dir->dir.start;
             length = dir->dir.size;
-            if (cfg.MainWad == cfg.Iwad[IWAD_HEXEN])        // Hexen mode
+            if (cfg.MainWad == cfg.iwadnames[IWAD_HEXEN])        // Hexen mode
             {
                 NumThings = (int) (length / WAD_HEXEN_THING_BYTES);
                 if ((i32) (NumThings * WAD_HEXEN_THING_BYTES) != length)
@@ -231,7 +231,7 @@
                 rc = 1;
                 if (cfg.error_res <= 3) goto byebye;
             }
-            if (cfg.MainWad == cfg.Iwad[IWAD_HEXEN])        // Hexen mode
+            if (cfg.MainWad == cfg.iwadnames[IWAD_HEXEN])        // Hexen mode
                 for (long n = 0; n < NumThings; n++)
                 {
                     u8 dummy2[6];
@@ -280,7 +280,7 @@
             NumLineDefs = 0;
         else
         {
-            if (cfg.MainWad == cfg.Iwad[IWAD_HEXEN])        // Hexen mode
+            if (cfg.MainWad == cfg.iwadnames[IWAD_HEXEN])        // Hexen mode
             {
                 NumLineDefs = (int) (dir->dir.size / WAD_HEXEN_LINEDEF_BYTES);
                 if ((i32) (NumLineDefs * WAD_HEXEN_LINEDEF_BYTES) !=
@@ -308,7 +308,7 @@
                 rc = 1;
                 if (cfg.error_res <= 3) goto byebye;
             }
-            if (cfg.MainWad == cfg.Iwad[IWAD_HEXEN])        // Hexen mode
+            if (cfg.MainWad == cfg.iwadnames[IWAD_HEXEN])        // Hexen mode
                 for (long n = 0; n < NumLineDefs; n++)
                 {
                     u8 dummy[6];
--- a/src/locate.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/locate.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -137,7 +137,7 @@
                              (const char *) 0);
         if (r != 0)
         {
-            if (cfg.Debug)
+            if (cfg.debug)
                 warn("%s: Could not expand macro #%d\n", dirname, r);
             continue;
         }
@@ -164,7 +164,7 @@
         r = stat(pathname, &s);
         if (r == 0 && !S_ISDIR(s.st_mode))
         {
-            if (cfg.Debug)
+            if (cfg.debug)
                 warn("%s: %s: hit\n", name, pathname);
             return pathname;
         }
@@ -176,7 +176,7 @@
         {
             warn("%s: %s\n", pathname, strerror(errno));
         }
-        if (cfg.Debug)
+        if (cfg.debug)
             warn("%s: %s: miss (%s)\n", name, pathname, strerror(errno));
     }
 
--- a/src/s_door.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/s_door.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -85,7 +85,7 @@
         return;
     }
     if ((s > 2)
-        && !(cfg.Expert
+        && !(cfg.expert
              || Confirm(-1, -1, "The door will have more than two sides.",
                         "Do you still want to create it?")))
     {
--- a/src/v_merge.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/v_merge.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -334,7 +334,7 @@
             y_snprintf(prompt, sizeof prompt,
                        "Linedefs %d and %d are superimposed", ld1, ld2);
             redraw = true;
-            if (cfg.Expert || Confirm2(-1, -1, &confirm_flag,
+            if (cfg.expert || Confirm2(-1, -1, &confirm_flag,
                                    prompt,
                                    "(and perhaps others too). Merge them ?"))
             {
--- a/src/wads.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/wads.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -200,7 +200,7 @@
 
 void WriteBytes(FILE * file, const void *buf, long size)
 {
-    if (!cfg.Registered)
+    if (!cfg.registered)
         return;
 
     while (size > 0x8000)
--- a/src/wads2.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/wads2.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -94,10 +94,10 @@
         printf("   |     You won't be allowed to save your changes.      |\n");
         printf("   |       PLEASE REGISTER YOUR COPY OF THE GAME.        |\n");
         printf("   *-----------------------------------------------------*\n");
-        cfg.Registered = false;        // If you remove this, bad things will happen to you...
+        cfg.registered = false;        // If you remove this, bad things will happen to you...
     }
     else
-        cfg.Registered = true;
+        cfg.registered = true;
 
     return 0;
 }
--- a/src/yadex.cc	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/yadex.cc	Mon Sep 26 18:06:30 2011 +0300
@@ -85,15 +85,15 @@
 
 void InitializeConfig()
 {
-    memset(cfg, 0, sizeof(cfg));
+    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?
+    cfg.registered = false,        // Registered or shareware game?
     cfg.screen_lines = 24,                // Lines that our TTY can display
     cfg.remind_to_build_nodes = false,        // Remind user to build nodes
     cfg.config_file = NULL;
-    cfg.Debug = false;
+    cfg.debug = false;
 
     // Set from command line and/or config file
     cfg.autoscroll = false;
@@ -112,23 +112,23 @@
     strcpy(cfg.def.upper_texture, "STARTAN3");
     cfg.def.thing = 3004;
     cfg.double_click_timeout = 200;
-    cfg.Expert = false;
+    cfg.expert = false;
     cfg.Game = NULL;
 
-    cfg.PatchWads = NULL;
-    cfg.Quiet = false;
-    cfg.Quieter = false;
+    cfg.patchwads = NULL;
+    cfg.quiet = false;
+    cfg.quieter = false;
     cfg.scroll_less = 10;
     cfg.scroll_more = 90;
-    cfg.Select0 = false;
+    cfg.autoselect0 = false;
     cfg.show_help = false;
     cfg.sprite_scale = 100;
-    cfg.SwapButtons = false;
+    cfg.swap_buttons = false;
     cfg.verbose = 0;
     cfg.welcome_message = 1;
     cfg.bench = NULL;
 
-    memset(cfg.Iwad, 0, sizeof(cfg.Iwad));
+    memset(cfg.iwadnames, 0, sizeof(cfg.iwadnames));
     cfg.MainWad = NULL;
     
     
@@ -272,7 +272,7 @@
             GameInfo *info = &gameList[n];
             if (strcmp(cfg.Game, info->game) == 0)
             {
-                if (cfg.Iwad[n] == NULL)
+                if (cfg.iwadnames[n] == NULL)
                 {
                     err("You have to tell me where %s is.", info->wadname);
                     fprintf(stderr,
@@ -280,7 +280,7 @@
                             n + 1, n + 1);
                     exit(1);
                 }
-                cfg.MainWad = cfg.Iwad[n];
+                cfg.MainWad = cfg.iwadnames[n];
             }
         }
     }
@@ -305,7 +305,7 @@
         exit(1);
     }
 
-    if (cfg.Debug)
+    if (cfg.debug)
     {
         cfg.logfile = fopen(yadex_log_filename, "a");
         if (cfg.logfile == NULL)
@@ -318,8 +318,8 @@
         LogMessage(": Welcome to Yadex!\n");
     }
 
-    if (cfg.Quieter)
-        cfg.Quiet = true;
+    if (cfg.quieter)
+        cfg.quiet = true;
 
     // Sanity checks (useful when porting).
     check_types();
@@ -337,10 +337,10 @@
     if (OpenMainWad(cfg.MainWad))
         fatal_error("If you don't give me an iwad, I'll quit. I'm serious.");
 
-    if (cfg.PatchWads)
+    if (cfg.patchwads)
     {
         const char *const *pwad_name;
-        for (pwad_name = cfg.PatchWads; *pwad_name; pwad_name++)
+        for (pwad_name = cfg.patchwads; *pwad_name; pwad_name++)
             OpenPatchWad(*pwad_name);
     }
 
@@ -435,7 +435,7 @@
     fputc('\n', stderr);
     fflush(stderr);
 
-    if (cfg.Debug && cfg.logfile != NULL)
+    if (cfg.debug && cfg.logfile != NULL)
     {
         fputs("Error: ", cfg.logfile);
         vfprintf(cfg.logfile, fmt, args);
@@ -543,7 +543,7 @@
     time_t tval;
     char *tstr;
 
-    if (cfg.Debug && cfg.logfile != NULL)
+    if (cfg.debug && cfg.logfile != NULL)
     {
         va_start(args, logstr);
         /* if the message begins with ":", output the current date & time first */
@@ -676,7 +676,7 @@
         /* user asked to quit */
         else if (!strcmp(com, "quit") || !strcmp(com, "q"))
         {
-            if (!cfg.Registered)
+            if (!cfg.registered)
                 printf("Remember to register your copy of the game !\n");
             break;
         }
@@ -714,7 +714,7 @@
                         printf(" You are in %s mode.", cfg.Game);
                     else
 
-                    if (tolower(*com) == 'e' && com[1] > '1' && !cfg.Registered)
+                    if (tolower(*com) == 'e' && com[1] > '1' && !cfg.registered)
                         printf(" You have the shareware IWAD.");
 
                     printf("\n");
--- a/src/yadex.h	Mon Sep 26 17:56:33 2011 +0300
+++ b/src/yadex.h	Mon Sep 26 18:06:30 2011 +0300
@@ -306,6 +306,9 @@
 // AYM 19980213: InputIntegerValue() uses this to mean that Esc was pressed
 #define IIV_CANCEL  INT_MIN
 
+
+/* Supported games
+ */
 enum {
     IWAD_DOOM1 = 0,
     IWAD_DOOM2,
@@ -321,6 +324,7 @@
     IWAD_LAST
 };
 
+
 typedef struct
 {
     // Defined in yadex.cc
@@ -328,8 +332,8 @@
     const char *install_dir;        // Where yadex is installed
     FILE *logfile;                // Filepointer to the error log
 
-    bool Debug;                // Are we debugging?
-    bool Registered;                // Registered or shareware iwad ?
+    bool debug;                // Are we debugging?
+    bool registered;                // Registered or shareware iwad ?
     int cpu_big_endian;        // Am I running on a big-endian CPU ?
 
     /* Error resiliency of during loading of WAD / map data, 0 - 4
@@ -361,10 +365,11 @@
         int thing;        // For new THINGS
     } def;
 
-    const char *Game;        // Name of game "doom", "doom2", "heretic", ...
-    bool Quiet;                // Don't beep when an object is selected
-    bool Quieter;                // Don't beep, even on error
-    bool Expert;                // Don't ask for confirmation for some ops.
+    int GameId;
+    char *Game;        // Name of game "doom", "doom2", "heretic", ...
+    bool quiet;                // Don't beep when an object is selected
+    bool quieter;                // Don't beep, even on error
+    bool expert;                // Don't ask for confirmation for some ops.
     bool autoscroll;                // Autoscrolling enabled.
     unsigned long autoscroll_amp;        // Amplitude in percents of screen/window size.
     unsigned long autoscroll_edge;        // Max. dist. in pixels to edge.
@@ -383,20 +388,20 @@
     bool blindly_swap_sidedefs;
 
 
-    char *Iwad[IWAD_LAST];
+    char *iwadnames[IWAD_LAST];
     char *MainWad;        // Name of the main wad file
 
 #ifdef AYM_MOUSE_HACKS
     int MouseMickeysH;
     int MouseMickeysV;
 #endif
-    char **PatchWads;        // List of pwad files
+    char **patchwads;        // List of pwad files
     unsigned long scroll_less;        // %s of screenful to scroll by
     unsigned long scroll_more;        // %s of screenful to scroll by
-    bool Select0;                // Autom. select obj. 0 when switching modes
+    bool autoselect0;                // Autom. select obj. 0 when switching modes
     int show_help;                // Print usage message and exit.
     int sprite_scale;        // Relative scale used to display sprites
-    bool SwapButtons;        // Swap right and middle mouse buttons
+    bool swap_buttons;        // Swap right and middle mouse buttons
     int verbose;                // Verbose mode
     int welcome_message;        // Print the welcome message on startup.
     const char *bench;        // Benchmark to run