mono/packages/registry/ref/CKBaseManager.ts

273 lines
6.9 KiB
TypeScript

const MAX_MANAGERFUNC_PRIORITY = 30000;
const DEFAULT_MANAGERFUNC_PRIORITY = 0;
type CKGUID = string;
type CKSTRING = string;
type CKDWORD = number;
type CK_ID = number;
type BOOL = boolean;
class CKFile {}
class CKStateChunk {}
class CKDependenciesContext {}
class CKRenderContext {}
class CKScene {}
class CKObject {}
type CKRST_EVENTS = any; // Placeholder
type CKContext = any; // Placeholder
type CKERROR = any; // Placeholder
type CKDependencies = any; // Placeholder
enum CKMANAGER_FUNCTIONS {
CKMANAGER_FUNC_OnSequenceToBeDeleted = 0x00000001,
CKMANAGER_FUNC_OnSequenceDeleted = 0x00000002,
CKMANAGER_FUNC_PreProcess = 0x00000004,
CKMANAGER_FUNC_PostProcess = 0x00000008,
CKMANAGER_FUNC_PreClearAll = 0x00000010,
CKMANAGER_FUNC_PostClearAll = 0x00000020,
CKMANAGER_FUNC_OnCKInit = 0x00000040,
CKMANAGER_FUNC_OnCKEnd = 0x00000080,
CKMANAGER_FUNC_OnCKPlay = 0x00000100,
CKMANAGER_FUNC_OnCKPause = 0x00000200,
CKMANAGER_FUNC_PreLoad = 0x00000400,
CKMANAGER_FUNC_PreSave = 0x00000800,
CKMANAGER_FUNC_PreLaunchScene = 0x00001000,
CKMANAGER_FUNC_PostLaunchScene = 0x00002000,
CKMANAGER_FUNC_OnCKReset = 0x00004000,
CKMANAGER_FUNC_PostLoad = 0x00008000,
CKMANAGER_FUNC_PostSave = 0x00010000,
CKMANAGER_FUNC_OnCKPostReset = 0x00020000,
CKMANAGER_FUNC_OnSequenceAddedToScene = 0x00040000,
CKMANAGER_FUNC_OnSequenceRemovedFromScene = 0x00080000,
CKMANAGER_FUNC_OnPreCopy = 0x00100000,
CKMANAGER_FUNC_OnPostCopy = 0x00200000,
CKMANAGER_FUNC_OnPreRender = 0x00400000,
CKMANAGER_FUNC_OnPostRender = 0x00800000,
CKMANAGER_FUNC_OnPostSpriteRender = 0x01000000,
CKMANAGER_FUNC_OnPreBackToFront = 0x02000000,
CKMANAGER_FUNC_OnPostBackToFront = 0x04000000,
CKMANAGER_FUNC_OnPreFullScreen = 0x08000000,
CKMANAGER_FUNC_OnPostFullScreen = 0x10000000,
CKMANAGER_FUNC_OnRasterizerEvent = 0x20000000,
CKMANAGER_FUNC_OnPreSpriteRender = 0x40000000,
}
enum CKMANAGER_FUNCTIONS_INDEX {
CKMANAGER_INDEX_OnSequenceToBeDeleted = 0,
CKMANAGER_INDEX_OnSequenceDeleted = 1,
CKMANAGER_INDEX_PreProcess = 2,
CKMANAGER_INDEX_PostProcess = 3,
CKMANAGER_INDEX_PreClearAll = 4,
CKMANAGER_INDEX_PostClearAll = 5,
CKMANAGER_INDEX_OnCKInit = 6,
CKMANAGER_INDEX_OnCKEnd = 7,
CKMANAGER_INDEX_OnCKPlay = 8,
CKMANAGER_INDEX_OnCKPause = 9,
CKMANAGER_INDEX_PreLoad = 10,
CKMANAGER_INDEX_PreSave = 11,
CKMANAGER_INDEX_PreLaunchScene = 12,
CKMANAGER_INDEX_PostLaunchScene = 13,
CKMANAGER_INDEX_OnCKReset = 14,
CKMANAGER_INDEX_PostLoad = 15,
CKMANAGER_INDEX_PostSave = 16,
CKMANAGER_INDEX_OnCKPostReset = 17,
CKMANAGER_INDEX_OnSequenceAddedToScene = 18,
CKMANAGER_INDEX_OnSequenceRemovedFromScene = 19,
CKMANAGER_INDEX_OnPreCopy = 20,
CKMANAGER_INDEX_OnPostCopy = 21,
CKMANAGER_INDEX_OnPreRender = 22,
CKMANAGER_INDEX_OnPostRender = 23,
CKMANAGER_INDEX_OnPostSpriteRender = 24,
CKMANAGER_INDEX_OnPreBackToFront = 25,
CKMANAGER_INDEX_OnPostBackToFront = 26,
CKMANAGER_INDEX_OnPreFullScreen = 27,
CKMANAGER_INDEX_OnPostFullScreen = 28,
CKMANAGER_INDEX_OnRasterizerEvent = 29,
CKMANAGER_INDEX_OnPreSpriteRender = 30,
}
type VxRDTSCProfiler = any; // Placeholder
class CKBaseManager {
m_ManagerGuid: CKGUID;
m_ManagerName: CKSTRING;
m_Context: CKContext;
m_ProcessingTime: number;
m_Timer: VxRDTSCProfiler;
constructor(Context: CKContext, guid: CKGUID, Name: CKSTRING) {
this.m_ManagerGuid = guid;
this.m_ManagerName = Name;
this.m_Context = Context;
this.m_ProcessingTime = 0;
// this.m_Timer = new VxRDTSCProfiler(); // Initialize if needed
}
GetGuid(): CKGUID {
return this.m_ManagerGuid;
}
GetName(): CKSTRING {
return this.m_ManagerName;
}
SaveData(SavedFile: CKFile): CKStateChunk | null {
return null;
}
LoadData(chunk: CKStateChunk, LoadedFile: CKFile): CKERROR {
return CK_OK;
}
PreClearAll(): CKERROR {
return CK_OK;
}
PostClearAll(): CKERROR {
return CK_OK;
}
PreProcess(): CKERROR {
return CK_OK;
}
PostProcess(): CKERROR {
return CK_OK;
}
SequenceAddedToScene(scn: CKScene, objids: CK_ID[], count: number): CKERROR {
return CK_OK;
}
SequenceRemovedFromScene(scn: CKScene, objids: CK_ID[], count: number): CKERROR {
return CK_OK;
}
PreLaunchScene(OldScene: CKScene, NewScene: CKScene): CKERROR {
return CK_OK;
}
PostLaunchScene(OldScene: CKScene, NewScene: CKScene): CKERROR {
return CK_OK;
}
OnCKInit(): CKERROR {
return CK_OK;
}
OnCKEnd(): CKERROR {
return CK_OK;
}
OnCKReset(): CKERROR {
return CK_OK;
}
OnCKPostReset(): CKERROR {
return CK_OK;
}
OnCKPause(): CKERROR {
return CK_OK;
}
OnCKPlay(): CKERROR {
return CK_OK;
}
SequenceToBeDeleted(objids: CK_ID[], count: number): CKERROR {
return CK_OK;
}
SequenceDeleted(objids: CK_ID[], count: number): CKERROR {
return CK_OK;
}
PreLoad(): CKERROR {
return CK_OK;
}
PostLoad(): CKERROR {
return CK_OK;
}
PreSave(): CKERROR {
return CK_OK;
}
PostSave(): CKERROR {
return CK_OK;
}
OnPreCopy(context: CKDependenciesContext): CKERROR {
return CK_OK;
}
OnPostCopy(context: CKDependenciesContext): CKERROR {
return CK_OK;
}
OnPreRender(dev: CKRenderContext): CKERROR {
return CK_OK;
}
OnPostRender(dev: CKRenderContext): CKERROR {
return CK_OK;
}
OnPreSpriteRender(dev: CKRenderContext): CKERROR {
return CK_OK;
}
OnPostSpriteRender(dev: CKRenderContext): CKERROR {
return CK_OK;
}
GetFunctionPriority(Function: CKMANAGER_FUNCTIONS): number {
return 0;
}
GetValidFunctionsMask(): CKDWORD {
return 0;
}
OnPreBackToFront(dev: CKRenderContext): CKERROR {
return CK_OK;
}
OnPostBackToFront(dev: CKRenderContext): CKERROR {
return CK_OK;
}
OnPreFullScreen(Going2Fullscreen: BOOL, dev: CKRenderContext): CKERROR {
return CK_OK;
}
OnPostFullScreen(Going2Fullscreen: BOOL, dev: CKRenderContext): CKERROR {
return CK_OK;
}
OnRasterizerEvent(Event: CKRST_EVENTS, dev: CKRenderContext): CKERROR {
return CK_OK;
}
CKDestroyObject(obj: CKObject, Flags = 0, depoptions: CKDependencies | null = null): CKERROR {
return CK_OK;
}
CKDestroyObjectById(id: CK_ID, Flags = 0, depoptions: CKDependencies | null = null): CKERROR {
return CK_OK;
}
CKDestroyObjects(obj_ids: CK_ID[], Count: number, Flags = 0, depoptions: CKDependencies | null = null): CKERROR {
return CK_OK;
}
CKGetObject(id: CK_ID): CKObject | null {
return null;
}
StartProfile() {}
StopProfile() {}
}