diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-09-05 16:56:31 +0200 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-09-05 16:56:31 +0200 |
commit | 28f66efe307150558f4ad2546e058370a828be3e (patch) | |
tree | 2ef088aa2d1a8ae85007b34b463d5044847bf006 /src/Simulator | |
parent | Merge branch 'master' into ComponentRewrite (diff) | |
download | cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.gz cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.bz2 cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.lz cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.xz cuberite-28f66efe307150558f4ad2546e058370a828be3e.tar.zst cuberite-28f66efe307150558f4ad2546e058370a828be3e.zip |
Diffstat (limited to 'src/Simulator')
-rw-r--r-- | src/Simulator/DelayedFluidSimulator.h | 12 | ||||
-rw-r--r-- | src/Simulator/FireSimulator.h | 8 | ||||
-rw-r--r-- | src/Simulator/FloodyFluidSimulator.h | 4 | ||||
-rw-r--r-- | src/Simulator/FluidSimulator.h | 4 | ||||
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator.cpp | 16 | ||||
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator.h | 10 | ||||
-rw-r--r-- | src/Simulator/NoopFluidSimulator.h | 6 | ||||
-rw-r--r-- | src/Simulator/NoopRedstoneSimulator.h | 8 | ||||
-rw-r--r-- | src/Simulator/SandSimulator.h | 10 | ||||
-rw-r--r-- | src/Simulator/VanillaFluidSimulator.h | 4 | ||||
-rw-r--r-- | src/Simulator/VaporizeFluidSimulator.h | 6 |
11 files changed, 44 insertions, 44 deletions
diff --git a/src/Simulator/DelayedFluidSimulator.h b/src/Simulator/DelayedFluidSimulator.h index cf74274cb..8a6c26c7a 100644 --- a/src/Simulator/DelayedFluidSimulator.h +++ b/src/Simulator/DelayedFluidSimulator.h @@ -53,11 +53,11 @@ class cDelayedFluidSimulator : public: cDelayedFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, int a_TickDelay); - // cSimulator /*override*/s: - virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) /*override*/; - virtual void Simulate(float a_Dt) /*override*/; - virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) /*override*/; - virtual cFluidSimulatorData * CreateChunkData(void) /*override*/ { return new cDelayedFluidSimulatorChunkData(m_TickDelay); } + // cSimulator overrides: + virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override; + virtual void Simulate(float a_Dt) override; + virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override; + virtual cFluidSimulatorData * CreateChunkData(void) override { return new cDelayedFluidSimulatorChunkData(m_TickDelay); } protected: @@ -73,7 +73,7 @@ protected: | adding blocks here ^ | ^ simulating here */ - /// Called from SimulateChunk() to simulate each block in one slot of blocks. Descendants /*override*/ this method to provide custom simulation. + /// Called from SimulateChunk() to simulate each block in one slot of blocks. Descendants override this method to provide custom simulation. virtual void SimulateBlock(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ) = 0; } ; diff --git a/src/Simulator/FireSimulator.h b/src/Simulator/FireSimulator.h index 1174adf5c..9ccc3ef4f 100644 --- a/src/Simulator/FireSimulator.h +++ b/src/Simulator/FireSimulator.h @@ -22,10 +22,10 @@ public: cFireSimulator(cWorld & a_World, cIniFile & a_IniFile); ~cFireSimulator(); - virtual void Simulate(float a_Dt) /*override*/ { UNUSED(a_Dt);} // not used - virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) /*override*/; + virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);} // not used + virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override; - virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) /*override*/; + virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) override; static bool IsFuel (BLOCKTYPE a_BlockType); static bool DoesBurnForever(BLOCKTYPE a_BlockType); @@ -44,7 +44,7 @@ protected: int m_ReplaceFuelChance; - virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) /*override*/; + virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override; /// Returns the time [msec] after which the specified fire block is stepped again; based on surrounding fuels int GetBurnStepTime(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ); diff --git a/src/Simulator/FloodyFluidSimulator.h b/src/Simulator/FloodyFluidSimulator.h index c12dbd868..8e1be5e6b 100644 --- a/src/Simulator/FloodyFluidSimulator.h +++ b/src/Simulator/FloodyFluidSimulator.h @@ -35,8 +35,8 @@ protected: NIBBLETYPE m_Falloff; int m_NumNeighborsForSource; - // cDelayedFluidSimulator /*override*/s: - virtual void SimulateBlock(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ) /*override*/; + // cDelayedFluidSimulator overrides: + virtual void SimulateBlock(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ) override; /** Checks tributaries, if not fed, decreases the block's level and returns true. */ bool CheckTributaries(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_MyMeta); diff --git a/src/Simulator/FluidSimulator.h b/src/Simulator/FluidSimulator.h index dcfa05782..672b740a2 100644 --- a/src/Simulator/FluidSimulator.h +++ b/src/Simulator/FluidSimulator.h @@ -43,8 +43,8 @@ class cFluidSimulator : public: cFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid); - // cSimulator /*override*/s: - virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) /*override*/; + // cSimulator overrides: + virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) override; /// Gets the flowing direction. If a_Over is true also the block over the current block affects the direction (standard) virtual Direction GetFlowingDirection(int a_X, int a_Y, int a_Z, bool a_Over = true); diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp index c0a5f864f..7b3a2c2fa 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.cpp +++ b/src/Simulator/IncrementalRedstoneSimulator.cpp @@ -846,7 +846,7 @@ void cIncrementalRedstoneSimulator::HandleDropSpenser(int a_RelBlockX, int a_Rel public: cSetPowerToDropSpenser(bool a_IsPowered) : m_IsPowered(a_IsPowered) {} - virtual bool Item(cRedstonePoweredEntity * a_DropSpenser) /*override*/ + virtual bool Item(cRedstonePoweredEntity * a_DropSpenser) override { a_DropSpenser->SetRedstonePower(m_IsPowered); return false; @@ -947,7 +947,7 @@ void cIncrementalRedstoneSimulator::HandleCommandBlock(int a_RelBlockX, int a_Re public: cSetPowerToCommandBlock(bool a_IsPowered) : m_IsPowered(a_IsPowered) {} - virtual bool Item(cCommandBlockEntity * a_CommandBlock) /*override*/ + virtual bool Item(cCommandBlockEntity * a_CommandBlock) override { a_CommandBlock->SetRedstonePower(m_IsPowered); return false; @@ -1037,7 +1037,7 @@ void cIncrementalRedstoneSimulator::HandleNoteBlock(int a_RelBlockX, int a_RelBl public: cSetPowerToNoteBlock() {} - virtual bool Item(cRedstonePoweredEntity * a_NoteBlock) /*override*/ + virtual bool Item(cRedstonePoweredEntity * a_NoteBlock) override { a_NoteBlock->SetRedstonePower(true); return false; @@ -1129,7 +1129,7 @@ void cIncrementalRedstoneSimulator::HandlePressurePlate(int a_RelBlockX, int a_R { } - virtual bool Item(cEntity * a_Entity) /*override*/ + virtual bool Item(cEntity * a_Entity) override { Vector3f EntityPos = a_Entity->GetPosition(); Vector3f BlockPos(m_X + 0.5f, (float)m_Y, m_Z + 0.5f); @@ -1197,7 +1197,7 @@ void cIncrementalRedstoneSimulator::HandlePressurePlate(int a_RelBlockX, int a_R { } - virtual bool Item(cEntity * a_Entity) /*override*/ + virtual bool Item(cEntity * a_Entity) override { Vector3f EntityPos = a_Entity->GetPosition(); Vector3f BlockPos(m_X + 0.5f, (float)m_Y, m_Z + 0.5f); @@ -1265,7 +1265,7 @@ void cIncrementalRedstoneSimulator::HandlePressurePlate(int a_RelBlockX, int a_R { } - virtual bool Item(cEntity * a_Entity) /*override*/ + virtual bool Item(cEntity * a_Entity) override { Vector3f EntityPos = a_Entity->GetPosition(); Vector3f BlockPos(m_X + 0.5f, (float)m_Y, m_Z + 0.5f); @@ -1405,7 +1405,7 @@ void cIncrementalRedstoneSimulator::HandleTrappedChest(int a_RelBlockX, int a_Re { } - virtual bool Item(cChestEntity * a_Chest) /*override*/ + virtual bool Item(cChestEntity * a_Chest) override { ASSERT(a_Chest->GetBlockType() == E_BLOCK_TRAPPED_CHEST); m_NumberOfPlayers = a_Chest->GetNumberOfPlayers(); @@ -1455,7 +1455,7 @@ void cIncrementalRedstoneSimulator::HandleTripwire(int a_RelBlockX, int a_RelBlo { } - virtual bool Item(cEntity * a_Entity) /*override*/ + virtual bool Item(cEntity * a_Entity) override { cBoundingBox bbWire(m_X, m_X + 1, m_Y, m_Y + 0.1, m_Z, m_Z + 1); cBoundingBox bbEntity(a_Entity->GetPosition(), a_Entity->GetWidth() / 2, a_Entity->GetHeight()); diff --git a/src/Simulator/IncrementalRedstoneSimulator.h b/src/Simulator/IncrementalRedstoneSimulator.h index 3a3945d23..79740a8f6 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.h +++ b/src/Simulator/IncrementalRedstoneSimulator.h @@ -19,10 +19,10 @@ public: cIncrementalRedstoneSimulator(cWorld & a_World); ~cIncrementalRedstoneSimulator(); - virtual void Simulate(float a_Dt) /*override*/ { UNUSED(a_Dt);} // not used - virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) /*override*/; - virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) /*override*/ { return IsRedstone(a_BlockType); } - virtual void WakeUp(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) /*override*/; + virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);} // not used + virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override; + virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) override { return IsRedstone(a_BlockType); } + virtual void WakeUp(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override; enum eRedstoneDirection { @@ -82,7 +82,7 @@ private: SimulatedPlayerToggleableList * m_SimulatedPlayerToggleableBlocks; RepeatersDelayList * m_RepeatersDelayList; - virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) /*override*/ { RedstoneAddBlock(a_BlockX, a_BlockY, a_BlockZ, a_Chunk); } + virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override { RedstoneAddBlock(a_BlockX, a_BlockY, a_BlockZ, a_Chunk); } void RedstoneAddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk, cChunk * a_OtherChunk = NULL); cChunk * m_Chunk; diff --git a/src/Simulator/NoopFluidSimulator.h b/src/Simulator/NoopFluidSimulator.h index 1a616f416..9fe2f9040 100644 --- a/src/Simulator/NoopFluidSimulator.h +++ b/src/Simulator/NoopFluidSimulator.h @@ -26,15 +26,15 @@ public: { } - // cSimulator /*override*/s: - virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) /*override*/ + // cSimulator overrides: + virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override { UNUSED(a_BlockX); UNUSED(a_BlockY); UNUSED(a_BlockZ); UNUSED(a_Chunk); } - virtual void Simulate(float a_Dt) /*override*/ { UNUSED(a_Dt);} + virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);} } ; diff --git a/src/Simulator/NoopRedstoneSimulator.h b/src/Simulator/NoopRedstoneSimulator.h index 43b694db8..f9ed47982 100644 --- a/src/Simulator/NoopRedstoneSimulator.h +++ b/src/Simulator/NoopRedstoneSimulator.h @@ -20,16 +20,16 @@ public: // ~cRedstoneNoopSimulator(); - virtual void Simulate(float a_Dt) /*override*/ { UNUSED(a_Dt);} // not used - virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) /*override*/ + virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);} // not used + virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override { UNUSED(a_Dt); UNUSED(a_ChunkX); UNUSED(a_ChunkZ); UNUSED(a_Chunk); } - virtual bool IsAllowedBlock( BLOCKTYPE a_BlockType) /*override*/ { return false; } - virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) /*override*/ + virtual bool IsAllowedBlock( BLOCKTYPE a_BlockType) override { return false; } + virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override { UNUSED(a_BlockX); UNUSED(a_BlockY); diff --git a/src/Simulator/SandSimulator.h b/src/Simulator/SandSimulator.h index c6a54ee02..1262f2792 100644 --- a/src/Simulator/SandSimulator.h +++ b/src/Simulator/SandSimulator.h @@ -14,10 +14,10 @@ class cSandSimulator : public: cSandSimulator(cWorld & a_World, cIniFile & a_IniFile); - // cSimulator /*override*/s: - virtual void Simulate(float a_Dt) /*override*/ { UNUSED(a_Dt);} // not used - virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) /*override*/; - virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) /*override*/; + // cSimulator overrides: + virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);} // not used + virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) override; + virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) override; /// Returns true if a falling-able block can start falling through the specified block type static bool CanStartFallingThrough(BLOCKTYPE a_BlockType); @@ -46,7 +46,7 @@ protected: int m_TotalBlocks; // Total number of blocks currently in the queue for simulating - virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) /*override*/; + virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override; /// Performs the instant fall of the block - removes it from top, Finishes it at the bottom void DoInstantFall(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ); diff --git a/src/Simulator/VanillaFluidSimulator.h b/src/Simulator/VanillaFluidSimulator.h index 964b5b466..89a56ca14 100644 --- a/src/Simulator/VanillaFluidSimulator.h +++ b/src/Simulator/VanillaFluidSimulator.h @@ -29,8 +29,8 @@ public: cVanillaFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid, NIBBLETYPE a_Falloff, int a_TickDelay, int a_NumNeighborsForSource); protected: - // cFloodyFluidSimulator /*override*/s: - virtual void SpreadXZ(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_NewMeta) /*override*/; + // cFloodyFluidSimulator overrides: + virtual void SpreadXZ(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_NewMeta) override; /** Recursively calculates the minimum number of blocks needed to descend a level. */ int CalculateFlowCost(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, Direction a_Dir, unsigned a_Iteration = 0); diff --git a/src/Simulator/VaporizeFluidSimulator.h b/src/Simulator/VaporizeFluidSimulator.h index e1c345672..c8eb7802b 100644 --- a/src/Simulator/VaporizeFluidSimulator.h +++ b/src/Simulator/VaporizeFluidSimulator.h @@ -24,9 +24,9 @@ class cVaporizeFluidSimulator : public: cVaporizeFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid); - // cSimulator /*override*/s: - virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) /*override*/; - virtual void Simulate(float a_Dt) /*override*/; + // cSimulator overrides: + virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) override; + virtual void Simulate(float a_Dt) override; } ; |