Small refactoring in Placeable.
This commit is contained in:
parent
85c65b3e68
commit
ac85f96907
4 changed files with 26 additions and 16 deletions
|
@ -6,7 +6,7 @@ namespace cloonel {
|
|||
///-------------------------------------------------------------------------
|
||||
///-------------------------------------------------------------------------
|
||||
Character::Character (const std::string& parPath, SDLMain* parMain, ushort2 parSize) :
|
||||
Placeable(0.0f, 0.0f),
|
||||
Placeable(float2(0.0f)),
|
||||
Drawable(parSize),
|
||||
m_texture(new Texture(parPath, parMain, false))
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ namespace cloonel {
|
|||
///-------------------------------------------------------------------------
|
||||
///-------------------------------------------------------------------------
|
||||
Character::Character (const std::string&& parPath, SDLMain* parMain, ushort2 parSize) :
|
||||
Placeable(0.0f, 0.0f),
|
||||
Placeable(float2(0.0f)),
|
||||
Drawable(parSize),
|
||||
m_texture(new Texture(parPath, parMain, false))
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ namespace cloonel {
|
|||
///-------------------------------------------------------------------------
|
||||
///-------------------------------------------------------------------------
|
||||
void Character::Draw() const {
|
||||
const int2 pos(m_pos + 0.5f);
|
||||
const int2 pos(GetPos() + 0.5f);
|
||||
m_texture->Render(pos, m_wh);
|
||||
}
|
||||
} //namespace cloonel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue