the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 44 lines 1.1 kB view raw
1#pragma once 2#include "Tile_SPU.h" 3#include "Facing_SPU.h" 4 5class DiodeTile_SPU : public Tile_SPU 6{ 7public: 8 static const int DIRECTION_MASK = 0x3; 9 static const int DELAY_MASK = 0xC; 10 static const int DELAY_SHIFT = 2; 11 12 static const double DELAY_RENDER_OFFSETS[4]; 13 static const int DELAYS[4]; 14 15public: 16 DiodeTile_SPU(int id) : Tile_SPU(id) {} 17 virtual Icon_SPU *getTexture(int face, int data) 18 { 19 // down is used by the torch tesselator 20 if (face == Facing::DOWN) 21 { 22 if (id==diode_on_Id) 23 { 24 return TileRef_SPU(notGate_on_Id)->getTexture(face); 25 } 26 return TileRef_SPU(notGate_off_Id)->getTexture(face); 27 } 28 if (face == Facing::UP) 29 { 30 return icon(); 31 } 32 // edge of stone half-step 33 return TileRef_SPU(stoneSlab_Id)->getTexture(Facing::UP); 34 } 35 virtual bool shouldRenderFace(LevelSource *level, int x, int y, int z, int face) 36 { 37 if (face == Facing::DOWN || face == Facing::UP) 38 return false; 39 return true; 40 } 41 42 virtual int getRenderShape() { return SHAPE_DIODE; } 43 virtual bool isSolidRender(bool isServerLevel = false) { return false; } 44};