Refactoring in SDLMain.
This commit is contained in:
parent
4e3ad27ae8
commit
ccc831e34d
7 changed files with 34 additions and 13 deletions
|
@ -271,7 +271,7 @@ namespace cloonel {
|
|||
///--------------------------------------------------------------------------
|
||||
void Texture::Render (int2 parPos, ushort2 parSize) const {
|
||||
assert(IsLoaded());
|
||||
const int screenHeight = m_sdlmain->DefWidthHeight().y();
|
||||
const int screenHeight = m_sdlmain->WidthHeight().y();
|
||||
const SDL_Rect dest = { parPos.x(), screenHeight - parPos.y() - parSize.y(), parSize.x(), parSize.y() };
|
||||
SDL_RenderCopy(m_sdlmain->GetRenderer(), m_texture, nullptr, &dest);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue