Refix items on UIItem, cancel button to hotkeys

This commit is contained in:
Henrique Santiago
2013-01-10 16:45:35 -02:00
parent 00a574fe10
commit adba4b0da9
4 changed files with 104 additions and 86 deletions

View File

@@ -65,12 +65,6 @@ void Item::draw(const Point& dest, float scaleFactor, bool animate, LightView *l
// determine animation phase
int animationPhase = calculateAnimationPhase(animate);
if(getAnimationPhases() > 1) {
if(animate)
animationPhase = (g_clock.millis() % (Otc::ITEM_TICKS_PER_FRAME * getAnimationPhases())) / Otc::ITEM_TICKS_PER_FRAME;
else
animationPhase = getAnimationPhases()-1;
}
// determine x,y,z patterns
int xPattern = 0, yPattern = 0, zPattern = 0;
@@ -359,12 +353,9 @@ int Item::calculateAnimationPhase(bool animate)
int Item::getExactSize(int layer, int xPattern, int yPattern, int zPattern, int animationPhase)
{
int exactSize = 0;
calculatePatterns(xPattern, yPattern, zPattern);
animationPhase = calculateAnimationPhase(true);
for(layer = 0; layer < getLayers(); ++layer)
exactSize = std::max(exactSize, Thing::getExactSize(layer, xPattern, yPattern, zPattern, animationPhase));
return exactSize;
return Thing::getExactSize(layer, xPattern, yPattern, zPattern, animationPhase);
}
const ThingTypePtr& Item::getThingType()