PETKA: fixed frame time of video system

This commit is contained in:
Andrei Prykhodko 2019-07-07 20:54:30 +03:00 committed by Eugene Sandulenko
parent d78926d79d
commit 10a2ea1f10
3 changed files with 7 additions and 0 deletions

View File

@ -106,6 +106,7 @@ void InterfaceMain::loadRoom(int id, bool fromSave) {
}
if (!fromSave)
g_vm->getQSystem()->addMessageForAllObjects(kInitBG, 0, 0, 0, 0, room);
g_vm->videoSystem()->updateTime();
}
const BGInfo *InterfaceMain::findBGInfo(int id) const {

View File

@ -34,6 +34,7 @@ namespace Petka {
VideoSystem::VideoSystem() :
_shake(false), _shift(false), _shakeTime(0), _time(0) {
makeAllDirty();
_time = g_system->getMillis();
}
static bool objCmp(QVisibleObject *&l, QVisibleObject *&r) {
@ -117,4 +118,8 @@ void VideoSystem::makeAllDirty() {
addDirtyRect(Common::Rect(640, 480));
}
void VideoSystem::updateTime() {
_time = g_system->getMillis();
}
}

View File

@ -33,6 +33,7 @@ class VideoSystem {
public:
VideoSystem();
void updateTime();
void update();
void makeAllDirty();
void addDirtyRect(const Common::Rect &rect);