1
0

Using Super.

This commit is contained in:
Mattes D
2020-04-13 18:38:06 +02:00
committed by Alexander Harkness
parent f931590bf0
commit 9ee47e5999
399 changed files with 1815 additions and 1381 deletions

View File

@@ -13,7 +13,7 @@
cBeaconEntity::cBeaconEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, 1, 1, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, 1, 1, a_World),
m_IsActive(false),
m_BeaconLevel(0),
m_PrimaryEffect(cEntityEffect::effNoEffect),
@@ -264,7 +264,7 @@ void cBeaconEntity::GiveEffects(void)
void cBeaconEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cBeaconEntity &>(a_Src);
m_BeaconLevel = src.m_BeaconLevel;
m_Contents.CopyFrom(src.m_Contents);

View File

@@ -16,12 +16,12 @@
// tolua_begin
class cBeaconEntity :
class cBeaconEntity:
public cBlockEntityWithItems
{
// tolua_end
using super = cBlockEntityWithItems;
using Super = cBlockEntityWithItems;
public: // tolua_export

View File

@@ -14,7 +14,7 @@
cBedEntity::cBedEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World, short a_Color):
super(a_BlockType, a_BlockMeta, a_Pos, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Color(a_Color)
{
ASSERT(a_BlockType == E_BLOCK_BED);
@@ -26,7 +26,7 @@ cBedEntity::cBedEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a
void cBedEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cBedEntity &>(a_Src);
m_Color = src.m_Color;
}

View File

@@ -12,11 +12,11 @@
// tolua_begin
class cBedEntity :
class cBedEntity:
public cBlockEntity
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export

View File

@@ -10,7 +10,7 @@
#define BLOCKENTITY_PROTODEF(classname) \
virtual bool IsA(const char * a_ClassName) const override \
{ \
return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || super::IsA(a_ClassName))); \
return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || Super::IsA(a_ClassName))); \
} \
virtual const char * GetClass() const override \
{ \
@@ -22,7 +22,7 @@
} \
virtual const char * GetParentClass() const override \
{ \
return super::GetClass(); \
return Super::GetClass(); \
}

View File

