Merge branch 'main' of github.com:Ty3r0X/funni-square
This commit is contained in:
commit
9281a0d505
|
@ -101,8 +101,8 @@ main (int argc, char *argv[]) {
|
||||||
printf ("Mouse cursor is inside the square at position (%d,%d)\n", main_event->motion.x, main_event->motion.y);
|
printf ("Mouse cursor is inside the square at position (%d,%d)\n", main_event->motion.x, main_event->motion.y);
|
||||||
ray.x *= -1;
|
ray.x *= -1;
|
||||||
ray.y *= -1;
|
ray.y *= -1;
|
||||||
rectangle->x = rand () % 500;
|
rectangle->x = rand () % (int) (SCREEN_WIDTH - 1 - RECT_SIZE);
|
||||||
rectangle->y = rand () % 500;
|
rectangle->y = rand () % (int) (SCREEN_HEIGHT - 1 - RECT_SIZE);
|
||||||
bg_red = rand () & HEX_POKE;
|
bg_red = rand () & HEX_POKE;
|
||||||
bg_green = rand () & HEX_POKE;
|
bg_green = rand () & HEX_POKE;
|
||||||
bg_blue = rand () & HEX_POKE;
|
bg_blue = rand () & HEX_POKE;
|
||||||
|
@ -111,7 +111,6 @@ main (int argc, char *argv[]) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
/* Constantly increment / decrement rectangle position */
|
/* Constantly increment / decrement rectangle position */
|
||||||
|
|
||||||
|
@ -120,4 +119,5 @@ main (int argc, char *argv[]) {
|
||||||
|
|
||||||
SDL_Delay (3);
|
SDL_Delay (3);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue