Mercurial > mm7
changeset 151:9abdd40a107b
pCurrentScreen
author | Ritor1 |
---|---|
date | Tue, 12 Feb 2013 15:28:08 +0600 |
parents | d92c78ab54fe |
children | 796b79187c27 |
files | GUIWindow.cpp GUIWindow.h Game.cpp GameUIs.cpp Player.cpp SaveLoad.cpp VideoPlayer.cpp mm7_1.cpp mm7_2.cpp mm7_3.cpp mm7_4.cpp mm7_5.cpp mm7_6.cpp |
diffstat | 13 files changed, 335 insertions(+), 248 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIWindow.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/GUIWindow.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -474,7 +474,7 @@ pAudioPlayer->StopChannels(-1, -1); InitializeBookFonts(); v1->CreateButton(0x1DBu, 0x1BDu, 0x9Eu, 0x22u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], 0); - pCurrentScreen = 3; + pCurrentScreen = SCREEN_BOOKS; dword_506524 = 0; dword_506528 = 0; dword_50651C = 0; @@ -1156,12 +1156,10 @@ goto LABEL_56; } v4 = (char *)array_5913D8[6] - 1; - pRenderer->DrawTextureIndexed( - _4E5E50_transui_x - 4, - _4E5EE0_transui_y - 4, + pRenderer->DrawTextureIndexed(_4E5E50_transui_x - 4, _4E5EE0_transui_y - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); pRenderer->DrawTextureIndexed(_4E5E50_transui_x, _4E5EE0_transui_y, pDialogueNPCPortraits[(signed int)v4]); - if ( pCurrentScreen == 14 ) + if ( pCurrentScreen == SCREEN_E ) { CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); goto LABEL_58; @@ -1859,7 +1857,7 @@ break; case WINDOW_A: pMainScreenNum = pCurrentScreen; - pCurrentScreen = 4; + pCurrentScreen = SCREEN_NPC_DIALOGUE; pBtn_ExitCancel = pWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], //"Exit" (Texture *)(uTextureID_506438 != -1 ? &pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); if ( pWindow->ptr_1C != (void *)1 ) @@ -1957,7 +1955,7 @@ break; case WINDOW_ChangeLocation: pMainScreenNum = pCurrentScreen; - pCurrentScreen = 17; + pCurrentScreen = SCREEN_CHANGE_LOCATION; pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x5Bu, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[156],//Остаться в этой области (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x5Au, 0, 0x59u, pWindow->Hint, @@ -1972,7 +1970,7 @@ case WINDOW_GreetingNPC: // окно приветствия НПС pMainScreenNum = pCurrentScreen; pKeyActionMap->EnterText(0, 15, pWindow); - pCurrentScreen = 19; + pCurrentScreen = SCREEN_BRANCHLESS_NPC_DIALOG; break; } return pWindow; @@ -1987,7 +1985,7 @@ } if (eWindowType == WINDOW_HouseInterior) { - pCurrentScreen = 13; + pCurrentScreen = SCREEN_HOUSE; pBtn_ExitCancel = pWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[80],//Выйти из здания (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); v25 = uNumDialogueNPCPortraits; @@ -2032,7 +2030,7 @@ if (eWindowType == WINDOW_1A) { pMainScreenNum = pCurrentScreen; - pCurrentScreen = 18; + pCurrentScreen = SCREEN_INPUT_BLV; pBtn_ExitCancel = pWindow->CreateButton(0x236u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x19Cu, 0, 0x4Eu, pGlobalTXT_LocalizationStrings[34],//Отмена (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x19Bu, 0, 0x59u, pWindow->Hint, @@ -2067,7 +2065,7 @@ ShowStatusBarString(pGlobalTXT_LocalizationStrings[39], 2);//Выбрать цель ++pIcons_LOD->uTexturePacksCount; pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; - pCurrentScreen = 23; + pCurrentScreen = SCREEN_CASTING; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; }
--- a/GUIWindow.h Tue Feb 12 10:17:35 2013 +0600 +++ b/GUIWindow.h Tue Feb 12 15:28:08 2013 +0600 @@ -136,8 +136,17 @@ { UIMSG_00 = 0x0, UIMSG_ChangeGameState = 0x5, + UIMSG_A = 0xA, + UIMSG_C = 0xC, + UIMSG_E = 0xE, + UIMSG_F = 0xF, UIMSG_11 = 0x11, + UIMSG_17 = 0x17, + UIMSG_19 = 0x19, + UIMSG_1B = 0x1B, + UIMSG_1C = 0x1C, UIMSG_PlayArcomage = 0x1D, + UIMSG_33 = 0x33, UIMSG_MainMenu_ShowPartyCreationWnd = 0x36, UIMSG_MainMenu_ShowLoadWindow = 0x37, UIMSG_ShowCredits = 0x38, @@ -150,38 +159,74 @@ UIMSG_PlayerCreationSelectClass = 0x41, UIMSG_PlayerCreationClickOK = 0x42, UIMSG_PlayerCreationClickReset = 0x43, + UIMSG_45 = 0x45, + UIMSG_46 = 0x46, + UIMSG_AutonotesBook = 0x47, UIMSG_PlayerCreationRemoveUpSkill = 0x4A, UIMSG_PlayerCreationRemoveDownSkill = 0x4B, - UIMSG_4B = 0x4B, + UIMSG_4E = 0x4E, + UIMSG_4F = 0x4F, + UIMSG_51 = 0x51, UIMSG_LoadGame = 0x52, UIMSG_SaveGame = 0x53, + UIMSG_54 = 0x54, + UIMSG_55 = 0x55, + UIMSG_56 = 0x56, + UIMSG_57 = 0x57, + UIMSG_58 = 0x58, + UIMSG_5A = 0x5A, + UIMSG_5B = 0x5B, UIMSG_ShowStatus_DateTime = 0x5C, UIMSG_ShowStatus_ManaHP = 0x5D, UIMSG_ShowStatus_Player = 0x5E, + UIMSG_Wait5Minutes = 0x5F, + UIMSG_Wait1Hour = 0x60, + UIMSG_61 = 0x61, UIMSG_ShowStatus_Food = 0x64, UIMSG_ShowStatus_Funds = 0x65, + UIMSG_68 = 0x68, + UIMSG_69 = 0x69, UIMSG_QuickReference = 0x6A, UIMSG_6B = 0x6B, + UIMSG_AlreadyResting = 0x6D, UIMSG_SelectCharacter = 0x6E, UIMSG_ChangeSoundVolume = 0x6F, UIMSG_ChangeMusicVolume = 0x70, UIMSG_Escape = 0x71, + UIMSG_72 = 0x72, + UIMSG_73 = 0x73, + UIMSG_74 = 0x74, + UIMSG_75 = 0x75, UIMSG_PlayerCreationSelectQuality = 0x76, + UIMSG_InventoryLeftClick = 0x78, UIMSG_SkillUp = 0x79, + UIMSG_7A = 0x7A, + UIMSG_7B = 0x7B, UIMSG_StartNewGame = 0x7C, UIMSG_Game_OpenLoadGameDialog = 0x7D, + UIMSG_Game_OpenSaveGameDialog = 0x7E, UIMSG_Game_OpenOptionsDialog = 0x7F, + UIMSG_80 = 0x80, UIMSG_SetGraphicsMode = 0x83, UIMSG_Quit = 0x84, + UIMSG_85 = 0x85, + UIMSG_86 = 0x86, + UIMSG_87 = 0x87, + UIMSG_88 = 0x88, + UIMSG_8C = 0x8C, + UIMSG_8D = 0x8D, + UIMSG_8E = 0x8E, + UIMSG_8F = 0x8F, UIMSG_PlayerCreationVoiceBack = 0x90, UIMSG_PlayerCreationVoiceForward = 0x91, + UIMSG_92 = 0x92, UIMSG_StartNPCDialogue = 0xA1, UIMSG_ArrowUp = 0xA2, UIMSG_DownArrow = 0xA3, UIMSG_LoadSlot = 0xA4, UIMSG_SelectLoadSlot = 0xA5, UIMSG_Cancel = 0xA6, - UIMSG_A7 = 0xA7, + UIMSG_ExitRest = 0xA7, UIMSG_A8 = 0xA8, UIMSG_A9 = 0xA9, UIMSG_AA = 0xAA, @@ -229,19 +274,63 @@ UIMSG_D4 = 0xD4, UIMSG_D5 = 0xD5, UIMSG_D6 = 0xD6, + UIMSG_DD = 0xDD, UIMSG_OpenHistoryBook = 0xE0, UIMSG_ToggleAlwaysRun = 0xE1, UIMSG_ToggleFlipOnExit = 0xE2, + UIMSG_16F = 0x16F, + UIMSG_170 = 0x170, + UIMSG_194 = 0x194, + UIMSG_195 = 0x195, UIMSG_OpenRestUI = 0x199, + UIMSG_19A = 0x19A, + UIMSG_19B = 0x19B, + UIMSG_19C = 0x19C, UIMSG_OpenKeyMappingOptions = 0x19F, + UIMSG_1A0 = 0x1A0, + UIMSG_1A1 = 0x1A1, UIMSG_ResetKeyMapping = 0x1A2, + UIMSG_1A3 = 0x1A3, UIMSG_OpenVideoOptions = 0x1A5, UIMSG_ToggleBloodsplats = 0x1A6, UIMSG_ToggleColoredLights = 0x1A7, UIMSG_ToggleTint = 0x1A8, + UIMSG_1A9 = 0x1A9, }; - +enum CURRENT_SCREEN +{ + SCREEN_GAME = 0x0, + SCREEN_MENU = 0x1, + SCREEN_OPTIONS = 0x2, + SCREEN_BOOKS = 0x3, + SCREEN_NPC_DIALOGUE = 0x4, + SCREEN_REST = 0x5, + SCREEN_CHARACTERS = 0x7, + SCREEN_SPELL_BOOK = 0x8, + SCREEN_CREATORS = 0x9, + SCREEN_CHEST = 0xA, + SCREEN_SAVEGAME = 0xB, + SCREEN_LOADGAME = 0xC, + SCREEN_HOUSE = 0xD, + SCREEN_E = 0xE, + SCREEN_F = 0xF, + SCREEN_VIDEO = 0x10, + SCREEN_CHANGE_LOCATION = 0x11, + SCREEN_INPUT_BLV = 0x12, + SCREEN_BRANCHLESS_NPC_DIALOG = 0x13, + SCREEN_PARTY_CREATION = 0x15, + SCREEN_PRESS_ESCAPE_MESSAGE = 0x16, + SCREEN_CASTING = 0x17, + SCREEN_19 = 0x19, + SCREEN_KEYBOARD_OPTIONS = 0x1A, + SCREEN_1B = 0x1B, + SCREEN_VIDEO_OPTIONS = 0x1C, + SCREEN_63 = 0x63, + SCREEN_64 = 0x64, + SCREEN_67 = 0x67, + SCREEN_QUICK_REFERENCE = 0x68, +};
--- a/Game.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/Game.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -248,7 +248,7 @@ dword_6BE364_game_settings_1 |= 0x80; dword_6BE340 = 2; // uGame_if_0_else_ui_id__11_save__else_load__8_drawSpellInfoPopup__22_final_window__26_keymapOptions__2_options__28_videoOptions = 0; - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; if (pAsyncMouse) pAsyncMouse->Resume(); if (pGame->pKeyboardInstance->bUsingAsynKeyboard && pAsyncKeyboard ) @@ -490,7 +490,7 @@ } break; } - pCurrentScreen = 16;//окно видео ролика + pCurrentScreen = SCREEN_VIDEO; sub_491E3A(); }
--- a/GameUIs.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/GameUIs.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -48,7 +48,7 @@ if ( uDialogueType_ ) { pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_loadsave != -1 ? &pIcons_LOD->pTextures[uTextureID_loadsave] : 0)); - if ( pCurrentScreen == 11 )//save or load + if ( pCurrentScreen == SCREEN_SAVEGAME ) { v1 = uTextureID_save_up; v2 = uTextureID_LS_saveU; @@ -124,7 +124,7 @@ //LABEL_24: pLODFile.FreeSubIndexAndIO(); - if ( pCurrentScreen == 11 ) // save/load screen + if ( pCurrentScreen == SCREEN_SAVEGAME ) { v6 = pIcons_LOD->LoadTexture("x_d", TEXTURE_16BIT_PALETTE); v10 = (TEXTURE_TYPE)2; @@ -192,7 +192,7 @@ 8u, 8u, (Texture *)(uTextureID_loadsave != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_loadsave] : 0)); - if ( pCurrentScreen == 11 ) + if ( pCurrentScreen == SCREEN_SAVEGAME ) { v0 = uTextureID_save_up; v1 = uTextureID_LS_saveU;
--- a/Player.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/Player.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -7688,7 +7688,7 @@ v21 = v67; goto LABEL_83; } - if ( pCurrentScreen == 23 ) + if ( pCurrentScreen == SCREEN_CASTING ) return; if ( !pParty->pPlayers[a2-1].CanAct() )//if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() ) goto LABEL_89; @@ -7704,7 +7704,7 @@ pMouse->RemoveHoldingItem(); pGUIWindow_CurrentMenu->Release(); pIcons_LOD->_4114F2(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = 1; _42777D_CastSpell_UseWand_ShootArrow(v24, a2 - 1, 0x85u, 1, 0); }
--- a/SaveLoad.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/SaveLoad.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -191,7 +191,7 @@ pGUIWindow_CurrentMenu->Release(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = true; @@ -325,7 +325,7 @@ strcpy(pDir.pFilename, "image.pcx"); pRenderer->_49F5A2((int)pScreenshot, 150, 112, DstBuf, 1000000, (int)&pDir.uDataSize); free(pScreenshot); - if (pCurrentScreen == 11) //SaveScreen + if (pCurrentScreen == SCREEN_SAVEGAME) { pRenderer->DrawTextureIndexed(8, 8, (Texture *)(uTextureID_loadsave != -1 ? &pIcons_LOD->pTextures[uTextureID_loadsave] : 0)); pRenderer->DrawTextureIndexed(0x12, 0x8D, (Texture *)(uTextureID_save_up != -1 ? &pIcons_LOD->pTextures[uTextureID_save_up] : 0)); @@ -636,7 +636,7 @@ } GUI_UpdateWindows(); pGUIWindow_CurrentMenu->Release(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; v3 = pSavegameThumbnails; viewparams->bRedrawGameUI = 1; do
--- a/VideoPlayer.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/VideoPlayer.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -360,7 +360,7 @@ pRenderer->ClearTarget(0); pRenderer->EndScene(); } - pCurrentScreen = 16; //окно видео ролика + pCurrentScreen = SCREEN_VIDEO; if ( pVideoPlayer->uMovieFormat == 2 ) { if ( pVideoPlayer->pBinkMovie ) @@ -419,11 +419,11 @@ } } if ( uGameState == GAME_FINISHED ) - pCurrentScreen = 0;//MainMenuScreen + pCurrentScreen = SCREEN_GAME; pVideoPlayer->bPlayingMovie = 0; ShowCursor(1); - if ( pCurrentScreen == 16 )//окно видео ролика - pCurrentScreen = 0; + if ( pCurrentScreen == SCREEN_VIDEO ) + pCurrentScreen = SCREEN_GAME; } }
--- a/mm7_1.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/mm7_1.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -883,7 +883,7 @@ if ( !(v16 & 0xF0) ) { if ( v16 & 1 - || pCurrentScreen != 13 ) + || pCurrentScreen != SCREEN_HOUSE ) { if ( v16 & 2 ) pRenderer->_4A6776(uCellX, uCellY, v7); @@ -1266,7 +1266,7 @@ { qword_507CC8 = pParty->uTimePlayed; byte_50697C = byte_50697C == 0; - if ( byte_50697C && pCurrentScreen != 5 ) + if ( byte_50697C && pCurrentScreen != SCREEN_REST ) { if ( bFlashQuestBook ) pRenderer->DrawTextureTransparent(493, 355, (Texture *)(uTextureID_ib_td1_A != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ib_td1_A] : 0)); @@ -2077,7 +2077,7 @@ v12 = pWindowList[v3].field_34; if ( pWindowList[v3].pCurrentPosActiveItem - pWindowList[v3].pStartingPosActiveItem - v12 >= 0 ) { - v8 = pCurrentScreen == 21; + v8 = pCurrentScreen == SCREEN_PARTY_CREATION; pWindowList[v3].pCurrentPosActiveItem -= v12; if ( v8 ) { @@ -2117,7 +2117,7 @@ v7 = pWindowList[v3].pCurrentPosActiveItem + pWindowList[v3].field_34; if ( v7 < pWindowList[v3].pNumPresenceButton + pWindowList[v3].pStartingPosActiveItem ) { - v8 = pCurrentScreen == 21; + v8 = pCurrentScreen == SCREEN_PARTY_CREATION; pWindowList[v3].pCurrentPosActiveItem = v7; if ( v8 ) { @@ -3661,7 +3661,7 @@ pTexture_RestUI_CurrentSkyFrame = 0; pIcons_LOD->_4114F2(); pIcons_LOD->_40F9C5(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = 1; if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) { @@ -3690,7 +3690,7 @@ if ( pCurrentScreen ) { pGUIWindow_CurrentMenu->Release(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = 1; } pEventTimer->Pause(); @@ -3729,7 +3729,7 @@ ++pIcons_LOD->uTexturePacksCount; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; - pCurrentScreen = 5; + pCurrentScreen = SCREEN_REST; _507CD4_RestUI_hourglass_anim_controller = 0; uTextureID_RestUI_restmain = pIcons_LOD->LoadTexture("restmain", TEXTURE_16BIT_PALETTE); uTextureID_RestUI_restb1 = pIcons_LOD->LoadTexture("restb1", TEXTURE_16BIT_PALETTE); @@ -4539,7 +4539,7 @@ (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0), 0); pChestWindow->CreateButton(7u, 8u, 460u, 343u, 1, 0, 0xCu, 0, 0, "", 0); - pCurrentScreen = 10; + pCurrentScreen = SCREEN_CHEST; pEventTimer->Pause(); return 1; } @@ -5202,7 +5202,7 @@ if ( uNumVisibleWindows <= 0 ) { LABEL_38: - if ( pCurrentScreen == 10 ) // ChestScreen + if ( pCurrentScreen == SCREEN_CHEST ) { sub_42038D(); //goto _return; @@ -5217,7 +5217,7 @@ uLastPointedObjectID = pMouse->uPointingObjectID; return; } - if ( pCurrentScreen == 13 ) // HouseScreen + if ( pCurrentScreen == SCREEN_HOUSE ) { if ( dword_F8B19C != 2 || (v16 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]], v16 == 0) @@ -5605,7 +5605,7 @@ pAudioPlayer->StopChannels(-1, -1); bRingsShownInCharScreen = 0; CharacterUI_LoadPaperdollTextures(); - pCurrentScreen = 23; + pCurrentScreen = SCREEN_CASTING; v2 = GUIWindow::Create(0, 0, 640, 480, (WindowType)(WINDOW_HouseInterior|WINDOW_Options), v1, 0); pCharacterScreen_ExitBtn = v2->CreateButton( 394u, @@ -5775,16 +5775,16 @@ pGUIWindow_CurrentMenu = GameUI_InitializeCharacterWindow(v5); return; } - if ( pCurrentScreen == 8 ) + if ( pCurrentScreen == SCREEN_SPELL_BOOK ) return; - if ( pCurrentScreen == 10 ) + if ( pCurrentScreen == SCREEN_CHEST ) { //LABEL_23: viewparams->bRedrawGameUI = 1; if ( uActiveCharacter == v1 ) { pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; - pCurrentScreen = 15; + pCurrentScreen = SCREEN_F; //goto LABEL_28; uActiveCharacter = v1; return; @@ -5796,15 +5796,15 @@ uActiveCharacter = v1; return; } - if ( pCurrentScreen != 13 ) - { - if ( pCurrentScreen == 14 ) + if ( pCurrentScreen != SCREEN_HOUSE ) + { + if ( pCurrentScreen == SCREEN_E ) { //LABEL_28: uActiveCharacter = v1; return; } - if ( pCurrentScreen != 15 ) + if ( pCurrentScreen != SCREEN_F ) { viewparams->bRedrawGameUI = 1; uActiveCharacter = v1; @@ -5817,7 +5817,7 @@ if ( uActiveCharacter == v1 ) { pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; - pCurrentScreen = 15; + pCurrentScreen = SCREEN_F; //goto LABEL_28; uActiveCharacter = v1; return; @@ -6205,12 +6205,12 @@ bool __cdecl sub_4226C2() { if ( pCurrentScreen - && pCurrentScreen != 4 - && pCurrentScreen != 17 ) - { - if ( pCurrentScreen == 18 ) + && pCurrentScreen != SCREEN_NPC_DIALOGUE + && pCurrentScreen != SCREEN_CHANGE_LOCATION ) + { + if ( pCurrentScreen == SCREEN_INPUT_BLV ) return pVideoPlayer->pSmackerMovie != 0; - if ( pCurrentScreen != 19 ) + if ( pCurrentScreen != SCREEN_BRANCHLESS_NPC_DIALOG ) return 1; } return 0;
--- a/mm7_2.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/mm7_2.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -4518,7 +4518,7 @@ v0 = pPlayers[uActiveCharacter]; v77 = pPlayers[uActiveCharacter]; - if ( pCurrentScreen == 14 ) + if ( pCurrentScreen == SCREEN_E ) goto LABEL_73; if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) { @@ -12038,7 +12038,7 @@ GUIButton *pButton2; // [sp+0h] [bp-3Ch]@27 GUIWindow *pWindow; // [sp+4h] [bp-38h]@11 - pCurrentScreen = 0; // окно Главное меню + pCurrentScreen = SCREEN_GAME; if (pAsyncMouse) pAsyncMouse->Resume(); if ( LOBYTE(pGame->pKeyboardInstance->bUsingAsynKeyboard) && pAsyncKeyboard ) @@ -12074,12 +12074,12 @@ pWindow = pWindow_MainMenu; if ( GetCurrentMenuID() == MENU_SAVELOAD)//если меню загрузки { - if ( pCurrentScreen != 12 )//если не окно загрузки игры + if ( pCurrentScreen != SCREEN_LOADGAME ) { pTexture_PCX.Release(); pTexture_PCX.Load("lsave640.pcx", 0); pGUIWindow2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); - pCurrentScreen = 12; //окно загрузки игры + pCurrentScreen = SCREEN_LOADGAME; GameUI_DrawLoadMenu(0);//процесс прорисовки окна Загрузка } pWindow = pGUIWindow_CurrentMenu; @@ -12114,7 +12114,7 @@ pIcons_LOD->_4114F2(); pGUIWindow_CurrentMenu->Release(); pGUIWindow_CurrentMenu = 0; - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = 1; } } @@ -12497,7 +12497,7 @@ goto LABEL_104; } if ( pCurrentScreen - && pCurrentScreen != 21 ) + && pCurrentScreen != SCREEN_PRESS_ESCAPE_MESSAGE ) return 0; } if ( !viewparams->field_4C ) @@ -15820,7 +15820,7 @@ } if ( v5 & 0x100000 || (v6 = pIndoor->pFaceExtras[v4->uFaceExtraID].uEventID) == 0 ) return 1; - if ( pCurrentScreen != 19 ) + if ( pCurrentScreen != SCREEN_BRANCHLESS_NPC_DIALOG ) goto LABEL_13; break; }
--- a/mm7_3.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/mm7_3.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -13297,13 +13297,13 @@ //----- (0044100D) -------------------------------------------------------- bool __cdecl sub_44100D() { - return pCurrentScreen == 4 - || pCurrentScreen == 7 - || pCurrentScreen > 12 - && (pCurrentScreen <= 14 - || pCurrentScreen > 16 - && (pCurrentScreen <= 18 - || pCurrentScreen == 23)); + return pCurrentScreen == SCREEN_NPC_DIALOGUE + || pCurrentScreen == SCREEN_CHARACTERS + || pCurrentScreen > SCREEN_LOADGAME + && (pCurrentScreen <= SCREEN_E + || pCurrentScreen > SCREEN_VIDEO + && (pCurrentScreen <= SCREEN_INPUT_BLV + || pCurrentScreen == SCREEN_CASTING)); } // 4E28F8: using guessed type int pCurrentScreen; @@ -13316,16 +13316,16 @@ IconFrame *v3; // eax@19 if ( !pCurrentScreen - || pCurrentScreen == 1 - || pCurrentScreen == 2 - || pCurrentScreen == 5 - || pCurrentScreen == 8 - || pCurrentScreen == 10 - || pCurrentScreen == 11 - || pCurrentScreen == 12 - || pCurrentScreen == 15 - || pCurrentScreen == 3 - || pCurrentScreen == 19 ) + || pCurrentScreen == SCREEN_MENU + || pCurrentScreen == SCREEN_OPTIONS + || pCurrentScreen == SCREEN_REST + || pCurrentScreen == SCREEN_SPELL_BOOK + || pCurrentScreen == SCREEN_CHEST + || pCurrentScreen == SCREEN_SAVEGAME + || pCurrentScreen == SCREEN_LOADGAME + || pCurrentScreen == SCREEN_F + || pCurrentScreen == SCREEN_BOOKS + || pCurrentScreen == SCREEN_BRANCHLESS_NPC_DIALOG ) { if ( SHIDWORD(pParty->pPartyBuffs[16].uExpireTime) >= 0 && (SHIDWORD(pParty->pPartyBuffs[16].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[16].uExpireTime)) ) @@ -13416,7 +13416,7 @@ } while ( v1 < 14 ); if ( !pCurrentScreen - || pCurrentScreen == 4 ) + || pCurrentScreen == SCREEN_NPC_DIALOGUE ) { if ( (signed __int64)pParty->pPartyBuffs[7].uExpireTime > 0 ) { @@ -17938,7 +17938,7 @@ pGameLoadingUI_ProgressBar->uType = (GUIProgressBar::Type)((_5C3420_pDecoration == 0) + 1); sub_44987B(v99, 0); v133 = 1; - if ( pCurrentScreen == 13 ) + if ( pCurrentScreen == SCREEN_HOUSE ) { if ( uGameState == 2 ) { @@ -17951,7 +17951,7 @@ ptr_507BC0 = 0; if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = 1; array_5913D8[6] = 0; pDialogueWindow->Release(); @@ -19441,7 +19441,7 @@ dword_5B65C0 = 0; pGameLoadingUI_ProgressBar->uType = GUIProgressBar::TYPE_Fullscreen; sub_44987B("nwc.blv", 0); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; result = 1; } return result;
--- a/mm7_4.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/mm7_4.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -4178,7 +4178,7 @@ v51 = v65; if ( v65 ) goto LABEL_135; - if ( pCurrentScreen != 5 ) + if ( pCurrentScreen != SCREEN_REST ) { v52 = (signed int)&pPlayers[1]; while ( 1 ) @@ -4194,13 +4194,13 @@ *(int *)(v53 + 20) = 0; v51 = 1; LABEL_135: - if ( pCurrentScreen != 5 + if ( pCurrentScreen != SCREEN_REST && (!v51 || dword_5C35C0) ) uGameState = 8; } if ( uActiveCharacter ) { - if ( pCurrentScreen != 5 ) + if ( pCurrentScreen != SCREEN_REST ) { v54 = pPlayers[uActiveCharacter]; if ( v54->pConditions[2] @@ -5705,7 +5705,7 @@ ++pIcons_LOD->uTexturePacksCount; if ( !pIcons_LOD->uNumPrevLoadedFiles ) pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; - pCurrentScreen = 21;//окно Создания группы + pCurrentScreen = SCREEN_PARTY_CREATION; uPlayerCreationUI_ArrowAnim = 0; uPlayerCreationUI_SkySliderPos = 0; uPlayerCreationUI_SelectedCharacter = 0; @@ -6207,7 +6207,7 @@ free(pString); pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, (int)ptr); pWindow_MainMenu->CreateButton(0, 0, 0, 0, 1, 0, 0x71u, 0, 0x1Bu, "", 0); - pCurrentScreen = 9; // окно Credits + pCurrentScreen = SCREEN_CREATORS; SetCurrentMenuID(MENU_Credits); do { @@ -6236,7 +6236,7 @@ if ( a5 >= (signed __int16)pTexture2.uHeight ) SetCurrentMenuID(MENU_MAIN); pRenderer->Present(); - pCurrentScreen = 0;//Ritor1: temporarily, must be corrected GUI_MainMenuMessageProc() + pCurrentScreen = SCREEN_GAME;//Ritor1: temporarily, must be corrected GUI_MainMenuMessageProc() GUI_MainMenuMessageProc(); } }
--- a/mm7_5.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/mm7_5.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -332,8 +332,8 @@ //goto _actor_init_dlg; pActor->InitializeDialogue(v0); continue; - case UIMSG_Quit|0x2: - case 0x87: + case UIMSG_86: + case UIMSG_87: if ( bNoNPCHiring != 1 && !pCurrentScreen ) { if ( pMessageQueue_50CBD0->uNumMessages ) @@ -382,19 +382,19 @@ } } continue; - case 0x51: + case UIMSG_51: sub_4BDB56_buy_skill____(); continue; case UIMSG_AF: sub_4B2001(uMessageParam); continue; - case 0x195: + case UIMSG_195: sub_4BCACC_bounties(uMessageParam); continue; - case 0x88: + case UIMSG_88: sub_4BC49B(uMessageParam); continue; - case 0x19A: + case UIMSG_19A: _4B4224_UpdateNPCTopics(uMessageParam); continue; case UIMSG_StartNewGame: @@ -407,7 +407,7 @@ pGUIWindow_CurrentMenu->Release(); uGameState = 4; LABEL_188: - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; } else @@ -425,7 +425,7 @@ if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); - pCurrentScreen = 12; + pCurrentScreen = SCREEN_LOADGAME; GameUI_DrawLoadMenu(v0); continue; case UIMSG_Quit: @@ -436,7 +436,7 @@ if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; if ( !uMessageParam ) pAudioPlayer->PlaySound((SoundID)(SOUND_EnteringAHouse|0x1), 0, 0, -1, 0, 0, 0, 0); @@ -451,11 +451,11 @@ //goto _release_tex_and_continue; stru_506E40.Release(); continue; - case 0x80: + case UIMSG_80: pIcons_LOD->_40F9C5(); pIcons_LOD->_4114F2(); pGUIWindow_CurrentMenu->Release(); - pCurrentScreen = 2; + pCurrentScreen = SCREEN_OPTIONS; v162 = 0; v148 = 0; pWindowType = (WindowType)8; @@ -517,7 +517,7 @@ case UIMSG_SelectLoadSlot: if ( pGUIWindow_CurrentMenu->field_40 == v0 ) pKeyActionMap->_459ED1(0); - if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != pSaveListPosition + uMessageParam ) + if ( pCurrentScreen != SCREEN_SAVEGAME || uLoadGameUI_SelectedSlot != pSaveListPosition + uMessageParam ) { v10 = pSaveListPosition + uMessageParam; if ( dword_6BE138 == pSaveListPosition + uMessageParam ) @@ -572,9 +572,9 @@ //goto _release_tex_and_continue; stru_506E40.Release(); continue; - case UIMSG_StartNewGame|0x2: + case UIMSG_Game_OpenSaveGameDialog: pGUIWindow_CurrentMenu->Release(); - pCurrentScreen = 11; + pCurrentScreen = SCREEN_SAVEGAME; GameUI_DrawSaveMenu(); continue; case UIMSG_Game_OpenOptionsDialog: @@ -582,7 +582,7 @@ pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = v0; - pCurrentScreen = 2; + pCurrentScreen = SCREEN_OPTIONS; uTextureID_507C60 = pIcons_LOD->LoadTexture("ControlBG", TEXTURE_16BIT_PALETTE); uTextureID_507C6C = pIcons_LOD->LoadTexture("con_16x", TEXTURE_16BIT_PALETTE); uTextureID_507C68 = pIcons_LOD->LoadTexture("con_32x", TEXTURE_16BIT_PALETTE); @@ -670,7 +670,7 @@ pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = 1; - pCurrentScreen = 26; + pCurrentScreen = SCREEN_KEYBOARD_OPTIONS; uTextureID_507BF4 = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE); uTextureID_507BF8 = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE); uTextureID_507BFC = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); @@ -707,7 +707,7 @@ continue; //default: //continue; - case UIMSG_ResetKeyMapping|0x1: + case UIMSG_1A3: if ( dword_506E68 != -1 ) goto LABEL_623; v14 = uMessageParam; @@ -756,7 +756,7 @@ case 0x1A0: dword_506F08 = v0; continue; - case UIMSG_StartNPCDialogue|0x100: + case UIMSG_1A1: dword_506F08 = 2; continue; case UIMSG_OpenVideoOptions: @@ -764,7 +764,7 @@ pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; pGUIWindow_CurrentMenu->Release(); viewparams->field_48 = v0; - pCurrentScreen = 28; + pCurrentScreen = SCREEN_VIDEO_OPTIONS; uTextureID_507C10 = pIcons_LOD->LoadTexture("optvid", TEXTURE_16BIT_PALETTE); uTextureID_507C14 = pIcons_LOD->LoadTexture("opvdH-bs", TEXTURE_16BIT_PALETTE); uTextureID_507C18 = pIcons_LOD->LoadTexture("opvdH-cl", TEXTURE_16BIT_PALETTE); @@ -817,11 +817,11 @@ } } continue; - case UIMSG_ToggleTint|0x1: + case UIMSG_1A9: if ( uMessageParam == 4 ) { - --uGammaPos; - if ( (uGammaPos & 0x80000000u) != 0 ) + //--uGammaPos; + if ( (uGammaPos -- -1) < 0 ) { uGammaPos = 0; //goto LABEL_128; @@ -1117,7 +1117,7 @@ } ModalWindow(pNPCTopics[453].pText, 0); continue; - case UIMSG_SkillUp|0x2: + case UIMSG_7B: pGUIWindow_CurrentMenu->Release(); pEventTimer->Resume(); goto LABEL_188; @@ -1192,9 +1192,9 @@ back_to_game(); if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; - if ( pCurrentScreen > 15 ) - { - if ( pCurrentScreen >= 17 && (pCurrentScreen <= 18 || pCurrentScreen == 104) ) + if ( pCurrentScreen > SCREEN_F ) + { + if ( pCurrentScreen >= SCREEN_CHANGE_LOCATION && (pCurrentScreen <= SCREEN_INPUT_BLV || pCurrentScreen == SCREEN_QUICK_REFERENCE) ) { //LABEL_229: if ( dword_50CDC8 ) @@ -1207,7 +1207,7 @@ } else { - if ( pCurrentScreen >= 14 || pCurrentScreen == 4 || pCurrentScreen == 10 ) + if ( pCurrentScreen >= SCREEN_E || pCurrentScreen == SCREEN_NPC_DIALOGUE || pCurrentScreen == SCREEN_CHEST ) { //goto LABEL_229; if ( dword_50CDC8 ) @@ -1217,7 +1217,7 @@ uMessageParam = v0; goto LABEL_232; } - if ( pCurrentScreen == 13 && !dword_50CDC8 && !dword_5C35C8 ) + if ( pCurrentScreen == SCREEN_HOUSE && !dword_50CDC8 && !dword_5C35C8 ) { CloseWindowBackground(); dword_5C35C8 = 0; @@ -1234,18 +1234,18 @@ viewparams->field_48 = v0; if ( pCurrentScreen ) { - if ( pCurrentScreen > 103 ) + if ( pCurrentScreen > SCREEN_67 ) { - if ( pCurrentScreen == 104 ) + if ( pCurrentScreen == SCREEN_QUICK_REFERENCE ) goto LABEL_321; } else { - if ( pCurrentScreen < 100 ) + if ( pCurrentScreen < SCREEN_64 ) { switch ( pCurrentScreen ) { - case 23: + case SCREEN_CASTING: pIcons_LOD->_4114F2(); if ( some_active_character ) { @@ -1267,7 +1267,7 @@ //goto LABEL_322; if ( pGUIWindow_Settings ) { - if ( pCurrentScreen == 7 ) + if ( pCurrentScreen == SCREEN_CHARACTERS ) { pMouse->SetCursorBitmap("MICON2"); } @@ -1288,11 +1288,11 @@ ptr_507BC0 = 0; pGUIWindow_CurrentMenu = 0; pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; pIcons_LOD->_4355F7(); continue; - case 3: + case SCREEN_BOOKS: pBooksWindow->Release(); //crt_deconstruct_ptr_6A0118(); pBooksWindow = 0; @@ -1300,7 +1300,7 @@ //goto LABEL_322; if ( pGUIWindow_Settings ) { - if ( pCurrentScreen == 7 ) + if ( pCurrentScreen == SCREEN_CHARACTERS ) { pMouse->SetCursorBitmap("MICON2"); } @@ -1321,39 +1321,39 @@ ptr_507BC0 = 0; pGUIWindow_CurrentMenu = 0; pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; pIcons_LOD->_4355F7(); continue; - case 11: - case 12: + case SCREEN_SAVEGAME: + case SCREEN_LOADGAME: pIcons_LOD->_4114F2(); //crt_deconstruct_ptr_6A0118(); //goto LABEL_291; stru_506E40.Release(); break; - case 15: - pCurrentScreen = 10; + case SCREEN_F: + pCurrentScreen = SCREEN_CHEST; continue; - case 10: + case SCREEN_CHEST: pWindow2 = pChestWindow; //goto LABEL_249; pWindow2->Release(); pIcons_LOD->_4114F2(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; pEventTimer->Resume(); continue; - case 25: + case SCREEN_19: pWindow2 = ptr_507BC8; //LABEL_249: pWindow2->Release(); pIcons_LOD->_4114F2(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; pEventTimer->Resume(); continue; - case 2: + case SCREEN_OPTIONS: thisa = (signed int)&uTextureID_507C60; do { @@ -1408,7 +1408,7 @@ //LABEL_291: stru_506E40.Release(); break; - case 1: + case SCREEN_MENU: pIcons_LOD->_40F9C5(); pIcons_LOD->_4114F2(); pIcons_LOD->_40F9C5(); @@ -1416,7 +1416,7 @@ //goto LABEL_291; stru_506E40.Release(); break; - case 28: + case SCREEN_VIDEO_OPTIONS: if ( pRenderer->pRenderD3D ) { WriteWindowsRegistryInt("Colored Lights", pRenderer->bUseColoredLights); @@ -1435,7 +1435,7 @@ WriteWindowsRegistryInt(v31, v30); stru_506E40.Release(); break; - case 26: + case SCREEN_KEYBOARD_OPTIONS: v197 = 1; v32 = 0; while ( *((char *)word_506E6C + v32) != 1 ) @@ -1486,7 +1486,7 @@ } } goto LABEL_623; - case 5: + case SCREEN_REST: if ( dword_506F14 ) { Rest(_506F18_num_hours_to_sleep); @@ -1507,7 +1507,7 @@ //goto LABEL_322; if ( pGUIWindow_Settings ) { - if ( pCurrentScreen == 7 ) + if ( pCurrentScreen == SCREEN_CHARACTERS ) { pMouse->SetCursorBitmap("MICON2"); } @@ -1528,16 +1528,16 @@ ptr_507BC0 = 0; pGUIWindow_CurrentMenu = 0; pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; pIcons_LOD->_4355F7(); continue; - case 14: + case SCREEN_E: pGUIWindow_CurrentMenu->Release(); - pCurrentScreen = 13; + pCurrentScreen = SCREEN_HOUSE; pIcons_LOD->_4114F2(); continue; - case 13: + case SCREEN_HOUSE: if ( uDialogueType ) uDialogueType = 0; if ( uGameState == 2 ) @@ -1557,7 +1557,7 @@ //goto LABEL_322; if ( pGUIWindow_Settings ) { - if ( pCurrentScreen == 7 ) + if ( pCurrentScreen == SCREEN_CHARACTERS ) { pMouse->SetCursorBitmap("MICON2"); } @@ -1578,11 +1578,11 @@ ptr_507BC0 = 0; pGUIWindow_CurrentMenu = 0; pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; pIcons_LOD->_4355F7(); continue; - case 18: + case SCREEN_INPUT_BLV: if ( uCurrentHouse_Animation == 153 ) HousePlaySomeSound(0x99u, 3); pVideoPlayer->Unload(); @@ -1596,7 +1596,7 @@ dword_5B65CC = 0; } goto LABEL_317; - case 4: + case SCREEN_NPC_DIALOGUE: //LABEL_306: if ( dword_5B65CC ) { @@ -1607,11 +1607,11 @@ dword_5B65CC = 0; } goto LABEL_317; - case 19: + case SCREEN_BRANCHLESS_NPC_DIALOG: memset(GameUI_StatusBar_TimedString, 0, 0xC8u); sub_4452BB(); goto LABEL_317; - case 17: + case SCREEN_CHANGE_LOCATION: if ( pParty->vPosition.x < -22528 ) pParty->vPosition.x = -22528; if ( pParty->vPosition.x > 22528 ) @@ -1621,16 +1621,16 @@ if ( pParty->vPosition.y > 22528 ) pParty->vPosition.y = 22528; goto LABEL_317; - case 16: + case SCREEN_VIDEO: pVideoPlayer->Unload(); continue; - case 7: + case SCREEN_CHARACTERS: goto LABEL_319; default: //goto LABEL_322; if ( pGUIWindow_Settings ) { - if ( pCurrentScreen == 7 ) + if ( pCurrentScreen == SCREEN_CHARACTERS ) { pMouse->SetCursorBitmap("MICON2"); } @@ -1651,7 +1651,7 @@ ptr_507BC0 = 0; pGUIWindow_CurrentMenu = 0; pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; pIcons_LOD->_4355F7(); continue; @@ -1659,7 +1659,7 @@ //goto LABEL_322; if ( pGUIWindow_Settings ) { - if ( pCurrentScreen == 7 ) + if ( pCurrentScreen == SCREEN_CHARACTERS ) { pMouse->SetCursorBitmap("MICON2"); } @@ -1680,7 +1680,7 @@ ptr_507BC0 = 0; pGUIWindow_CurrentMenu = 0; pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; pIcons_LOD->_4355F7(); continue; @@ -1694,7 +1694,7 @@ //LABEL_322: if ( pGUIWindow_Settings ) { - if ( pCurrentScreen == 7 ) + if ( pCurrentScreen == SCREEN_CHARACTERS ) { pMouse->SetCursorBitmap("MICON2"); } @@ -1715,7 +1715,7 @@ ptr_507BC0 = 0; pGUIWindow_CurrentMenu = 0; pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; pIcons_LOD->_4355F7(); continue; @@ -1801,7 +1801,7 @@ } DrawHiredNPCs(); continue; - case UIMSG_OpenRestUI|0x2: + case UIMSG_19B: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; dword_50CDC8 = v0; @@ -1862,7 +1862,7 @@ if ( !_strcmpi(byte_6BE3B0, "d05.blv") ) pParty->uTimePlayed += 1474560i64; continue; - case 0x19C: + case UIMSG_19C: CloseWindowBackground(); pVideoPlayer->Unload(); sub_44603D(); @@ -1872,7 +1872,7 @@ v39 = GetAsyncKeyState(VK_SHIFT); v40 = CycleCharacter(v39); goto LABEL_421; - case UIMSG_LoadGame|0x8: + case UIMSG_5A: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; dword_50CDC8 = v0; @@ -1895,7 +1895,7 @@ pParty->vPosition.y = 22528; LABEL_317: sub_44603D(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; } else { @@ -1968,11 +1968,11 @@ sub_461103(); pEventTimer->Resume(); viewparams->bRedrawGameUI = 1; - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; pGameLoadingUI_ProgressBar->Release(); } goto LABEL_422; - case UIMSG_SaveGame|0x8: + case UIMSG_5B: goto LABEL_387; case UIMSG_BE: if ( pRenderer->pRenderD3D ) @@ -2083,9 +2083,9 @@ unk_50C9A0 = 0; back_to_game(); continue; - case UIMSG_ChangeGameState|0x40: - case 0x8D: - case 0x8F: + case UIMSG_45: + case UIMSG_8D: + case UIMSG_8F: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; if ( unk_50C9A0 ) @@ -2506,7 +2506,7 @@ uGameState = 0; strcpy((char *)pKeyActionMap->pPressedKeysBuffer, "2"); goto LABEL_524; - case UIMSG_D5|0x8: + case UIMSG_DD: LABEL_524: sprintf(pTmpBuf, "%s", pKeyActionMap->pPressedKeysBuffer); memcpy(&v216, texture_frame_table_txt_parser((const char *)pKeyActionMap->pPressedKeysBuffer, &v218), sizeof(v216)); @@ -2613,7 +2613,7 @@ v1 = ""; v0 = 1; continue; - case 0x19: + case UIMSG_19: if ( bUnderwater == 1 ) goto LABEL_682; if ( !uActiveCharacter || (pPlayer2 = pPlayers[uActiveCharacter], pPlayer2->uTimeToRecovery) ) @@ -2631,8 +2631,8 @@ //goto LABEL_679; _42777D_CastSpell_UseWand_ShootArrow(v79, v80, v147, v159, v175); continue; - case 0x46: - case UIMSG_Quit|0x8: + case UIMSG_46: + case UIMSG_8C: if ( pRenderer->pRenderD3D ) { v81 = pGame->pVisInstance->get_picked_object_zbuf_val(); @@ -2677,7 +2677,7 @@ unk_50C9A0 = 0; back_to_game(); continue; - case 0x1C: + case UIMSG_1C: if ( !uActiveCharacter || pCurrentScreen ) //goto LABEL_90; { @@ -2686,10 +2686,10 @@ continue; } ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)104, uMessageParam, 0); - pCurrentScreen = 25; + pCurrentScreen = SCREEN_19; pEventTimer->Pause(); continue; - case 0x1B: + case UIMSG_1B: if ( !uActiveCharacter ) //goto LABEL_90; { @@ -2747,7 +2747,7 @@ //LABEL_577: _42ECB5_PlayerAttacksActor(); continue; - case UIMSG_A7: + case UIMSG_ExitRest: v163 = (int)pGlobalTXT_LocalizationStrings[81];// "Exit Rest" pButton = pButton_RestUI_Exit; pButton2 = pButton_RestUI_Exit; @@ -2760,7 +2760,7 @@ v133 = 0; GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); continue; - case UIMSG_ShowStatus_Player|0x1: + case UIMSG_Wait5Minutes: if ( dword_506F14 == 2 ) //goto LABEL_621; { @@ -2772,7 +2772,7 @@ dword_506F14 = v0; _506F18_num_hours_to_sleep = 5; continue; - case 0x60: + case UIMSG_Wait1Hour: if ( dword_506F14 == 2 ) //goto LABEL_621; { @@ -2800,7 +2800,7 @@ pParty->pPlayers[1].pConditions[2] = pParty->uTimePlayed; pParty->pPlayers[0].pConditions[2] = pParty->uTimePlayed; continue; - case 0x68: + case UIMSG_68: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; if ( pCurrentScreen ) @@ -2865,7 +2865,7 @@ v176 = 0; v160 = 13; goto LABEL_619; - case 0x61: + case UIMSG_61: if ( dword_506F14 ) //goto LABEL_621; { @@ -2945,7 +2945,7 @@ pParty->pPlayers[0].pConditions[2] = pParty->uTimePlayed; } continue; - case UIMSG_ShowStatus_Funds|0x8: + case UIMSG_AlreadyResting: if ( dword_506F14 == 2 ) { //LABEL_621: @@ -2958,7 +2958,7 @@ dword_506F14 = v0; _506F18_num_hours_to_sleep = 60 * v97 - pParty->uCurrentMinute; continue; - case 0x4E: + case UIMSG_4E: if ( dword_50654C && byte_506550 ) { v173 = pSpellStats->pInfos[dword_50654C + 11 * pPlayers[uActiveCharacter]->pNumSpellBookPage].pName; @@ -2977,7 +2977,7 @@ //_set_status_string_pTmpBuf_and_continue: sub_41C0B8_set_status_string(pTmpBuf); continue; - case 0x4F: + case UIMSG_4F: if ( !uActiveCharacter || (uNumSeconds = (unsigned int)pPlayers[uActiveCharacter], !*(char *)(uNumSeconds + 11 * *(char *)(uNumSeconds + 6734) + uMessageParam + 402)) ) continue; @@ -2999,7 +2999,7 @@ //goto LABEL_91; v0 = 1; continue; - case 0x58: + case UIMSG_58: GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, (enum WindowType)90, (int)pBtn_InstallRemoveSpell, 0); if ( !uActiveCharacter ) continue; @@ -3025,7 +3025,7 @@ pPlayer10->PlaySound(12, 0); byte_506550 = 0; continue; - case 0x33: + case UIMSG_33: if ( !uActiveCharacter ) continue; pPlayer3 = pPlayers[uActiveCharacter]; @@ -3083,7 +3083,7 @@ v130 = 0; v127 = rand() % 2 + 204; goto _play_sound_and_continue; - case UIMSG_SaveGame|0x4: + case UIMSG_57: if ( pTurnEngine->field_4 == 3 || !uActiveCharacter || uMessageParam == pPlayers[uActiveCharacter]->pNumSpellBookPage ) continue; sub_41140B(); @@ -3098,7 +3098,7 @@ v130 = 0; v127 = rand() % 2 + 204; goto _play_sound_and_continue; - case UIMSG_LoadGame|0x4: + case UIMSG_56: if ( pTurnEngine->field_4 != 3 ) { if ( uActiveCharacter ) @@ -3111,7 +3111,7 @@ pGUIWindow_CurrentMenu->Release(); pEventTimer->Resume(); viewparams->bRedrawGameUI = v0; - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; pIcons_LOD->_4114F2(); v103 = dword_50654C + 11 * *(char *)(uNumSeconds + 6734); if ( dword_50C9E8 < 40 ) @@ -3131,7 +3131,7 @@ } } continue; - case 0x8E: + case UIMSG_8E: if ( pTurnEngine->field_4 == 3 ) continue; v175 = 0; @@ -3142,7 +3142,7 @@ v79 = uMessageParam; _42777D_CastSpell_UseWand_ShootArrow(v79, v80, v147, v159, v175); continue; - case 0x92: + case UIMSG_92: if ( pTurnEngine->field_4 != 3 ) { v175 = 0; @@ -3155,7 +3155,7 @@ _42777D_CastSpell_UseWand_ShootArrow(v79, v80, v147, v159, v175); } continue; - case 0x69: + case UIMSG_69: if ( pTurnEngine->field_4 == 3 ) continue; if ( bUnderwater == 1 ) @@ -3186,22 +3186,22 @@ //goto LABEL_693; { GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)pBtn_CastSpell, 0); - pCurrentScreen = 8; + pCurrentScreen = SCREEN_SPELL_BOOK; pEventTimer->Pause(); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0); pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); viewparams->field_48 = v0; continue; } - if ( pCurrentScreen != 5 - && pCurrentScreen != 7 - && (pCurrentScreen <= 99 - || pCurrentScreen > 103) ) + if ( pCurrentScreen != SCREEN_REST + && pCurrentScreen != SCREEN_CHARACTERS + && (pCurrentScreen <= SCREEN_63 + || pCurrentScreen > SCREEN_67) ) { pGUIWindow_CurrentMenu->Release(); //LABEL_693: GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)pBtn_CastSpell, 0); - pCurrentScreen = 8; + pCurrentScreen = SCREEN_SPELL_BOOK; pEventTimer->Pause(); pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0); pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); @@ -3223,19 +3223,19 @@ viewparams->bRedrawGameUI = v0; pEventTimer->Pause(); pAudioPlayer->StopChannels(-1, -1); - pCurrentScreen = 104; + pCurrentScreen = SCREEN_QUICK_REFERENCE; pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0); papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, v0, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79],// "Exit" (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); //, v179); continue; - case 0x6B: + case UIMSG_6B: if ( pCurrentScreen ) { pGUIWindow_CurrentMenu->Release(); pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v0; } stru_506E40.Release(); @@ -3268,7 +3268,7 @@ //LABEL_709: dword_506544 = v0; continue; - case 0x55: + case UIMSG_55: bRingsShownInCharScreen ^= v0; GUIButton::_41D0D8(pCharacterScreen_DetalizBtn); GUIButton::_41D0D8(pCharacterScreen_DollBtn); @@ -3291,10 +3291,10 @@ 0); pCharacterScreen_DollBtn = pGUIWindow_CurrentMenu->CreateButton(0x1DCu, 0, 0xA4u, 0x159u, v0, 0, 0x85u, 0, 0, v1, 0); goto LABEL_422; - case UIMSG_Quit|0x1: + case UIMSG_85: OnPaperdollLeftClick(); continue; - case UIMSG_Escape|0x2: + case UIMSG_73: pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 100; sub_4196A0(); sub_419379(); @@ -3310,7 +3310,7 @@ v133 = 0; GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); continue; - case UIMSG_ChangeMusicVolume|0x2: + case UIMSG_72: pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 101; sub_4196A0(); sub_419379(); @@ -3358,7 +3358,7 @@ //_draw_status_string_and_continue: ShowStatusBarString(v87, 2u); continue; - case UIMSG_ChangeMusicVolume|0x4: + case UIMSG_74: pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] = 103; sub_419379(); sub_4196A0(); @@ -3388,7 +3388,7 @@ v133 = 0; GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); continue; - case UIMSG_Escape|0x4: + case UIMSG_75: sub_419379(); sub_4196A0(); sub_419220(); @@ -3397,7 +3397,7 @@ (int)pCharacterScreen_AwardsBtn, 0); sub_419100(); continue; - case 71://0x47: + case UIMSG_AutonotesBook: switch ( uMessageParam ) { default: @@ -3517,18 +3517,18 @@ sprintf(pTmpBuf, "%d / %d %s %d / %d %s", v110->sHealth, v114, v113, v112, v111, v109); sub_41C0B8_set_status_string(pTmpBuf); continue; - case 0xC: - if ( pCurrentScreen == 15 ) + case UIMSG_C: + if ( pCurrentScreen == SCREEN_F ) { sub_421EA6_OnInventoryLeftClick(); continue; } sub_420E01(); continue; - case UIMSG_ChangeMusicVolume|0x8: + case UIMSG_InventoryLeftClick: sub_421EA6_OnInventoryLeftClick(); continue; - case 0xA: + case UIMSG_A: if ( !pRenderer->pRenderD3D ) //goto LABEL_772; { @@ -3578,13 +3578,13 @@ continue; } continue; - case 0xE: + case UIMSG_E: //LABEL_772: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; OnGameViewportClick(); continue; - case 0xF: + case UIMSG_F: if ( pRenderer->pRenderD3D ) { LOWORD(v116) = pGame->pVisInstance->get_picked_object_zbuf_val(); @@ -3605,7 +3605,7 @@ v133 = 0; GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); continue; - case 0x54: + case UIMSG_54: v163 = 0; pButton2 = (GUIButton *)uMessageParam; pWindowType1 = (WindowType)22; @@ -3618,12 +3618,12 @@ //LABEL_733: GUIWindow::Create(v9, v8, v133, v137, pWindowType1, (int)pButton2, v163); continue; - case 0x194: + case UIMSG_194: if ( pMessageQueue_50CBD0->uNumMessages ) pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; OnPressSpace(); continue; - case UIMSG_ChangeSoundVolume|0x100: + case UIMSG_16F: if ( pCurrentScreen ) continue; pParty->uFlags |= 2u; @@ -3646,7 +3646,7 @@ goto LABEL_789; viewparams->field_28 = 11; goto LABEL_788; - case UIMSG_ChangeMusicVolume|0x100: + case UIMSG_170: if ( pCurrentScreen ) continue; pParty->uFlags |= 2u; @@ -3830,7 +3830,7 @@ //main menu save/load wnd clicking on savegame lines if (pGUIWindow_CurrentMenu->field_40 == 1) pKeyActionMap->_459ED1(0); - if ( pCurrentScreen != 11 || uLoadGameUI_SelectedSlot != uNum + pSaveListPosition ) + if ( pCurrentScreen != SCREEN_SAVEGAME || uLoadGameUI_SelectedSlot != uNum + pSaveListPosition ) { //load clicked line v26 = uNum + pSaveListPosition; @@ -3960,7 +3960,7 @@ { pGUIWindow_CurrentMenu->Release(); pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = 1; } GUIWindow::Create(602, 450, 0, 0, (enum WindowType)92, (int)pBtn_GameSettings, 0); @@ -4023,7 +4023,7 @@ v17 = pCurrentScreen; if ( v16 && !pCurrentScreen ) goto LABEL_83; - if ( pCurrentScreen == 12 ) + if ( pCurrentScreen == SCREEN_LOADGAME ) { pIcons_LOD->_4114F2(); //crt_deconstruct_ptr_6A0118(); @@ -4036,24 +4036,24 @@ pGUIWindow2->Release(); pGUIWindow2 = 0; pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v15; continue; } - if ( pCurrentScreen == 16 ) + if ( pCurrentScreen == SCREEN_VIDEO ) { pVideoPlayer->Unload(); } else { - if ( pCurrentScreen != 27 ) + if ( pCurrentScreen != SCREEN_1B ) //goto LABEL_81; { pGUIWindow_CurrentMenu->Release(); pGUIWindow2->Release(); pGUIWindow2 = 0; pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = v15; continue; } @@ -14363,7 +14363,7 @@ dword_506F0C[0] = pCurrentScreen; result = GUIWindow::Create(0, 0, 640, 480, WINDOW_FinalWindow, v3, (int)v2); ptr_507BDC = result; - pCurrentScreen = 22; + pCurrentScreen = SCREEN_PRESS_ESCAPE_MESSAGE; return result; } // 4E28F8: using guessed type int pCurrentScreen; @@ -15042,7 +15042,7 @@ if ( pHint && pHint != (char *)1 ) pGUIButton3->DrawLabel(pHint, pFontCreate, 0, 0); pWindow->Release(); - if (pCurrentScreen == 11)//окно сохранения игры + if (pCurrentScreen == SCREEN_SAVEGAME) pMessageQueue_50CBD0->SendMessage(UIMSG_SaveGame, 0, 0); else pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0); @@ -15109,7 +15109,7 @@ ItemGen2.Reset(); pWindow->Release(); pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = 1; v39 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); if ( v39 > 0 ) @@ -15210,7 +15210,7 @@ pItemGen.Reset(); pWindow->Release(); pEventTimer->Resume(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; viewparams->bRedrawGameUI = 1; v26 = atoi((const char *)pKeyActionMap->pPressedKeysBuffer); if ( v26 > 0 ) @@ -15371,7 +15371,7 @@ } pEventTimer->Resume(); ptr_507BD0->Release(); - pCurrentScreen = 0; + pCurrentScreen = SCREEN_GAME; //goto LABEL_114; viewparams->bRedrawGameUI = 1; continue; @@ -15446,13 +15446,13 @@ } else//pWindowType == 20 (0x14) WINDOW_Chest { - if ( pCurrentScreen == 10 ) + if ( pCurrentScreen == SCREEN_CHEST ) { Chest::DrawChestUI((unsigned int)pWindow->ptr_1C); } else { - if ( pCurrentScreen == 15 ) + if ( pCurrentScreen == SCREEN_F ) { pRenderer->ClearZBuffer(0, 479); draw_leather(); @@ -16169,7 +16169,7 @@ unsigned int pX; // [sp+70h] [bp-8h]@3 unsigned int pY; // [sp+74h] [bp-4h]@3 - if ( pCurrentScreen == 16 )//окно видео ролика + if ( pCurrentScreen == SCREEN_VIDEO ) return; if ( _this ) { @@ -16207,9 +16207,9 @@ //while ( v1 < 4 ); } pEventTimer->Pause(); - if ( pCurrentScreen <= 10 ) - { - if ( pCurrentScreen == 10 )//окно ящика + if ( pCurrentScreen <= SCREEN_CHEST ) + { + if ( pCurrentScreen == SCREEN_CHEST ) { __debugbreak(); if ( !pPlayers[uActiveCharacter]->CanAct() ) @@ -16238,11 +16238,11 @@ { if ( pCurrentScreen ) { - if ( pCurrentScreen != 3 ) - { - if ( pCurrentScreen != 7 ) - { - if ( pCurrentScreen == 8 )//окно книги заклов + if ( pCurrentScreen != SCREEN_BOOKS ) + { + if ( pCurrentScreen != SCREEN_CHARACTERS ) + { + if ( pCurrentScreen == SCREEN_SPELL_BOOK ) { if ( dword_507B00_spell_info_to_draw_in_popup ) DrawSpellDescriptionPopup((void *)(dword_507B00_spell_info_to_draw_in_popup - 1)); @@ -16250,7 +16250,7 @@ goto LABEL_132; } LABEL_119: - if ( (signed int)pX > 467 && pCurrentScreen != 14 ) + if ( (signed int)pX > 467 && pCurrentScreen != SCREEN_E ) { identify_item(); goto LABEL_132; @@ -16388,19 +16388,19 @@ GameUI_DrawItemInfo(v8); goto LABEL_132; } - if ( pCurrentScreen == 13 )//окно дома + if ( pCurrentScreen == SCREEN_HOUSE ) { if ( (signed int)pY < 345 && (signed int)pX < 469 ) sub_4B1A2D(); goto LABEL_132; } - if ( pCurrentScreen <= 13 ) + if ( pCurrentScreen <= SCREEN_HOUSE ) goto LABEL_132; - if ( pCurrentScreen <= 15 ) + if ( pCurrentScreen <= SCREEN_F ) goto LABEL_119; - if ( pCurrentScreen != 21 ) - { - v11 = pCurrentScreen == 23; + if ( pCurrentScreen != SCREEN_PARTY_CREATION ) + { + v11 = pCurrentScreen == SCREEN_CASTING; if ( !v11 ) goto LABEL_132; identify_item(); @@ -16510,7 +16510,7 @@ unsigned int pY; // [sp+18h] [bp-4h]@7 pXY_ = pXY; - if ( pCurrentScreen == 16 + if ( pCurrentScreen == SCREEN_VIDEO || sub_4637E0_is_there_popup_onscreen() ) return; if ( pGUIWindow2 && pGUIWindow2->ptr_1C == (void *)33 )
--- a/mm7_6.cpp Tue Feb 12 10:17:35 2013 +0600 +++ b/mm7_6.cpp Tue Feb 12 15:28:08 2013 +0600 @@ -9184,7 +9184,7 @@ pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = (UIMessageType)404; goto _send_message; } - if ( pCurrentScreen == 4 ) + if ( pCurrentScreen == SCREEN_NPC_DIALOGUE ) { v11 = pMessageQueue_50CBD0->uNumMessages; if ( pMessageQueue_50CBD0->uNumMessages ) @@ -9210,7 +9210,7 @@ break; case INPUT_CharCycle: //__debugbreak(); - if ( pCurrentScreen == 8 + if ( pCurrentScreen == SCREEN_SPELL_BOOK || dword_50C9E8 >= 40 ) break; dword_50C9EC[3 * dword_50C9E8] = 176; @@ -9311,8 +9311,8 @@ ++pMessageQueue_50CBD0->uNumMessages; goto LABEL_175; } - if ( pCurrentScreen == 4 - || pCurrentScreen == 19 ) + if ( pCurrentScreen == SCREEN_NPC_DIALOGUE + || pCurrentScreen == SCREEN_BRANCHLESS_NPC_DIALOG ) { v15 = pMessageQueue_50CBD0->uNumMessages; if ( pMessageQueue_50CBD0->uNumMessages )