From 6f1584f3d16ed04934da9bb1a7591ae3d4127b9a Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 25 Sep 2021 15:53:34 -0700 Subject: pig: drop unnecessary pig.h, make pig_t private --- src/Makefile.am | 1 - src/pig.c | 15 ++++++++++++++- src/pig.h | 39 --------------------------------------- 3 files changed, 14 insertions(+), 41 deletions(-) delete mode 100644 src/pig.h (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 0088044..b6bf5f0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -9,7 +9,6 @@ pig_SOURCES = \ glad.c \ glad.h \ pig.c \ - pig.h \ KHR/khrplatform.h \ macros.h \ main.c \ 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); diff --git a/src/pig.h b/src/pig.h deleted file mode 100644 index 849e290..0000000 --- a/src/pig.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2020 - Vito Caputo - - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3 as published - * by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef _PIG_H -#define _PIG_H - -#include - -#include - -#include "m4f.h" -#include "v3f.h" - -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; - -#endif -- cgit v1.2.3