12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- //***************************************************************************
- //
- // movemgr.h -- Class definitions for the move path manager.
- //
- // MechCommander 2
- //
- //---------------------------------------------------------------------------//
- // Copyright (C) Microsoft Corporation. All rights reserved. //
- //===========================================================================//
- #ifndef MOVEMGR_H
- #define MOVEMGR_H
- //---------------------------------------------------------------------------
- #ifndef DMOVEMGR_H
- #include "dmovemgr.h"
- #endif
- #ifndef DWARRIOR_H
- #include "dwarrior.h"
- #endif
- //***************************************************************************
- typedef struct _PathQueueRec* PathQueueRecPtr;
- typedef struct _PathQueueRec {
- long num;
- MechWarriorPtr pilot;
- long selectionIndex;
- unsigned long moveParams;
- bool initPath;
- bool faceObject;
- PathQueueRecPtr prev;
- PathQueueRecPtr next;
- } PathQueueRec;
- //---------------------------------------------------------------------------
- class MovePathManager {
- public:
- PathQueueRec pool[MAX_MOVERS];
- PathQueueRecPtr queueFront;
- PathQueueRecPtr queueEnd;
- PathQueueRecPtr freeList;
- static long numPaths;
- static long peakPaths;
- static long sourceTally[50];
- public:
- void* operator new (size_t ourSize);
- void operator delete (void* us);
-
- MovePathManager (void) {
- init();
- }
-
- ~MovePathManager (void) {
- destroy();
- }
-
- void destroy (void);
-
- long init (void);
- void remove (PathQueueRecPtr rec);
- PathQueueRecPtr remove (MechWarriorPtr pilot);
- void request (MechWarriorPtr pilot, long selectionIndex, unsigned long moveParams, long source);
- void calcPath (void);
- void update (void);
- };
- typedef MovePathManager* MovePathManagerPtr;
- #endif
- //***************************************************************************
|