Created the Window and Renderer and started implementing the functions

for the game loop
This commit is contained in:
abdelrahman committed 2022-09-10 22:17:58 +01:00
1 parent a0d8b75c11
commit 33066b381e
11 files changed
+280 -24

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#ifndef WINDOW_H
#define WINDOW_H
#include "Renderer.h"
#include "SDL.h"
#include "SDL_pixels.h"
#include <stdbool.h>
typedef struct window {
int width;
int height;
Renderer *renderer;
SDL_Window *SDL_base_window;
} Window;
bool init_window(Window *wnd, const char *title, int width, int height,
bool full_screen);
void fill_window_with_color(const Window *wnd, SDL_Color color);
void swap_render_buffers(const Window *wnd);
void destroy_window(Window *wnd);
#endif // !WINDOW_H