mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
rename ContentLUT to ContentReport
This commit is contained in:
parent
c1ef4dbe9f
commit
3f826a88d3
13 changed files with 67 additions and 69 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
inline constexpr int CHUNK_DATA_LEN = CHUNK_VOL * 4;
|
||||
|
||||
class Lightmap;
|
||||
class ContentLUT;
|
||||
class ContentReport;
|
||||
class Inventory;
|
||||
|
||||
namespace dynamic {
|
||||
|
|
@ -71,5 +71,5 @@ public:
|
|||
/// @return true if all is fine
|
||||
bool decode(const ubyte* data);
|
||||
|
||||
static void convert(ubyte* data, const ContentLUT* lut);
|
||||
static void convert(ubyte* data, const ContentReport* report);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue