Mercurial > mm7
comparison VideoPlayer.cpp @ 2223:17bc3a1eb037
LoadCursor fix
author | Ritor1 |
---|---|
date | Wed, 19 Feb 2014 13:01:36 +0600 |
parents | 66bd74aa9f5e |
children | aff7a7b072b7 |
comparison
equal
deleted
inserted
replaced
2222:66bd74aa9f5e | 2223:17bc3a1eb037 |
---|---|
867 } | 867 } |
868 //auto pixels = new unsigned short[640 * 480]; | 868 //auto pixels = new unsigned short[640 * 480]; |
869 | 869 |
870 void VideoPlayer::UpdatePalette() | 870 void VideoPlayer::UpdatePalette() |
871 { | 871 { |
872 //unsigned __int16 *v3; // ebx@1 | |
873 //unsigned int v4; // edi@1 | |
874 //unsigned int v5; // eax@1 | |
875 | |
876 Log::Warning(L"smacker"); | 872 Log::Warning(L"smacker"); |
877 | 873 |
878 pRenderer->BeginScene(); | 874 pRenderer->BeginScene(); |
879 | |
880 if (pMovie->Stopped())//видео завершено/перезагрузка | 875 if (pMovie->Stopped())//видео завершено/перезагрузка |
881 { | 876 { |
882 int width = game_viewport_width; | 877 int width = game_viewport_width; |
883 int height = game_viewport_height; | 878 int height = game_viewport_height; |
884 delete pMovie; | 879 delete pMovie; |
887 | 882 |
888 pMovie = pPlayer->LoadMovieFromLOD(hVidFile, &readFunction, &seekFunction, width, height); | 883 pMovie = pPlayer->LoadMovieFromLOD(hVidFile, &readFunction, &seekFunction, width, height); |
889 } | 884 } |
890 else | 885 else |
891 { | 886 { |
892 | |
893 char *image = pPlayer->DoFrame(); | 887 char *image = pPlayer->DoFrame(); |
894 int image_array[460 * 344];//game_viewport_width * game_viewport_height | 888 int image_array[460 * 344];//game_viewport_width * game_viewport_height |
895 | |
896 if (image) | 889 if (image) |
897 { | 890 { |
898 memcpy(image_array, image, sizeof (image_array)); | 891 memcpy(image_array, image, sizeof (image_array)); |
899 for (unsigned int y = 8; y < 8 + game_viewport_height; ++y) | 892 for (unsigned int y = 8; y < 8 + game_viewport_height; ++y)//координаты местоположения видеоролика |
900 { | 893 { |
901 for (unsigned int x = 8; x < 8 + game_viewport_width; ++x) | 894 for (unsigned int x = 8; x < 8 + game_viewport_width; ++x) |
902 { | 895 { |
903 auto p = (unsigned __int32 *)pRenderer->pTargetSurface + x + y * pRenderer->uTargetSurfacePitch; | 896 auto p = (unsigned __int32 *)pRenderer->pTargetSurface + x + y * pRenderer->uTargetSurfacePitch; |
904 *p = image_array[((x - 8) + ((y - 8)*game_viewport_width))]; | 897 *p = image_array[((x - 8) + ((y - 8)*game_viewport_width))]; |
905 } | 898 } |
906 } | 899 } |
907 delete[] image; | 900 delete[] image; |
908 } | 901 } |
909 } | 902 } |
910 | |
911 pRenderer->EndScene(); | 903 pRenderer->EndScene(); |
912 } | 904 } |
913 /* | 905 /* |
914 //----- (004BF08B) -------------------------------------------------------- | 906 //----- (004BF08B) -------------------------------------------------------- |
915 void VideoPlayer::SmackUpdatePalette() | 907 void VideoPlayer::SmackUpdatePalette() |