forked from Ares-Developers/YRpp
-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathAStarClass.h
More file actions
95 lines (85 loc) · 2.09 KB
/
AStarClass.h
File metadata and controls
95 lines (85 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#pragma once
// Reverse engineering and coding by: CrimRecya
#include <ArrayClasses.h>
#include <GeneralStructures.h>
#include <FootClass.h>
class TechnoClass;
struct AStarClass_PathNodeBuffer;
struct AStarClass_PathQueueBuffer;
struct AStarClass_HierarchicalBuffer;
struct PriorityQueueClass_PathQueueNode;
struct PriorityQueueClass_HierarchicalNode;
struct AStarClass_PassabilityData
{
unsigned short Indices[500];
};
static_assert(sizeof(AStarClass_PassabilityData) == 0x3E8);
class PathFinderData
{
CellStruct StartCell;
int TotalDistance;
int PathLength;
int* Directions;
int unknown_int_10;
int* Levels;
CellStruct unknown_cellstruct_18;
int unknown_int_1C;
};
static_assert(sizeof(PathFinderData) == 0x20);
class AStarClass
{
public:
//Static
DEFINE_REFERENCE(AStarClass, Instance, 0x87E8B8u)
int AttemptPath(
CellStruct* pFromMapCrd,
CellStruct* pToMapCrd,
FootClass* pFoot,
bool bFromAlt,
bool bToAlt,
MovementZone nMovementZone = MovementZone::None)
{ JMP_THIS(0x42D170); }
PathFinderData* FindPath(
CellStruct* pStart,
CellStruct* pEnd,
FootClass* pFoot,
int* pDirs,
int maxSteps,
MovementZone movementZone,
int mode)
{
JMP_THIS(0x42C900);
}
char unknown_byte_0;
bool FindBridgeDir;
char unknown_byte_2;
bool CanFindPath;
float PathCostFactor;
bool IsAlt;
PROTECTED_PROPERTY(BYTE, padding_9_B[3]);
AStarClass_PathNodeBuffer* PathNodeBuffer;
AStarClass_PathQueueBuffer* PathQueueBuffer;
PriorityQueueClass_PathQueueNode* PathQueue;
int* VisitCounts;
int* AltVisitCounts;
float* AltDistances;
float* Distances;
int SearchID;
SpeedType FinderSpeedType;
int StartLevel;
int EndLevel;
bool IsSearching;
PROTECTED_PROPERTY(BYTE, padding_39_3B[3]);
int FindMode;
int* LevelVisitedMarkers[3];
int* OpenSetMarkers[3];
float* GCostArray[3];
AStarClass_HierarchicalBuffer* HierarchyBuffer;
PriorityQueueClass_HierarchicalNode* HierarchyQueue;
int PathLength;
CellStruct CellStructBuffer;
DynamicVectorClass<unsigned int> ZoneIndices[3];
AStarClass_PassabilityData PassabilityData[3];
int PassabilityCounts[3];
};
static_assert(sizeof(AStarClass) == 0xC80);