'ifnot' template property + hpp

This commit is contained in:
MihailRis
2024-05-06 00:45:43 +03:00
parent 8b1c102cfe
commit 9ea67deb13
59 changed files with 204 additions and 201 deletions
+27
View File
@@ -0,0 +1,27 @@
#ifndef FRONTEND_BLOCKS_GFX_CACHE_HPP_
#define FRONTEND_BLOCKS_GFX_CACHE_HPP_
#include "../typedefs.h"
#include <memory>
class Content;
class Assets;
struct UVRegion;
class ContentGfxCache {
const Content* content;
// array of block sides uv regions (6 per block)
std::unique_ptr<UVRegion[]> sideregions;
public:
ContentGfxCache(const Content* content, Assets* assets);
~ContentGfxCache();
inline const UVRegion& getRegion(blockid_t id, int side) const {
return sideregions[id * 6 + side];
}
const Content* getContent() const;
};
#endif // FRONTEND_BLOCKS_GFX_CACHE_HPP_