From 981e2c13fbf979ef0a98883d678c41e2e0d3700b Mon Sep 17 00:00:00 2001 From: Ben Kyd Date: Sun, 30 Aug 2020 15:28:14 +0000 Subject: [PATCH] Things! --- The Great Machine/Camera.hpp | 6 ++++++ The Great Machine/Dungeon.hpp | 3 +++ The Great Machine/Things.cpp | 9 +++++++++ The Great Machine/Things.hpp | 34 ++++++++++++++++++++++------------ 4 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 The Great Machine/Camera.hpp diff --git a/The Great Machine/Camera.hpp b/The Great Machine/Camera.hpp new file mode 100644 index 0000000..9679798 --- /dev/null +++ b/The Great Machine/Camera.hpp @@ -0,0 +1,6 @@ +#ifndef GREATMACHINE_CAMERA_H_ +#define GREATMACHINE_CAMERA_H_ + + + +#endif diff --git a/The Great Machine/Dungeon.hpp b/The Great Machine/Dungeon.hpp index e912bb4..14ad5af 100644 --- a/The Great Machine/Dungeon.hpp +++ b/The Great Machine/Dungeon.hpp @@ -5,6 +5,9 @@ class Dungeon { public: + + + }; #endif diff --git a/The Great Machine/Things.cpp b/The Great Machine/Things.cpp index 626a623..58a2a9d 100644 --- a/The Great Machine/Things.cpp +++ b/The Great Machine/Things.cpp @@ -1,2 +1,11 @@ #include "Things.hpp" +void Tile::Update(float fTime) +{ + +} + +void Tile::Draw(olc::PixelGameEngine* engine, ) +{ + engine->DrawPartialSprite() +} diff --git a/The Great Machine/Things.hpp b/The Great Machine/Things.hpp index 66d5775..55139ef 100644 --- a/The Great Machine/Things.hpp +++ b/The Great Machine/Things.hpp @@ -32,18 +32,21 @@ namespace EEntity Boss }; - enum Item + namespace EItem { - None, - Sword - }; + enum Item + { + None, + Sword + }; - // Fixed items can have states #door open / closed - enum FixedItem - { - Torch, - Door - }; + // Fixed items can have states #door open / closed + enum FixedItem + { + Torch, + Door + }; + } } class Entity @@ -56,20 +59,27 @@ public: class Item : public Entity { public: - EEntity::Item Item; + EEntity::EItem::Item Item; }; class FixedItem : public Entity { - EEntity::FixedItem Item; + EEntity::EItem::FixedItem Item; }; + class Tile { public: olc::vd2d Coords; ETile::Type Type; ETile::State State; + + olc::vd2d SpriteTextureMask; + olc::Sprite* SpriteMap; + + virtual void Update(float fTime); + void Draw(olc::PixelGameEngine* engine); }; #endif