Remove defunct code.

This removes code that relied on the defunct class ttexture. Since it will not be reintroduced it is instead removed completely.
This commit is contained in:
Andreas Löf 2015-08-04 22:59:45 +12:00
parent aae2ad77e6
commit f0613f48bd
3 changed files with 0 additions and 84 deletions

View file

@ -99,29 +99,6 @@ void twindow::set_icon(const surface& icon)
SDL_SetWindowIcon(window_, icon);
}
#if TTEXTURE
ttexture twindow::create_texture(const int access, const int w, const int h)
{
return ttexture(*SDL_GetRenderer(window_), pixel_format_, access, w, h);
}
ttexture twindow::create_texture(const int access,
SDL_Surface* source_surface__)
{
return ttexture(*SDL_GetRenderer(window_), access, source_surface__);
}
ttexture twindow::create_texture(const int access, const surface& surface)
{
return ttexture(*SDL_GetRenderer(window_), access, surface);
}
void twindow::draw(ttexture& texture, const int x, const int y)
{
texture.draw(*SDL_GetRenderer(window_), x, y);
}
#endif
twindow::operator SDL_Window*()
{
return window_;

View file

@ -133,57 +133,6 @@ public:
*/
void set_icon(const surface& icon);
#if TTEXTURE
/**
* Creates a texture for the renderer of this object.
*
* @param access Used as access for @ref SDL_CreateTexture.
* @param w Used as w for @ref SDL_CreateTexture.
* @param h Used as x for @ref SDL_CreateTexture.
*/
ttexture create_texture(const int access, const int w, const int h);
/**
* Creates a texture for the renderer.
*
* This is a helper function forwarded to the constructor of the
* @ref ttexture class.
*
* See @ref texture::ttexture.
*
* @param access Forwarded to @ref texture::ttexture.
* @param source_surface__ Forwarded to @ref texture::ttexture.
*/
ttexture create_texture(const int access, SDL_Surface* source_surface__);
/**
* Creates a texture for the renderer.
*
* This is a helper function forwarded to the constructor of the
* @ref ttexture class.
*
* See @ref texture::ttexture.
*
* @param access Forwarded to @ref texture::ttexture.
* @param surface Forwarded to @ref texture::ttexture.
*/
ttexture create_texture(const int access, const surface& surface);
/***** ***** ***** Draw function overloads. ***** ***** *****/
/**
* Draw a texture on the window's renderer.
*
* The function is forwareded to @ref ttexture::draw.
*
* @param texture The texture whose draw function to call.
* @param x Forwarded to @ref ttexture::draw.
* @param y Forwarded to @ref ttexture::draw.
*/
void draw(ttexture& texture, const int x, const int y);
#endif
/***** ***** ***** Conversion operators. ***** ***** *****/
/**

View file

@ -320,16 +320,6 @@ void part_ui::render_background()
video_.getSurface()
);
sdl_blit(background_, NULL, video_.getSurface(), NULL);
#if 0
sdl::twindow *wnd = CVideo::get_window();
wnd->fill(0, 0, 0);
for (size_t i = 0; i<background_images_.size(); i++) {
const int x = background_positions_[i].first;
const int y = background_positions_[i].second;
wnd->draw(background_images_[i], x, y);
}
#endif
#else
#ifdef SDL_GPU
GPU_Target *target = get_render_target();