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