43 lines
No EOL
855 B
C
43 lines
No EOL
855 B
C
#ifndef V_CONST_H
|
|
#define V_CONST_H
|
|
#include "linmath.h"
|
|
|
|
typedef struct Vertex {
|
|
vec3 pos;
|
|
} Vertex;
|
|
|
|
typedef struct VertexI {
|
|
int pos[3];
|
|
} VertexI;
|
|
|
|
typedef struct Vertex2 {
|
|
vec2 pos;
|
|
} Vertex2;
|
|
|
|
#define CHUNK_LENGTH 16
|
|
#define CHUNK_RADIUS_H 8 // 8
|
|
#define CHUNK_RADIUS_V 4 // 4
|
|
|
|
#define TEXT_GAP_H 1 / 3.0
|
|
#define TEXT_GAP_V 1 / 1.0
|
|
|
|
#define CHUNK_DIAMETER_H (CHUNK_RADIUS_H * 2 + 1)
|
|
#define CHUNK_DIAMETER_V (CHUNK_RADIUS_V * 2 + 1)
|
|
#define CHUNK_ALL CHUNK_DIAMETER_H *CHUNK_DIAMETER_H *CHUNK_DIAMETER_V
|
|
#define BLOCK_ALL CHUNK_LENGTH *CHUNK_LENGTH *CHUNK_LENGTH
|
|
#define CBLOCK_ALL BLOCK_ALL *CHUNK_ALL
|
|
#define CBUF_ALL 25
|
|
|
|
#define CTRI_ALL CBLOCK_ALL * 18 * sizeof(Vertex)
|
|
|
|
#define MAX_R 1
|
|
|
|
typedef struct Chunk {
|
|
unsigned char exists;
|
|
unsigned int x;
|
|
unsigned int y;
|
|
unsigned int z;
|
|
unsigned int blocks[BLOCK_ALL];
|
|
} Chunk;
|
|
|
|
#endif |