1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Merge pull request #3998 from IvanSavenko/refactor_sdl_media

[1.6] Reorganize SDL sound/music/video handling
This commit is contained in:
Ivan Savenko
2024-05-31 12:02:55 +03:00
committed by GitHub
65 changed files with 2372 additions and 2129 deletions

View File

@@ -19,12 +19,12 @@
#include "../CGameInfo.h"
#include "../CPlayerInterface.h"
#include "../PlayerLocalState.h"
#include "../CVideoHandler.h"
#include "../battle/BattleInterface.h"
#include "../gui/CGuiHandler.h"
#include "../gui/Shortcut.h"
#include "../gui/WindowHandler.h"
#include "../media/IVideoPlayer.h"
#include "../widgets/GraphicalPrimitiveCanvas.h"
#include "../widgets/CComponent.h"
#include "../widgets/CTextInput.h"
@@ -524,13 +524,13 @@ void CSpellWindow::setCurrentPage(int value)
void CSpellWindow::turnPageLeft()
{
if(settings["video"]["spellbookAnimation"].Bool() && !isBigSpellbook)
CCS->videoh->openAndPlayVideo(VideoPath::builtin("PGTRNLFT.SMK"), pos.x+13, pos.y+15, EVideoType::SPELLBOOK);
CCS->videoh->playSpellbookAnimation(VideoPath::builtin("PGTRNLFT.SMK"), pos.topLeft() + Point(13, 15));
}
void CSpellWindow::turnPageRight()
{
if(settings["video"]["spellbookAnimation"].Bool() && !isBigSpellbook)
CCS->videoh->openAndPlayVideo(VideoPath::builtin("PGTRNRGH.SMK"), pos.x+13, pos.y+15, EVideoType::SPELLBOOK);
CCS->videoh->playSpellbookAnimation(VideoPath::builtin("PGTRNRGH.SMK"), pos.topLeft() + Point(13, 15));
}
void CSpellWindow::keyPressed(EShortcut key)