X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fworld.cpp;h=b4eca079ea2ff3eb4d68b363dc35dd6eb84aea87;hb=aadd77c676baae31db931c8e64cd1713c24289d5;hp=95ff32c96704887091269890c9833f24cb5dcfb4;hpb=234eef12ae725e40b14f9ebb7f8308fbe6fb06b8;p=supertux.git diff --git a/src/world.cpp b/src/world.cpp index 95ff32c96..b4eca079e 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -18,6 +18,7 @@ #include "screen.h" #include "defines.h" #include "world.h" +#include "level.h" #include "tile.h" texture_type img_distro[4]; @@ -95,8 +96,8 @@ World::draw() if(get_level()->bkgd_image[0] != '\0') { int s = (int)scroll_x / 30; - texture_draw_part(&img_bkgd,s,0,0,0,img_bkgd.w - s, img_bkgd.h); - texture_draw_part(&img_bkgd,0,0,screen->w - s ,0,s,img_bkgd.h); + texture_draw_part(&level->img_bkgd, s, 0,0,0,level->img_bkgd.w - s, level->img_bkgd.h); + texture_draw_part(&level->img_bkgd, 0, 0,screen->w - s ,0,s,level->img_bkgd.h); } else { @@ -399,7 +400,8 @@ void bouncy_brick_draw(bouncy_brick_type* pbouncy_brick) else { s = (int)scroll_x / 30; - texture_draw_part(&img_bkgd,dest.x + s,dest.y,dest.x,dest.y,dest.w,dest.h); + texture_draw_part(&plevel->img_bkgd, dest.x + s, dest.y, + dest.x, dest.y,dest.w,dest.h); } drawshape(pbouncy_brick->base.x - scroll_x,