rodecomp/Source/Contents/NavigationManager.h
ragnarok-clanker dc3d5ce1a5 Maintenance: Resubmission of 14942 (gate: three existing in-class helpers whose lines changed lacked an annotation; marked // INLINED
Batch #14943 by ragnarok-clanker: no function's compiled code changes; checked with 741 compiled unit(s), including every includer of Source/ActorPickNode.h, Source/Client/Browser/BrowserClientSite.h, Source/Client/Browser/BrowserPopupDispatch.h, Source/Client/Mode/CGameMode.h, Source/Client/Mode/CLoginMode.h, Source/Client/Mode/CMode.h, Source/Client/Mode/ModeDragState.h, Source/Client/Replay.h, Source/Client/Session.h, Source/Client/Stove/StoveMgr.h, Source/Contents/AchievementMgr.h, Source/Contents/ActorNameCard.h, Source/Contents/Actors/CharacterRender.h, Source/Contents/Actors/EffectActors.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/GrannyGameActor.h, Source/Contents/Actors/GroundScope.h, Source/Contents/Actors/Item.h, Source/Contents/Actors/Npc.h, Source/Contents/Actors/Pc.h, Source/Contents/Actors/RenderObjectState.h, Source/Contents/Actors/Skill.h, Source/Contents/AdventureGuideMgr.h, Source/Contents/Camera/Camera.h, Source/Contents/Camera/CameraState.h, Source/Contents/CashEmotionMgr.h, Source/Contents/Configuration/GameSettingsMgr.h, Source/Contents/EffectResourceSwitcher.h, Source/Contents/Effects/AMachineEffect.h, Source/Contents/Effects/AcidifiedThrow.h, Source/Contents/Effects/AxeBoomerang.h, Source/Contents/Effects/BlastForge.h, Source/Contents/Effects/CaneOfEvilEyeEffect.h, Source/Contents/Effects/CharacterParticleBundle.h, Source/Contents/Effects/CloudKillEffect.h, Source/Contents/Effects/Effect.h, Source/Contents/Effects/EffectActor.h, Source/Contents/Effects/EffectEmitter.h, Source/Contents/Effects/EffectMaker.h, Source/Contents/Effects/EffectPrimitiveState.h, Source/Contents/Effects/FuumaShouakuEffect.h, Source/Contents/Effects/GravityControlEffect.h, Source/Contents/Effects/HealSpEffect.h, Source/Contents/Effects/Level99Effect.h, Source/Contents/Effects/MapChainEffect.h, Source/Contents/Effects/MonsterSkillEffects.h, Source/Contents/Effects/MsgEffect.h, Source/Contents/Effects/NyanggrassEffect.h, Source/Contents/Effects/Particle.h, Source/Contents/Effects/PowderingEffect.h, Source/Contents/Effects/RagEffectState.h, Source/Contents/Effects/RectUpEffect.h, Source/Contents/Effects/ShadowExceedEffect.h, Source/Contents/Effects/SkillEffects.h, Source/Contents/Effects/SpriteParticle.h, Source/Contents/Effects/StormCannonEffect.h, Source/Contents/Effects/ThrowEffects.h, Source/Contents/EntryQueueMgr.h, Source/Contents/EquipmentResourceMgr.h, Source/Contents/FlyingShipRouteInfo.h, Source/Contents/Ground/GroundGeometry.h, Source/Contents/GuildInfo.h, Source/Contents/Items/ItemDescription.h, Source/Contents/Items/ItemInfo.h, Source/Contents/MapSkyMgr.h, Source/Contents/Messenger/MessengerWindows.h, Source/Contents/Models/ModelNode.h, Source/Contents/NavigationManager.h, Source/Contents/Party/AdventurerAgencyMgr.h, Source/Contents/RDamageVar.h, Source/Contents/RenewQuestMgr.h, Source/Contents/ReputeMgr.h, Source/Contents/RodexMailStore.h, Source/Contents/RouletteMgr.h, Source/Contents/Schedule/Schedule.h, Source/Contents/SignBoard/SignBoard.h, Source/Contents/Skills/ClientSkills.h, Source/Contents/Skills/PlayerSkillBundle.h, Source/Contents/Skills/SkillInfo.h, Source/Contents/SpriteLayerDrawing.h, Source/Contents/TipBoxTitles.h, Source/Contents/UserData/AccountLinkedUserDataMgr.h, Source/Contents/UserData/NormalItemSlots.h, Source/Contents/World/World.h, Source/Contents/WorldView/WorldViewData.h, Source/Render/Primitives/LightmappedPrimitive.h, Source/Render/Primitives/RenderPrimitive.h, Source/Render/Renderer.h, Source/Render/Textures/SpritePixels.h, Source/Render/Textures/Texture.h, Source/Resource/EZeffectResource.h, Source/Resource/Models/AnimatedModelResource.h, Source/Resource/Models/GrannyModelResource.h, Source/Resource/Sprites/ActionResource.h, Source/Resource/World/GroundResource.h, Source/Resource/World/WorldResource.h, Source/Resource/XmlNode.h, Source/UI/AdventureGuide/UIAdventureGuide.h, Source/UI/Buttons/UIBmpRadioBtn.h, Source/UI/Buttons/UIDescriptRace.h, Source/UI/Buttons/UIItemTagButton.h, Source/UI/Buttons/UISlotBmpButton.h, Source/UI/Buttons/UISpriteButton.h, Source/UI/Buttons/UITVTextButton.h, Source/UI/Buttons/UITextureButton.h, Source/UI/CashEmotion/UICashEmotionListWnd.h, Source/UI/CashEmotion/UICashEmotionPack.h, Source/UI/CashShop/UICashShopWnd.h, Source/UI/Chat/UIChatRoomMakeWnd.h, Source/UI/Chat/UIChatRoomTitle.h, Source/UI/Chat/UINewChatWnd.h, Source/UI/Chat/UISubChatHisWnd.h, Source/UI/Chat/UISubChatMiniWnd.h, Source/UI/Chat/UIWhisperWnd.h, Source/UI/Clan/UIClanWnd.h, Source/UI/Dialogs/UIBookWnd.h, Source/UI/Dialogs/UIChooseWarpWnd.h, Source/UI/Dialogs/UIMenuWnd.h, Source/UI/Dialogs/UIMiniMapWnd.h, Source/UI/Dialogs/UIMinimapZoomWnd.h, Source/UI/Dialogs/UINpcEditDialogWnd.h, Source/UI/Dialogs/UIPasswordWnd.h, Source/UI/Dialogs/UISayDialogWnd.h, Source/UI/Dialogs/UISelectCartWnd.h, Source/UI/Dialogs/UITipboxWnd.h, Source/UI/Edit/UIEditBoxEx.h, Source/UI/Edit/UIEditCtrl.h, Source/UI/Edit/UIEditCtrl_Currency.h, Source/UI/Edit/UIItemTagCtrl.h, Source/UI/Enchant/EnchantUI.h, Source/UI/Exchange/UIExchangeUI.h, Source/UI/FrameSkin.h, Source/UI/GameSettings/GameSettingsUI.h, Source/UI/Gauges/UIPcGage.h, Source/UI/Guild/UIGuildHelperWnd.h, Source/UI/Guild/UIGuildWnd.h, Source/UI/Guild/UIGuild_Storage_Log.h, Source/UI/Item/UIEquipmentPropertiesWnd.h, Source/UI/Item/UIItemBaseWnd.h, Source/UI/Item/UIItemPurchaseWnd.h, Source/UI/Item/UIItemSellWnd2.h, Source/UI/Item/UIItemShopWnd.h, Source/UI/Item/UIItemShopWnd2.h, Source/UI/Item/UIItemStoreFindWnd.h, Source/UI/Item/UIItemStoreSubWnd.h, Source/UI/Item/UIItemStoreWnd.h, Source/UI/Item/UIItemWnd.h, Source/UI/Item/UIMerchantItemLogWnd.h, Source/UI/Item/UIParaItemShopWnd.h, Source/UI/Items/UICardItemIllustWnd.h, Source/UI/Items/UIEquipWnd.h, Source/UI/Items/UIExchangeWnd.h, Source/UI/Items/UIGameItem.h, Source/UI/Items/UIItemCollectionWnd.h, Source/UI/Items/UIItemIdentifyWnd.h, Source/UI/Items/UIItemParamChangeDisplayWnd.h, Source/UI/Items/UISwapEquipmentWnd.h, Source/UI/Layout/WindowGeometry.h, Source/UI/Lists/UIChatHisBox.h, Source/UI/Lists/UIComboBoxV2Wnd.h, Source/UI/Lists/UIImgMenu.h, Source/UI/Lists/UIListBoxID.h, Source/UI/Lists/UIListBoxTemplate.h, Source/UI/Lists/UIMemberListBox.h, Source/UI/Lists/UITabControl.h, Source/UI/Lists/UITagListBox.h, Source/UI/Lists/UITreeView.h, Source/UI/Menu/UIMenuIconWnd.h, Source/UI/Navigation/UINavigationV4Wnd.h, Source/UI/ProbabilityTable/UIProbabilityTable.h, Source/UI/Quest/UIQuestDisplay.h, Source/UI/Quest/UIRenewQuestUI.h, Source/UI/Quest/UIRenewQuestWnd.h, Source/UI/Rodex/UIRodexComposeWnd.h, Source/UI/Rodex/UIRodexInboxWnd.h, Source/UI/RuneSystem/UIRuneSystemWindows.h, Source/UI/RuneSystem/UIRuneSystemWnd.h, Source/UI/Shop/UIMerchantItemMyShopWnd.h, Source/UI/Shop/UIMerchantItemPurchaseMSGWnd.h, Source/UI/Shop/UIMerchantItemPurchaseWnd.h, Source/UI/Shop/UIMerchantItemShopWnd.h, Source/UI/Shop/UIMerchantMirrorItemWnd.h, Source/UI/Shop/UIMerchantShopMakeWnd.h, Source/UI/Shop/UIMerchantShopTitle.h, Source/UI/Skill/UISkillDescribeWnd.h, Source/UI/Skill/UISkillListWnd.h, Source/UI/SkillDelayInfo/SkillDelayInfo.h, Source/UI/StylingShop/UIStylingShopWnd.h, Source/UI/Text/CreateLineInfo.h, Source/UI/Text/UIAchWnd.h, Source/UI/Text/UIBalloonText.h, Source/UI/Text/UINameBalloonText.h, Source/UI/Text/UIStaticTextControl.h, Source/UI/Text/UIString.h, Source/UI/Text/UITextViewerControl.h, Source/UI/UIBarGraph.h, Source/UI/UIBartermarketWnd.h, Source/UI/UIChangeMaterialWnd.h, Source/UI/UIGradeEnchantWnd.h, Source/UI/UILapineScrollBar.h, Source/UI/UIMacroBlackListCheckWnd.h, Source/UI/UIMacroDetectorWnd.h, Source/UI/UIMacroReport.h, Source/UI/UIMacroUserInfoWnd.h, Source/UI/UIPreviewEquipWnd.h, Source/UI/UIRefiningWnd.h, Source/UI/UIScrollWnd.h, Source/UI/UISlotBitmap.h, Source/UI/Window/FuncDrawWNDChar.h, Source/UI/Window/UIBattleMsgOptionWnd.h, Source/UI/Window/UIChatRoomWnd.h, Source/UI/Window/UICollectionSystemWnd.h, Source/UI/Window/UIControl.h, Source/UI/Window/UIHomunInfoWnd.h, Source/UI/Window/UIHotKeyWnd.h, Source/UI/Window/UIJobListWnd.h, Source/UI/Window/UILoginOTPWnd.h, Source/UI/Window/UILoginWnd.h, Source/UI/Window/UIMakeCharWnd.h, Source/UI/Window/UIMonsterDisplayWnd.h, Source/UI/Window/UIMonsterInfoWnd.h, Source/UI/Window/UINavigationHelpWnd.h, Source/UI/Window/UINavigationWnd.h, Source/UI/Window/UINewMakeCharWnd.h, Source/UI/Window/UINewSelectCharWnd.h, Source/UI/Window/UINoticeWnd.h, Source/UI/Window/UIPetInfoWnd.h, Source/UI/Window/UIRegisterMgr.h, Source/UI/Window/UIRoMapWnd.h, Source/UI/Window/UIRodexContentsWnd.h, Source/UI/Window/UISecondCostumeWnd.h, Source/UI/Window/UISeekPartyMBWnd.h, Source/UI/Window/UISeekPartyWnd.h, Source/UI/Window/UISelCharForUServerWnd.h, Source/UI/Window/UISerachStoreInfoWnd.h, Source/UI/Window/UITransMenuWnd.h, Source/UI/Window/UIWindow.h, Source/UI/Window/UIWindowMgr.h, Source/UI/Window/UIWindowMgr.inl, Source/Utility/Lexicon/LexiconSerializer.h.
2026-11-08 16:44:36 +00:00

496 lines
18 KiB
C++

#ifndef RAGNAROK_SOURCE_CONTENTS_NAVIGATIONMANAGER_H
#define RAGNAROK_SOURCE_CONTENTS_NAVIGATIONMANAGER_H
#include "Contents/MovementRouteInterpolation.h"
#include "Contents/TerrainPathSearch.h"
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>
class UIWindowMgr;
class CActRes;
class CNaviInfo;
class CNavi_Link;
class CNavi_Object;
class CSprRes;
class CTexture;
class GroundGeometry;
class LuaScript;
struct NavigationTarget;
struct NaviCell {
/* 0000 */ int x;
/* 0004 */ int y;
int GetY() const;
};
struct NaviLink {
/* 0000 */ CNavi_Link* link;
/* 0004 */ int cost;
};
struct NaviDataEntry {
NaviDataEntry();
// INLINED
NaviDataEntry(int previous, CNavi_Link* link, int cost) : previous(previous), link(link), cost(cost) {}
void Reset();
void Init();
int GetPrevious() const;
int GetCost() const;
/* 0000 */ int previous;
/* 0004 */ CNavi_Link* link;
/* 0008 */ int cost;
};
struct NaviRouteLine {
NaviRouteLine(int kind, int x, int y, const char* text, int color, int shadowColor);
// OFFSET: 0x00B92F10
// FUNCTION: fn_19558
~NaviRouteLine() {
this->text.clear();
}
/* 0000 */ int kind;
/* 0004 */ int x;
/* 0008 */ int y;
/* 000C */ std::string text;
/* 0024 */ int color;
/* 0028 */ int shadowColor;
};
// VTABLE: vt_01777
class CNavi_Object {
public:
/* 0004 */ int id;
/* 0008 */ int type;
union {
/* 000C */ int index;
struct {
/* 000C */ std::uint16_t shortIndex;
/* 000E */ std::uint16_t flag;
};
};
/* 0010 */ std::string name;
/* 0028 */ std::string title;
/* 0040 */ CNaviInfo* info;
/* 0044 */ int cellX;
/* 0048 */ int cellY;
/* 004C */ std::vector<NaviLink> links;
/* 0058 */ int job;
/* 005C */ int sex;
/* 0060 */ int bodyPalette;
/* 0064 */ int head;
/* 0068 */ int headPalette;
/* 006C */ int accessory0;
/* 0070 */ int accessory1;
/* 0074 */ int accessory2;
/* 0078 */ int robe;
__declspec(noinline) CNavi_Object();
CNavi_Object(int type, int index, const char* name, const char* title, int cellX, int cellY, CNaviInfo* info);
virtual ~CNavi_Object();
virtual int GetId() const;
virtual int GetType() const;
virtual int GetIndex() const;
virtual std::uint16_t GetFlag() const;
virtual const char* GetName() const;
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<NaviLink>::iterator LinksBegin();
virtual std::vector<NaviLink>::iterator LinksEnd();
virtual int LinkCount() const;
virtual void AddLink(const NaviLink& link);
virtual void EraseLink(std::vector<NaviLink>::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;
std::vector<NaviLink> CopyLinks() const;
};
// VTABLE: vt_01778
class CNavi_Link : public CNavi_Object {
public:
/* 007C */ CNaviInfo* linkedInfo;
/* 0080 */ int linkedCellX;
/* 0084 */ int linkedCellY;
/* 0088 */ int depth;
/* 008C */ std::vector<NaviLink> linkedLinks;
CNaviInfo* GetLinkedInfo() const;
const char* GetLinkedName() const;
NaviCell GetLinkedCell() const;
void SetDepth(int depth);
std::vector<NaviLink>::iterator LinkedBegin();
std::vector<NaviLink>::iterator LinkedEnd();
void AddLinkedLink(const NaviLink& link);
void ClearLinkedLinks();
int LinkedLinkCount() const;
CNavi_Link();
CNavi_Link(int type, int index, const char* name, const char* title, int cellX, int cellY, CNaviInfo* info, CNaviInfo* linkedInfo, int unknown80, int unknown84);
~CNavi_Link() override;
int GetId() const override;
int GetType() const override;
int GetIndex() const override;
const char* GetName() const override;
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<NaviLink>::iterator LinksBegin() override;
std::vector<NaviLink>::iterator LinksEnd() override;
int LinkCount() const override;
void AddLink(const NaviLink& link) override;
void EraseLink(std::vector<NaviLink>::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)
struct NaviObjectRecord {
/* 0000 */ int type;
/* 0004 */ int index;
/* 0008 */ int cellX;
/* 000C */ int cellY;
/* 0010 */ std::int16_t nameLength;
/* 0012 */ char name[1];
};
#pragma pack(pop)
CNavi_Object* FindNaviObjectByName(const char* name, const std::vector<CNavi_Object*>& objects);
class CNaviInfo {
public:
__declspec(noinline) CNaviInfo(int index, const char* name, const char* title, int cellX, int cellY, int type);
~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;
std::size_t GetNameLength() const;
const char* GetTitle() const;
bool IsVisited() const;
void SetVisited(bool visited);
std::vector<CNavi_Link*>::iterator LinksBegin();
std::vector<CNavi_Link*>::iterator LinksEnd();
int GetCellY() const;
int GetIndex() const;
int GetCellX() const;
CNavi_Link* FindLink(unsigned int key, bool byId);
CNavi_Object* FindNpc(unsigned int key, bool byId);
CNavi_Object* FindNpcAt(int cellX, int cellY);
CNavi_Object* FindMobByName(const char* name);
std::vector<CNavi_Object*>* Npcs();
int LinkCount() const;
int MobCount() const;
int NpcCount() const;
CNavi_Link* FindMatchingLink(CNavi_Link link);
int GetType() const;
std::vector<CNavi_Link*>* Links();
CNavi_Object* FindMob(unsigned int key, bool byId);
std::vector<CNavi_Object*>* Mobs();
CNavi_Object* FindMobByIndex(int index);
bool IsSearchable(const char* name) const;
void CollectTargets(int type, std::vector<NavigationTarget>& out);
void CollectMobsInRange(int minimum, int maximum, std::vector<NavigationTarget>& out);
void CollectMobsByTitle(std::string title, std::vector<NavigationTarget>& out);
void Search(int type, const std::vector<std::string>& keywords, std::vector<NavigationTarget>& out);
void SearchMap(const std::vector<std::string>& keywords, std::vector<NavigationTarget>& out);
void SearchMobs(const std::vector<std::string>& keywords, std::vector<NavigationTarget>& out);
void SearchNpcs(const std::vector<std::string>& keywords, std::vector<NavigationTarget>& out);
/* 0000 */ int index;
/* 0004 */ int type;
/* 0008 */ std::string name;
/* 0020 */ std::string title;
/* 0038 */ int cellX;
/* 003C */ int cellY;
/* 0040 */ bool visited;
/* 0044 */ std::vector<CNavi_Object*> npcs;
/* 0050 */ std::vector<CNavi_Object*> mobs;
/* 005C */ std::vector<CNavi_Link*> links;
};
struct NavigationTarget {
NavigationTarget() : type(-1), object(nullptr), x(-1), y(-1) {}
NavigationTarget(int type, void* object);
// INLINED
NavigationTarget(int type, void* object, int x, int y, std::string name) {
this->type = type;
this->object = object;
this->x = x;
this->y = y;
this->name = name;
}
~NavigationTarget();
bool operator>(const NavigationTarget& other) const;
/* 0000 */ int type;
/* 0004 */ void* object;
/* 0008 */ int x = 0;
/* 000C */ int y = 0;
/* 0010 */ std::string name;
};
class CNaviData {
public:
__declspec(noinline) CNaviData();
~CNaviData();
bool SetDestination(CNaviInfo* info, int cellX, int cellY);
CNaviInfo* GetInfo();
NaviCell* GetCell(NaviCell* out);
void Clear();
void ClearAll();
__declspec(noinline) bool AddDestination(CNaviInfo* info);
bool AddObject(CNavi_Link* link);
CNavi_Link* FindLink(unsigned int key, bool byId);
int FindRoute(std::vector<CNavi_Link*>* route, bool direct, bool allowGates, bool includeObjects, bool allowWarps, int side);
__declspec(noinline) void ResetLinkDepths();
__declspec(noinline) bool CollectLinksTo(CNaviInfo* target, std::vector<CNavi_Link*>* out);
bool Search(std::string query, int type, std::vector<NavigationTarget>& out);
int ParseSearchKind(std::vector<std::string>& tokens);
CNavi_Object* FindMobByTitle(std::string title);
int ObjectCount() const;
/* 0000 */ std::vector<CNaviInfo*> destinations;
/* 000C */ std::vector<CNavi_Link*> objects;
/* 0018 */ CNaviInfo* info;
/* 001C */ int cellX;
/* 0020 */ int cellY;
/* 0024 */ int range;
/* 0028 */ std::vector<NaviDataEntry> entries;
/* 0034 */ std::vector<NaviLink> startLinks;
/* 0040 */ std::vector<NaviLink> endLinks;
};
class CNavigationManager {
public:
CNavigationManager();
~CNavigationManager();
NavigationTarget GetCurrentTarget() const;
std::string GetCurrentTargetName() const;
NavigationTarget GetSavedTarget() const;
CNaviInfo* GetDestinationInfo();
NaviCell* GetDestinationCell(NaviCell* out);
void ClearData();
bool IsCurrentTarget(const char* name) const;
int GetCurrentTargetType() const;
int SaveCurrentTarget();
CNaviInfo* FindObject(const char* name) const;
std::string SelectedNodeText();
std::string SubDestinationText();
std::string DestinationText();
std::string DestinationTitle();
float FitToSquare(int* offsetX, int* offsetY, int width, int height, float size) const;
void LoadSettings();
void SaveSettings();
int StateCount() const;
int NodeCount() const;
void SetViewIcon(int icon);
bool SetViewMode(int mode);
bool SearchNavigation(std::string name, int type, bool flag);
bool StartNavigation(std::string name, int type, unsigned char mode, bool flag, int x, int y, int id);
void BuildGridLabels();
bool LoadScript(LuaScript* script);
bool BuildRoute(int startX, int startY, int destX, int destY, bool collectCells);
void RequestPrivateAirship(std::string mapName, int itemId);
bool SavedTargetText(char* out, int size);
int RequestRoute(int cellX, int cellY);
NaviCell* MapCellToView(NaviCell* out, const char* mapName, int cellX, int cellY, float size);
std::string RouteText();
__declspec(noinline) void ShowRouteResult(int result, int mode);
__declspec(noinline) void Reset(bool clearAll);
__declspec(noinline) void ClearRouteNodes();
void ClearNodePaths();
void BuildNodePaths();
void BuildSingleNodePaths();
CNaviInfo* GetLinkedPlayerInfo();
bool CollectStartLinks();
__declspec(noinline) bool UpdateGround();
bool PlayerCell(int* column, int* row);
bool LoadStates(std::vector<char> packet);
bool AddState(const std::vector<std::string>& tokens);
bool ParseFlags(const char* text, bool* first, bool* second, bool* third);
NaviCell ParseCell(const char* text);
std::vector<char> WriteTarget(NavigationTarget target);
std::vector<char> WriteObject(CNavi_Object* object);
std::vector<unsigned char> WriteReplayState();
std::vector<unsigned char> WriteStates();
CNavi_Link* ReadObject(const char* record);
NavigationTarget ReadTarget(const char* data, int size);
__declspec(noinline) CNavi_Object* ReadTargetObject(const char* record);
bool GetMobInfo(
std::string title, std::string* name, std::string* sprite, int* cellX, int* cellYByte1, int* element, int* elementLevel, int* cellYByte0, int* type
);
void ClearSavedTarget();
void ClearCurrentObject();
void ClearStates();
void ClearNodes();
void RefreshSearch();
bool UpdateSearchResults();
int FindNodePath(unsigned int index);
void SelectNodePath(std::string name);
int GetRouteResult() const;
NavigationTarget GetState(int index) const;
std::string StateMapName(int index, int* distance);
bool GetRouteFlag() const;
int GetSelectedNode() const;
CNavi_Link* GetNode(int index) const;
void ResetCurrentTarget();
int AddWrappedRouteLines(int kind, int x, int y, const char* text);
bool SelectState(int index);
bool SelectNodeState();
bool SetDestinationMap(std::string mapName, int x, int y);
bool LoadTargetPreview();
bool BuildTargetRouteLines();
bool RouteToSavedTarget(int cellX, int cellY);
bool SelectTarget(int nodeIndex);
void CancelRoute();
void DrawRoute(const float* matrix);
void CheckArrival(int cellX, int cellY);
int RouteFromPlayer();
int Navigate(int cellX, int cellY);
int LoadReplayState(const std::vector<unsigned char>& data);
void ResumeRoute();
/* 0000 */ CNaviData data;
/* 004C */ CPathFinder pathFinder;
/* 10F0 */ std::vector<NavigationTarget> states;
/* 10FC */ NavigationTarget currentTarget;
/* 1124 */ NavigationTarget savedTarget;
/* 114C */ int routeResult;
/* 1150 */ std::vector<CNavi_Link*> nodes;
/* 115C */ bool routeFlag;
/* 1160 */ int selectedNode;
/* 1164 */ MovementRouteInterpolation movementRoute;
/* 117C */ bool drawRoute;
/* 1180 */ std::string labels[8];
/* 1240 */ GroundGeometry* ground;
/* 1244 */ CNaviInfo* playerMapInfo;
/* 1248 */ bool hideWindow;
/* 124C */ int savedCellX;
/* 1250 */ int savedCellY;
/* 1254 */ bool expandedMap;
/* 1258 */ int viewMode;
/* 125C */ int displayMode;
/* 1260 */ int searchType;
/* 1264 */ std::string searchText;
/* 127C */ bool allowGates;
/* 127D */ bool includeObjects;
/* 127E */ bool allowWarps;
/* 1280 */ int routeSide;
/* 1284 */ int previewType;
/* 1288 */ CTexture* previewTexture;
/* 128C */ int previewX;
/* 1290 */ int previewY;
/* 1294 */ std::vector<NaviCell> cells;
/* 12A0 */ CActRes* previewAction;
/* 12A4 */ CSprRes* previewSprite;
/* 12A8 */ std::vector<NaviRouteLine> routeLines;
/* 12B4 */ bool drawDestination;
/* 12B8 */ std::vector<std::vector<int>> nodePaths;
/* 12C4 */ int selectedPath;
/* 12C8 */ int selectedPathNode;
/* 12CC */ std::string destinationTitle;
/* 12E4 */ std::string destinationText;
/* 12FC */ std::string routeText;
/* 1314 */ std::string selectedNodeText;
/* 132C */ std::string subDestinationText;
/* 1344 */ int viewIcon;
};
extern CNavigationManager g_navigationManager;
#if defined(_WIN32) && !defined(_WIN64)
static_assert(sizeof(CNavi_Link) == 0x98);
static_assert(offsetof(CNavi_Link, linkedInfo) == 0x7C);
static_assert(offsetof(CNavi_Link, depth) == 0x88);
static_assert(offsetof(CNaviInfo, visited) == 0x40);
static_assert(offsetof(NaviDataEntry, cost) == 0x08);
static_assert(offsetof(CNavi_Link, linkedLinks) == 0x8C);
static_assert(sizeof(NaviCell) == 0x08);
static_assert(offsetof(NaviObjectRecord, name) == 0x12);
static_assert(sizeof(NaviDataEntry) == 0x0C);
static_assert(sizeof(NaviRouteLine) == 0x2C);
static_assert(offsetof(NaviRouteLine, text) == 0x0C);
static_assert(sizeof(NavigationTarget) == 0x28);
static_assert(offsetof(NavigationTarget, object) == 0x04);
static_assert(offsetof(NavigationTarget, name) == 0x10);
static_assert(sizeof(CNavi_Object) == 0x7C);
static_assert(offsetof(CNavi_Object, id) == 0x04);
static_assert(offsetof(CNavi_Object, name) == 0x10);
static_assert(offsetof(CNavi_Object, title) == 0x28);
static_assert(offsetof(CNavi_Object, info) == 0x40);
static_assert(offsetof(CNavi_Object, cellX) == 0x44);
static_assert(offsetof(CNavi_Object, links) == 0x4C);
static_assert(sizeof(CNaviInfo) == 0x68);
static_assert(offsetof(CNaviInfo, name) == 0x08);
static_assert(offsetof(CNaviInfo, title) == 0x20);
static_assert(offsetof(CNaviInfo, cellX) == 0x38);
static_assert(offsetof(CNaviInfo, npcs) == 0x44);
static_assert(offsetof(CNaviInfo, links) == 0x5C);
static_assert(sizeof(CNaviData) == 0x4C);
static_assert(offsetof(CNaviData, info) == 0x18);
static_assert(offsetof(CNaviData, cellX) == 0x1C);
static_assert(offsetof(CNaviData, range) == 0x24);
static_assert(offsetof(CNaviData, entries) == 0x28);
static_assert(offsetof(CNaviData, startLinks) == 0x34);
static_assert(offsetof(CNaviData, endLinks) == 0x40);
static_assert(offsetof(CNavigationManager, pathFinder) == 0x004C);
static_assert(offsetof(CNavigationManager, states) == 0x10F0);
static_assert(offsetof(CNavigationManager, currentTarget) == 0x10FC);
static_assert(offsetof(CNavigationManager, savedTarget) == 0x1124);
static_assert(offsetof(CNavigationManager, routeResult) == 0x114C);
static_assert(offsetof(CNavigationManager, nodes) == 0x1150);
static_assert(offsetof(CNavigationManager, routeFlag) == 0x115C);
static_assert(offsetof(CNavigationManager, selectedNode) == 0x1160);
static_assert(offsetof(CNavigationManager, movementRoute) == 0x1164);
static_assert(offsetof(CNavigationManager, drawRoute) == 0x117C);
static_assert(offsetof(CNavigationManager, labels) == 0x1180);
static_assert(offsetof(CNavigationManager, ground) == 0x1240);
static_assert(offsetof(CNavigationManager, playerMapInfo) == 0x1244);
static_assert(offsetof(CNavigationManager, hideWindow) == 0x1248);
static_assert(offsetof(CNavigationManager, viewMode) == 0x1258);
static_assert(offsetof(CNavigationManager, searchType) == 0x1260);
static_assert(offsetof(CNavigationManager, searchText) == 0x1264);
static_assert(offsetof(CNavigationManager, allowGates) == 0x127C);
static_assert(offsetof(CNavigationManager, routeSide) == 0x1280);
static_assert(offsetof(CNavigationManager, previewTexture) == 0x1288);
static_assert(offsetof(CNavigationManager, cells) == 0x1294);
static_assert(offsetof(CNavigationManager, previewAction) == 0x12A0);
static_assert(offsetof(CNavigationManager, routeLines) == 0x12A8);
static_assert(offsetof(CNavigationManager, drawDestination) == 0x12B4);
static_assert(offsetof(CNavigationManager, nodePaths) == 0x12B8);
static_assert(offsetof(CNavigationManager, selectedPath) == 0x12C4);
static_assert(offsetof(CNavigationManager, destinationTitle) == 0x12CC);
static_assert(offsetof(CNavigationManager, destinationText) == 0x12E4);
static_assert(offsetof(CNavigationManager, routeText) == 0x12FC);
static_assert(offsetof(CNavigationManager, selectedNodeText) == 0x1314);
static_assert(offsetof(CNavigationManager, subDestinationText) == 0x132C);
static_assert(offsetof(CNavigationManager, viewIcon) == 0x1344);
static_assert(sizeof(CNavigationManager) == 0x1348);
#endif
#endif