comparison VideoPlayer.cpp @ 2125:ba3de1337989

house animations working round renamed to round_to_int
author zipi
date Thu, 26 Dec 2013 22:46:49 +0000
parents c15871e2d743
children 49de109bbab5
comparison
equal deleted inserted replaced
2124:7f403ebf619f 2125:ba3de1337989
307 pVideoPlayer->pResetflag = 0; 307 pVideoPlayer->pResetflag = 0;
308 bGameoverLoop = 1; 308 bGameoverLoop = 1;
309 if (!bNoVideo) 309 if (!bNoVideo)
310 { 310 {
311 pRenderer->PresentBlackScreen(); 311 pRenderer->PresentBlackScreen();
312 PlayFullscreenMovie(MOVIE_3DOLogo, true); 312 //PlayFullscreenMovie(MOVIE_3DOLogo, true);
313 //pGame->pCShow->PlayMovie(MOVIE_3DOLogo, 1); 313 //pGame->pCShow->PlayMovie(MOVIE_3DOLogo, 1);
314 if ( !pVideoPlayer->bStopBeforeSchedule ) 314 if ( !pVideoPlayer->bStopBeforeSchedule )
315 { 315 {
316 PlayFullscreenMovie(MOVIE_NWCLogo, true); 316 PlayFullscreenMovie(MOVIE_NWCLogo, true);
317 //pGame->pCShow->PlayMovie(MOVIE_NWCLogo, 1); 317 //pGame->pCShow->PlayMovie(MOVIE_NWCLogo, 1);
839 BinkUpdatePalette(); 839 BinkUpdatePalette();
840 pMouse->_469EA4(); 840 pMouse->_469EA4();
841 pRenderer->EndScene(); 841 pRenderer->EndScene();
842 } 842 }
843 } 843 }
844 auto pixels = new unsigned short[640 * 480];
844 845
845 //----- (004BF08B) -------------------------------------------------------- 846 //----- (004BF08B) --------------------------------------------------------
846 void VideoPlayer::SmackUpdatePalette() 847 void VideoPlayer::SmackUpdatePalette()
847 { 848 {
848 //VideoPlayer *v2; // esi@1 849 //VideoPlayer *v2; // esi@1
850 unsigned int v4; // edi@1 851 unsigned int v4; // edi@1
851 unsigned int v5; // eax@1 852 unsigned int v5; // eax@1
852 //_SMACK *v6; // eax@1 853 //_SMACK *v6; // eax@1
853 854
854 Log::Warning(L"smacker"); 855 Log::Warning(L"smacker");
855 return; 856 //return;
856 857
857 pRenderer->BeginScene(); 858 pRenderer->BeginScene();
858 859
859 auto pixels = new unsigned short[640 * 480];
860 v3 = pixels;//pRenderer->pTargetSurface; 860 v3 = pixels;//pRenderer->pTargetSurface;
861 v4 = 640;//pRenderer->uTargetSurfacePitch; 861 v4 = 640;//pRenderer->uTargetSurfacePitch;
862 v5 = SmackCheckSurfaceFromat(); 862 v5 = SmackCheckSurfaceFromat();
863 863
864 SmackToBuffer(pSmackerMovie, 8, 8, 2 * v4, pRenderer->field_14, v3, v5); 864 SmackToBuffer(pSmackerMovie, 8, 8, 2 * v4, pRenderer->field_14, v3, v5);
867 for (unsigned int y = 8; y < 8 + pSmackerMovie->Height; ++y) 867 for (unsigned int y = 8; y < 8 + pSmackerMovie->Height; ++y)
868 for (unsigned int x = 8; x < 8 + pSmackerMovie->Width; ++x) 868 for (unsigned int x = 8; x < 8 + pSmackerMovie->Width; ++x)
869 { 869 {
870 pRenderer->WritePixel16(x, y, pixels[x + y * 640]); 870 pRenderer->WritePixel16(x, y, pixels[x + y * 640]);
871 } 871 }
872 delete [] pixels; 872 //delete [] pixels;
873 873
874 //v6 = pSmackerMovie; 874 //v6 = pSmackerMovie;
875 if (false&& pSmackerMovie->NewPalette ) 875 if ( pSmackerMovie->NewPalette )
876 { 876 {
877 SmackBufferNewPalette((long)pSmackerBuffer, (long)pSmackerMovie->Palette, LOWORD(pSmackerMovie->PalType)); 877 SmackBufferNewPalette(pSmackerBuffer, pSmackerMovie->Palette, (pSmackerMovie->PalType));
878 SmackColorRemapWithTrans( 878 SmackColorRemapWithTrans(
879 (long)pSmackerMovie, 879 pSmackerMovie,
880 (long)pSmackerBuffer->Palette, 880 pSmackerBuffer->Palette,
881 (long)pSmackerBuffer->MaxPalColors, 881 pSmackerBuffer->MaxPalColors,
882 (long)pSmackerBuffer->PalType, 882 pSmackerBuffer->PalType,
883 1000); 883 1000);
884 } 884 }
885 SmackDoFrame(pSmackerMovie); 885 SmackDoFrame(pSmackerMovie);
886 if ( pSmackerMovie->FrameNum != pSmackerMovie->Frames - 1 || bLoopPlaying ) 886 if ( pSmackerMovie->FrameNum != pSmackerMovie->Frames - 1 || bLoopPlaying )
887 SmackNextFrame(pSmackerMovie); 887 SmackNextFrame(pSmackerMovie);
919 for (uint i = 0; i < uNumMagicVideoHeaders; ++i) 919 for (uint i = 0; i < uNumMagicVideoHeaders; ++i)
920 if (!_stricmp(pName, pMagicVideoHeaders[i].pVideoName)) 920 if (!_stricmp(pName, pMagicVideoHeaders[i].pVideoName))
921 { 921 {
922 SetFilePointer(hMagicVid, pMagicVideoHeaders[i].uFileOffset, 0, FILE_BEGIN); 922 SetFilePointer(hMagicVid, pMagicVideoHeaders[i].uFileOffset, 0, FILE_BEGIN);
923 923
924 if (uBinkVersion < 0x0003000000000000) 924 if (uBinkVersion < 0x0003000000000000)
925 return BinkOpen(hMagicVid, 0x8800000); 925 return BinkOpen(hMagicVid, BINKNOTHREADEDIO | BINKFILEHANDLE);//0x8800000);
926 else 926 else
927 return BinkOpen(hMagicVid, 0x82000000); 927 return BinkOpen(hMagicVid, BINKIOPROCESSOR | BINKCOPYALL);//0x82000000);
928 } 928 }
929 929
930 return nullptr; 930 return nullptr;
931 } 931 }
932 //----- (004BF1E6) -------------------------------------------------------- 932 //----- (004BF1E6) --------------------------------------------------------