aboutsummaryrefslogtreecommitdiff
path: root/src/map.hh
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-05-24 20:57:24 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-05-24 20:57:24 -0300
commit3f557369c7bbd08fdf2e6dbd9271873b20a9a144 (patch)
tree28bb9b4ad9c0324036d753eea772855a180c37f3 /src/map.hh
parentb7432b4e74284138f1740f4577b9cb32e1f120d0 (diff)
downloadgame-3f557369c7bbd08fdf2e6dbd9271873b20a9a144.tar.gz
game-3f557369c7bbd08fdf2e6dbd9271873b20a9a144.zip
halfway of `map.cc` and start of `objects.cc`
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_