Draw in abstract units and scale to pixels at the end.
This commit is contained in:
parent
a561242395
commit
0c6275f41c
9 changed files with 73 additions and 22 deletions
|
@ -24,7 +24,7 @@
|
|||
namespace cloonel {
|
||||
///-------------------------------------------------------------------------
|
||||
///-------------------------------------------------------------------------
|
||||
Character::Character (const std::string& parPath, SDLMain* parMain, ushort2 parSize) :
|
||||
Character::Character (const std::string& parPath, SDLMain* parMain, float2 parSize) :
|
||||
Placeable(float2(0.0f)),
|
||||
Drawable(parSize),
|
||||
m_texture(new Texture(parPath, parMain, false))
|
||||
|
@ -33,7 +33,7 @@ namespace cloonel {
|
|||
|
||||
///-------------------------------------------------------------------------
|
||||
///-------------------------------------------------------------------------
|
||||
Character::Character (const std::string&& parPath, SDLMain* parMain, ushort2 parSize) :
|
||||
Character::Character (const std::string&& parPath, SDLMain* parMain, float2 parSize) :
|
||||
Placeable(float2(0.0f)),
|
||||
Drawable(parSize),
|
||||
m_texture(new Texture(parPath, parMain, false))
|
||||
|
@ -63,7 +63,6 @@ namespace cloonel {
|
|||
///-------------------------------------------------------------------------
|
||||
///-------------------------------------------------------------------------
|
||||
void Character::Draw() const {
|
||||
const int2 pos(GetPos() + 0.5f);
|
||||
m_texture->Render(pos, m_wh);
|
||||
m_texture->Render(GetPos(), WidthHeight());
|
||||
}
|
||||
} //namespace cloonel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue