Курсовая работа: Аркадна гра "гольф" з елементами трьохвимірної поверхні
{
idx = (idx-DIFF/2*GRIDSIZE + MASK) % MASK;
gy = START-1;
BlankGrid(0,0, GRIDSIZE-1, DIFF/2-1);
NewLand(0,0,GRIDSIZE/4,DIFF/2);
NewLand(GRIDSIZE/4,0,2*GRIDSIZE/4,DIFF/2);
NewLand(2*GRIDSIZE/4,0,3*GRIDSIZE/4,DIFF/2);
NewLand(3*GRIDSIZE/4,0,GRIDSIZE-1,DIFF/2);
}
else if (gy >= DIFF)
{
idx = (idx+DIFF/2*GRIDSIZE) % MASK;
gy = START+1;
BlankGrid(0,GRIDSIZE-DIFF/2,GRIDSIZE-1, GRIDSIZE-1);
NewLand(0,GRIDSIZE-DIFF/2-1,GRIDSIZE/4,GRIDSIZE-1);
NewLand(GRIDSIZE/4,GRIDSIZE-DIFF/2-1,
2*GRIDSIZE/4,GRIDSIZE-1);
NewLand(2*GRIDSIZE/4,GRIDSIZE-DIFF/2-1,
3*GRIDSIZE/4, GRIDSIZE-1);
NewLand(3*GRIDSIZE/4,GRIDSIZE-DIFF/2-1,
GRIDSIZE-1,GRIDSIZE-1);
}
}
void main(void)
{
int rollspeed = 0;
int xspeed = 0, yspeed = 0;
int i;
rand_seed = (unsigned) time(NULL);