1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #include "client/rendering/block/BlockRenderers.h"
- const int BlockRenderers::RENDERER_AMOUNT = 4;
- BlockRenderer BlockRenderers::RENDERER[RENDERER_AMOUNT];
- BlockRenderers::BlockRenderers()
- {
- }
- const BlockRenderer& BlockRenderers::getBlockRenderer(BlockId id)
- {
- return RENDERER[id * (id >= 0 && id < RENDERER_AMOUNT)];
- }
- void BlockRenderers::init()
- {
- RENDERER[1].addCuboid(-1, -1, -1, 0, 0, 0,
- 0.25f, 0.0f, 0.3125f, 0.0625f,
- 0.125f, 0.0f, 0.1875f, 0.0625f,
- 0.1875f, 0.0f, 0.25f, 0.0625f,
- 0.1875f, 0.0f, 0.25f, 0.0625f,
- 0.1875f, 0.0f, 0.25f, 0.0625f,
- 0.1875f, 0.0f, 0.25f, 0.0625f);
-
- RENDERER[2].addCuboid(-1, -1, -1, 0, 0, 0,
- 0.125f, 0.0f, 0.1875f, 0.0625f,
- 0.125f, 0.0f, 0.1875f, 0.0625f,
- 0.125f, 0.0f, 0.1875f, 0.0625f,
- 0.125f, 0.0f, 0.1875f, 0.0625f,
- 0.125f, 0.0f, 0.1875f, 0.0625f,
- 0.125f, 0.0f, 0.1875f, 0.0625f);
-
- RENDERER[3].addCuboid(-1, -1, -1, 0, 0, 0,
- 0.0625f, 0.0f, 0.125f, 0.0625f,
- 0.0625f, 0.0f, 0.125f, 0.0625f,
- 0.0625f, 0.0f, 0.125f, 0.0625f,
- 0.0625f, 0.0f, 0.125f, 0.0625f,
- 0.0625f, 0.0f, 0.125f, 0.0625f,
- 0.0625f, 0.0f, 0.125f, 0.0625f);
- }
|