Map::Map(int width, int height, float resolution, Game& game) : width_(width), height_(height), grass_(al_map_rgb(15, 56, 15)), swamp_("swamp.png"), rock_("rocks.png"), tiles_(height_, std::vector<Tile>(width_)), game_(game) { bm_ = al_create_bitmap(width_ * 32 , height_ * 32); al_set_target_bitmap(bm_); swampgrassgen(resolution); updatevoisins(); drawswampgrass(); reseed(al_get_time() * 1000); rockgen(resolution); updatevoisins(); drawrock(); al_set_target_backbuffer(al_get_current_display()); }
void kRockSaver::slotTimeout() { drawrock( d ); timer.start( speed, TRUE ); }