From dae87e096487143057a860f85b0b43438b549ff3 Mon Sep 17 00:00:00 2001 From: Wipe Date: Fri, 10 Jun 2022 08:36:47 +0200 Subject: [PATCH] Correct minor mistakes in #36 (#40) --- src/main.cc | 12 ++++++------ src/sfall_config.cc | 4 ++-- src/sfall_config.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main.cc b/src/main.cc index 673ef6b..c4f1417 100644 --- a/src/main.cc +++ b/src/main.cc @@ -646,11 +646,11 @@ int mainMenuWindowInit() // SFALL: Allow to change font color/flags of copyright/version text // It's the last byte ('3C' by default) that picks the colour used. The first byte supplies additional flags for this option - // 0x1 - change the color for version string only - // 0x2 - underline text (only for the version string) - // 0x4 - monospace font (only for the version string) + // 0x010000 - change the color for version string only + // 0x020000 - underline text (only for the version string) + // 0x040000 - monospace font (only for the version string) int fontSettings = _colorTable[21091], fontSettingsSFall = 0; - configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR, &fontSettingsSFall); + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR_KEY, &fontSettingsSFall); if (fontSettingsSFall && !(fontSettingsSFall & 0x010000)) fontSettings = fontSettingsSFall & 0xFF; @@ -660,7 +660,7 @@ int mainMenuWindowInit() windowDrawText(gMainMenuWindow, msg.text, 0, 15, 460, fontSettings | 0x06000000); } - // SFALL: Make sure font settings are applied when using 0x1 flag + // SFALL: Make sure font settings are applied when using 0x010000 flag if (fontSettingsSFall) fontSettings = fontSettingsSFall; @@ -705,7 +705,7 @@ int mainMenuWindowInit() // SFALL: Allow to change font color of buttons fontSettings = _colorTable[21091]; fontSettingsSFall = 0; - configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR, &fontSettingsSFall); + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY, &fontSettingsSFall); if (fontSettingsSFall) fontSettings = fontSettingsSFall & 0xFF; diff --git a/src/sfall_config.cc b/src/sfall_config.cc index 8de82ea..46f3c8e 100644 --- a/src/sfall_config.cc +++ b/src/sfall_config.cc @@ -25,8 +25,8 @@ bool sfallConfigInit(int argc, char** argv) configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_FEMALE_KEY, ""); configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_MALE_KEY, ""); configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY, ""); - configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR, 0); - configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR, 0); + configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY, 0); + configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR_KEY, 0); configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY, 0); configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_STARTING_MAP_KEY, ""); configSetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DISPLAY_KARMA_CHANGES_KEY, false); diff --git a/src/sfall_config.h b/src/sfall_config.h index ea5795b..a1d423f 100644 --- a/src/sfall_config.h +++ b/src/sfall_config.h @@ -11,8 +11,8 @@ #define SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_FEMALE_KEY "FemaleDefaultModel" #define SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_MALE_KEY "MaleStartModel" #define SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY "FemaleStartModel" -#define SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR "MainMenuBigFontColour" -#define SFALL_CONFIG_MAIN_MENU_FONT_COLOR "MainMenuFontColour" +#define SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY "MainMenuBigFontColour" +#define SFALL_CONFIG_MAIN_MENU_FONT_COLOR_KEY "MainMenuFontColour" #define SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY "SkipOpeningMovies" #define SFALL_CONFIG_STARTING_MAP_KEY "StartingMap" #define SFALL_CONFIG_KARMA_FRMS_KEY "KarmaFRMs"