diff --git a/Bin/VC10/VC10.vcxproj b/Bin/VC10/VC10.vcxproj
index 4046f56..c0ff780 100644
--- a/Bin/VC10/VC10.vcxproj
+++ b/Bin/VC10/VC10.vcxproj
@@ -93,6 +93,7 @@
+
@@ -127,6 +128,7 @@
+
diff --git a/Bin/VC10/VC10.vcxproj.filters b/Bin/VC10/VC10.vcxproj.filters
index 39acd67..88db6ab 100644
--- a/Bin/VC10/VC10.vcxproj.filters
+++ b/Bin/VC10/VC10.vcxproj.filters
@@ -147,6 +147,9 @@
System
+
+ Level
+
@@ -230,5 +233,8 @@
Level
+
+ Level
+
\ No newline at end of file
diff --git a/Data/Img/AwesomeTileset.png b/Data/Img/AwesomeTileset.png
index f8d3761..41bbe3a 100644
Binary files a/Data/Img/AwesomeTileset.png and b/Data/Img/AwesomeTileset.png differ
diff --git a/LibDQt/LibDQt.pro b/LibDQt/LibDQt.pro
index f69212b..c57aeed 100644
--- a/LibDQt/LibDQt.pro
+++ b/LibDQt/LibDQt.pro
@@ -5,7 +5,9 @@ LIBS += -lGL \
-lSDL_image \
-lSDL_gfx \
-ltinyxml \
- -lGLU
+ -lGLU \
+ -lz \
+ -ltinyxml
HEADERS += ../src/Actor/Player.h \
../src/Global/Globals.h \
../src/IO/Input.h \
@@ -20,7 +22,28 @@ HEADERS += ../src/Actor/Player.h \
../src/System/ResourceManager.h \
../src/Texture/Texture.h \
../src/Global/Constants.h \
- ../src/Collision/AABB.h
+ ../src/Collision/AABB.h \
+ ../src/Level/Level.h \
+ ../src/Level/MapTile.h \
+ ../src/Level/Map.h \
+ ../src/Level/Layer.h \
+ ../src/Level/Tileset.h \
+ ../src/Level/Layer.h \
+ ../src/TMXParser/base64.h \
+ ../src/TMXParser/Tmx.h \
+ ../src/TMXParser/TmxImage.h \
+ ../src/TMXParser/TmxLayer.h \
+ ../src/TMXParser/TmxMap.h \
+ ../src/TMXParser/TmxMapTile.h \
+ ../src/TMXParser/TmxObject.h \
+ ../src/TMXParser/TmxObjectGroup.h \
+ ../src/TMXParser/TmxPoint.h \
+ ../src/TMXParser/TmxPolygon.h \
+ ../src/TMXParser/TmxPolyline.h \
+ ../src/TMXParser/TmxPropertySet.h \
+ ../src/TMXParser/TmxTile.h \
+ ../src/TMXParser/TmxTileset.h \
+ ../src/TMXParser/TmxUtil.h
SOURCES += ../src/Actor/Player.cpp \
../src/Global/Globals.cpp \
../src/IO/Input.cpp \
@@ -33,5 +56,23 @@ SOURCES += ../src/Actor/Player.cpp \
../src/Sprite/Sprite.cpp \
../src/System/Debug.cpp \
../src/Texture/Texture.cpp \
- ../src/Collision/AABB.cpp
+ ../src/Collision/AABB.cpp \
+ ../src/Level/Level.h \
+ ../src/Level/MapTile.h \
+ ../src/Level/Map.h \
+ ../src/Level/Layer.h \
+ ../src/Level/Tileset.h \
+ ../src/Level/Layer.h \
+ ../src/TMXParser/base64.cpp \
+ ../src/TMXParser/TmxImage.cpp \
+ ../src/TMXParser/TmxLayer.cpp \
+ ../src/TMXParser/TmxMap.cpp \
+ ../src/TMXParser/TmxObject.cpp \
+ ../src/TMXParser/TmxObjectGroup.cpp \
+ ../src/TMXParser/TmxPolygon.cpp \
+ ../src/TMXParser/TmxPolyline.cpp \
+ ../src/TMXParser/TmxPropertySet.cpp \
+ ../src/TMXParser/TmxTile.cpp \
+ ../src/TMXParser/TmxTileset.cpp \
+ ../src/TMXParser/TmxUtil.cpp
OTHER_FILES +=
diff --git a/src/Level/Layer.cpp b/src/Level/Layer.cpp
new file mode 100644
index 0000000..30eaa9d
--- /dev/null
+++ b/src/Level/Layer.cpp
@@ -0,0 +1,32 @@
+#include "Layer.h"
+#include "Tileset.h"
+
+Layer::Layer(int width, int height, int tileWidth, int tileHeight) {
+ _width = width;
+ _height = height;
+ _tileWidth = tileWidth;
+ _tileHeight = tileHeight;
+ _tileMap = new MapTile[width * height];
+}
+
+Layer::~Layer() {
+ delete[] _tileMap;
+}
+
+void Layer::Update(float dt) {
+ for(int x = 0; x < _width; x++) {
+ for(int y = 0; y < _height; y++) {
+ }
+ }
+}
+
+void Layer::Draw() {
+ for(int x = 0; x < _width; x++) {
+ for(int y = 0; y < _height; y++) {
+ MapTile& tile = GetTile(x, y);
+ tile.tileset->DrawTile(tile.id, Vec2((float)x * _tileWidth, (float)y * _tileHeight));
+ }
+ }
+}
+
+
diff --git a/src/Level/Layer.h b/src/Level/Layer.h
new file mode 100644
index 0000000..1b13508
--- /dev/null
+++ b/src/Level/Layer.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "MapTile.h"
+
+class Layer {
+public:
+ Layer(int width, int height, int tileWidth, int tileHeight);
+ ~Layer();
+
+ void Update(float dt);
+ void Draw();
+
+ int GetWidth() const { return _width; }
+ int GetHeight() const { return _height; }
+ int GetTileWidth() const { return _tileWidth; }
+ int GetTileHeight() const { return _tileHeight; }
+
+ MapTile& GetTile(int x, int y) { return _tileMap[y * _width + x]; }
+ void SetTile(int x, int y, const MapTile& tile) { _tileMap[y * _width + x] = tile; }
+
+private:
+ int _width;
+ int _height;
+ int _tileWidth;
+ int _tileHeight;
+ MapTile* _tileMap;
+};
\ No newline at end of file
diff --git a/src/Level/Level.cpp b/src/Level/Level.cpp
new file mode 100644
index 0000000..fc72fec
--- /dev/null
+++ b/src/Level/Level.cpp
@@ -0,0 +1,85 @@
+#include