1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

video campaign fix

This commit is contained in:
Laserlicht
2024-01-01 15:25:42 +01:00
committed by GitHub
parent 4cd910a4ce
commit 63ee20de6c
3 changed files with 13 additions and 4 deletions

View File

@@ -45,10 +45,8 @@ CPrologEpilogVideo::CPrologEpilogVideo(CampaignScenarioPrologEpilog _spe, std::f
void CPrologEpilogVideo::show(Canvas & to)
{
to.drawColor(pos, Colors::BLACK);
//BUG: some videos are 800x600 in size while some are 800x400
//VCMI should center them in the middle of the screen. Possible but needs modification
//of video player API which I'd like to avoid until we'll get rid of Windows-specific player
CCS->videoh->update(pos.x, pos.y, to.getInternalSurface(), true, false);
//some videos are 800x600 in size while some are 800x400
CCS->videoh->update(pos.x, pos.y + (CCS->videoh->size().y == 400 ? 100 : 0), to.getInternalSurface(), true, false);
//move text every 5 calls/frames; seems to be good enough
++positionCounter;