ContentGfxCache

This commit is contained in:
MihailRis
2023-11-22 14:53:35 +03:00
parent bf4ad5ca58
commit d92347097e
14 changed files with 86 additions and 51 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifndef FRONTEND_BLOCKS_GFX_CACHE_H_
#define FRONTEND_BLOCKS_GFX_CACHE_H_
#include "../graphics/UVRegion.h"
#include "../typedefs.h"
class Content;
class Assets;
class ContentGfxCache {
// array of block sides uv regions (6 per block)
UVRegion* sideregions;
public:
ContentGfxCache(const Content* content, Assets* assets);
inline const UVRegion& getRegion(blockid_t id, int side) const {
return sideregions[id * 6 + side];
}
};
#endif // FRONTEND_BLOCKS_GFX_CACHE_H_