summaryrefslogtreecommitdiffstats
path: root/src/Simulator
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Simulator/DelayedFluidSimulator.cpp (renamed from source/Simulator/DelayedFluidSimulator.cpp)0
-rw-r--r--src/Simulator/DelayedFluidSimulator.h (renamed from source/Simulator/DelayedFluidSimulator.h)0
-rw-r--r--src/Simulator/FireSimulator.cpp (renamed from source/Simulator/FireSimulator.cpp)0
-rw-r--r--src/Simulator/FireSimulator.h (renamed from source/Simulator/FireSimulator.h)0
-rw-r--r--src/Simulator/FloodyFluidSimulator.cpp (renamed from source/Simulator/FloodyFluidSimulator.cpp)0
-rw-r--r--src/Simulator/FloodyFluidSimulator.h (renamed from source/Simulator/FloodyFluidSimulator.h)0
-rw-r--r--src/Simulator/FluidSimulator.cpp (renamed from source/Simulator/FluidSimulator.cpp)0
-rw-r--r--src/Simulator/FluidSimulator.h (renamed from source/Simulator/FluidSimulator.h)0
-rw-r--r--src/Simulator/NoopFluidSimulator.h (renamed from source/Simulator/NoopFluidSimulator.h)0
-rw-r--r--src/Simulator/RedstoneSimulator.cpp (renamed from source/Simulator/RedstoneSimulator.cpp)0
-rw-r--r--src/Simulator/RedstoneSimulator.h (renamed from source/Simulator/RedstoneSimulator.h)0
-rw-r--r--src/Simulator/SandSimulator.cpp (renamed from source/Simulator/SandSimulator.cpp)0
-rw-r--r--src/Simulator/SandSimulator.h (renamed from source/Simulator/SandSimulator.h)0
-rw-r--r--src/Simulator/Simulator.cpp (renamed from source/Simulator/Simulator.cpp)0
-rw-r--r--src/Simulator/Simulator.h46
-rw-r--r--src/Simulator/SimulatorManager.cpp (renamed from source/Simulator/SimulatorManager.cpp)0
-rw-r--r--src/Simulator/SimulatorManager.h (renamed from source/Simulator/SimulatorManager.h)0
-rw-r--r--src/Simulator/VaporizeFluidSimulator.cpp (renamed from source/Simulator/VaporizeFluidSimulator.cpp)0
-rw-r--r--src/Simulator/VaporizeFluidSimulator.h (renamed from source/Simulator/VaporizeFluidSimulator.h)0
19 files changed, 46 insertions, 0 deletions
diff --git a/source/Simulator/DelayedFluidSimulator.cpp b/src/Simulator/DelayedFluidSimulator.cpp
index a4645ca09..a4645ca09 100644
--- a/source/Simulator/DelayedFluidSimulator.cpp
+++ b/src/Simulator/DelayedFluidSimulator.cpp
diff --git a/source/Simulator/DelayedFluidSimulator.h b/src/Simulator/DelayedFluidSimulator.h
index c81500741..c81500741 100644
--- a/source/Simulator/DelayedFluidSimulator.h
+++ b/src/Simulator/DelayedFluidSimulator.h
diff --git a/source/Simulator/FireSimulator.cpp b/src/Simulator/FireSimulator.cpp
index ac3fb9695..ac3fb9695 100644
--- a/source/Simulator/FireSimulator.cpp
+++ b/src/Simulator/FireSimulator.cpp
diff --git a/source/Simulator/FireSimulator.h b/src/Simulator/FireSimulator.h
index 0d8a548ef..0d8a548ef 100644
--- a/source/Simulator/FireSimulator.h
+++ b/src/Simulator/FireSimulator.h
diff --git a/source/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp
index d204a1f8b..d204a1f8b 100644
--- a/source/Simulator/FloodyFluidSimulator.cpp
+++ b/src/Simulator/FloodyFluidSimulator.cpp
diff --git a/source/Simulator/FloodyFluidSimulator.h b/src/Simulator/FloodyFluidSimulator.h
index c4af2e246..c4af2e246 100644
--- a/source/Simulator/FloodyFluidSimulator.h
+++ b/src/Simulator/FloodyFluidSimulator.h
diff --git a/source/Simulator/FluidSimulator.cpp b/src/Simulator/FluidSimulator.cpp
index dac666484..dac666484 100644
--- a/source/Simulator/FluidSimulator.cpp
+++ b/src/Simulator/FluidSimulator.cpp
diff --git a/source/Simulator/FluidSimulator.h b/src/Simulator/FluidSimulator.h
index 672b740a2..672b740a2 100644
--- a/source/Simulator/FluidSimulator.h
+++ b/src/Simulator/FluidSimulator.h
diff --git a/source/Simulator/NoopFluidSimulator.h b/src/Simulator/NoopFluidSimulator.h
index 8f894433f..8f894433f 100644
--- a/source/Simulator/NoopFluidSimulator.h
+++ b/src/Simulator/NoopFluidSimulator.h
diff --git a/source/Simulator/RedstoneSimulator.cpp b/src/Simulator/RedstoneSimulator.cpp
index 81d4e26f6..81d4e26f6 100644
--- a/source/Simulator/RedstoneSimulator.cpp
+++ b/src/Simulator/RedstoneSimulator.cpp
diff --git a/source/Simulator/RedstoneSimulator.h b/src/Simulator/RedstoneSimulator.h
index d3002394a..d3002394a 100644
--- a/source/Simulator/RedstoneSimulator.h
+++ b/src/Simulator/RedstoneSimulator.h
diff --git a/source/Simulator/SandSimulator.cpp b/src/Simulator/SandSimulator.cpp
index 87fb83357..87fb83357 100644
--- a/source/Simulator/SandSimulator.cpp
+++ b/src/Simulator/SandSimulator.cpp
diff --git a/source/Simulator/SandSimulator.h b/src/Simulator/SandSimulator.h
index 6e9ea15ac..6e9ea15ac 100644
--- a/source/Simulator/SandSimulator.h
+++ b/src/Simulator/SandSimulator.h
diff --git a/source/Simulator/Simulator.cpp b/src/Simulator/Simulator.cpp
index 06fd0f858..06fd0f858 100644
--- a/source/Simulator/Simulator.cpp
+++ b/src/Simulator/Simulator.cpp
diff --git a/src/Simulator/Simulator.h b/src/Simulator/Simulator.h
new file mode 100644
index 000000000..5cd0e8657
--- /dev/null
+++ b/src/Simulator/Simulator.h
@@ -0,0 +1,46 @@
+
+#pragma once
+
+#include "../Vector3i.h"
+#include "inifile/iniFile.h"
+
+
+
+
+
+class cWorld;
+class cChunk;
+
+
+
+
+
+class cSimulator
+{
+public:
+ cSimulator(cWorld & a_World);
+ virtual ~cSimulator();
+
+ /// Called in each tick, a_Dt is the time passed since the last tick, in msec
+ virtual void Simulate(float a_Dt) = 0;
+
+ /// Called in each tick for each chunk, a_Dt is the time passed since the last tick, in msec; direct access to chunk data available
+ virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, cChunk * a_Chunk) {};
+
+ /// Called when a block changes
+ virtual void WakeUp(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk);
+
+ virtual bool IsAllowedBlock(BLOCKTYPE a_BlockType) = 0;
+
+protected:
+ friend class cChunk; // Calls AddBlock() in its WakeUpSimulators() function, to speed things up
+
+ /// Called to simulate a new block
+ virtual void AddBlock(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk) = 0;
+
+ cWorld & m_World;
+} ;
+
+
+
+
diff --git a/source/Simulator/SimulatorManager.cpp b/src/Simulator/SimulatorManager.cpp
index 2bc483cbd..2bc483cbd 100644
--- a/source/Simulator/SimulatorManager.cpp
+++ b/src/Simulator/SimulatorManager.cpp
diff --git a/source/Simulator/SimulatorManager.h b/src/Simulator/SimulatorManager.h
index 31a709316..31a709316 100644
--- a/source/Simulator/SimulatorManager.h
+++ b/src/Simulator/SimulatorManager.h
diff --git a/source/Simulator/VaporizeFluidSimulator.cpp b/src/Simulator/VaporizeFluidSimulator.cpp
index 4206c64d1..4206c64d1 100644
--- a/source/Simulator/VaporizeFluidSimulator.cpp
+++ b/src/Simulator/VaporizeFluidSimulator.cpp
diff --git a/source/Simulator/VaporizeFluidSimulator.h b/src/Simulator/VaporizeFluidSimulator.h
index c8eb7802b..c8eb7802b 100644
--- a/source/Simulator/VaporizeFluidSimulator.h
+++ b/src/Simulator/VaporizeFluidSimulator.h