X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftextscroller.cpp;h=1b911b1e13749d98658f0f590a448f851fe30bfb;hb=5e12121c11b1f2b6fe32fa285a6a40eece80fa91;hp=9038ede31ea12ac784ba89dda81007f235dd857a;hpb=073795dd0afc7d7e4c093db5f83fc26c10501d61;p=supertux.git diff --git a/src/textscroller.cpp b/src/textscroller.cpp index 9038ede31..1b911b1e1 100644 --- a/src/textscroller.cpp +++ b/src/textscroller.cpp @@ -153,12 +153,12 @@ void display_text_file(const std::string& file) if(center) { context.draw_text(font, line.substr(1, line.size()-1), - Vector(screen->w/2, screen->h + y - scroll), + Vector(SCREEN_WIDTH/2, SCREEN_HEIGHT + y - scroll), CENTER_ALLIGN, LAYER_FOREGROUND1); } else { context.draw_text(font, line.substr(1, line.size()-1), - Vector(left_border, screen->h + y - scroll), + Vector(left_border, SCREEN_HEIGHT + y - scroll), LEFT_ALLIGN, LAYER_FOREGROUND1); } @@ -167,7 +167,7 @@ void display_text_file(const std::string& file) context.do_drawing(); - if(screen->h+y-scroll < 0 && 20+screen->h+y-scroll < 0) + if(SCREEN_HEIGHT+y-scroll < 0 && 20+SCREEN_HEIGHT+y-scroll < 0) done = 1; Uint32 ticks = SDL_GetTicks(); @@ -239,7 +239,7 @@ InfoBox::draw(DrawingContext& context) if(center) { context.draw_text(font, line.substr(1, line.size()-1), - Vector(screen->w/2, y), + Vector(SCREEN_WIDTH/2, y), CENTER_ALLIGN, LAYER_GUI); } else { context.draw_text(font,