some stupid speed

This commit is contained in:
Frank Villaro-Dixon 2015-01-01 07:04:55 +01:00
parent 916c80435b
commit 2bb09b07f2
2 changed files with 7 additions and 7 deletions

4
game.h
View file

@ -10,8 +10,8 @@
#include "SDL/SDL.h"
#include "SDL_prims.h"
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define SCREEN_WIDTH 1000
#define SCREEN_HEIGHT 700
#define SCREEN_DIAGONAL (sqrt(SCREEN_HEIGHT*SCREEN_HEIGHT + SCREEN_WIDTH*SCREEN_WIDTH))

10
main.c
View file

@ -30,7 +30,7 @@ start:
while(1) {
SDL_FillRect(ga.screen, NULL, 0);
if(!(ga.counter % 30)) {
if(!(ga.counter % 28)) {
add_random_obstacle(&ga);
}
update_obstacles(&ga);
@ -51,10 +51,10 @@ start:
if(rand()%30 == 0) {
rotation += rand()%20 - 10;
if(rotation > 10)
rotation = 10;
if(rotation < -10)
rotation = -10;
if(rotation > 15)
rotation = 15;
if(rotation < -13)
rotation = -13;
}
ga.general_rotation += rotation;
ga.general_rotation %= ANGLE_MAX;