summaryrefslogtreecommitdiffstats
path: root/include/world
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/world/Block.hpp (renamed from src/world/Block.hpp)0
-rw-r--r--include/world/Collision.hpp (renamed from src/world/Collision.hpp)0
-rw-r--r--include/world/Section.hpp (renamed from src/world/Section.hpp)17
-rw-r--r--include/world/World.hpp (renamed from src/world/World.hpp)16
4 files changed, 18 insertions, 15 deletions
diff --git a/src/world/Block.hpp b/include/world/Block.hpp
index 2f823fe..2f823fe 100644
--- a/src/world/Block.hpp
+++ b/include/world/Block.hpp
diff --git a/src/world/Collision.hpp b/include/world/Collision.hpp
index b88fbf7..b88fbf7 100644
--- a/src/world/Collision.hpp
+++ b/include/world/Collision.hpp
diff --git a/src/world/Section.hpp b/include/world/Section.hpp
index 657fc13..139b5b5 100644
--- a/src/world/Section.hpp
+++ b/include/world/Section.hpp
@@ -3,10 +3,12 @@
#include <vector>
#include <map>
#include <condition_variable>
+
#include <easylogging++.h>
-#include "Block.hpp"
-#include "../utility/Vector.hpp"
-#include "../utility/utility.h"
+
+#include <world/Block.hpp>
+#include <Vector.hpp>
+#include <Utility.hpp>
const int SECTION_WIDTH = 16;
const int SECTION_LENGTH = 16;
@@ -24,11 +26,13 @@ class Section {
Section();
+ Vector worldPosition;
+
public:
void Parse();
- Section(byte *dataBlocks, size_t dataBlocksLength, byte *dataLight, byte *dataSky, byte bitsPerBlock,
- std::vector<unsigned short> palette);
+ Section(Vector position, byte *dataBlocks, size_t dataBlocksLength, byte *dataLight, byte *dataSky, byte bitsPerBlock,
+ std::vector<unsigned short> palette);
~Section();
@@ -36,8 +40,9 @@ public:
Section &operator=(Section other);
- friend void swap(Section &a, Section& b);
+ friend void swap(Section &a, Section &b);
Section(const Section &other);
+ Vector GetPosition();
}; \ No newline at end of file
diff --git a/src/world/World.hpp b/include/world/World.hpp
index e315baf..6e5eedb 100644
--- a/src/world/World.hpp
+++ b/include/world/World.hpp
@@ -1,16 +1,14 @@
#pragma once
#include <map>
-#include <thread>
-#include <mutex>
-#include <condition_variable>
-#include <queue>
#include <bitset>
+
#include <easylogging++.h>
-#include "Block.hpp"
-#include "Section.hpp"
-#include "../network/Packet.hpp"
-#include "Collision.hpp"
+
+#include <world/Block.hpp>
+#include <world/Section.hpp>
+#include <network/Packet.hpp>
+#include <world/Collision.hpp>
class World {
//utility vars
@@ -22,7 +20,7 @@ class World {
int dimension = 0;
//game methods
- Section ParseSection(StreamInput *data);
+ Section ParseSection(StreamInput *data, Vector position);
public:
World();