mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2024-09-04 13:59:04 +00:00
Rename window flags
This commit is contained in:
parent
b0b69bd780
commit
e6fddd6905
@ -323,7 +323,7 @@ void automapShow(bool isInGame, bool isUsingScanner)
|
||||
|
||||
int automapWindowX = (screenGetWidth() - AUTOMAP_WINDOW_WIDTH) / 2;
|
||||
int automapWindowY = (screenGetHeight() - AUTOMAP_WINDOW_HEIGHT) / 2;
|
||||
int window = windowCreate(automapWindowX, automapWindowY, AUTOMAP_WINDOW_WIDTH, AUTOMAP_WINDOW_HEIGHT, color, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
int window = windowCreate(automapWindowX, automapWindowY, AUTOMAP_WINDOW_WIDTH, AUTOMAP_WINDOW_HEIGHT, color, WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
|
||||
int scannerBtn = buttonCreate(window,
|
||||
111,
|
||||
|
@ -1371,7 +1371,7 @@ static int characterEditorWindowInit()
|
||||
EDITOR_WINDOW_WIDTH,
|
||||
EDITOR_WINDOW_HEIGHT,
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (gCharacterEditorWindow == -1) {
|
||||
for (i = 0; i < EDITOR_GRAPHIC_COUNT; i++) {
|
||||
if (gCharacterEditorFrmShouldCopy[i]) {
|
||||
@ -3203,7 +3203,7 @@ static int characterEditorEditName()
|
||||
|
||||
int nameWindowX = (screenGetWidth() - EDITOR_WINDOW_WIDTH) / 2 + 17;
|
||||
int nameWindowY = (screenGetHeight() - EDITOR_WINDOW_HEIGHT) / 2;
|
||||
int win = windowCreate(nameWindowX, nameWindowY, windowWidth, windowHeight, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
int win = windowCreate(nameWindowX, nameWindowY, windowWidth, windowHeight, 256, WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -3335,7 +3335,7 @@ static int characterEditorEditAge()
|
||||
|
||||
int ageWindowX = (screenGetWidth() - EDITOR_WINDOW_WIDTH) / 2 + _editorFrmImages[EDITOR_GRAPHIC_NAME_ON].getWidth() + 9;
|
||||
int ageWindowY = (screenGetHeight() - EDITOR_WINDOW_HEIGHT) / 2;
|
||||
win = windowCreate(ageWindowX, ageWindowY, windowWidth, windowHeight, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
win = windowCreate(ageWindowX, ageWindowY, windowWidth, windowHeight, 256, WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -3577,7 +3577,7 @@ static void characterEditorEditGender()
|
||||
+ _editorFrmImages[EDITOR_GRAPHIC_NAME_ON].getWidth()
|
||||
+ _editorFrmImages[EDITOR_GRAPHIC_AGE_ON].getWidth();
|
||||
int genderWindowY = (screenGetHeight() - EDITOR_WINDOW_HEIGHT) / 2;
|
||||
int win = windowCreate(genderWindowX, genderWindowY, windowWidth, windowHeight, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
int win = windowCreate(genderWindowX, genderWindowY, windowWidth, windowHeight, 256, WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
|
||||
if (win == -1) {
|
||||
return;
|
||||
@ -3824,7 +3824,7 @@ static int characterEditorShowOptions()
|
||||
int optionsWindowY = (screenGetHeight() != 480)
|
||||
? (screenGetHeight() - _editorFrmImages[41].getHeight()) / 2
|
||||
: 90;
|
||||
int win = windowCreate(optionsWindowX, optionsWindowY, _editorFrmImages[41].getWidth(), _editorFrmImages[41].getHeight(), 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
int win = windowCreate(optionsWindowX, optionsWindowY, _editorFrmImages[41].getWidth(), _editorFrmImages[41].getHeight(), 256, WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -5814,7 +5814,7 @@ static int perkDialogShow()
|
||||
int perkWindowY = screenGetHeight() != 480
|
||||
? (screenGetHeight() - PERK_WINDOW_HEIGHT) / 2
|
||||
: PERK_WINDOW_Y;
|
||||
gPerkDialogWindow = windowCreate(perkWindowX, perkWindowY, PERK_WINDOW_WIDTH, PERK_WINDOW_HEIGHT, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
gPerkDialogWindow = windowCreate(perkWindowX, perkWindowY, PERK_WINDOW_WIDTH, PERK_WINDOW_HEIGHT, 256, WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (gPerkDialogWindow == -1) {
|
||||
_perkDialogBackgroundFrmImage.unlock();
|
||||
debugPrint("\n *** Error running perks dialog window ***\n");
|
||||
|
@ -5489,7 +5489,7 @@ static int calledShotSelectHitLocation(Object* critter, int* hitLocation, int hi
|
||||
CALLED_SHOT_WINDOW_WIDTH,
|
||||
CALLED_SHOT_WINDOW_HEIGHT,
|
||||
_colorTable[0],
|
||||
WINDOW_FLAG_0x10);
|
||||
WINDOW_MODAL);
|
||||
if (gCalledShotWindow == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ int showDialogBox(const char* title, const char** body, int bodyLength, int x, i
|
||||
backgroundFrmImage.getWidth(),
|
||||
backgroundFrmImage.getHeight(),
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (win == -1) {
|
||||
fontSetCurrent(savedFont);
|
||||
return -1;
|
||||
@ -572,7 +572,7 @@ int showLoadFileDialog(char* title, char** fileList, char* dest, int fileListLen
|
||||
// Maintain original position in original resolution, otherwise center it.
|
||||
if (screenGetWidth() != 640) x = (screenGetWidth() - backgroundWidth) / 2;
|
||||
if (screenGetHeight() != 480) y = (screenGetHeight() - backgroundHeight) / 2;
|
||||
int win = windowCreate(x, y, backgroundWidth, backgroundHeight, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
int win = windowCreate(x, y, backgroundWidth, backgroundHeight, 256, WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -938,7 +938,7 @@ int showSaveFileDialog(char* title, char** fileList, char* dest, int fileListLen
|
||||
// Maintain original position in original resolution, otherwise center it.
|
||||
if (screenGetWidth() != 640) x = (screenGetWidth() - backgroundWidth) / 2;
|
||||
if (screenGetHeight() != 480) y = (screenGetHeight() - backgroundHeight) / 2;
|
||||
int win = windowCreate(x, y, backgroundWidth, backgroundHeight, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
int win = windowCreate(x, y, backgroundWidth, backgroundHeight, 256, WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ static int elevatorWindowInit(int elevator)
|
||||
_elevatorBackgroundFrmImage.getWidth(),
|
||||
_elevatorBackgroundFrmImage.getHeight(),
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (gElevatorWindow == -1) {
|
||||
_elevatorBackgroundFrmImage.unlock();
|
||||
_elevatorPanelFrmImage.unlock();
|
||||
|
@ -562,7 +562,7 @@ static int endgameEndingSlideshowWindowInit()
|
||||
ENDGAME_ENDING_WINDOW_WIDTH,
|
||||
ENDGAME_ENDING_WINDOW_HEIGHT,
|
||||
_colorTable[0],
|
||||
WINDOW_FLAG_0x04);
|
||||
WINDOW_MOVE_ON_TOP);
|
||||
if (gEndgameEndingSlideshowWindow == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -1163,7 +1163,7 @@ static void showHelp()
|
||||
|
||||
int helpWindowX = (screenGetWidth() - HELP_SCREEN_WIDTH) / 2;
|
||||
int helpWindowY = (screenGetHeight() - HELP_SCREEN_HEIGHT) / 2;
|
||||
int win = windowCreate(helpWindowX, helpWindowY, HELP_SCREEN_WIDTH, HELP_SCREEN_HEIGHT, 0, WINDOW_HIDDEN | WINDOW_FLAG_0x04);
|
||||
int win = windowCreate(helpWindowX, helpWindowY, HELP_SCREEN_WIDTH, HELP_SCREEN_HEIGHT, 0, WINDOW_HIDDEN | WINDOW_MOVE_ON_TOP);
|
||||
if (win != -1) {
|
||||
unsigned char* windowBuffer = windowGetBuffer(win);
|
||||
if (windowBuffer != NULL) {
|
||||
|
@ -1314,7 +1314,7 @@ int gameDialogReviewWindowInit(int* win)
|
||||
GAME_DIALOG_REVIEW_WINDOW_WIDTH,
|
||||
GAME_DIALOG_REVIEW_WINDOW_HEIGHT,
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (*win == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -1733,7 +1733,7 @@ int _gdProcessInit()
|
||||
GAME_DIALOG_REPLY_WINDOW_WIDTH,
|
||||
GAME_DIALOG_REPLY_WINDOW_HEIGHT,
|
||||
256,
|
||||
WINDOW_FLAG_0x04);
|
||||
WINDOW_MOVE_ON_TOP);
|
||||
if (gGameDialogReplyWindow == -1) {
|
||||
goto err;
|
||||
}
|
||||
@ -1758,7 +1758,7 @@ int _gdProcessInit()
|
||||
|
||||
optionsWindowX = (screenGetWidth() - GAME_DIALOG_WINDOW_WIDTH) / 2 + GAME_DIALOG_OPTIONS_WINDOW_X;
|
||||
optionsWindowY = (screenGetHeight() - GAME_DIALOG_WINDOW_HEIGHT) / 2 + GAME_DIALOG_OPTIONS_WINDOW_Y;
|
||||
gGameDialogOptionsWindow = windowCreate(optionsWindowX, optionsWindowY, GAME_DIALOG_OPTIONS_WINDOW_WIDTH, GAME_DIALOG_OPTIONS_WINDOW_HEIGHT, 256, WINDOW_FLAG_0x04);
|
||||
gGameDialogOptionsWindow = windowCreate(optionsWindowX, optionsWindowY, GAME_DIALOG_OPTIONS_WINDOW_WIDTH, GAME_DIALOG_OPTIONS_WINDOW_HEIGHT, 256, WINDOW_MOVE_ON_TOP);
|
||||
if (gGameDialogOptionsWindow == -1) {
|
||||
goto err_2;
|
||||
}
|
||||
@ -3216,7 +3216,7 @@ int _gdialog_barter_create_win()
|
||||
GAME_DIALOG_WINDOW_WIDTH,
|
||||
_dialogue_subwin_len,
|
||||
256,
|
||||
WINDOW_FLAG_0x02);
|
||||
WINDOW_DONT_MOVE_TOP);
|
||||
if (gGameDialogWindow == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -3370,7 +3370,7 @@ int partyMemberControlWindowInit()
|
||||
GAME_DIALOG_WINDOW_WIDTH,
|
||||
_dialogue_subwin_len,
|
||||
256,
|
||||
WINDOW_FLAG_0x02);
|
||||
WINDOW_DONT_MOVE_TOP);
|
||||
if (gGameDialogWindow == -1) {
|
||||
partyMemberControlWindowFree();
|
||||
return -1;
|
||||
@ -3805,7 +3805,7 @@ int partyMemberCustomizationWindowInit()
|
||||
GAME_DIALOG_WINDOW_WIDTH,
|
||||
_dialogue_subwin_len,
|
||||
256,
|
||||
WINDOW_FLAG_0x02);
|
||||
WINDOW_DONT_MOVE_TOP);
|
||||
if (gGameDialogWindow == -1) {
|
||||
partyMemberCustomizationWindowFree();
|
||||
return -1;
|
||||
@ -4096,7 +4096,7 @@ int _gdCustomSelect(int a1)
|
||||
|
||||
int selectWindowX = (screenGetWidth() - backgroundFrmWidth) / 2;
|
||||
int selectWindowY = (screenGetHeight() - backgroundFrmHeight) / 2;
|
||||
int win = windowCreate(selectWindowX, selectWindowY, backgroundFrmWidth, backgroundFrmHeight, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
int win = windowCreate(selectWindowX, selectWindowY, backgroundFrmWidth, backgroundFrmHeight, 256, WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -4330,7 +4330,7 @@ int _gdialog_window_create()
|
||||
|
||||
int dialogSubwindowX = (screenGetWidth() - GAME_DIALOG_WINDOW_WIDTH) / 2;
|
||||
int dialogSubwindowY = (screenGetHeight() - GAME_DIALOG_WINDOW_HEIGHT) / 2 + GAME_DIALOG_WINDOW_HEIGHT - _dialogue_subwin_len;
|
||||
gGameDialogWindow = windowCreate(dialogSubwindowX, dialogSubwindowY, screenWidth, _dialogue_subwin_len, 256, WINDOW_FLAG_0x02);
|
||||
gGameDialogWindow = windowCreate(dialogSubwindowX, dialogSubwindowY, screenWidth, _dialogue_subwin_len, 256, WINDOW_DONT_MOVE_TOP);
|
||||
if (gGameDialogWindow != -1) {
|
||||
|
||||
unsigned char* v10 = windowGetBuffer(gGameDialogWindow);
|
||||
@ -4451,7 +4451,7 @@ static int talk_to_create_background_window()
|
||||
GAME_DIALOG_WINDOW_WIDTH,
|
||||
GAME_DIALOG_WINDOW_HEIGHT,
|
||||
256,
|
||||
WINDOW_FLAG_0x02);
|
||||
WINDOW_DONT_MOVE_TOP);
|
||||
|
||||
if (gGameDialogBackgroundWindow != -1) {
|
||||
return 0;
|
||||
|
@ -176,7 +176,7 @@ int gameMoviePlay(int movie, int flags)
|
||||
GAME_MOVIE_WINDOW_WIDTH,
|
||||
GAME_MOVIE_WINDOW_HEIGHT,
|
||||
0,
|
||||
WINDOW_FLAG_0x10);
|
||||
WINDOW_MODAL);
|
||||
if (win == -1) {
|
||||
gGameMovieIsPlaying = false;
|
||||
return -1;
|
||||
|
@ -396,7 +396,7 @@ static int pauseHandlerDefaultImpl()
|
||||
windowWidth,
|
||||
windowHeight,
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -2539,8 +2539,8 @@ static void sidePanelsInit()
|
||||
Rect windowRect;
|
||||
windowGetRect(gInterfaceBarWindow, &windowRect);
|
||||
|
||||
gInterfaceSidePanelsLeadingWindow = windowCreate(0, windowRect.top, windowRect.left, windowRect.bottom - windowRect.top + 1, 0, WINDOW_HIDDEN | WINDOW_FLAG_0x02);
|
||||
gInterfaceSidePanelsTrailingWindow = windowCreate(windowRect.right + 1, windowRect.top, screenGetWidth() - windowRect.right - 1, windowRect.bottom - windowRect.top + 1, 0, WINDOW_HIDDEN | WINDOW_FLAG_0x02);
|
||||
gInterfaceSidePanelsLeadingWindow = windowCreate(0, windowRect.top, windowRect.left, windowRect.bottom - windowRect.top + 1, 0, WINDOW_HIDDEN | WINDOW_DONT_MOVE_TOP);
|
||||
gInterfaceSidePanelsTrailingWindow = windowCreate(windowRect.right + 1, windowRect.top, screenGetWidth() - windowRect.right - 1, windowRect.bottom - windowRect.top + 1, 0, WINDOW_HIDDEN | WINDOW_DONT_MOVE_TOP);
|
||||
|
||||
char path[COMPAT_MAX_PATH];
|
||||
snprintf(path, sizeof(path), "art\\intrface\\HR_IFACELFT%d.frm", gInterfaceSidePanelsImageId);
|
||||
|
@ -743,7 +743,7 @@ static bool _setup_inventory(int inventoryWindowType)
|
||||
windowDescription->width,
|
||||
windowDescription->height,
|
||||
257,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
gInventoryWindowMaxX = windowDescription->width + inventoryWindowX;
|
||||
gInventoryWindowMaxY = windowDescription->height + inventoryWindowY;
|
||||
|
||||
@ -5747,7 +5747,7 @@ static int inventoryQuantityWindowInit(int inventoryWindowType, Object* item)
|
||||
int quantityWindowY = screenGetHeight() != 480
|
||||
? (screenGetHeight() - windowDescription->height) / 2
|
||||
: windowDescription->y;
|
||||
_mt_wid = windowCreate(quantityWindowX, quantityWindowY, windowDescription->width, windowDescription->height, 257, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
_mt_wid = windowCreate(quantityWindowX, quantityWindowY, windowDescription->width, windowDescription->height, 257, WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
unsigned char* windowBuffer = windowGetBuffer(_mt_wid);
|
||||
|
||||
FrmImage backgroundFrmImage;
|
||||
|
@ -876,7 +876,7 @@ int lsgLoadGame(int mode)
|
||||
LS_WINDOW_WIDTH,
|
||||
LS_WINDOW_HEIGHT,
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (window != -1) {
|
||||
unsigned char* windowBuffer = windowGetBuffer(window);
|
||||
bufferFill(windowBuffer, LS_WINDOW_WIDTH, LS_WINDOW_HEIGHT, LS_WINDOW_WIDTH, _colorTable[0]);
|
||||
@ -1349,7 +1349,7 @@ static int lsgWindowInit(int windowType)
|
||||
LS_WINDOW_WIDTH,
|
||||
LS_WINDOW_HEIGHT,
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (gLoadSaveWindow == -1) {
|
||||
// FIXME: Leaking frms.
|
||||
internal_free(_snapshot);
|
||||
@ -2079,7 +2079,7 @@ static int _GetComment(int a1)
|
||||
_loadsaveFrmImages[LOAD_SAVE_FRM_BOX].getWidth(),
|
||||
_loadsaveFrmImages[LOAD_SAVE_FRM_BOX].getHeight(),
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (window == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ int falloutMain(int argc, char** argv)
|
||||
break;
|
||||
case MAIN_MENU_LOAD_GAME:
|
||||
if (1) {
|
||||
int win = windowCreate(0, 0, screenGetWidth(), screenGetHeight(), _colorTable[0], WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
int win = windowCreate(0, 0, screenGetWidth(), screenGetHeight(), _colorTable[0], WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
mainMenuWindowHide(true);
|
||||
mainMenuWindowFree();
|
||||
|
||||
@ -380,7 +380,7 @@ static int _main_load_new(char* mapFileName)
|
||||
objectShow(gDude, NULL);
|
||||
mouseHideCursor();
|
||||
|
||||
int win = windowCreate(0, 0, screenGetWidth(), screenGetHeight(), _colorTable[0], WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
int win = windowCreate(0, 0, screenGetWidth(), screenGetHeight(), _colorTable[0], WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
windowRefresh(win);
|
||||
|
||||
colorPaletteLoad("color.pal");
|
||||
@ -596,7 +596,7 @@ static void showDeath()
|
||||
DEATH_WINDOW_WIDTH,
|
||||
DEATH_WINDOW_HEIGHT,
|
||||
0,
|
||||
WINDOW_FLAG_0x04);
|
||||
WINDOW_MOVE_ON_TOP);
|
||||
if (win != -1) {
|
||||
do {
|
||||
unsigned char* windowBuffer = windowGetBuffer(win);
|
||||
@ -814,7 +814,7 @@ static int mainMenuWindowInit()
|
||||
MAIN_MENU_WINDOW_WIDTH,
|
||||
MAIN_MENU_WINDOW_HEIGHT,
|
||||
0,
|
||||
WINDOW_HIDDEN | WINDOW_FLAG_0x04);
|
||||
WINDOW_HIDDEN | WINDOW_MOVE_ON_TOP);
|
||||
if (gMainMenuWindow == -1) {
|
||||
// NOTE: Uninline.
|
||||
return main_menu_fatal_error();
|
||||
|
@ -610,7 +610,7 @@ static int optionsWindowInit()
|
||||
_optionsFrmImages[0].getWidth(),
|
||||
_optionsFrmImages[0].getHeight(),
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
|
||||
if (gOptionsWindow == -1) {
|
||||
for (int index = 0; index < OPTIONS_WINDOW_BUTTONS_COUNT; index++) {
|
||||
@ -763,7 +763,7 @@ int showPause(bool a1)
|
||||
frmImages[PAUSE_WINDOW_FRM_BACKGROUND].getWidth(),
|
||||
frmImages[PAUSE_WINDOW_FRM_BACKGROUND].getHeight(),
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (window == -1) {
|
||||
messageListFree(&gOptionsMessageList);
|
||||
|
||||
@ -1504,7 +1504,7 @@ static int preferencesWindowInit()
|
||||
PREFERENCES_WINDOW_WIDTH,
|
||||
PREFERENCES_WINDOW_HEIGHT,
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (gPreferencesWindow == -1) {
|
||||
for (i = 0; i < PREFERENCES_WINDOW_FRM_COUNT; i++) {
|
||||
_preferencesFrmImages[i].unlock();
|
||||
|
@ -545,7 +545,7 @@ static int pipboyWindowInit(int intent)
|
||||
|
||||
int pipboyWindowX = (screenGetWidth() - PIPBOY_WINDOW_WIDTH) / 2;
|
||||
int pipboyWindowY = (screenGetHeight() - PIPBOY_WINDOW_HEIGHT) / 2;
|
||||
gPipboyWindow = windowCreate(pipboyWindowX, pipboyWindowY, PIPBOY_WINDOW_WIDTH, PIPBOY_WINDOW_HEIGHT, _colorTable[0], WINDOW_FLAG_0x10);
|
||||
gPipboyWindow = windowCreate(pipboyWindowX, pipboyWindowY, PIPBOY_WINDOW_WIDTH, PIPBOY_WINDOW_HEIGHT, _colorTable[0], WINDOW_MODAL);
|
||||
if (gPipboyWindow == -1) {
|
||||
debugPrint("\n** Error opening pipboy window! **\n");
|
||||
for (int index = 0; index < PIPBOY_FRM_COUNT; index++) {
|
||||
|
@ -229,7 +229,7 @@ static int skilldexWindowInit()
|
||||
_skilldexFrmImages[SKILLDEX_FRM_BACKGROUND].getWidth(),
|
||||
_skilldexFrmImages[SKILLDEX_FRM_BACKGROUND].getHeight(),
|
||||
256,
|
||||
WINDOW_FLAG_0x10 | WINDOW_FLAG_0x02);
|
||||
WINDOW_MODAL | WINDOW_DONT_MOVE_TOP);
|
||||
if (gSkilldexWindow == -1) {
|
||||
for (int index = 0; index < SKILLDEX_SKILL_BUTTON_BUFFER_COUNT; index++) {
|
||||
internal_free(gSkilldexButtonsData[index]);
|
||||
|
@ -801,7 +801,7 @@ int _createWindow(const char* windowName, int x, int y, int width, int height, i
|
||||
managedWindow->buttons = NULL;
|
||||
managedWindow->buttonsLength = 0;
|
||||
|
||||
flags |= 0x101;
|
||||
flags |= WINDOW_MANAGED | WINDOW_USE_DEFAULTS;
|
||||
if (off_672D74 != NULL) {
|
||||
off_672D74(windowIndex, managedWindow->name, &flags);
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ int windowCreate(int x, int y, int width, int height, int color, int flags)
|
||||
|
||||
window->id = index;
|
||||
|
||||
if ((flags & WINDOW_FLAG_0x01) != 0) {
|
||||
if ((flags & WINDOW_USE_DEFAULTS) != 0) {
|
||||
flags |= _window_flags;
|
||||
}
|
||||
|
||||
@ -386,10 +386,10 @@ int windowCreate(int x, int y, int width, int height, int color, int flags)
|
||||
_win_move(index, x, y);
|
||||
window->flags = flags;
|
||||
|
||||
if ((flags & WINDOW_FLAG_0x04) == 0) {
|
||||
if ((flags & WINDOW_MOVE_ON_TOP) == 0) {
|
||||
v23 = gWindowsLength - 2;
|
||||
while (v23 > 0) {
|
||||
if (!(gWindows[v23]->flags & WINDOW_FLAG_0x04)) {
|
||||
if (!(gWindows[v23]->flags & WINDOW_MOVE_ON_TOP)) {
|
||||
break;
|
||||
}
|
||||
v23--;
|
||||
@ -680,9 +680,9 @@ void windowUnhide(int win)
|
||||
}
|
||||
|
||||
v5 = gWindowsLength - 1;
|
||||
if (v3 < v5 && !(window->flags & WINDOW_FLAG_0x02)) {
|
||||
if (v3 < v5 && !(window->flags & WINDOW_DONT_MOVE_TOP)) {
|
||||
v7 = v3;
|
||||
while (v3 < v5 && ((window->flags & WINDOW_FLAG_0x04) || !(gWindows[v7 + 1]->flags & WINDOW_FLAG_0x04))) {
|
||||
while (v3 < v5 && ((window->flags & WINDOW_MOVE_ON_TOP) || !(gWindows[v7 + 1]->flags & WINDOW_MOVE_ON_TOP))) {
|
||||
v6 = gWindows[v7 + 1];
|
||||
gWindows[v7] = v6;
|
||||
v7++;
|
||||
@ -737,7 +737,7 @@ void _win_move(int win, int x, int y)
|
||||
y = 0;
|
||||
}
|
||||
|
||||
if ((window->flags & WINDOW_FLAG_0x0100) != 0) {
|
||||
if ((window->flags & WINDOW_MANAGED) != 0) {
|
||||
x += 2;
|
||||
}
|
||||
|
||||
@ -749,7 +749,7 @@ void _win_move(int win, int x, int y)
|
||||
y = _scr_size.bottom - window->height + 1;
|
||||
}
|
||||
|
||||
if ((window->flags & WINDOW_FLAG_0x0100) != 0) {
|
||||
if ((window->flags & WINDOW_MANAGED) != 0) {
|
||||
// TODO: Not sure what this means.
|
||||
x &= ~0x03;
|
||||
}
|
||||
@ -817,7 +817,7 @@ void _GNW_win_refresh(Window* window, Rect* rect, unsigned char* a3)
|
||||
return;
|
||||
}
|
||||
|
||||
if ((window->flags & WINDOW_FLAG_0x20) && _buffering && !_doing_refresh_all) {
|
||||
if ((window->flags & WINDOW_TRANSPARENT) && _buffering && !_doing_refresh_all) {
|
||||
// TODO: Incomplete.
|
||||
} else {
|
||||
v26 = _rect_malloc();
|
||||
@ -845,7 +845,7 @@ void _GNW_win_refresh(Window* window, Rect* rect, unsigned char* a3)
|
||||
_GNW_button_refresh(window, &(v20->rect));
|
||||
|
||||
if (a3) {
|
||||
if (_buffering && (window->flags & WINDOW_FLAG_0x20)) {
|
||||
if (_buffering && (window->flags & WINDOW_TRANSPARENT)) {
|
||||
window->blitProc(window->buffer + v20->rect.left - window->rect.left + (v20->rect.top - window->rect.top) * window->width,
|
||||
v20->rect.right - v20->rect.left + 1,
|
||||
v20->rect.bottom - v20->rect.top + 1,
|
||||
@ -863,7 +863,7 @@ void _GNW_win_refresh(Window* window, Rect* rect, unsigned char* a3)
|
||||
}
|
||||
} else {
|
||||
if (_buffering) {
|
||||
if (window->flags & WINDOW_FLAG_0x20) {
|
||||
if (window->flags & WINDOW_TRANSPARENT) {
|
||||
window->blitProc(
|
||||
window->buffer + v20->rect.left - window->rect.left + (v20->rect.top - window->rect.top) * window->width,
|
||||
v20->rect.right - v20->rect.left + 1,
|
||||
@ -984,7 +984,7 @@ void _win_clip(Window* window, RectListNode** rectListNodePtr, unsigned char* a3
|
||||
|
||||
Window* window = gWindows[win];
|
||||
if (!(window->flags & WINDOW_HIDDEN)) {
|
||||
if (!_buffering || !(window->flags & WINDOW_FLAG_0x20)) {
|
||||
if (!_buffering || !(window->flags & WINDOW_TRANSPARENT)) {
|
||||
_rect_clip_list(rectListNodePtr, &(window->rect));
|
||||
} else {
|
||||
if (!_doing_refresh_all) {
|
||||
@ -1029,7 +1029,7 @@ void _win_drag(int win)
|
||||
_mouse_info();
|
||||
}
|
||||
|
||||
if ((window->flags & WINDOW_FLAG_0x0100) && (window->rect.left & 3)) {
|
||||
if ((window->flags & WINDOW_MANAGED) && (window->rect.left & 3)) {
|
||||
_win_move(window->id, window->rect.left, window->rect.top);
|
||||
}
|
||||
}
|
||||
@ -1174,7 +1174,7 @@ int _win_check_all_buttons()
|
||||
break;
|
||||
}
|
||||
|
||||
if ((gWindows[index]->flags & WINDOW_FLAG_0x10) != 0) {
|
||||
if ((gWindows[index]->flags & WINDOW_MODAL) != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1222,7 +1222,7 @@ int _GNW_check_menu_bars(int a1)
|
||||
}
|
||||
}
|
||||
|
||||
if ((window->flags & 0x10) != 0) {
|
||||
if ((window->flags & WINDOW_MODAL) != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -32,15 +32,19 @@ typedef enum WindowManagerErr {
|
||||
} WindowManagerErr;
|
||||
|
||||
typedef enum WindowFlags {
|
||||
WINDOW_FLAG_0x01 = 0x01,
|
||||
WINDOW_FLAG_0x02 = 0x02,
|
||||
WINDOW_FLAG_0x04 = 0x04,
|
||||
WINDOW_HIDDEN = 0x08,
|
||||
WINDOW_FLAG_0x10 = 0x10,
|
||||
WINDOW_FLAG_0x20 = 0x20,
|
||||
// Use system window flags which are set during game startup and does not
|
||||
// change afterwards.
|
||||
WINDOW_USE_DEFAULTS = 0x1,
|
||||
WINDOW_DONT_MOVE_TOP = 0x2,
|
||||
WINDOW_MOVE_ON_TOP = 0x4,
|
||||
WINDOW_HIDDEN = 0x8,
|
||||
// Sfall calls this Exclusive.
|
||||
WINDOW_MODAL = 0x10,
|
||||
WINDOW_TRANSPARENT = 0x20,
|
||||
WINDOW_FLAG_0x40 = 0x40,
|
||||
// Draggable?
|
||||
WINDOW_FLAG_0x80 = 0x80,
|
||||
WINDOW_FLAG_0x0100 = 0x0100,
|
||||
WINDOW_MANAGED = 0x100,
|
||||
} WindowFlags;
|
||||
|
||||
typedef enum ButtonFlags {
|
||||
|
@ -107,7 +107,7 @@ int _win_list_select_at(const char* title, char** items, int itemsLength, ListSe
|
||||
int listViewCapacity = 10;
|
||||
for (int heightMultiplier = 13; heightMultiplier > 8; heightMultiplier--) {
|
||||
windowHeight = heightMultiplier * fontGetLineHeight() + 22;
|
||||
win = windowCreate(x, y, windowWidth, windowHeight, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
win = windowCreate(x, y, windowWidth, windowHeight, 256, WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (win != -1) {
|
||||
break;
|
||||
}
|
||||
@ -558,7 +558,7 @@ int _win_get_str(char* dest, int length, const char* title, int x, int y)
|
||||
|
||||
int windowHeight = 5 * fontGetLineHeight() + 16;
|
||||
|
||||
int win = windowCreate(x, y, windowWidth, windowHeight, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
int win = windowCreate(x, y, windowWidth, windowHeight, 256, WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -634,7 +634,7 @@ int _win_msg(const char* string, int x, int y, int flags)
|
||||
|
||||
windowWidth += 16;
|
||||
|
||||
int win = windowCreate(x, y, windowWidth, windowHeight, 256, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
int win = windowCreate(x, y, windowWidth, windowHeight, 256, WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -703,7 +703,7 @@ int _create_pull_down(char** stringList, int stringListLength, int x, int y, int
|
||||
return -1;
|
||||
}
|
||||
|
||||
int win = windowCreate(x, y, windowWidth, windowHeight, a6, WINDOW_FLAG_0x10 | WINDOW_FLAG_0x04);
|
||||
int win = windowCreate(x, y, windowWidth, windowHeight, a6, WINDOW_MODAL | WINDOW_MOVE_ON_TOP);
|
||||
if (win == -1) {
|
||||
return -1;
|
||||
}
|
||||
@ -727,7 +727,7 @@ int _win_debug(char* string)
|
||||
int lineHeight = fontGetLineHeight();
|
||||
|
||||
if (_wd == -1) {
|
||||
_wd = windowCreate(80, 80, 300, 192, 256, WINDOW_FLAG_0x04);
|
||||
_wd = windowCreate(80, 80, 300, 192, 256, WINDOW_MOVE_ON_TOP);
|
||||
if (_wd == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -4461,7 +4461,7 @@ static int wmInterfaceInit()
|
||||
|
||||
int worldmapWindowX = (screenGetWidth() - WM_WINDOW_WIDTH) / 2;
|
||||
int worldmapWindowY = (screenGetHeight() - WM_WINDOW_HEIGHT) / 2;
|
||||
wmBkWin = windowCreate(worldmapWindowX, worldmapWindowY, WM_WINDOW_WIDTH, WM_WINDOW_HEIGHT, _colorTable[0], WINDOW_FLAG_0x04);
|
||||
wmBkWin = windowCreate(worldmapWindowX, worldmapWindowY, WM_WINDOW_WIDTH, WM_WINDOW_HEIGHT, _colorTable[0], WINDOW_MOVE_ON_TOP);
|
||||
if (wmBkWin == -1) {
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user