added initial window size to default program config (using <program>.conf)
[rocksndiamonds.git] / src / main.c
index d315bc7f354de93e317be411dff9d647e7b4b25f..213ba4a0122978a96599f44b5c075151e758b7c9 100644 (file)
@@ -5489,6 +5489,12 @@ struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
   { ".PANEL",                  GFX_SPECIAL_ARG_PANEL,                  },
   { ".PREVIEW",                        GFX_SPECIAL_ARG_PREVIEW,                },
   { ".CRUMBLED",               GFX_SPECIAL_ARG_CRUMBLED,               },
+  { ".TYPENAME",               GFX_SPECIAL_ARG_TYPENAME,               },
+  { ".SUBMENU",                        GFX_SPECIAL_ARG_SUBMENU,                },
+  { ".MENU",                   GFX_SPECIAL_ARG_MENU,                   },
+  { ".TOONS",                  GFX_SPECIAL_ARG_TOONS,                  },
+  { ".FADING",                 GFX_SPECIAL_ARG_FADING,                 },
+  { ".QUIT",                   GFX_SPECIAL_ARG_QUIT,                   },
 
   /* empty suffix always matches -- check as last entry in InitMusicInfo() */
   { "",                                GFX_SPECIAL_ARG_DEFAULT,                },
@@ -5551,8 +5557,19 @@ struct FontInfo font_info[NUM_FONTS + 1] =
   { NULL                       }
 };
 
-struct GlobalAnimInfo global_anim_info[NUM_GLOBAL_ANIMS + 1] =
+struct GlobalAnimInfo global_anim_info[NUM_GLOBAL_ANIM_TOKENS + 1] =
 {
+  /* (real) graphic definitions used to define animation graphics */
+  { "global.anim_1.gfx",       },
+  { "global.anim_2.gfx",       },
+  { "global.anim_3.gfx",       },
+  { "global.anim_4.gfx",       },
+  { "global.anim_5.gfx",       },
+  { "global.anim_6.gfx",       },
+  { "global.anim_7.gfx",       },
+  { "global.anim_8.gfx",       },
+
+  /* (dummy) graphic definitions used to define animation controls */
   { "global.anim_1",           },
   { "global.anim_2",           },
   { "global.anim_3",           },
@@ -5701,6 +5718,14 @@ static void InitProgramConfig(char *command_filename)
   userdata_subdir = USERDATA_DIRECTORY_OTHER;
 #endif
 
+  // set default window size (only relevant on program startup)
+  if (setup.internal.default_window_width  != 0 &&
+      setup.internal.default_window_height != 0)
+  {
+    WIN_XSIZE = setup.internal.default_window_width;
+    WIN_YSIZE = setup.internal.default_window_height;
+  }
+
   InitProgramInfo(command_filename,
                  config_filename,
                  userdata_subdir,