minimize defines

This commit is contained in:
Ara
2023-12-04 22:50:00 +06:00
parent e0eacb51be
commit e45d85bc5a
17 changed files with 92 additions and 86 deletions
+7 -7
View File
@@ -25,14 +25,14 @@
#include <fstream>
#include <iostream>
#define SECTION_POSITION 1
#define SECTION_ROTATION 2
#define SECTION_FLAGS 3
#define PLAYER_FLAG_FLIGHT 0x1
#define PLAYER_FLAG_NOCLIP 0x2
const int SECTION_POSITION = 1;
const int SECTION_ROTATION = 2;
const int SECTION_FLAGS = 3;
const int PLAYER_FLAG_FLIGHT = 0x1;
const int PLAYER_FLAG_NOCLIP = 0x2;
#define WORLD_SECTION_MAIN 1
#define WORLD_SECTION_DAYNIGHT 2
const int WORLD_SECTION_MAIN = 1;
const int WORLD_SECTION_DAYNIGHT = 2;
using glm::ivec2;
using glm::vec3;
+5 -5
View File
@@ -13,13 +13,13 @@
#include "../typedefs.h"
#define REGION_SIZE_BIT 5
#define REGION_SIZE (1 << (REGION_SIZE_BIT))
#define REGION_VOL ((REGION_SIZE) * (REGION_SIZE))
#define REGION_FORMAT_VERSION 1
const uint REGION_SIZE_BIT = 5;
const uint REGION_SIZE = (1 << (REGION_SIZE_BIT));
const uint REGION_VOL = ((REGION_SIZE) * (REGION_SIZE));
const uint REGION_FORMAT_VERSION = 1;
const uint WORLD_FORMAT_VERSION = 1;
#define REGION_FORMAT_MAGIC ".VOXREG"
#define WORLD_FORMAT_MAGIC ".VOXWLD"
#define WORLD_FORMAT_VERSION 1
class Player;
class Chunk;