+ if (i->solved)
+ context.draw_surface(leveldot_green,
+ Vector(i->pos.x*32, i->pos.y*32), LAYER_TILES+1);
+ else
+ context.draw_surface(leveldot_red,
+ Vector(i->pos.x*32, i->pos.y*32), LAYER_TILES+1);
+ }
+
+ for(SpecialTiles::iterator i = special_tiles.begin(); i != special_tiles.end(); ++i)
+ {
+ if(i->invisible)
+ continue;
+
+ if (i->teleport_dest != Vector(-1, -1))
+ context.draw_surface(teleporterdot,
+ Vector(i->pos.x*32, i->pos.y*32), LAYER_TILES+1);
+
+ else if (!i->map_message.empty() && !i->passive_message)
+ context.draw_surface(messagedot,
+ Vector(i->pos.x*32, i->pos.y*32), LAYER_TILES+1);
+ }
+
+ tux->draw(context);
+ draw_status(context);
+}
+
+void
+WorldMap::draw_status(DrawingContext& context)
+{
+ context.push_transform();
+ context.set_translation(Vector(0, 0));
+
+ char str[80];
+ sprintf(str, " %d", total_stats.get_points(SCORE_STAT));
+
+ context.draw_text(white_text, _("SCORE"), Vector(0, 0), LEFT_ALLIGN, LAYER_FOREGROUND1);
+ context.draw_text(gold_text, str, Vector(96, 0), LEFT_ALLIGN, LAYER_FOREGROUND1);
+
+ sprintf(str, "%d", player_status.coins);
+ context.draw_text(white_text, _("COINS"), Vector(SCREEN_WIDTH/2 - 16*5, 0),
+ LEFT_ALLIGN, LAYER_FOREGROUND1);
+ context.draw_text(gold_text, str, Vector(SCREEN_WIDTH/2 + (16*5)/2, 0),
+ LEFT_ALLIGN, LAYER_FOREGROUND1);
+
+ if (player_status.lives >= 5)
+ {
+ sprintf(str, "%dx", player_status.lives);
+ context.draw_text(gold_text, str,
+ Vector(SCREEN_WIDTH - gold_text->get_text_width(str) - tux_life->w, 0),
+ LEFT_ALLIGN, LAYER_FOREGROUND1);
+ context.draw_surface(tux_life, Vector(SCREEN_WIDTH -
+ gold_text->get_text_width("9"), 0), LAYER_FOREGROUND1);
+ }
+ else
+ {
+ for(int i= 0; i < player_status.lives; ++i)
+ context.draw_surface(tux_life,
+ Vector(SCREEN_WIDTH - tux_life->w*4 + (tux_life->w*i), 0),
+ LAYER_FOREGROUND1);
+ }
+ context.draw_text(white_text, _("LIVES"),
+ Vector(SCREEN_WIDTH - white_text->get_text_width(_("LIVES")) - white_text->get_text_width(" 99"), 0),
+ LEFT_ALLIGN, LAYER_FOREGROUND1);
+
+ if (!tux->is_moving())
+ {
+ for(Levels::iterator i = levels.begin(); i != levels.end(); ++i)
+ {
+ if (i->pos == tux->get_tile_pos())
+ {
+ if(i->title == "")
+ get_level_title(*i);
+
+ context.draw_text(white_text, i->title,
+ Vector(SCREEN_WIDTH/2,
+ SCREEN_HEIGHT - white_text->get_height() - 30),
+ CENTER_ALLIGN, LAYER_FOREGROUND1);
+
+ i->statistics.draw_worldmap_info(context);
+ break;
+ }
+ }
+ for(SpecialTiles::iterator i = special_tiles.begin(); i != special_tiles.end(); ++i)
+ {
+ if (i->pos == tux->get_tile_pos())
+ {
+ /* Display an in-map message in the map, if any as been selected */
+ if(!i->map_message.empty() && !i->passive_message)
+ context.draw_text(gold_text, i->map_message,
+ Vector(SCREEN_WIDTH/2,
+ SCREEN_HEIGHT - white_text->get_height() - 60),
+ CENTER_ALLIGN, LAYER_FOREGROUND1);
+ break;
+ }
+ }