Housekeeping
parent
f8c6c26ece
commit
73a2f00122
|
@ -1,9 +1,10 @@
|
|||
#include "asset.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assimp/cimport.h>
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/scene.h>
|
||||
|
||||
#include "asset.h"
|
||||
#include "logger.h"
|
||||
#include "tga.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define ASSET_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include "geometry.h"
|
||||
|
@ -40,4 +39,4 @@ struct Material {
|
|||
|
||||
const Solid* importSolid(const char* path);
|
||||
|
||||
#endif
|
||||
#endif // ASSET_H_
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <stddef.h>
|
||||
|
||||
#include "geometry.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
Transform identity() {
|
||||
return (Transform) { .a1 = 1.0f, .a2 = 0.0f, .a3 = 0.0f, .a4 = 0.0f,
|
||||
.b1 = 0.0f, .b2 = 1.0f, .b3 = 0.0f, .b4 = 0.0f,
|
||||
|
|
|
@ -23,4 +23,4 @@ Transform identity();
|
|||
void translate(Transform* transform, Vector3D vec);
|
||||
Vector3D translationOf(Transform transform);
|
||||
|
||||
#endif
|
||||
#endif // GEOMETRY_H_
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "logger.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
LogLevel logLevel = LOGLEVEL_DEBUG;
|
||||
|
||||
|
||||
|
|
|
@ -17,4 +17,4 @@ LogLevel logLevel;
|
|||
|
||||
void logMessage(LogLevel msgLevel, const char* func, const char* message, ...);
|
||||
|
||||
#endif
|
||||
#endif // LOGGER_H_
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define _POSIX_C_SOURCE 199309L
|
||||
#endif
|
||||
|
||||
#include "performance.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h> // TODO remove
|
||||
#include <time.h>
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
void initPerformanceMetering();
|
||||
void frameRendered();
|
||||
|
||||
#endif
|
||||
#endif // PERFORMANCE_H_
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#include <GL/glut.h>
|
||||
#include "render.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "geometry.h"
|
||||
#include "performance.h"
|
||||
#include "scene.h"
|
||||
|
||||
float viewportAspectRatio = 1.0f;
|
||||
const Scene* cameraAnchor;
|
||||
|
|
|
@ -9,4 +9,4 @@ const Scene* cameraAnchor;
|
|||
void initRender();
|
||||
void renderFrame();
|
||||
|
||||
#endif
|
||||
#endif // RENDER_H_
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#include "scene.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "engine/logger.h"
|
||||
|
||||
#include "geometry.h"
|
||||
#include "scene.h"
|
||||
|
||||
Scene* currentScene = NULL;
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "tga.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "tga.h"
|
||||
|
||||
TgaImage* readTga(const char* path) {
|
||||
FILE* tgaFile = fopen(path, "rb");
|
||||
if (tgaFile == NULL) {
|
||||
|
|
|
@ -29,4 +29,4 @@ typedef struct {
|
|||
|
||||
TgaImage* readTga(const char* path);
|
||||
|
||||
#endif
|
||||
#endif // TGA_H_
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <GL/gl.h>
|
||||
#include "ui.h"
|
||||
|
||||
#include "render.h"
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef GLUT_JANITOR_H_
|
||||
#define GLUT_JANITOR_H_
|
||||
#ifndef UI_H_
|
||||
#define UI_H_
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
void resizeStage(GLsizei width, GLsizei height);
|
||||
|
||||
#endif
|
||||
#endif // UI_H_
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#include <GL/gl.h>
|
||||
#include "level.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include "engine/logger.h"
|
||||
#include "engine/scene.h"
|
||||
|
||||
#include "level.h"
|
||||
#include "player.h"
|
||||
|
||||
BlockGrid levelGrid;
|
||||
|
|
|
@ -40,4 +40,4 @@ static inline void setBlockInGrid(BlockGrid grid, size_t x, size_t z, Block* blo
|
|||
grid.blocks[(z * grid.width) + x] = block;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // LEVEL_H_
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "player.h"
|
||||
|
||||
#include "engine/asset.h"
|
||||
#include "engine/render.h"
|
||||
|
||||
#include "player.h"
|
||||
|
||||
Scene* playerCharacter;
|
||||
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@ Scene* playerCharacter;
|
|||
void initPlayer();
|
||||
void spawnPlayer(Transform transform);
|
||||
|
||||
#endif
|
||||
#endif // PLAYER_H_
|
||||
|
|
Loading…
Reference in New Issue