Implement Sprite class
This commit is contained in:
parent
d4c91450d9
commit
bb9d108102
7 changed files with 132 additions and 56 deletions
|
|
@ -35,6 +35,21 @@ export namespace sdl
|
|||
assert(raw_texture_);
|
||||
return raw_texture_.get();
|
||||
}
|
||||
|
||||
constexpr int get_width() const
|
||||
{
|
||||
return raw_texture_->w;
|
||||
}
|
||||
|
||||
constexpr int get_height() const
|
||||
{
|
||||
return raw_texture_->h;
|
||||
}
|
||||
|
||||
constexpr FRect get_boundaries() const
|
||||
{
|
||||
return {0, 0, static_cast<float>(raw_texture_->w), static_cast<float>(raw_texture_->h)};
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue