comparison Game.cpp @ 2215:e9625ad08541

fog fix and change 640,480 - window->GetWidth(), window->GetHeight()
author Ritor1
date Fri, 14 Feb 2014 18:08:30 +0600
parents e18200fcfb50
children 3f375342de12
comparison
equal deleted inserted replaced
2214:20995bb8895a 2215:e9625ad08541
1484 __debugbreak(); 1484 __debugbreak();
1485 pIcons_LOD->SyncLoadedFilesCount(); 1485 pIcons_LOD->SyncLoadedFilesCount();
1486 pIcons_LOD->RemoveTexturesPackFromTextureList(); 1486 pIcons_LOD->RemoveTexturesPackFromTextureList();
1487 pGUIWindow_CurrentMenu->Release(); 1487 pGUIWindow_CurrentMenu->Release();
1488 pCurrentScreen = SCREEN_OPTIONS; 1488 pCurrentScreen = SCREEN_OPTIONS;
1489 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_8, 0, 0); 1489 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_8, 0, 0);
1490 continue; 1490 continue;
1491 case UIMSG_ArrowUp: 1491 case UIMSG_ArrowUp:
1492 --pSaveListPosition; 1492 --pSaveListPosition;
1493 if ( pSaveListPosition < 0 ) 1493 if ( pSaveListPosition < 0 )
1494 pSaveListPosition = 0; 1494 pSaveListPosition = 0;
1576 options_menu_skin.uTextureID_FlipOnExit = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE); 1576 options_menu_skin.uTextureID_FlipOnExit = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE);
1577 options_menu_skin.uTextureID_AlwaysRun = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE); 1577 options_menu_skin.uTextureID_AlwaysRun = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE);
1578 options_menu_skin.uTextureID_ShowDamage = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE); 1578 options_menu_skin.uTextureID_ShowDamage = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE);
1579 options_menu_skin.uTextureID_WalkSound = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE); 1579 options_menu_skin.uTextureID_WalkSound = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE);
1580 1580
1581 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Options, 0, 0); 1581 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Options, 0, 0);
1582 pGUIWindow_CurrentMenu->CreateButton(22, 270, 1582 pGUIWindow_CurrentMenu->CreateButton(22, 270,
1583 pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureWidth, 1583 pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureWidth,
1584 pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureHeight, 1584 pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureHeight,
1585 1, 0, UIMSG_SetTurnSpeed, 0x80, 0, "", 0); 1585 1, 0, UIMSG_SetTurnSpeed, 0x80, 0, "", 0);
1586 pGUIWindow_CurrentMenu->CreateButton(93, 270, 1586 pGUIWindow_CurrentMenu->CreateButton(93, 270,
1635 uTextureID_Optkb[0] = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE); 1635 uTextureID_Optkb[0] = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE);
1636 uTextureID_Optkb[1] = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE); 1636 uTextureID_Optkb[1] = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE);
1637 uTextureID_Optkb[2] = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); 1637 uTextureID_Optkb[2] = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE);
1638 uTextureID_Optkb[3] = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE); 1638 uTextureID_Optkb[3] = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE);
1639 uTextureID_Optkb[4] = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE); 1639 uTextureID_Optkb[4] = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE);
1640 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_KeyMappingOptions, 0, 0); 1640 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_KeyMappingOptions, 0, 0);
1641 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0); 1641 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0);
1642 pGUIWindow_CurrentMenu->CreateButton(19u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, UIMSG_SelectKeyPage1, 0, 0, "", 0); 1642 pGUIWindow_CurrentMenu->CreateButton(19u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, UIMSG_SelectKeyPage1, 0, 0, "", 0);
1643 pGUIWindow_CurrentMenu->CreateButton(127u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, UIMSG_SelectKeyPage2, 0, 0, "", 0); 1643 pGUIWindow_CurrentMenu->CreateButton(127u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, UIMSG_SelectKeyPage2, 0, 0, "", 0);
1644 pGUIWindow_CurrentMenu->CreateButton(127u, 0x144u, 0x6Cu, 0x14u, 1, 0, UIMSG_ResetKeyMapping, 0, 0, "", 0); 1644 pGUIWindow_CurrentMenu->CreateButton(127u, 0x144u, 0x6Cu, 0x14u, 1, 0, UIMSG_ResetKeyMapping, 0, 0, "", 0);
1645 pGUIWindow_CurrentMenu->CreateButton(19u, 0x144u, 0x6Cu, 0x14u, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0, "", 0); 1645 pGUIWindow_CurrentMenu->CreateButton(19u, 0x144u, 0x6Cu, 0x14u, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0, "", 0);
1736 pTextureIDs_GammaPositions[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE); 1736 pTextureIDs_GammaPositions[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE);
1737 pTextureIDs_GammaPositions[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE); 1737 pTextureIDs_GammaPositions[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE);
1738 not_available_bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE); 1738 not_available_bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE);
1739 not_available_us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE); 1739 not_available_us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE);
1740 not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE); 1740 not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE);
1741 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_VideoOptions, 0, 0); 1741 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_VideoOptions, 0, 0);
1742 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0); 1742 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0);
1743 //if ( pRenderer->pRenderD3D ) 1743 //if ( pRenderer->pRenderD3D )
1744 { 1744 {
1745 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleBloodsplats, 0, 0, "", 0); 1745 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleBloodsplats, 0, 0, "", 0);
1746 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleColoredLights, 0, 0, "", 0); 1746 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleColoredLights, 0, 0, "", 0);
1950 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 1950 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
1951 if ( pCurrentScreen ) 1951 if ( pCurrentScreen )
1952 pGUIWindow_CurrentMenu->Release(); 1952 pGUIWindow_CurrentMenu->Release();
1953 pEventTimer->Pause(); 1953 pEventTimer->Pause();
1954 pAudioPlayer->StopChannels(-1, -1); 1954 pAudioPlayer->StopChannels(-1, -1);
1955 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); 1955 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0);
1956 pBooksWindow = GUIWindow::Create(493u, 355u, 0, 0, WINDOW_BooksWindow, (int)pBtn_Quests, 0); 1956 pBooksWindow = GUIWindow::Create(493u, 355u, 0, 0, WINDOW_BooksWindow, (int)pBtn_Quests, 0);
1957 bFlashQuestBook = 0; 1957 bFlashQuestBook = 0;
1958 continue; 1958 continue;
1959 case UIMSG_OpenAutonotes: 1959 case UIMSG_OpenAutonotes:
1960 if ( pMessageQueue_50CBD0->uNumMessages ) 1960 if ( pMessageQueue_50CBD0->uNumMessages )
1961 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 1961 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
1962 if ( pCurrentScreen ) 1962 if ( pCurrentScreen )
1963 pGUIWindow_CurrentMenu->Release(); 1963 pGUIWindow_CurrentMenu->Release();
1964 pEventTimer->Pause(); 1964 pEventTimer->Pause();
1965 pAudioPlayer->StopChannels(-1, -1); 1965 pAudioPlayer->StopChannels(-1, -1);
1966 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); 1966 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0);
1967 pBooksWindow = GUIWindow::Create(527u, 353u, 0, 0, WINDOW_BooksWindow, (int)pBtn_Autonotes, 0); 1967 pBooksWindow = GUIWindow::Create(527u, 353u, 0, 0, WINDOW_BooksWindow, (int)pBtn_Autonotes, 0);
1968 bFlashAutonotesBook = 0; 1968 bFlashAutonotesBook = 0;
1969 continue; 1969 continue;
1970 case UIMSG_OpenMapBook: 1970 case UIMSG_OpenMapBook:
1971 if ( pMessageQueue_50CBD0->uNumMessages ) 1971 if ( pMessageQueue_50CBD0->uNumMessages )
1974 pGUIWindow_CurrentMenu->Release(); 1974 pGUIWindow_CurrentMenu->Release();
1975 pEventTimer->Pause(); 1975 pEventTimer->Pause();
1976 viewparams->sViewCenterX = pParty->vPosition.x; 1976 viewparams->sViewCenterX = pParty->vPosition.x;
1977 viewparams->sViewCenterY = pParty->vPosition.y; 1977 viewparams->sViewCenterY = pParty->vPosition.y;
1978 pAudioPlayer->StopChannels(-1, -1); 1978 pAudioPlayer->StopChannels(-1, -1);
1979 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); 1979 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0);
1980 pBooksWindow = GUIWindow::Create(546, 353, 0, 0, WINDOW_BooksWindow, (int)pBtn_Maps, 0); 1980 pBooksWindow = GUIWindow::Create(546, 353, 0, 0, WINDOW_BooksWindow, (int)pBtn_Maps, 0);
1981 continue; 1981 continue;
1982 case UIMSG_OpenCalendar: 1982 case UIMSG_OpenCalendar:
1983 if ( pMessageQueue_50CBD0->uNumMessages ) 1983 if ( pMessageQueue_50CBD0->uNumMessages )
1984 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 1984 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
1985 if ( pCurrentScreen ) 1985 if ( pCurrentScreen )
1986 pGUIWindow_CurrentMenu->Release(); 1986 pGUIWindow_CurrentMenu->Release();
1987 pEventTimer->Pause(); 1987 pEventTimer->Pause();
1988 pAudioPlayer->StopChannels(-1, -1); 1988 pAudioPlayer->StopChannels(-1, -1);
1989 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); 1989 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0);
1990 pBooksWindow = GUIWindow::Create(570, 354, 0, 0, WINDOW_BooksWindow, (int)pBtn_Calendar, 0); 1990 pBooksWindow = GUIWindow::Create(570, 354, 0, 0, WINDOW_BooksWindow, (int)pBtn_Calendar, 0);
1991 continue; 1991 continue;
1992 case UIMSG_OpenHistoryBook: 1992 case UIMSG_OpenHistoryBook:
1993 if ( pMessageQueue_50CBD0->uNumMessages ) 1993 if ( pMessageQueue_50CBD0->uNumMessages )
1994 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 1994 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
1995 if ( pCurrentScreen ) 1995 if ( pCurrentScreen )
1996 pGUIWindow_CurrentMenu->Release(); 1996 pGUIWindow_CurrentMenu->Release();
1997 pEventTimer->Pause(); 1997 pEventTimer->Pause();
1998 pAudioPlayer->StopChannels(-1, -1); 1998 pAudioPlayer->StopChannels(-1, -1);
1999 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); 1999 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0);
2000 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, WINDOW_BooksWindow, (int)pBtn_History, 0); 2000 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, WINDOW_BooksWindow, (int)pBtn_History, 0);
2001 bFlashHistoryBook = 0; 2001 bFlashHistoryBook = 0;
2002 continue; 2002 continue;
2003 case UIMSG_Escape:// нажатие Escape and return to game 2003 case UIMSG_Escape:// нажатие Escape and return to game
2004 back_to_game(); 2004 back_to_game();
2555 2555
2556 ++pIcons_LOD->uTexturePacksCount; 2556 ++pIcons_LOD->uTexturePacksCount;
2557 if ( !pIcons_LOD->uNumPrevLoadedFiles ) 2557 if ( !pIcons_LOD->uNumPrevLoadedFiles )
2558 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; 2558 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
2559 2559
2560 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_OptionsButtons, 0, 0); 2560 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_OptionsButtons, 0, 0);
2561 uTextureID_Options = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); 2561 uTextureID_Options = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE);
2562 uTextureID_New1 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); 2562 uTextureID_New1 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE);
2563 uTextureID_Load1 = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE); 2563 uTextureID_Load1 = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE);
2564 uTextureID_Save1 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE); 2564 uTextureID_Save1 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE);
2565 uTextureID_Controls1 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE); 2565 uTextureID_Controls1 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE);
2973 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 2973 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
2974 continue; 2974 continue;
2975 2975
2976 case UIMSG_OnCastTownPortal: 2976 case UIMSG_OnCastTownPortal:
2977 pAudioPlayer->StopChannels(-1, -1); 2977 pAudioPlayer->StopChannels(-1, -1);
2978 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, WINDOW_TownPortal, (char *)uMessageParam); 2978 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, WINDOW_TownPortal, (char *)uMessageParam);
2979 continue; 2979 continue;
2980 2980
2981 case UIMSG_OnCastLloydsBeacon: 2981 case UIMSG_OnCastLloydsBeacon:
2982 pAudioPlayer->StopChannels(-1, -1); 2982 pAudioPlayer->StopChannels(-1, -1);
2983 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, WINDOW_LloydsBeacon, 0); 2983 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, WINDOW_LloydsBeacon, 0);
2984 continue; 2984 continue;
2985 2985
2986 case UIMSG_LloydsBeacon_FlippingBtn: 2986 case UIMSG_LloydsBeacon_FlippingBtn:
2987 bRecallingBeacon = uMessageParam; 2987 bRecallingBeacon = uMessageParam;
2988 v127 = uMessageParam + 204; 2988 v127 = uMessageParam + 204;
3422 continue; 3422 continue;
3423 case UIMSG_1C: 3423 case UIMSG_1C:
3424 __debugbreak(); 3424 __debugbreak();
3425 if ( !uActiveCharacter || pCurrentScreen ) 3425 if ( !uActiveCharacter || pCurrentScreen )
3426 continue; 3426 continue;
3427 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, WINDOW_68, uMessageParam, 0); 3427 ptr_507BC8 = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_68, uMessageParam, 0);
3428 pCurrentScreen = SCREEN_19; 3428 pCurrentScreen = SCREEN_19;
3429 pEventTimer->Pause(); 3429 pEventTimer->Pause();
3430 continue; 3430 continue;
3431 case UIMSG_STEALFROMACTOR: 3431 case UIMSG_STEALFROMACTOR:
3432 if ( !uActiveCharacter ) 3432 if ( !uActiveCharacter )
3794 if ( pCurrentScreen == SCREEN_GAME ) 3794 if ( pCurrentScreen == SCREEN_GAME )
3795 { 3795 {
3796 GUIWindow::Create(476, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0); 3796 GUIWindow::Create(476, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0);
3797 pCurrentScreen = SCREEN_SPELL_BOOK; 3797 pCurrentScreen = SCREEN_SPELL_BOOK;
3798 pEventTimer->Pause(); 3798 pEventTimer->Pause();
3799 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); 3799 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_SpellBook, 0, 0);
3800 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); 3800 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0);
3801 viewparams->field_48 = 1; 3801 viewparams->field_48 = 1;
3802 continue; 3802 continue;
3803 } 3803 }
3804 if ( pCurrentScreen != SCREEN_REST && pCurrentScreen != SCREEN_CHARACTERS 3804 if ( pCurrentScreen != SCREEN_REST && pCurrentScreen != SCREEN_CHARACTERS
3806 { 3806 {
3807 pGUIWindow_CurrentMenu->Release(); 3807 pGUIWindow_CurrentMenu->Release();
3808 GUIWindow::Create(476, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0); 3808 GUIWindow::Create(476, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0);
3809 pCurrentScreen = SCREEN_SPELL_BOOK; 3809 pCurrentScreen = SCREEN_SPELL_BOOK;
3810 pEventTimer->Pause(); 3810 pEventTimer->Pause();
3811 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); 3811 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_SpellBook, 0, 0);
3812 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); 3812 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0);
3813 viewparams->field_48 = 1; 3813 viewparams->field_48 = 1;
3814 continue; 3814 continue;
3815 } 3815 }
3816 } 3816 }
3827 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_QuickReference, 0); 3827 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_QuickReference, 0);
3828 viewparams->bRedrawGameUI = 1; 3828 viewparams->bRedrawGameUI = 1;
3829 pEventTimer->Pause(); 3829 pEventTimer->Pause();
3830 pAudioPlayer->StopChannels(-1, -1); 3830 pAudioPlayer->StopChannels(-1, -1);
3831 pCurrentScreen = SCREEN_QUICK_REFERENCE; 3831 pCurrentScreen = SCREEN_QUICK_REFERENCE;
3832 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_QuickReference, 5, 0); 3832 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_QuickReference, 5, 0);
3833 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); 3833 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE);
3834 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, 1, 0, UIMSG_Escape, 0, 0, 3834 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, 1, 0, UIMSG_Escape, 0, 0,
3835 pGlobalTXT_LocalizationStrings[79],// "Exit" 3835 pGlobalTXT_LocalizationStrings[79],// "Exit"
3836 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); //, v179); 3836 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); //, v179);
3837 continue; 3837 continue;