+
+ if (m_textures[TEX_LAYER_BACKGROUND].tile)
+ {
+ v2u32 tilesize(
+ MYMAX(sourcesize.X,m_textures[TEX_LAYER_BACKGROUND].minsize),
+ MYMAX(sourcesize.Y,m_textures[TEX_LAYER_BACKGROUND].minsize));
+ for (unsigned int x = 0; x < screensize.X; x += tilesize.X )
+ {
+ for (unsigned int y = 0; y < screensize.Y; y += tilesize.Y )
+ {
+ driver->draw2DImage(texture,
+ core::rect<s32>(x, y, x+tilesize.X, y+tilesize.Y),
+ core::rect<s32>(0, 0, sourcesize.X, sourcesize.Y),
+ NULL, NULL, true);
+ }
+ }
+ return;
+ }
+
+ /* Draw background texture */