|
|
|
@ -1,8 +1,6 @@
|
|
|
|
|
#include "creature.h"
|
|
|
|
|
#include "creature.h"
|
|
|
|
|
#include "datmanager.h"
|
|
|
|
|
#include <framework/graphics/graphics.h>
|
|
|
|
|
#include <framework/graphics/framebuffer.h>
|
|
|
|
|
#include "game.h"
|
|
|
|
|
#include <framework/graphics/fontmanager.h>
|
|
|
|
|
|
|
|
|
|
Creature::Creature() : Thing(THING_CREATURE)
|
|
|
|
@ -13,13 +11,19 @@ Creature::Creature() : Thing(THING_CREATURE)
|
|
|
|
|
|
|
|
|
|
void Creature::draw(int x, int y)
|
|
|
|
|
{
|
|
|
|
|
//ThingAttributes *creatureAttributes = getAttributes();
|
|
|
|
|
int anim = 0;
|
|
|
|
|
|
|
|
|
|
// draw outfit
|
|
|
|
|
internalDraw(x, y, 0, m_direction, 0, 0, anim);
|
|
|
|
|
|
|
|
|
|
const ThingAttributes& attributes = getAttributes();
|
|
|
|
|
for(int ydiv = 0; ydiv < attributes.ydiv; ydiv++) {
|
|
|
|
|
|
|
|
|
|
// continue if we dont have this addon.
|
|
|
|
|
if(ydiv > 0 && !(m_outfit.addons & (1 << (ydiv-1))))
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
// draw white item
|
|
|
|
|
internalDraw(x, y, 0, m_direction, ydiv, 0, anim);
|
|
|
|
|
|
|
|
|
|
// draw mask if exists
|
|
|
|
|
if(attributes.blendframes > 1) {
|
|
|
|
|
g_graphics.bindBlendFunc(BLEND_COLORIZING);
|
|
|
|
|
|
|
|
|
@ -36,12 +40,13 @@ void Creature::draw(int x, int y)
|
|
|
|
|
outfitColorId = m_outfit.feet;
|
|
|
|
|
|
|
|
|
|
g_graphics.bindColor(OutfitColors[outfitColorId]);
|
|
|
|
|
internalDraw(x, y, 1, m_direction, 0, 0, anim, (SpriteMask)mask);
|
|
|
|
|
internalDraw(x, y, 1, m_direction, ydiv, 0, anim, (SpriteMask)mask);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_graphics.bindBlendFunc(BLEND_NORMAL);
|
|
|
|
|
g_graphics.bindColor(Color::white);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Creature::drawInformation(int x, int y, bool useGray)
|
|
|
|
|