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
{ "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" },
#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 */
-#define COMPILE_DATE_STRING "[2005-12-03 00:09]"
+#define COMPILE_DATE_STRING "[2005-12-03 13:43]"
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++;
#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)
}
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");
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);
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);
}
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);
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);