Extract preferences
This commit is contained in:
parent
0a9a1dc7ca
commit
d7c4589a55
|
@ -259,6 +259,8 @@ target_sources(${EXECUTABLE_NAME} PUBLIC
|
|||
"src/platform_compat.h"
|
||||
"src/pointer_registry.cc"
|
||||
"src/pointer_registry.h"
|
||||
"src/preferences.cc"
|
||||
"src/preferences.h"
|
||||
"src/settings.cc"
|
||||
"src/settings.h"
|
||||
"src/sfall_config.cc"
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#include "message.h"
|
||||
#include "mouse.h"
|
||||
#include "object.h"
|
||||
#include "options.h"
|
||||
#include "palette.h"
|
||||
#include "platform_compat.h"
|
||||
#include "preferences.h"
|
||||
#include "proto.h"
|
||||
#include "settings.h"
|
||||
#include "sfall_config.h"
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "perk.h"
|
||||
#include "pipboy.h"
|
||||
#include "platform_compat.h"
|
||||
#include "preferences.h"
|
||||
#include "proto.h"
|
||||
#include "queue.h"
|
||||
#include "random.h"
|
||||
|
@ -1340,6 +1341,10 @@ static int gameDbInit()
|
|||
}
|
||||
}
|
||||
|
||||
if (access("f2_res.dat", 0) == 0) {
|
||||
dbOpen("f2_res.dat", 0, NULL, 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
#include "message.h"
|
||||
#include "mouse.h"
|
||||
#include "object.h"
|
||||
#include "options.h"
|
||||
#include "party_member.h"
|
||||
#include "perk.h"
|
||||
#include "pipboy.h"
|
||||
#include "platform_compat.h"
|
||||
#include "preferences.h"
|
||||
#include "proto.h"
|
||||
#include "queue.h"
|
||||
#include "random.h"
|
||||
|
|
10
src/main.cc
10
src/main.cc
|
@ -24,9 +24,9 @@
|
|||
#include "map.h"
|
||||
#include "mouse.h"
|
||||
#include "object.h"
|
||||
#include "options.h"
|
||||
#include "palette.h"
|
||||
#include "platform_compat.h"
|
||||
#include "preferences.h"
|
||||
#include "proto.h"
|
||||
#include "random.h"
|
||||
#include "scripts.h"
|
||||
|
@ -290,12 +290,8 @@ int falloutMain(int argc, char** argv)
|
|||
_main_selfrun_play();
|
||||
break;
|
||||
case MAIN_MENU_OPTIONS:
|
||||
mainMenuWindowHide(false);
|
||||
mouseShowCursor();
|
||||
showOptionsWithInitialKeyCode(112);
|
||||
gameMouseSetCursor(MOUSE_CURSOR_ARROW);
|
||||
mouseShowCursor();
|
||||
mainMenuWindowUnhide(0);
|
||||
mainMenuWindowHide(true);
|
||||
doPreferences(true);
|
||||
break;
|
||||
case MAIN_MENU_CREDITS:
|
||||
mainMenuWindowHide(true);
|
||||
|
|
1586
src/options.cc
1586
src/options.cc
File diff suppressed because it is too large
Load Diff
|
@ -1,37 +1,11 @@
|
|||
#ifndef OPTIONS_H
|
||||
#define OPTIONS_H
|
||||
|
||||
#include "db.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
extern int gPreferencesSoundEffectsVolume1;
|
||||
extern int gPreferencesSubtitles1;
|
||||
extern int gPreferencesLanguageFilter1;
|
||||
extern int gPreferencesSpeechVolume1;
|
||||
extern int gPreferencesMasterVolume1;
|
||||
extern int gPreferencesPlayerSpeedup1;
|
||||
extern int gPreferencesCombatTaunts1;
|
||||
extern int gPreferencesMusicVolume1;
|
||||
extern int gPreferencesRunning1;
|
||||
extern int gPreferencesCombatSpeed1;
|
||||
extern int gPreferencesItemHighlight1;
|
||||
extern int gPreferencesCombatMessages1;
|
||||
extern int gPreferencesTargetHighlight1;
|
||||
extern int gPreferencesCombatDifficulty1;
|
||||
extern int gPreferencesViolenceLevel1;
|
||||
extern int gPreferencesGameDifficulty1;
|
||||
extern int gPreferencesCombatLooks1;
|
||||
|
||||
int showOptions();
|
||||
int showOptionsWithInitialKeyCode(int initialKeyCode);
|
||||
int showPause(bool a1);
|
||||
int _init_options_menu();
|
||||
int preferencesSave(File* stream);
|
||||
int preferencesLoad(File* stream);
|
||||
void brightnessIncrease();
|
||||
void brightnessDecrease();
|
||||
int _do_options();
|
||||
|
||||
} // namespace fallout
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
#ifndef FALLOUT_PREFERENCES_H_
|
||||
#define FALLOUT_PREFERENCES_H_
|
||||
|
||||
#include "db.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
int preferencesInit();
|
||||
int doPreferences(bool animated);
|
||||
int preferencesSave(File* stream);
|
||||
int preferencesLoad(File* stream);
|
||||
void brightnessIncrease();
|
||||
void brightnessDecrease();
|
||||
|
||||
} // namespace fallout
|
||||
|
||||
#endif /* FALLOUT_PREFERENCES_H_ */
|
Loading…
Reference in New Issue