rename ContentLUT to ContentReport

This commit is contained in:
MihailRis
2024-09-02 09:40:00 +03:00
parent c1ef4dbe9f
commit 3f826a88d3
13 changed files with 67 additions and 69 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
#include <utility>
#include "content/ContentLUT.hpp"
#include "content/ContentReport.hpp"
#include "items/Inventory.hpp"
#include "lighting/Lightmap.hpp"
#include "voxel.hpp"
@@ -123,13 +123,13 @@ bool Chunk::decode(const ubyte* data) {
return true;
}
void Chunk::convert(ubyte* data, const ContentLUT* lut) {
void Chunk::convert(ubyte* data, const ContentReport* report) {
for (uint i = 0; i < CHUNK_VOL; i++) {
// see encode method to understand what the hell is going on here
blockid_t id =
((static_cast<blockid_t>(data[i]) << 8) |
static_cast<blockid_t>(data[CHUNK_VOL + i]));
blockid_t replacement = lut->blocks.getId(id);
blockid_t replacement = report->blocks.getId(id);
data[i] = replacement >> 8;
data[CHUNK_VOL + i] = replacement & 0xFF;
}