mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Fix y position for video under linux/windows.
This commit is contained in:
@ -638,7 +638,14 @@ void CSpellWindow::deactivate()
|
|||||||
|
|
||||||
void CSpellWindow::turnPageLeft()
|
void CSpellWindow::turnPageLeft()
|
||||||
{
|
{
|
||||||
if (CGI->videoh->open("PGTRNLFT.SMK", pos.x+13, pos.y+15)) {
|
// Note: video decoders are different, and one is buggy.
|
||||||
|
#ifdef _WIN32
|
||||||
|
const int y = pos.y+15;
|
||||||
|
#else
|
||||||
|
const int y = pos.y+14;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (CGI->videoh->open("PGTRNLFT.SMK", pos.x+13, y)) {
|
||||||
while(CGI->videoh->nextFrame()) {
|
while(CGI->videoh->nextFrame()) {
|
||||||
SDL_framerateDelay(LOCPLINT->mainFPSmng);
|
SDL_framerateDelay(LOCPLINT->mainFPSmng);
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
@ -652,7 +659,14 @@ void CSpellWindow::turnPageLeft()
|
|||||||
|
|
||||||
void CSpellWindow::turnPageRight()
|
void CSpellWindow::turnPageRight()
|
||||||
{
|
{
|
||||||
if (CGI->videoh->open("PGTRNRGH.SMK", pos.x+13, pos.y+15)) {
|
// Note: video decoders are different, and one is buggy.
|
||||||
|
#ifdef _WIN32
|
||||||
|
const int y = pos.y+15;
|
||||||
|
#else
|
||||||
|
const int y = pos.y+14;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (CGI->videoh->open("PGTRNRGH.SMK", pos.x+13, y)) {
|
||||||
while(CGI->videoh->nextFrame()) {
|
while(CGI->videoh->nextFrame()) {
|
||||||
SDL_framerateDelay(LOCPLINT->mainFPSmng);
|
SDL_framerateDelay(LOCPLINT->mainFPSmng);
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
Reference in New Issue
Block a user