rnd-20051205-1-src
authorHolger Schemel <info@artsoft.org>
Sun, 4 Dec 2005 23:32:29 +0000 (00:32 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:49:37 +0000 (10:49 +0200)
* fixed bug with precedence of general and special font definitions

ChangeLog
src/conf_gfx.c
src/conf_gfx.h
src/conftime.h
src/init.c
src/screens.c

index 0867745c45a79ed8255dab46114ff4a78e56a9e9..f72550620cd8e8c4bbb21d3060c5df402e579325 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2005-12-03
        * fixed major bug which prevented private levels from being edited
+       * fixed bug with precedence of general and special font definitions
 
 2005-12-02
        * fixed graphical bug with player animation when player moves slowly
index 66b5af444299a28c640883abb84fff5083e4e49d..cadc803a3b78744b93515ef33597c512fa7571b6 100644 (file)
@@ -3831,35 +3831,52 @@ struct ConfigInfo image_config[] =
   { "menu.button_left.xpos",                   "8"                     },
   { "menu.button_left.ypos",                   "8"                     },
   { "menu.button_left.frames",                 "1"                     },
-  { "menu.button_right",                       "RocksDC.pcx"           },
-  { "menu.button_right.xpos",                  "9"                     },
-  { "menu.button_right.ypos",                  "8"                     },
-  { "menu.button_right.frames",                        "1"                     },
-  { "menu.button_up",                          "RocksDC.pcx"           },
-  { "menu.button_up.xpos",                     "10"                    },
-  { "menu.button_up.ypos",                     "8"                     },
-  { "menu.button_up.frames",                   "1"                     },
-  { "menu.button_down",                                "RocksDC.pcx"           },
-  { "menu.button_down.xpos",                   "11"                    },
-  { "menu.button_down.ypos",                   "8"                     },
-  { "menu.button_down.frames",                 "1"                     },
   { "menu.button_left.active",                 "RocksDC.pcx"           },
   { "menu.button_left.active.xpos",            "8"                     },
   { "menu.button_left.active.ypos",            "9"                     },
   { "menu.button_left.active.frames",          "1"                     },
+  { "menu.button_right",                       "RocksDC.pcx"           },
+  { "menu.button_right.xpos",                  "9"                     },
+  { "menu.button_right.ypos",                  "8"                     },
+  { "menu.button_right.frames",                        "1"                     },
   { "menu.button_right.active",                        "RocksDC.pcx"           },
   { "menu.button_right.active.xpos",           "9"                     },
   { "menu.button_right.active.ypos",           "9"                     },
   { "menu.button_right.active.frames",         "1"                     },
+  { "menu.button_up",                          "RocksDC.pcx"           },
+  { "menu.button_up.xpos",                     "10"                    },
+  { "menu.button_up.ypos",                     "8"                     },
+  { "menu.button_up.frames",                   "1"                     },
   { "menu.button_up.active",                   "RocksDC.pcx"           },
   { "menu.button_up.active.xpos",              "10"                    },
   { "menu.button_up.active.ypos",              "9"                     },
   { "menu.button_up.active.frames",            "1"                     },
+  { "menu.button_down",                                "RocksDC.pcx"           },
+  { "menu.button_down.xpos",                   "11"                    },
+  { "menu.button_down.ypos",                   "8"                     },
+  { "menu.button_down.frames",                 "1"                     },
   { "menu.button_down.active",                 "RocksDC.pcx"           },
   { "menu.button_down.active.xpos",            "11"                    },
   { "menu.button_down.active.ypos",            "9"                     },
   { "menu.button_down.active.frames",          "1"                     },
 
+  { "menu.button_enter_menu",                  "RocksDC.pcx"           },
+  { "menu.button_enter_menu.xpos",             "9"                     },
+  { "menu.button_enter_menu.ypos",             "8"                     },
+  { "menu.button_enter_menu.frames",           "1"                     },
+  { "menu.button_enter_menu.active",           "RocksDC.pcx"           },
+  { "menu.button_enter_menu.active.xpos",      "9"                     },
+  { "menu.button_enter_menu.active.ypos",      "9"                     },
+  { "menu.button_enter_menu.active.frames",    "1"                     },
+  { "menu.button_leave_menu",                  "RocksDC.pcx"           },
+  { "menu.button_leave_menu.xpos",             "8"                     },
+  { "menu.button_leave_menu.ypos",             "8"                     },
+  { "menu.button_leave_menu.frames",           "1"                     },
+  { "menu.button_leave_menu.active",           "RocksDC.pcx"           },
+  { "menu.button_leave_menu.active.xpos",      "8"                     },
+  { "menu.button_leave_menu.active.ypos",      "9"                     },
+  { "menu.button_leave_menu.active.frames",    "1"                     },
+
   { "menu.scrollbar",                          "RocksDC.pcx"           },
   { "menu.scrollbar.xpos",                     "8"                     },
   { "menu.scrollbar.ypos",                     "10"                    },
index 191d05386cb423bd1f6d680f4268c1785898c791..b9b9d207ecf70e8c8bb5f39ed4ffe2e145aca570 100644 (file)
 #define IMG_MENU_BUTTON                                        1403
 #define IMG_MENU_BUTTON_ACTIVE                         1404
 #define IMG_MENU_BUTTON_LEFT                           1405
-#define IMG_MENU_BUTTON_RIGHT                          1406
-#define IMG_MENU_BUTTON_UP                             1407
-#define IMG_MENU_BUTTON_DOWN                           1408
-#define IMG_MENU_BUTTON_LEFT_ACTIVE                    1409
-#define IMG_MENU_BUTTON_RIGHT_ACTIVE                   1410
-#define IMG_MENU_BUTTON_UP_ACTIVE                      1411
+#define IMG_MENU_BUTTON_LEFT_ACTIVE                    1406
+#define IMG_MENU_BUTTON_RIGHT                          1407
+#define IMG_MENU_BUTTON_RIGHT_ACTIVE                   1408
+#define IMG_MENU_BUTTON_UP                             1409
+#define IMG_MENU_BUTTON_UP_ACTIVE                      1410
+#define IMG_MENU_BUTTON_DOWN                           1411
 #define IMG_MENU_BUTTON_DOWN_ACTIVE                    1412
-#define IMG_MENU_SCROLLBAR                             1413
-#define IMG_MENU_SCROLLBAR_ACTIVE                      1414
-#define IMG_FONT_INITIAL_1                             1415
-#define IMG_FONT_INITIAL_2                             1416
-#define IMG_FONT_INITIAL_3                             1417
-#define IMG_FONT_INITIAL_4                             1418
-#define IMG_FONT_TITLE_1                               1419
-#define IMG_FONT_TITLE_1_LEVELS                                1420
-#define IMG_FONT_TITLE_2                               1421
-#define IMG_FONT_MENU_1                                        1422
-#define IMG_FONT_MENU_2                                        1423
-#define IMG_FONT_TEXT_1                                        1424
-#define IMG_FONT_TEXT_1_LEVELS                         1425
-#define IMG_FONT_TEXT_1_PREVIEW                                1426
-#define IMG_FONT_TEXT_1_SCORES                         1427
-#define IMG_FONT_TEXT_1_ACTIVE_SCORES                  1428
-#define IMG_FONT_TEXT_2                                        1429
-#define IMG_FONT_TEXT_2_LEVELS                         1430
-#define IMG_FONT_TEXT_2_PREVIEW                                1431
-#define IMG_FONT_TEXT_2_SCORES                         1432
-#define IMG_FONT_TEXT_2_ACTIVE_SCORES                  1433
-#define IMG_FONT_TEXT_3                                        1434
-#define IMG_FONT_TEXT_3_LEVELS                         1435
-#define IMG_FONT_TEXT_3_PREVIEW                                1436
-#define IMG_FONT_TEXT_3_SCORES                         1437
-#define IMG_FONT_TEXT_3_ACTIVE_SCORES                  1438
-#define IMG_FONT_TEXT_4                                        1439
-#define IMG_FONT_TEXT_4_LEVELS                         1440
-#define IMG_FONT_TEXT_4_SCORES                         1441
-#define IMG_FONT_TEXT_4_ACTIVE_SCORES                  1442
-#define IMG_FONT_ENVELOPE_1                            1443
-#define IMG_FONT_ENVELOPE_2                            1444
-#define IMG_FONT_ENVELOPE_3                            1445
-#define IMG_FONT_ENVELOPE_4                            1446
-#define IMG_FONT_INPUT_1                               1447
-#define IMG_FONT_INPUT_1_MAIN                          1448
-#define IMG_FONT_INPUT_1_ACTIVE                                1449
-#define IMG_FONT_INPUT_1_ACTIVE_MAIN                   1450
-#define IMG_FONT_INPUT_1_ACTIVE_SETUP                  1451
-#define IMG_FONT_INPUT_2                               1452
-#define IMG_FONT_INPUT_2_ACTIVE                                1453
-#define IMG_FONT_OPTION_OFF                            1454
-#define IMG_FONT_OPTION_ON                             1455
-#define IMG_FONT_VALUE_1                               1456
-#define IMG_FONT_VALUE_2                               1457
-#define IMG_FONT_VALUE_OLD                             1458
-#define IMG_FONT_LEVEL_NUMBER                          1459
-#define IMG_FONT_TAPE_RECORDER                         1460
-#define IMG_FONT_GAME_INFO                             1461
-#define IMG_GLOBAL_BORDER                              1462
-#define IMG_GLOBAL_DOOR                                        1463
-#define IMG_EDITOR_ELEMENT_BORDER                      1464
-#define IMG_EDITOR_ELEMENT_BORDER_INPUT                        1465
-#define IMG_BACKGROUND_ENVELOPE_1                      1466
-#define IMG_BACKGROUND_ENVELOPE_2                      1467
-#define IMG_BACKGROUND_ENVELOPE_3                      1468
-#define IMG_BACKGROUND_ENVELOPE_4                      1469
-#define IMG_BACKGROUND                                 1470
-#define IMG_BACKGROUND_MAIN                            1471
-#define IMG_BACKGROUND_LEVELS                          1472
-#define IMG_BACKGROUND_SCORES                          1473
-#define IMG_BACKGROUND_EDITOR                          1474
-#define IMG_BACKGROUND_INFO                            1475
-#define IMG_BACKGROUND_INFO_ELEMENTS                   1476
-#define IMG_BACKGROUND_INFO_MUSIC                      1477
-#define IMG_BACKGROUND_INFO_CREDITS                    1478
-#define IMG_BACKGROUND_INFO_PROGRAM                    1479
-#define IMG_BACKGROUND_INFO_LEVELSET                   1480
-#define IMG_BACKGROUND_SETUP                           1481
-#define IMG_BACKGROUND_DOOR                            1482
+#define IMG_MENU_BUTTON_ENTER_MENU                     1413
+#define IMG_MENU_BUTTON_ENTER_MENU_ACTIVE              1414
+#define IMG_MENU_BUTTON_LEAVE_MENU                     1415
+#define IMG_MENU_BUTTON_LEAVE_MENU_ACTIVE              1416
+#define IMG_MENU_SCROLLBAR                             1417
+#define IMG_MENU_SCROLLBAR_ACTIVE                      1418
+#define IMG_FONT_INITIAL_1                             1419
+#define IMG_FONT_INITIAL_2                             1420
+#define IMG_FONT_INITIAL_3                             1421
+#define IMG_FONT_INITIAL_4                             1422
+#define IMG_FONT_TITLE_1                               1423
+#define IMG_FONT_TITLE_1_LEVELS                                1424
+#define IMG_FONT_TITLE_2                               1425
+#define IMG_FONT_MENU_1                                        1426
+#define IMG_FONT_MENU_2                                        1427
+#define IMG_FONT_TEXT_1                                        1428
+#define IMG_FONT_TEXT_1_LEVELS                         1429
+#define IMG_FONT_TEXT_1_PREVIEW                                1430
+#define IMG_FONT_TEXT_1_SCORES                         1431
+#define IMG_FONT_TEXT_1_ACTIVE_SCORES                  1432
+#define IMG_FONT_TEXT_2                                        1433
+#define IMG_FONT_TEXT_2_LEVELS                         1434
+#define IMG_FONT_TEXT_2_PREVIEW                                1435
+#define IMG_FONT_TEXT_2_SCORES                         1436
+#define IMG_FONT_TEXT_2_ACTIVE_SCORES                  1437
+#define IMG_FONT_TEXT_3                                        1438
+#define IMG_FONT_TEXT_3_LEVELS                         1439
+#define IMG_FONT_TEXT_3_PREVIEW                                1440
+#define IMG_FONT_TEXT_3_SCORES                         1441
+#define IMG_FONT_TEXT_3_ACTIVE_SCORES                  1442
+#define IMG_FONT_TEXT_4                                        1443
+#define IMG_FONT_TEXT_4_LEVELS                         1444
+#define IMG_FONT_TEXT_4_SCORES                         1445
+#define IMG_FONT_TEXT_4_ACTIVE_SCORES                  1446
+#define IMG_FONT_ENVELOPE_1                            1447
+#define IMG_FONT_ENVELOPE_2                            1448
+#define IMG_FONT_ENVELOPE_3                            1449
+#define IMG_FONT_ENVELOPE_4                            1450
+#define IMG_FONT_INPUT_1                               1451
+#define IMG_FONT_INPUT_1_MAIN                          1452
+#define IMG_FONT_INPUT_1_ACTIVE                                1453
+#define IMG_FONT_INPUT_1_ACTIVE_MAIN                   1454
+#define IMG_FONT_INPUT_1_ACTIVE_SETUP                  1455
+#define IMG_FONT_INPUT_2                               1456
+#define IMG_FONT_INPUT_2_ACTIVE                                1457
+#define IMG_FONT_OPTION_OFF                            1458
+#define IMG_FONT_OPTION_ON                             1459
+#define IMG_FONT_VALUE_1                               1460
+#define IMG_FONT_VALUE_2                               1461
+#define IMG_FONT_VALUE_OLD                             1462
+#define IMG_FONT_LEVEL_NUMBER                          1463
+#define IMG_FONT_TAPE_RECORDER                         1464
+#define IMG_FONT_GAME_INFO                             1465
+#define IMG_GLOBAL_BORDER                              1466
+#define IMG_GLOBAL_DOOR                                        1467
+#define IMG_EDITOR_ELEMENT_BORDER                      1468
+#define IMG_EDITOR_ELEMENT_BORDER_INPUT                        1469
+#define IMG_BACKGROUND_ENVELOPE_1                      1470
+#define IMG_BACKGROUND_ENVELOPE_2                      1471
+#define IMG_BACKGROUND_ENVELOPE_3                      1472
+#define IMG_BACKGROUND_ENVELOPE_4                      1473
+#define IMG_BACKGROUND                                 1474
+#define IMG_BACKGROUND_MAIN                            1475
+#define IMG_BACKGROUND_LEVELS                          1476
+#define IMG_BACKGROUND_SCORES                          1477
+#define IMG_BACKGROUND_EDITOR                          1478
+#define IMG_BACKGROUND_INFO                            1479
+#define IMG_BACKGROUND_INFO_ELEMENTS                   1480
+#define IMG_BACKGROUND_INFO_MUSIC                      1481
+#define IMG_BACKGROUND_INFO_CREDITS                    1482
+#define IMG_BACKGROUND_INFO_PROGRAM                    1483
+#define IMG_BACKGROUND_INFO_LEVELSET                   1484
+#define IMG_BACKGROUND_SETUP                           1485
+#define IMG_BACKGROUND_DOOR                            1486
 
-#define NUM_IMAGE_FILES                                        1483
+#define NUM_IMAGE_FILES                                        1487
 
 #endif /* CONF_GFX_H */
index 119bc69c8375bbf33d56ee8379a9566eed406e35..1378a183ba143dc7f5a638730079f7b7f6e78837 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2005-12-03 00:09]"
+#define COMPILE_DATE_STRING "[2005-12-03 13:43]"
index b49b9bfe67f7e912ffc3f81c07c9f018faeb3758..5c0e99c80c124e764983a8331fe7f72a43f08dbd 100644 (file)
@@ -202,9 +202,27 @@ void InitFontGraphicInfo()
     int font_nr = font_to_graphic[i].font_nr;
     int special = font_to_graphic[i].special;
     int graphic = font_to_graphic[i].graphic;
