mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
- Next part of animation system:
-- Reduced memory usage for images with margins -- Implemented RLE compression - Linux-related changes: -- build system updated to include changed paths -- new dependency: boost-program-options -- configure option --disable-debug will produce optimized build - Several gcc compile fixes - Optimized CPU usage on town screens - Removed several includes from headers - Possible fix for #496
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include "SDL_framerate.h"
|
||||
#include "CConfigHandler.h"
|
||||
#include "CCreatureAnimation.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include "Graphics.h"
|
||||
#include "CAnimation.h"
|
||||
#include "../lib/CArtHandler.h"
|
||||
@ -1640,19 +1641,19 @@ int CTownList::size()
|
||||
}
|
||||
|
||||
CCreaturePic::CCreaturePic(int x, int y, const CCreature *cre, bool Big, bool Animated)
|
||||
:c(cre),big(Big)
|
||||
{
|
||||
OBJ_CONSTRUCTION_CAPTURING_ALL;
|
||||
pos.x+=x;
|
||||
pos.y+=y;
|
||||
|
||||
x = 225 - (c->isDoubleWide()?63:78);
|
||||
y = 225 - (big?75:65);
|
||||
|
||||
anim = new CCreatureAnim(0,0, cre->animDefName);
|
||||
anim->movePic(x,y);
|
||||
anim->pos.w = 100;
|
||||
anim->pos.h = big?130:120;
|
||||
if(Big)
|
||||
bg = new CPicture(graphics->backgrounds[cre->faction],0,0,false);
|
||||
else
|
||||
bg = new CPicture(graphics->backgroundsm[cre->faction],0,0,false);
|
||||
bg->needRefresh = true;
|
||||
anim = new CCreatureAnim(0, 0, cre->animDefName, Rect());
|
||||
anim->clipRect(cre->doubleWide?170:150, 155, bg->pos.w, bg->pos.h);
|
||||
anim->startPreview();
|
||||
}
|
||||
|
||||
CCreaturePic::~CCreaturePic()
|
||||
@ -1660,21 +1661,6 @@ CCreaturePic::~CCreaturePic()
|
||||
|
||||
}
|
||||
|
||||
void CCreaturePic::show(SDL_Surface *to)
|
||||
{
|
||||
if(big)
|
||||
blitAtLoc(graphics->backgrounds[c->faction],0,0,to);
|
||||
else
|
||||
blitAtLoc(graphics->backgroundsm[c->faction],0,0,to);
|
||||
|
||||
CIntObject::show(to);
|
||||
}
|
||||
|
||||
void CCreaturePic::showAll(SDL_Surface *to)
|
||||
{
|
||||
show(to);
|
||||
}
|
||||
|
||||
void CRecruitmentWindow::close()
|
||||
{
|
||||
GH.popIntTotally(this);
|
||||
|
Reference in New Issue
Block a user