# HG changeset patch
# User Nomad
# Date 1350141023 -7200
# Node ID e33334611747c8cb416e8d079f22ff2d56909281
# Parent b47e9c80e7419b4667ffa387243709e3812752b0# Parent 17150bdf321e174a5ef075173d993c57b1352913
Merge
diff -r b47e9c80e741 -r e33334611747 CShow.h
--- a/CShow.h Sat Oct 13 17:09:02 2012 +0200
+++ b/CShow.h Sat Oct 13 17:10:23 2012 +0200
@@ -11,8 +11,8 @@
MOVIE_3DOLogo = 0x1,
MOVIE_NWCLogo = 0x2,
MOVIE_JVC = 0x3,
- MOVIE_Intro = 0x4,
- MOVIE_Emerald = 0x5,
+ MOVIE_Emerald = 0x4,
+ MOVIE_Intro = 0x5,
MOVIE_Death = 0x6,
MOVIE_Outro = 0x7,
};
@@ -32,10 +32,10 @@
void CShow::PlayMovie(MovieType eVideo, bool bShowMouseAfterPlayback)
{
int v3; // edx@5
- const char *v4; // ecx@5
+ const char *Name; // ecx@5
std::string v5; // [sp-18h] [bp-24h]@4
signed int v6; // [sp-Ch] [bp-18h]@10
- int v7; // [sp-8h] [bp-14h]@4
+ int ScreenSizeFlag; // [sp-8h] [bp-14h]@4
int v8; // [sp-4h] [bp-10h]@4
char v9; // [sp+0h] [bp-Ch]@14
char v10; // [sp+4h] [bp-8h]@4
@@ -50,49 +50,49 @@
break;
case MOVIE_3DOLogo:
v8 = 1;
- v7 = 0;
+ ScreenSizeFlag = 0;
v3 = 0;
- v4 = "3dologo";
+ Name = "3dologo";
goto LABEL_13;
case MOVIE_NWCLogo:
v8 = 1;
- v7 = 1;
+ ScreenSizeFlag = 1;
v3 = 0;
- v4 = "new world logo";
+ Name = "new world logo";
goto LABEL_13;
case MOVIE_JVC:
v8 = 1;
- v7 = 1;
+ ScreenSizeFlag = 1;
v3 = 0;
- v4 = "jvc";
+ Name = "jvc";
+ goto LABEL_13;
+ case MOVIE_Intro:
+ v8 = 1;
+ ScreenSizeFlag = 1;
+ v3 = 0;
+ Name = "Intro";
goto LABEL_13;
case MOVIE_Emerald:
v8 = 1;
- v7 = 1;
+ ScreenSizeFlag = 1;
v3 = 0;
- v4 = "Intro";
- goto LABEL_13;
- case MOVIE_Intro:
- v8 = 1;
- v7 = 1;
- v3 = 0;
- v4 = "Intro Post";
+ Name = "Intro Post";
goto LABEL_13;
case MOVIE_Death:
v8 = 1;
- v7 = 1;
+ ScreenSizeFlag = 1;
v6 = 2;
- v4 = "losegame";
+ Name = "losegame";
goto LABEL_12;
case MOVIE_Outro:
v8 = 1;
- v7 = 1;
+ ScreenSizeFlag = 1;
v6 = 20;
- v4 = "end_seq1";
+ Name = "end_seq1";
LABEL_12:
v3 = v6;
LABEL_13:
- VideoPlayer::MovieLoop(v4, v3, v7, v8);
+ VideoPlayer::MovieLoop(Name, v3, ScreenSizeFlag, v8);
break;
default:
MessageBoxW(nullptr, L"Invalid movie requested in CShow::Run()", L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Show.cpp:72", 0);
diff -r b47e9c80e741 -r e33334611747 Might and Magic Trilogy.suo
Binary file Might and Magic Trilogy.suo has changed
diff -r b47e9c80e741 -r e33334611747 Might and Magic Trilogy.vcxproj.filters
--- a/Might and Magic Trilogy.vcxproj.filters Sat Oct 13 17:09:02 2012 +0200
+++ b/Might and Magic Trilogy.vcxproj.filters Sat Oct 13 17:10:23 2012 +0200
@@ -200,6 +200,7 @@
+
@@ -316,4 +317,7 @@
+
+
+
\ No newline at end of file
diff -r b47e9c80e741 -r e33334611747 Might and Magic Trilogy.vcxproj.user
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Might and Magic Trilogy.vcxproj.user Sat Oct 13 17:10:23 2012 +0200
@@ -0,0 +1,8 @@
+
+
+
+ ..\Games\MM7
+ WindowsLocalDebugger
+ -nocd
+
+
\ No newline at end of file
diff -r b47e9c80e741 -r e33334611747 Render.cpp
--- a/Render.cpp Sat Oct 13 17:09:02 2012 +0200
+++ b/Render.cpp Sat Oct 13 17:10:23 2012 +0200
@@ -6983,7 +6983,7 @@
int v7; // [sp-8h] [bp-8h]@3
unsigned int v8; // [sp-4h] [bp-4h]@3
- if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 )
+ if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion >= 5u )
ErrD3D(pFrontBuffer4->Blt(pDstRect, (IDirectDrawSurface4 *)pSrcSurface, pSrcRect, uBltFlags, nullptr));
else
ErrD3D(pFrontBuffer2->Blt(pDstRect, (IDirectDrawSurface2 *)pSrcSurface, pSrcRect, uBltFlags, nullptr));
diff -r b47e9c80e741 -r e33334611747 VideoPlayer.cpp
--- a/VideoPlayer.cpp Sat Oct 13 17:09:02 2012 +0200
+++ b/VideoPlayer.cpp Sat Oct 13 17:10:23 2012 +0200
@@ -26,7 +26,7 @@
//----- (004BFE2D) --------------------------------------------------------
-_BINKBUF *VideoPlayer::CreateBinkBuffer(HWND a1, unsigned int uWidth, unsigned int uHeight, char a4)
+_BINKBUF *VideoPlayer::CreateBinkBuffer(HWND hWindow, unsigned int uWidth, unsigned int uHeight, char a4)
{
__int32 v4; // edi@3
_BINKBUF *v5; // esi@3
@@ -43,13 +43,13 @@
HWND hWnd; // [sp+110h] [bp-4h]@1
v13 = uWidth;
- hWnd = a1;
- if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 )
+ hWnd = hWindow;
+ if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion >= 5u )
{
v4 = 0;
v15 = 0;
- v5 = (_BINKBUF *)malloc(0x7Cu);
- memset(v5, 0, 0x7Cu);
+ v5 = (_BINKBUF *)malloc(0xA4u);
+ memset(v5, 0, 0xA4u);
memset(&v11, 0, 0x7Cu);
v11.dwSize = 124;
v11.dwWidth = v13;
@@ -78,8 +78,8 @@
{
v4 = 0;
a2 = 0;
- v5 = (_BINKBUF *)malloc(0x7Cu);
- memset(v5, 0, 0x7Cu);
+ v5 = (_BINKBUF *)malloc(0xA4u);
+ memset(v5, 0, 0xA4u);
memset(&Dst, 0, 0x6Cu);
Dst.dwSize = 108;
Dst.dwWidth = v13;
@@ -152,7 +152,7 @@
LPVOID v7; // eax@14
v1 = _this;
- if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 )
+ if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion >= 5u )
{
DDSURFACEDESC2 v8; // [sp+Ch] [bp-7Ch]@4
if ( _this->pTargetDDrawSurface )
@@ -164,7 +164,7 @@
v6 = (IDirectDrawSurface4 *)v1->pTargetDDrawSurface;
if ( !v6->Lock(0, &v8, 1u, 0) )
break;
- BYTE3(v1->uBinkDDSurfaceType) |= 4u;
+ BYTE3(v1->uBinkDDSurfaceType) |= 0x80u;
if ( v6->Restore() )
return 0;
}
@@ -216,7 +216,7 @@
v2->Unlock(0);
v1->uDDrawSurfacePitch = 0;
v1->pDDrawSurfaceData = 0;
- BYTE3(v1->uBinkDDSurfaceType) &= 0xFBu;
+ BYTE3(v1->uBinkDDSurfaceType) &= 0x7Fu;
}
}
@@ -245,7 +245,7 @@
{
pGame->pCShow->PlayMovie(MOVIE_JVC, 1);
if ( !pVideoPlayer->bStopBeforeSchedule )
- pGame->pCShow->PlayMovie(MOVIE_Emerald, 1);
+ pGame->pCShow->PlayMovie(MOVIE_Intro, 1);
}
}
}
@@ -480,7 +480,7 @@
v1->bFirstFrame = 0;
v1->bUsingSmackerMMX = SmackUseMMX(1);
BinkSetSoundSystem(BinkOpenMiles, pAudioPlayer->hDigDriver);
- if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion != 4 )
+ if ( pVersion->pVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || pVersion->pVersionInfo.dwMajorVersion >= 5u )
v2 = (IDirectDrawSurface*)pRenderer->pBackBuffer4;
else
v2 = (IDirectDrawSurface*)pRenderer->pBackBuffer2;
@@ -638,7 +638,7 @@
a3a.right = v5->uWidth;
a3a.bottom = v5->uHeight;
pRenderer->BltToFront(&a1, v5->pTargetDDrawSurface, &a3a, 0x1000000u);
- if ( v4->pBinkMovie->FrameRate != v4->pBinkMovie->Data1 - 1 || v4->bLoopPlaying )
+ if ( v4->pBinkMovie->CurrentFrame != v4->pBinkMovie->Frame - 1 || v4->bLoopPlaying )
BinkNextFrame(v4->pBinkMovie);
else
Unload();
@@ -847,7 +847,7 @@
goto LABEL_5;
}
SetFilePointer(v2->hMightVid, v2->pMightVideoHeaders[v3].uFileOffset, 0, 0);
- v9 = 0x82000000u;
+ v9 = 0x8800000u;
v8 = v2->hMightVid;
return BinkOpen(v8, v9);
}
@@ -864,7 +864,7 @@
return 0;
}
SetFilePointer(v2->hMagicVid, v2->pMagicVideoHeaders[v5].uFileOffset, 0, 0);
- v9 = 0x82000000u;
+ v9 = 0x8800000u;
v8 = v2->hMagicVid;
return BinkOpen(v8, v9);
}
@@ -1004,7 +1004,7 @@
VideoPlayer *v4; // esi@1
_BINK *v5; // eax@2
_SMACK *v6; // eax@3
- _BINK *v7; // eax@5
+ _BINK *pBinkMovie; // eax@5
_SMACK *v8; // eax@7
char *v9; // eax@7
unsigned int v10; // eax@11
@@ -1024,10 +1024,10 @@
{
v4->uMovieFormat = 2;
strcpy(v4->pCurrentMovieName, pFilename);
- v7 = v4->pBinkMovie;
+ pBinkMovie = v4->pBinkMovie;
v4->dword_0000A0 = 1;
- if ( v7 )
- v4->pBinkBuffer = CreateBinkBuffer(v4->hWindow, v7->Width, v7->Height, 0);
+ if ( pBinkMovie )
+ v4->pBinkBuffer = CreateBinkBuffer(v4->hWindow, pBinkMovie->Width, pBinkMovie->Height, 0);
}
else
{
diff -r b47e9c80e741 -r e33334611747 mm7_2.cpp
--- a/mm7_2.cpp Sat Oct 13 17:09:02 2012 +0200
+++ b/mm7_2.cpp Sat Oct 13 17:10:23 2012 +0200
@@ -15278,7 +15278,7 @@
}
DeleteCCharFont();
bFlashQuestBook = 1;
- pGame->pCShow->PlayMovie(MOVIE_Intro, 0);
+ pGame->pCShow->PlayMovie(MOVIE_Emerald, 0);
MaybeDoAutosave();
goto LABEL_48;
}