snake-pp/main.cpp
jonny_jr9 5bba3e1531 Add source files, Fix header files - Compiles now
- Add empty source files for all planned modules
- Add source files to CMAKE source list
- Fix and extend header files so there are no errors
- Create global structs in game.c and config.c
2023-11-08 09:52:25 +01:00

38 lines
626 B
C++

#include "SDL.h"
extern "C" {
#include "food.h"
}
//initialize SDL window
//ruft gameInit auf
//uninitialize SDL
int main(int argc, char *argv[])
{
SDL_Init(SDL_INIT_VIDEO);
SDL_Window *window = SDL_CreateWindow(
"SDL2Test",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
640,
480,
0
);
SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_SOFTWARE);
SDL_SetRenderDrawColor(renderer, 0, 0, 0, SDL_ALPHA_OPAQUE);
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
SDL_Delay(1000);
SDL_DestroyWindow(window);
SDL_Quit();
placeFood(3);
return 0;
}