the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3#include "Tile_SPU.h"
4
5class QuartzBlockTile_SPU : public Tile_SPU
6{
7public:
8 static const int TYPE_DEFAULT = 0;
9 static const int TYPE_CHISELED = 1;
10 static const int TYPE_LINES_Y = 2;
11 static const int TYPE_LINES_X = 3;
12 static const int TYPE_LINES_Z = 4;
13
14 static const int QUARTZ_BLOCK_NAMES = 3;
15
16private:
17 static const int QUARTZ_BLOCK_TEXTURES = 5;
18
19// Icon *icons[QUARTZ_BLOCK_TEXTURES];
20// Icon *iconChiseledTop;
21// Icon *iconLinesTop;
22// Icon *iconTop;
23// Icon *iconBottom;
24
25public:
26 QuartzBlockTile_SPU(int id) : Tile_SPU(id) {}
27
28 Icon_SPU *getTexture(int face, int data)
29 {
30 if (data == TYPE_LINES_Y || data == TYPE_LINES_X || data == TYPE_LINES_Z)
31 {
32 if (data == TYPE_LINES_Y && (face == Facing::UP || face == Facing::DOWN))
33 {
34 return &ms_pTileData->quartzBlock_iconLinesTop;
35 }
36 else if (data == TYPE_LINES_X && (face == Facing::EAST || face == Facing::WEST))
37 {
38 return &ms_pTileData->quartzBlock_iconLinesTop;
39 }
40 else if (data == TYPE_LINES_Z && (face == Facing::NORTH || face == Facing::SOUTH))
41 {
42 return &ms_pTileData->quartzBlock_iconLinesTop;
43 }
44
45 return &ms_pTileData->quartzBlock_icons[data];
46 }
47
48 if (face == Facing::UP || (face == Facing::DOWN && data == TYPE_CHISELED))
49 {
50 if (data == TYPE_CHISELED)
51 {
52 return &ms_pTileData->quartzBlock_iconChiseledTop;
53 }
54 return &ms_pTileData->quartzBlock_iconTop;
55 }
56 if (face == Facing::DOWN)
57 {
58 return &ms_pTileData->quartzBlock_iconBottom;
59 }
60 if (data < 0 || data >= QUARTZ_BLOCK_TEXTURES) data = 0;
61 return &ms_pTileData->quartzBlock_icons[data];
62 }
63
64 int getRenderShape() { return Tile_SPU::SHAPE_QUARTZ; }
65};