Ejemplo n.º 1
0
Archivo: map.cpp Proyecto: faod/ld33
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());
}
Ejemplo n.º 2
0
void kRockSaver::slotTimeout()
{
	drawrock( d );
	timer.start( speed, TRUE );
}