1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

* Reverted previously changed PreGame code

* Added the missing AB video resource file in linux code, AB campaign selection videos should now play BUT they don't => it seems that ffmpeg can't handle older BINK videos
* Fixed a visual glitch which could be seen at the WOG animation in the main menu on a linux machine
* Fixed the random crashes bug on mouse centering at startup on linux
* Fixed a visual bug at the bonus selection screen when starting a campaign-map
* Changed some positions in the bonus selection screen, no bonus pre selection, you cannot start the campaign when no bonus is selected (like in h3)
* Added a border functionality to the AdventureMapButton
* InfoWindow buttons and some other buttons have now the border which heroes 3 buttons have
* Fixed a app crash when you start a campaign two times in one session
This commit is contained in:
beegee1
2011-04-26 13:30:29 +00:00
parent a73a1c2724
commit 45fba15511
14 changed files with 116 additions and 77 deletions

View File

@@ -660,6 +660,7 @@ CVideoPlayer::CVideoPlayer()
av_register_protocol(&lod_protocol);
vidh = new CVidHandler(std::string(DATA_DIR "/Data/VIDEO.VID"));
vidh_ab = new CVidHandler(std::string(DATA_DIR "/Data/H3ab_ahd.vid"));
}
// loop = to loop through the video
@@ -675,6 +676,9 @@ bool CVideoPlayer::open(std::string fname, bool loop, bool useOverlay)
doLoop = loop;
data = vidh->extract(fname, length);
if (!data) {
data = vidh_ab->extract(fname, length);
}
if (data) {
// Create our URL name with the 'lod' protocol as a prefix and a
@@ -751,6 +755,7 @@ bool CVideoPlayer::open(std::string fname, bool loop, bool useOverlay)
codecContext->pix_fmt, codecContext->width, codecContext->height,
PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
} else {
PixelFormat screenFormat = PIX_FMT_NONE;
switch(screen->format->BytesPerPixel)
{
@@ -872,8 +877,15 @@ void CVideoPlayer::update( int x, int y, SDL_Surface *dst, bool forceRedraw, boo
refreshCount = refreshWait;
if (nextFrame())
show(x,y,dst,update);
else
else {
open(fname);
nextFrame();
// The y position is wrong at the first frame.
// Note: either the windows player or the linux player is
// broken. Compensate here until the bug is found.
show(x, y--, dst, update);
}
}
else {
redraw(x, y, dst, update);