diff Engine/Graphics/Render.cpp @ 2544:c674d547cc7c

GUIWindow switch logic refactored into behaviour classes
author a.parshin
date Mon, 11 May 2015 09:51:04 +0200
parents b6140dfeac27
children 67d837007a4c 6ab1273bc507
line wrap: on
line diff
--- a/Engine/Graphics/Render.cpp	Sun May 10 03:21:14 2015 +0200
+++ b/Engine/Graphics/Render.cpp	Mon May 11 09:51:04 2015 +0200
@@ -7810,121 +7810,6 @@
   }
 }
 
-//----- (004667E9) --------------------------------------------------------
-void Render::ChangeBetweenWinFullscreenModes()
-{
-  float v0; // ST14_4@17
-  int v4; // edx@26
-  ObjectDesc *v5; // eax@26
-  RGBTexture *v6; // esi@33
-  const char *v8; // [sp-4h] [bp-28h]@33
-//  struct tagRECT Rect; // [sp+14h] [bp-10h]@15
-
-  /*if ( !pRenderer->bWindowMode && (dword_6BE364_game_settings_1 & 2) )
-  {
-    ModalWindow(pGlobalTXT_LocalizationStrings[62], UIMSG_0);// "Might and Magic VII requires your desktop to be in 16bit (32k or 65k) Color mode in order to operate in a window."
-    return;
-  }*/
-  if ( bWindowMode || pRenderD3D->pAvailableDevices->bIsDeviceCompatible )
-  {
-    if ( pEventTimer->bPaused )
-      dword_6BE364_game_settings_1 |= GAME_SETTINGS_0800;
-    else
-      pEventTimer->Pause();
-    if ( pMiscTimer->bPaused )
-      dword_6BE364_game_settings_1 |= GAME_SETTINGS_1000;
-    else
-      pMiscTimer->Pause();
-    pMouse->bActive = 0;
-    if ( pRenderD3D )
-    {
-      pBitmaps_LOD->ReleaseHardwareTextures();
-      pSprites_LOD->ReleaseAll();
-    }
-    if ( bWindowMode )
-    {
-      //SetMenu(hWnd, 0);
-      //SetWindowLongA(hWnd, -20, 0);
-      //SetWindowLongA(hWnd, -16, 0x10000000u);
-      window->SetFullscreenMode();
-      pRenderer->InitializeFullscreen();
-    }
-    else
-    {
-      //ClipCursor(0);
-      window->SetWindowedMode(window->GetWidth(), window->GetHeight());
-      pRenderer->SwitchToWindow();
-    }
-    if ( pRenderD3D )
-    {
-      pBitmaps_LOD->_410423_move_textures_to_device();
-      pSprites_LOD->MoveSpritesToVideoMemory();
-    }
-    if (!( pPaletteManager->uNumTargetBBits == uTargetBBits
-      && pPaletteManager->uNumTargetGBits == uTargetGBits
-      && pPaletteManager->uNumTargetRBits == uTargetRBits ))
-    {
-      pPaletteManager->SetColorChannelInfo(uTargetRBits, uTargetGBits, uTargetBBits);
-      pPaletteManager->RecalculateAll();
-      pBitmaps_LOD->SetupPalettes(uTargetRBits, uTargetGBits, uTargetBBits);
-      pIcons_LOD->SetupPalettes(uTargetRBits, uTargetGBits, uTargetBBits);
-      for (uint i = 0; i < pObjectList->uNumObjects; i++)
-      {
-        BYTE3(v4) = 0;
-        v5 = &pObjectList->pObjects[i];
-        *(short *)((char *)&v4 + 1) = v5->uParticleTrailColorR;
-        LOBYTE(v4) = v5->uParticleTrailColorG;
-        v5->uParticleTrailColor = v5->uParticleTrailColorB | (v4 << 8);
-      }
-      SetUserInterface(pParty->alignment, true);
-      if ( pMediaPlayer->pVideoFrame.pPixels )
-        pMediaPlayer->pVideoFrame.Load(pMediaPlayer->pVideoFrameTextureFilename, 1);
-      if ( sCurrentMenuID != MENU_CREATEPARTY )
-      {
-        if ( sCurrentMenuID == MENU_CREDITSPROC )
-          dword_A74C88 = 1; 
-      }
-      else
-      {
-        if ( sCurrentMenuID )
-        {
-          v6 = &pTexture_PCX;
-          pTexture_PCX.Release();
-          v8 = "makeme.pcx";
-        }
-        else
-        {
-          v6 = &pTexture_PCX;
-          pTexture_PCX.Release();
-          v8 = "title.pcx";
-          if ( sCurrentMenuID )
-            v8 = "lsave640.pcx";
-        }
-        v6->Load(v8, 0);
-      }
-    }
-    viewparams->bRedrawGameUI = 1;
-    viewparams->InitGrayPalette();
-    pMouse->SetCurrentCursorBitmap();
-    /*if ( pRenderer->bWindowMode )
-    {
-      //MoveWindow(hWnd, uWindowX, uWindowY, uWindowWidth, uWindowHeight, 0);
-      CenterWindowAndAdjustSize(hWnd, windowed_mode_width, windowed_mode_height);
-      ShowWindow(hWnd, SW_SHOWNORMAL);
-    }*/
-    pMouse->bActive = true;
-    if ( pMovie_Track )
-      pMediaPlayer->SelectMovieType();
-    if (dword_6BE364_game_settings_1 & GAME_SETTINGS_0800)
-      dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_0800;
-    else
-      pEventTimer->Resume();
-    if (dword_6BE364_game_settings_1 & GAME_SETTINGS_1000)
-      dword_6BE364_game_settings_1 &= ~GAME_SETTINGS_1000;
-    else
-      pMiscTimer->Resume();
-  }
-}
 
 
 //----- (004524D8) --------------------------------------------------------