+#if 1
+    int base_graphic =
+      font_info[font_nr].special_graphic[GFX_SPECIAL_ARG_DEFAULT];
+#endif
 
     if (special >= 0 && special < NUM_SPECIAL_GFX_ARGS)
     {
+#if 1
+      boolean base_redefined =
+       getImageListEntryFromImageID(base_graphic)->redefined;
+      boolean special_redefined =
+       getImageListEntryFromImageID(graphic)->redefined;
+
+      /* if the base font ("font.title_1", for example) has been redefined,
+        but not the special font ("font.title_1.LEVELS", for example), do not
+        use an existing (in this case considered obsolete) special font
+        anymore, but use the automatically determined default font */
+      if (base_redefined && !special_redefined)
+       continue;
+#endif
+
       font_info[font_nr].special_graphic[special] = graphic;
       font_info[font_nr].special_bitmap_id[special] = num_font_bitmaps;
       num_font_bitmaps++;
index 4d2dffc912df7d595a2fb83461a72b352f185080..43d02fb4bd630d60383070fd7d15266760edc38c 100644 (file)
@@ -115,28 +115,29 @@ static Bitmap *scrollbar_bitmap[NUM_SCROLLBAR_BITMAPS];
 #endif
 
 
-static void drawCursorExt(int xpos, int ypos, int color, int graphic)
+static void drawCursorExt(int xpos, int ypos, int color, int g)
 {
   static int cursor_array[SCR_FIELDY];
 
   if (xpos == 0)
   {
-    if (graphic != 0)
-      cursor_array[ypos] = graphic;
+    if (g != 0)
+      cursor_array[ypos] = g;
     else
-      graphic = cursor_array[ypos];
+      g = cursor_array[ypos];
   }
 
   if (color == FC_RED)
-    graphic = (graphic == IMG_MENU_BUTTON_LEFT  ? IMG_MENU_BUTTON_LEFT_ACTIVE :
-              graphic == IMG_MENU_BUTTON_RIGHT ? IMG_MENU_BUTTON_RIGHT_ACTIVE:
-              IMG_MENU_BUTTON_ACTIVE);
+    g = (g == IMG_MENU_BUTTON_LEFT  ? IMG_MENU_BUTTON_LEFT_ACTIVE  :
+        g == IMG_MENU_BUTTON_RIGHT ? IMG_MENU_BUTTON_RIGHT_ACTIVE :
+        g == IMG_MENU_BUTTON_LEAVE_MENU ? IMG_MENU_BUTTON_LEAVE_MENU_ACTIVE :
+        g == IMG_MENU_BUTTON_ENTER_MENU ? IMG_MENU_BUTTON_ENTER_MENU_ACTIVE :
+        IMG_MENU_BUTTON_ACTIVE);
 
   ypos += MENU_SCREEN_START_YPOS;
 
   DrawBackground(mSX + xpos * TILEX, mSY + ypos * TILEY, TILEX, TILEY);
-  DrawGraphicThruMaskExt(drawto, mSX + xpos * TILEX, mSY + ypos * TILEY,
-                        graphic, 0);
+  DrawGraphicThruMaskExt(drawto, mSX + xpos * TILEX, mSY + ypos * TILEY, g, 0);
 }
 
 static void initCursor(int ypos, int graphic)
@@ -323,11 +324,11 @@ void DrawMainMenu()
   }
 
   for (i = 0; i < 8; i++)
