mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Fix map animation playback speed
This commit is contained in:
@ -60,14 +60,14 @@ BasicMapView::BasicMapView(const Point & offset, const Point & dimensions)
|
|||||||
void BasicMapView::render(Canvas & target, bool fullUpdate)
|
void BasicMapView::render(Canvas & target, bool fullUpdate)
|
||||||
{
|
{
|
||||||
Canvas targetClipped(target, pos);
|
Canvas targetClipped(target, pos);
|
||||||
|
|
||||||
controller->update(GH.mainFPSmng->getElapsedMilliseconds());
|
|
||||||
tilesCache->update(controller->getContext());
|
tilesCache->update(controller->getContext());
|
||||||
tilesCache->render(controller->getContext(), targetClipped, fullUpdate);
|
tilesCache->render(controller->getContext(), targetClipped, fullUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasicMapView::show(SDL_Surface * to)
|
void BasicMapView::show(SDL_Surface * to)
|
||||||
{
|
{
|
||||||
|
controller->update(GH.mainFPSmng->getElapsedMilliseconds());
|
||||||
|
|
||||||
Canvas target(to);
|
Canvas target(to);
|
||||||
CSDL_Ext::CClipRectGuard guard(to, pos);
|
CSDL_Ext::CClipRectGuard guard(to, pos);
|
||||||
render(target, false);
|
render(target, false);
|
||||||
@ -75,6 +75,8 @@ void BasicMapView::show(SDL_Surface * to)
|
|||||||
|
|
||||||
void BasicMapView::showAll(SDL_Surface * to)
|
void BasicMapView::showAll(SDL_Surface * to)
|
||||||
{
|
{
|
||||||
|
controller->update(0);
|
||||||
|
|
||||||
Canvas target(to);
|
Canvas target(to);
|
||||||
CSDL_Ext::CClipRectGuard guard(to, pos);
|
CSDL_Ext::CClipRectGuard guard(to, pos);
|
||||||
render(target, true);
|
render(target, true);
|
||||||
|
Reference in New Issue
Block a user