1 #ifndef __STRATPATH_H
2 #define __STRATPATH_H
3 
4 #include "Map_Screen_Interface_Map.h"
5 #include "Strategic_Movement.h"
6 
7 
8 // directions of movement for badsector determination ( blocking off of a sector exit from foot or vehicle travel)
9 
10 // Shortest Path Defines
11 #define NORTH_MOVE -18
12 #define EAST_MOVE    1
13 #define WEST_MOVE    -1
14 #define SOUTH_MOVE  18
15 
16 
17 // Movement speed defines
18 #define NORMAL_MVT 1
19 #define SLOW_MVT   0
20 
21 
22 // movment modes
23 enum{
24 	MVT_MODE_AIR,
25 	MVT_MODE_VEHICLE,
26 	MVT_MODE_FOOT,
27 };
28 
29 INT32 FindStratPath(INT16 sStart, INT16 sDestination, GROUP const&, BOOLEAN fTacticalTraversal);
30 
31 // build a stategic path
32 PathSt* BuildAStrategicPath(INT16 iStartSectorNum, INT16 iEndSectorNum, GROUP const&, BOOLEAN fTacticalTraversal);
33 
34 
35 // append onto path list
36 PathSt* AppendStrategicPath(PathSt* pNewSection, PathSt* pHeadOfPathList);
37 
38 
39 // clear out strategic path list
40 PathSt* ClearStrategicPathList(PathSt* pHeadOfPath, INT16 sMvtGroup);
41 
42 // remove head of list
43 PathSt* RemoveHeadFromStrategicPath(PathSt* pList);
44 
45 // clear out path list after/including this sector sX, sY..will start at end of path and work it's way back till sector is found...removes most recent sectors first
46 PathSt* ClearStrategicPathListAfterThisSector(PathSt* pHeadOfPath, INT16 sX, INT16 sY, INT16 sMvtGroup);
47 
48 // get id of last sector in mercs path list
49 INT16 GetLastSectorIdInCharactersPath(const SOLDIERTYPE* pCharacter);
50 
51 // copy paths
52 PathSt* CopyPaths(PathSt* src);
53 
54 // rebuild way points for strategic mapscreen path changes
55 void RebuildWayPointsForGroupPath(PathSt* pHeadOfPath, GROUP&);
56 
57 // clear strategic movement (mercpaths and waypoints) for this soldier, and his group (including its vehicles)
58 void ClearMvtForThisSoldierAndGang( SOLDIERTYPE *pSoldier );
59 
60 // start movement of this group to this sector...not to be used by the player merc groups.
61 BOOLEAN MoveGroupFromSectorToSector(GROUP&, INT16 sStartX, INT16 sStartY, INT16 sDestX, INT16 sDestY);
62 
63 BOOLEAN MoveGroupFromSectorToSectorButAvoidPlayerInfluencedSectors(GROUP&, INT16 sStartX, INT16 sStartY, INT16 sDestX, INT16 sDestY);
64 BOOLEAN MoveGroupFromSectorToSectorButAvoidPlayerInfluencedSectorsAndStopOneSectorBeforeEnd(GROUP&, INT16 sStartX, INT16 sStartY, INT16 sDestX, INT16 sDestY);
65 
66 
67 // get length of path
68 INT32 GetLengthOfPath(PathSt* pHeadPath);
69 INT32 GetLengthOfMercPath(const SOLDIERTYPE* pSoldier);
70 
71 PathSt* GetSoldierMercPathPtr(SOLDIERTYPE const*);
72 PathSt* GetGroupMercPathPtr(GROUP const&);
73 
74 GROUP* GetSoldierGroup(SOLDIERTYPE const&);
75 
76 // clears this groups strategic movement (mercpaths and waypoints), include those in the vehicle structs(!)
77 void ClearMercPathsAndWaypointsForAllInGroup(GROUP&);
78 
79 void AddSectorToFrontOfMercPathForAllSoldiersInGroup( GROUP *pGroup, UINT8 ubSectorX, UINT8 ubSectorY );
80 
81 #endif
82