Exemplo n.º 1
0
Terrain::Terrain(int maxX, int maxY, int fequencyDivisor) {
    this->frequencyDivisor = fequencyDivisor;
    srand(time(NULL));
    for (int i = 0; i < maxX / fequencyDivisor; i++) {
        for (int j = 0; j < maxY / fequencyDivisor; j++) {
            createSeed(i, j);
        }
    }
    this->bounds = makeBounds(0, 0, maxY / frequencyDivisor, maxY / frequencyDivisor);
}
Exemplo n.º 2
0
void makeCursorBoundsSlider(Slider* s){
    float height = (float)glutBitmapWidth(GLUT_BITMAP_8_BY_13,'_') * 8./(13.*(float)Image_Height);
    float h = (s->bounds.y2-height) - s->bounds.y;
    s->cursorBounds = makeBounds(s->bounds.x+0.015 +(s->value) * s->bounds.width*0.8,s->bounds.y+h*0.3,
                                0.05 * s->bounds.width,h*0.5);
}