From 1570f860e8a3aa63d4026e6edd5f6b38ea49399e Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Fri, 17 Feb 2023 15:53:42 +0300 Subject: [PATCH] Remove unnecessary calls --- src/preferences.cc | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/preferences.cc b/src/preferences.cc index 80a71ef..4cbd94b 100644 --- a/src/preferences.cc +++ b/src/preferences.cc @@ -6,7 +6,6 @@ #include "color.h" #include "combat.h" #include "combat_ai.h" -#include "cycle.h" #include "debug.h" #include "draw.h" #include "game.h" @@ -15,7 +14,6 @@ #include "graph_lib.h" #include "input.h" #include "kb.h" -#include "map.h" #include "message.h" #include "mouse.h" #include "palette.h" @@ -392,9 +390,6 @@ static PreferenceDescription gPreferenceDescriptions[PREF_COUNT] = { static FrmImage _preferencesFrmImages[PREFERENCES_WINDOW_FRM_COUNT]; static int _oldFont; -static bool _cycleWasEnabled; -static bool _isoWasEnabled; -static bool _mouseWasVisible; int preferencesInit() { @@ -981,22 +976,8 @@ static int preferencesWindowInit() return -1; } - gameMouseSetCursor(MOUSE_CURSOR_ARROW); - _oldFont = fontGetCurrent(); - _isoWasEnabled = isoDisable(); - - _cycleWasEnabled = colorCycleEnabled(); - if (_cycleWasEnabled) { - colorCycleDisable(); - } - - _mouseWasVisible = gameMouseObjectsIsVisible(); - if (_mouseWasVisible) { - gameMouseObjectsHide(); - } - _SaveSettings(); for (i = 0; i < PREFERENCES_WINDOW_FRM_COUNT; i++) { @@ -1210,18 +1191,6 @@ static int preferencesWindowFree() _preferencesFrmImages[index].unlock(); } - if (_mouseWasVisible) { - gameMouseObjectsShow(); - } - - if (_cycleWasEnabled) { - colorCycleEnable(); - } - - if (_isoWasEnabled) { - isoEnable(); - } - fontSetCurrent(_oldFont); messageListFree(&gPreferencesMessageList);