37 lines
465 B
C
37 lines
465 B
C
/*
|
|
** main.c - Rotagon
|
|
**
|
|
** 2014 - Frank Villaro-Dixon <Frank@Villaro-Dixon.eu>
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "SDL/SDL.h"
|
|
#include "game.h"
|
|
#include "sdl.h"
|
|
|
|
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
struct s_game ga;
|
|
|
|
init_game(&ga);
|
|
init_SDL(&ga);
|
|
|
|
|
|
|
|
while(1) {
|
|
SDL_FillRect(ga.screen, NULL, 0);
|
|
get_keys(&ga);
|
|
draw_game(&ga);
|
|
SDL_Flip(ga.screen);
|
|
//get key
|
|
//do calcs
|
|
//collisions
|
|
SDL_Delay(10);
|
|
}
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|