summaryrefslogtreecommitdiff
path: root/src/pig.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-09-25 15:53:34 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-09-26 18:05:06 -0700
commit6f1584f3d16ed04934da9bb1a7591ae3d4127b9a (patch)
tree1aaab8234b6fed387e50a4743d91b8c669e92540 /src/pig.c
parent68fd6f2d4e18582a9966f9e6eb96dc23565116da (diff)
pig: drop unnecessary pig.h, make pig_t private
Diffstat (limited to 'src/pig.c')
-rw-r--r--src/pig.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/pig.c b/src/pig.c
index f206271..6c11c67 100644
--- a/src/pig.c
+++ b/src/pig.c
@@ -26,10 +26,10 @@
#include "glad.h"
#include "m4f.h"
#include "macros.h"
-#include "pig.h"
#include "sad-node.h"
#include "shader-node.h"
#include "shader.h"
+#include "v3f.h"
#define PIG_DEFAULT_WIDTH 640
#define PIG_DEFAULT_HEIGHT 480
@@ -40,6 +40,19 @@
#define PIG_ASPECT_RATIO .7
#endif
+typedef struct pig_t {
+ SDL_Window *window;
+ SDL_GLContext *gl;
+ stage_t *stage;
+ stage_t *sadface;
+ unsigned window_width, window_height;
+ unsigned windowed:1;
+ m4f_t transform;
+ float seed;
+ v3f_t color;
+} pig_t;
+
+
static inline float randf(void)
{
return rand() * (1.f / (float)RAND_MAX);
© All Rights Reserved