]> git.lizzy.rs Git - shadowclad.git/commitdiff
Further apply type aliases and cleanup includes
authoroutfrost <kotlet.bahn@gmail.com>
Tue, 15 Jan 2019 13:51:59 +0000 (14:51 +0100)
committeroutfrost <kotlet.bahn@gmail.com>
Tue, 15 Jan 2019 13:51:59 +0000 (14:51 +0100)
debugutil.c
debugutil.h
level.c
render.c
tga.c

index 1f1e8988e0e7454019a40c5f483df92cf5df881b..ca6dba16acd8f4c20e94b4ac93f80c3d09ee4b26 100644 (file)
@@ -1,10 +1,10 @@
 #include <GL/gl.h>
-#include <assimp/scene.h>
-
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
 
+#include "assimp_types.h"
+
 char* getGlInfoString() {
        const char* glVersion = (const char*) glGetString(GL_VERSION);
        const char* glslVersion = (const char*) glGetString(GL_SHADING_LANGUAGE_VERSION);
@@ -25,7 +25,7 @@ char* getGlInfoString() {
        return glInfoString;
 }
 
-void dumpScene(FILE* stream, const struct aiScene* scene) {
+void dumpScene(FILE* stream, const AiScene* scene) {
        if (scene == NULL) {
                fprintf(stream, "NULL");
                return;
@@ -45,7 +45,7 @@ void dumpScene(FILE* stream, const struct aiScene* scene) {
                        (void*) (*scene).mLights);
 }
 
-void dumpNode(FILE* stream, const struct aiNode* node) {
+void dumpNode(FILE* stream, const AiNode* node) {
        if (node == NULL) {
                fprintf(stream, "NULL");
                return;
index cb82be9a688ca903bccd24ca1abbb92c9f96d9ab..bc5d346443ec66717d632181b667f92784227edd 100644 (file)
@@ -1,12 +1,12 @@
 #ifndef DEBUGUTIL_H_
 #define DEBUGUTIL_H_
 
-#include <assimp/scene.h>
-
 #include <stdio.h>
 
+#include "assimp_types.h"
+
 char* getGlInfoString();
-void dumpScene(FILE* stream, const struct aiScene* scene);
-void dumpNode(FILE* stream, const struct aiNode* node);
+void dumpScene(FILE* stream, const AiScene* scene);
+void dumpNode(FILE* stream, const AiNode* node);
 
 #endif
diff --git a/level.c b/level.c
index cec2d042e4e07b4c58668dd7f83f6302109cab1e..5e1cd6fbf5d73432e4cf834d48cdc0397fe1c5cd 100644 (file)
--- a/level.c
+++ b/level.c
@@ -24,7 +24,7 @@ void setImage(TgaImage* image) {
 }
 
 const AiScene* importScene(const char* path) {
-       const struct aiScene* scene = aiImportFile(path, 0u);
+       const AiScene* scene = aiImportFile(path, 0u);
        if (scene == NULL) {
                fprintf(stderr, "Asset import failed at file %s\n", path); // TODO factor logging the heck outta here
        }
index bceaec3f4497855df5cd6e729f798bee282961e7..63578dffac98cf652021373e5f18d8d0aa498927 100644 (file)
--- a/render.c
+++ b/render.c
@@ -1,11 +1,9 @@
 #include <GL/glut.h>
 
-#include "assimp_types.h"
-
 #include "level.h"
-#include "render.h"
 #include "typedefs.h"
 #include "performance.h"
+#include "render.h"
 
 const float AXIS_RADIUS = 5.0f;
 
diff --git a/tga.c b/tga.c
index 11c8b5e8ef1518c1c0d9d740aab62ae7801a889e..7ca9ef602b0aaa84388ebefe512b943a0eed2f0f 100644 (file)
--- a/tga.c
+++ b/tga.c
@@ -1,5 +1,3 @@
-#include <GL/gl.h>
-
 #include <stdlib.h>
 #include <stdio.h>