1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Set the texture props each Cache calls

This commit is contained in:
Mathieu Schroeter 2017-03-03 07:34:58 +01:00
parent c1875fd3ab
commit ec06fcc410

View File

@ -200,11 +200,6 @@ bool CPixmap::Cache (size_t channel, const char *pFilename, POINT totalDim,
return false;
}
m_SDLTextureInfo[channel].target = true;
m_SDLTextureInfo[channel].dimIcon = iconDim;
m_SDLTextureInfo[channel].dimTotal = totalDim;
m_SDLTextureInfo[channel].file = pFilename;
SDL_SetTextureBlendMode (m_SDLTextureInfo[channel].texture,
SDL_BLENDMODE_BLEND);
}
@ -216,6 +211,11 @@ bool CPixmap::Cache (size_t channel, const char *pFilename, POINT totalDim,
SDL_SetRenderTarget (g_renderer, nullptr);
}
m_SDLTextureInfo[channel].target = true;
m_SDLTextureInfo[channel].dimIcon = iconDim;
m_SDLTextureInfo[channel].dimTotal = totalDim;
m_SDLTextureInfo[channel].file = pFilename;
SDL_SetRenderTarget (g_renderer, m_SDLTextureInfo[channel].texture);
SDL_RenderCopy (g_renderer, texture, nullptr, nullptr);
SDL_SetRenderTarget (g_renderer, nullptr);