23 #ifndef BAGEL_BAGLIB_MASTER_WIN_H 24 #define BAGEL_BAGLIB_MASTER_WIN_H 26 #include "bagel/spacebar/boflib/gfx/text.h" 27 #include "bagel/spacebar/baglib/cursor.h" 28 #include "bagel/boflib/string.h" 29 #include "bagel/spacebar/baglib/bagel.h" 30 #include "bagel/spacebar/boflib/gui/window.h" 31 #include "bagel/boflib/sound.h" 32 #include "bagel/spacebar/baglib/object.h" 33 #include "bagel/spacebar/baglib/save_game_file.h" 34 #include "bagel/spacebar/baglib/var.h" 39 #define g_SDevManager CBagel::getBagApp()->getMasterWnd()->getStorageDevManager() 40 #define g_VarManager CBagel::getBagApp()->getMasterWnd()->getVariableManager() 42 class CBagStorageDevManager;
43 class CBagStorageDevWnd;
46 enum SpaceBarEventType {
47 WM_ENTER_PAN_WINDOW = 1001,
48 WM_ENTER_CLOSE_UP_WINDOW = 1002,
49 WM_EXIT_CLOSE_UP_WINDOW = 1003,
50 WM_ENTER_NEW_WLD = 1004,
52 WM_SHOW_SYSTEM_DLG = 1006
55 #define MAX_CURSORS 60 58 void setCICStatus(CBagStorageDev *sdev);
69 static bool _objSaveFl;
70 static StObj *_objList;
86 static int _curCursor;
89 static int _menuCount;
93 virtual ErrorCode Run();
95 ErrorCode close()
override;
101 static void setActiveCursor(
int cursorId);
102 static int getActiveCursor() {
107 static bool getFlyThru();
109 static bool getPanimations();
110 static void setPanimations(
bool panimsFl);
112 static int getCorrection();
113 static void setCorrection(
int correction);
115 static int getPanSpeed();
116 static void setPanSpeed(
int speed);
118 static int getMidiVolume();
119 static void setMidiVolume(
int vol);
121 static int getWaveVolume();
122 static void setWaveVolume(
int vol);
124 static bool getMidi() {
125 return getMidiVolume() != 0;
127 static bool getDigitalAudio() {
128 return getWaveVolume() != 0;
131 static void muteToggle();
132 static void forcePaintScreen();
134 virtual ErrorCode showSystemDialog(
bool saveFl =
true);
135 bool showRestartDialog(
CBofWindow *win =
nullptr,
bool saveFl =
true);
136 bool showSaveDialog(
CBofWindow *win,
bool saveFl =
true);
137 bool showRestoreDialog(
CBofWindow *win,
bool saveFl =
true);
138 bool showQuitDialog(
CBofWindow *win,
bool saveFl =
true);
139 ErrorCode showCreditsDialog(
CBofWindow *win,
bool saveFl =
true);
146 ErrorCode loadFile(
const CBofString &wldName,
const CBofString &startWldName,
bool restartFl =
false,
bool setStartFl =
true);
149 ErrorCode loadGlobalVars(
const CBofString &wldName);
151 ErrorCode setCurrfadeIn(
int fade) {
155 ErrorCode setStorageDev(
const CBofString &wldName,
bool entry =
true);
156 ErrorCode gotoNewWindow(
const CBofString *str);
158 uint16 getDiskID()
const {
161 void setDiskID(uint16
id) {
172 return _storageDeviceList;
175 return _variableList;
184 virtual ErrorCode onHelp(
const CBofString &helpFile,
bool saveBkgFl =
true,
CBofWindow *parent =
nullptr);
186 void onUserMessage(uint32 message, uint32 param)
override;
188 void onKeyHit(uint32 keyCode, uint32 repCount)
override;
189 void onClose()
override;
191 StObj *getObjList() {
194 void setSaveObjs(
bool saveFl) {
201 void saveSDevStack();
207 ErrorCode waitForInput();
209 extern bool g_waitOKFl;
Definition: ifstream.h:32
Definition: parse_object.h:48
Definition: save_game_file.h:77
Definition: master_win.h:67
Definition: storage_dev_win.h:547
Definition: storage_dev_win.h:410
Definition: save_game_file.h:104
Definition: storage_dev_win.h:79