@@ -15,7 +15,7 @@ cBlockEntityWithItems::cBlockEntityWithItems(
int a_ItemGridWidth, int a_ItemGridHeight,
cWorld * a_World
):
super(a_BlockType, a_BlockMeta, a_Pos, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
cBlockEntityWindowOwner(this),
m_Contents(a_ItemGridWidth, a_ItemGridHeight)
{
@@ -28,7 +28,7 @@ cBlockEntityWithItems::cBlockEntityWithItems(
void cBlockEntityWithItems::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cBlockEntityWithItems &>(a_Src);
m_Contents.CopyFrom(src.m_Contents);
}

View File

@@ -28,7 +28,7 @@ class cBlockEntityWithItems :
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export

View File

@@ -12,7 +12,7 @@
cBrewingstandEntity::cBrewingstandEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_IsDestroyed(false),
m_IsBrewing(false),
m_TimeBrewed(0),
@@ -42,7 +42,7 @@ cBrewingstandEntity::~cBrewingstandEntity()
void cBrewingstandEntity::Destroy()
{
m_IsDestroyed = true;
super::Destroy();
Super::Destroy();
}
@@ -51,7 +51,7 @@ void cBrewingstandEntity::Destroy()
void cBrewingstandEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cBrewingstandEntity &>(a_Src);
m_IsBrewing = src.m_IsBrewing;
for (size_t i = 0; i < ARRAYCOUNT(m_CurrentBrewingRecipes); ++i)
@@ -202,7 +202,7 @@ void cBrewingstandEntity::BroadcastProgress(short a_ProgressbarID, short a_Value
void cBrewingstandEntity::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum)
{
super::OnSlotChanged(a_ItemGrid, a_SlotNum);
Super::OnSlotChanged(a_ItemGrid, a_SlotNum);
if (m_IsDestroyed)
{

View File

@@ -20,7 +20,7 @@ class cBrewingstandEntity :
{
// tolua_end
using super = cBlockEntityWithItems;
using Super = cBlockEntityWithItems;
// tolua_begin

View File

@@ -14,7 +14,7 @@
cChestEntity::cChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_NumActivePlayers(0),
m_Neighbour(nullptr)
{
@@ -50,7 +50,7 @@ cChestEntity::~cChestEntity()
void cChestEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cChestEntity &>(a_Src);
m_Contents.CopyFrom(src.m_Contents);

View File

@@ -20,7 +20,7 @@ class cChestEntity :
{
// tolua_end
using super = cBlockEntityWithItems;
using Super = cBlockEntityWithItems;
// tolua_begin

View File

@@ -18,7 +18,7 @@
cCommandBlockEntity::cCommandBlockEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_ShouldExecute(false),
m_Result(0)
{
@@ -115,7 +115,7 @@ void cCommandBlockEntity::Activate(void)
void cCommandBlockEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cCommandBlockEntity &>(a_Src);
m_Command = src.m_Command;
m_LastOutput = src.m_LastOutput;

View File

@@ -22,7 +22,7 @@ class cCommandBlockEntity :
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export

View File

@@ -14,7 +14,7 @@
cDispenserEntity::cDispenserEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World)
Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
{
ASSERT(a_BlockType == E_BLOCK_DISPENSER);
}

View File

@@ -13,7 +13,7 @@ class cDispenserEntity :
{
// tolua_end
using super = cDropSpenserEntity;
using Super = cDropSpenserEntity;
public: // tolua_export

View File

@@ -16,7 +16,7 @@
cDropSpenserEntity::cDropSpenserEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_ShouldDropSpense(false)
{
}
@@ -115,7 +115,7 @@ void cDropSpenserEntity::Activate(void)
void cDropSpenserEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cDropSpenserEntity &>(a_Src);
m_Contents.CopyFrom(src.m_Contents);
m_ShouldDropSpense = src.m_ShouldDropSpense;

View File

@@ -28,7 +28,7 @@ class cDropSpenserEntity :
{
// tolua_end
using super = cBlockEntityWithItems;
using Super = cBlockEntityWithItems;
// tolua_begin

View File

@@ -11,7 +11,7 @@
cDropperEntity::cDropperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World)
Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
{
ASSERT(a_BlockType == E_BLOCK_DROPPER);
}

View File

@@ -21,7 +21,7 @@ class cDropperEntity :
{
// tolua_end
using super = cDropSpenserEntity;
using Super = cDropSpenserEntity;
public: // tolua_export

View File

@@ -15,7 +15,7 @@
cEnderChestEntity::cEnderChestEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
cBlockEntityWindowOwner(this)
{
ASSERT(a_BlockType == E_BLOCK_ENDER_CHEST);

View File

@@ -15,7 +15,7 @@ class cEnderChestEntity :
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export

View File

@@ -14,7 +14,7 @@
cFlowerPotEntity::cFlowerPotEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World)
Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
{
ASSERT(a_BlockType == E_BLOCK_FLOWER_POT);
}
@@ -43,7 +43,7 @@ void cFlowerPotEntity::Destroy(void)
void cFlowerPotEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cFlowerPotEntity &>(a_Src);
m_Item = src.m_Item;
}

View File

@@ -22,7 +22,7 @@ class cFlowerPotEntity :
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export

View File

@@ -23,7 +23,7 @@ enum
cFurnaceEntity::cFurnaceEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_CurrentRecipe(nullptr),
m_IsDestroyed(false),
m_IsCooking(a_BlockType == E_BLOCK_LIT_FURNACE),
@@ -58,7 +58,7 @@ cFurnaceEntity::~cFurnaceEntity()
void cFurnaceEntity::Destroy()
{
m_IsDestroyed = true;
super::Destroy();
Super::Destroy();
}
@@ -67,7 +67,7 @@ void cFurnaceEntity::Destroy()
void cFurnaceEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cFurnaceEntity &>(a_Src);
m_Contents.CopyFrom(src.m_Contents);
m_CurrentRecipe = src.m_CurrentRecipe;
@@ -255,7 +255,7 @@ void cFurnaceEntity::BurnNewFuel(void)
void cFurnaceEntity::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum)
{
super::OnSlotChanged(a_ItemGrid, a_SlotNum);
Super::OnSlotChanged(a_ItemGrid, a_SlotNum);
if (m_IsDestroyed)
{

View File

@@ -20,7 +20,7 @@ class cFurnaceEntity :
{
// tolua_end
using super = cBlockEntityWithItems;
using Super = cBlockEntityWithItems;
// tolua_begin

View File

@@ -18,7 +18,7 @@
cHopperEntity::cHopperEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, ContentsWidth, ContentsHeight, a_World),
m_LastMoveItemsInTick(0),
m_LastMoveItemsOutTick(0),
m_Locked(false)
@@ -63,7 +63,7 @@ std::pair<bool, Vector3i> cHopperEntity::GetOutputBlockPos(NIBBLETYPE a_BlockMet
void cHopperEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cHopperEntity &>(a_Src);
m_LastMoveItemsInTick = src.m_LastMoveItemsInTick;
m_LastMoveItemsOutTick = src.m_LastMoveItemsOutTick;

View File

@@ -21,7 +21,7 @@ class cHopperEntity :
{
// tolua_end
using super = cBlockEntityWithItems;
using Super = cBlockEntityWithItems;
// tolua_begin

View File

@@ -14,7 +14,7 @@
cJukeboxEntity::cJukeboxEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Record(0)
{
ASSERT(a_BlockType == E_BLOCK_JUKEBOX);
@@ -49,7 +49,7 @@ void cJukeboxEntity::Destroy(void)
void cJukeboxEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cJukeboxEntity &>(a_Src);
m_Record = src.m_Record;
}

View File

@@ -15,7 +15,7 @@ class cJukeboxEntity :
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export

View File

@@ -14,7 +14,7 @@
cMobHeadEntity::cMobHeadEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Type(SKULL_TYPE_SKELETON),
m_Rotation(SKULL_ROTATION_NORTH)
{
@@ -27,7 +27,7 @@ cMobHeadEntity::cMobHeadEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Ve
void cMobHeadEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cMobHeadEntity &>(a_Src);
m_OwnerName = src.m_OwnerName;
m_OwnerTexture = src.m_OwnerTexture;

View File

@@ -23,7 +23,7 @@ class cMobHeadEntity :
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export

View File

@@ -14,7 +14,7 @@
cMobSpawnerEntity::cMobSpawnerEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Entity(mtPig),
m_SpawnDelay(100),
m_IsActive(false)
@@ -28,7 +28,7 @@ cMobSpawnerEntity::cMobSpawnerEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMe
void cMobSpawnerEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cMobSpawnerEntity &>(a_Src);
m_Entity = src.m_Entity;
m_IsActive = src.m_IsActive;

View File

@@ -21,7 +21,7 @@ class cMobSpawnerEntity :
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export

View File

@@ -10,7 +10,7 @@
cNoteEntity::cNoteEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World),
Super(a_BlockType, a_BlockMeta, a_Pos, a_World),
m_Pitch(0)
{
ASSERT(a_BlockType == E_BLOCK_NOTE_BLOCK);
@@ -22,7 +22,7 @@ cNoteEntity::cNoteEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i
void cNoteEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cNoteEntity &>(a_Src);
m_Pitch = src.m_Pitch;
}

View File

@@ -32,7 +32,7 @@ class cNoteEntity :
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export

View File

@@ -13,7 +13,7 @@
cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i a_Pos, cWorld * a_World):
super(a_BlockType, a_BlockMeta, a_Pos, a_World)
Super(a_BlockType, a_BlockMeta, a_Pos, a_World)
{
ASSERT((a_BlockType == E_BLOCK_WALLSIGN) || (a_BlockType == E_BLOCK_SIGN_POST));
ASSERT(cChunkDef::IsValidHeight(a_Pos.y));
@@ -25,7 +25,7 @@ cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, Vector3i
void cSignEntity::CopyFrom(const cBlockEntity & a_Src)
{
super::CopyFrom(a_Src);
Super::CopyFrom(a_Src);
auto & src = static_cast<const cSignEntity &>(a_Src);
for (size_t i = 0; i < ARRAYCOUNT(m_Line); ++i)
{

View File

@@ -21,7 +21,7 @@ class cSignEntity :
{
// tolua_end
using super = cBlockEntity;
using Super = cBlockEntity;
public: // tolua_export