diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2015-12-19 22:20:56 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2015-12-19 22:20:56 +0100 |
commit | b8752bb26e91bcdcebfb8dd43e5794251ff70a89 (patch) | |
tree | 95048f5a2a833c1d43785f6eaea070627c2b9ebe /src/Simulator/RedstoneSimulator.h | |
parent | Merge pull request #2776 from cuberite/AtomicBoolIsthread (diff) | |
parent | Reorganised the redstone simulator (diff) | |
download | cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.gz cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.bz2 cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.lz cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.xz cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.tar.zst cuberite-b8752bb26e91bcdcebfb8dd43e5794251ff70a89.zip |
Diffstat (limited to 'src/Simulator/RedstoneSimulator.h')
-rw-r--r-- | src/Simulator/RedstoneSimulator.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/Simulator/RedstoneSimulator.h b/src/Simulator/RedstoneSimulator.h index b0ad08aa4..863ba2532 100644 --- a/src/Simulator/RedstoneSimulator.h +++ b/src/Simulator/RedstoneSimulator.h @@ -1,30 +1,41 @@ #pragma once -#include "Simulator.h" +#include "ChunkDef.h" +#include "Simulator/Simulator.h" + + + class cRedstoneSimulatorChunkData { public: virtual ~cRedstoneSimulatorChunkData() = 0; -} ; - +}; inline cRedstoneSimulatorChunkData::~cRedstoneSimulatorChunkData() {} + + + class cRedstoneSimulator : public cSimulator { typedef cSimulator super; - public: + cRedstoneSimulator(cWorld & a_World) : - super(a_World) + super(a_World) { } - + + virtual void Simulate(float a_Dt) = 0; + virtual void SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) = 0; + virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) = 0; + virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) = 0; + virtual cRedstoneSimulatorChunkData * CreateChunkData() = 0; -} ; +}; |