mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
memory related refactor
This commit is contained in:
parent
8384ecf2c7
commit
f5b3f3c33f
9 changed files with 177 additions and 159 deletions
|
|
@ -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_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue