]> git.lizzy.rs Git - nothing.git/blobdiff - src/game/level/background.h
Merge pull request #1209 from isidentical/console-shortcuts
[nothing.git] / src / game / level / background.h
index da6dbbb74febb37a633af6c19f29f12de935673f..83bb6517f7fa09823011061539ad10dfe95e50c0 100644 (file)
@@ -1,18 +1,25 @@
 #ifndef BACKGROUND_H_
 #define BACKGROUND_H_
 
-#include <SDL2/SDL.h>
+#include <SDL.h>
 
 #include "color.h"
-#include "game/level/camera.h"
+#include "game/camera.h"
 
-typedef struct background_t background_t;
+typedef struct {
+    Color base_color;
+} Background;
 
-background_t *create_background(color_t base_color);
-void destroy_background(background_t *background);
+static inline
+Background create_background(Color base_color)
+{
+    Background result = {base_color};
+    return result;
+}
 
-int background_render(const background_t *background,
-                      SDL_Renderer *renderer,
-                      const camera_t *camera);
+int background_render(const Background *background,
+                      const Camera *camera);
+
+Color background_base_color(const Background *background);
 
 #endif  // BACKGROUND_H_