Mercurial > mm7
comparison Game.cpp @ 2225:080fd5a5433d
Merge
author | Grumpy7 |
---|---|
date | Wed, 19 Feb 2014 22:30:39 +0100 |
parents | c2eeeb991a87 744ed51880ed |
children | c4f87fb3cfee |
comparison
equal
deleted
inserted
replaced
2224:c2eeeb991a87 | 2225:080fd5a5433d |
---|---|
152 if (pOtherOverlayList->bRedraw) | 152 if (pOtherOverlayList->bRedraw) |
153 viewparams->bRedrawGameUI = true; | 153 viewparams->bRedrawGameUI = true; |
154 v4 = viewparams->bRedrawGameUI; | 154 v4 = viewparams->bRedrawGameUI; |
155 GameUI_Footer(); | 155 GameUI_Footer(); |
156 if (!viewparams->bRedrawGameUI) | 156 if (!viewparams->bRedrawGameUI) |
157 { | |
158 GameUI_DrawRightPanelItems(); | 157 GameUI_DrawRightPanelItems(); |
159 } | |
160 else | 158 else |
161 { | 159 { |
162 GameUI_DrawRightPanelFrames(); | 160 GameUI_DrawRightPanelFrames(); |
163 GameUI_Footer_2(); | 161 GameUI_Footer_2(); |
164 viewparams->bRedrawGameUI = false; | 162 viewparams->bRedrawGameUI = false; |
183 if (v4 || pParty->pHirelings[0].evt_C || pParty->pHirelings[1].evt_C ) | 181 if (v4 || pParty->pHirelings[0].evt_C || pParty->pHirelings[1].evt_C ) |
184 GameUI_DrawHiredNPCs(); | 182 GameUI_DrawHiredNPCs(); |
185 GameUI_DrawPortraits(v4); | 183 GameUI_DrawPortraits(v4); |
186 GameUI_DrawLifeManaBars(); | 184 GameUI_DrawLifeManaBars(); |
187 GameUI_DrawCharacterSelectionFrame(); | 185 GameUI_DrawCharacterSelectionFrame(); |
188 if ( sub_44100D() ) | 186 if ( _44100D_should_alter_right_panel() ) |
189 GameUI_DrawRightPanel(); | 187 GameUI_DrawRightPanel(); |
190 if ( !pVideoPlayer->AnyMovieLoaded() ) | 188 if ( !pVideoPlayer->AnyMovieLoaded() ) |
191 { | 189 { |
192 pStru6Instance->DrawPlayerBuffAnims(); | 190 pStru6Instance->DrawPlayerBuffAnims(); |
193 pOtherOverlayList->DrawTurnBasedIcon(v4); | 191 pOtherOverlayList->DrawTurnBasedIcon(v4); |
256 pParty->UpdatePlayersAndHirelingsEmotions(); | 254 pParty->UpdatePlayersAndHirelingsEmotions(); |
257 | 255 |
258 _unused_5B5924_is_travel_ui_drawn = false; | 256 _unused_5B5924_is_travel_ui_drawn = false; |
259 if (v4) | 257 if (v4) |
260 pMouse->bRedraw = true; | 258 pMouse->bRedraw = true; |
261 pMouse->_469EA4(); | 259 pMouse->ReadCursorWithItem(); |
262 pMouse->DrawCursor(); | 260 pMouse->DrawCursor(); |
263 pMouse->_469E1C(); | 261 pMouse->Activate(); |
264 pRenderer->EndScene(); | 262 pRenderer->EndScene(); |
265 pRenderer->Present(); | 263 pRenderer->Present(); |
266 pParty->uFlags &= ~2; | 264 pParty->uFlags &= ~2; |
267 } | 265 } |
268 | 266 |
524 //----- (0044F192) -------------------------------------------------------- | 522 //----- (0044F192) -------------------------------------------------------- |
525 void Game::PrepareBloodsplats() | 523 void Game::PrepareBloodsplats() |
526 { | 524 { |
527 for (uint i = 0; i < uNumBloodsplats; ++i) | 525 for (uint i = 0; i < uNumBloodsplats; ++i) |
528 { | 526 { |
529 pBloodsplatContainer->AddBloodsplat( | 527 pBloodsplatContainer->AddBloodsplat(pBloodsplats[i].x, pBloodsplats[i].y, pBloodsplats[i].z, |
530 pBloodsplats[i].x, | 528 pBloodsplats[i].radius, pBloodsplats[i].r, pBloodsplats[i].g, pBloodsplats[i].b); |
531 pBloodsplats[i].y, | |
532 pBloodsplats[i].z, | |
533 pBloodsplats[i].radius, | |
534 pBloodsplats[i].r, | |
535 pBloodsplats[i].g, | |
536 pBloodsplats[i].b); | |
537 } | 529 } |
538 } | 530 } |
539 | 531 |
540 | 532 |
541 //----- (0044F120) -------------------------------------------------------- | 533 //----- (0044F120) -------------------------------------------------------- |
544 Game__StationaryLight* pLight; | 536 Game__StationaryLight* pLight; |
545 | 537 |
546 for( int i=0; i<uNumStationaryLights; ++i ) | 538 for( int i=0; i<uNumStationaryLights; ++i ) |
547 { | 539 { |
548 pLight=&pStationaryLights[i]; | 540 pLight=&pStationaryLights[i]; |
549 pStationaryLightsStack->AddLight( | 541 pStationaryLightsStack->AddLight(pLight->vPosition.x, pLight->vPosition.y, pLight->vPosition.z, |
550 pLight->vPosition.x, | 542 pLight->flt_18, pLight->vRGBColor.x, pLight->vRGBColor.y, pLight->vRGBColor.z, _4E94D0_light_type); |
551 pLight->vPosition.y, | |
552 pLight->vPosition.z, | |
553 pLight->flt_18, | |
554 pLight->vRGBColor.x, | |
555 pLight->vRGBColor.y, | |
556 pLight->vRGBColor.z, | |
557 _4E94D0_light_type); | |
558 } | 543 } |
559 } | 544 } |
560 // 4E94D0: using guessed type char _4E94D0_light_type; | 545 // 4E94D0: using guessed type char _4E94D0_light_type; |
561 | 546 |
562 //----- (0044F0FD) -------------------------------------------------------- | 547 //----- (0044F0FD) -------------------------------------------------------- |
582 | 567 |
583 | 568 |
584 //----- (0044F07B) -------------------------------------------------------- | 569 //----- (0044F07B) -------------------------------------------------------- |
585 bool Game::_44F07B() | 570 bool Game::_44F07B() |
586 { | 571 { |
587 if (!pKeyboardInstance->IsKeyBeingHeld(VK_SHIFT) && | 572 if (!pKeyboardInstance->IsKeyBeingHeld(VK_SHIFT) && !pKeyboardInstance->IsKeyBeingHeld(VK_LSHIFT) && |
588 !pKeyboardInstance->IsKeyBeingHeld(VK_LSHIFT) && | 573 !pKeyboardInstance->IsKeyBeingHeld(VK_LSHIFT) || (pKeyboardInstance->WasKeyPressed(VK_F11) == 0 && |
589 !pKeyboardInstance->IsKeyBeingHeld(VK_LSHIFT) || | |
590 | |
591 (pKeyboardInstance->WasKeyPressed(VK_F11) == 0 && | |
592 pKeyboardInstance->WasKeyPressed(VK_F11))) | 574 pKeyboardInstance->WasKeyPressed(VK_F11))) |
593 return true; | 575 return true; |
594 return false; | 576 return false; |
595 } | 577 } |
596 | 578 |
599 { | 581 { |
600 //Game *v1; // esi@1 | 582 //Game *v1; // esi@1 |
601 //double v2; // st7@2 | 583 //double v2; // st7@2 |
602 float depth; // ST00_4@9 | 584 float depth; // ST00_4@9 |
603 //bool result; // eax@9 | 585 //bool result; // eax@9 |
604 unsigned int v5; // eax@14 | 586 //unsigned int v5; // eax@14 |
605 __int64 v6; // kr00_8@21 | 587 __int64 v6; // kr00_8@21 |
606 unsigned int y; // [sp+4h] [bp-24h]@2 | 588 //unsigned int y; // [sp+4h] [bp-24h]@2 |
607 unsigned int x; // [sp+8h] [bp-20h]@2 | 589 //unsigned int x; // [sp+8h] [bp-20h]@2 |
608 Vis_SelectionFilter *v10; // [sp+10h] [bp-18h]@2 | 590 Vis_SelectionFilter *v10; // [sp+10h] [bp-18h]@2 |
609 Vis_SelectionFilter *v11; // [sp+14h] [bp-14h]@2 | 591 Vis_SelectionFilter *v11; // [sp+14h] [bp-14h]@2 |
610 POINT a2; // [sp+20h] [bp-8h]@1 | 592 POINT cursor; // [sp+20h] [bp-8h]@1 |
611 | 593 |
612 //v1 = this; | 594 //v1 = this; |
613 ++qword_5C6DF0; | 595 ++qword_5C6DF0; |
614 pParticleEngine->UpdateParticles(); | 596 pParticleEngine->UpdateParticles(); |
615 pMouseInstance->GetCursorPos(&a2); | 597 pMouseInstance->GetCursorPos(&cursor); |
616 | 598 |
617 x = a2.y; | 599 //x = cursor.y; |
618 y = a2.x; | 600 //y = cursor.x; |
619 if ( sub_4637E0_is_there_popup_onscreen() ) | 601 if ( sub_4637E0_is_there_popup_onscreen() ) |
620 { | 602 { |
621 v11 = &vis_face_filter; | 603 v11 = &vis_face_filter; |
622 v10 = &vis_sprite_filter_2; | 604 v10 = &vis_sprite_filter_2; |
623 depth = pGame->pIndoorCameraD3D->GetPickDepth(); | 605 depth = pGame->pIndoorCameraD3D->GetPickDepth(); |
636 } | 618 } |
637 depth = 5120.0; | 619 depth = 5120.0; |
638 } | 620 } |
639 //depth = v2; | 621 //depth = v2; |
640 | 622 |
641 PickMouse(depth, y, x, false, v10, v11); | 623 PickMouse(depth, cursor.x, cursor.y, false, v10, v11); |
642 pLightmapBuilder->std__vector_000004_size = 0; | 624 pLightmapBuilder->std__vector_000004_size = 0; |
643 pLightmapBuilder->std__vector_183808_size = 0; | 625 pLightmapBuilder->std__vector_183808_size = 0; |
644 pDecalBuilder->std__vector_pDecals_size = 0; | 626 pDecalBuilder->std__vector_pDecals_size = 0; |
645 pDecalBuilder->field_308008 = 0; | 627 pDecalBuilder->field_308008 = 0; |
646 if (!_44F07B()) | 628 if (!_44F07B()) |
647 return false; | 629 return false; |
648 | 630 |
649 if ( uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) | 631 if ( uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS) |
650 pStru10Instance->bDoNotDrawPortalFrustum = false; | 632 pStru10Instance->bDoNotDrawPortalFrustum = false; |
651 if ( /*pRenderer->pRenderD3D &&*/ uCurrentlyLoadedLevelType == LEVEL_Outdoor) | 633 if ( /*pRenderer->pRenderD3D &&*/ uCurrentlyLoadedLevelType == LEVEL_Outdoor) |
652 { | 634 pRenderer->uFogColor = GetLevelFogColor() & 0xFFFFFF; |
653 v5 = GetLevelFogColor(); | |
654 pRenderer->uFogColor = v5 & 0xFFFFFF; | |
655 } | |
656 if (uFlags & 0x0400) | 635 if (uFlags & 0x0400) |
657 uFlags2 |= 0x01; | 636 uFlags2 |= 0x01; |
658 /*if ( !pRenderer->pRenderD3D && uCurrentlyLoadedLevelType == LEVEL_Outdoor && pMobileLightsStack->uNumLightsActive ) | 637 /*if ( !pRenderer->pRenderD3D && uCurrentlyLoadedLevelType == LEVEL_Outdoor && pMobileLightsStack->uNumLightsActive ) |
659 { | 638 { |
660 uFlags2 |= 0x01; | 639 uFlags2 |= 0x01; |
663 v6 = qword_5C6DF0 - field_E10; | 642 v6 = qword_5C6DF0 - field_E10; |
664 if ( qword_5C6DF0 - field_E10 == 1 ) | 643 if ( qword_5C6DF0 - field_E10 == 1 ) |
665 uFlags2 |= v6; | 644 uFlags2 |= v6; |
666 if (uNumStationaryLights_in_pStationaryLightsStack != pStationaryLightsStack->uNumLightsActive ) | 645 if (uNumStationaryLights_in_pStationaryLightsStack != pStationaryLightsStack->uNumLightsActive ) |
667 { | 646 { |
668 uFlags2 |= 1u; | 647 uFlags2 |= 1; |
669 uNumStationaryLights_in_pStationaryLightsStack = pStationaryLightsStack->uNumLightsActive; | 648 uNumStationaryLights_in_pStationaryLightsStack = pStationaryLightsStack->uNumLightsActive; |
670 } | 649 } |
671 _44E904(); | 650 _44E904(); |
672 return true; | 651 return true; |
673 } | 652 } |
765 //v7 = a3b + 6.7553994e15; | 744 //v7 = a3b + 6.7553994e15; |
766 //v6 = LODWORD(v7); | 745 //v6 = LODWORD(v7); |
767 v6 = floorf(a3b + 0.5f); | 746 v6 = floorf(a3b + 0.5f); |
768 } | 747 } |
769 else | 748 else |
770 { | |
771 v6 = 0; | 749 v6 = 0; |
772 } | |
773 if ( a4 >= v6 ) | 750 if ( a4 >= v6 ) |
774 { | 751 { |
775 a4a = (1.0 - fSaturation) * a2a; | 752 a4a = (1.0 - fSaturation) * a2a; |
776 //v9 = a4a + 6.7553994e15; | 753 //v9 = a4a + 6.7553994e15; |
777 //if ( SLODWORD(v9) >= 0 ) | 754 //if ( SLODWORD(v9) >= 0 ) |
781 //v10 = a4b + 6.7553994e15; | 758 //v10 = a4b + 6.7553994e15; |
782 //result = LODWORD(v10); | 759 //result = LODWORD(v10); |
783 result = floorf(a4b + 0.5f); | 760 result = floorf(a4b + 0.5f); |
784 } | 761 } |
785 else | 762 else |
786 { | |
787 result = 0; | 763 result = 0; |
788 } | |
789 } | 764 } |
790 else | 765 else |
791 { | |
792 result = a4; | 766 result = a4; |
793 } | |
794 } | 767 } |
795 else | 768 else |
796 { | |
797 result = -1; | 769 result = -1; |
798 } | |
799 return result; | 770 return result; |
800 } | 771 } |
801 | 772 |
802 | 773 |
803 | 774 |
844 //v7 = v13 + 6.7553994e15; | 815 //v7 = v13 + 6.7553994e15; |
845 //v6 = LODWORD(v7); | 816 //v6 = LODWORD(v7); |
846 v6 = floorf(v13 + 0.5f); | 817 v6 = floorf(v13 + 0.5f); |
847 } | 818 } |
848 else | 819 else |
849 { | |
850 v6 = 0; | 820 v6 = 0; |
851 } | |
852 if ( a4 >= v6 ) | 821 if ( a4 >= v6 ) |
853 { | 822 { |
854 v14 = (1.0 - fSaturation) * v11; | 823 v14 = (1.0 - fSaturation) * v11; |
855 //v9 = v14 + 6.7553994e15; | 824 //v9 = v14 + 6.7553994e15; |
856 if (floorf(v14 + 0.5f)/* SLODWORD(v9)*/ >= 0 ) | 825 if (floorf(v14 + 0.5f)/* SLODWORD(v9)*/ >= 0 ) |
859 //v10 = v15 + 6.7553994e15; | 828 //v10 = v15 + 6.7553994e15; |
860 //result = LODWORD(v10); | 829 //result = LODWORD(v10); |
861 result = floorf(v15 + 0.5f); | 830 result = floorf(v15 + 0.5f); |
862 } | 831 } |
863 else | 832 else |
864 { | |
865 result = 0; | 833 result = 0; |
866 } | |
867 } | 834 } |
868 else | 835 else |
869 { | |
870 result = a4; | 836 result = a4; |
871 } | |
872 } | 837 } |
873 else | 838 else |
874 { | |
875 result = -1; | 839 result = -1; |
876 } | |
877 return result; | 840 return result; |
878 } | 841 } |
879 | 842 |
880 | 843 |
881 //----- (0044E4B7) -------------------------------------------------------- | 844 //----- (0044E4B7) -------------------------------------------------------- |
1006 { | 969 { |
1007 if ( v7 < 0.0 ) | 970 if ( v7 < 0.0 ) |
1008 v7 = 0.0; | 971 v7 = 0.0; |
1009 } | 972 } |
1010 else | 973 else |
1011 { | |
1012 v7 = 1.0; | 974 v7 = 1.0; |
1013 } | |
1014 //if ( pRenderer->pRenderD3D ) | 975 //if ( pRenderer->pRenderD3D ) |
1015 fSaturation = v7; | 976 fSaturation = v7; |
1016 //else | 977 //else |
1017 // fSaturation = (1.0 - 0.5) * v7 + 0.5; | 978 // fSaturation = (1.0 - 0.5) * v7 + 0.5; |
1018 } | 979 } |
1524 __debugbreak(); | 1485 __debugbreak(); |
1525 pIcons_LOD->SyncLoadedFilesCount(); | 1486 pIcons_LOD->SyncLoadedFilesCount(); |
1526 pIcons_LOD->RemoveTexturesPackFromTextureList(); | 1487 pIcons_LOD->RemoveTexturesPackFromTextureList(); |
1527 pGUIWindow_CurrentMenu->Release(); | 1488 pGUIWindow_CurrentMenu->Release(); |
1528 pCurrentScreen = SCREEN_OPTIONS; | 1489 pCurrentScreen = SCREEN_OPTIONS; |
1529 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_8, 0, 0); | 1490 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_8, 0, 0); |
1530 continue; | 1491 continue; |
1531 case UIMSG_ArrowUp: | 1492 case UIMSG_ArrowUp: |
1532 --pSaveListPosition; | 1493 --pSaveListPosition; |
1533 if ( pSaveListPosition < 0 ) | 1494 if ( pSaveListPosition < 0 ) |
1534 pSaveListPosition = 0; | 1495 pSaveListPosition = 0; |
1616 options_menu_skin.uTextureID_FlipOnExit = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE); | 1577 options_menu_skin.uTextureID_FlipOnExit = pIcons_LOD->LoadTexture("option04", TEXTURE_16BIT_PALETTE); |
1617 options_menu_skin.uTextureID_AlwaysRun = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE); | 1578 options_menu_skin.uTextureID_AlwaysRun = pIcons_LOD->LoadTexture("option03", TEXTURE_16BIT_PALETTE); |
1618 options_menu_skin.uTextureID_ShowDamage = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE); | 1579 options_menu_skin.uTextureID_ShowDamage = pIcons_LOD->LoadTexture("option02", TEXTURE_16BIT_PALETTE); |
1619 options_menu_skin.uTextureID_WalkSound = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE); | 1580 options_menu_skin.uTextureID_WalkSound = pIcons_LOD->LoadTexture("option01", TEXTURE_16BIT_PALETTE); |
1620 | 1581 |
1621 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Options, 0, 0); | 1582 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Options, 0, 0); |
1622 pGUIWindow_CurrentMenu->CreateButton(22, 270, | 1583 pGUIWindow_CurrentMenu->CreateButton(22, 270, |
1623 pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureWidth, | 1584 pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureWidth, |
1624 pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureHeight, | 1585 pIcons_LOD->GetTexture(options_menu_skin.uTextureID_TurnSpeed[2])->uTextureHeight, |
1625 1, 0, UIMSG_SetTurnSpeed, 0x80, 0, "", 0); | 1586 1, 0, UIMSG_SetTurnSpeed, 0x80, 0, "", 0); |
1626 pGUIWindow_CurrentMenu->CreateButton(93, 270, | 1587 pGUIWindow_CurrentMenu->CreateButton(93, 270, |
1675 uTextureID_Optkb[0] = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE); | 1636 uTextureID_Optkb[0] = pIcons_LOD->LoadTexture("optkb", TEXTURE_16BIT_PALETTE); |
1676 uTextureID_Optkb[1] = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE); | 1637 uTextureID_Optkb[1] = pIcons_LOD->LoadTexture("optkb_h", TEXTURE_16BIT_PALETTE); |
1677 uTextureID_Optkb[2] = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); | 1638 uTextureID_Optkb[2] = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE); |
1678 uTextureID_Optkb[3] = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE); | 1639 uTextureID_Optkb[3] = pIcons_LOD->LoadTexture("optkb_1", TEXTURE_16BIT_PALETTE); |
1679 uTextureID_Optkb[4] = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE); | 1640 uTextureID_Optkb[4] = pIcons_LOD->LoadTexture("optkb_2", TEXTURE_16BIT_PALETTE); |
1680 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_KeyMappingOptions, 0, 0); | 1641 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_KeyMappingOptions, 0, 0); |
1681 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0); | 1642 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0); |
1682 pGUIWindow_CurrentMenu->CreateButton(19u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, UIMSG_SelectKeyPage1, 0, 0, "", 0); | 1643 pGUIWindow_CurrentMenu->CreateButton(19u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, UIMSG_SelectKeyPage1, 0, 0, "", 0); |
1683 pGUIWindow_CurrentMenu->CreateButton(127u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, UIMSG_SelectKeyPage2, 0, 0, "", 0); | 1644 pGUIWindow_CurrentMenu->CreateButton(127u, 0x12Eu, 0x6Cu, 0x14u, 1, 0, UIMSG_SelectKeyPage2, 0, 0, "", 0); |
1684 pGUIWindow_CurrentMenu->CreateButton(127u, 0x144u, 0x6Cu, 0x14u, 1, 0, UIMSG_ResetKeyMapping, 0, 0, "", 0); | 1645 pGUIWindow_CurrentMenu->CreateButton(127u, 0x144u, 0x6Cu, 0x14u, 1, 0, UIMSG_ResetKeyMapping, 0, 0, "", 0); |
1685 pGUIWindow_CurrentMenu->CreateButton(19u, 0x144u, 0x6Cu, 0x14u, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0, "", 0); | 1646 pGUIWindow_CurrentMenu->CreateButton(19u, 0x144u, 0x6Cu, 0x14u, 1, 0, UIMSG_Game_OpenOptionsDialog, 0, 0, "", 0); |
1776 pTextureIDs_GammaPositions[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE); | 1737 pTextureIDs_GammaPositions[8] = pIcons_LOD->LoadTexture("convol90", TEXTURE_16BIT_PALETTE); |
1777 pTextureIDs_GammaPositions[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE); | 1738 pTextureIDs_GammaPositions[9] = pIcons_LOD->LoadTexture("convol00", TEXTURE_16BIT_PALETTE); |
1778 not_available_bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE); | 1739 not_available_bloodsplats_texture_id = pIcons_LOD->LoadTexture("opvdG-bs", TEXTURE_16BIT_PALETTE); |
1779 not_available_us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE); | 1740 not_available_us_colored_lights_texture_id = pIcons_LOD->LoadTexture("opvdG-cl", TEXTURE_16BIT_PALETTE); |
1780 not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE); | 1741 not_available_tinting_texture_id = pIcons_LOD->LoadTexture("opvdG-tn", TEXTURE_16BIT_PALETTE); |
1781 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_VideoOptions, 0, 0); | 1742 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_VideoOptions, 0, 0); |
1782 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0); | 1743 pGUIWindow_CurrentMenu->CreateButton(0xF1u, 0x12Eu, 0xD6u, 0x28u, 1, 0, UIMSG_Escape, 0, 0, "", 0); |
1783 //if ( pRenderer->pRenderD3D ) | 1744 //if ( pRenderer->pRenderD3D ) |
1784 { | 1745 { |
1785 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleBloodsplats, 0, 0, "", 0); | 1746 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x118u, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleBloodsplats, 0, 0, "", 0); |
1786 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleColoredLights, 0, 0, "", 0); | 1747 pGUIWindow_CurrentMenu->CreateButton(0x13u, 0x12Eu, 0xD6u, 0x12u, 1, 0, UIMSG_ToggleColoredLights, 0, 0, "", 0); |
1990 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1951 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
1991 if ( pCurrentScreen ) | 1952 if ( pCurrentScreen ) |
1992 pGUIWindow_CurrentMenu->Release(); | 1953 pGUIWindow_CurrentMenu->Release(); |
1993 pEventTimer->Pause(); | 1954 pEventTimer->Pause(); |
1994 pAudioPlayer->StopChannels(-1, -1); | 1955 pAudioPlayer->StopChannels(-1, -1); |
1995 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 1956 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0); |
1996 pBooksWindow = GUIWindow::Create(493u, 355u, 0, 0, WINDOW_BooksWindow, (int)pBtn_Quests, 0); | 1957 pBooksWindow = GUIWindow::Create(493u, 355u, 0, 0, WINDOW_BooksWindow, (int)pBtn_Quests, 0); |
1997 bFlashQuestBook = 0; | 1958 bFlashQuestBook = 0; |
1998 continue; | 1959 continue; |
1999 case UIMSG_OpenAutonotes: | 1960 case UIMSG_OpenAutonotes: |
2000 if ( pMessageQueue_50CBD0->uNumMessages ) | 1961 if ( pMessageQueue_50CBD0->uNumMessages ) |
2001 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1962 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2002 if ( pCurrentScreen ) | 1963 if ( pCurrentScreen ) |
2003 pGUIWindow_CurrentMenu->Release(); | 1964 pGUIWindow_CurrentMenu->Release(); |
2004 pEventTimer->Pause(); | 1965 pEventTimer->Pause(); |
2005 pAudioPlayer->StopChannels(-1, -1); | 1966 pAudioPlayer->StopChannels(-1, -1); |
2006 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0); | 1967 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0); |
2007 pBooksWindow = GUIWindow::Create(527u, 353u, 0, 0, WINDOW_BooksWindow, (int)pBtn_Autonotes, 0); | 1968 pBooksWindow = GUIWindow::Create(527u, 353u, 0, 0, WINDOW_BooksWindow, (int)pBtn_Autonotes, 0); |
2008 bFlashAutonotesBook = 0; | 1969 bFlashAutonotesBook = 0; |
2009 continue; | 1970 continue; |
2010 case UIMSG_OpenMapBook: | 1971 case UIMSG_OpenMapBook: |
2011 if ( pMessageQueue_50CBD0->uNumMessages ) | 1972 if ( pMessageQueue_50CBD0->uNumMessages ) |
2014 pGUIWindow_CurrentMenu->Release(); | 1975 pGUIWindow_CurrentMenu->Release(); |
2015 pEventTimer->Pause(); | 1976 pEventTimer->Pause(); |
2016 viewparams->sViewCenterX = pParty->vPosition.x; | 1977 viewparams->sViewCenterX = pParty->vPosition.x; |
2017 viewparams->sViewCenterY = pParty->vPosition.y; | 1978 viewparams->sViewCenterY = pParty->vPosition.y; |
2018 pAudioPlayer->StopChannels(-1, -1); | 1979 pAudioPlayer->StopChannels(-1, -1); |
2019 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 1980 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0); |
2020 pBooksWindow = GUIWindow::Create(546, 353, 0, 0, WINDOW_BooksWindow, (int)pBtn_Maps, 0); | 1981 pBooksWindow = GUIWindow::Create(546, 353, 0, 0, WINDOW_BooksWindow, (int)pBtn_Maps, 0); |
2021 continue; | 1982 continue; |
2022 case UIMSG_OpenCalendar: | 1983 case UIMSG_OpenCalendar: |
2023 if ( pMessageQueue_50CBD0->uNumMessages ) | 1984 if ( pMessageQueue_50CBD0->uNumMessages ) |
2024 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1985 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2025 if ( pCurrentScreen ) | 1986 if ( pCurrentScreen ) |
2026 pGUIWindow_CurrentMenu->Release(); | 1987 pGUIWindow_CurrentMenu->Release(); |
2027 pEventTimer->Pause(); | 1988 pEventTimer->Pause(); |
2028 pAudioPlayer->StopChannels(-1, -1); | 1989 pAudioPlayer->StopChannels(-1, -1); |
2029 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 1990 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0); |
2030 pBooksWindow = GUIWindow::Create(570, 354, 0, 0, WINDOW_BooksWindow, (int)pBtn_Calendar, 0); | 1991 pBooksWindow = GUIWindow::Create(570, 354, 0, 0, WINDOW_BooksWindow, (int)pBtn_Calendar, 0); |
2031 continue; | 1992 continue; |
2032 case UIMSG_OpenHistoryBook: | 1993 case UIMSG_OpenHistoryBook: |
2033 if ( pMessageQueue_50CBD0->uNumMessages ) | 1994 if ( pMessageQueue_50CBD0->uNumMessages ) |
2034 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 1995 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2035 if ( pCurrentScreen ) | 1996 if ( pCurrentScreen ) |
2036 pGUIWindow_CurrentMenu->Release(); | 1997 pGUIWindow_CurrentMenu->Release(); |
2037 pEventTimer->Pause(); | 1998 pEventTimer->Pause(); |
2038 pAudioPlayer->StopChannels(-1, -1); | 1999 pAudioPlayer->StopChannels(-1, -1); |
2039 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0); | 2000 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, uMessage, 0); |
2040 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, WINDOW_BooksWindow, (int)pBtn_History, 0); | 2001 pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, WINDOW_BooksWindow, (int)pBtn_History, 0); |
2041 bFlashHistoryBook = 0; | 2002 bFlashHistoryBook = 0; |
2042 continue; | 2003 continue; |
2043 case UIMSG_Escape:// нажатие Escape and return to game | 2004 case UIMSG_Escape:// нажатие Escape and return to game |
2044 back_to_game(); | 2005 back_to_game(); |
2081 { | 2042 { |
2082 pIcons_LOD->RemoveTexturesPackFromTextureList(); | 2043 pIcons_LOD->RemoveTexturesPackFromTextureList(); |
2083 if ( pGUIWindow_Settings ) | 2044 if ( pGUIWindow_Settings ) |
2084 { | 2045 { |
2085 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 2046 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2086 { | |
2087 pMouse->SetCursorBitmap("MICON2"); | 2047 pMouse->SetCursorBitmap("MICON2"); |
2088 } | |
2089 else | 2048 else |
2090 { | 2049 { |
2091 pGUIWindow_Settings->Release(); | 2050 pGUIWindow_Settings->Release(); |
2092 pGUIWindow_Settings = 0; | 2051 pGUIWindow_Settings = 0; |
2093 pMouse->SetCursorBitmap("MICON1"); | 2052 pMouse->SetCursorBitmap("MICON1"); |
2134 _50C9A8_item_enchantment_timer = 0; | 2093 _50C9A8_item_enchantment_timer = 0; |
2135 ptr_50C9A4_ItemToEnchant = 0; | 2094 ptr_50C9A4_ItemToEnchant = 0; |
2136 } | 2095 } |
2137 if ( pGUIWindow_Settings ) | 2096 if ( pGUIWindow_Settings ) |
2138 { | 2097 { |
2139 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 2098 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2140 { | 2099 pMouse->SetCursorBitmap("MICON2"); |
2141 pMouse->SetCursorBitmap("MICON2"); | 2100 else |
2142 } | 2101 { |
2143 else | 2102 pGUIWindow_Settings->Release(); |
2144 { | 2103 pGUIWindow_Settings = 0; |
2145 pGUIWindow_Settings->Release(); | 2104 pMouse->SetCursorBitmap("MICON1"); |
2146 pGUIWindow_Settings = 0; | 2105 GameUI_Footer_TimeLeft = 0; |
2147 pMouse->SetCursorBitmap("MICON1"); | 2106 _50C9A0_IsEnchantingInProgress = 0; |
2148 GameUI_Footer_TimeLeft = 0; | 2107 back_to_game(); |
2149 _50C9A0_IsEnchantingInProgress = 0; | |
2150 back_to_game(); | |
2151 } | 2108 } |
2152 } | 2109 } |
2153 if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 ) | 2110 if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 ) |
2154 uActiveCharacter = pParty->GetNextActiveCharacter(); | 2111 uActiveCharacter = pParty->GetNextActiveCharacter(); |
2155 pGUIWindow_CurrentMenu->Release(); | 2112 pGUIWindow_CurrentMenu->Release(); |
2167 pBooksWindow = 0; | 2124 pBooksWindow = 0; |
2168 pEventTimer->Resume(); | 2125 pEventTimer->Resume(); |
2169 if ( pGUIWindow_Settings ) | 2126 if ( pGUIWindow_Settings ) |
2170 { | 2127 { |
2171 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 2128 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2172 { | 2129 pMouse->SetCursorBitmap("MICON2"); |
2173 pMouse->SetCursorBitmap("MICON2"); | |
2174 } | |
2175 else | 2130 else |
2176 { | 2131 { |
2177 pGUIWindow_Settings->Release(); | 2132 pGUIWindow_Settings->Release(); |
2178 pGUIWindow_Settings = 0; | 2133 pGUIWindow_Settings = 0; |
2179 pMouse->SetCursorBitmap("MICON1"); | 2134 pMouse->SetCursorBitmap("MICON1"); |
2180 GameUI_Footer_TimeLeft = 0; | 2135 GameUI_Footer_TimeLeft = 0; |
2181 _50C9A0_IsEnchantingInProgress = 0; | 2136 _50C9A0_IsEnchantingInProgress = 0; |
2182 back_to_game(); | 2137 back_to_game(); |
2183 } | 2138 } |
2184 } | 2139 } |
2185 if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 ) | 2140 if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 ) |
2186 uActiveCharacter = pParty->GetNextActiveCharacter(); | 2141 uActiveCharacter = pParty->GetNextActiveCharacter(); |
2187 pGUIWindow_CurrentMenu->Release(); | 2142 pGUIWindow_CurrentMenu->Release(); |
2288 } | 2243 } |
2289 while ( thisb < (signed int)0x00507C08 ); | 2244 while ( thisb < (signed int)0x00507C08 ); |
2290 | 2245 |
2291 memset(&uTextureID_Optkb, 0, 0x14u); | 2246 memset(&uTextureID_Optkb, 0, 0x14u); |
2292 pIcons_LOD->SyncLoadedFilesCount(); | 2247 pIcons_LOD->SyncLoadedFilesCount(); |
2293 uAction = 0; | 2248 for ( uAction = 0; uAction < 28; ++uAction ) |
2294 do | |
2295 { | 2249 { |
2296 v33 = pKeyActionMap->GetActionVKey((enum InputAction)uAction); | 2250 v33 = pKeyActionMap->GetActionVKey((enum InputAction)uAction); |
2297 if ( v33 != pPrevVirtualCidesMapping[uAction] ) | 2251 if ( v33 != pPrevVirtualCidesMapping[uAction] ) |
2298 { | 2252 { |
2299 if ( v197 ) | 2253 if ( v197 ) |
2311 if ( uAction && uAction != 2 && uAction != 3 && uAction != 1 && uAction != 25 && uAction != 26 ) | 2265 if ( uAction && uAction != 2 && uAction != 3 && uAction != 1 && uAction != 25 && uAction != 26 ) |
2312 pKeyToggleType = TOGGLE_OneTimePress; | 2266 pKeyToggleType = TOGGLE_OneTimePress; |
2313 else | 2267 else |
2314 pKeyToggleType = TOGGLE_Continuously; | 2268 pKeyToggleType = TOGGLE_Continuously; |
2315 pKeyActionMap->SetKeyMapping(uAction, pPrevVirtualCidesMapping[uAction], pKeyToggleType); | 2269 pKeyActionMap->SetKeyMapping(uAction, pPrevVirtualCidesMapping[uAction], pKeyToggleType); |
2316 ++uAction; | |
2317 } | 2270 } |
2318 while ( uAction < 28 ); | |
2319 pKeyActionMap->StoreMappings(); | 2271 pKeyActionMap->StoreMappings(); |
2320 stru_506E40.Release(); | 2272 stru_506E40.Release(); |
2321 break; | 2273 break; |
2322 } | 2274 } |
2323 } | 2275 } |
2345 _506F18_num_minutes_to_sleep = 0; | 2297 _506F18_num_minutes_to_sleep = 0; |
2346 dword_506F14 = 0; | 2298 dword_506F14 = 0; |
2347 if ( pGUIWindow_Settings ) | 2299 if ( pGUIWindow_Settings ) |
2348 { | 2300 { |
2349 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 2301 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2350 { | |
2351 pMouse->SetCursorBitmap("MICON2"); | 2302 pMouse->SetCursorBitmap("MICON2"); |
2352 } | |
2353 else | 2303 else |
2354 { | 2304 { |
2355 pGUIWindow_Settings->Release(); | 2305 pGUIWindow_Settings->Release(); |
2356 pGUIWindow_Settings = 0; | 2306 pGUIWindow_Settings = 0; |
2357 pMouse->SetCursorBitmap("MICON1"); | 2307 pMouse->SetCursorBitmap("MICON1"); |
2358 GameUI_Footer_TimeLeft = 0; | 2308 GameUI_Footer_TimeLeft = 0; |
2359 _50C9A0_IsEnchantingInProgress = 0; | 2309 _50C9A0_IsEnchantingInProgress = 0; |
2360 back_to_game(); | 2310 back_to_game(); |
2361 } | 2311 } |
2362 } | 2312 } |
2363 if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 ) | 2313 if ( (signed int)uActiveCharacter < 1 || (signed int)uActiveCharacter > 4 ) |
2364 uActiveCharacter = pParty->GetNextActiveCharacter(); | 2314 uActiveCharacter = pParty->GetNextActiveCharacter(); |
2365 pGUIWindow_CurrentMenu->Release(); | 2315 pGUIWindow_CurrentMenu->Release(); |
2366 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse ) | 2316 if ( pGUIWindow_CurrentMenu == window_SpeakInHouse ) |
2395 pVideoPlayer->Unload(); | 2345 pVideoPlayer->Unload(); |
2396 pGUIWindow_CurrentMenu = window_SpeakInHouse; | 2346 pGUIWindow_CurrentMenu = window_SpeakInHouse; |
2397 if ( pGUIWindow_Settings ) | 2347 if ( pGUIWindow_Settings ) |
2398 { | 2348 { |
2399 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 2349 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2400 { | |
2401 pMouse->SetCursorBitmap("MICON2"); | 2350 pMouse->SetCursorBitmap("MICON2"); |
2402 } | |
2403 else | 2351 else |
2404 { | 2352 { |
2405 pGUIWindow_Settings->Release(); | 2353 pGUIWindow_Settings->Release(); |
2406 pGUIWindow_Settings = 0; | 2354 pGUIWindow_Settings = 0; |
2407 pMouse->SetCursorBitmap("MICON1"); | 2355 pMouse->SetCursorBitmap("MICON1"); |
2479 ReleaseAwardsScrollBar(); | 2427 ReleaseAwardsScrollBar(); |
2480 pIcons_LOD->RemoveTexturesPackFromTextureList(); | 2428 pIcons_LOD->RemoveTexturesPackFromTextureList(); |
2481 if ( pGUIWindow_Settings ) | 2429 if ( pGUIWindow_Settings ) |
2482 { | 2430 { |
2483 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 2431 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2484 { | |
2485 pMouse->SetCursorBitmap("MICON2"); | 2432 pMouse->SetCursorBitmap("MICON2"); |
2486 } | |
2487 else | 2433 else |
2488 { | 2434 { |
2489 pGUIWindow_Settings->Release(); | 2435 pGUIWindow_Settings->Release(); |
2490 pGUIWindow_Settings = 0; | 2436 pGUIWindow_Settings = 0; |
2491 pMouse->SetCursorBitmap("MICON1"); | 2437 pMouse->SetCursorBitmap("MICON1"); |
2507 continue; | 2453 continue; |
2508 default: | 2454 default: |
2509 if ( pGUIWindow_Settings ) | 2455 if ( pGUIWindow_Settings ) |
2510 { | 2456 { |
2511 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 2457 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2512 { | |
2513 pMouse->SetCursorBitmap("MICON2"); | 2458 pMouse->SetCursorBitmap("MICON2"); |
2514 } | |
2515 else | 2459 else |
2516 { | 2460 { |
2517 pGUIWindow_Settings->Release(); | 2461 pGUIWindow_Settings->Release(); |
2518 pGUIWindow_Settings = 0; | 2462 pGUIWindow_Settings = 0; |
2519 pMouse->SetCursorBitmap("MICON1"); | 2463 pMouse->SetCursorBitmap("MICON1"); |
2535 continue; | 2479 continue; |
2536 } | 2480 } |
2537 if ( pGUIWindow_Settings ) | 2481 if ( pGUIWindow_Settings ) |
2538 { | 2482 { |
2539 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 2483 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2540 { | |
2541 pMouse->SetCursorBitmap("MICON2"); | 2484 pMouse->SetCursorBitmap("MICON2"); |
2542 } | |
2543 else | 2485 else |
2544 { | 2486 { |
2545 pGUIWindow_Settings->Release(); | 2487 pGUIWindow_Settings->Release(); |
2546 pGUIWindow_Settings = 0; | 2488 pGUIWindow_Settings = 0; |
2547 pMouse->SetCursorBitmap("MICON1"); | 2489 pMouse->SetCursorBitmap("MICON1"); |
2567 pIcons_LOD->RemoveTexturesPackFromTextureList(); | 2509 pIcons_LOD->RemoveTexturesPackFromTextureList(); |
2568 } | 2510 } |
2569 if ( pGUIWindow_Settings ) | 2511 if ( pGUIWindow_Settings ) |
2570 { | 2512 { |
2571 if ( pCurrentScreen == SCREEN_CHARACTERS ) | 2513 if ( pCurrentScreen == SCREEN_CHARACTERS ) |
2572 { | |
2573 pMouse->SetCursorBitmap("MICON2"); | 2514 pMouse->SetCursorBitmap("MICON2"); |
2574 } | |
2575 else | 2515 else |
2576 { | 2516 { |
2577 pGUIWindow_Settings->Release(); | 2517 pGUIWindow_Settings->Release(); |
2578 pGUIWindow_Settings = 0; | 2518 pGUIWindow_Settings = 0; |
2579 pMouse->SetCursorBitmap("MICON1"); | 2519 pMouse->SetCursorBitmap("MICON1"); |
2604 | 2544 |
2605 ++pIcons_LOD->uTexturePacksCount; | 2545 ++pIcons_LOD->uTexturePacksCount; |
2606 if ( !pIcons_LOD->uNumPrevLoadedFiles ) | 2546 if ( !pIcons_LOD->uNumPrevLoadedFiles ) |
2607 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; | 2547 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles; |
2608 | 2548 |
2609 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_OptionsButtons, 0, 0); | 2549 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_OptionsButtons, 0, 0); |
2610 uTextureID_Options = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); | 2550 uTextureID_Options = pIcons_LOD->LoadTexture("options", TEXTURE_16BIT_PALETTE); |
2611 uTextureID_New1 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); | 2551 uTextureID_New1 = pIcons_LOD->LoadTexture("new1", TEXTURE_16BIT_PALETTE); |
2612 uTextureID_Load1 = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE); | 2552 uTextureID_Load1 = pIcons_LOD->LoadTexture("load1", TEXTURE_16BIT_PALETTE); |
2613 uTextureID_Save1 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE); | 2553 uTextureID_Save1 = pIcons_LOD->LoadTexture("save1", TEXTURE_16BIT_PALETTE); |
2614 uTextureID_Controls1 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE); | 2554 uTextureID_Controls1 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE); |
3022 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 2962 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); |
3023 continue; | 2963 continue; |
3024 | 2964 |
3025 case UIMSG_OnCastTownPortal: | 2965 case UIMSG_OnCastTownPortal: |
3026 pAudioPlayer->StopChannels(-1, -1); | 2966 pAudioPlayer->StopChannels(-1, -1); |
3027 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, WINDOW_TownPortal, (char *)uMessageParam); | 2967 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, WINDOW_TownPortal, (char *)uMessageParam); |
3028 continue; | 2968 continue; |
3029 | 2969 |
3030 case UIMSG_OnCastLloydsBeacon: | 2970 case UIMSG_OnCastLloydsBeacon: |
3031 pAudioPlayer->StopChannels(-1, -1); | 2971 pAudioPlayer->StopChannels(-1, -1); |
3032 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, WINDOW_LloydsBeacon, 0); | 2972 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_Book, WINDOW_LloydsBeacon, 0); |
3033 continue; | 2973 continue; |
3034 | 2974 |
3035 case UIMSG_LloydsBeacon_FlippingBtn: | 2975 case UIMSG_LloydsBeacon_FlippingBtn: |
3036 bRecallingBeacon = uMessageParam; | 2976 bRecallingBeacon = uMessageParam; |
3037 v127 = uMessageParam + 204; | 2977 v127 = uMessageParam + 204; |
3471 continue; | 3411 continue; |
3472 case UIMSG_1C: | 3412 case UIMSG_1C: |
3473 __debugbreak(); | 3413 __debugbreak(); |
3474 if ( !uActiveCharacter || pCurrentScreen ) | 3414 if ( !uActiveCharacter || pCurrentScreen ) |
3475 continue; | 3415 continue; |
3476 ptr_507BC8 = GUIWindow::Create(0, 0, 640, 480, WINDOW_68, uMessageParam, 0); | 3416 ptr_507BC8 = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_68, uMessageParam, 0); |
3477 pCurrentScreen = SCREEN_19; | 3417 pCurrentScreen = SCREEN_19; |
3478 pEventTimer->Pause(); | 3418 pEventTimer->Pause(); |
3479 continue; | 3419 continue; |
3480 case UIMSG_STEALFROMACTOR: | 3420 case UIMSG_STEALFROMACTOR: |
3481 if ( !uActiveCharacter ) | 3421 if ( !uActiveCharacter ) |
3843 if ( pCurrentScreen == SCREEN_GAME ) | 3783 if ( pCurrentScreen == SCREEN_GAME ) |
3844 { | 3784 { |
3845 GUIWindow::Create(476, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0); | 3785 GUIWindow::Create(476, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0); |
3846 pCurrentScreen = SCREEN_SPELL_BOOK; | 3786 pCurrentScreen = SCREEN_SPELL_BOOK; |
3847 pEventTimer->Pause(); | 3787 pEventTimer->Pause(); |
3848 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); | 3788 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_SpellBook, 0, 0); |
3849 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); | 3789 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); |
3850 viewparams->field_48 = 1; | 3790 viewparams->field_48 = 1; |
3851 continue; | 3791 continue; |
3852 } | 3792 } |
3853 if ( pCurrentScreen != SCREEN_REST && pCurrentScreen != SCREEN_CHARACTERS | 3793 if ( pCurrentScreen != SCREEN_REST && pCurrentScreen != SCREEN_CHARACTERS |
3855 { | 3795 { |
3856 pGUIWindow_CurrentMenu->Release(); | 3796 pGUIWindow_CurrentMenu->Release(); |
3857 GUIWindow::Create(476, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0); | 3797 GUIWindow::Create(476, 450, 0, 0, WINDOW_PressedButton2, (int)pBtn_CastSpell, 0); |
3858 pCurrentScreen = SCREEN_SPELL_BOOK; | 3798 pCurrentScreen = SCREEN_SPELL_BOOK; |
3859 pEventTimer->Pause(); | 3799 pEventTimer->Pause(); |
3860 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_SpellBook, 0, 0); | 3800 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_SpellBook, 0, 0); |
3861 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); | 3801 pAudioPlayer->PlaySound((SoundID)48, 0, 0, -1, 0, 0, 0, 0); |
3862 viewparams->field_48 = 1; | 3802 viewparams->field_48 = 1; |
3863 continue; | 3803 continue; |
3864 } | 3804 } |
3865 } | 3805 } |
3876 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_QuickReference, 0); | 3816 GUIWindow::Create(0x230u, 0x1C2u, 0, 0, WINDOW_PressedButton2, (int)pBtn_QuickReference, 0); |
3877 viewparams->bRedrawGameUI = 1; | 3817 viewparams->bRedrawGameUI = 1; |
3878 pEventTimer->Pause(); | 3818 pEventTimer->Pause(); |
3879 pAudioPlayer->StopChannels(-1, -1); | 3819 pAudioPlayer->StopChannels(-1, -1); |
3880 pCurrentScreen = SCREEN_QUICK_REFERENCE; | 3820 pCurrentScreen = SCREEN_QUICK_REFERENCE; |
3881 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_QuickReference, 5, 0); | 3821 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_QuickReference, 5, 0); |
3882 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); | 3822 papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE); |
3883 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, 1, 0, UIMSG_Escape, 0, 0, | 3823 pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(0x187u, 0x13Cu, 0x4Bu, 0x21u, 1, 0, UIMSG_Escape, 0, 0, |
3884 pGlobalTXT_LocalizationStrings[79],// "Exit" | 3824 pGlobalTXT_LocalizationStrings[79],// "Exit" |
3885 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); //, v179); | 3825 pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0); //, v179); |
3886 continue; | 3826 continue; |