diff Game.cpp @ 2450:90349b8048a5

remove VideoPlayer.cpp/.h
author Ritor1
date Fri, 25 Jul 2014 14:17:57 +0600
parents b10125a9c772
children 2a8010d99cf8
line wrap: on
line diff
--- a/Game.cpp	Thu Jul 24 12:50:24 2014 +0600
+++ b/Game.cpp	Fri Jul 25 14:17:57 2014 +0600
@@ -29,7 +29,6 @@
 #include "LOD.h"
 #include "GUIWindow.h"
 #include "TurnEngine.h"
-#include "VideoPlayer.h"
 #include "Bink_Smacker.h"
 #include "Events.h"
 #include "Arcomage.h"
@@ -353,7 +352,7 @@
         continue;
       }
 
-      pVideoPlayer->_inlined_in_463149();
+      pMediaPlayer->HouseMovieLoop();
       
       pEventTimer->Update();
       pMiscTimer->Update();
@@ -428,9 +427,10 @@
           if ( pNPCStats->pNewNPCData[i].field_24 )
             pNPCStats->pNewNPCData[i].uFlags &= 0xFFFFFF7Fu;
         }
-        pVideoPlayer->PlayDeathMovie();
+        pMediaPlayer->bStopBeforeSchedule = 0;
+        PlayFullscreenMovie(MOVIE_Death, true);
         if ( pMovie_Track )
-          pVideoPlayer->Unload();
+          pMediaPlayer->Unload();
         SaveGame(0, 0);
         ++pParty->uNumDeaths;
         for ( uint i = 0; i < 4; ++i )
@@ -1240,7 +1240,7 @@
           uGameState = GAME_FINISHED;
           continue;
         case UIMSG_PlayArcomage:
-          pVideoPlayer->_4BF5B2();
+          pMediaPlayer->_4BF5B2();
           pArcomageGame->bGameInProgress = 1;
           ArcomageGame::PrepareArcomage();
           continue;
@@ -1693,8 +1693,8 @@
         case UIMSG_ToggleTint:
           pRenderer->ToggleTint();
           continue;
-        case UIMSG_ChangeMusicVolume:  //громкость музыки
-          if ( uMessageParam == 4 )//кнопка понижения
+        case UIMSG_ChangeMusicVolume:
+          if ( uMessageParam == 4 )//-
           {
             --uMusicVolimeMultiplier;
             if ( (char)uMusicVolimeMultiplier < 1 )
@@ -1705,7 +1705,7 @@
             pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f);
             continue;
           }
-          if ( uMessageParam == 5 )//кнопка повышения
+          if ( uMessageParam == 5 )//+
           {
             ++uMusicVolimeMultiplier;
             if ( (char)uMusicVolimeMultiplier > 9 )
@@ -1716,7 +1716,7 @@
             pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f);
             continue;
           }
-          uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17;//для задания громкости мышкой
+          uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17;//for mouse
           if ( (char)uMusicVolimeMultiplier > 9 )
             uMusicVolimeMultiplier = 9;
           if ( uMusicVolimeMultiplier )
@@ -2152,7 +2152,7 @@
                         stru_506E40.Release();
                         break;
                       }
-					  pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0);
+                      pAudioPlayer->PlaySound((SoundID)27, 0, 0, -1, 0, 0, 0, 0);
                       break;
                     case SCREEN_REST://close rest screen
                       if ( dword_506F14 )
@@ -2222,7 +2222,7 @@
                       }
                       GetHouseGoodbyeSpeech();
                       pAudioPlayer->PlaySound(SOUND_7, 814, 0, -1, 0, 0, 0, 0);
-                      pVideoPlayer->Unload();
+                      pMediaPlayer->Unload();
                       pGUIWindow_CurrentMenu = window_SpeakInHouse;
                       if ( pGUIWindow_Settings )
                       {
@@ -2252,7 +2252,7 @@
                     case SCREEN_INPUT_BLV://click escape
                       if ( uCurrentHouse_Animation == 153 )
                         PlayHouseSound(0x99u, HouseSound_Greeting_2);
-                      pVideoPlayer->Unload();
+                      pMediaPlayer->Unload();
                       if ( npcIdToDismissAfterDialogue )
                       {
                         pParty->hirelingScrollPosition = 0;
@@ -2300,7 +2300,7 @@
                       viewparams->bRedrawGameUI = true;
                       continue;
                     case SCREEN_VIDEO:
-                      pVideoPlayer->Unload();
+                      pMediaPlayer->Unload();
                       continue;
                     case SCREEN_CHARACTERS:
                       CharacterUI_ReleaseButtons();
@@ -2502,8 +2502,8 @@
           sub_42FBDD();
           PlayHouseSound(uCurrentHouse_Animation, HouseSound_NotEnoughMoney_TrainingSuccessful);
 
-          if (pVideoPlayer->AnyMovieLoaded())
-            pVideoPlayer->Unload();
+          if (pMovie_Track)
+            pMediaPlayer->Unload();
           DialogueEnding();
           viewparams->bRedrawGameUI = true;
           if ( dword_59117C_teleportx | dword_591178_teleporty | dword_591174_teleportz | dword_591170_teleport_directiony | dword_59116C_teleport_directionx | dword_591168_teleport_speedz )
@@ -2554,7 +2554,7 @@
           continue;
         case UIMSG_TransitionWindowCloseBtn:
           CloseWindowBackground();
-          pVideoPlayer->Unload();
+          pMediaPlayer->Unload();
           DialogueEnding();
           viewparams->bRedrawGameUI = true;
           continue;
@@ -4367,7 +4367,7 @@
           if ( !(dword_6BE364_game_settings_1 & GAME_SETTINGS_4000))
             break;
           v15 = 1;
-          pVideoPlayer->bStopBeforeSchedule = 1;
+          pMediaPlayer->bStopBeforeSchedule = 1;
           viewparams->bRedrawGameUI = 1;
           viewparams->field_48 = 1;
           if ( GetCurrentMenuID() == MENU_MAIN || GetCurrentMenuID() == MENU_MMT_MAIN_MENU