-    initCursor(i, (i == 1 || i == 4 || i == 6 ? IMG_MENU_BUTTON_RIGHT :
+    initCursor(i, (i == 1 || i == 4 || i == 6 ? IMG_MENU_BUTTON_ENTER_MENU :
                   IMG_MENU_BUTTON));
 
-  drawCursorXY(level_width/32 + 4, 1, IMG_MENU_BUTTON_LEFT);
-  drawCursorXY(level_width/32 + 8, 1, IMG_MENU_BUTTON_RIGHT);
+  drawCursorXY(level_width / 32 + 4, 1, IMG_MENU_BUTTON_LEFT);
+  drawCursorXY(level_width / 32 + 8, 1, IMG_MENU_BUTTON_RIGHT);
 
   DrawTextSCentered(326, FONT_TITLE_2, "A Game by Artsoft Entertainment");
 
@@ -612,9 +613,9 @@ static void DrawInfoScreen_Main()
     DrawText(mSX + 32, mSY + ypos * 32, info_info[i].text, font_nr);
 
     if (info_info[i].type & TYPE_ENTER_MENU)
-      initCursor(i, IMG_MENU_BUTTON_RIGHT);
+      initCursor(i, IMG_MENU_BUTTON_ENTER_MENU);
     else if (info_info[i].type & TYPE_LEAVE_MENU)
-      initCursor(i, IMG_MENU_BUTTON_LEFT);
+      initCursor(i, IMG_MENU_BUTTON_LEAVE_MENU);
     else if (info_info[i].type & ~TYPE_SKIP_ENTRY)
       initCursor(i, IMG_MENU_BUTTON);
 
@@ -1435,9 +1436,9 @@ static void drawChooseTreeList(int first_entry, int num_page_entries,
     DrawText(mSX + 32, mSY + ypos * 32, buffer, FONT_TEXT_1 + node->color);
 
     if (node->parent_link)
-      initCursor(i, IMG_MENU_BUTTON_LEFT);
+      initCursor(i, IMG_MENU_BUTTON_LEAVE_MENU);
     else if (node->level_group)
-      initCursor(i, IMG_MENU_BUTTON_RIGHT);
+      initCursor(i, IMG_MENU_BUTTON_ENTER_MENU);
     else
       initCursor(i, IMG_MENU_BUTTON);
   }
@@ -2225,9 +2226,9 @@ static void DrawSetupScreen_Generic()
     DrawText(mSX + 32, mSY + ypos * 32, setup_info[i].text, font_nr);
 
     if (setup_info[i].type & TYPE_ENTER_MENU)
-      initCursor(i, IMG_MENU_BUTTON_RIGHT);
+      initCursor(i, IMG_MENU_BUTTON_ENTER_MENU);
     else if (setup_info[i].type & TYPE_LEAVE_MENU)
-      initCursor(i, IMG_MENU_BUTTON_LEFT);
+      initCursor(i, IMG_MENU_BUTTON_LEAVE_MENU);
     else if (setup_info[i].type & ~TYPE_SKIP_ENTRY)
       initCursor(i, IMG_MENU_BUTTON);
 
@@ -2339,10 +2340,10 @@ void DrawSetupScreen_Input()
 
   DrawText(mSX+16, mSY+16, "Setup Input", FONT_TITLE_1);
 
-  initCursor(0, IMG_MENU_BUTTON);
-  initCursor(1, IMG_MENU_BUTTON);
-  initCursor(2, IMG_MENU_BUTTON_RIGHT);
-  initCursor(13, IMG_MENU_BUTTON_LEFT);
+  initCursor(0,  IMG_MENU_BUTTON);
+  initCursor(1,  IMG_MENU_BUTTON);
+  initCursor(2,  IMG_MENU_BUTTON_ENTER_MENU);
+  initCursor(13, IMG_MENU_BUTTON_LEAVE_MENU);
 
   drawCursorXY(10, 0, IMG_MENU_BUTTON_LEFT);
   drawCursorXY(12, 0, IMG_MENU_BUTTON_RIGHT);