memory related refactor

This commit is contained in:
MihailRis 2024-04-14 19:17:51 +03:00
parent 8384ecf2c7
commit f5b3f3c33f
9 changed files with 177 additions and 159 deletions

View file

@ -4,6 +4,8 @@
#include "../constants.h"
#include "../typedefs.h"
#include <memory>
inline constexpr int LIGHTMAP_DATA_LEN = CHUNK_VOL/2;
// Lichtkarte
@ -81,8 +83,8 @@ public:
return (light >> (channel << 2)) & 0xF;
}
ubyte* encode() const;
static light_t* decode(ubyte* buffer);
std::unique_ptr<ubyte[]> encode() const;
static std::unique_ptr<light_t[]> decode(ubyte* buffer);
};
#endif /* LIGHTING_LIGHTMAP_H_ */