# HG changeset patch
# User Ritor1
# Date 1406281631 -21600
# Node ID 16f0278279a5b7badf1ec3c57e3256c502ffd2f6
# Parent 2a8010d99cf83fab0a27a6464870eb3ec77eb807
removed CShow.cpp/.h files
diff -r 2a8010d99cf8 -r 16f0278279a5 Build/Visual Studio 2010/World of Might and Magic.vcxproj
--- a/Build/Visual Studio 2010/World of Might and Magic.vcxproj Fri Jul 25 15:06:52 2014 +0600
+++ b/Build/Visual Studio 2010/World of Might and Magic.vcxproj Fri Jul 25 15:47:11 2014 +0600
@@ -96,7 +96,6 @@
-
@@ -262,7 +261,6 @@
-
diff -r 2a8010d99cf8 -r 16f0278279a5 Build/Visual Studio 2010/World of Might and Magic.vcxproj.filters
--- a/Build/Visual Studio 2010/World of Might and Magic.vcxproj.filters Fri Jul 25 15:06:52 2014 +0600
+++ b/Build/Visual Studio 2010/World of Might and Magic.vcxproj.filters Fri Jul 25 15:47:11 2014 +0600
@@ -12,7 +12,6 @@
-
@@ -650,7 +649,6 @@
-
diff -r 2a8010d99cf8 -r 16f0278279a5 CShow.cpp
--- a/CShow.cpp Fri Jul 25 15:06:52 2014 +0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-
-/*#include
-
-#include "CShow.h"
-
-#include "mm7_data.h"
-#include "VideoPlayer.h"
-#include "Mouse.h"
-
-void CShow::PlayMovie(MovieType eVideo, bool bShowMouseAfterPlayback)
-{
- if (bNoVideo) return;
-
- switch (eVideo)
- {
- case MOVIE_3DOLogo: VideoPlayer::MovieLoop("3dologo", 0, 0, 1); break;
- case MOVIE_NWCLogo: VideoPlayer::MovieLoop("new world logo", 0, 1, 1); break;
- case MOVIE_JVC: VideoPlayer::MovieLoop("jvc", 0, 1, 1); break;
- case MOVIE_Intro: VideoPlayer::MovieLoop("Intro", 0, 1, 1); break;
- case MOVIE_Emerald: VideoPlayer::MovieLoop("Intro Post", 0, 1, 1); break;
- case MOVIE_Death: VideoPlayer::MovieLoop("losegame", 2, 1, 1); break;
- case MOVIE_Outro: VideoPlayer::MovieLoop("end_seq1", 20, 1, 1); break;
-
- default:
- assert(false && "Invalid movie requested in " __FUNCTION__);
- break;
- }
-}
-
-*/
\ No newline at end of file
diff -r 2a8010d99cf8 -r 16f0278279a5 CShow.h
--- a/CShow.h Fri Jul 25 15:06:52 2014 +0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#pragma once
-#include "MediaPlayer.h"
-#include "ErrorHandling.h"
-
-
-/* 302 */
-enum MovieType
-{
- MOVIE_Invalid = 0x0,
- MOVIE_3DOLogo = 0x1,
- MOVIE_NWCLogo = 0x2,
- MOVIE_JVC = 0x3,
- MOVIE_Emerald = 0x4,
- MOVIE_Intro = 0x5,
- MOVIE_Death = 0x6,
- MOVIE_Outro = 0x7,
-};
-
-inline void PlayFullscreenMovie(MovieType movie_type, bool bShowMouseAfterPlayback = false)
-{
- extern unsigned int bNoVideo;
- if (bNoVideo) return;
-
- switch (movie_type)
- {
- case MOVIE_3DOLogo: pMediaPlayer->GlobalMovieLoop("3dologo", 0); break;
- case MOVIE_NWCLogo: pMediaPlayer->GlobalMovieLoop("new world logo", 0); break;
- case MOVIE_JVC: pMediaPlayer->GlobalMovieLoop("jvc", 0); break;
- case MOVIE_Intro: pMediaPlayer->GlobalMovieLoop("Intro", 0); break;
- case MOVIE_Emerald: pMediaPlayer->GlobalMovieLoop("Intro Post", 0); break;
- case MOVIE_Death: pMediaPlayer->GlobalMovieLoop("losegame", 2); break;
- case MOVIE_Outro: pMediaPlayer->GlobalMovieLoop("end_seq1", 20); break;
-
- default:
- Error("Invalid movie requested: %u", movie_type);
- break;
- }
-}
-
-/*
-#pragma pack(push, 1)
-class CShow
-{
-public:
- //----- (004A9507) --------------------------------------------------------
- CShow() {}
-
- //----- (004A9510) --------------------------------------------------------
- virtual ~CShow() {}
-
-
- //----- (004A952D) --------------------------------------------------------
- void PlayMovie(MovieType eVideo, bool bShowMouseAfterPlayback);
-
-
- void ( ***vdestructor_ptr)(CShow *, bool);
-};
-#pragma pack(pop)*/
\ No newline at end of file
diff -r 2a8010d99cf8 -r 16f0278279a5 Game.cpp
--- a/Game.cpp Fri Jul 25 15:06:52 2014 +0600
+++ b/Game.cpp Fri Jul 25 15:47:11 2014 +0600
@@ -12,11 +12,12 @@
#include "ParticleEngine.h"
#include "Mouse.h"
#include "Keyboard.h"
-#include "CShow.h"
#include "GammaControl.h"
#include "stru6.h"
#include "stru9.h"
#include "stru10.h"
+#include "ErrorHandling.h"
+#include "MediaPlayer.h"
#include "Game.h"
#include "Party.h"
@@ -139,7 +140,8 @@
pIndoor->Draw();
else if (uCurrentlyLoadedLevelType == LEVEL_Outdoor)
pOutdoor->Draw();
- else Error("Invalid level type: %u", uCurrentlyLoadedLevelType);
+ else
+ Error("Invalid level type: %u", uCurrentlyLoadedLevelType);
//if (pRenderer->pRenderD3D)
{
@@ -428,7 +430,7 @@
pNPCStats->pNewNPCData[i].uFlags &= 0xFFFFFF7Fu;
}
pMediaPlayer->bStopBeforeSchedule = 0;
- PlayFullscreenMovie(MOVIE_Death, true);
+ pMediaPlayer->PlayFullscreenMovie(MOVIE_Death, true);
if ( pMovie_Track )
pMediaPlayer->Unload();
SaveGame(0, 0);
@@ -1075,7 +1077,8 @@
else
face->uAttributes |= FACE_OUTLINED;
}
- else Error("Invalid level type", uCurrentlyLoadedLevelType);
+ else
+ Error("Invalid level type", uCurrentlyLoadedLevelType);
}
break;
diff -r 2a8010d99cf8 -r 16f0278279a5 MMT.cpp
--- a/MMT.cpp Fri Jul 25 15:06:52 2014 +0600
+++ b/MMT.cpp Fri Jul 25 15:47:11 2014 +0600
@@ -12,10 +12,10 @@
#include "Mouse.h"
#include "LOD.h"
#include "Render.h"
-#include "CShow.h"
#include "GUIFont.h"
#include "lib/libpng/png.h"
#include "MediaPlayer.h"
+#include "ErrorHandling.h"
void ShowLogoVideo()
{
@@ -29,12 +29,12 @@
if (!bNoVideo)
{
pRenderer->PresentBlackScreen();
- PlayFullscreenMovie(MOVIE_3DOLogo, true);
+ pMediaPlayer->PlayFullscreenMovie(MOVIE_3DOLogo, true);
if ( !pMediaPlayer->bStopBeforeSchedule )
{
- PlayFullscreenMovie(MOVIE_NWCLogo, true);
+ pMediaPlayer->PlayFullscreenMovie(MOVIE_NWCLogo, true);
if ( !pMediaPlayer->bStopBeforeSchedule )
- PlayFullscreenMovie(MOVIE_JVC, true);
+ pMediaPlayer->PlayFullscreenMovie(MOVIE_JVC, true);
}
}
char pContainerName[64];
@@ -215,7 +215,7 @@
sprintf(pContainerName, "data\\New_Icons/%s", "MMTTITLE.pcx");
if (pTexture_PCX.LoadPCXFile(pContainerName, 0) == 1)
- Error("File not found: %s", pContainerName);
+ Error("File not found: %s", pContainerName);
SetCurrentMenuID(MENU_MMT_MAIN_MENU);//included in enum MENU_STATE in GUIWindows.h
SetForegroundWindow(window->GetApiHandle());
diff -r 2a8010d99cf8 -r 16f0278279a5 MediaPlayer.cpp
--- a/MediaPlayer.cpp Fri Jul 25 15:06:52 2014 +0600
+++ b/MediaPlayer.cpp Fri Jul 25 15:47:11 2014 +0600
@@ -19,7 +19,6 @@
#include "OpenALSoundProvider.h"
#include "Log.h"
#include "MediaPlayer.h"
-#include "CShow.h"
#include "Bink_Smacker.h"
#include "AudioPlayer.h"
#include "Timer.h"
@@ -1043,6 +1042,7 @@
return movie;
}
+
//----- (004BE9D8) --------------------------------------------------------
void MPlayer::Initialize(OSWindow *target_window)
{
diff -r 2a8010d99cf8 -r 16f0278279a5 MediaPlayer.h
--- a/MediaPlayer.h Fri Jul 25 15:06:52 2014 +0600
+++ b/MediaPlayer.h Fri Jul 25 15:47:11 2014 +0600
@@ -1,6 +1,7 @@
#pragma once
#include "OSWindow.h"
#include "Texture.h"
+#include "ErrorHandling.h"
#pragma pack(push, 1)
@@ -39,6 +40,18 @@
unsigned int uFileOffset;
};
+enum MovieType
+{
+ MOVIE_Invalid = 0x0,
+ MOVIE_3DOLogo = 0x1,
+ MOVIE_NWCLogo = 0x2,
+ MOVIE_JVC = 0x3,
+ MOVIE_Emerald = 0x4,
+ MOVIE_Intro = 0x5,
+ MOVIE_Death = 0x6,
+ MOVIE_Outro = 0x7,
+};
+
namespace Media
{
class ITrack
@@ -100,6 +113,26 @@
void LoadMovie(const char *);
void SelectMovieType();
+ inline void PlayFullscreenMovie(MovieType movie_type, bool bShowMouseAfterPlayback)
+ {
+ extern unsigned int bNoVideo;
+ if (bNoVideo) return;
+
+ switch (movie_type)
+ {
+ case MOVIE_3DOLogo: GlobalMovieLoop("3dologo", 0); break;
+ case MOVIE_NWCLogo: GlobalMovieLoop("new world logo", 0); break;
+ case MOVIE_JVC: GlobalMovieLoop("jvc", 0); break;
+ case MOVIE_Intro: GlobalMovieLoop("Intro", 0); break;
+ case MOVIE_Emerald: GlobalMovieLoop("Intro Post", 0); break;
+ case MOVIE_Death: GlobalMovieLoop("losegame", 2); break;
+ case MOVIE_Outro: GlobalMovieLoop("end_seq1", 20); break;
+
+ default:
+ Error("Invalid movie requested: %u", movie_type);
+ break;
+ }
+ }
void GlobalMovieLoop(const char *pMovieName, int a2);
void HouseMovieLoop();
diff -r 2a8010d99cf8 -r 16f0278279a5 UI/UIOptions.cpp
--- a/UI/UIOptions.cpp Fri Jul 25 15:06:52 2014 +0600
+++ b/UI/UIOptions.cpp Fri Jul 25 15:47:11 2014 +0600
@@ -7,7 +7,6 @@
#include "..\Keyboard.h"
#include "..\IndoorCameraD3D.h"
-#include "..\CShow.h"
#include "..\GammaControl.h"
#include "..\Render.h"
diff -r 2a8010d99cf8 -r 16f0278279a5 mm7_2.cpp
--- a/mm7_2.cpp Fri Jul 25 15:06:52 2014 +0600
+++ b/mm7_2.cpp Fri Jul 25 15:47:11 2014 +0600
@@ -18,7 +18,7 @@
#include "ParticleEngine.h"
#include "Mouse.h"
#include "Keyboard.h"
-#include "CShow.h"
+#include "MediaPlayer.h"
#include "GammaControl.h"
#include "stru6.h"
@@ -2079,7 +2079,7 @@
}
DeleteCCharFont();
bFlashQuestBook = true;
- PlayFullscreenMovie(MOVIE_Emerald);
+ pMediaPlayer->PlayFullscreenMovie(MOVIE_Emerald, true);
//pGame->pCShow->PlayMovie(MOVIE_Emerald, 0);
SaveNewGame();
if (bNoMargareth)