aboutsummaryrefslogtreecommitdiff
path: root/src/map.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.hh')
-rw-r--r--src/map.hh75
1 files changed, 63 insertions, 12 deletions
diff --git a/src/map.hh b/src/map.hh
index 298d190..590fb41 100644
--- a/src/map.hh
+++ b/src/map.hh
@@ -2,25 +2,76 @@
#define TIBIA_MAP_HH_ 1
#include "common.hh"
-
-// TODO(fusion): I'm not sure whether to put these.
+#include "objects.hh"
struct Object {
+ // REGULAR FUNCTIONS
+ // =========================================================================
+ Object(void) { this->ObjectID = 0; }
+ Object(uint32 ObjectID) { this->ObjectID = ObjectID; }
+ bool exists(void);
+
+ ObjectType getObjectType(void);
+ void setObjectType(ObjectType Type);
+
+ Object getNextObject(void);
+ void setNextObject(Object NextObject);
+
+ Object getContainer(void);
+ void setContainer(Object Con);
+
+ uint32 getCreatureID(void);
+ //void setCreatureID(uint32 CreatureID); //??
+
+ uint32 getAttribute(INSTANCEATTRIBUTE Attribute);
+ void setAttribute(INSTANCEATTRIBUTE Attribute, uint32 Value);
+
+ // DATA
+ // =========================================================================
uint32 ObjectID;
};
-constexpr Object NONE = {};
+constexpr Object NONE;
-struct ObjectType {
- int TypeID;
+struct TObject {
+ uint32 ObjectID;
+ Object NextObject;
+ Object Container;
+ ObjectType Type;
+ uint32 Attributes[4];
};
-struct TObjectType {
- char *Name;
- char *Description;
- uint8 Flags[9];
- uint32 Attributes[62];
- int AttributeOffsets[18];
+struct TObjectBlock {
+ TObject Object[32768];
};
-#endif //TIBIA_MAP_HH_ \ No newline at end of file
+struct TSector {
+ Object MapCon[32][32];
+ uint32 TimeStamp;
+ uint8 Status;
+ uint8 MapFlags;
+};
+
+struct TDepotInfo {
+ char Town[20];
+ int Size;
+};
+
+struct TMark {
+ char Name[20];
+ int x;
+ int y;
+ int z;
+};
+
+struct TCronEntry {
+ Object Obj;
+ uint32 RoundNr;
+ int Previous;
+ int Next;
+};
+
+void InitMap(void);
+void ExitMap(bool Save);
+
+#endif //TIBIA_MAP_HH_