Remove dynamically allocated memory
This commit is contained in:
7 files changed
+21
-35
No files matched your search
+7
-1
@@ -3,6 +3,12 @@
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
// CONSTANTS
|
||||
#define WINDOW_WIDTH (1920)
|
||||
#define WINDOW_HEIGHT (1080)
|
||||
#define WINDOW_FPS (30)
|
||||
|
||||
|
||||
// ENUMS
|
||||
enum Engine_Input
|
||||
{
|
||||
@@ -27,7 +33,7 @@ enum Engine_Input
|
||||
struct Engine_Buffer
|
||||
{
|
||||
uint32_t *buffer;
|
||||
float *zbuffer;
|
||||
float zbuffer[WINDOW_HEIGHT][WINDOW_WIDTH];
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
+4
-1
@@ -6,14 +6,17 @@
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
// CONSTANTS
|
||||
#define VERTEX_LIMIT (20000)
|
||||
#define FACE_LIMIT (30000)
|
||||
#define MATERIAL_LIMIT (10)
|
||||
#define TEXTURE_SIZE_LIMIT (1024)
|
||||
|
||||
|
||||
// STRUCTURES
|
||||
struct Texture
|
||||
{
|
||||
ColorU32 **texels;
|
||||
ColorU32 texels[TEXTURE_SIZE_LIMIT][TEXTURE_SIZE_LIMIT];
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
};
|
||||
|
||||
+1
-2
@@ -41,8 +41,7 @@ struct LightDiffuse
|
||||
struct LightList
|
||||
{
|
||||
LightAmbient ambient;
|
||||
LightDiffuse *diffuse;
|
||||
int diffuseCount;
|
||||
LightDiffuse diffuse;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user