示例#1
0
void Display::snowCB(Fl_Value_Input* w, Display* c)
{
	Map* m = c->getMap();
	m->setSnow(w->value());
	GLWindow* win = c->getGWin();
	win->setMap(m);
	win->redraw();
}
示例#2
0
void Display::colorCB(Fl_Color_Chooser* color, Display* d)
{
	Map* m = d->getMap();
	m->setColor(color->r(), color->g(), color->b());
	GLWindow* win = d->getGWin();
	win->setMap(m);
	win->redraw();
}
示例#3
0
void Display::bothCB(Fl_Round_Button* b, Display* d)
{
	Map* m = d->getMap();
	m->setType(2);
	GLWindow* win = d->getGWin();
	win->setMap(m);
	win->redraw();
}
示例#4
0
void Display::subCB(Fl_Button* w, Display* c)
{
	Map* m = c->getMap();
	//std::cout<<m->getHeights(0, 0) << std::endl;
	m->fractalize();
	//std::cout << m->getHeights(5, 4) << std::endl;
	GLWindow* win = c->getGWin();
	win->setMap(m);
	win->redraw();
}
示例#5
0
void Display::hCB(Fl_Slider* s, Display* d)
{
	s->range(d->min, d->max);
	Map* m = d->getMap();
	m->changeCoord(d->tile_x, d->tile_y, s->value());
	float height = m->getHeights(d->tile_x, d->tile_y);
	s->value(height);
	GLWindow* win = d->getGWin();
	win->setMap(m);
	win->redraw();
}
示例#6
0
void Display::createCB(Fl_Button* w, Display* c){
	Map* m = c->getMap();
	c->tile_x = c->tile_y = 0;
	m->setSize(c->r,c->c,c->x,c->y);
	//std::cout << c->max << std::endl;
	m->setRange(c->max, c->min);
	m->createMap();
	GLWindow* win = c->getGWin();
	win->setColor(c->tile_x, c->tile_y);
	win->setMap(m);
	win->redraw();
}