Mercurial > mm7
comparison mm7_2.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 |
---|---|
254 int i; // eax@2 | 254 int i; // eax@2 |
255 int rand_monster_id; // edx@3 | 255 int rand_monster_id; // edx@3 |
256 | 256 |
257 uDialogueType = 83; | 257 uDialogueType = 83; |
258 pDialogueWindow->Release(); | 258 pDialogueWindow->Release(); |
259 pDialogueWindow = GUIWindow::Create(0, 0, 640, 350, WINDOW_MainMenu, 0, 0); | 259 pDialogueWindow = GUIWindow::Create(0, 0, window->GetWidth(), 350, WINDOW_MainMenu, 0, 0); |
260 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34],// "Cancel" | 260 pBtn_ExitCancel = pDialogueWindow->CreateButton(471, 445, 169, 35, 1, 0, UIMSG_Escape, 0, 0, pGlobalTXT_LocalizationStrings[34],// "Cancel" |
261 pIcons_LOD->GetTexture(uExitCancelTextureId), 0); | 261 pIcons_LOD->GetTexture(uExitCancelTextureId), 0); |
262 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); | 262 pDialogueWindow->CreateButton(0, 0, 0, 0, 1, 0, UIMSG_BuyInShop_Identify_Repair, 0, 0, "", 0); |
263 pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_0, 83, 0, "", 0); | 263 pDialogueWindow->CreateButton(480, 160, 140, 30, 1, 0, UIMSG_0, 83, 0, "", 0); |
264 pDialogueWindow->_41D08F_set_keyboard_control_group(1, 1, 0, 2); | 264 pDialogueWindow->_41D08F_set_keyboard_control_group(1, 1, 0, 2); |
728 pRenderer->BeginScene(); | 728 pRenderer->BeginScene(); |
729 pRenderer->DrawTextureRGB(0, 0, &_this); | 729 pRenderer->DrawTextureRGB(0, 0, &_this); |
730 pRenderer->EndScene(); | 730 pRenderer->EndScene(); |
731 free(_this.pPixels); | 731 free(_this.pPixels); |
732 _this.pPixels = 0; | 732 _this.pPixels = 0; |
733 window_SpeakInHouse = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); | 733 window_SpeakInHouse = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_MainMenu, 0, 0); |
734 pWindow.uFrameX = 75; | 734 pWindow.uFrameX = 75; |
735 pWindow.uFrameY = 60; | 735 pWindow.uFrameY = 60; |
736 pWindow.uFrameWidth = 469; | 736 pWindow.uFrameWidth = 469; |
737 pWindow.uFrameHeight = 338; | 737 pWindow.uFrameHeight = 338; |
738 pWindow.uFrameZ = 543; | 738 pWindow.uFrameZ = 543; |
2864 pAudioPlayer->StopChannels(-1, -1); | 2864 pAudioPlayer->StopChannels(-1, -1); |
2865 pMouse->RemoveHoldingItem(); | 2865 pMouse->RemoveHoldingItem(); |
2866 | 2866 |
2867 pIcons_LOD->_inlined_sub2(); | 2867 pIcons_LOD->_inlined_sub2(); |
2868 | 2868 |
2869 pWindow_MainMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); | 2869 pWindow_MainMenu = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_MainMenu, 0, 0); |
2870 Texture* pNew = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE); | 2870 Texture* pNew = pIcons_LOD->LoadTexturePtr("title_new", TEXTURE_16BIT_PALETTE); |
2871 Texture* pLoad = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE); | 2871 Texture* pLoad = pIcons_LOD->LoadTexturePtr("title_load", TEXTURE_16BIT_PALETTE); |
2872 Texture* pCredits = pIcons_LOD->LoadTexturePtr("title_cred", TEXTURE_16BIT_PALETTE); | 2872 Texture* pCredits = pIcons_LOD->LoadTexturePtr("title_cred", TEXTURE_16BIT_PALETTE); |
2873 Texture* pExit = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE); | 2873 Texture* pExit = pIcons_LOD->LoadTexturePtr("title_exit", TEXTURE_16BIT_PALETTE); |
2874 | 2874 |
2891 { | 2891 { |
2892 if ( pCurrentScreen != SCREEN_LOADGAME ) | 2892 if ( pCurrentScreen != SCREEN_LOADGAME ) |
2893 { | 2893 { |
2894 pTexture_PCX.Release(); | 2894 pTexture_PCX.Release(); |
2895 pTexture_PCX.Load("lsave640.pcx", 0); | 2895 pTexture_PCX.Load("lsave640.pcx", 0); |
2896 pGUIWindow2 = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); | 2896 pGUIWindow2 = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_MainMenu, 0, 0); |
2897 pCurrentScreen = SCREEN_LOADGAME; | 2897 pCurrentScreen = SCREEN_LOADGAME; |
2898 LoadUI_Load(0); | 2898 LoadUI_Load(0); |
2899 } | 2899 } |
2900 pWindow = pGUIWindow_CurrentMenu; | 2900 pWindow = pGUIWindow_CurrentMenu; |
2901 } | 2901 } |
4155 uCPUSpeed = Rect.bottom;*/ | 4155 uCPUSpeed = Rect.bottom;*/ |
4156 uCPUSpeed = 2048; // about 2GHz | 4156 uCPUSpeed = 2048; // about 2GHz |
4157 | 4157 |
4158 constructors(); | 4158 constructors(); |
4159 | 4159 |
4160 if (!MM7_Initialize(640, 480)) | 4160 if (!MM7_Initialize(640, 480))//задаётся размер окна |
4161 { | 4161 { |
4162 Log::Warning(L"MM init: failed"); | 4162 Log::Warning(L"MM init: failed"); |
4163 pGame->Deinitialize(); | 4163 pGame->Deinitialize(); |
4164 return 1; | 4164 return 1; |
4165 } | 4165 } |
4449 pODMRenderParams->outdoor_grid_band_3 = outdoor_grid_band_3; | 4449 pODMRenderParams->outdoor_grid_band_3 = outdoor_grid_band_3; |
4450 pODMRenderParams->uPickDepth = outdoor_grid_band_3 * 512; | 4450 pODMRenderParams->uPickDepth = outdoor_grid_band_3 * 512; |
4451 } | 4451 } |
4452 } | 4452 } |
4453 else | 4453 else |
4454 { | |
4455 LOBYTE(viewparams->field_20) = 0; | 4454 LOBYTE(viewparams->field_20) = 0; |
4456 } | |
4457 pParty->uFlags |= 2; | 4455 pParty->uFlags |= 2; |
4458 viewparams->uSomeY = viewparams->uScreen_topL_Y; | 4456 viewparams->uSomeY = viewparams->uScreen_topL_Y; |
4459 viewparams->uSomeX = viewparams->uScreen_topL_X; | 4457 viewparams->uSomeX = viewparams->uScreen_topL_X; |
4460 viewparams->uSomeZ = viewparams->uScreen_BttmR_X; | 4458 viewparams->uSomeZ = viewparams->uScreen_BttmR_X; |
4461 viewparams->uSomeW = viewparams->uScreen_BttmR_Y; | 4459 viewparams->uSomeW = viewparams->uScreen_BttmR_Y; |