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 "HalfSlabTile_SPU.h"
4#include "Facing_SPU.h"
5
6class StoneSlabTile_SPU : public HalfSlabTile_SPU
7{
8public:
9 static const int STONE_SLAB = 0;
10 static const int SAND_SLAB = 1;
11 static const int WOOD_SLAB = 2;
12 static const int COBBLESTONE_SLAB = 3;
13 static const int BRICK_SLAB = 4;
14 static const int SMOOTHBRICK_SLAB = 5;
15 static const int NETHERBRICK_SLAB = 6;
16 static const int QUARTZ_SLAB = 7;
17
18 static const int SLAB_NAMES_LENGTH = 8;
19
20
21
22public:
23 StoneSlabTile_SPU(int id) : HalfSlabTile_SPU(id) {}
24
25 virtual Icon_SPU *getTexture(int face, int data)
26 {
27 int type = data & TYPE_MASK;
28 if (fullSize() && (data & TOP_SLOT_BIT) != 0)
29 {
30 face = Facing::UP;
31 }
32 switch(type)
33 {
34 case STONE_SLAB:
35 if (face == Facing::UP || face == Facing::DOWN)
36 return icon();
37 return &ms_pTileData->stoneSlab_iconSide;
38 break;
39 case SAND_SLAB:
40 return TileRef_SPU(sandStone_Id)->getTexture(face); //Tile::sandStone->getTexture(face);
41 case WOOD_SLAB:
42 return TileRef_SPU(wood_Id)->getTexture(face); //Tile::wood->getTexture(face);
43 case COBBLESTONE_SLAB:
44 return TileRef_SPU(stoneBrick_Id)->getTexture(face); //Tile::stoneBrick->getTexture(face);
45 case BRICK_SLAB:
46 return TileRef_SPU(redBrick_Id)->getTexture(face); //Tile::redBrick->getTexture(face);
47 case SMOOTHBRICK_SLAB:
48 return TileRef_SPU(stoneBrickSmooth_Id)->getTexture(face); //Tile::stoneBrickSmooth->getTexture(face, SmoothStoneBrickTile::TYPE_DEFAULT);
49 case NETHERBRICK_SLAB:
50 return TileRef_SPU(netherBrick_Id)->getTexture(Facing::UP); //Tile::netherBrick->getTexture(Facing::UP);
51 case QUARTZ_SLAB:
52 return TileRef_SPU(quartzBlock_Id)->getTexture(face); //Tile::quartzBlock->getTexture(face);
53
54 }
55
56 return icon();
57 }
58
59
60};