comparison VideoPlayer.cpp @ 1048:d36681a9e4f8

Слияние
author Ritor1
date Thu, 23 May 2013 11:17:01 +0600
parents 306ec23b37df
children 5d5c78088274
comparison
equal deleted inserted replaced
1047:76ce871b0076 1048:d36681a9e4f8
451 if ( a2.dwRGBBitCount != 8 ) 451 if ( a2.dwRGBBitCount != 8 )
452 { 452 {
453 if ( a2.dwRBitMask == 0xF800 ) 453 if ( a2.dwRBitMask == 0xF800 )
454 { 454 {
455 if ( a2.dwGBitMask == 0x7E0 && a2.dwBBitMask == 0x1F ) 455 if ( a2.dwGBitMask == 0x7E0 && a2.dwBBitMask == 0x1F )
456 return 0xC0000000u; 456 return SMACKBUFFER565;
457 } 457 }
458 else 458 else
459 { 459 {
460 if ( a2.dwRBitMask == 0x7C00 460 if ( a2.dwRBitMask == 0x7C00
461 && a2.dwGBitMask == 0x3E0 461 && a2.dwGBitMask == 0x3E0
462 && a2.dwBBitMask == 0x1F ) 462 && a2.dwBBitMask == 0x1F )
463 return 0x80000000u; 463 return SMACKBUFFER555;
464 } 464 }
465 MessageBoxA(0, "Unsupported pixel format.", "Smacker Error", 0); 465 MessageBoxA(0, "Unsupported pixel format.", "Smacker Error", 0);
466 } 466 }
467 return 0; 467 return 0;
468 } 468 }
814 SmackNextFrame(v4->pSmackerMovie); 814 SmackNextFrame(v4->pSmackerMovie);
815 else 815 else
816 Unload(); 816 Unload();
817 } 817 }
818 } 818 }
819 // 4D83D8: using guessed type int __stdcall SmackBlitSetPalette(int, int, int); 819
820 // 4D83DC: using guessed type int __stdcall SmackBlitClear(int, int, int, int, int, int, int, int);
821 // 4D83E0: using guessed type int __stdcall SmackToBufferRect(int, int);
822 // 4D83E4: using guessed type int __stdcall SmackDoFrame(int);
823 // 4D83E8: using guessed type int __stdcall SmackNextFrame(int);
824 // 4D8404: using guessed type int __stdcall SmackBlit(int, int, int, int, int, int, int, int, int, int, int);
825 820
826 //----- (004BF08B) -------------------------------------------------------- 821 //----- (004BF08B) --------------------------------------------------------
827 void VideoPlayer::SmackUpdatePalette(HWND hWnd) 822 void VideoPlayer::SmackUpdatePalette(HWND hWnd)
828 { 823 {
829 VideoPlayer *v2; // esi@1 824 VideoPlayer *v2; // esi@1
1066 sprintf(pVideoName, v12); 1061 sprintf(pVideoName, v12);
1067 MessageBoxA(0, pVideoName, "Smacker Error", 0); 1062 MessageBoxA(0, pVideoName, "Smacker Error", 0);
1068 return; 1063 return;
1069 } 1064 }
1070 SmackToBuffer(pVideoPlayer->pSmackerMovie, 0, 0, pVideoPlayer->pSmackerMovie->Width, pVideoPlayer->pSmackerMovie->Height, v9, 0); 1065 SmackToBuffer(pVideoPlayer->pSmackerMovie, 0, 0, pVideoPlayer->pSmackerMovie->Width, pVideoPlayer->pSmackerMovie->Height, v9, 0);
1066
1067 v10 = SmackCheckSurfaceFromat();
1071 if ( a4 ) 1068 if ( a4 )
1072 { 1069 {
1073 if ( (unsigned int)uCPUSpeed < 165 ) 1070 v10 |= SMACKBLIT2X;
1074 { 1071
1072 if (uCPUSpeed >= 165 )
1073 v10 |= SMACKBLIT2XSMOOTHING;
1074 else
1075 Log::Warning(L"Smacker seems to use lower resolution because it thinks CPU is slow"); 1075 Log::Warning(L"Smacker seems to use lower resolution because it thinks CPU is slow");
1076 v10 = SmackCheckSurfaceFromat() | 2; 1076 }
1077 } 1077
1078 else
1079 {
1080 v10 = SmackCheckSurfaceFromat();
1081 LOBYTE(v10) = v10 | 6;
1082 }
1083 }
1084 else
1085 {
1086 v10 = SmackCheckSurfaceFromat();
1087 }
1088 v11 = SmackBlitOpen(v10); 1078 v11 = SmackBlitOpen(v10);
1089 pVideoPlayer->pSmackMovieBlit = v11; 1079 pVideoPlayer->pSmackMovieBlit = v11;
1090 if ( !v11 ) 1080 if ( !v11 )
1091 { 1081 {
1092 Unload(); 1082 Unload();