#pragma once #include "app.h" extern HWND ghWnd; // BT412: when True, losing the console mid-race ends the mission (the // marshaled/lobby path where the in-process console owns the clock); // False = the arcade -net pod re-listens for its console. See APPMGR.cpp. extern Logical gConsoleLossEndsMission; // BT412: per-frame observer hook (the LocalConsole marshal's game-thread tick). extern void (*gPerFrameHook)(); // BT412: when True, a pod at WaitingForLaunch does NOT self-launch even with no // connected console -- the IN-PROCESS console (hosted network mission) owns the // launch and holds every pod at WaitingForLaunch until the whole mesh is staged, // then dispatches RunMission everywhere at once. See APP.cpp. (Ported from // RP412's engine mod; default False = the stock self-launch behavior.) extern Logical gConsoleMarshalsLaunch; class ApplicationManager : public Node { public: ApplicationManager(HINSTANCE hInstance, HWND hWnd, Scalar frame_rate); ~ApplicationManager(); void StartApplication(Application *new_app); void RunMissions(); Scalar GetFrameRate() { Check(this); return frameRate; } HINSTANCE GetHInstance() { return mHInstance; } HWND GetHWnd() { return ghWnd; } static ApplicationManager* GetCurrentManager() { return CurrentAppManager; } protected: static ApplicationManager* CurrentAppManager; Scalar frameDuration, frameRate; SChainOf runningApplications; HINSTANCE mHInstance; };