#ifndef __KOOPATLAS_PATH_MANAGER_H #define __KOOPATLAS_PATH_MANAGER_H //#define WM_UNLOCK_DEBUGGING #ifdef WM_UNLOCK_DEBUGGING #define UnlockCmdReport OSReport #else #define UnlockCmdReport(...) #endif #include "koopatlas/mapdata.h" #include "levelinfo.h" extern "C" void *SoundRelatedClass; extern "C" void *MapSoundPlayer(void *SoundClass, int soundID, int unk); extern "C" bool SpawnEffect(const char*, int, Vec*, S16Vec*, Vec*); class dWMPathManager_c { public: void setup(); ~dWMPathManager_c(); void execute(); bool canUseExit(dKPPath_s *path) { OSReport("Checking usability of path %p\n", path); if (path) OSReport("Availability: %d\n", path->isAvailable); return (path != 0) && (path->isAvailable); } void startMovementTo(dKPPath_s *path); void moveThroughPath(int pressedDir); void activatePoint(); void unlockAllPaths(char type); void copyWorldDefToSave(const dKPWorldDef_s *world); dKPLayer_s *pathLayer; bool isMoving; dKPNode_s *currentNode; HermiteKey keysX[2]; HermiteKey keysY[3]; float timer; bool isJumping; float moveSpeed; bool forcedRotation; int scaleAnimProgress; bool isScalingUp; dKPPath_s *currentPath; bool reverseThroughPath; // direction we are going through the path bool mustComplainToMapCreator; int newlyAvailablePaths; int newlyAvailableNodes; int unlockingAlpha; // -1 if not used int countdownToFadeIn; int waitAfterUnlock; private: void unlockPaths(); bool evaluateUnlockCondition(u8 *&in, SaveBlock *save, int stack); public: bool shouldRequestSave; bool isEnteringLevel; bool calledEnteredNode; int levelStartWait; int waitAtStart; bool mustPlayAfterDeathAnim; int waitForAfterDeathAnim; bool doingThings(); dLevelInfo_c::entry_s *enteredLevel; }; #endif