diff --git a/src/game_mouse.cc b/src/game_mouse.cc index caecddd..aa2ae58 100644 --- a/src/game_mouse.cc +++ b/src/game_mouse.cc @@ -16,6 +16,7 @@ #include "object.h" #include "proto.h" #include "proto_instance.h" +#include "sfall_config.h" #include "skill.h" #include "skilldex.h" #include "text_font.h" @@ -314,6 +315,8 @@ static int gameMouseHandleScrolling(int x, int y, int cursor); static int objectIsDoor(Object* object); static bool gameMouseClickOnInterfaceBar(); +static void customMouseModeFrmsInit(); + // 0x44B2B0 int gameMouseInit() { @@ -330,6 +333,9 @@ int gameMouseInit() gameMouseSetCursor(MOUSE_CURSOR_ARROW); + // SFALL + customMouseModeFrmsInit(); + return 0; } @@ -2409,3 +2415,14 @@ int objectIsDoor(Object* object) return proto->scenery.type == SCENERY_TYPE_DOOR; } + +static void customMouseModeFrmsInit() +{ + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_FIRST_AID_FRM_KEY, &(gGameMouseModeFrmIds[GAME_MOUSE_MODE_USE_FIRST_AID])); + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_DOCTOR_FRM_KEY, &(gGameMouseModeFrmIds[GAME_MOUSE_MODE_USE_DOCTOR])); + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_LOCKPICK_FRM_KEY, &(gGameMouseModeFrmIds[GAME_MOUSE_MODE_USE_LOCKPICK])); + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_STEAL_FRM_KEY, &(gGameMouseModeFrmIds[GAME_MOUSE_MODE_USE_STEAL])); + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_TRAPS_FRM_KEY, &(gGameMouseModeFrmIds[GAME_MOUSE_MODE_USE_TRAPS])); + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_SCIENCE_FRM_KEY, &(gGameMouseModeFrmIds[GAME_MOUSE_MODE_USE_SCIENCE])); + configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_USE_REPAIR_FRM_KEY, &(gGameMouseModeFrmIds[GAME_MOUSE_MODE_USE_REPAIR])); +} diff --git a/src/sfall_config.h b/src/sfall_config.h index 865a5ad..fb974f6 100644 --- a/src/sfall_config.h +++ b/src/sfall_config.h @@ -45,6 +45,13 @@ #define SFALL_CONFIG_DAMAGE_MOD_FORMULA_KEY "DamageFormula" #define SFALL_CONFIG_BONUS_HTH_DAMAGE_FIX_KEY "BonusHtHDamageFix" #define SFALL_CONFIG_DISPLAY_BONUS_DAMAGE_KEY "DisplayBonusDamage" +#define SFALL_CONFIG_USE_LOCKPICK_FRM_KEY "Lockpick" +#define SFALL_CONFIG_USE_STEAL_FRM_KEY "Steal" +#define SFALL_CONFIG_USE_TRAPS_FRM_KEY "Traps" +#define SFALL_CONFIG_USE_FIRST_AID_FRM_KEY "FirstAid" +#define SFALL_CONFIG_USE_DOCTOR_FRM_KEY "Doctor" +#define SFALL_CONFIG_USE_SCIENCE_FRM_KEY "Science" +#define SFALL_CONFIG_USE_REPAIR_FRM_KEY "Repair" #define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_MULTIPLIER 1 #define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_DIVISOR 3