Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -17,10 +17,10 @@ public:
|
||||
|
||||
BedTile_SPU(int id) : Tile_SPU(id) {}
|
||||
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return nullptr; }
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return NULL; }
|
||||
virtual int getRenderShape() { return Tile_SPU::SHAPE_BED; }
|
||||
virtual bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
setShape();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
virtual bool blocksLight() { return false; }
|
||||
virtual bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
virtual bool isCubeShaped() { return false; }
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
int data = level->getData(x, y, z);
|
||||
int dir = data & 7;
|
||||
|
||||
@@ -5,7 +5,7 @@ class CakeTile_SPU : public Tile_SPU
|
||||
{
|
||||
public:
|
||||
CakeTile_SPU(int id) : Tile_SPU(id) {}
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
int d = level->getData(x, y, z);
|
||||
float r = 1 / 16.0f;
|
||||
|
||||
@@ -6,7 +6,7 @@ class CauldronTile_SPU : public Tile_SPU
|
||||
{
|
||||
public:
|
||||
CauldronTile_SPU(int id) : Tile_SPU(id) {}
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return nullptr; }
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return NULL; }
|
||||
//@Override
|
||||
// virtual void updateDefaultShape();
|
||||
virtual bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
|
||||
@@ -241,12 +241,12 @@ void ChunkRebuildData::createTileData()
|
||||
m_tileData.signalSource.set(i, Tile::tiles[i]->isSignalSource());
|
||||
m_tileData.cubeShaped.set(i, Tile::tiles[i]->isCubeShaped());
|
||||
|
||||
m_tileData.xx0[i] = static_cast<float>(Tile::tiles[i]->getShapeX0());
|
||||
m_tileData.yy0[i] = static_cast<float>(Tile::tiles[i]->getShapeY0());
|
||||
m_tileData.zz0[i] = static_cast<float>(Tile::tiles[i]->getShapeZ0());
|
||||
m_tileData.xx1[i] = static_cast<float>(Tile::tiles[i]->getShapeX1());
|
||||
m_tileData.yy1[i] = static_cast<float>(Tile::tiles[i]->getShapeY1());
|
||||
m_tileData.zz1[i] = static_cast<float>(Tile::tiles[i]->getShapeZ1());
|
||||
m_tileData.xx0[i] = (float)Tile::tiles[i]->getShapeX0();
|
||||
m_tileData.yy0[i] = (float)Tile::tiles[i]->getShapeY0();
|
||||
m_tileData.zz0[i] = (float)Tile::tiles[i]->getShapeZ0();
|
||||
m_tileData.xx1[i] = (float)Tile::tiles[i]->getShapeX1();
|
||||
m_tileData.yy1[i] = (float)Tile::tiles[i]->getShapeY1();
|
||||
m_tileData.zz1[i] = (float)Tile::tiles[i]->getShapeZ1();
|
||||
Icon* pTex = Tile::tiles[i]->icon;
|
||||
if(pTex)
|
||||
{
|
||||
@@ -269,17 +269,17 @@ void ChunkRebuildData::createTileData()
|
||||
setIconSPUFromIcon(&m_tileData.grass_iconSideOverlay, Tile::grass->iconSideOverlay);
|
||||
|
||||
// ThinFence
|
||||
setIconSPUFromIcon(&m_tileData.ironFence_EdgeTexture, static_cast<ThinFenceTile *>(Tile::ironFence)->getEdgeTexture());
|
||||
setIconSPUFromIcon(&m_tileData.thinGlass_EdgeTexture, static_cast<ThinFenceTile *>(Tile::thinGlass)->getEdgeTexture());
|
||||
setIconSPUFromIcon(&m_tileData.ironFence_EdgeTexture, ((ThinFenceTile*)Tile::ironFence)->getEdgeTexture());
|
||||
setIconSPUFromIcon(&m_tileData.thinGlass_EdgeTexture, ((ThinFenceTile*)Tile::thinGlass)->getEdgeTexture());
|
||||
|
||||
//FarmTile
|
||||
setIconSPUFromIcon(&m_tileData.farmTile_Dry, static_cast<FarmTile *>(Tile::farmland)->iconDry);
|
||||
setIconSPUFromIcon(&m_tileData.farmTile_Wet, static_cast<FarmTile *>(Tile::farmland)->iconWet);
|
||||
setIconSPUFromIcon(&m_tileData.farmTile_Dry, ((FarmTile*)Tile::farmland)->iconDry);
|
||||
setIconSPUFromIcon(&m_tileData.farmTile_Wet, ((FarmTile*)Tile::farmland)->iconWet);
|
||||
|
||||
// DoorTile
|
||||
for(int i=0;i<8; i++)
|
||||
{
|
||||
setIconSPUFromIcon(&m_tileData.doorTile_Icons[i], static_cast<DoorTile *>(Tile::door_wood)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.doorTile_Icons[i], ((DoorTile*)Tile::door_wood)->icons[i]);
|
||||
// we're not supporting flipped icons, so manually flip here
|
||||
if(i>=4)
|
||||
m_tileData.doorTile_Icons[i].flipHorizontal();
|
||||
@@ -291,20 +291,20 @@ void ChunkRebuildData::createTileData()
|
||||
|
||||
// SandStoneTile
|
||||
for(int i=0;i<3; i++)
|
||||
setIconSPUFromIcon(&m_tileData.sandStone_icons[i], static_cast<SandStoneTile *>(Tile::sandStone)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.sandStone_iconTop, static_cast<SandStoneTile *>(Tile::sandStone)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.sandStone_iconBottom, static_cast<SandStoneTile *>(Tile::sandStone)->iconBottom);
|
||||
setIconSPUFromIcon(&m_tileData.sandStone_icons[i], ((SandStoneTile*)Tile::sandStone)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.sandStone_iconTop, ((SandStoneTile*)Tile::sandStone)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.sandStone_iconBottom, ((SandStoneTile*)Tile::sandStone)->iconBottom);
|
||||
|
||||
// WoodTile
|
||||
// assert(WoodTile_SPU::WOOD_NAMES_LENGTH == 4);
|
||||
for(int i=0;i<4; i++)
|
||||
setIconSPUFromIcon(&m_tileData.woodTile_icons[i], static_cast<WoodTile *>(Tile::wood)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.woodTile_icons[i], ((WoodTile*)Tile::wood)->icons[i]);
|
||||
|
||||
// TreeTile
|
||||
// assert(TreeTile_SPU::TREE_NAMES_LENGTH == 4);
|
||||
for(int i=0;i<4; i++)
|
||||
setIconSPUFromIcon(&m_tileData.treeTile_icons[i], static_cast<TreeTile *>(Tile::treeTrunk)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.treeTile_iconTop, static_cast<TreeTile *>(Tile::treeTrunk)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.treeTile_icons[i], ((TreeTile*)Tile::treeTrunk)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.treeTile_iconTop, ((TreeTile*)Tile::treeTrunk)->iconTop);
|
||||
|
||||
// LeafTile
|
||||
for(int i=0;i<2; i++)
|
||||
@@ -313,12 +313,12 @@ void ChunkRebuildData::createTileData()
|
||||
|
||||
// CropTile
|
||||
for(int i=0;i<8; i++)
|
||||
setIconSPUFromIcon(&m_tileData.cropTile_icons[i], static_cast<CropTile *>(Tile::crops)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.cropTile_icons[i], ((CropTile*)Tile::crops)->icons[i]);
|
||||
|
||||
// FurnaceTile
|
||||
setIconSPUFromIcon(&m_tileData.furnaceTile_iconTop, static_cast<FurnaceTile *>(Tile::furnace)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.furnaceTile_iconFront, static_cast<FurnaceTile *>(Tile::furnace)->iconFront);
|
||||
setIconSPUFromIcon(&m_tileData.furnaceTile_iconFront_lit, static_cast<FurnaceTile *>(Tile::furnace_lit)->iconFront);
|
||||
setIconSPUFromIcon(&m_tileData.furnaceTile_iconTop, ((FurnaceTile*)Tile::furnace)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.furnaceTile_iconFront, ((FurnaceTile*)Tile::furnace)->iconFront);
|
||||
setIconSPUFromIcon(&m_tileData.furnaceTile_iconFront_lit, ((FurnaceTile*)Tile::furnace_lit)->iconFront);
|
||||
|
||||
//LiquidTile
|
||||
setIconSPUFromIcon(&m_tileData.liquidTile_iconWaterStill, (Tile::water)->icons[0]);
|
||||
@@ -332,64 +332,64 @@ void ChunkRebuildData::createTileData()
|
||||
|
||||
// Sapling
|
||||
for(int i=0;i<4;i++)
|
||||
setIconSPUFromIcon(&m_tileData.sapling_icons[i], static_cast<Sapling *>(Tile::sapling)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.sapling_icons[i], ((Sapling*)Tile::sapling)->icons[i]);
|
||||
|
||||
m_tileData.glassTile_allowSame = static_cast<GlassTile *>(Tile::glass)->allowSame;
|
||||
m_tileData.iceTile_allowSame = static_cast<IceTile *>(Tile::ice)->allowSame;
|
||||
m_tileData.glassTile_allowSame = ((GlassTile*)Tile::glass)->allowSame;
|
||||
m_tileData.iceTile_allowSame = ((IceTile*)Tile::ice)->allowSame;
|
||||
|
||||
// DispenserTile
|
||||
setIconSPUFromIcon(&m_tileData.dispenserTile_iconTop, static_cast<DispenserTile *>(Tile::dispenser)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.dispenserTile_iconFront, static_cast<DispenserTile *>(Tile::dispenser)->iconFront);
|
||||
setIconSPUFromIcon(&m_tileData.dispenserTile_iconFrontVertical, static_cast<DispenserTile *>(Tile::dispenser)->iconFrontVertical);
|
||||
setIconSPUFromIcon(&m_tileData.dispenserTile_iconTop, ((DispenserTile*)Tile::dispenser)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.dispenserTile_iconFront, ((DispenserTile*)Tile::dispenser)->iconFront);
|
||||
setIconSPUFromIcon(&m_tileData.dispenserTile_iconFrontVertical, ((DispenserTile*)Tile::dispenser)->iconFrontVertical);
|
||||
|
||||
// RailTile
|
||||
setIconSPUFromIcon(&m_tileData.railTile_iconTurn, static_cast<RailTile *>(Tile::rail)->iconTurn);
|
||||
setIconSPUFromIcon(&m_tileData.railTile_iconTurnGolden, static_cast<RailTile *>(Tile::goldenRail)->iconTurn);
|
||||
setIconSPUFromIcon(&m_tileData.railTile_iconTurn, ((RailTile*)Tile::rail)->iconTurn);
|
||||
setIconSPUFromIcon(&m_tileData.railTile_iconTurnGolden, ((RailTile*)Tile::goldenRail)->iconTurn);
|
||||
|
||||
for(int i=0;i<2;i++)
|
||||
setIconSPUFromIcon(&m_tileData.detectorRailTile_icons[i], static_cast<DetectorRailTile *>(Tile::detectorRail)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.detectorRailTile_icons[i], ((DetectorRailTile*)Tile::detectorRail)->icons[i]);
|
||||
|
||||
// tntTile
|
||||
setIconSPUFromIcon(&m_tileData.tntTile_iconBottom, static_cast<TntTile *>(Tile::tnt)->iconBottom);
|
||||
setIconSPUFromIcon(&m_tileData.tntTile_iconTop, static_cast<TntTile *>(Tile::tnt)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.tntTile_iconBottom, ((TntTile*)Tile::tnt)->iconBottom);
|
||||
setIconSPUFromIcon(&m_tileData.tntTile_iconTop, ((TntTile*)Tile::tnt)->iconTop);
|
||||
|
||||
// workbenchTile
|
||||
setIconSPUFromIcon(&m_tileData.workBench_iconFront, static_cast<WorkbenchTile *>(Tile::workBench)->iconFront);
|
||||
setIconSPUFromIcon(&m_tileData.workBench_iconTop, static_cast<WorkbenchTile *>(Tile::workBench)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.workBench_iconFront, ((WorkbenchTile*)Tile::workBench)->iconFront);
|
||||
setIconSPUFromIcon(&m_tileData.workBench_iconTop, ((WorkbenchTile*)Tile::workBench)->iconTop);
|
||||
|
||||
// cactusTile
|
||||
setIconSPUFromIcon(&m_tileData.cactusTile_iconTop, static_cast<CactusTile *>(Tile::cactus)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.cactusTile_iconBottom, static_cast<CactusTile *>(Tile::cactus)->iconBottom);
|
||||
setIconSPUFromIcon(&m_tileData.cactusTile_iconTop, ((CactusTile*)Tile::cactus)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.cactusTile_iconBottom, ((CactusTile*)Tile::cactus)->iconBottom);
|
||||
|
||||
// recordPlayer
|
||||
setIconSPUFromIcon(&m_tileData.recordPlayer_iconTop, static_cast<RecordPlayerTile *>(Tile::recordPlayer)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.recordPlayer_iconTop, ((RecordPlayerTile*)Tile::recordPlayer)->iconTop);
|
||||
|
||||
// pumpkin
|
||||
setIconSPUFromIcon(&m_tileData.pumpkinTile_iconTop, static_cast<PumpkinTile *>(Tile::pumpkin)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.pumpkinTile_iconFace, static_cast<PumpkinTile *>(Tile::pumpkin)->iconFace);
|
||||
setIconSPUFromIcon(&m_tileData.pumpkinTile_iconFaceLit, static_cast<PumpkinTile *>(Tile::litPumpkin)->iconFace);
|
||||
setIconSPUFromIcon(&m_tileData.pumpkinTile_iconTop, ((PumpkinTile*)Tile::pumpkin)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.pumpkinTile_iconFace, ((PumpkinTile*)Tile::pumpkin)->iconFace);
|
||||
setIconSPUFromIcon(&m_tileData.pumpkinTile_iconFaceLit, ((PumpkinTile*)Tile::litPumpkin)->iconFace);
|
||||
|
||||
// cakeTile
|
||||
setIconSPUFromIcon(&m_tileData.cakeTile_iconTop, static_cast<CakeTile *>(Tile::cake)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.cakeTile_iconBottom, static_cast<CakeTile *>(Tile::cake)->iconBottom);
|
||||
setIconSPUFromIcon(&m_tileData.cakeTile_iconInner, static_cast<CakeTile *>(Tile::cake)->iconInner);
|
||||
setIconSPUFromIcon(&m_tileData.cakeTile_iconTop, ((CakeTile*)Tile::cake)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.cakeTile_iconBottom, ((CakeTile*)Tile::cake)->iconBottom);
|
||||
setIconSPUFromIcon(&m_tileData.cakeTile_iconInner, ((CakeTile*)Tile::cake)->iconInner);
|
||||
|
||||
// SmoothStoneBrickTile
|
||||
for(int i=0;i<4;i++)
|
||||
setIconSPUFromIcon(&m_tileData.smoothStoneBrick_icons[i], static_cast<SmoothStoneBrickTile *>(Tile::stoneBrickSmooth)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.smoothStoneBrick_icons[i], ((SmoothStoneBrickTile*)Tile::stoneBrickSmooth)->icons[i]);
|
||||
|
||||
// HugeMushroomTile
|
||||
for(int i=0;i<2;i++)
|
||||
setIconSPUFromIcon(&m_tileData.hugeMushroom_icons[i], static_cast<HugeMushroomTile *>(Tile::hugeMushroom1)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.hugeMushroom_iconStem, static_cast<HugeMushroomTile *>(Tile::hugeMushroom1)->iconStem);
|
||||
setIconSPUFromIcon(&m_tileData.hugeMushroom_iconInside, static_cast<HugeMushroomTile *>(Tile::hugeMushroom1)->iconInside);
|
||||
setIconSPUFromIcon(&m_tileData.hugeMushroom_icons[i], ((HugeMushroomTile*)Tile::hugeMushroom1)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.hugeMushroom_iconStem, ((HugeMushroomTile*)Tile::hugeMushroom1)->iconStem);
|
||||
setIconSPUFromIcon(&m_tileData.hugeMushroom_iconInside, ((HugeMushroomTile*)Tile::hugeMushroom1)->iconInside);
|
||||
|
||||
|
||||
// MelonTile
|
||||
setIconSPUFromIcon(&m_tileData.melonTile_iconTop, static_cast<MelonTile *>(Tile::melon)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.melonTile_iconTop, ((MelonTile*)Tile::melon)->iconTop);
|
||||
|
||||
// StemTile
|
||||
setIconSPUFromIcon(&m_tileData.stemTile_iconAngled, static_cast<StemTile *>(Tile::melonStem)->iconAngled);
|
||||
setIconSPUFromIcon(&m_tileData.stemTile_iconAngled, ((StemTile*)Tile::melonStem)->iconAngled);
|
||||
|
||||
// MycelTile
|
||||
setIconSPUFromIcon(&m_tileData.mycelTile_iconTop, (Tile::mycel)->iconTop);
|
||||
@@ -397,14 +397,14 @@ void ChunkRebuildData::createTileData()
|
||||
|
||||
// NetherStalkTile
|
||||
for(int i=0;i<3;i++)
|
||||
setIconSPUFromIcon(&m_tileData.netherStalk_icons[i], static_cast<NetherStalkTile *>(Tile::netherStalk)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.netherStalk_icons[i], ((NetherStalkTile*)Tile::netherStalk)->icons[i]);
|
||||
|
||||
// EnchantmentTableTile
|
||||
setIconSPUFromIcon(&m_tileData.enchantmentTable_iconTop, static_cast<EnchantmentTableTile *>(Tile::enchantTable)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.enchantmentTable_iconBottom, static_cast<EnchantmentTableTile *>(Tile::enchantTable)->iconBottom);
|
||||
setIconSPUFromIcon(&m_tileData.enchantmentTable_iconTop, ((EnchantmentTableTile*)Tile::enchantTable)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.enchantmentTable_iconBottom, ((EnchantmentTableTile*)Tile::enchantTable)->iconBottom);
|
||||
|
||||
//BrewingStandTile
|
||||
setIconSPUFromIcon(&m_tileData.brewingStand_iconBase, static_cast<BrewingStandTile *>(Tile::brewingStand)->iconBase);
|
||||
setIconSPUFromIcon(&m_tileData.brewingStand_iconBase, ((BrewingStandTile*)Tile::brewingStand)->iconBase);
|
||||
|
||||
//RedStoneDust
|
||||
setIconSPUFromIcon(&m_tileData.redStoneDust_iconCross, (Tile::redStoneDust)->iconCross);
|
||||
@@ -412,32 +412,32 @@ void ChunkRebuildData::createTileData()
|
||||
setIconSPUFromIcon(&m_tileData.redStoneDust_iconCrossOver, (Tile::redStoneDust)->iconCrossOver);
|
||||
setIconSPUFromIcon(&m_tileData.redStoneDust_iconLineOver, (Tile::redStoneDust)->iconLineOver);
|
||||
|
||||
setIconSPUFromIcon(&m_tileData.stoneSlab_iconSide, static_cast<StoneSlabTile *>(Tile::stoneSlab)->iconSide);
|
||||
setIconSPUFromIcon(&m_tileData.stoneSlab_iconSide, ((StoneSlabTile*)(Tile::stoneSlab))->iconSide);
|
||||
|
||||
for(int i=0;i<16;i++)
|
||||
setIconSPUFromIcon(&m_tileData.clothTile_icons[i], static_cast<ClothTile *>(Tile::cloth)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.clothTile_icons[i], ((ClothTile*)Tile::cloth)->icons[i]);
|
||||
|
||||
// CarrotTile
|
||||
for(int i=0;i<4;i++)
|
||||
setIconSPUFromIcon(&m_tileData.carrot_icons[i], static_cast<CarrotTile *>(Tile::carrots)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.carrot_icons[i], ((CarrotTile*)Tile::carrots)->icons[i]);
|
||||
|
||||
// PotatoTile
|
||||
for(int i=0;i<4;i++)
|
||||
setIconSPUFromIcon(&m_tileData.potato_icons[i], static_cast<PotatoTile *>(Tile::potatoes)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.potato_icons[i], ((PotatoTile*)Tile::potatoes)->icons[i]);
|
||||
|
||||
// AnvilTile
|
||||
for(int i=0;i<3;i++)
|
||||
setIconSPUFromIcon(&m_tileData.anvil_icons[i], static_cast<AnvilTile *>(Tile::anvil)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.anvil_icons[i], ((AnvilTile*)Tile::anvil)->icons[i]);
|
||||
|
||||
|
||||
// QuartzBlockTile
|
||||
for(int i=0;i<5;i++)
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_icons[i], static_cast<QuartzBlockTile *>(Tile::quartzBlock)->icons[i]);
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_icons[i], ((QuartzBlockTile*)Tile::quartzBlock)->icons[i]);
|
||||
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_iconChiseledTop, static_cast<QuartzBlockTile *>(Tile::quartzBlock)->iconChiseledTop);
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_iconLinesTop, static_cast<QuartzBlockTile *>(Tile::quartzBlock)->iconLinesTop);
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_iconTop, static_cast<QuartzBlockTile *>(Tile::quartzBlock)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_iconBottom, static_cast<QuartzBlockTile *>(Tile::quartzBlock)->iconBottom);
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_iconChiseledTop, ((QuartzBlockTile*)Tile::quartzBlock)->iconChiseledTop);
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_iconLinesTop, ((QuartzBlockTile*)Tile::quartzBlock)->iconLinesTop);
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_iconTop, ((QuartzBlockTile*)Tile::quartzBlock)->iconTop);
|
||||
setIconSPUFromIcon(&m_tileData.quartzBlock_iconBottom, ((QuartzBlockTile*)Tile::quartzBlock)->iconBottom);
|
||||
}
|
||||
|
||||
// extern int g_lastHitBlockX;
|
||||
@@ -696,7 +696,7 @@ bool ChunkRebuildData::isEmptyTile(int x, int y, int z)
|
||||
bool ChunkRebuildData::isSolidRenderTile(int x, int y, int z)
|
||||
{
|
||||
TileRef_SPU tile(getTile(x,y,z));
|
||||
if (tile.getPtr() == nullptr) return false;
|
||||
if (tile.getPtr() == NULL) return false;
|
||||
|
||||
|
||||
// 4J - addition here to make rendering big blocks of leaves more efficient. Normally leaves never consider themselves as solid, so
|
||||
@@ -727,7 +727,7 @@ bool ChunkRebuildData::isSolidRenderTile(int x, int y, int z)
|
||||
bool ChunkRebuildData::isSolidBlockingTile(int x, int y, int z)
|
||||
{
|
||||
TileRef_SPU tile(getTile(x, y, z));
|
||||
if (tile.getPtr() == nullptr) return false;
|
||||
if (tile.getPtr() == NULL) return false;
|
||||
bool ret = tile->getMaterial()->blocksMotion() && tile->isCubeShaped();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
virtual bool blocksLight() { return false; }
|
||||
virtual bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
virtual int getRenderShape() { return Tile_SPU::SHAPE_DOOR; }
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr); // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL); // 4J added forceData, forceEntity param
|
||||
|
||||
int getDir(ChunkRebuildData *level, int x, int y, int z);
|
||||
bool isOpen(ChunkRebuildData *level, int x, int y, int z);
|
||||
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
Icon_SPU *getTexture(int face, int data) { return TileRef_SPU(wood_Id)->getTexture(face); }
|
||||
static int getDirection(int data) { return (data & DIRECTION_MASK); }
|
||||
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param // Brought forward from 1.2.3
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param // Brought forward from 1.2.3
|
||||
{
|
||||
int data = getDirection(level->getData(x, y, z));
|
||||
if (data == Direction::NORTH || data == Direction::SOUTH)
|
||||
|
||||
@@ -59,7 +59,7 @@ bool FenceTile_SPU::connectsTo(ChunkRebuildData *level, int x, int y, int z)
|
||||
return true;
|
||||
}
|
||||
TileRef_SPU tileInstance(tile);
|
||||
if (tileInstance.getPtr() != nullptr)
|
||||
if (tileInstance.getPtr() != NULL)
|
||||
{
|
||||
if (tileInstance->getMaterial()->isSolidBlocking() && tileInstance->isCubeShaped())
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ class FenceTile_SPU : public Tile_SPU
|
||||
{
|
||||
public:
|
||||
FenceTile_SPU(int id) : Tile_SPU(id) {}
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr); // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL); // 4J added forceData, forceEntity param
|
||||
virtual bool blocksLight();
|
||||
virtual bool isSolidRender(bool isServerLevel = false);
|
||||
virtual int getRenderShape();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "Facing_SPU.h"
|
||||
#include "ChunkRebuildData.h"
|
||||
|
||||
void HalfSlabTile_SPU::updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData /* = -1 */, TileEntity* forceEntity /* = nullptr */)
|
||||
void HalfSlabTile_SPU::updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData /* = -1 */, TileEntity* forceEntity /* = NULL */)
|
||||
{
|
||||
if (fullSize())
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ public:
|
||||
static const int TOP_SLOT_BIT = 8;
|
||||
|
||||
HalfSlabTile_SPU(int id) : Tile_SPU(id) {}
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr); // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL); // 4J added forceData, forceEntity param
|
||||
virtual void updateDefaultShape();
|
||||
virtual bool isSolidRender(bool isServerLevel);
|
||||
virtual bool shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, int face);
|
||||
|
||||
@@ -24,29 +24,29 @@ public:
|
||||
|
||||
void set(int16_t _x, int16_t _y, int16_t _w, int16_t _h, int texWidth, int texHeight)
|
||||
{
|
||||
x0 = static_cast<int16_t>(4096 * (float(_x) / texWidth));
|
||||
y0 = static_cast<int16_t>(4096 * (float(_y) / texHeight));
|
||||
x1 = x0 + static_cast<int16_t>(4096 * (float(_w) / texWidth));
|
||||
y1 = y0 + static_cast<int16_t>(4096 * (float(_h) / texHeight));
|
||||
x0 = (int16_t)(4096 * (float(_x) / texWidth));
|
||||
y0 = (int16_t)(4096 * (float(_y) / texHeight));
|
||||
x1 = x0 + (int16_t)(4096 * (float(_w) / texWidth));
|
||||
y1 = y0 + (int16_t)(4096 * (float(_h) / texHeight));
|
||||
}
|
||||
|
||||
void flipHorizontal() { int16_t temp = x0; x0 = x1; x1 = temp; }
|
||||
void flipVertical() { int16_t temp = y0; y0 = y1; y1 = temp; }
|
||||
|
||||
float getU0() const { return (static_cast<float>(x0) / 4096) + UVAdjust; }//sc_texWidth) + getUAdjust(); }
|
||||
float getU1() const { return (static_cast<float>(x1) / 4096.0f) - UVAdjust; } //sc_texWidth) - getUAdjust(); }
|
||||
float getU0() const { return (float(x0) / 4096) + UVAdjust; }//sc_texWidth) + getUAdjust(); }
|
||||
float getU1() const { return (float(x1) / 4096.0f) - UVAdjust; } //sc_texWidth) - getUAdjust(); }
|
||||
float getU(double offset) const
|
||||
{
|
||||
float diff = getU1() - getU0();
|
||||
return getU0() + (diff * (static_cast<float>(offset) / 16));//SharedConstants::WORLD_RESOLUTION));
|
||||
return getU0() + (diff * ((float) offset / 16));//SharedConstants::WORLD_RESOLUTION));
|
||||
}
|
||||
|
||||
float getV0() const { return (static_cast<float>(y0) / 4096.0f) + UVAdjust; } //sc_texHeight) + getVAdjust(); }
|
||||
float getV1() const { return (static_cast<float>(y1) / 4096.0f) - UVAdjust; } //sc_texHeight) - getVAdjust(); }
|
||||
float getV0() const { return (float(y0) / 4096.0f) + UVAdjust; } //sc_texHeight) + getVAdjust(); }
|
||||
float getV1() const { return (float(y1) / 4096.0f) - UVAdjust; } //sc_texHeight) - getVAdjust(); }
|
||||
float getV(double offset) const
|
||||
{
|
||||
float diff = getV1() - getV0();
|
||||
return getV0() + (diff * (static_cast<float>(offset) / 16)); //SharedConstants::WORLD_RESOLUTION));
|
||||
return getV0() + (diff * ((float) offset / 16)); //SharedConstants::WORLD_RESOLUTION));
|
||||
}
|
||||
|
||||
// virtual wstring getName() const = 0;
|
||||
|
||||
@@ -211,12 +211,12 @@ double LiquidTile_SPU::getSlopeAngle(ChunkRebuildData *level, int x, int y, int
|
||||
if (m->getID() == Material_SPU::water_Id)
|
||||
{
|
||||
TileRef_SPU tRef(Tile_SPU::water_Id);
|
||||
flow = static_cast<LiquidTile_SPU *>(tRef.getPtr())->getFlow(level, x, y, z);
|
||||
flow = ((LiquidTile_SPU*)tRef.getPtr())->getFlow(level, x, y, z);
|
||||
}
|
||||
if (m->getID() == Material_SPU::lava_Id)
|
||||
{
|
||||
TileRef_SPU tRef(Tile_SPU::lava_Id);
|
||||
flow = static_cast<LiquidTile_SPU *>(tRef.getPtr())->getFlow(level, x, y, z);
|
||||
flow = ((LiquidTile_SPU*)tRef.getPtr())->getFlow(level, x, y, z);
|
||||
}
|
||||
if (flow.x == 0 && flow.z == 0) return -1000;
|
||||
return atan2(flow.z, flow.x) - MATH_PI / 2;
|
||||
|
||||
@@ -8,7 +8,7 @@ class PistonBaseTile_SPU : public Tile_SPU
|
||||
public:
|
||||
PistonBaseTile_SPU(int id) : Tile_SPU(id) {}
|
||||
// virtual void updateShape(float x0, float y0, float z0, float x1, float y1, float z1);
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return nullptr; }
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return NULL; }
|
||||
virtual int getRenderShape() { return SHAPE_PISTON_BASE; }
|
||||
virtual bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ class PistonExtensionTile_SPU : public Tile_SPU
|
||||
|
||||
public:
|
||||
PistonExtensionTile_SPU(int id) : Tile_SPU(id) {}
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return nullptr; }
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return NULL; }
|
||||
virtual int getRenderShape() { return SHAPE_PISTON_EXTENSION; }
|
||||
virtual bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
// virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, shared_ptr<TileEntity> forceEntity = shared_ptr<TileEntity>()); // 4J added forceData, forceEntity param
|
||||
|
||||
@@ -10,7 +10,7 @@ public:
|
||||
|
||||
virtual int getRenderShape() { return SHAPE_INVISIBLE; }
|
||||
virtual bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(LevelSource *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
// should never get here.
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class PortalTile_SPU : public HalfTransparentTile_SPU
|
||||
{
|
||||
public:
|
||||
PortalTile_SPU(int id): HalfTransparentTile_SPU(id) {}
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
if (level->getTile(x - 1, y, z) == id || level->getTile(x + 1, y, z) == id)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,6 @@ public:
|
||||
virtual bool isSolidRender(bool isServerLevel = false);
|
||||
virtual bool blocksLight();
|
||||
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr); // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL); // 4J added forceData, forceEntity param
|
||||
virtual void updateDefaultShape();
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ public:
|
||||
|
||||
RailTile_SPU(int id) : Tile_SPU(id) {}
|
||||
virtual bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
int data = level->getData(x, y, z);
|
||||
if (data >= 2 && data <= 5)
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
case TEXTURE_CROSS_OVERLAY: return &ms_pTileData->redStoneDust_iconCrossOver;
|
||||
case TEXTURE_LINE_OVERLAY: return &ms_pTileData->redStoneDust_iconLineOver;
|
||||
}
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool shouldConnectTo(ChunkRebuildData *level, int x, int y, int z, int direction)
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
}
|
||||
|
||||
Icon_SPU *getTexture(int face, int data){ return TileRef_SPU(wood_Id)->getTexture(face); }
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
if (onGround()) return;
|
||||
int face = level->getData(x, y, z);
|
||||
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
|
||||
public:
|
||||
StairTile_SPU(int id) : Tile_SPU(id) {}
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr); // 4J added forceData, forceEntity param
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL); // 4J added forceData, forceEntity param
|
||||
bool isSolidRender(bool isServerLevel = false);
|
||||
int getRenderShape();
|
||||
void setBaseShape(ChunkRebuildData *level, int x, int y, int z);
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
this->setShape(0.5f - ss, 0, 0.5f - ss, 0.5f + ss, 0.25f, 0.5f + ss);
|
||||
}
|
||||
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
ms_pTileData->yy1[id] = (level->getData(x, y, z) * 2 + 2) / 16.0f;
|
||||
float ss = 0.125f;
|
||||
|
||||
@@ -68,7 +68,7 @@ typedef unsigned short hfloat;
|
||||
hfloat convertFloatToHFloat(float f)
|
||||
{
|
||||
unsigned int x = *(unsigned int *)&f;
|
||||
unsigned int sign = static_cast<unsigned short>(x >> 31);
|
||||
unsigned int sign = (unsigned short)(x >> 31);
|
||||
unsigned int mantissa;
|
||||
unsigned int exp;
|
||||
hfloat hf;
|
||||
@@ -90,8 +90,8 @@ hfloat convertFloatToHFloat(float f)
|
||||
// 16-bit half-float representation stores number as Inf
|
||||
mantissa = 0;
|
||||
}
|
||||
hf = (static_cast<hfloat>(sign) << 15) | static_cast<hfloat>(HALF_FLOAT_MAX_BIASED_EXP) |
|
||||
static_cast<hfloat>(mantissa >> 13);
|
||||
hf = (((hfloat)sign) << 15) | (hfloat)(HALF_FLOAT_MAX_BIASED_EXP) |
|
||||
(hfloat)(mantissa >> 13);
|
||||
}
|
||||
// check if exponent is <= -15
|
||||
else if (exp <= HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP)
|
||||
@@ -101,13 +101,13 @@ hfloat convertFloatToHFloat(float f)
|
||||
exp = (HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP - exp) >> 23;
|
||||
mantissa >>= (14 + exp);
|
||||
|
||||
hf = (static_cast<hfloat>(sign) << 15) | static_cast<hfloat>(mantissa);
|
||||
hf = (((hfloat)sign) << 15) | (hfloat)(mantissa);
|
||||
}
|
||||
else
|
||||
{
|
||||
hf = (static_cast<hfloat>(sign) << 15) |
|
||||
static_cast<hfloat>((exp - HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP) >> 13) |
|
||||
static_cast<hfloat>(mantissa >> 13);
|
||||
hf = (((hfloat)sign) << 15) |
|
||||
(hfloat)((exp - HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP) >> 13) |
|
||||
(hfloat)(mantissa >> 13);
|
||||
}
|
||||
|
||||
return hf;
|
||||
@@ -115,8 +115,8 @@ hfloat convertFloatToHFloat(float f)
|
||||
|
||||
float convertHFloatToFloat(hfloat hf)
|
||||
{
|
||||
unsigned int sign = static_cast<unsigned int>(hf >> 15);
|
||||
unsigned int mantissa = static_cast<unsigned int>(hf & ((1 << 10) - 1));
|
||||
unsigned int sign = (unsigned int)(hf >> 15);
|
||||
unsigned int mantissa = (unsigned int)(hf & ((1 << 10) - 1));
|
||||
unsigned int exp = (unsigned int)(hf & HALF_FLOAT_MAX_BIASED_EXP);
|
||||
unsigned int f;
|
||||
|
||||
@@ -170,7 +170,7 @@ float convertHFloatToFloat(hfloat hf)
|
||||
//
|
||||
Tesselator_SPU *Tesselator_SPU::getInstance()
|
||||
{
|
||||
return nullptr;
|
||||
return NULL;
|
||||
// return (Tesselator_SPU *)TlsGetValue(tlsIdx);
|
||||
}
|
||||
|
||||
@@ -329,12 +329,12 @@ void Tesselator_SPU::tex2(int tex2)
|
||||
|
||||
void Tesselator_SPU::color(float r, float g, float b)
|
||||
{
|
||||
color(static_cast<int>(r * 255), static_cast<int>(g * 255), static_cast<int>(b * 255));
|
||||
color((int) (r * 255), (int) (g * 255), (int) (b * 255));
|
||||
}
|
||||
|
||||
void Tesselator_SPU::color(float r, float g, float b, float a)
|
||||
{
|
||||
color(static_cast<int>(r * 255), static_cast<int>(g * 255), static_cast<int>(b * 255), static_cast<int>(a * 255));
|
||||
color((int) (r * 255), (int) (g * 255), (int) (b * 255), (int) (a * 255));
|
||||
}
|
||||
|
||||
void Tesselator_SPU::color(int r, int g, int b)
|
||||
@@ -539,7 +539,7 @@ void Tesselator_SPU::vertex(float x, float y, float z)
|
||||
// see comments in packCompactQuad() for exact format
|
||||
if( useCompactFormat360 )
|
||||
{
|
||||
unsigned int ucol = static_cast<unsigned int>(col);
|
||||
unsigned int ucol = (unsigned int)col;
|
||||
|
||||
#ifdef _XBOX
|
||||
// Pack as 4:4:4 RGB_
|
||||
@@ -564,7 +564,7 @@ void Tesselator_SPU::vertex(float x, float y, float z)
|
||||
unsigned short packedcol = ((col & 0xf8000000 ) >> 16 ) |
|
||||
((col & 0x00fc0000 ) >> 13 ) |
|
||||
((col & 0x0000f800 ) >> 11 );
|
||||
int ipackedcol = static_cast<int>(packedcol) & 0xffff; // 0 to 65535 range
|
||||
int ipackedcol = ((int)packedcol) & 0xffff; // 0 to 65535 range
|
||||
|
||||
ipackedcol -= 32768; // -32768 to 32767 range
|
||||
ipackedcol &= 0xffff;
|
||||
@@ -597,12 +597,12 @@ void Tesselator_SPU::vertex(float x, float y, float z)
|
||||
pShortData[7] = ((INT_ROUND(tex2V * (8192.0f/256.0f)))&0xffff);
|
||||
incData(4);
|
||||
#else
|
||||
pShortData[0] = (static_cast<int>((x + xo) * 1024.0f)&0xffff);
|
||||
pShortData[1] = (static_cast<int>((y + yo) * 1024.0f)&0xffff);
|
||||
pShortData[2] = (static_cast<int>((z + zo) * 1024.0f)&0xffff);
|
||||
pShortData[0] = (((int)((x + xo ) * 1024.0f))&0xffff);
|
||||
pShortData[1] = (((int)((y + yo ) * 1024.0f))&0xffff);
|
||||
pShortData[2] = (((int)((z + zo ) * 1024.0f))&0xffff);
|
||||
pShortData[3] = ipackedcol;
|
||||
pShortData[4] = (static_cast<int>(uu * 8192.0f)&0xffff);
|
||||
pShortData[5] = (static_cast<int>(v * 8192.0f)&0xffff);
|
||||
pShortData[4] = (((int)(uu * 8192.0f))&0xffff);
|
||||
pShortData[5] = (((int)(v * 8192.0f))&0xffff);
|
||||
pShortData[6] = ((int16_t*)&_tex2)[0];
|
||||
pShortData[7] = ((int16_t*)&_tex2)[1];
|
||||
incData(4);
|
||||
@@ -723,9 +723,9 @@ void Tesselator_SPU::noColor()
|
||||
void Tesselator_SPU::normal(float x, float y, float z)
|
||||
{
|
||||
hasNormal = true;
|
||||
byte xx = static_cast<byte>(x * 127);
|
||||
byte yy = static_cast<byte>(y * 127);
|
||||
byte zz = static_cast<byte>(z * 127);
|
||||
byte xx = (byte) (x * 127);
|
||||
byte yy = (byte) (y * 127);
|
||||
byte zz = (byte) (z * 127);
|
||||
|
||||
_normal = (xx & 0xff) | ((yy & 0xff) << 8) | ((zz & 0xff) << 16);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class TheEndPortalFrameTile_SPU : public Tile_SPU
|
||||
{
|
||||
public:
|
||||
TheEndPortalFrameTile_SPU(int id) : Tile_SPU(id) {}
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return nullptr; }
|
||||
virtual Icon_SPU *getTexture(int face, int data) { return NULL; }
|
||||
virtual bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
virtual int getRenderShape() { return SHAPE_PORTAL_FRAME; }
|
||||
// virtual void updateDefaultShape();
|
||||
|
||||
@@ -74,7 +74,7 @@ Icon_SPU *ThinFenceTile_SPU::getEdgeTexture()
|
||||
#ifndef SN_TARGET_PS3_SPU
|
||||
assert(0);
|
||||
#endif
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool ThinFenceTile_SPU::attachsTo(int tile)
|
||||
|
||||
@@ -11,7 +11,7 @@ public:
|
||||
virtual int getRenderShape();
|
||||
virtual bool shouldRenderFace(ChunkRebuildData *level, int x, int y, int z, int face);
|
||||
virtual void updateDefaultShape();
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr); // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL); // 4J added forceData, forceEntity param
|
||||
virtual Icon_SPU *getEdgeTexture();
|
||||
bool attachsTo(int tile);
|
||||
};
|
||||
|
||||
@@ -71,7 +71,7 @@ const float smallUV = ( 1.0f / 16.0f );
|
||||
|
||||
void TileRenderer_SPU::_init()
|
||||
{
|
||||
fixedTexture = nullptr;
|
||||
fixedTexture = NULL;
|
||||
xFlipTexture = false;
|
||||
noCulling = false;
|
||||
blsmooth = 1;
|
||||
@@ -103,7 +103,7 @@ TileRenderer_SPU::TileRenderer_SPU( ChunkRebuildData* level )
|
||||
|
||||
TileRenderer_SPU::TileRenderer_SPU()
|
||||
{
|
||||
this->level = nullptr;
|
||||
this->level = NULL;
|
||||
_init();
|
||||
}
|
||||
|
||||
@@ -122,12 +122,12 @@ void TileRenderer_SPU::setFixedTexture( Icon_SPU *fixedTexture )
|
||||
|
||||
void TileRenderer_SPU::clearFixedTexture()
|
||||
{
|
||||
this->fixedTexture = nullptr;
|
||||
this->fixedTexture = NULL;
|
||||
}
|
||||
|
||||
bool TileRenderer_SPU::hasFixedTexture()
|
||||
{
|
||||
return fixedTexture != nullptr;
|
||||
return fixedTexture != NULL;
|
||||
}
|
||||
|
||||
void TileRenderer_SPU::setShape(float x0, float y0, float z0, float x1, float y1, float z1)
|
||||
@@ -270,7 +270,7 @@ bool TileRenderer_SPU::tesselateInWorld( Tile_SPU* tt, int x, int y, int z, int
|
||||
retVal = tesselateStemInWorld( tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_LILYPAD:
|
||||
retVal = tesselateLilypadInWorld( static_cast<WaterlilyTile_SPU *>(tt), x, y, z );
|
||||
retVal = tesselateLilypadInWorld( (WaterlilyTile_SPU*)tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_ROWS:
|
||||
retVal = tesselateRowInWorld( tt, x, y, z );
|
||||
@@ -279,7 +279,7 @@ bool TileRenderer_SPU::tesselateInWorld( Tile_SPU* tt, int x, int y, int z, int
|
||||
retVal = tesselateTorchInWorld( tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_FIRE:
|
||||
retVal = tesselateFireInWorld( static_cast<FireTile_SPU *>(tt), x, y, z );
|
||||
retVal = tesselateFireInWorld( (FireTile_SPU *)tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_RED_DUST:
|
||||
retVal = tesselateDustInWorld( tt, x, y, z );
|
||||
@@ -291,19 +291,19 @@ bool TileRenderer_SPU::tesselateInWorld( Tile_SPU* tt, int x, int y, int z, int
|
||||
retVal = tesselateDoorInWorld( tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_RAIL:
|
||||
retVal = tesselateRailInWorld( static_cast<RailTile_SPU *>(tt), x, y, z );
|
||||
retVal = tesselateRailInWorld( ( RailTile_SPU* )tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_STAIRS:
|
||||
retVal = tesselateStairsInWorld( static_cast<StairTile_SPU *>(tt), x, y, z );
|
||||
retVal = tesselateStairsInWorld( (StairTile_SPU *)tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_EGG:
|
||||
retVal = tesselateEggInWorld(static_cast<EggTile_SPU *>(tt), x, y, z);
|
||||
retVal = tesselateEggInWorld((EggTile_SPU*) tt, x, y, z);
|
||||
break;
|
||||
case Tile_SPU::SHAPE_FENCE:
|
||||
retVal = tesselateFenceInWorld( static_cast<FenceTile_SPU *>(tt), x, y, z );
|
||||
retVal = tesselateFenceInWorld( ( FenceTile_SPU* )tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_WALL:
|
||||
retVal = tesselateWallInWorld( static_cast<WallTile_SPU *>(tt), x, y, z);
|
||||
retVal = tesselateWallInWorld( (WallTile_SPU *) tt, x, y, z);
|
||||
break;
|
||||
case Tile_SPU::SHAPE_LEVER:
|
||||
retVal = tesselateLeverInWorld( tt, x, y, z );
|
||||
@@ -318,7 +318,7 @@ bool TileRenderer_SPU::tesselateInWorld( Tile_SPU* tt, int x, int y, int z, int
|
||||
retVal = tesselateBedInWorld( tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_DIODE:
|
||||
retVal = tesselateDiodeInWorld( static_cast<DiodeTile_SPU *>(tt), x, y, z );
|
||||
retVal = tesselateDiodeInWorld( (DiodeTile_SPU *)tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_PISTON_BASE:
|
||||
retVal = tesselatePistonBaseInWorld( tt, x, y, z, false, forceData );
|
||||
@@ -333,7 +333,7 @@ bool TileRenderer_SPU::tesselateInWorld( Tile_SPU* tt, int x, int y, int z, int
|
||||
retVal = tesselateVineInWorld( tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_FENCE_GATE:
|
||||
retVal = tesselateFenceGateInWorld( static_cast<FenceGateTile_SPU *>(tt), x, y, z );
|
||||
retVal = tesselateFenceGateInWorld( ( FenceGateTile_SPU* )tt, x, y, z );
|
||||
break;
|
||||
case Tile_SPU::SHAPE_CAULDRON:
|
||||
retVal = tesselateCauldronInWorld((CauldronTile_SPU* ) tt, x, y, z);
|
||||
@@ -345,7 +345,7 @@ bool TileRenderer_SPU::tesselateInWorld( Tile_SPU* tt, int x, int y, int z, int
|
||||
retVal = tesselateAnvilInWorld((AnvilTile_SPU *) tt, x, y, z);
|
||||
break;
|
||||
case Tile_SPU::SHAPE_BREWING_STAND:
|
||||
retVal = tesselateBrewingStandInWorld(static_cast<BrewingStandTile_SPU *>(tt), x, y, z);
|
||||
retVal = tesselateBrewingStandInWorld((BrewingStandTile_SPU* ) tt, x, y, z);
|
||||
break;
|
||||
case Tile_SPU::SHAPE_PORTAL_FRAME:
|
||||
retVal = tesselateAirPortalFrameInWorld((TheEndPortalFrameTile *)tt, x, y, z);
|
||||
@@ -838,7 +838,7 @@ bool TileRenderer_SPU::tesselateFlowerPotInWorld(FlowerPotTile_SPU *tt, int x, i
|
||||
float xOff = 0;
|
||||
float yOff = 4;
|
||||
float zOff = 0;
|
||||
Tile *plant = nullptr;
|
||||
Tile *plant = NULL;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -858,7 +858,7 @@ bool TileRenderer_SPU::tesselateFlowerPotInWorld(FlowerPotTile_SPU *tt, int x, i
|
||||
|
||||
t->addOffset(xOff / 16.0f, yOff / 16.0f, zOff / 16.0f);
|
||||
|
||||
if (plant != nullptr)
|
||||
if (plant != NULL)
|
||||
{
|
||||
tesselateInWorld(plant, x, y, z);
|
||||
}
|
||||
@@ -1099,23 +1099,23 @@ bool TileRenderer_SPU::tesselateTorchInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
float h = 0.20f;
|
||||
if ( dir == 1 )
|
||||
{
|
||||
tesselateTorch( tt, static_cast<float>(x) - r2, static_cast<float>(y) + h, static_cast<float>(z), -r, 0.0f, 0 );
|
||||
tesselateTorch( tt, (float)x - r2, (float)y + h, (float)z, -r, 0.0f, 0 );
|
||||
}
|
||||
else if ( dir == 2 )
|
||||
{
|
||||
tesselateTorch( tt, static_cast<float>(x) + r2, static_cast<float>(y) + h, static_cast<float>(z), +r, 0.0f, 0 );
|
||||
tesselateTorch( tt, (float)x + r2, (float)y + h, (float)z, +r, 0.0f, 0 );
|
||||
}
|
||||
else if ( dir == 3 )
|
||||
{
|
||||
tesselateTorch( tt, static_cast<float>(x), static_cast<float>(y) + h, z - r2, 0.0f, -r, 0 );
|
||||
tesselateTorch( tt, (float)x, (float)y + h, z - r2, 0.0f, -r, 0 );
|
||||
}
|
||||
else if ( dir == 4 )
|
||||
{
|
||||
tesselateTorch( tt, static_cast<float>(x), static_cast<float>(y) + h, static_cast<float>(z) + r2, 0.0f, +r, 0 );
|
||||
tesselateTorch( tt, (float)x, (float)y + h, (float)z + r2, 0.0f, +r, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
tesselateTorch( tt, static_cast<float>(x), static_cast<float>(y), static_cast<float>(z), 0.0f, 0.0f, 0 );
|
||||
tesselateTorch( tt, (float)x, (float)y, (float)z, 0.0f, 0.0f, 0 );
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -1724,7 +1724,7 @@ bool TileRenderer_SPU::tesselateLeverInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
}
|
||||
}
|
||||
|
||||
Vec3* c0 = nullptr, *c1 = nullptr, *c2 = nullptr, *c3 = nullptr;
|
||||
Vec3* c0 = NULL, *c1 = NULL, *c2 = NULL, *c3 = NULL;
|
||||
for ( int i = 0; i < 6; i++ )
|
||||
{
|
||||
if ( i == 0 )
|
||||
@@ -1897,7 +1897,7 @@ bool TileRenderer_SPU::tesselateTripwireSourceInWorld(Tile_SPU *tt, int x, int y
|
||||
corners[i]->z += z + 0.5;
|
||||
}
|
||||
|
||||
Vec3 *c0 = nullptr, *c1 = nullptr, *c2 = nullptr, *c3 = nullptr;
|
||||
Vec3 *c0 = NULL, *c1 = NULL, *c2 = NULL, *c3 = NULL;
|
||||
int stickX0 = 7;
|
||||
int stickX1 = 9;
|
||||
int stickY0 = 9;
|
||||
@@ -2321,15 +2321,15 @@ bool TileRenderer_SPU::tesselateFireInWorld( FireTile_SPU* tt, int x, int y, int
|
||||
float z0_ = z + 0.5f - 0.3f;
|
||||
float z1_ = z + 0.5f + 0.3f;
|
||||
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), static_cast<float>(z + 1), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x0 ), static_cast<float>(y + 0), static_cast<float>(z + 1), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0 ), static_cast<float>(y + 0), static_cast<float>(z + 0), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), static_cast<float>(z + 0), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), ( float )( z + 1 ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x0 ), ( float )( y + 0 ), ( float )( z + 1 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0 ), ( float )( y + 0 ), ( float )( z + 0 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), ( float )( z + 0 ), ( float )( u0 ), ( float )( v0 ) );
|
||||
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), static_cast<float>(z + 0), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x1 ), static_cast<float>(y + 0), static_cast<float>(z + 0), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1 ), static_cast<float>(y + 0), static_cast<float>(z + 1), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), static_cast<float>(z + 1), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), ( float )( z + 0 ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x1 ), ( float )( y + 0 ), ( float )( z + 0 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1 ), ( float )( y + 0 ), ( float )( z + 1 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), ( float )( z + 1 ), ( float )( u0 ), ( float )( v0 ) );
|
||||
|
||||
tex = secondTex;
|
||||
u0 = tex->getU0();
|
||||
@@ -2337,15 +2337,15 @@ bool TileRenderer_SPU::tesselateFireInWorld( FireTile_SPU* tt, int x, int y, int
|
||||
u1 = tex->getU1();
|
||||
v1 = tex->getV1();
|
||||
|
||||
t->vertexUV( static_cast<float>(x + 1), ( float )( y + h ), ( float )( z1_ ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( static_cast<float>(x + 1), static_cast<float>(y + 0), ( float )( z1 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( static_cast<float>(x + 0), static_cast<float>(y + 0), ( float )( z1 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( static_cast<float>(x + 0), ( float )( y + h ), ( float )( z1_ ), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x + 1 ), ( float )( y + h ), ( float )( z1_ ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x + 1 ), ( float )( y + 0 ), ( float )( z1 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 0 ), ( float )( y + 0 ), ( float )( z1 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 0 ), ( float )( y + h ), ( float )( z1_ ), ( float )( u0 ), ( float )( v0 ) );
|
||||
|
||||
t->vertexUV( static_cast<float>(x + 0), ( float )( y + h ), ( float )( z0_ ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( static_cast<float>(x + 0), static_cast<float>(y + 0), ( float )( z0 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( static_cast<float>(x + 1), static_cast<float>(y + 0), ( float )( z0 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( static_cast<float>(x + 1), ( float )( y + h ), ( float )( z0_ ), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x + 0 ), ( float )( y + h ), ( float )( z0_ ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x + 0 ), ( float )( y + 0 ), ( float )( z0 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 1 ), ( float )( y + 0 ), ( float )( z0 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 1 ), ( float )( y + h ), ( float )( z0_ ), ( float )( u0 ), ( float )( v0 ) );
|
||||
|
||||
x0 = x + 0.5f - 0.5f;
|
||||
x1 = x + 0.5f + 0.5f;
|
||||
@@ -2357,15 +2357,15 @@ bool TileRenderer_SPU::tesselateFireInWorld( FireTile_SPU* tt, int x, int y, int
|
||||
z0_ = z + 0.5f - 0.4f;
|
||||
z1_ = z + 0.5f + 0.4f;
|
||||
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), static_cast<float>(z + 0), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x0 ), static_cast<float>(y + 0), static_cast<float>(z + 0), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0 ), static_cast<float>(y + 0), static_cast<float>(z + 1), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), static_cast<float>(z + 1), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), ( float )( z + 0 ), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x0 ), ( float )( y + 0 ), ( float )( z + 0 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0 ), ( float )( y + 0 ), ( float )( z + 1 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), ( float )( z + 1 ), ( float )( u1 ), ( float )( v0 ) );
|
||||
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), static_cast<float>(z + 1), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x1 ), static_cast<float>(y + 0), static_cast<float>(z + 1), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1 ), static_cast<float>(y + 0), static_cast<float>(z + 0), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), static_cast<float>(z + 0), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), ( float )( z + 1 ), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x1 ), ( float )( y + 0 ), ( float )( z + 1 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1 ), ( float )( y + 0 ), ( float )( z + 0 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), ( float )( z + 0 ), ( float )( u1 ), ( float )( v0 ) );
|
||||
|
||||
tex = firstTex;
|
||||
u0 = tex->getU0();
|
||||
@@ -2373,15 +2373,15 @@ bool TileRenderer_SPU::tesselateFireInWorld( FireTile_SPU* tt, int x, int y, int
|
||||
u1 = tex->getU1();
|
||||
v1 = tex->getV1();
|
||||
|
||||
t->vertexUV( static_cast<float>(x + 0), ( float )( y + h ), ( float )( z1_ ), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( static_cast<float>(x + 0), static_cast<float>(y + 0), ( float )( z1 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( static_cast<float>(x + 1), static_cast<float>(y + 0), ( float )( z1 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( static_cast<float>(x + 1), ( float )( y + h ), ( float )( z1_ ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x + 0 ), ( float )( y + h ), ( float )( z1_ ), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x + 0 ), ( float )( y + 0 ), ( float )( z1 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 1 ), ( float )( y + 0 ), ( float )( z1 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 1 ), ( float )( y + h ), ( float )( z1_ ), ( float )( u1 ), ( float )( v0 ) );
|
||||
|
||||
t->vertexUV( static_cast<float>(x + 1), ( float )( y + h ), ( float )( z0_ ), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( static_cast<float>(x + 1), static_cast<float>(y + 0), ( float )( z0 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( static_cast<float>(x + 0), static_cast<float>(y + 0), ( float )( z0 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( static_cast<float>(x + 0), ( float )( y + h ), ( float )( z0_ ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x + 1 ), ( float )( y + h ), ( float )( z0_ ), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x + 1 ), ( float )( y + 0 ), ( float )( z0 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 0 ), ( float )( y + 0 ), ( float )( z0 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 0 ), ( float )( y + h ), ( float )( z0_ ), ( float )( u1 ), ( float )( v0 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2425,10 +2425,10 @@ bool TileRenderer_SPU::tesselateFireInWorld( FireTile_SPU* tt, int x, int y, int
|
||||
{
|
||||
t->vertexUV( ( float )( x + 1 - r ), ( float )( y + h + yo ), ( float )( z +
|
||||
0.0f ), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( static_cast<float>(x + 1 - 0), ( float )( y + 0 + yo ), ( float )( z +
|
||||
0.0f ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( static_cast<float>(x + 1 - 0), ( float )( y + 0 + yo ), ( float )( z +
|
||||
1.0f ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 1 - 0 ), ( float )( y + 0 + yo ), ( float )( z +
|
||||
0.0f ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 1 - 0 ), ( float )( y + 0 + yo ), ( float )( z +
|
||||
1.0f ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x + 1 - r ), ( float )( y + h + yo ), ( float )( z +
|
||||
1.0f ), ( float )( u1 ), ( float )( v0 ) );
|
||||
|
||||
@@ -2504,14 +2504,14 @@ bool TileRenderer_SPU::tesselateFireInWorld( FireTile_SPU* tt, int x, int y, int
|
||||
|
||||
if ( ( ( x + y + z ) & 1 ) == 0 )
|
||||
{
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), static_cast<float>(z +
|
||||
0), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x0 ), static_cast<float>(y + 0), static_cast<float>(z +
|
||||
0), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0 ), static_cast<float>(y + 0), static_cast<float>(z +
|
||||
1), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), static_cast<float>(z +
|
||||
1), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), ( float )( z +
|
||||
0 ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x0 ), ( float )( y + 0 ), ( float )( z +
|
||||
0 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0 ), ( float )( y + 0 ), ( float )( z +
|
||||
1 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0_ ), ( float )( y + h ), ( float )( z +
|
||||
1 ), ( float )( u0 ), ( float )( v0 ) );
|
||||
|
||||
tex = secondTex;
|
||||
u0 = tex->getU0();
|
||||
@@ -2523,10 +2523,10 @@ bool TileRenderer_SPU::tesselateFireInWorld( FireTile_SPU* tt, int x, int y, int
|
||||
1.0f ), ( float )( u1 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x1 ), ( float )( y + 0.0f ), ( float )( z +
|
||||
1.0f ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1 ), ( float )( y + 0.0f ), static_cast<float>(z +
|
||||
0), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), static_cast<float>(z +
|
||||
0), ( float )( u0 ), ( float )( v0 ) );
|
||||
t->vertexUV( ( float )( x1 ), ( float )( y + 0.0f ), ( float )( z +
|
||||
0 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1_ ), ( float )( y + h ), ( float )( z +
|
||||
0 ), ( float )( u0 ), ( float )( v0 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2789,15 +2789,15 @@ bool TileRenderer_SPU::tesselateRailInWorld( RailTile_SPU* tt, int x, int y, int
|
||||
|
||||
float r = 1 / 16.0f;
|
||||
|
||||
float x0 = static_cast<float>(x + 1);
|
||||
float x1 = static_cast<float>(x + 1);
|
||||
float x2 = static_cast<float>(x + 0);
|
||||
float x3 = static_cast<float>(x + 0);
|
||||
float x0 = ( float )( x + 1 );
|
||||
float x1 = ( float )( x + 1 );
|
||||
float x2 = ( float )( x + 0 );
|
||||
float x3 = ( float )( x + 0 );
|
||||
|
||||
float z0 = static_cast<float>(z + 0);
|
||||
float z1 = static_cast<float>(z + 1);
|
||||
float z2 = static_cast<float>(z + 1);
|
||||
float z3 = static_cast<float>(z + 0);
|
||||
float z0 = ( float )( z + 0 );
|
||||
float z1 = ( float )( z + 1 );
|
||||
float z2 = ( float )( z + 1 );
|
||||
float z3 = ( float )( z + 0 );
|
||||
|
||||
float y0 = ( float )( y + r );
|
||||
float y1 = ( float )( y + r );
|
||||
@@ -2806,24 +2806,24 @@ bool TileRenderer_SPU::tesselateRailInWorld( RailTile_SPU* tt, int x, int y, int
|
||||
|
||||
if ( data == 1 || data == 2 || data == 3 || data == 7 )
|
||||
{
|
||||
x0 = x3 = static_cast<float>(x + 1);
|
||||
x1 = x2 = static_cast<float>(x + 0);
|
||||
z0 = z1 = static_cast<float>(z + 1);
|
||||
z2 = z3 = static_cast<float>(z + 0);
|
||||
x0 = x3 = ( float )( x + 1 );
|
||||
x1 = x2 = ( float )( x + 0 );
|
||||
z0 = z1 = ( float )( z + 1 );
|
||||
z2 = z3 = ( float )( z + 0 );
|
||||
}
|
||||
else if ( data == 8 )
|
||||
{
|
||||
x0 = x1 = static_cast<float>(x + 0);
|
||||
x2 = x3 = static_cast<float>(x + 1);
|
||||
z0 = z3 = static_cast<float>(z + 1);
|
||||
z1 = z2 = static_cast<float>(z + 0);
|
||||
x0 = x1 = ( float )( x + 0 );
|
||||
x2 = x3 = ( float )( x + 1 );
|
||||
z0 = z3 = ( float )( z + 1 );
|
||||
z1 = z2 = ( float )( z + 0 );
|
||||
}
|
||||
else if ( data == 9 )
|
||||
{
|
||||
x0 = x3 = static_cast<float>(x + 0);
|
||||
x1 = x2 = static_cast<float>(x + 1);
|
||||
z0 = z1 = static_cast<float>(z + 0);
|
||||
z2 = z3 = static_cast<float>(z + 1);
|
||||
x0 = x3 = ( float )( x + 0 );
|
||||
x1 = x2 = ( float )( x + 1 );
|
||||
z0 = z1 = ( float )( z + 0 );
|
||||
z2 = z3 = ( float )( z + 1 );
|
||||
}
|
||||
|
||||
if ( data == 2 || data == 4 )
|
||||
@@ -3555,9 +3555,9 @@ bool TileRenderer_SPU::tesselateCrossInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
}
|
||||
t->color( br * r, br * g, br * b );
|
||||
|
||||
float xt = static_cast<float>(x);
|
||||
float yt = static_cast<float>(y);
|
||||
float zt = static_cast<float>(z);
|
||||
float xt = (float)x;
|
||||
float yt = (float)y;
|
||||
float zt = (float)z;
|
||||
|
||||
if (tt->id == Tile_SPU::tallgrass_Id)
|
||||
{
|
||||
@@ -3575,7 +3575,7 @@ bool TileRenderer_SPU::tesselateCrossInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
|
||||
bool TileRenderer_SPU::tesselateStemInWorld( Tile_SPU* _tt, int x, int y, int z )
|
||||
{
|
||||
StemTile_SPU* tt = static_cast<StemTile_SPU *>(_tt);
|
||||
StemTile_SPU* tt = ( StemTile_SPU* )_tt;
|
||||
Tesselator_SPU* t = getTesselator();
|
||||
|
||||
float br;
|
||||
@@ -3805,7 +3805,7 @@ bool TileRenderer_SPU::tesselateLilypadInWorld(WaterlilyTile_SPU *tt, int x, int
|
||||
int64_t seed = (x * 3129871) ^ (z * 116129781l) ^ (y);
|
||||
seed = seed * seed * 42317861 + seed * 11;
|
||||
|
||||
int dir = static_cast<int>((seed >> 16) & 0x3);
|
||||
int dir = (int) ((seed >> 16) & 0x3);
|
||||
|
||||
|
||||
|
||||
@@ -4017,7 +4017,7 @@ bool TileRenderer_SPU::tesselateWaterInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
{
|
||||
changed = true;
|
||||
Icon_SPU *tex = getTexture( tt, 1, data );
|
||||
float angle = static_cast<float>(LiquidTile_SPU::getSlopeAngle(level, x, y, z, m));
|
||||
float angle = ( float )LiquidTile_SPU::getSlopeAngle( level, x, y, z, m );
|
||||
if ( angle > -999 )
|
||||
{
|
||||
tex = getTexture( tt, 2, data );
|
||||
@@ -4112,8 +4112,8 @@ bool TileRenderer_SPU::tesselateWaterInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
{
|
||||
hh0 = ( float )( h0 );
|
||||
hh1 = ( float )( h3 );
|
||||
x0 = static_cast<float>(x);
|
||||
x1 = static_cast<float>(x + 1);
|
||||
x0 = ( float )( x );
|
||||
x1 = ( float )( x + 1 );
|
||||
z0 = ( float )( z + offs);
|
||||
z1 = ( float )( z + offs);
|
||||
}
|
||||
@@ -4121,8 +4121,8 @@ bool TileRenderer_SPU::tesselateWaterInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
{
|
||||
hh0 = ( float )( h2 );
|
||||
hh1 = ( float )( h1 );
|
||||
x0 = static_cast<float>(x + 1);
|
||||
x1 = static_cast<float>(x);
|
||||
x0 = ( float )( x + 1 );
|
||||
x1 = ( float )( x );
|
||||
z0 = ( float )( z + 1 - offs);
|
||||
z1 = ( float )( z + 1 - offs);
|
||||
}
|
||||
@@ -4132,8 +4132,8 @@ bool TileRenderer_SPU::tesselateWaterInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
hh1 = ( float )( h0 );
|
||||
x0 = ( float )( x + offs);
|
||||
x1 = ( float )( x + offs);
|
||||
z0 = static_cast<float>(z + 1);
|
||||
z1 = static_cast<float>(z);
|
||||
z0 = ( float )( z + 1 );
|
||||
z1 = ( float )( z );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4141,8 +4141,8 @@ bool TileRenderer_SPU::tesselateWaterInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
hh1 = ( float )( h2 );
|
||||
x0 = ( float )( x + 1 - offs);
|
||||
x1 = ( float )( x + 1 - offs);
|
||||
z0 = static_cast<float>(z);
|
||||
z1 = static_cast<float>(z + 1);
|
||||
z0 = ( float )( z );
|
||||
z1 = ( float )( z + 1 );
|
||||
}
|
||||
|
||||
|
||||
@@ -4172,8 +4172,8 @@ bool TileRenderer_SPU::tesselateWaterInWorld( Tile_SPU* tt, int x, int y, int z
|
||||
t->color( c11 * br * r, c11 * br * g, c11 * br * b );
|
||||
t->vertexUV( ( float )( x0 ), ( float )( y + hh0 ), ( float )( z0 ), ( float )( u0 ), ( float )( v01 ) );
|
||||
t->vertexUV( ( float )( x1 ), ( float )( y + hh1 ), ( float )( z1 ), ( float )( u1 ), ( float )( v02 ) );
|
||||
t->vertexUV( ( float )( x1 ), static_cast<float>(y + 0), ( float )( z1 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0 ), static_cast<float>(y + 0), ( float )( z0 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x1 ), ( float )( y + 0 ), ( float )( z1 ), ( float )( u1 ), ( float )( v1 ) );
|
||||
t->vertexUV( ( float )( x0 ), ( float )( y + 0 ), ( float )( z0 ), ( float )( u0 ), ( float )( v1 ) );
|
||||
|
||||
}
|
||||
|
||||
@@ -4586,7 +4586,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
else
|
||||
{
|
||||
/*#ifdef _DEBUG
|
||||
if(dynamic_cast<StairTile *>(tt)!=nullptr)
|
||||
if(dynamic_cast<StairTile *>(tt)!=NULL)
|
||||
{
|
||||
// stair tile
|
||||
faceFlags |= tt->shouldRenderFace( level, pX, pY - 1, pZ, 0 ) ? 0x01 : 0;
|
||||
@@ -4786,7 +4786,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
c4g *= ll4;
|
||||
c4b *= ll4;
|
||||
|
||||
renderFaceDown( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), getTexture( tt, level, pX, pY, pZ, 0 ) );
|
||||
renderFaceDown( tt, ( float )pX, ( float )pY, ( float )pZ, getTexture( tt, level, pX, pY, pZ, 0 ) );
|
||||
}
|
||||
if ( faceFlags & 0x02 )
|
||||
{
|
||||
@@ -4878,7 +4878,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
c4b *= ll4;
|
||||
|
||||
|
||||
renderFaceUp( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), getTexture( tt, level, pX, pY, pZ, 1 ) );
|
||||
renderFaceUp( tt, ( float )pX, ( float )pY, ( float )pZ, getTexture( tt, level, pX, pY, pZ, 1 ) );
|
||||
}
|
||||
if ( faceFlags & 0x04 )
|
||||
{
|
||||
@@ -4946,14 +4946,14 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
float _ll2 = (ll00z + ll0Yz + llX0z + llXYz) / 4.0f;
|
||||
float _ll3 = (ll0yz + ll00z + llXyz + llX0z) / 4.0f;
|
||||
float _ll4 = (llxyz + llx0z + ll0yz + ll00z) / 4.0f;
|
||||
ll1 = static_cast<float>(_ll1 * tileShapeY1 * (1.0 - tileShapeX0) + _ll2 * tileShapeY0 * tileShapeX0 + _ll3 * (1.0 - tileShapeY1) * tileShapeX0 + _ll4 * (1.0 - tileShapeY1)
|
||||
* (1.0 - tileShapeX0));
|
||||
ll2 = static_cast<float>(_ll1 * tileShapeY1 * (1.0 - tileShapeX1) + _ll2 * tileShapeY1 * tileShapeX1 + _ll3 * (1.0 - tileShapeY1) * tileShapeX1 + _ll4 * (1.0 - tileShapeY1)
|
||||
* (1.0 - tileShapeX1));
|
||||
ll3 = static_cast<float>(_ll1 * tileShapeY0 * (1.0 - tileShapeX1) + _ll2 * tileShapeY0 * tileShapeX1 + _ll3 * (1.0 - tileShapeY0) * tileShapeX1 + _ll4 * (1.0 - tileShapeY0)
|
||||
* (1.0 - tileShapeX1));
|
||||
ll4 = static_cast<float>(_ll1 * tileShapeY0 * (1.0 - tileShapeX0) + _ll2 * tileShapeY0 * tileShapeX0 + _ll3 * (1.0 - tileShapeY0) * tileShapeX0 + _ll4 * (1.0 - tileShapeY0)
|
||||
* (1.0 - tileShapeX0));
|
||||
ll1 = (float) (_ll1 * tileShapeY1 * (1.0 - tileShapeX0) + _ll2 * tileShapeY0 * tileShapeX0 + _ll3 * (1.0 - tileShapeY1) * tileShapeX0 + _ll4 * (1.0 - tileShapeY1)
|
||||
* (1.0 - tileShapeX0));
|
||||
ll2 = (float) (_ll1 * tileShapeY1 * (1.0 - tileShapeX1) + _ll2 * tileShapeY1 * tileShapeX1 + _ll3 * (1.0 - tileShapeY1) * tileShapeX1 + _ll4 * (1.0 - tileShapeY1)
|
||||
* (1.0 - tileShapeX1));
|
||||
ll3 = (float) (_ll1 * tileShapeY0 * (1.0 - tileShapeX1) + _ll2 * tileShapeY0 * tileShapeX1 + _ll3 * (1.0 - tileShapeY0) * tileShapeX1 + _ll4 * (1.0 - tileShapeY0)
|
||||
* (1.0 - tileShapeX1));
|
||||
ll4 = (float) (_ll1 * tileShapeY0 * (1.0 - tileShapeX0) + _ll2 * tileShapeY0 * tileShapeX0 + _ll3 * (1.0 - tileShapeY0) * tileShapeX0 + _ll4 * (1.0 - tileShapeY0)
|
||||
* (1.0 - tileShapeX0));
|
||||
|
||||
int _tc1 = blend(ccx0z, ccxYz, cc0Yz, cc00z);
|
||||
int _tc2 = blend(cc0Yz, ccX0z, ccXYz, cc00z);
|
||||
@@ -4998,7 +4998,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
|
||||
|
||||
Icon_SPU *tex = getTexture(tt, level, pX, pY, pZ, 2);
|
||||
renderNorth( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), tex );
|
||||
renderNorth( tt, ( float )pX, ( float )pY, ( float )pZ, tex );
|
||||
|
||||
if ( fancy && (tex == &Tile_SPU::ms_pTileData->iconData[Tile_SPU::grass_Id] && !hasFixedTexture() ))
|
||||
{
|
||||
@@ -5015,7 +5015,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
c3b *= pBaseBlue;
|
||||
c4b *= pBaseBlue;
|
||||
bool prev = t->setMipmapEnable( false ); // 4J added - this is rendering the little bit of grass at the top of the side of dirt, don't mipmap it
|
||||
renderNorth( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), GrassTile_SPU::getSideTextureOverlay() );
|
||||
renderNorth( tt, ( float )pX, ( float )pY, ( float )pZ, GrassTile_SPU::getSideTextureOverlay() );
|
||||
t->setMipmapEnable( prev );
|
||||
}
|
||||
}
|
||||
@@ -5082,14 +5082,14 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
float _ll4 = (ll00Z + ll0YZ + llX0Z + llXYZ) / 4.0f;
|
||||
float _ll3 = (ll0yZ + ll00Z + llXyZ + llX0Z) / 4.0f;
|
||||
float _ll2 = (llxyZ + llx0Z + ll0yZ + ll00Z) / 4.0f;
|
||||
ll1 = static_cast<float>(_ll1 * tileShapeY1 * (1.0 - tileShapeX0) + _ll4 * tileShapeY1 * tileShapeX0 + _ll3 * (1.0 - tileShapeY1) * tileShapeX0 + _ll2 * (1.0 - tileShapeY1)
|
||||
* (1.0 - tileShapeX0));
|
||||
ll2 = static_cast<float>(_ll1 * tileShapeY0 * (1.0 - tileShapeX0) + _ll4 * tileShapeY0 * tileShapeX0 + _ll3 * (1.0 - tileShapeY0) * tileShapeX0 + _ll2 * (1.0 - tileShapeY0)
|
||||
* (1.0 - tileShapeX0));
|
||||
ll3 = static_cast<float>(_ll1 * tileShapeY0 * (1.0 - tileShapeX1) + _ll4 * tileShapeY0 * tileShapeX1 + _ll3 * (1.0 - tileShapeY0) * tileShapeX1 + _ll2 * (1.0 - tileShapeY0)
|
||||
* (1.0 - tileShapeX1));
|
||||
ll4 = static_cast<float>(_ll1 * tileShapeY1 * (1.0 - tileShapeX1) + _ll4 * tileShapeY1 * tileShapeX1 + _ll3 * (1.0 - tileShapeY1) * tileShapeX1 + _ll2 * (1.0 - tileShapeY1)
|
||||
* (1.0 - tileShapeX1));
|
||||
ll1 = (float) (_ll1 * tileShapeY1 * (1.0 - tileShapeX0) + _ll4 * tileShapeY1 * tileShapeX0 + _ll3 * (1.0 - tileShapeY1) * tileShapeX0 + _ll2 * (1.0 - tileShapeY1)
|
||||
* (1.0 - tileShapeX0));
|
||||
ll2 = (float) (_ll1 * tileShapeY0 * (1.0 - tileShapeX0) + _ll4 * tileShapeY0 * tileShapeX0 + _ll3 * (1.0 - tileShapeY0) * tileShapeX0 + _ll2 * (1.0 - tileShapeY0)
|
||||
* (1.0 - tileShapeX0));
|
||||
ll3 = (float) (_ll1 * tileShapeY0 * (1.0 - tileShapeX1) + _ll4 * tileShapeY0 * tileShapeX1 + _ll3 * (1.0 - tileShapeY0) * tileShapeX1 + _ll2 * (1.0 - tileShapeY0)
|
||||
* (1.0 - tileShapeX1));
|
||||
ll4 = (float) (_ll1 * tileShapeY1 * (1.0 - tileShapeX1) + _ll4 * tileShapeY1 * tileShapeX1 + _ll3 * (1.0 - tileShapeY1) * tileShapeX1 + _ll2 * (1.0 - tileShapeY1)
|
||||
* (1.0 - tileShapeX1));
|
||||
|
||||
int _tc1 = blend(ccx0Z, ccxYZ, cc0YZ, cc00Z);
|
||||
int _tc4 = blend(cc0YZ, ccX0Z, ccXYZ, cc00Z);
|
||||
@@ -5134,7 +5134,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
c4g *= ll4;
|
||||
c4b *= ll4;
|
||||
Icon_SPU *tex = getTexture(tt, level, pX, pY, pZ, 3);
|
||||
renderSouth( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), getTexture(tt, level, pX, pY, pZ, 3 ) );
|
||||
renderSouth( tt, ( float )pX, ( float )pY, ( float )pZ, getTexture(tt, level, pX, pY, pZ, 3 ) );
|
||||
|
||||
if ( fancy && (tex == &Tile_SPU::ms_pTileData->iconData[Tile_SPU::grass_Id] && !hasFixedTexture() ))
|
||||
{
|
||||
@@ -5151,7 +5151,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
c3b *= pBaseBlue;
|
||||
c4b *= pBaseBlue;
|
||||
bool prev = t->setMipmapEnable( false ); // 4J added - this is rendering the little bit of grass at the top of the side of dirt, don't mipmap it
|
||||
renderSouth( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), GrassTile_SPU::getSideTextureOverlay() );
|
||||
renderSouth( tt, ( float )pX, ( float )pY, ( float )pZ, GrassTile_SPU::getSideTextureOverlay() );
|
||||
t->setMipmapEnable( prev );
|
||||
}
|
||||
}
|
||||
@@ -5217,14 +5217,14 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
float _ll1 = (llx00 + llx0Z + llxY0 + llxYZ) / 4.0f;
|
||||
float _ll2 = (llx0z + llx00 + llxYz + llxY0) / 4.0f;
|
||||
float _ll3 = (llxyz + llxy0 + llx0z + llx00) / 4.0f;
|
||||
ll1 = static_cast<float>(_ll1 * tileShapeY1 * tileShapeZ1 + _ll2 * tileShapeY1 * (1.0 - tileShapeZ1) + _ll3 * (1.0 - tileShapeY1) * (1.0 - tileShapeZ1) + _ll4 * (1.0 - tileShapeY1)
|
||||
* tileShapeZ1);
|
||||
ll2 = static_cast<float>(_ll1 * tileShapeY1 * tileShapeZ0 + _ll2 * tileShapeY1 * (1.0 - tileShapeZ0) + _ll3 * (1.0 - tileShapeY1) * (1.0 - tileShapeZ0) + _ll4 * (1.0 - tileShapeY1)
|
||||
* tileShapeZ0);
|
||||
ll3 = static_cast<float>(_ll1 * tileShapeY0 * tileShapeZ0 + _ll2 * tileShapeY0 * (1.0 - tileShapeZ0) + _ll3 * (1.0 - tileShapeY0) * (1.0 - tileShapeZ0) + _ll4 * (1.0 - tileShapeY0)
|
||||
* tileShapeZ0);
|
||||
ll4 = static_cast<float>(_ll1 * tileShapeY0 * tileShapeZ1 + _ll2 * tileShapeY0 * (1.0 - tileShapeZ1) + _ll3 * (1.0 - tileShapeY0) * (1.0 - tileShapeZ1) + _ll4 * (1.0 - tileShapeY0)
|
||||
* tileShapeZ1);
|
||||
ll1 = (float) (_ll1 * tileShapeY1 * tileShapeZ1 + _ll2 * tileShapeY1 * (1.0 - tileShapeZ1) + _ll3 * (1.0 - tileShapeY1) * (1.0 - tileShapeZ1) + _ll4 * (1.0 - tileShapeY1)
|
||||
* tileShapeZ1);
|
||||
ll2 = (float) (_ll1 * tileShapeY1 * tileShapeZ0 + _ll2 * tileShapeY1 * (1.0 - tileShapeZ0) + _ll3 * (1.0 - tileShapeY1) * (1.0 - tileShapeZ0) + _ll4 * (1.0 - tileShapeY1)
|
||||
* tileShapeZ0);
|
||||
ll3 = (float) (_ll1 * tileShapeY0 * tileShapeZ0 + _ll2 * tileShapeY0 * (1.0 - tileShapeZ0) + _ll3 * (1.0 - tileShapeY0) * (1.0 - tileShapeZ0) + _ll4 * (1.0 - tileShapeY0)
|
||||
* tileShapeZ0);
|
||||
ll4 = (float) (_ll1 * tileShapeY0 * tileShapeZ1 + _ll2 * tileShapeY0 * (1.0 - tileShapeZ1) + _ll3 * (1.0 - tileShapeY0) * (1.0 - tileShapeZ1) + _ll4 * (1.0 - tileShapeY0)
|
||||
* tileShapeZ1);
|
||||
|
||||
int _tc4 = blend(ccxy0, ccxyZ, ccx0Z, ccx00);
|
||||
int _tc1 = blend(ccx0Z, ccxY0, ccxYZ, ccx00);
|
||||
@@ -5269,7 +5269,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
c4g *= ll4;
|
||||
c4b *= ll4;
|
||||
Icon_SPU *tex = getTexture(tt, level, pX, pY, pZ, 4);
|
||||
renderWest( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), tex );
|
||||
renderWest( tt, ( float )pX, ( float )pY, ( float )pZ, tex );
|
||||
|
||||
if ( fancy && (tex == &Tile_SPU::ms_pTileData->iconData[Tile_SPU::grass_Id] && !hasFixedTexture() ))
|
||||
{
|
||||
@@ -5286,7 +5286,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
c3b *= pBaseBlue;
|
||||
c4b *= pBaseBlue;
|
||||
bool prev = t->setMipmapEnable( false ); // 4J added - this is rendering the little bit of grass at the top of the side of dirt, don't mipmap it
|
||||
renderWest( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), GrassTile_SPU::getSideTextureOverlay() );
|
||||
renderWest( tt, ( float )pX, ( float )pY, ( float )pZ, GrassTile_SPU::getSideTextureOverlay() );
|
||||
t->setMipmapEnable( prev );
|
||||
}
|
||||
}
|
||||
@@ -5352,14 +5352,14 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
float _ll2 = (llXyz + llXy0 + llX0z + llX00) / 4.0f;
|
||||
float _ll3 = (llX0z + llX00 + llXYz + llXY0) / 4.0f;
|
||||
float _ll4 = (llX00 + llX0Z + llXY0 + llXYZ) / 4.0f;
|
||||
ll1 = static_cast<float>(_ll1 * (1.0 - tileShapeY0) * tileShapeZ1 + _ll2 * (1.0 - tileShapeY0) * (1.0 - tileShapeZ1) + _ll3 * tileShapeY0 * (1.0 - tileShapeZ1) + _ll4 * tileShapeY0
|
||||
* tileShapeZ1);
|
||||
ll2 = static_cast<float>(_ll1 * (1.0 - tileShapeY0) * tileShapeZ0 + _ll2 * (1.0 - tileShapeY0) * (1.0 - tileShapeZ0) + _ll3 * tileShapeY0 * (1.0 - tileShapeZ0) + _ll4 * tileShapeY0
|
||||
* tileShapeZ0);
|
||||
ll3 = static_cast<float>(_ll1 * (1.0 - tileShapeY1) * tileShapeZ0 + _ll2 * (1.0 - tileShapeY1) * (1.0 - tileShapeZ0) + _ll3 * tileShapeY1 * (1.0 - tileShapeZ0) + _ll4 * tileShapeY1
|
||||
* tileShapeZ0);
|
||||
ll4 = static_cast<float>(_ll1 * (1.0 - tileShapeY1) * tileShapeZ1 + _ll2 * (1.0 - tileShapeY1) * (1.0 - tileShapeZ1) + _ll3 * tileShapeY1 * (1.0 - tileShapeZ1) + _ll4 * tileShapeY1
|
||||
* tileShapeZ1);
|
||||
ll1 = (float) (_ll1 * (1.0 - tileShapeY0) * tileShapeZ1 + _ll2 * (1.0 - tileShapeY0) * (1.0 - tileShapeZ1) + _ll3 * tileShapeY0 * (1.0 - tileShapeZ1) + _ll4 * tileShapeY0
|
||||
* tileShapeZ1);
|
||||
ll2 = (float) (_ll1 * (1.0 - tileShapeY0) * tileShapeZ0 + _ll2 * (1.0 - tileShapeY0) * (1.0 - tileShapeZ0) + _ll3 * tileShapeY0 * (1.0 - tileShapeZ0) + _ll4 * tileShapeY0
|
||||
* tileShapeZ0);
|
||||
ll3 = (float) (_ll1 * (1.0 - tileShapeY1) * tileShapeZ0 + _ll2 * (1.0 - tileShapeY1) * (1.0 - tileShapeZ0) + _ll3 * tileShapeY1 * (1.0 - tileShapeZ0) + _ll4 * tileShapeY1
|
||||
* tileShapeZ0);
|
||||
ll4 = (float) (_ll1 * (1.0 - tileShapeY1) * tileShapeZ1 + _ll2 * (1.0 - tileShapeY1) * (1.0 - tileShapeZ1) + _ll3 * tileShapeY1 * (1.0 - tileShapeZ1) + _ll4 * tileShapeY1
|
||||
* tileShapeZ1);
|
||||
|
||||
int _tc1 = blend(ccXy0, ccXyZ, ccX0Z, ccX00);
|
||||
int _tc4 = blend(ccX0Z, ccXY0, ccXYZ, ccX00);
|
||||
@@ -5405,7 +5405,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
c4b *= ll4;
|
||||
|
||||
Icon_SPU *tex = getTexture(tt, level, pX, pY, pZ, 5);
|
||||
renderEast( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), tex );
|
||||
renderEast( tt, ( float )pX, ( float )pY, ( float )pZ, tex );
|
||||
if ( fancy && (tex == &Tile_SPU::ms_pTileData->iconData[Tile_SPU::grass_Id] && !hasFixedTexture() ))
|
||||
{
|
||||
c1r *= pBaseRed;
|
||||
@@ -5422,7 +5422,7 @@ bool TileRenderer_SPU::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Ti
|
||||
c4b *= pBaseBlue;
|
||||
|
||||
bool prev = t->setMipmapEnable( false ); // 4J added - this is rendering the little bit of grass at the top of the side of dirt, don't mipmap it
|
||||
renderEast( tt, static_cast<float>(pX), static_cast<float>(pY), static_cast<float>(pZ), GrassTile_SPU::getSideTextureOverlay() );
|
||||
renderEast( tt, ( float )pX, ( float )pY, ( float )pZ, GrassTile_SPU::getSideTextureOverlay() );
|
||||
t->setMipmapEnable( prev );
|
||||
}
|
||||
}
|
||||
@@ -6005,8 +6005,8 @@ int TileRenderer_SPU::blend( int a, int b, int c, int def )
|
||||
int TileRenderer_SPU::blend(int a, int b, int c, int d, float fa, float fb, float fc, float fd)
|
||||
{
|
||||
|
||||
int top = static_cast<int>((float)((a >> 16) & 0xff) * fa + (float)((b >> 16) & 0xff) * fb + (float)((c >> 16) & 0xff) * fc + (float)((d >> 16) & 0xff) * fd) & 0xff;
|
||||
int bottom = static_cast<int>((float)(a & 0xff) * fa + (float)(b & 0xff) * fb + (float)(c & 0xff) * fc + (float)(d & 0xff) * fd) & 0xff;
|
||||
int top = (int) ((float) ((a >> 16) & 0xff) * fa + (float) ((b >> 16) & 0xff) * fb + (float) ((c >> 16) & 0xff) * fc + (float) ((d >> 16) & 0xff) * fd) & 0xff;
|
||||
int bottom = (int) ((float) (a & 0xff) * fa + (float) (b & 0xff) * fb + (float) (c & 0xff) * fc + (float) (d & 0xff) * fd) & 0xff;
|
||||
return (top << 16) | bottom;
|
||||
}
|
||||
|
||||
@@ -7626,7 +7626,7 @@ Icon_SPU *TileRenderer_SPU::getTexture(Tile_SPU *tile)
|
||||
|
||||
Icon_SPU *TileRenderer_SPU::getTextureOrMissing(Icon_SPU *Icon_SPU)
|
||||
{
|
||||
if (Icon_SPU == nullptr)
|
||||
if (Icon_SPU == NULL)
|
||||
{
|
||||
assert(0);
|
||||
// return minecraft->textures->getMissingIcon_SPU(Icon_SPU::TYPE_TERRAIN);
|
||||
|
||||
@@ -72,8 +72,8 @@ public:
|
||||
|
||||
void tesselateInWorldFixedTexture( Tile_SPU* tile, int x, int y, int z, Icon_SPU *fixedTexture ); // 4J renamed to differentiate from tesselateInWorld
|
||||
void tesselateInWorldNoCulling( Tile_SPU* tile, int x, int y, int z, int forceData = -1,
|
||||
TileEntity* forceEntity = nullptr ); // 4J added forceData, forceEntity param
|
||||
bool tesselateInWorld( Tile_SPU* tt, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr ); // 4J added forceData, forceEntity param
|
||||
TileEntity* forceEntity = NULL ); // 4J added forceData, forceEntity param
|
||||
bool tesselateInWorld( Tile_SPU* tt, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL ); // 4J added forceData, forceEntity param
|
||||
|
||||
private:
|
||||
bool tesselateAirPortalFrameInWorld(TheEndPortalFrameTile *tt, int x, int y, int z);
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
#include <new>
|
||||
#include "AnvilTile_SPU.h"
|
||||
|
||||
TileData_SPU* Tile_SPU::ms_pTileData = nullptr;
|
||||
TileData_SPU* Tile_SPU::ms_pTileData = NULL;
|
||||
|
||||
Tile_SPU Tile_SPU::m_tiles[256];
|
||||
|
||||
@@ -181,7 +181,7 @@ Icon_SPU *Tile_SPU::getTexture(ChunkRebuildData *level, int x, int y, int z, int
|
||||
}
|
||||
|
||||
|
||||
Icon_SPU *icon = nullptr;
|
||||
Icon_SPU *icon = NULL;
|
||||
if(opaque)
|
||||
{
|
||||
LeafTile_SPU::setFancy(false);
|
||||
@@ -215,13 +215,13 @@ Icon_SPU *Tile_SPU::getTexture(int face)
|
||||
// void Tile_SPU::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, Entity *source)
|
||||
// {
|
||||
// AABB *aabb = getAABB(level, x, y, z);
|
||||
// if (aabb != nullptr && box->intersects(aabb)) boxes->push_back(aabb);
|
||||
// if (aabb != NULL && box->intersects(aabb)) boxes->push_back(aabb);
|
||||
// }
|
||||
//
|
||||
// void Tile_SPU::addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes)
|
||||
// {
|
||||
// AABB *aabb = getAABB(level, x, y, z);
|
||||
// if (aabb != nullptr && box->intersects(aabb)) boxes->push_back(aabb);
|
||||
// if (aabb != NULL && box->intersects(aabb)) boxes->push_back(aabb);
|
||||
// }
|
||||
//
|
||||
// AABB *Tile_SPU::getAABB(Level *level, int x, int y, int z)
|
||||
@@ -368,18 +368,18 @@ Icon_SPU *Tile_SPU::getTexture(int face)
|
||||
// Vec3 *zh0 = a->clipZ(b, zz0);
|
||||
// Vec3 *zh1 = a->clipZ(b, zz1);
|
||||
//
|
||||
// Vec3 *closest = nullptr;
|
||||
// Vec3 *closest = NULL;
|
||||
//
|
||||
// if (containsX(xh0) && (closest == nullptr || a->distanceTo(xh0) < a->distanceTo(closest))) closest = xh0;
|
||||
// if (containsX(xh1) && (closest == nullptr || a->distanceTo(xh1) < a->distanceTo(closest))) closest = xh1;
|
||||
// if (containsY(yh0) && (closest == nullptr || a->distanceTo(yh0) < a->distanceTo(closest))) closest = yh0;
|
||||
// if (containsY(yh1) && (closest == nullptr || a->distanceTo(yh1) < a->distanceTo(closest))) closest = yh1;
|
||||
// if (containsZ(zh0) && (closest == nullptr || a->distanceTo(zh0) < a->distanceTo(closest))) closest = zh0;
|
||||
// if (containsZ(zh1) && (closest == nullptr || a->distanceTo(zh1) < a->distanceTo(closest))) closest = zh1;
|
||||
// if (containsX(xh0) && (closest == NULL || a->distanceTo(xh0) < a->distanceTo(closest))) closest = xh0;
|
||||
// if (containsX(xh1) && (closest == NULL || a->distanceTo(xh1) < a->distanceTo(closest))) closest = xh1;
|
||||
// if (containsY(yh0) && (closest == NULL || a->distanceTo(yh0) < a->distanceTo(closest))) closest = yh0;
|
||||
// if (containsY(yh1) && (closest == NULL || a->distanceTo(yh1) < a->distanceTo(closest))) closest = yh1;
|
||||
// if (containsZ(zh0) && (closest == NULL || a->distanceTo(zh0) < a->distanceTo(closest))) closest = zh0;
|
||||
// if (containsZ(zh1) && (closest == NULL || a->distanceTo(zh1) < a->distanceTo(closest))) closest = zh1;
|
||||
//
|
||||
// LeaveCriticalSection(&m_csShape);
|
||||
//
|
||||
// if (closest == nullptr) return nullptr;
|
||||
// if (closest == NULL) return NULL;
|
||||
//
|
||||
// int face = -1;
|
||||
//
|
||||
@@ -395,19 +395,19 @@ Icon_SPU *Tile_SPU::getTexture(int face)
|
||||
//
|
||||
// bool Tile_SPU::containsX(Vec3 *v)
|
||||
// {
|
||||
// if( v == nullptr) return false;
|
||||
// if( v == NULL) return false;
|
||||
// return v->y >= yy0 && v->y <= yy1 && v->z >= zz0 && v->z <= zz1;
|
||||
// }
|
||||
//
|
||||
// bool Tile_SPU::containsY(Vec3 *v)
|
||||
// {
|
||||
// if( v == nullptr) return false;
|
||||
// if( v == NULL) return false;
|
||||
// return v->x >= xx0 && v->x <= xx1 && v->z >= zz0 && v->z <= zz1;
|
||||
// }
|
||||
//
|
||||
// bool Tile_SPU::containsZ(Vec3 *v)
|
||||
// {
|
||||
// if( v == nullptr) return false;
|
||||
// if( v == NULL) return false;
|
||||
// return v->x >= xx0 && v->x <= xx1 && v->y >= yy0 && v->y <= yy1;
|
||||
// }
|
||||
//
|
||||
@@ -516,7 +516,7 @@ void Tile_SPU::updateDefaultShape()
|
||||
// // 4J Stu - Special case - only record a crop destroy if is fully grown
|
||||
// if(id==Tile_SPU::crops_Id)
|
||||
// {
|
||||
// if( Tile_SPU::crops->getResource(data, nullptr, 0) > 0 )
|
||||
// if( Tile_SPU::crops->getResource(data, NULL, 0) > 0 )
|
||||
// player->awardStat(Stats::blocksMined[id], 1);
|
||||
// }
|
||||
// else
|
||||
@@ -533,7 +533,7 @@ void Tile_SPU::updateDefaultShape()
|
||||
// if (isCubeShaped() && !isEntityTile[id] && EnchantmentHelper::hasSilkTouch(player->inventory))
|
||||
// {
|
||||
// shared_ptr<ItemInstance> item = getSilkTouchItemInstance(data);
|
||||
// if (item != nullptr)
|
||||
// if (item != NULL)
|
||||
// {
|
||||
// popResource(level, x, y, z, item);
|
||||
// }
|
||||
@@ -625,7 +625,7 @@ float Tile_SPU::getShadeBrightness(ChunkRebuildData *level, int x, int y, int z)
|
||||
Tile_SPU* Tile_SPU::createFromID( int tileID )
|
||||
{
|
||||
if(tileID == 0)
|
||||
return nullptr;
|
||||
return NULL;
|
||||
|
||||
if(m_tiles[tileID].id != -1)
|
||||
return &m_tiles[tileID];
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
Icon_SPU *getTexture(int face, int data);
|
||||
Icon_SPU *getTexture(int face);
|
||||
public:
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr); // 4J added forceData, forceEntity param
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL); // 4J added forceData, forceEntity param
|
||||
double getShapeX0();
|
||||
double getShapeX1();
|
||||
double getShapeY0();
|
||||
@@ -465,7 +465,7 @@ public:
|
||||
double getShapeZ1() { return ms_pTileData->zz1[id]; }
|
||||
Material_SPU* getMaterial();
|
||||
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr); // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL); // 4J added forceData, forceEntity param
|
||||
virtual void updateDefaultShape();
|
||||
virtual void setShape(float x0, float y0, float z0, float x1, float y1, float z1);
|
||||
virtual float getBrightness(ChunkRebuildData *level, int x, int y, int z);
|
||||
|
||||
@@ -14,7 +14,7 @@ public:
|
||||
bool blocksLight() { return false; }
|
||||
bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
bool isCubeShaped() { return false; }
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
int height = level->getData(x, y, z) & HEIGHT_MASK;
|
||||
float o = 2 * (1 + height) / 16.0f;
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
bool isSolidRender(bool isServerLevel = false) { return false; }
|
||||
bool isCubeShaped() { return false; }
|
||||
int getRenderShape() { return Tile_SPU::SHAPE_BLOCK;}
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
setShape(level->getData(x, y, z));
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = nullptr) // 4J added forceData, forceEntity param
|
||||
virtual void updateShape(ChunkRebuildData *level, int x, int y, int z, int forceData = -1, TileEntity* forceEntity = NULL) // 4J added forceData, forceEntity param
|
||||
{
|
||||
const float thickness = 1.0f / 16.0f;
|
||||
|
||||
|
||||
@@ -172,15 +172,15 @@ public:
|
||||
// {
|
||||
// public:
|
||||
// ZipFile(File *file) {}
|
||||
// InputStream *getInputStream(ZipEntry *entry) { return nullptr; }
|
||||
// ZipEntry *getEntry(const wstring& name) {return nullptr;}
|
||||
// InputStream *getInputStream(ZipEntry *entry) { return NULL; }
|
||||
// ZipEntry *getEntry(const wstring& name) {return NULL;}
|
||||
// void close() {}
|
||||
// };
|
||||
//
|
||||
// class ImageIO
|
||||
// {
|
||||
// public:
|
||||
// static BufferedImage *read(InputStream *in) { return nullptr; }
|
||||
// static BufferedImage *read(InputStream *in) { return NULL; }
|
||||
// };
|
||||
//
|
||||
// class Keyboard
|
||||
|
||||
Reference in New Issue
Block a user