Updating changes
This commit is contained in:
8
Makefile
8
Makefile
@@ -0,0 +1,8 @@
|
||||
build:
|
||||
gcc -Wall -std=c99 ./src/*.c -o renderer
|
||||
|
||||
run:
|
||||
./renderer
|
||||
|
||||
clean:
|
||||
rm renderer
|
||||
|
||||
BIN
src/.main.c.swp
Normal file
BIN
src/.main.c.swp
Normal file
Binary file not shown.
23
src/main.c
23
src/main.c
@@ -1,6 +1,25 @@
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
SDL_Window* window = SDL_CreateWindow();
|
||||
|
||||
bool initialize_window(void) {
|
||||
if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
|
||||
fprintf(stderr, "Error initializing SDL.\n");
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
SDL_Window* window = SDL_CreateWindow();
|
||||
|
||||
// TODO: Create a SDL renderer
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
|
||||
initialize_window();
|
||||
|
||||
int main(void){
|
||||
printf("Hello, World!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user