diff --git a/Source/Contents/NavigationLink.cpp b/Source/Contents/NavigationLink.cpp index 103901d..0aefb48 100644 --- a/Source/Contents/NavigationLink.cpp +++ b/Source/Contents/NavigationLink.cpp @@ -78,3 +78,119 @@ CNaviInfo* CNavi_Link::GetLinkedInfo() const { void CNavi_Link::SetDepth(int depth) { this->depth = depth; } + +// OFFSET: 0x00B8D9A0 + +// OFFSET: 0x00B8D9E0 + +// OFFSET: 0x00B8DA20 + +// OFFSET: 0x00B8DA60 + +// OFFSET: 0x00B8DAA0 + +// OFFSET: 0x00B8DAE0 + +// OFFSET: 0x00B8DB40 + +// OFFSET: 0x00B8DB50 + +// OFFSET: 0x00B8DBB0 + +// OFFSET: 0x00B8DC00 + +// OFFSET: 0x00B8DC50 + +// OFFSET: 0x00B8DC90 + +// OFFSET: 0x00B8DCD0 +// FUNCTION: fn_19451 +void CNavi_Link::ClearLinkedLinks() { + this->linkedLinks.clear(); +} + +// OFFSET: 0x00B8DCE0 +// FUNCTION: fn_19452 +void CNavi_Link::ClearLinks() { + this->links.clear(); +} + +// OFFSET: 0x00B8DCF0 +// FUNCTION: fn_19453 +void CNavi_Object::ClearLinks() { + this->links.clear(); +} + +// OFFSET: 0x00B8DDE0 + +// OFFSET: 0x00B8DE20 + +// OFFSET: 0x00B8DE80 +// FUNCTION: fn_19457 +std::vector::iterator CNavi_Link::LinksEnd() { + return this->links.end(); +} + +// OFFSET: 0x00B8DE90 +// FUNCTION: fn_19458 +std::vector::iterator CNavi_Object::LinksEnd() { + return this->links.end(); +} + +// OFFSET: 0x00B8E870 +// FUNCTION: fn_19490 +const char* CNavi_Link::GetLinkedName() const { + return this->linkedInfo->name.c_str(); +} + +// OFFSET: 0x00B8E880 + +// OFFSET: 0x00B90470 +// FUNCTION: fn_19510 +void CNavi_Link::SetType(int type) { + if (type >= 200 && type <= 206) { + this->type = type; + } else { + this->type = 200; + } +} + +// OFFSET: 0x00B90490 +// FUNCTION: fn_19511 +void CNavi_Object::SetType(int type) { + this->type = 101; +} + +// OFFSET: 0x00B904A0 +// FUNCTION: fn_19512 +bool CNavi_Link::SetId(int id) { + if (this->id != -1) { + return false; + } + + this->id = id; + return true; +} + +// OFFSET: 0x00B904C0 +// FUNCTION: fn_19513 +bool CNavi_Object::SetId(int id) { + if (this->id != -1) { + return false; + } + + this->id = id; + return true; +} + +// OFFSET: 0x00B90520 +// FUNCTION: fn_19518 +int CNavi_Link::LinkCount() const { + return static_cast(this->links.size()); +} + +// OFFSET: 0x00B90530 +// FUNCTION: fn_19519 +int CNavi_Object::LinkCount() const { + return static_cast(this->links.size()); +} diff --git a/Source/Contents/NavigationManager.h b/Source/Contents/NavigationManager.h index c7515d5..ae7815f 100644 --- a/Source/Contents/NavigationManager.h +++ b/Source/Contents/NavigationManager.h @@ -87,6 +87,16 @@ public: virtual const char* GetTitle() const; virtual NaviCell* GetCell(NaviCell* out) const; virtual CNaviInfo* GetInfo() const; + virtual bool SetId(int id); + virtual void SetType(int type); + virtual std::vector::iterator LinksBegin(); + virtual std::vector::iterator LinksEnd(); + virtual int LinkCount() const; + virtual void AddLink(const NaviLink& link); + virtual void EraseLink(std::vector::iterator& it); + virtual void ClearLinks(); + virtual CNavi_Link* FindLinkAt(int x, int y); + virtual CNavi_Link* FindLinkTo(int x, int y); bool HasId(const unsigned int& id) const; bool IsNamed(const char* name) const; @@ -102,9 +112,13 @@ public: /* 008C */ std::vector linkedLinks; CNaviInfo* GetLinkedInfo() const; + const char* GetLinkedName() const; + NaviCell GetLinkedCell() const; void SetDepth(int depth); std::vector::iterator LinkedBegin(); std::vector::iterator LinkedEnd(); + void AddLinkedLink(const NaviLink& link); + void ClearLinkedLinks(); ~CNavi_Link() override; int GetId() const override; @@ -114,6 +128,16 @@ public: const char* GetTitle() const override; NaviCell* GetCell(NaviCell* out) const override; CNaviInfo* GetInfo() const override; + bool SetId(int id) override; + void SetType(int type) override; + std::vector::iterator LinksBegin() override; + std::vector::iterator LinksEnd() override; + int LinkCount() const override; + void AddLink(const NaviLink& link) override; + void EraseLink(std::vector::iterator& it) override; + void ClearLinks() override; + CNavi_Link* FindLinkAt(int x, int y) override; + CNavi_Link* FindLinkTo(int x, int y) override; }; #pragma pack(push, 1) @@ -132,6 +156,9 @@ public: ~CNaviInfo(); bool HasName(const char* name) const; + bool AddNpc(CNavi_Object* npc); + bool AddMob(CNavi_Object* mob); + bool AddLink(CNavi_Link* link); const char* GetName() const; const char* GetTitle() const; bool IsVisited() const;