summaryrefslogtreecommitdiffstats
path: root/src/Simulator
diff options
context:
space:
mode:
Diffstat (limited to 'src/Simulator')
-rw-r--r--src/Simulator/NoopRedstoneSimulator.h40
-rw-r--r--src/Simulator/RedstoneManager.cpp19
-rw-r--r--src/Simulator/RedstoneManager.h17
-rw-r--r--src/Simulator/RedstoneSimulator.h6
4 files changed, 79 insertions, 3 deletions
diff --git a/src/Simulator/NoopRedstoneSimulator.h b/src/Simulator/NoopRedstoneSimulator.h
new file mode 100644
index 000000000..4dd473c64
--- /dev/null
+++ b/src/Simulator/NoopRedstoneSimulator.h
@@ -0,0 +1,40 @@
+
+#pragma once
+
+#include "RedstoneManager.h"
+
+
+
+
+
+class cRedstoneNoopSimulator :
+ public cRedstoneManager
+{
+ typedef cRedstoneManager super;
+public:
+
+ cRedstoneNoopSimulator(cWorld & a_World) :
+ super(a_World)
+ {
+ }
+
+ //~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
+ {
+ 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
+ {
+ UNUSED(a_BlockX);
+ UNUSED(a_BlockY);
+ UNUSED(a_BlockZ);
+ UNUSED(a_Chunk);
+ }
+
+} ; \ No newline at end of file
diff --git a/src/Simulator/RedstoneManager.cpp b/src/Simulator/RedstoneManager.cpp
new file mode 100644
index 000000000..58fb8fa4c
--- /dev/null
+++ b/src/Simulator/RedstoneManager.cpp
@@ -0,0 +1,19 @@
+
+#include "Globals.h"
+
+#include "RedstoneManager.h"
+#include "../World.h"
+
+
+
+
+
+cRedstoneManager::cRedstoneManager(cWorld & a_World) :
+ super(a_World)
+{
+}
+
+
+
+
+
diff --git a/src/Simulator/RedstoneManager.h b/src/Simulator/RedstoneManager.h
new file mode 100644
index 000000000..846b7d8ab
--- /dev/null
+++ b/src/Simulator/RedstoneManager.h
@@ -0,0 +1,17 @@
+
+#pragma once
+
+#include "Simulator.h"
+
+
+
+
+class cRedstoneManager :
+ public cSimulator
+{
+ typedef cSimulator super;
+
+public:
+ cRedstoneManager(cWorld & a_World);
+
+} ; \ No newline at end of file
diff --git a/src/Simulator/RedstoneSimulator.h b/src/Simulator/RedstoneSimulator.h
index c505b2a0f..c5ab1b9bb 100644
--- a/src/Simulator/RedstoneSimulator.h
+++ b/src/Simulator/RedstoneSimulator.h
@@ -1,7 +1,7 @@
#pragma once
-#include "Simulator.h"
+#include "RedstoneManager.h"
/// Per-chunk data for the simulator, specified individual chunks to simulate; 'Data' is not used
typedef cCoordWithBlockAndBoolVector cRedstoneSimulatorChunkData;
@@ -11,9 +11,9 @@ typedef cCoordWithBlockAndBoolVector cRedstoneSimulatorChunkData;
class cRedstoneSimulator :
- public cSimulator
+ public cRedstoneManager
{
- typedef cSimulator super;
+ typedef cRedstoneManager super;
public:
cRedstoneSimulator(cWorld & a_World);