Exit Grids.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __EXIT_GRIDS_H
  2. #define __EXIT_GRIDS_H
  3. #include "Fileman.h"
  4. #include "Worlddef.h"
  5. typedef struct //for exit grids (object level)
  6. { //if an item pool is also in same gridno, then this would be a separate levelnode
  7. //in the object level list
  8. UINT16 usGridNo; //sweet spot for placing mercs in new sector.
  9. UINT8 ubGotoSectorX;
  10. UINT8 ubGotoSectorY;
  11. UINT8 ubGotoSectorZ;
  12. }EXITGRID;
  13. BOOLEAN ExitGridAtGridNo( UINT16 usMapIndex );
  14. BOOLEAN GetExitGridLevelNode( UINT16 usMapIndex, LEVELNODE **ppLevelNode );
  15. BOOLEAN GetExitGrid( UINT16 usMapIndex, EXITGRID *pExitGrid );
  16. void AddExitGridToWorld( INT32 iMapIndex, EXITGRID *pExitGrid );
  17. void RemoveExitGridFromWorld( INT32 iMapIndex );
  18. void SaveExitGrids( HWFILE fp, UINT16 usNumExitGrids );
  19. void LoadExitGrids( INT8 **hBuffer );
  20. void AttemptToChangeFloorLevel( INT8 bRelativeZLevel );
  21. extern EXITGRID gExitGrid;
  22. extern BOOLEAN gfOverrideInsertionWithExitGrid;
  23. // Finds closest ExitGrid of same type as is at gridno, within a radius. Checks
  24. // valid paths, destinations, etc.
  25. UINT16 FindGridNoFromSweetSpotCloseToExitGrid( SOLDIERTYPE *pSoldier, INT16 sSweetGridNo, INT8 ubRadius, UINT8 *pubDirection );
  26. UINT16 FindClosestExitGrid( SOLDIERTYPE *pSoldier, INT16 sGridNo, INT8 ubRadius );
  27. #endif