From 013255ff68bf77db29470e26ac4cd7777836c8b0 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 14 Apr 2007 23:30:14 +0200 Subject: [PATCH] rnd-20070414-2-src * added additional configuration directives to define main menu buttons: - menu.button_name and menu.button_name.active - menu.button_levels and menu.button_levels.active - menu.button_scores and menu.button_scores.active - menu.button_editor and menu.button_editor.active - menu.button_info and menu.button_info.active - menu.button_game and menu.button_game.active - menu.button_setup and menu.button_setup.active - menu.button_quit and menu.button_quit.active --- ChangeLog | 9 ++ src/conf_act.c | 82 ++++++++++++++++ src/conf_g2m.c | 80 ---------------- src/conf_g2s.c | 80 ---------------- src/conf_gfx.c | 33 +++++++ src/conf_gfx.h | 254 ++++++++++++++++++++++++++----------------------- src/conftime.h | 2 +- src/init.c | 15 ++- src/main.c | 1 + src/main.h | 3 +- src/screens.c | 30 ++++-- 11 files changed, 297 insertions(+), 292 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4343c17..be93c6b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,15 @@ used to define draw offset on custom artwork selection screens and "CHOOSE_OTHER" is used on all other list style selection screens, like choosing game speed or screen mode for fullscreen mode) + * added additional configuration directives to define main menu buttons: + - menu.button_name and menu.button_name.active + - menu.button_levels and menu.button_levels.active + - menu.button_scores and menu.button_scores.active + - menu.button_editor and menu.button_editor.active + - menu.button_info and menu.button_info.active + - menu.button_game and menu.button_game.active + - menu.button_setup and menu.button_setup.active + - menu.button_quit and menu.button_quit.active 2007-04-08 * added support for accessing native Diamond Caves II level packages diff --git a/src/conf_act.c b/src/conf_act.c index e52851e4..60c69b02 100644 --- a/src/conf_act.c +++ b/src/conf_act.c @@ -308,6 +308,88 @@ element_with_active_state[] = }; +static struct +{ + int button; + int button_active; +} +button_with_active_state[] = +{ + { + IMG_MENU_BUTTON, + IMG_MENU_BUTTON_ACTIVE + }, + { + IMG_MENU_BUTTON_DOWN, + IMG_MENU_BUTTON_DOWN_ACTIVE + }, + { + IMG_MENU_BUTTON_EDITOR, + IMG_MENU_BUTTON_EDITOR_ACTIVE + }, + { + IMG_MENU_BUTTON_ENTER_MENU, + IMG_MENU_BUTTON_ENTER_MENU_ACTIVE + }, + { + IMG_MENU_BUTTON_GAME, + IMG_MENU_BUTTON_GAME_ACTIVE + }, + { + IMG_MENU_BUTTON_INFO, + IMG_MENU_BUTTON_INFO_ACTIVE + }, + { + IMG_MENU_BUTTON_LEAVE_MENU, + IMG_MENU_BUTTON_LEAVE_MENU_ACTIVE + }, + { + IMG_MENU_BUTTON_LEFT, + IMG_MENU_BUTTON_LEFT_ACTIVE + }, + { + IMG_MENU_BUTTON_LEVELS, + IMG_MENU_BUTTON_LEVELS_ACTIVE + }, + { + IMG_MENU_BUTTON_NAME, + IMG_MENU_BUTTON_NAME_ACTIVE + }, + { + IMG_MENU_BUTTON_NEXT_LEVEL, + IMG_MENU_BUTTON_NEXT_LEVEL_ACTIVE + }, + { + IMG_MENU_BUTTON_PREV_LEVEL, + IMG_MENU_BUTTON_PREV_LEVEL_ACTIVE + }, + { + IMG_MENU_BUTTON_QUIT, + IMG_MENU_BUTTON_QUIT_ACTIVE + }, + { + IMG_MENU_BUTTON_RIGHT, + IMG_MENU_BUTTON_RIGHT_ACTIVE + }, + { + IMG_MENU_BUTTON_SCORES, + IMG_MENU_BUTTON_SCORES_ACTIVE + }, + { + IMG_MENU_BUTTON_SETUP, + IMG_MENU_BUTTON_SETUP_ACTIVE + }, + { + IMG_MENU_BUTTON_UP, + IMG_MENU_BUTTON_UP_ACTIVE + }, + { + -1, + -1 + }, +}; + + static struct { int font_nr; diff --git a/src/conf_g2m.c b/src/conf_g2m.c index 0286002b..207525ef 100644 --- a/src/conf_g2m.c +++ b/src/conf_g2m.c @@ -62,86 +62,6 @@ gamemode_to_music[] = GFX_SPECIAL_ARG_SETUP, MUS_BACKGROUND_SETUP }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_INITIAL_1 - }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_INITIAL_2 - }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_INITIAL_3 - }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_INITIAL_4 - }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_INITIAL_5 - }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_1 - }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_2 - }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_3 - }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_4 - }, - { - -1, - MUS_BACKGROUND_TITLESCREEN_5 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_INITIAL_1 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_INITIAL_2 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_INITIAL_3 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_INITIAL_4 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_INITIAL_5 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_1 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_2 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_3 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_4 - }, - { - -1, - MUS_BACKGROUND_TITLEMESSAGE_5 - }, { -1, -1 diff --git a/src/conf_g2s.c b/src/conf_g2s.c index 41b7296f..ec9ea426 100644 --- a/src/conf_g2s.c +++ b/src/conf_g2s.c @@ -58,86 +58,6 @@ gamemode_to_sound[] = GFX_SPECIAL_ARG_SETUP, SND_BACKGROUND_SETUP }, - { - -1, - SND_BACKGROUND_TITLESCREEN_INITIAL_1 - }, - { - -1, - SND_BACKGROUND_TITLESCREEN_INITIAL_2 - }, - { - -1, - SND_BACKGROUND_TITLESCREEN_INITIAL_3 - }, - { - -1, - SND_BACKGROUND_TITLESCREEN_INITIAL_4 - }, - { - -1, - SND_BACKGROUND_TITLESCREEN_INITIAL_5 - }, - { - -1, - SND_BACKGROUND_TITLESCREEN_1 - }, - { - -1, - SND_BACKGROUND_TITLESCREEN_2 - }, - { - -1, - SND_BACKGROUND_TITLESCREEN_3 - }, - { - -1, - SND_BACKGROUND_TITLESCREEN_4 - }, - { - -1, - SND_BACKGROUND_TITLESCREEN_5 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_INITIAL_1 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_INITIAL_2 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_INITIAL_3 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_INITIAL_4 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_INITIAL_5 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_1 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_2 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_3 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_4 - }, - { - -1, - SND_BACKGROUND_TITLEMESSAGE_5 - }, { -1, -1 diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 1b1d0954..12ede026 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -4601,6 +4601,39 @@ struct ConfigInfo image_config[] = { "menu.button_prev_level.active", UNDEFINED_FILENAME }, { "menu.button_prev_level.active.clone_from", "menu.button_left.active" }, + { "menu.button_name", UNDEFINED_FILENAME }, + { "menu.button_name.clone_from", "menu.button" }, + { "menu.button_name.active", UNDEFINED_FILENAME }, + { "menu.button_name.active.clone_from", "menu.button.active" }, + { "menu.button_levels", UNDEFINED_FILENAME }, + { "menu.button_levels.clone_from", "menu.button_right" }, + { "menu.button_levels.active", UNDEFINED_FILENAME }, + { "menu.button_levels.active.clone_from", "menu.button_right.active" }, + { "menu.button_scores", UNDEFINED_FILENAME }, + { "menu.button_scores.clone_from", "menu.button" }, + { "menu.button_scores.active", UNDEFINED_FILENAME }, + { "menu.button_scores.active.clone_from", "menu.button.active" }, + { "menu.button_editor", UNDEFINED_FILENAME }, + { "menu.button_editor.clone_from", "menu.button" }, + { "menu.button_editor.active", UNDEFINED_FILENAME }, + { "menu.button_editor.active.clone_from", "menu.button.active" }, + { "menu.button_info", UNDEFINED_FILENAME }, + { "menu.button_info.clone_from", "menu.button_right" }, + { "menu.button_info.active", UNDEFINED_FILENAME }, + { "menu.button_info.active.clone_from", "menu.button_right.active" }, + { "menu.button_game", UNDEFINED_FILENAME }, + { "menu.button_game.clone_from", "menu.button" }, + { "menu.button_game.active", UNDEFINED_FILENAME }, + { "menu.button_game.active.clone_from", "menu.button.active" }, + { "menu.button_setup", UNDEFINED_FILENAME }, + { "menu.button_setup.clone_from", "menu.button_right" }, + { "menu.button_setup.active", UNDEFINED_FILENAME }, + { "menu.button_setup.active.clone_from", "menu.button_right.active" }, + { "menu.button_quit", UNDEFINED_FILENAME }, + { "menu.button_quit.clone_from", "menu.button" }, + { "menu.button_quit.active", UNDEFINED_FILENAME }, + { "menu.button_quit.active.clone_from", "menu.button.active" }, + { "menu.scrollbar", "RocksDC.pcx" }, { "menu.scrollbar.xpos", "8" }, { "menu.scrollbar.ypos", "10" }, diff --git a/src/conf_gfx.h b/src/conf_gfx.h index 33bfdf4e..5be16be2 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -1666,125 +1666,141 @@ #define IMG_MENU_BUTTON_NEXT_LEVEL_ACTIVE 1645 #define IMG_MENU_BUTTON_PREV_LEVEL 1646 #define IMG_MENU_BUTTON_PREV_LEVEL_ACTIVE 1647 -#define IMG_MENU_SCROLLBAR 1648 -#define IMG_MENU_SCROLLBAR_ACTIVE 1649 -#define IMG_FONT_INITIAL_1 1650 -#define IMG_FONT_INITIAL_2 1651 -#define IMG_FONT_INITIAL_3 1652 -#define IMG_FONT_INITIAL_4 1653 -#define IMG_FONT_TITLE_1 1654 -#define IMG_FONT_TITLE_2 1655 -#define IMG_FONT_MENU_1 1656 -#define IMG_FONT_MENU_1_ACTIVE 1657 -#define IMG_FONT_MENU_2 1658 -#define IMG_FONT_MENU_2_ACTIVE 1659 -#define IMG_FONT_TEXT_1 1660 -#define IMG_FONT_TEXT_1_MAIN 1661 -#define IMG_FONT_TEXT_1_LEVELS 1662 -#define IMG_FONT_TEXT_1_SETUP 1663 -#define IMG_FONT_TEXT_1_PREVIEW 1664 -#define IMG_FONT_TEXT_1_SCORES 1665 -#define IMG_FONT_TEXT_1_ACTIVE_SCORES 1666 -#define IMG_FONT_TEXT_1_PANEL 1667 -#define IMG_FONT_TEXT_1_DOOR 1668 -#define IMG_FONT_TEXT_2 1669 -#define IMG_FONT_TEXT_2_MAIN 1670 -#define IMG_FONT_TEXT_2_LEVELS 1671 -#define IMG_FONT_TEXT_2_SETUP 1672 -#define IMG_FONT_TEXT_2_PREVIEW 1673 -#define IMG_FONT_TEXT_2_SCORES 1674 -#define IMG_FONT_TEXT_2_ACTIVE_SCORES 1675 -#define IMG_FONT_TEXT_3 1676 -#define IMG_FONT_TEXT_3_LEVELS 1677 -#define IMG_FONT_TEXT_3_SETUP 1678 -#define IMG_FONT_TEXT_3_PREVIEW 1679 -#define IMG_FONT_TEXT_3_SCORES 1680 -#define IMG_FONT_TEXT_3_ACTIVE_SCORES 1681 -#define IMG_FONT_TEXT_4 1682 -#define IMG_FONT_TEXT_4_MAIN 1683 -#define IMG_FONT_TEXT_4_LEVELS 1684 -#define IMG_FONT_TEXT_4_SETUP 1685 -#define IMG_FONT_TEXT_4_SCORES 1686 -#define IMG_FONT_TEXT_4_ACTIVE_SCORES 1687 -#define IMG_FONT_ENVELOPE_1 1688 -#define IMG_FONT_ENVELOPE_2 1689 -#define IMG_FONT_ENVELOPE_3 1690 -#define IMG_FONT_ENVELOPE_4 1691 -#define IMG_FONT_INPUT_1 1692 -#define IMG_FONT_INPUT_1_MAIN 1693 -#define IMG_FONT_INPUT_1_ACTIVE 1694 -#define IMG_FONT_INPUT_1_ACTIVE_MAIN 1695 -#define IMG_FONT_INPUT_1_ACTIVE_SETUP 1696 -#define IMG_FONT_INPUT_2 1697 -#define IMG_FONT_INPUT_2_ACTIVE 1698 -#define IMG_FONT_OPTION_OFF 1699 -#define IMG_FONT_OPTION_ON 1700 -#define IMG_FONT_VALUE_1 1701 -#define IMG_FONT_VALUE_2 1702 -#define IMG_FONT_VALUE_OLD 1703 -#define IMG_FONT_LEVEL_NUMBER 1704 -#define IMG_FONT_LEVEL_NUMBER_ACTIVE 1705 -#define IMG_FONT_TAPE_RECORDER 1706 -#define IMG_FONT_GAME_INFO 1707 -#define IMG_FONT_INFO_ELEMENTS 1708 -#define IMG_FONT_INFO_LEVELSET 1709 -#define IMG_GLOBAL_BORDER 1710 -#define IMG_GLOBAL_DOOR 1711 -#define IMG_EDITOR_ELEMENT_BORDER 1712 -#define IMG_EDITOR_ELEMENT_BORDER_INPUT 1713 -#define IMG_EDITOR_CASCADE_LIST 1714 -#define IMG_EDITOR_CASCADE_LIST_ACTIVE 1715 -#define IMG_BACKGROUND 1716 -#define IMG_BACKGROUND_TITLE_INITIAL 1717 -#define IMG_BACKGROUND_TITLE 1718 -#define IMG_BACKGROUND_MAIN 1719 -#define IMG_BACKGROUND_LEVELS 1720 -#define IMG_BACKGROUND_SCORES 1721 -#define IMG_BACKGROUND_EDITOR 1722 -#define IMG_BACKGROUND_INFO 1723 -#define IMG_BACKGROUND_INFO_ELEMENTS 1724 -#define IMG_BACKGROUND_INFO_MUSIC 1725 -#define IMG_BACKGROUND_INFO_CREDITS 1726 -#define IMG_BACKGROUND_INFO_PROGRAM 1727 -#define IMG_BACKGROUND_INFO_VERSION 1728 -#define IMG_BACKGROUND_INFO_LEVELSET 1729 -#define IMG_BACKGROUND_SETUP 1730 -#define IMG_BACKGROUND_DOOR 1731 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1 1732 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2 1733 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3 1734 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4 1735 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5 1736 -#define IMG_BACKGROUND_TITLESCREEN_1 1737 -#define IMG_BACKGROUND_TITLESCREEN_2 1738 -#define IMG_BACKGROUND_TITLESCREEN_3 1739 -#define IMG_BACKGROUND_TITLESCREEN_4 1740 -#define IMG_BACKGROUND_TITLESCREEN_5 1741 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1 1742 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2 1743 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3 1744 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4 1745 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5 1746 -#define IMG_BACKGROUND_TITLEMESSAGE_1 1747 -#define IMG_BACKGROUND_TITLEMESSAGE_2 1748 -#define IMG_BACKGROUND_TITLEMESSAGE_3 1749 -#define IMG_BACKGROUND_TITLEMESSAGE_4 1750 -#define IMG_BACKGROUND_TITLEMESSAGE_5 1751 -#define IMG_BACKGROUND_ENVELOPE_1 1752 -#define IMG_BACKGROUND_ENVELOPE_2 1753 -#define IMG_BACKGROUND_ENVELOPE_3 1754 -#define IMG_BACKGROUND_ENVELOPE_4 1755 -#define IMG_TITLESCREEN_INITIAL_1 1756 -#define IMG_TITLESCREEN_INITIAL_2 1757 -#define IMG_TITLESCREEN_INITIAL_3 1758 -#define IMG_TITLESCREEN_INITIAL_4 1759 -#define IMG_TITLESCREEN_INITIAL_5 1760 -#define IMG_TITLESCREEN_1 1761 -#define IMG_TITLESCREEN_2 1762 -#define IMG_TITLESCREEN_3 1763 -#define IMG_TITLESCREEN_4 1764 -#define IMG_TITLESCREEN_5 1765 +#define IMG_MENU_BUTTON_NAME 1648 +#define IMG_MENU_BUTTON_NAME_ACTIVE 1649 +#define IMG_MENU_BUTTON_LEVELS 1650 +#define IMG_MENU_BUTTON_LEVELS_ACTIVE 1651 +#define IMG_MENU_BUTTON_SCORES 1652 +#define IMG_MENU_BUTTON_SCORES_ACTIVE 1653 +#define IMG_MENU_BUTTON_EDITOR 1654 +#define IMG_MENU_BUTTON_EDITOR_ACTIVE 1655 +#define IMG_MENU_BUTTON_INFO 1656 +#define IMG_MENU_BUTTON_INFO_ACTIVE 1657 +#define IMG_MENU_BUTTON_GAME 1658 +#define IMG_MENU_BUTTON_GAME_ACTIVE 1659 +#define IMG_MENU_BUTTON_SETUP 1660 +#define IMG_MENU_BUTTON_SETUP_ACTIVE 1661 +#define IMG_MENU_BUTTON_QUIT 1662 +#define IMG_MENU_BUTTON_QUIT_ACTIVE 1663 +#define IMG_MENU_SCROLLBAR 1664 +#define IMG_MENU_SCROLLBAR_ACTIVE 1665 +#define IMG_FONT_INITIAL_1 1666 +#define IMG_FONT_INITIAL_2 1667 +#define IMG_FONT_INITIAL_3 1668 +#define IMG_FONT_INITIAL_4 1669 +#define IMG_FONT_TITLE_1 1670 +#define IMG_FONT_TITLE_2 1671 +#define IMG_FONT_MENU_1 1672 +#define IMG_FONT_MENU_1_ACTIVE 1673 +#define IMG_FONT_MENU_2 1674 +#define IMG_FONT_MENU_2_ACTIVE 1675 +#define IMG_FONT_TEXT_1 1676 +#define IMG_FONT_TEXT_1_MAIN 1677 +#define IMG_FONT_TEXT_1_LEVELS 1678 +#define IMG_FONT_TEXT_1_SETUP 1679 +#define IMG_FONT_TEXT_1_PREVIEW 1680 +#define IMG_FONT_TEXT_1_SCORES 1681 +#define IMG_FONT_TEXT_1_ACTIVE_SCORES 1682 +#define IMG_FONT_TEXT_1_PANEL 1683 +#define IMG_FONT_TEXT_1_DOOR 1684 +#define IMG_FONT_TEXT_2 1685 +#define IMG_FONT_TEXT_2_MAIN 1686 +#define IMG_FONT_TEXT_2_LEVELS 1687 +#define IMG_FONT_TEXT_2_SETUP 1688 +#define IMG_FONT_TEXT_2_PREVIEW 1689 +#define IMG_FONT_TEXT_2_SCORES 1690 +#define IMG_FONT_TEXT_2_ACTIVE_SCORES 1691 +#define IMG_FONT_TEXT_3 1692 +#define IMG_FONT_TEXT_3_LEVELS 1693 +#define IMG_FONT_TEXT_3_SETUP 1694 +#define IMG_FONT_TEXT_3_PREVIEW 1695 +#define IMG_FONT_TEXT_3_SCORES 1696 +#define IMG_FONT_TEXT_3_ACTIVE_SCORES 1697 +#define IMG_FONT_TEXT_4 1698 +#define IMG_FONT_TEXT_4_MAIN 1699 +#define IMG_FONT_TEXT_4_LEVELS 1700 +#define IMG_FONT_TEXT_4_SETUP 1701 +#define IMG_FONT_TEXT_4_SCORES 1702 +#define IMG_FONT_TEXT_4_ACTIVE_SCORES 1703 +#define IMG_FONT_ENVELOPE_1 1704 +#define IMG_FONT_ENVELOPE_2 1705 +#define IMG_FONT_ENVELOPE_3 1706 +#define IMG_FONT_ENVELOPE_4 1707 +#define IMG_FONT_INPUT_1 1708 +#define IMG_FONT_INPUT_1_MAIN 1709 +#define IMG_FONT_INPUT_1_ACTIVE 1710 +#define IMG_FONT_INPUT_1_ACTIVE_MAIN 1711 +#define IMG_FONT_INPUT_1_ACTIVE_SETUP 1712 +#define IMG_FONT_INPUT_2 1713 +#define IMG_FONT_INPUT_2_ACTIVE 1714 +#define IMG_FONT_OPTION_OFF 1715 +#define IMG_FONT_OPTION_ON 1716 +#define IMG_FONT_VALUE_1 1717 +#define IMG_FONT_VALUE_2 1718 +#define IMG_FONT_VALUE_OLD 1719 +#define IMG_FONT_LEVEL_NUMBER 1720 +#define IMG_FONT_LEVEL_NUMBER_ACTIVE 1721 +#define IMG_FONT_TAPE_RECORDER 1722 +#define IMG_FONT_GAME_INFO 1723 +#define IMG_FONT_INFO_ELEMENTS 1724 +#define IMG_FONT_INFO_LEVELSET 1725 +#define IMG_GLOBAL_BORDER 1726 +#define IMG_GLOBAL_DOOR 1727 +#define IMG_EDITOR_ELEMENT_BORDER 1728 +#define IMG_EDITOR_ELEMENT_BORDER_INPUT 1729 +#define IMG_EDITOR_CASCADE_LIST 1730 +#define IMG_EDITOR_CASCADE_LIST_ACTIVE 1731 +#define IMG_BACKGROUND 1732 +#define IMG_BACKGROUND_TITLE_INITIAL 1733 +#define IMG_BACKGROUND_TITLE 1734 +#define IMG_BACKGROUND_MAIN 1735 +#define IMG_BACKGROUND_LEVELS 1736 +#define IMG_BACKGROUND_SCORES 1737 +#define IMG_BACKGROUND_EDITOR 1738 +#define IMG_BACKGROUND_INFO 1739 +#define IMG_BACKGROUND_INFO_ELEMENTS 1740 +#define IMG_BACKGROUND_INFO_MUSIC 1741 +#define IMG_BACKGROUND_INFO_CREDITS 1742 +#define IMG_BACKGROUND_INFO_PROGRAM 1743 +#define IMG_BACKGROUND_INFO_VERSION 1744 +#define IMG_BACKGROUND_INFO_LEVELSET 1745 +#define IMG_BACKGROUND_SETUP 1746 +#define IMG_BACKGROUND_DOOR 1747 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1 1748 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2 1749 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3 1750 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4 1751 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5 1752 +#define IMG_BACKGROUND_TITLESCREEN_1 1753 +#define IMG_BACKGROUND_TITLESCREEN_2 1754 +#define IMG_BACKGROUND_TITLESCREEN_3 1755 +#define IMG_BACKGROUND_TITLESCREEN_4 1756 +#define IMG_BACKGROUND_TITLESCREEN_5 1757 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1 1758 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2 1759 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3 1760 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4 1761 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5 1762 +#define IMG_BACKGROUND_TITLEMESSAGE_1 1763 +#define IMG_BACKGROUND_TITLEMESSAGE_2 1764 +#define IMG_BACKGROUND_TITLEMESSAGE_3 1765 +#define IMG_BACKGROUND_TITLEMESSAGE_4 1766 +#define IMG_BACKGROUND_TITLEMESSAGE_5 1767 +#define IMG_BACKGROUND_ENVELOPE_1 1768 +#define IMG_BACKGROUND_ENVELOPE_2 1769 +#define IMG_BACKGROUND_ENVELOPE_3 1770 +#define IMG_BACKGROUND_ENVELOPE_4 1771 +#define IMG_TITLESCREEN_INITIAL_1 1772 +#define IMG_TITLESCREEN_INITIAL_2 1773 +#define IMG_TITLESCREEN_INITIAL_3 1774 +#define IMG_TITLESCREEN_INITIAL_4 1775 +#define IMG_TITLESCREEN_INITIAL_5 1776 +#define IMG_TITLESCREEN_1 1777 +#define IMG_TITLESCREEN_2 1778 +#define IMG_TITLESCREEN_3 1779 +#define IMG_TITLESCREEN_4 1780 +#define IMG_TITLESCREEN_5 1781 -#define NUM_IMAGE_FILES 1766 +#define NUM_IMAGE_FILES 1782 #endif /* CONF_GFX_H */ diff --git a/src/conftime.h b/src/conftime.h index 15d0413d..e2612a08 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-04-14 20:11" +#define COMPILE_DATE_STRING "2007-04-14 23:22" diff --git a/src/init.c b/src/init.c index ee8df892..d9f258ee 100644 --- a/src/init.c +++ b/src/init.c @@ -4408,7 +4408,7 @@ static void InitGlobal() element_info[i].token_name = element_name_info[i].token_name; element_info[i].class_name = element_name_info[i].class_name; - element_info[i].editor_description=element_name_info[i].editor_description; + element_info[i].editor_description= element_name_info[i].editor_description; #if 0 printf("%04d: %s\n", i, element_name_info[i].token_name); @@ -4428,6 +4428,19 @@ static void InitGlobal() ActiveElement[element] = element_active; } + /* always start with reliable default values (all buttons) */ + for (i = 0; i < NUM_IMAGE_FILES; i++) + ActiveButton[i] = i; + + /* now add all entries that have an active state (active buttons) */ + for (i = 0; button_with_active_state[i].button != -1; i++) + { + int button = button_with_active_state[i].button; + int button_active = button_with_active_state[i].button_active; + + ActiveButton[button] = button_active; + } + /* always start with reliable default values (all fonts) */ for (i = 0; i < NUM_FONTS; i++) ActiveFont[i] = i; diff --git a/src/main.c b/src/main.c index 0279b1a7..891e93e7 100644 --- a/src/main.c +++ b/src/main.c @@ -76,6 +76,7 @@ int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int ActiveElement[MAX_NUM_ELEMENTS]; +int ActiveButton[NUM_IMAGE_FILES]; int ActiveFont[NUM_FONTS]; int lev_fieldx, lev_fieldy; diff --git a/src/main.h b/src/main.h index f2ce9d60..8ae17e69 100644 --- a/src/main.h +++ b/src/main.h @@ -851,7 +851,7 @@ (d) == MV_DOWN ? "MV_DOWN" : "(various)") #define ELEMENT_ACTIVE(e) (ActiveElement[e]) - +#define BUTTON_ACTIVE(b) (ActiveButton[b]) #define FONT_ACTIVE(f) (ActiveFont[f]) @@ -2706,6 +2706,7 @@ extern int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int GfxDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int ActiveElement[MAX_NUM_ELEMENTS]; +extern int ActiveButton[NUM_IMAGE_FILES]; extern int ActiveFont[NUM_FONTS]; extern int lev_fieldx, lev_fieldy; diff --git a/src/screens.c b/src/screens.c index d16509e6..4a0110fb 100644 --- a/src/screens.c +++ b/src/screens.c @@ -125,6 +125,7 @@ #define SC_BORDER_SIZE 14 +#if 0 /* other useful macro definitions */ #define BUTTON_GRAPHIC_ACTIVE(g) \ (g == IMG_MENU_BUTTON_LEFT ? IMG_MENU_BUTTON_LEFT_ACTIVE : \ @@ -135,7 +136,16 @@ g == IMG_MENU_BUTTON_ENTER_MENU ? IMG_MENU_BUTTON_ENTER_MENU_ACTIVE : \ g == IMG_MENU_BUTTON_PREV_LEVEL ? IMG_MENU_BUTTON_PREV_LEVEL_ACTIVE : \ g == IMG_MENU_BUTTON_NEXT_LEVEL ? IMG_MENU_BUTTON_NEXT_LEVEL_ACTIVE : \ + g == IMG_MENU_BUTTON_NAME ? IMG_MENU_BUTTON_NAME_ACTIVE : \ + g == IMG_MENU_BUTTON_LEVELS ? IMG_MENU_BUTTON_LEVELS_ACTIVE : \ + g == IMG_MENU_BUTTON_SCORES ? IMG_MENU_BUTTON_SCORES_ACTIVE : \ + g == IMG_MENU_BUTTON_EDITOR ? IMG_MENU_BUTTON_EDITOR_ACTIVE : \ + g == IMG_MENU_BUTTON_INFO ? IMG_MENU_BUTTON_INFO_ACTIVE : \ + g == IMG_MENU_BUTTON_GAME ? IMG_MENU_BUTTON_GAME_ACTIVE : \ + g == IMG_MENU_BUTTON_SETUP ? IMG_MENU_BUTTON_SETUP_ACTIVE : \ + g == IMG_MENU_BUTTON_QUIT ? IMG_MENU_BUTTON_QUIT_ACTIVE : \ IMG_MENU_BUTTON_ACTIVE) +#endif /* forward declarations of internal functions */ @@ -376,49 +386,49 @@ static struct MainControlInfo main_controls[] = { { MAIN_CONTROL_NAME, - &menu.main.button.name, IMG_MENU_BUTTON, + &menu.main.button.name, IMG_MENU_BUTTON_NAME, &menu.main.text.name, &main_text_name, &menu.main.input.name, &setup.player_name, }, { MAIN_CONTROL_LEVELS, - &menu.main.button.levels, IMG_MENU_BUTTON_ENTER_MENU, + &menu.main.button.levels, IMG_MENU_BUTTON_LEVELS, &menu.main.text.levels, &main_text_levels, NULL, NULL, }, { MAIN_CONTROL_SCORES, - &menu.main.button.scores, IMG_MENU_BUTTON, + &menu.main.button.scores, IMG_MENU_BUTTON_SCORES, &menu.main.text.scores, &main_text_scores, NULL, NULL, }, { MAIN_CONTROL_EDITOR, - &menu.main.button.editor, IMG_MENU_BUTTON, + &menu.main.button.editor, IMG_MENU_BUTTON_EDITOR, &menu.main.text.editor, &main_text_editor, NULL, NULL, }, { MAIN_CONTROL_INFO, - &menu.main.button.info, IMG_MENU_BUTTON_ENTER_MENU, + &menu.main.button.info, IMG_MENU_BUTTON_INFO, &menu.main.text.info, &main_text_info, NULL, NULL, }, { MAIN_CONTROL_GAME, - &menu.main.button.game, IMG_MENU_BUTTON, + &menu.main.button.game, IMG_MENU_BUTTON_GAME, &menu.main.text.game, &main_text_game, NULL, NULL, }, { MAIN_CONTROL_SETUP, - &menu.main.button.setup, IMG_MENU_BUTTON_ENTER_MENU, + &menu.main.button.setup, IMG_MENU_BUTTON_SETUP, &menu.main.text.setup, &main_text_setup, NULL, NULL, }, { MAIN_CONTROL_QUIT, - &menu.main.button.quit, IMG_MENU_BUTTON, + &menu.main.button.quit, IMG_MENU_BUTTON_QUIT, &menu.main.text.quit, &main_text_quit, NULL, NULL, }, @@ -921,7 +931,7 @@ static void DrawCursorAndText_Main_Ext(int nr, boolean active_text, if (active_text) { - button_graphic = BUTTON_GRAPHIC_ACTIVE(button_graphic); + button_graphic = BUTTON_ACTIVE(button_graphic); font_text = FONT_ACTIVE(font_text); } @@ -1031,7 +1041,7 @@ static void drawCursorExt(int xpos, int ypos, boolean active, int graphic) } if (active) - graphic = BUTTON_GRAPHIC_ACTIVE(graphic); + graphic = BUTTON_ACTIVE(graphic); DrawBackgroundForGraphic(x, y, TILEX, TILEY, graphic); DrawGraphicThruMaskExt(drawto, x, y, graphic, 0); -- 2.34.1