mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
the big refactor + extracted data classes from coders/json to data/dynamic
This commit is contained in:
parent
34d4500e24
commit
377c8e5029
36 changed files with 908 additions and 875 deletions
|
|
@ -8,12 +8,12 @@
|
|||
#include "../voxels/Block.h"
|
||||
|
||||
ContentGfxCache::ContentGfxCache(const Content* content, Assets* assets) {
|
||||
const ContentIndices* contentIds = content->indices;
|
||||
sideregions = new UVRegion[contentIds->countBlockDefs() * 6];
|
||||
auto indices = content->getIndices();
|
||||
sideregions = new UVRegion[indices->countBlockDefs() * 6];
|
||||
Atlas* atlas = assets->getAtlas("blocks");
|
||||
|
||||
for (uint i = 0; i < contentIds->countBlockDefs(); i++) {
|
||||
Block* def = contentIds->getBlockDef(i);
|
||||
for (uint i = 0; i < indices->countBlockDefs(); i++) {
|
||||
Block* def = indices->getBlockDef(i);
|
||||
for (uint side = 0; side < 6; side++) {
|
||||
std::string tex = def->textureFaces[side];
|
||||
if (atlas->has(tex)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue