gameSkeleton 与主循环:系统装配总表
本页是全 Wiki 的“系统装配总表”。GTAV 的数百个游戏子系统并不由某个巨大的 Init() 手写调用,而是由 CGame::Register*Functions 把“名字 + 回调”登记到框架类 gameSkeleton 的若干初始化/关闭模式与更新模式中,再由 CGame::Init/InitLevel/InitSession/Update 按模式批量执行。理解这张表,就能回答“某个系统何时初始化、何时关闭、每帧在什么位置更新、在哪种游戏状态下不更新”。
本页还覆盖 CGame 的生命周期函数(PreLoadingScreensInit/Init/InitLevel/InitSession/Shutdown*)、CGame::Update/Render 的逐步流程、ShouldDoFullUpdateRender 以及一帧的完整时序。
背景与相关页面#
- 进程入口与
CApp状态机(谁调用CGame::Init/Update/Render):startup-and-app-fsm.md - 谁调用
CGame::InitLevel/InitSession/Shutdown*(引导、新游戏、读档、换关):session-state-machine.md - 渲染线程交接与安全区(
Synchronise/PerformSafeModeOperations):threading-and-render-thread.md - drawlist 构建细节:../11-rendering/drawlists-and-render-thread-handoff.md;渲染阶段
gVpMan.RenderPhases():../11-rendering/render-pipeline-and-phases.md CScene::Update → CGameWorld::Process(实体与物理更新):../05-world/world-and-entities.md、../09-physics/game-physics-and-ragdoll.md- 脚本更新
CTheScripts::Process:../14-script-runtime/script-handlers-and-threads.md - 流式系统
CStreaming::Update:../05-world/game-streaming-and-scene-streamer.md、../04-rage-framework/streaming-engine.md fwTimer等框架服务:../04-rage-framework/framework-systems.md
相关源码文件#
| 文件 | 作用 |
|---|---|
src/dev_ng/rage/framework/src/fwsys/gameskeleton.h/.cpp | gameSkeleton:模式掩码、注册与执行、更新组与计时条 |
src/dev_ng/rage/framework/src/fwsys/game.h/.cpp | fwGame/fwGameInterface:框架级流式模块注册 |
src/dev_ng/game/Core/game.h/.cpp | CGame:全部注册函数、生命周期函数、Update/Render、ShouldDoFullUpdateRender |
src/dev_ng/game/Core/app.cpp | CApp::RunGame:每帧调用 CGame::Update/Render 的外层骨架 |
src/dev_ng/game/system/system.cpp | CSystem::BeginUpdate/EndUpdate/AddDrawList_BeginRender/EndRender |
src/dev_ng/game/scene/scene.cpp | CScene::Update(FULL_MAIN_UPDATE 中的场景/世界更新入口) |
1. gameSkeleton 机制#
1.1 模式掩码#
初始化/关闭模式与更新模式都是位掩码常量:
| 常量 | 值 | 证据 |
|---|---|---|
INIT_CORE / SHUTDOWN_CORE | BIT(0) | src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:18-19 |
INIT_BEFORE_MAP_LOADED | BIT(1) | src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:20 |
INIT_AFTER_MAP_LOADED / SHUTDOWN_WITH_MAP_LOADED | BIT(2) | src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:21-22 |
INIT_SESSION / SHUTDOWN_SESSION | BIT(3) | src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:23-24 |
COMMON_MAIN_UPDATE / FULL_MAIN_UPDATE / SIMPLE_MAIN_UPDATE | BIT(0) / BIT(1) / BIT(2) | src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:26-28 |
COMMERCE_MAIN_UPDATE | BIT(3)(仅 COMMERCE_CONTAINER,即 PS3) | src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:30-32、src/dev_ng/rage/base/src/system/memory.h:20 |
LANDING_PAGE_PRE_INIT_UPDATE / LANDING_PAGE_UPDATE | BIT(4) / BIT(5) | src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:34-35 |
初始化与关闭共用同一套位值(例如 INIT_CORE == SHUTDOWN_CORE == 1),回调签名都是 void(unsigned mode),许多系统的 Init/Shutdown 内部用 if (mode == INIT_CORE) ... else if (mode == INIT_SESSION) ... 区分阶段——例如 CGame::ViewportSystemInit/Shutdown 在 CORE 模式创建/销毁视口管理器,在 SESSION 模式只做会话级初始化/关闭 src/dev_ng/game/Core/game.cpp:3614-3639。
1.2 数据结构#
图中证据:
systemData(init/shutdown 函数、两个依赖级别字段、init/shutdown 类型掩码、名字):src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:146-193dependency(级别、atArray<unsigned> sysData、next)与mode(类型、依赖链表头、next):src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:198-228updateBase/updateElement/updateGroup/updateMode:src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:233-417- 成员:当前依赖级别/各类型、
m_RegisteredSystemData、更新组栈、三个模式链表头:src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:461-477
1.3 注册语义#
| 操作 | 实现要点 | 证据 |
|---|---|---|
SetCurrentInitType/ShutdownType/DependencyLevel | 仅记录“当前”值,后续注册沿用 | src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:53-56 |
SetCurrentUpdateType | 断言更新组栈为空(Push/Pop 必须配对) | src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:41-48 |
RegisterInitSystem(fn, name) | 断言级别 < MAX_DEPENDENCY_LEVELS;按名字哈希线性查找已有 systemData:存在则断言函数一致且该 init 类型未注册过,再 OR 进类型掩码;否则追加新项。最后把索引加入“当前 init 类型”模式的“当前级别”桶 | src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:50-82、src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:484-505 |
RegisterShutdownSystem | 同上,作用于关闭函数与 m_ShutdownModes | src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:84-113 |
AddSysDataForMode | 在模式链表中查找/追加该模式;在其依赖链表中按级别升序查找/插入桶;把索引 PushAndGrow 到桶尾 | src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:166-240 |
RegisterUpdateSystem(fn, name, addTimebar, budget) | 新建 updateElement;若更新组栈非空,追加到栈顶组的子链表尾,否则追加到当前更新模式链表尾 | src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:115-134、src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:290-367 |
PushUpdateGroup / PopUpdateGroup | 组本身作为元素加入当前位置,然后压栈(上限 32 层) | src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:136-164 |
两个容易误解的细节:
- 依赖级别属于“(模式, 注册)”而非系统。排序用的是注册时的
m_CurrentDependencyLevel;systemData::m_InitDependencyLevel/m_ShutdownDependencyLevel只在首次创建时赋值,执行路径从不读取它们src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:71、src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:104、src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:369-467。同一个系统可以在INIT_CORE的级别 1、INIT_SESSION的级别 2 分别注册。 - 同名即同一系统。不同模式下用同一个
atHashString名注册时,回调必须相同(断言);因此 GTAV 偶尔用不同名字注册同一函数的不同阶段(如"CModelInfo"与"CModelInfo::Init"、"ViewportSystemInit"与"ViewportSystemInitLevel")。
1.4 Init(mode) / Shutdown(mode) 的执行#
src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:369-467
- 找到模式后,按依赖级别从低到高遍历,每个级别内按注册顺序调用
fn(mode)。 - 关闭不会自动反序:
Shutdown()与Init()一样从低级别到高级别、按注册顺序执行。游戏通过把“必须最后关闭”的系统放到更高级别来表达依赖(例如CStreaming::Shutdown在会话关闭中位于级别 5,fwTxdStoreWrapper::Shutdown位于级别 6,注释写明“dependent on streaming being shutdown”)src/dev_ng/game/Core/game.cpp:2616-2630。 __DEV下SetTestDependencies(true)会把每个级别内的顺序反过来,用于检验同级系统之间是否存在未声明的依赖src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:58-60、src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:386-392。- 每个 init 回调前推入同名启动计时条(
PF_START_STARTUPBAR)与 profiler 事件,回调后调用strStreamingEngine::GetLoader().CallKeepAliveCallbackIfNecessary();该函数在距上次回调超过 0.5 秒时调用游戏的 keep-alive 回调,避免长时间初始化导致网络超时或加载画面卡死src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:398-411、src/dev_ng/rage/framework/src/streaming/streamingloader.cpp:2900-2904。关闭路径没有 keep-alive 调用。 - 非
__NO_OUTPUT时以gsysDebug1记录每个系统的耗时。
1.5 Update(mode) 的执行#
- 线性查找更新模式,依次调用元素的
Update();未注册的模式直接无操作src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:469-482。 updateElement::Update:若m_AddTimebar,预算 > 0 时推PF_PUSH_TIMEBAR_BUDGETED,否则PF_PUSH_TIMEBAR_DETAIL;调用函数;非 final 下调用scrThread::CheckIfMonitoredScriptArraySizeHasChanged(name)检测脚本数组被意外改写src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:281-311。updateGroup::Update:可选计时条后依次调用子元素(可嵌套)src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:342-370。
1.6 容量常量#
DEFAULT_MAX_SYSTEMS_REGISTERED = 128(只是 Reserve 的初始容量,PushAndGrow 会扩容)、MAX_DEPENDENCY_LEVELS = 32、MAX_NESTED_UPDATE_GROUPS = 32 src/dev_ng/rage/framework/src/fwsys/gameskeleton.h:138-140、src/dev_ng/rage/framework/src/fwsys/gameskeleton.cpp:25。GTAV 实际使用级别 1–6(常量 MAP_LOADED_DEPENDENCY_LEVEL_1..8 中 7、8 未用)src/dev_ng/game/Core/game.cpp:499-506。
2. CGame 生命周期与 g_loadStatus#
CGame 全是静态成员,持有唯一的 gameSkeleton m_GameSkeleton 与 CGameSessionStateMachine m_GameSessionStateMachine src/dev_ng/game/Core/game.h:37-42、src/dev_ng/game/Core/game.cpp:509-510。加载深度由文件静态 g_loadStatus ∈ {GAME_INIT, GAME_INITLEVEL, GAME_INITSESSION} 记录 src/dev_ng/game/Core/game.cpp:522-528。
图中证据:InitLevel 末尾 g_loadStatus = GAME_INITLEVEL src/dev_ng/game/Core/game.cpp:1380;InitSession 末尾 = GAME_INITSESSION src/dev_ng/game/Core/game.cpp:1577;ShutdownSession 开头 = GAME_INITLEVEL src/dev_ng/game/Core/game.cpp:1595;ShutdownLevel 开头 = GAME_INIT src/dev_ng/game/Core/game.cpp:1457;CGame::Shutdown 按当前状态补关会话/关卡 src/dev_ng/game/Core/game.cpp:1204-1209。
| 函数 | 执行的 skeleton 模式 | 调用者 | 证据 |
|---|---|---|---|
CGame::PreLoadingScreensInit | 无(直接调用) | CApp::InitGame | src/dev_ng/game/Core/game.cpp:944-1093 |
CGame::Init | INIT_CORE | CApp::InitGame | src/dev_ng/game/Core/game.cpp:1099-1182 |
CGame::InitLevel(level) | INIT_BEFORE_MAP_LOADED → CScene::LoadMap → INIT_AFTER_MAP_LOADED | 会话状态机 | src/dev_ng/game/Core/game.cpp:1311-1385 |
CGame::InitSession(level, bLoadingSave) | INIT_SESSION | 会话状态机 | src/dev_ng/game/Core/game.cpp:1507-1578 |
CGame::ShutdownSession | SHUTDOWN_SESSION | 会话状态机、CGame::Shutdown | src/dev_ng/game/Core/game.cpp:1590-1636 |
CGame::ShutdownLevel | SHUTDOWN_WITH_MAP_LOADED | 会话状态机、CGame::Shutdown | src/dev_ng/game/Core/game.cpp:1453-1481 |
CGame::Shutdown | SHUTDOWN_CORE | CApp::ShutdownGame | src/dev_ng/game/Core/game.cpp:1187-1237 |
CGame::Update / Render | COMMON/FULL/SIMPLE/LANDING_PAGE* 更新模式 | CApp::RunGame 每帧 | src/dev_ng/game/Core/game.cpp:3315-3607 |
注意没有 INIT_LEVEL 式的“关闭关卡前”模式:关卡级系统要么注册在 INIT_BEFORE/AFTER_MAP_LOADED,要么注册在 INIT_SESSION(每次新游戏/读档都会重跑),对应的关闭则落在 SHUTDOWN_WITH_MAP_LOADED 或 SHUTDOWN_SESSION。
3. CGame::PreLoadingScreensInit#
在任何 skeleton 模式执行之前,必须先让加载画面能显示文字。按调用顺序 src/dev_ng/game/Core/game.cpp:944-1093:
g_movieMgr.Init(INIT_CORE)、CRenderer::PreLoadingScreensInit();PC D3D11 临时注销 drawlist 纹理更新函数以规避 Bink 片头的崩溃(注释称“Temp fix”)src/dev_ng/game/Core/game.cpp:946-955。- Orbis 提前加载 NP 公共对话框/派对/NP 库,避免片头视频期间音频破音
src/dev_ng/game/Core/game.cpp:957-962。 CLoadingScreens::Init(LOADINGSCREEN_CONTEXT_INTRO_MOVIE);“渲染线程与片头视频此时已就绪,可以安全加载剩余着色器”→CShaderLib::Init();恢复纹理更新函数src/dev_ng/game/Core/game.cpp:964-973。__BANK挂接异常/OOM 显示回调;ASSERT_ONLY(sysMemVerifyMainThread = CGame::VerifyMainThread)src/dev_ng/game/Core/game.cpp:975-985。fwGame::InitClass(rage_new CGtaGameInterface)、INIT_DATAFILEMGR、fwGame::Init()——后者注册框架流式模块(Dwd/Drawable/Txd/Fragment/Cloth/MetaData/MapTypes/MapData 存储),再由CGtaGameInterface::RegisterStreamingModules注册游戏模块(PoseMatcher、BlendShape、ClipDictionary、CutScene、Expression、Scaleform、StaticBounds、StreamedScripts、PtFx 资源、NetworkDef、FrameFilter、WaypointRecording、VehicleRecording、ModelInfo、PathFind、PathServer)src/dev_ng/game/Core/game.cpp:987-990、src/dev_ng/rage/framework/src/fwsys/game.cpp:27-58、src/dev_ng/game/Core/game.cpp:558-583。fwScan::InitClass、脏话过滤器、CStreaming::Init(INIT_CORE)、CMapFileMgr::Init(INIT_CORE)src/dev_ng/game/Core/game.cpp:992-998。- 载入启动数据:
DATAFILEMGR.Load("platformcrc:/data/startup")→CFileLoader::AddAllRpfFiles(true)→CFileLoader::InitClass→ 可选contentpatch、update:/content→platformcrc:/data/default;strStreamingEngine::InitLive(-previewfolder)src/dev_ng/game/Core/game.cpp:1000-1026。 CLiveManager::Init(INIT_CORE)、CGenericGameStorage::Init(INIT_CORE)、CProfileSettings::InitClass、CExtraContentWrapper::Init(INIT_CORE);执行标题更新数据补丁组、加载关卡包;CStreaming::LoadStreamingMetaFile/RegisterStreamingFiles、DATAFILEMGR.SnapshotFiles()src/dev_ng/game/Core/game.cpp:1033-1054。- Scaleform 预分配信息与纹理依赖;登记档案变更回调(
CGame::InitProfile/ShutdownProfile)并刷新档案;CPauseMenu::SetDefaultValues按系统语言设默认;CScaleformMgr::Init(INIT_CORE)、CMessages::Init、TheText.Load()、文本补丁;PCCEntitlementManager::Init(0)src/dev_ng/game/Core/game.cpp:1058-1092。
4. CGame::Init 与 CGame::Shutdown#
CGame::Init src/dev_ng/game/Core/game.cpp:1099-1182:
AutoIdInit();RegisterGameSkeletonFunctions()——一次性登记全部模式(第 6、8 节)src/dev_ng/game/Core/game.cpp:1104-1107、src/dev_ng/game/Core/game.cpp:1663-1694。落地页两个更新模式只在GEN9_LANDING_PAGE_ENABLED && Gen9LandingPageEnabled()时注册,商城模式只在COMMERCE_CONTAINER时注册。m_GameSessionStateMachine.Init()、rlPresence::AddDelegate(登录状态事件)src/dev_ng/game/Core/game.cpp:1110-1113。CStreaming::SetKeepAliveCallback(KeepAliveCallback, 50)并立即调用一次src/dev_ng/game/Core/game.cpp:1115-1116。KeepAliveCallback依次做 PC 设备状态检查、CNetwork::Update(true)、CLoadingScreens::KeepAliveUpdate()、g_SysService.UpdateClass();Bank 构建在初始加载阶段若两次调用间隔超过 1 秒会打印上次与本次调用栈src/dev_ng/game/Core/game.cpp:891-938。50 ms 间隔用于流式加载器的阻塞加载循环,gameSkeleton::Init中则使用 0.5 s 阈值src/dev_ng/rage/framework/src/streaming/streamingloader.cpp:2879-2904。CreateFactories():Ped、Vehicle、PedIntelligence、VehicleIntelligence 工厂(工厂构造函数里初始化CPed/CVehicle等池)src/dev_ng/game/Core/game.cpp:588-594。SAVEGAME.InitClass()、OrbisSaveGameSetup()、fwDecoratorInterface::InitClass、可选马匹系统src/dev_ng/game/Core/game.cpp:1120-1132。- 在接触任何骨骼之前创建碎片缓存分配器:
fragManager::CreateAllocator(),并把CGameTempAllocator设为sysMemManager的 FragCache 分配器src/dev_ng/game/Core/game.cpp:1134-1140(见 memory-and-pools.md)。 m_GameSkeleton.Init(INIT_CORE)(启动条 “Init Core”)src/dev_ng/game/Core/game.cpp:1142-1145。- 档案再刷新、
SPlayerCardXMLDataManager、Bank 资源可视化与控件、断言构建的字符串 hack、TelemetryInit/CTelemetry::Initsrc/dev_ng/game/Core/game.cpp:1147-1181。
CGame::Shutdown src/dev_ng/game/Core/game.cpp:1187-1237:遥测与装饰器关闭 → 强制“Loading”渲染函数 → 按 g_loadStatus 补调 ShutdownSession/ShutdownLevel → 完成未决存档、立即写档案 → gRenderThreadInterface.Shutdown()(停止渲染线程,设备回到主线程)→ SHUTDOWN_CORE → 销毁工厂、fwQuadTreeNode 池、SAVEGAME、AutoIdShutdown、fwScan、fwGame。
5. InitLevel / InitSession / ShutdownSession / ShutdownLevel#
5.1 CGame::InitLevel(level)#
src/dev_ng/game/Core/game.cpp:1311-1385
- 推进加载进度;随机种子取
sysTimer::GetTicks()(非 final 可-randomseed),同时设置fwRandom、CRandomScripts,以及用seed ^ reverseBits(seed)设置CRandomMWCScriptssrc/dev_ng/game/Core/game.cpp:1314-1327。 - NP:设置奖杯启用与存档归属
src/dev_ng/game/Core/game.cpp:1329-1333。 m_GameSkeleton.Init(INIT_BEFORE_MAP_LOADED)→ PCCApp::CheckExit()→CScene::LoadMap(level)(非 final 可-map=<file>)→CModelIndex::MatchAllModelStrings()→CheckExit→m_GameSkeleton.Init(INIT_AFTER_MAP_LOADED)→CheckExitsrc/dev_ng/game/Core/game.cpp:1335-1371。- Bank 关卡控件;
CLODLightManager::CreateLODLightImapIDXCache();g_loadStatus = GAME_INITLEVEL;Xenon/PS3 的 scratch 分配器置就绪src/dev_ng/game/Core/game.cpp:1373-1384。
5.2 CGame::InitSession(level, bLoadingAPreviouslySavedGame)#
src/dev_ng/game/Core/game.cpp:1507-1578
m_GameSkeleton.Init(INIT_SESSION)→CStreaming::MarkFirstInitComplete()→CheckExit→ 结束启动序列录制(非 final)。- 为动态导航网格设置载具模型索引(注释“no longer necessary”但仍调用)。
- 若无主玩家:按
CFileMgr::IsGameInstalled()选择 gameconfig 中的m_defaultPlayerName或m_defaultProloguePlayerName在原点创建玩家src/dev_ng/game/Core/game.cpp:1539-1544。 CNetwork::GetAssetVerifier().Init();在初始化期间跑一次脚本:SetProcessingTheScriptsDuringGameInit(true)→CTheScripts::Process()→ 关闭标志 → 强制 keep-alivesrc/dev_ng/game/Core/game.cpp:1548-1555。- 非读档:
DiskCacheSchedule()(函数体在#if 0 // KS fixme内,实际为空src/dev_ng/game/Core/game.cpp:3674-3718)、非 final 读取玩家坐标文件、InitLevelAfterLoadingFromMemoryCard(level)、CNetworkTelemetry::NewGame()。读档时后两步由会话状态机在反序列化后调用src/dev_ng/game/Core/game.cpp:1557-1569。 g_loadStatus = GAME_INITSESSION。
InitLevelAfterLoadingFromMemoryCard 设置当前关卡索引、Bank 控件、CGenericGameStorage::Init(INIT_AFTER_MAP_LOADED)、清除“开局自动读档”标志;Orbis 上可能在此执行新游戏存档空间检查(阻塞轮询 CGenericGameStorage::Update 并排空 CloudCache/pgStreamer)src/dev_ng/game/Core/game.cpp:1387-1448。
5.3 CGame::ShutdownSession 与 ShutdownLevel#
ShutdownSession src/dev_ng/game/Core/game.cpp:1590-1636:在执行 SHUTDOWN_SESSION 之前先把所有“仍在飞行中”的东西排空——清成就进度、gStreamingRequestList.Finish()、停手柄震动、清空游戏流队列、gRenderThreadInterface.Flush()、pgStreamer::Drain()、中止碎片整理、清输入历史、关航点、中止脚本对话、写档案;最后 StreamingInstall::ClearInstalledThisSession()。
ShutdownLevel src/dev_ng/game/Core/game.cpp:1453-1481:SHUTDOWN_WITH_MAP_LOADED 后断言 CVehicle/CPed/CObject/CDummyObject/CBuilding/CEntityBatch/CGrassBatch/CInteriorInst/CInteriorProxy/CPortalInst 池全部为空;g_uniqueObjectIDGenerator.Reset() 故意不注册到 skeleton,“这样其他系统关闭时 DLC 设备仍然可用”。
6. 系统装配总表:初始化与关闭#
6.1 注册宏#
REGISTER_INIT_CALL / REGISTER_SHUTDOWN_CALL / REGISTER_UPDATE_CALL[_TIMED][_BUDGETTED][_WITH_CATEGORY] / PUSH_UPDATE_GROUP[_BUDGETTED] / POP_UPDATE_GROUP / SET_*_TYPE / SET_CURRENT_DEPENDENCY_LEVEL 是对 m_GameSkeleton 方法的薄封装;USE_PROFILER 时额外为每个回调创建 Profiler::EventDescription(带文件/行号与分类颜色)src/dev_ng/game/Core/game.cpp:1696-1721。_TIMED 系列给单个元素加独立计时条;PUSH_UPDATE_GROUP* 总是带计时条。
6.2 总览矩阵(注册条目数,含条件编译项)#
| 模式 | L1 | L2 | L3 | L4 | L5 | L6 | 合计 | 执行时机 |
|---|---|---|---|---|---|---|---|---|
INIT_CORE | 67 | 12 | 27 | – | – | – | 106 | 进程启动一次(CGame::Init) |
SHUTDOWN_CORE | 82 | 8 | 13 | 1 | – | – | 104 | 进程关闭(CGame::Shutdown,PC 正常退出不执行) |
INIT_BEFORE_MAP_LOADED | 32 | – | – | – | – | – | 32 | 每次 InitLevel,加载地图前 |
INIT_AFTER_MAP_LOADED | 30 | 3 | – | – | – | – | 33 | 每次 InitLevel,加载地图后 |
SHUTDOWN_WITH_MAP_LOADED | 30 | 3 | 3 | 9 | – | – | 45 | 每次 ShutdownLevel |
INIT_SESSION | 5 | 90 | 18 | 1 | – | – | 114 | 每次新游戏/读档/换关(InitSession) |
SHUTDOWN_SESSION | 13 | 77 | 26 | 4 | 2 | 6 | 128 | 每次 ShutdownSession |
计数方法:按下方明细表统计,USE_RAGESEC 的 final/非 final 两种注册只计一次;被 /* */ 或 // 注释掉的注册不计。证据为第 6.4 节各表所附的行号区间。
6.3 跨模式观察#
- 同一系统在多个模式重复初始化是常态:
fwClipSetManager、audNorthAudioEngine、CGtaAnimManager、CNetwork、CVehiclePopulation、CVisualEffects等在 CORE、地图前/后、SESSION 中多次注册,各自的Init(mode)内部按模式分派(见下表行号)。 - 流式系统的初始化不在
INIT_CORE里:INIT_CORE中CStreaming::Init的注册被注释掉(src/dev_ng/game/Core/game.cpp:1731),改为PreLoadingScreensInit直接调用CStreaming::Init(INIT_CORE);INIT_SESSION级别 1 再以CStreaming::Init打头,注释“streaming has to be done first since lots of systems depend on it”,且CVehicleRecordingMgr::Init必须更早(要在流式注册录像文件之前)src/dev_ng/game/Core/game.cpp:2283-2290。 CStreaming::Shutdown在三个关闭模式中都位于高级别:SHUTDOWN_COREL4、SHUTDOWN_WITH_MAP_LOADEDL4、SHUTDOWN_SESSIONL5(注释“systems at a lower dependency need to use the streaming system to shutdown”),其后才释放 Txd/Cloth 存储src/dev_ng/game/Core/game.cpp:2091-2094、src/dev_ng/game/Core/game.cpp:2263-2276、src/dev_ng/game/Core/game.cpp:2616-2630。- 世界实体的拆除分三段:
CGameWorld::Shutdown1(会话关闭 L2,删除 ped 等;CPickupManager::Shutdown紧随其后)、Shutdown2(关卡关闭 L2)、Shutdown3(关卡关闭 L4)src/dev_ng/game/Core/game.cpp:2532-2533、src/dev_ng/game/Core/game.cpp:2253、src/dev_ng/game/Core/game.cpp:2274。 - 安全模块:
USE_RAGESEC时rageSecEngine/rageSecGamePluginManager在INIT_COREL3 注册、rageSecEngine::Shutdown在SHUTDOWN_COREL3,TamperActions在INIT_COREL3 与COMMON_MAIN_UPDATE;其内部逻辑见 ../23-debug-security/security-overview.md。 - 疑似笔误:
GEN9_STANDALONE_ENABLED下,SHUTDOWN_CORE用REGISTER_SHUTDOWN_CALL(CLandingPage::Init, ...)注册了Init而不是关闭函数src/dev_ng/game/Core/game.cpp:2038。由于SHUTDOWN_CORE == INIT_CORE == 1,关闭时CLandingPage::Init会收到与核心初始化相同的模式值。这表明此处可能是复制粘贴错误(没有运行验证)。
6.4 逐模式明细#
下表由源码逐行整理:“系统名”是传给 atHashString 的名字(gameSkeleton 用它去重),“回调”是被调用的函数,“条件编译”为包裹该行的 #if 条件或 NOTFINAL_ONLY/FINAL_DISPLAY_BAR_ONLY 宏,“行”是 src/dev_ng/game/Core/game.cpp 中的行号(每个级别块的引用链接覆盖该块所有行)。同一级别内的顺序即执行顺序。
INIT_CORE(CGame::RegisterCoreInitFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:1723-1910。
依赖级别 1(src/dev_ng/game/Core/game.cpp:1728-1824)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | InitSystem | CDebug::InitSystem | 1730 | |
| 2 | CShaderLib | CShaderLib::InitTxd | 1732 | |
| 3 | PostFX | PostFX::Init | 1733 | |
| 4 | CGtaAnimManager | CGtaAnimManager::Init | 1734 | |
| 5 | fwClipSetManager | fwClipSetManager::Init | 1735 | |
| 6 | fwExpressionSetManager | fwExpressionSetManager::Init | 1736 | |
| 7 | fwFacialClipSetGroupManager | fwFacialClipSetGroupManager::Init | 1737 | |
| 8 | audNorthAudioEngine | audNorthAudioEngine::Init | 1738 | |
| 9 | CCheat | CCheat::Init | 1739 | |
| 10 | CClock | CClock::Init | 1740 | |
| 11 | CCullZones | CCullZones::Init | 1741 | |
| 12 | CExpensiveProcessDistributer | CExpensiveProcessDistributer::Init | 1742 | |
| 13 | CGameLogic | CGameLogic::Init | 1743 | |
| 14 | CGen9ExclusiveAssets | CGen9ExclusiveAssets::Init | 1744 | |
| 15 | CutSceneManagerWrapper | CutSceneManagerWrapper::Init | 1746 | |
| 16 | CAnimSceneManager | CAnimSceneManager::Init | 1747 | |
| 17 | CNodeViewer | CNodeViewer::Init | __BANK | 1749 |
| 18 | CStreamGraph | CStreamGraph::Init | __BANK | 1750 |
| 19 | CPortalTracker | CPortalTracker::Init | 1752 | |
| 20 | CNetwork | CNetwork::Init | 1753 | |
| 21 | CObjectPopulationNY | CObjectPopulationNY::Init | 1755 | |
| 22 | COcclusion | COcclusion::Init | 1756 | |
| 23 | CPicker | g_PickerManager.StaticInit | __BANK | 1758 |
| 24 | CPlantMgr | CPlantMgr::Init | 1760 | |
| 25 | CShaderHairSort | CShaderHairSort::Init | 1761 | |
| 26 | CNetworkTelemetry | CNetworkTelemetry::Init | 1762 | |
| 27 | CNetworkDebugTelemetry | CNetworkDebugTelemetry::Init | !__FINAL | 1763 |
| 28 | CPopulationStreamingWrapper | CPopulationStreamingWrapper::Init | 1764 | |
| 29 | CRenderer | CRenderer::Init | 1765 | |
| 30 | CReplayMgr | CReplayMgr::InitSession | GTA_REPLAY | 1767 |
| 31 | CContentExport | CContentExport::Init | RSG_ORBIS | 1771 |
| 32 | CContentSearch | CContentSearch::Init | RSG_ORBIS | 1772 |
| 33 | CContentDelete | CContentDelete::Init | RSG_ORBIS | 1773 |
| 34 | VideoRecording | VideoRecording::Init | VIDEO_RECORDING_ENABLED | 1777 |
| 35 | fwGreatestMoments | fwGreatestMoment::Init | GREATEST_MOMENTS_ENABLED | 1781 |
| 36 | VideoPlayback | VideoPlayback::Init | defined(VIDEO_PLAYBACK_ENABLED) && VIDEO_PLAYBACK_ENABLED | 1785 |
| 37 | VideoPlaybackThumbnailManager | VideoPlaybackThumbnailManager::Init | defined(VIDEO_PLAYBACK_ENABLED) && VIDEO_PLAYBACK_ENABLED | 1786 |
| 38 | CSectorTools | CSectorTools::Init | (SECTOR_TOOLS_EXPORT) | 1790 |
| 39 | CSaveMigration | CSaveMigration::Init | 1792 | |
| 40 | CStatsMgr | CStatsMgr::Init | 1793 | |
| 41 | CFrontendStatsMgr | CFrontendStatsMgr::Init | 1794 | |
| 42 | CControllerLabelMgr | CControllerLabelMgr::Init | 1795 | |
| 43 | CStuntJumpManager | CStuntJumpManager::Init | 1796 | |
| 44 | CTheScripts | CTheScripts::Init | 1797 | |
| 45 | CScriptAreas | CScriptAreas::Init | 1798 | |
| 46 | CScriptDebug | CScriptDebug::Init | 1799 | |
| 47 | CScriptHud | CScriptHud::Init | 1800 | |
| 48 | CScriptPedAIBlips | CScriptPedAIBlips::Init | 1801 | |
| 49 | CTrain | CTrain::Init | 1802 | |
| 50 | CWaypointRecording | CWaypointRecording::Init | 1803 | |
| 51 | CVehicleDeformation | CVehicleDeformation::TexCacheInit | !GPU_DAMAGE_WRITE_ENABLED | 1805 |
| 52 | CVehicleRecordingMgr | CVehicleRecordingMgr::Init | 1807 | |
| 53 | CTaskClassInfoManager | CTaskClassInfoManager::Init | 1808 | |
| 54 | CTuningManager | CTuningManager::Init | 1809 | |
| 55 | CAppDataMgr | CAppDataMgr::Init | 1810 | |
| 56 | CNetRespawnMgr | CNetRespawnMgr::Init | 1811 | |
| 57 | CAgitatedManager | CAgitatedManager::Init | 1812 | |
| 58 | CScenarioActionManager | CScenarioActionManager::Init | 1813 | |
| 59 | CVehiclePopulation | CVehiclePopulation::Init | 1814 | |
| 60 | CPostScan | CPostScan::Init | 1815 | |
| 61 | CExtraMetadataMgr | CExtraMetadataMgr::ClassInit | 1816 | |
| 62 | BackgroundScripts | BackgroundScripts::InitClass | 1817 | |
| 63 | CIplCullBox | CIplCullBox::Initialise | 1818 | |
| 64 | perfClearingHouse | perfClearingHouse::Initialize | 1819 | |
| 65 | CLandingPage | CLandingPage::Init | GEN9_STANDALONE_ENABLED | 1821 |
| 66 | CCriminalCareerServiceWrapper | CCriminalCareerServiceWrapper::Init | GEN9_STANDALONE_ENABLED | 1823 |
| 67 | CUserEntitlementServiceWrapper | CUserEntitlementServiceWrapper::Init | GEN9_STANDALONE_ENABLED | 1824 |
依赖级别 2(src/dev_ng/game/Core/game.cpp:1828-1844)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CScene | CScene::Init | 1831 | |
| 2 | MeshBlendManager | MeshBlendManager::Init | 1832 | |
| 3 | CVisualEffects | CVisualEffects::Init | 1833 | |
| 4 | ViewportSystemInit | ViewportSystemInit | 1834 | |
| 5 | CPhoneMgr | CPhoneMgr::Init | 1835 | |
| 6 | CPhotoManager | CPhotoManager::Init | 1836 | |
| 7 | CVolumeManager | CVolumeManager::Init | VOLUME_SUPPORT | 1838 |
| 8 | CLODLightManager | CLODLightManager::Init | 1840 | |
| 9 | CLODLights | CLODLights::Init | 1841 | |
| 10 | AmbientLights | AmbientLights::Init | 1842 | |
| 11 | CGps | CGps::Init | 1843 | |
| 12 | CPedAILodManager | CPedAILodManager::Init | 1844 |
依赖级别 3(src/dev_ng/game/Core/game.cpp:1847-1906)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CPauseMenu | CPauseMenu::Init | 1849 | |
| 2 | cStoreScreenMgr | cStoreScreenMgr::Init | 1850 | |
| 3 | CVideoEditorUi | CVideoEditorUi::Init | GTA_REPLAY | 1852 |
| 4 | WatermarkRenderer | WatermarkRenderer::Init | GTA_REPLAY | 1853 |
| 5 | CMousePointer | CMousePointer::Init | RSG_PC | 1856 |
| 6 | CTextInputBox | CTextInputBox::Init | RSG_PC | 1857 |
| 7 | TamperActions | TamperActions::Init | TAMPERACTIONS_ENABLED | 1860 |
| 8 | CMiniMap | CMiniMap::Init | 1863 | |
| 9 | CNewHud | CNewHud::Init | 1864 | |
| 10 | CHudMarkerManager | CHudMarkerManager::Init | 1865 | |
| 11 | WarningScreen | CWarningScreen::Init | 1866 | |
| 12 | CBusySpinner | CBusySpinner::Init | 1867 | |
| 13 | camManager | camManager::Init | 1868 | |
| 14 | CDLCScript | CDLCScript::Init | 1869 | |
| 15 | CGameStreamMgr | CGameStreamMgr::Init | 1874 | |
| 16 | CDebug | CDebug::Init | !__FINAL | 1877 |
| 17 | CDebugProfiler | CDebug::InitProfiler | !__FINAL | 1878 |
| 18 | CDebugBar | CDebugBar::Init | FINAL_DISPLAY_BAR | 1880 |
| 19 | EndUserBenchmarks | EndUserBenchmarks::Init | COLLECT_END_USER_BENCHMARKS | 1883 |
| 20 | Marketing Tools | CMarketingTools::Init | __BANK | 1887 |
| 21 | fwMetaDataStore | fwMetaDataStore::Init | 1889 | |
| 22 | CDebugVideoEditorScreen | CDebugVideoEditorScreen::Init | GTA_REPLAY && __BANK | 1893 |
| 23 | CReplayCoordinator | CReplayCoordinator::Init | GTA_REPLAY | 1895 |
| 24 | CVideoEditorInterface | CVideoEditorInterface::Init | GTA_REPLAY | 1896 |
| 25 | UI3DDrawManager | UI3DDrawManager::ClassInit | 1899 | |
| 26 | (安全模块) | rageSecEngine::Init | USE_RAGESEC | 1905 |
| 27 | (安全模块) | rageSecGamePluginManager::Init | USE_RAGESEC | 1906 |
SHUTDOWN_CORE(CGame::RegisterCoreShutdownFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:1912-2095。
依赖级别 1(src/dev_ng/game/Core/game.cpp:1917-2040)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CExtraContentWrapper::ShutdownStart | CExtraContentWrapper::ShutdownStart | 1919 | |
| 2 | BackgroundScripts | BackgroundScripts::ShutdownClass | 1920 | |
| 3 | CExtraMetadataMgr | CExtraMetadataMgr::ClassShutdown | 1921 | |
| 4 | CPostScan | CPostScan::Shutdown | 1922 | |
| 5 | CVehiclePopulation | CVehiclePopulation::Shutdown | 1923 | |
| 6 | CSectorTools | CSectorTools::Shutdown | (SECTOR_TOOLS_EXPORT) | 1925 |
| 7 | fwClipSetManager | fwClipSetManager::Shutdown | 1927 | |
| 8 | fwExpressionSetManager | fwExpressionSetManager::Shutdown | 1928 | |
| 9 | fwFacialClipSetGroupManager | fwFacialClipSetGroupManager::Shutdown | 1929 | |
| 10 | CGen9ExclusiveAssets | CGen9ExclusiveAssets::Shutdown | 1930 | |
| 11 | CAnimSceneManager | CAnimSceneManager::Shutdown | 1931 | |
| 12 | camManager | camManager::Shutdown | 1932 | |
| 13 | CutSceneManager | CutSceneManagerWrapper::Shutdown | 1933 | |
| 14 | CCredits | CCredits::Shutdown | 1934 | |
| 15 | CExplosionManager | CExplosionManager::Shutdown | 1935 | |
| 16 | CGenericGameStorage | CGenericGameStorage::Shutdown | 1936 | |
| 17 | CLoadingScreens | CLoadingScreens::Shutdown | 1937 | |
| 18 | CMessages | CMessages::Shutdown | 1938 | |
| 19 | CNetwork | CNetwork::Shutdown | 1939 | |
| 20 | CNodeViewer | CNodeViewer::Shutdown | __BANK | 1941 |
| 21 | CStreamGraph | CStreamGraph::Shutdown | __BANK | 1942 |
| 22 | CPortalTracker | CPortalTracker::ShutDown | 1944 | |
| 23 | CMovieMeshManager | CMovieMeshManager::Shutdown | 1945 | |
| 24 | CObjectPopulationNY | CObjectPopulationNY::Shutdown | 1946 | |
| 25 | COcclusion | COcclusion::Shutdown | 1947 | |
| 26 | CPhoneMgr | CPhoneMgr::Shutdown | 1948 | |
| 27 | CPhotoManager | CPhotoManager::Shutdown | 1949 | |
| 28 | CPlantMgr | CPlantMgr::Shutdown | 1950 | |
| 29 | CNetworkTelemetry | CNetworkTelemetry::Shutdown | 1951 | |
| 30 | CNetworkDebugTelemetry | CNetworkDebugTelemetry::Shutdown | !__FINAL | 1952 |
| 31 | CSprite2d | CSprite2d::Shutdown | 1953 | |
| 32 | CSaveMigration | CSaveMigration::Shutdown | 1954 | |
| 33 | CStatsMgr | CStatsMgr::Shutdown | 1955 | |
| 34 | CFrontendStatsMgr | CFrontendStatsMgr::Shutdown | 1956 | |
| 35 | CStuntJumpManager | CStuntJumpManager::Shutdown | 1957 | |
| 36 | CTheScripts | CTheScripts::Shutdown | 1958 | |
| 37 | CScriptAreas | CScriptAreas::Shutdown | 1959 | |
| 38 | CScriptDebug | CScriptDebug::Shutdown | 1960 | |
| 39 | CScriptHud | CScriptHud::Shutdown | 1961 | |
| 40 | CScriptPedAIBlips | CScriptPedAIBlips::Shutdown | 1962 | |
| 41 | CVehicleDeformation | CVehicleDeformation::TexCacheShutdown | !GPU_DAMAGE_WRITE_ENABLED | 1966 |
| 42 | CVisualEffects | CVisualEffects::Shutdown | 1968 | |
| 43 | VideoRecording | VideoRecording::Shutdown | VIDEO_RECORDING_ENABLED | 1971 |
| 44 | fwGreatestMoments | fwGreatestMoment::Shutdown | GREATEST_MOMENTS_ENABLED | 1975 |
| 45 | VideoPlayback | VideoPlayback::Shutdown | defined(VIDEO_PLAYBACK_ENABLED) && VIDEO_PLAYBACK_ENABLED | 1979 |
| 46 | VideoPlaybackThumbnailManager | VideoPlaybackThumbnailManager::Shutdown | defined(VIDEO_PLAYBACK_ENABLED) && VIDEO_PLAYBACK_ENABLED | 1980 |
| 47 | CContentExport | CContentExport::Shutdown | RSG_ORBIS | 1984 |
| 48 | CContentSearch | CContentSearch::Shutdown | RSG_ORBIS | 1985 |
| 49 | CContentDelete | CContentDelete::Shutdown | RSG_ORBIS | 1986 |
| 50 | CReplayMgr | CReplayMgr::ShutdownSession | GTA_REPLAY | 1989 |
| 51 | CVolumeManager | CVolumeManager::Shutdown | VOLUME_SUPPORT | 1993 |
| 52 | ViewportSystemShutdown | ViewportSystemShutdown | 1995 | |
| 53 | CRenderer | CRenderer::Shutdown | 1996 | |
| 54 | CBusySpinner | CBusySpinner::Shutdown | 1997 | |
| 55 | CNewHud | CNewHud::Shutdown | 1998 | |
| 56 | CMiniMap | CMiniMap::Shutdown | 1999 | |
| 57 | CHudMarkerManager | CHudMarkerManager::Shutdown | 2000 | |
| 58 | CGameStreamMgr | CGameStreamMgr::Shutdown | 2001 | |
| 59 | CMultiplayerChat | CMultiplayerChat::Shutdown | RSG_PC | 2003 |
| 60 | CMousePointer | CMousePointer::Shutdown | RSG_PC | 2004 |
| 61 | CTextInputBox | CTextInputBox::Shutdown | RSG_PC | 2005 |
| 62 | CVideoEditorUi | CVideoEditorUi::Shutdown | GTA_REPLAY | 2008 |
| 63 | WatermarkRenderer | WatermarkRenderer::Shutdown | GTA_REPLAY | 2009 |
| 64 | CPauseMenu | CPauseMenu::Shutdown | 2011 | |
| 65 | cStoreScreenMgr | cStoreScreenMgr::Shutdown | 2012 | |
| 66 | CVehicleRecordingMgr | CVehicleRecordingMgr::Shutdown | 2013 | |
| 67 | CWaypointRecording | CWaypointRecording::Shutdown | 2014 | |
| 68 | CTaskClassInfoManager | CTaskClassInfoManager::Shutdown | 2015 | |
| 69 | CTuningManager | CTuningManager::Shutdown | 2016 | |
| 70 | CAppDataMgr | CAppDataMgr::Shutdown | 2017 | |
| 71 | CNetRespawnMgr | CNetRespawnMgr::Shutdown | 2018 | |
| 72 | CAgitatedManager | CAgitatedManager::Shutdown | 2019 | |
| 73 | CScenarioActionManager | CScenarioActionManager::Shutdown | 2020 | |
| 74 | CDebugVideoEditorScreen | CDebugVideoEditorScreen::Shutdown | GTA_REPLAY && __BANK | 2024 |
| 75 | CReplayCoordinator | CReplayCoordinator::Shutdown | GTA_REPLAY | 2026 |
| 76 | CVideoEditorInterface | CVideoEditorInterface::Shutdown | GTA_REPLAY | 2027 |
| 77 | UI3DDrawManager | UI3DDrawManager::ClassShutdown | 2030 | |
| 78 | audNorthAudioEngine | audNorthAudioEngine::Shutdown | 2032 | |
| 79 | CEntitlementManager | CEntitlementManager::Shutdown | RSG_ENTITLEMENT_ENABLED | 2035 |
| 80 | CLandingPage | CLandingPage::Init | GEN9_STANDALONE_ENABLED | 2038 |
| 81 | CCriminalCareerServiceWrapper | CCriminalCareerServiceWrapper::Shutdown | GEN9_STANDALONE_ENABLED | 2039 |
| 82 | CUserEntitlementServiceWrapper | CUserEntitlementServiceWrapper::Shutdown | GEN9_STANDALONE_ENABLED | 2040 |
依赖级别 2(src/dev_ng/game/Core/game.cpp:2044-2055)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CGameWorldHeightMap | CGameWorldHeightMap::Shutdown | 2046 | |
| 2 | CGameWorldWaterHeight | CGameWorldWaterHeight::Shutdown | 2047 | |
| 3 | CText | CText::Shutdown | 2049 | |
| 4 | CScene | CScene::Shutdown | 2050 | |
| 5 | MeshBlendManager | MeshBlendManager::Shutdown | 2051 | |
| 6 | CStreamingRequestList | CStreamingRequestList::Shutdown | 2052 | |
| 7 | CGps | CGps::Shutdown | 2054 | |
| 8 | CPedAILodManager | CPedAILodManager::Shutdown | 2055 |
依赖级别 3(src/dev_ng/game/Core/game.cpp:2060-2088)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CTextTemplate | CTextTemplate::CoreShutdown | GTA_REPLAY | 2063 |
| 2 | CScaleformMgr | CScaleformMgr::Shutdown | 2065 | |
| 3 | EndUserBenchmarks | EndUserBenchmarks::Shutdown | COLLECT_END_USER_BENCHMARKS | 2068 |
| 4 | (安全模块) | rageSecEngine::Shutdown | USE_RAGESEC | 2075 |
| 5 | CDebug | CDebug::Shutdown | !__FINAL | 2079 |
| 6 | fwMetaDataStore | fwMetaDataStore::ShutdownSystem | 2081 | |
| 7 | CGtaAnimManager | CGtaAnimManager::Shutdown | 2082 | |
| 8 | fwDwdStoreWrapper | fwDwdStoreWrapper::Shutdown | 2083 | |
| 9 | fwDrawawableStoreWrapper | fwDrawableStoreWrapper::Shutdown | 2084 | |
| 10 | fwFragmentStoreWrapper | fwFragmentStoreWrapper::Shutdown | 2085 | |
| 11 | fwTxdStore | fwTxdStoreWrapper::Shutdown | 2086 | |
| 12 | fwClothStore | fwClothStoreWrapper::Shutdown | 2087 | |
| 13 | CExtraContentWrapper::Shutdown | CExtraContentWrapper::Shutdown | 2088 |
依赖级别 4(src/dev_ng/game/Core/game.cpp:2091-2093)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CStreaming | CStreaming::Shutdown | 2093 |
INIT_BEFORE_MAP_LOADED(CGame::RegisterBeforeMapLoadedInitFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:2097-2144。
依赖级别 1(src/dev_ng/game/Core/game.cpp:2101-2142)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CBlockView | CBlockView::Init | !__FINAL | 2104 |
| 2 | CGtaAnimManager | CGtaAnimManager::Init | 2107 | |
| 3 | CGameWorld | CGameWorld::Init | 2108 | |
| 4 | CGarages | CGarages::Init | 2109 | |
| 5 | CHandlingDataMgr | CHandlingDataMgr::Init | 2110 | |
| 6 | INSTANCESTORE | CInstanceStoreWrapper::Init | 2111 | |
| 7 | CMapAreas | CMapAreas::Init | 2112 | |
| 8 | fwMapTypesStore | CMapTypesStoreWrapper::Init | 2113 | |
| 9 | CModelInfo | CModelInfo::Init | 2114 | |
| 10 | CPatrolRoutes | CPatrolRoutes::Init | 2115 | |
| 11 | CPopZones | CPopZones::Init | 2116 | |
| 12 | CMapZoneManager | CMapZoneManager::Init | 2117 | |
| 13 | CPhysics | CPhysics::Init | 2118 | |
| 14 | CTrain | CTrain::Init | 2119 | |
| 15 | Water | Water::Init | 2120 | |
| 16 | COcclusion | COcclusion::Init | 2121 | |
| 17 | fwClipSetManager | fwClipSetManager::Init | 2122 | |
| 18 | fwExpressionSetManager | fwExpressionSetManager::Init | 2123 | |
| 19 | fwFacialClipSetGroupManager | fwFacialClipSetGroupManager::Init | 2124 | |
| 20 | CTVPlaylistManager | CTVPlaylistManager::Init | 2126 | |
| 21 | CAmbientModelSetManager | CAmbientModelSetManager::InitClass | 2128 | |
| 22 | CLadderMetadataManager | CLadderMetadataManager::Init | 2129 | |
| 23 | CScenarioManager | CScenarioManager::Init | 2130 | |
| 24 | CConditionalAnimManager | CConditionalAnimManager::Init | 2131 | |
| 25 | CVehicleMetadataMgr | CVehicleMetadataMgr::Init | 2132 | |
| 26 | CRandomEventManager | CRandomEventManager::Init | 2134 | |
| 27 | CCrimeInformationManager | CCrimeInformationManager::Init | 2135 | |
| 28 | CWitnessInformationManager | CWitnessInformationManager::Init | 2136 | |
| 29 | CPortal | CPortal::Init | 2138 | |
| 30 | LightEntityMgr | LightEntityMgr::Init | 2139 | |
| 31 | AnimBlackboard | CAnimBlackboard::Init | 2140 | |
| 32 | CPathServer::InitBeforeMapLoaded | CPathServer::InitBeforeMapLoaded | 2142 |
INIT_AFTER_MAP_LOADED(CGame::RegisterAfterMapLoadedInitFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:2146-2200。
依赖级别 1(src/dev_ng/game/Core/game.cpp:2150-2189)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | audNorthAudioEngine | audNorthAudioEngine::Init | 2152 | |
| 2 | CClock | CClock::Init | 2153 | |
| 3 | CEventDataManager | CEventDataManager::Init | 2154 | |
| 4 | CHandlingDataMgr | CHandlingDataMgr::Init | 2155 | |
| 5 | CMapAreas | CMapAreas::Init | 2156 | |
| 6 | CPed | CPed::Init | 2157 | |
| 7 | CPopCycle | CPopCycle::Init | 2158 | |
| 8 | CPopZones | CPopZones::Init | 2159 | |
| 9 | CMapZoneManager | CMapZoneManager::Init | 2160 | |
| 10 | CPopulationStreamingWrapper | CPopulationStreamingWrapper::Init | 2161 | |
| 11 | CStatsMgr | CStatsMgr::Init | 2165 | |
| 12 | CStreamingRequestList | CStreamingRequestList::Init | 2166 | |
| 13 | CTask | CTask::Init | 2167 | |
| 14 | CTrain | CTrain::Init | 2168 | |
| 15 | CVehicleModelInfo | CVehicleModelInfo::InitClass | 2169 | |
| 16 | CVehiclePopulation | CVehiclePopulation::Init | 2170 | |
| 17 | Water | Water::Init | 2171 | |
| 18 | CGameWorldHeightMap | CGameWorldHeightMap::Init | 2172 | |
| 19 | CGameWorldWaterHeight | CGameWorldWaterHeight::Init | 2173 | |
| 20 | CAmbientAnimationManager | CAmbientAnimationManager::Init | 2174 | |
| 21 | CAmbientAudioManager | CAmbientAudioManager::Init | 2175 | |
| 22 | CNetwork | CNetwork::Init | 2176 | |
| 23 | fwClipSetManager | fwClipSetManager::Init | 2177 | |
| 24 | fwAnimDirector | fwAnimDirector::InitStatic | 2178 | |
| 25 | fwExpressionSetManager | fwExpressionSetManager::Init | 2179 | |
| 26 | fwFacialClipSetGroupManager | fwFacialClipSetGroupManager::Init | 2180 | |
| 27 | CThePopMultiplierAreas | CThePopMultiplierAreas::Init | 2181 | |
| 28 | MeshBlendManager | MeshBlendManager::Init | 2182 | |
| 29 | CPlantTuning | CPlantTuning::Init | NORTH_CLOTHS | 2186 |
| 30 | CProceduralInfo | CProceduralInfoWrapper::Init | 2189 |
依赖级别 2(src/dev_ng/game/Core/game.cpp:2192-2198)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CVisualEffects | CVisualEffects::Init | 2194 | |
| 2 | CVolumeManager | CVolumeManager::Init | VOLUME_SUPPORT | 2196 |
| 3 | CPedModelInfo | CPedModelInfo::InitClass | 2198 |
SHUTDOWN_WITH_MAP_LOADED(CGame::RegisterAfterMapLoadedShutdownFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:2202-2277。
依赖级别 1(src/dev_ng/game/Core/game.cpp:2206-2246)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CDLCScript | CDLCScript::Shutdown | 2208 | |
| 2 | CStatsMgr | CStatsMgr::Shutdown | 2209 | |
| 3 | CNetwork | CNetwork::Shutdown | 2210 | |
| 4 | CPhysics | CPhysics::Shutdown | 2211 | |
| 5 | fwClipSetManager | fwClipSetManager::Shutdown | 2213 | |
| 6 | fwAnimDirector | fwAnimDirector::ShutdownStatic | 2214 | |
| 7 | CVisualEffects | CVisualEffects::Shutdown | 2215 | |
| 8 | CVolumeManager | CVolumeManager::Shutdown | VOLUME_SUPPORT | 2217 |
| 9 | CVehiclePopulation | CVehiclePopulation::Shutdown | 2219 | |
| 10 | CTrain | CTrain::Shutdown | 2220 | |
| 11 | CReplayMgr | CReplayMgr::ShutdownSession | GTA_REPLAY | 2222 |
| 12 | CPedVariationPack | CPedVariationPack::Shutdown | 2227 | |
| 13 | CPedModelInfo | CPedModelInfo::ShutdownClass | 2228 | |
| 14 | CHandlingDataMgr | CHandlingDataMgr::Shutdown | 2230 | |
| 15 | CEventDataManager | CEventDataManager::Shutdown | 2231 | |
| 16 | CGtaAnimManager | CGtaAnimManager::Shutdown | 2232 | |
| 17 | CAmbientAudioManager | CAmbientAudioManager::Shutdown | 2233 | |
| 18 | CAmbientAnimationManager | CAmbientAnimationManager::Shutdown | 2234 | |
| 19 | CWitnessInformationManager | CWitnessInformationManager::Shutdown | 2235 | |
| 20 | CCrimeInformationManager | CCrimeInformationManager::Shutdown | 2236 | |
| 21 | CRandomEventManager | CRandomEventManager::Shutdown | 2237 | |
| 22 | CAmbientModelSetManager | CAmbientModelSetManager::ShutdownClass | 2238 | |
| 23 | CLadderMetadataManager | CLadderMetadataManager::Shutdown | 2239 | |
| 24 | CConditionalAnimManager | CConditionalAnimManager::Shutdown | 2240 | |
| 25 | camManager | camManager::Shutdown | 2241 | |
| 26 | audNorthAudioEngine | audNorthAudioEngine::Shutdown | 2242 | |
| 27 | Water | Water::Shutdown | 2243 | |
| 28 | CVehicleRecordingMgr | CVehicleRecordingMgr::Shutdown | 2244 | |
| 29 | CPopulationStreamingWrapper | CPopulationStreamingWrapper::Shutdown | 2245 | |
| 30 | CAnimBlackboard | CAnimBlackboard::Shutdown | 2246 |
依赖级别 2(src/dev_ng/game/Core/game.cpp:2249-2253)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CVehicleMetadataMgr | CVehicleMetadataMgr::Shutdown | 2251 | |
| 2 | CVehicleModelInfo | CVehicleModelInfo::ShutdownClass | 2252 | |
| 3 | CGameWorld 2 | CGameWorld::Shutdown2 | 2253 |
依赖级别 3(src/dev_ng/game/Core/game.cpp:2256-2260)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CModelInfo | CModelInfo::Shutdown | 2258 | |
| 2 | CScenarioManager | CScenarioManager::Shutdown | 2259 | |
| 3 | CTask | CTask::Shutdown | 2260 |
依赖级别 4(src/dev_ng/game/Core/game.cpp:2263-2275)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | INSTANCESTORE 2 | CInstanceStoreWrapper::Shutdown2 | 2265 | |
| 2 | fwMapTypesStore 2 | CMapTypesStoreWrapper::Shutdown2 | 2266 | |
| 3 | fwDrawawableStoreWrapper | fwDrawableStoreWrapper::Shutdown | 2267 | |
| 4 | fwFragmentStoreWrapper | fwFragmentStoreWrapper::Shutdown | 2268 | |
| 5 | fwDwdStore | fwDwdStoreWrapper::Shutdown | 2269 | |
| 6 | CBlockView | CBlockView::Shutdown | !__FINAL | 2271 |
| 7 | fwTxdStore | fwTxdStoreWrapper::Shutdown | 2273 | |
| 8 | CGameWorld 3 | CGameWorld::Shutdown3 | 2274 | |
| 9 | CStreaming | CStreaming::Shutdown | 2275 |
INIT_SESSION(CGame::RegisterSessionInitFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:2279-2437。
依赖级别 1(src/dev_ng/game/Core/game.cpp:2283-2289)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CVehicleRecordingMgr | CVehicleRecordingMgr::Init | 2285 | |
| 2 | CStreaming | CStreaming::Init | 2286 | |
| 3 | CFocusEntityMgr | CFocusEntityMgr::Init | 2287 | |
| 4 | audNorthAudioEngine | audNorthAudioEngine::Init | 2288 | |
| 5 | CGtaAnimManager | CGtaAnimManager::Init | 2289 |
依赖级别 2(src/dev_ng/game/Core/game.cpp:2292-2402)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CModelInfo::Init | CModelInfo::Init | 2294 | |
| 2 | CInstanceListAssetLoader::Init | CInstanceListAssetLoader::Init | KEEP_INSTANCELIST_ASSETS_RESIDENT | 2297 |
| 3 | CTask | CTask::Init | 2300 | |
| 4 | CScenarioPointManagerInitSession | CScenarioPointManager::InitSession | 2301 | |
| 5 | CRenderPhaseCascadeShadowsInterface | CRenderPhaseCascadeShadowsInterface::Init_ | 2302 | |
| 6 | fwAnimDirector | fwAnimDirector::InitStatic | 2303 | |
| 7 | fwClipSetManager | fwClipSetManager::Init | 2304 | |
| 8 | fwExpressionSetManager | fwExpressionSetManager::Init | 2305 | |
| 9 | fwFacialClipSetGroupManager | fwFacialClipSetGroupManager::Init | 2306 | |
| 10 | CTaskRecover | CTaskGetUp::InitMetadata | 2307 | |
| 11 | CTargetSequenceManager | CTargetSequenceManager::InitMetadata | USE_TARGET_SEQUENCES | 2309 |
| 12 | camManager | camManager::Init | 2311 | |
| 13 | CAssistedMovementRouteStore | CAssistedMovementRouteStore::Init | 2312 | |
| 14 | CBuses | CBuses::Init | 2313 | |
| 15 | CCheat | CCheat::Init | 2314 | |
| 16 | CControlMgr | CControlMgr::Init | 2315 | |
| 17 | CGameLogic | CGameLogic::Init | 2316 | |
| 18 | CGameWorld | CGameWorld::Init | 2317 | |
| 19 | CGarages | CGarages::Init | 2318 | |
| 20 | CGps | CGps::Init | 2319 | |
| 21 | CJunctions | CJunctions::Init | 2320 | |
| 22 | CPathZoneManager | CPathZoneManager::Init | 2321 | |
| 23 | CMessages | CMessages::Init | 2322 | |
| 24 | CNetwork | CNetwork::Init | 2323 | |
| 25 | CObjectPopulationNY | CObjectPopulationNY::Init | 2324 | |
| 26 | CPathFind | CPathFindWrapper::Init | 2325 | |
| 27 | CPed | CPed::Init | 2326 | |
| 28 | CPedModelInfo | CPedModelInfo::InitClass | 2327 | |
| 29 | CPedPopulation | CPedPopulation::Init | 2328 | |
| 30 | CPerformance | CPerformance::Init | 2329 | |
| 31 | CPedAILodManager | CPedAILodManager::Init | 2330 | |
| 32 | CVehicleAILodManager | CVehicleAILodManager::Init | 2331 | |
| 33 | CPhoneMgr | CPhoneMgr::Init | 2332 | |
| 34 | CPhotoManager | CPhotoManager::Init | 2333 | |
| 35 | CPhysics | CPhysics::Init | 2334 | |
| 36 | CPicker | g_PickerManager.StaticInit | __BANK | 2336 |
| 37 | CPickupManager | CPickupManager::Init | 2338 | |
| 38 | CNetworkTelemetry | CNetworkTelemetry::Init | 2339 | |
| 39 | CNetworkDebugTelemetry | CNetworkDebugTelemetry::Init | !__FINAL | 2340 |
| 40 | CPopCycle | CPopCycle::Init | 2341 | |
| 41 | CProcObjectMan | CProcObjectManWrapper::Init | 2342 | |
| 42 | CReplayMgr | CReplayMgr::InitSession | GTA_REPLAY | 2347 |
| 43 | CRestart | CRestart::Init | 2349 | |
| 44 | CScaleformMgr | CScaleformMgr::Init | 2350 | |
| 45 | CSlownessZonesManager | CSlownessZoneManager::Init | 2351 | |
| 46 | CStreamingRequestList | CStreamingRequestList::Init | 2352 | |
| 47 | CStuntJumpManager | CStuntJumpManager::Init | 2353 | |
| 48 | CActionManager | CActionManager::Init | 2354 | |
| 49 | CRenderTargetMgr | CRenderTargetMgr::InitClass | 2355 | |
| 50 | CTheScripts | CTheScripts::Init | 2356 | |
| 51 | CScriptAreas | CScriptAreas::Init | 2357 | |
| 52 | CScriptCars | CScriptCars::Init | 2358 | |
| 53 | CScriptPeds | CScriptPeds::Init | 2359 | |
| 54 | CScriptEntities | CScriptEntities::Init | 2360 | |
| 55 | CScriptDebug | CScriptDebug::Init | 2361 | |
| 56 | CScriptHud | CScriptHud::Init | 2362 | |
| 57 | CScriptPedAIBlips | CScriptPedAIBlips::Init | 2363 | |
| 58 | CStatsMgr | CStatsMgr::Init | 2364 | |
| 59 | CTrain | CTrain::Init | 2365 | |
| 60 | CUserDisplay | CUserDisplay::Init | 2366 | |
| 61 | CVehiclePopulation | CVehiclePopulation::Init | 2367 | |
| 62 | CVisualEffects | CVisualEffects::Init | 2368 | |
| 63 | CVolumeManager | CVolumeManager::Init | VOLUME_SUPPORT | 2370 |
| 64 | CDispatchData | CDispatchData::Init | 2372 | |
| 65 | CRoadBlock | CRoadBlock::Init | 2373 | |
| 66 | CWeaponManager | CWeaponManager::Init | 2374 | |
| 67 | CScriptedGunTaskMetadataMgr | CScriptedGunTaskMetadataMgr::Init | 2375 | |
| 68 | CVehicleCombatAvoidanceArea | CVehicleCombatAvoidanceArea::Init | 2376 | |
| 69 | CCombatInfoMgr | CCombatInfoMgr::Init | 2377 | |
| 70 | CCombatDirector | CCombatDirector::Init | 2378 | |
| 71 | CVehicleChaseDirector | CVehicleChaseDirector::Init | 2379 | |
| 72 | CBoatChaseDirector | CBoatChaseDirector::Init | 2380 | |
| 73 | CTacticalAnalysis | CTacticalAnalysis::Init | 2381 | |
| 74 | CCoverFinder | CCoverFinder::Init | 2382 | |
| 75 | CWorldPoints | CWorldPoints::Init | 2383 | |
| 76 | fwTimer | CGame::TimerInit | 2384 | |
| 77 | PostFX | PostFX::Init | 2385 | |
| 78 | CRenderer | CRenderer::Init | 2386 | |
| 79 | ViewportSystemInitLevel | ViewportSystemInit | 2387 | |
| 80 | CGameSituation | CGameSituation::Init | 2388 | |
| 81 | CPrioritizedClipSetRequestManager | CPrioritizedClipSetRequestManager::Init | 2389 | |
| 82 | CPrioritizedClipSetStreamer | CPrioritizedClipSetStreamer::Init | 2390 | |
| 83 | CSituationalClipSetStreamer | CSituationalClipSetStreamer::Init | 2391 | |
| 84 | CClipDictionaryStoreInterface | CClipDictionaryStoreInterface::Init | 2392 | |
| 85 | CRiots | CRiots::Init | 2393 | |
| 86 | CCover | CCover::InitSession | 2394 | |
| 87 | CExtraMetadataMgr::ClassInit | CExtraMetadataMgr::ClassInit | 2395 | |
| 88 | BackgroundScripts | BackgroundScripts::InitClass | 2396 | |
| 89 | CAILogManager | CAILogManager::Init | AI_DEBUG_OUTPUT_ENABLED | 2398 |
| 90 | CJetpackManager | CJetpackManager::Init | ENABLE_JETPACK | 2402 |
依赖级别 3(src/dev_ng/game/Core/game.cpp:2406-2428)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CText | CText::Init | 2408 | |
| 2 | CMiniMap | CMiniMap::Init | 2409 | |
| 3 | CNewHud | CNewHud::Init | 2410 | |
| 4 | CHudMarkerManager | CHudMarkerManager::Init | 2411 | |
| 5 | CBusySpinner | CBusySpinner::Init | 2412 | |
| 6 | CMultiplayerChat | CMultiplayerChat::Init | RSG_PC | 2415 |
| 7 | CExplosionManager | CExplosionManager::Init | 2417 | |
| 8 | CPickupDataManager | CPickupDataManager::Init | 2418 | |
| 9 | CPopulationStreaming | CPopulationStreamingWrapper::Init | 2419 | |
| 10 | CDecoratorInterface | CDecoratorInterface::Init | 2420 | |
| 11 | CScenarioManager | CScenarioManager::Init | 2421 | |
| 12 | CGestureManager | CGestureManager::Init | 2422 | |
| 13 | CTexLod | CTexLod::InitSession | 2423 | |
| 14 | CPathServer::InitSession | CPathServer::InitSession | 2424 | |
| 15 | CPauseMenu | CPauseMenu::Init | 2425 | |
| 16 | CExtraContentWrapper | CExtraContentWrapper::Init | 2426 | |
| 17 | CDLCScript | CDLCScript::Init | 2427 | |
| 18 | audNorthAudioEngineDLC | audNorthAudioEngine::DLCInit | 2428 |
依赖级别 4(src/dev_ng/game/Core/game.cpp:2432-2434)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CScaleformMgr::PreallocTest | CScaleformMgr::PreallocTest | __DEV | 2434 |
SHUTDOWN_SESSION(CGame::RegisterSessionShutdownFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:2439-2631。
依赖级别 1(src/dev_ng/game/Core/game.cpp:2443-2461)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CExtraContentWrapper::ShutdownStart | CExtraContentWrapper::ShutdownStart | 2445 | |
| 2 | BackgroundScripts | BackgroundScripts::ShutdownClass | 2446 | |
| 3 | CDLCScript | CDLCScript::Shutdown | 2447 | |
| 4 | CStatsMgr | CStatsMgr::Shutdown | 2448 | |
| 5 | CCompEntity | CCompEntity::Shutdown | 2449 | |
| 6 | CProcObjectMan | CProcObjectManWrapper::Shutdown | 2450 | |
| 7 | audNorthAudioEngine | audNorthAudioEngine::Shutdown | 2451 | |
| 8 | decorators | decorator_commands::Shutdown | 2452 | |
| 9 | CConditionalAnimManager | CConditionalAnimManager::Shutdown | 2453 | |
| 10 | CAmbientModelSetManager | CAmbientModelSetManager::ShutdownClass | 2454 | |
| 11 | CScenarioPointManager | CScenarioPointManager::ShutdownSession | 2455 | |
| 12 | CPlayerSwitchDbg | CPlayerSwitchDbg::Shutdown | __BANK | 2458 |
| 13 | CPlayerSwitch | CPlayerSwitch::Shutdown | 2461 |
依赖级别 2(src/dev_ng/game/Core/game.cpp:2464-2566)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CAILogManager | CAILogManager::ShutDown | AI_DEBUG_OUTPUT_ENABLED | 2467 |
| 2 | CClipDictionaryStoreInterface | CClipDictionaryStoreInterface::Shutdown | 2469 | |
| 3 | CSituationalClipSetStreamer | CSituationalClipSetStreamer::Shutdown | 2470 | |
| 4 | CPrioritizedClipSetStreamer | CPrioritizedClipSetStreamer::Shutdown | 2471 | |
| 5 | CGameSituation | CGameSituation::Shutdown | 2472 | |
| 6 | ViewportSystemShutdownLevel | ViewportSystemShutdown | 2473 | |
| 7 | CWorldPoints | CWorldPoints::Shutdown | 2474 | |
| 8 | CWaypointRecording | CWaypointRecording::Shutdown | 2475 | |
| 9 | CVehiclePopulation | CVehiclePopulation::Shutdown | 2476 | |
| 10 | CVehicleModelInfo | CVehicleModelInfo::ShutdownClass | 2477 | |
| 11 | CPedVariationStream | CPedVariationStream::ShutdownSession | 2478 | |
| 12 | CutSceneManagerWrapper | CutSceneManagerWrapper::Shutdown | 2479 | |
| 13 | CRenderTargetMgr | CRenderTargetMgr::ShutdownClass | 2480 | |
| 14 | CTheScripts | CTheScripts::Shutdown | 2481 | |
| 15 | CScriptAreas | CScriptAreas::Shutdown | 2482 | |
| 16 | CScriptDebug | CScriptDebug::Shutdown | 2483 | |
| 17 | CScriptHud | CScriptHud::Shutdown | 2484 | |
| 18 | CScriptPedAIBlips | CScriptPedAIBlips::Shutdown | 2485 | |
| 19 | CStuntJumpManager | CStuntJumpManager::Shutdown | 2486 | |
| 20 | CStreamingRequestList | CStreamingRequestList::Shutdown | 2487 | |
| 21 | CRestart | CRestart::Shutdown | 2488 | |
| 22 | CRenderer | CRenderer::Shutdown | 2489 | |
| 23 | LightEntityMgr | LightEntityMgr::Shutdown | 2493 | |
| 24 | CPortal | CPortal::Shutdown | 2494 | |
| 25 | CPlayStats | CNetworkTelemetry::Shutdown | 2495 | |
| 26 | CNetworkDebugTelemetry | CNetworkDebugTelemetry::Shutdown | !__FINAL | 2496 |
| 27 | CPlantMgr | CPlantMgr::Shutdown | 2497 | |
| 28 | CPicker | g_PickerManager.StaticShutdown | __BANK | 2499 |
| 29 | CPhysics | CPhysics::Shutdown | 2501 | |
| 30 | CPhoneMgr | CPhoneMgr::Shutdown | 2502 | |
| 31 | CPhotoManager | CPhotoManager::Shutdown | 2503 | |
| 32 | CPerformance | CPerformance::Shutdown | 2504 | |
| 33 | CPedPopulation | CPedPopulation::Shutdown | 2505 | |
| 34 | CPedModelInfo | CPedModelInfo::ShutdownClass | 2506 | |
| 35 | CPedGeometryAnalyser | CPedGeometryAnalyser::Shutdown | 2507 | |
| 36 | CHandlingDataMgr | CHandlingDataMgr::Shutdown | 2508 | |
| 37 | CPatrolRoutes | CPatrolRoutes::Shutdown | 2509 | |
| 38 | CPathFind | CPathFindWrapper::Shutdown | 2510 | |
| 39 | CMovieMeshManager | CMovieMeshManager::Shutdown | 2511 | |
| 40 | CObjectPopulationNY | CObjectPopulationNY::Shutdown | 2512 | |
| 41 | CNetwork | CNetwork::Shutdown | 2513 | |
| 42 | CReplayMgr | CReplayMgr::ShutdownSession | GTA_REPLAY | 2515 |
| 43 | INSTANCESTORE 1 | CInstanceStoreWrapper::Shutdown1 | 2517 | |
| 44 | fwMapTypesStore 1 | CMapTypesStoreWrapper::Shutdown1 | 2518 | |
| 45 | CBusySpinner | CBusySpinner::Shutdown | 2520 | |
| 46 | CNewHud | CNewHud::Shutdown | 2521 | |
| 47 | CMiniMap | CMiniMap::Shutdown | 2522 | |
| 48 | CHudMarkerManager | CHudMarkerManager::Shutdown | 2523 | |
| 49 | CVideoEditorUi | CVideoEditorUi::Shutdown | GTA_REPLAY | 2525 |
| 50 | WatermarkRenderer | WatermarkRenderer::Shutdown | GTA_REPLAY | 2526 |
| 51 | CPauseMenu | CPauseMenu::Shutdown | 2528 | |
| 52 | cStoreScreenMgr | cStoreScreenMgr::Shutdown | 2529 | |
| 53 | CGenericGameStorage | CGenericGameStorage::Shutdown | 2530 | |
| 54 | CGarages | CGarages::Shutdown | 2531 | |
| 55 | CGameWorld 1 | CGameWorld::Shutdown1 | 2532 | |
| 56 | CPickupManager | CPickupManager::Shutdown | 2533 | |
| 57 | CGameLogic | CGameLogic::Shutdown | 2534 | |
| 58 | CCredits | CCredits::Shutdown | 2535 | |
| 59 | CBuses | CBuses::Shutdown | 2536 | |
| 60 | CAssistedMovementRouteStore | CAssistedMovementRouteStore::Shutdown | 2537 | |
| 61 | CAnimViewer | CAnimViewer::Shutdown | __BANK | 2539 |
| 62 | fwClipSetManager | fwClipSetManager::Shutdown | 2541 | |
| 63 | fwExpressionSetManager | fwExpressionSetManager::Shutdown | 2542 | |
| 64 | fwFacialClipSetGroupManager | fwFacialClipSetGroupManager::Shutdown | 2543 | |
| 65 | CTVPlaylistManager | CTVPlaylistManager::Shutdown | 2545 | |
| 66 | CLODLightManager | CLODLightManager::Shutdown | 2547 | |
| 67 | CLODLights | CLODLights::Shutdown | 2548 | |
| 68 | AmbientLights | AmbientLights::Shutdown | 2549 | |
| 69 | CTaskRecover | CTaskGetUp::ShutdownMetadata | 2551 | |
| 70 | CTargetSequenceManager | CTargetSequenceManager::ShutdownMetadata | USE_TARGET_SEQUENCES | 2553 |
| 71 | fwAnimDirector | fwAnimDirector::ShutdownStatic | 2555 | |
| 72 | camManager | camManager::Shutdown | 2556 | |
| 73 | CJunctions | CJunctions::Shutdown | 2557 | |
| 74 | CPadGestureMgr | CPadGestureMgr::Shutdown | __PPU | 2559 |
| 75 | CDebugScene | CDebugScene::ShutdownModelViewer | __DEV | 2562 |
| 76 | CRiots | CRiots::Shutdown | 2565 | |
| 77 | CPrioritizedClipSetRequestManager | CPrioritizedClipSetRequestManager::Shutdown | 2566 |
依赖级别 3(src/dev_ng/game/Core/game.cpp:2569-2602)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CVolumeManager | CVolumeManager::Shutdown | VOLUME_SUPPORT | 2572 |
| 2 | CVehicleRecordingMgr | CVehicleRecordingMgr::Shutdown | 2574 | |
| 3 | CVehicleCombatAvoidanceArea | CVehicleCombatAvoidanceArea::Shutdown | 2575 | |
| 4 | CCombatInfoMgr | CCombatInfoMgr::Shutdown | 2576 | |
| 5 | CTacticalAnalysis | CTacticalAnalysis::Shutdown | 2577 | |
| 6 | CBoatChaseDirector | CBoatChaseDirector::Shutdown | 2578 | |
| 7 | CVehicleChaseDirector | CVehicleChaseDirector::Shutdown | 2579 | |
| 8 | CCombatDirector | CCombatDirector::Shutdown | 2580 | |
| 9 | CCoverFinder | CCoverFinder::Shutdown | 2581 | |
| 10 | CScriptedGunTaskMetadataMgr | CScriptedGunTaskMetadataMgr::Shutdown | 2582 | |
| 11 | CRoadBlock | CRoadBlock::Shutdown | 2583 | |
| 12 | CWeaponManager | CWeaponManager::Shutdown | 2584 | |
| 13 | CPickupDataManager | CPickupDataManager::Shutdown | 2585 | |
| 14 | CPopulationStreaming | CPopulationStreamingWrapper::Shutdown | 2586 | |
| 15 | CPed | CPed::Shutdown | 2587 | |
| 16 | CZonedAssetManager | CZonedAssetManager::Shutdown | 2588 | |
| 17 | CInstanceListAssetLoader::Shutdown | CInstanceListAssetLoader::Shutdown | KEEP_INSTANCELIST_ASSETS_RESIDENT | 2591 |
| 18 | CModelInfo | CModelInfo::Shutdown | 2593 | |
| 19 | CGestureManager | CGestureManager::Shutdown | 2594 | |
| 20 | CGtaAnimManager | CGtaAnimManager::Shutdown | 2595 | |
| 21 | CRenderThreadInterface | CGtaRenderThreadGameInterface::ShutdownLevel | 2596 | |
| 22 | CDecoratorInterface | CDecoratorInterface::Shutdown | 2597 | |
| 23 | CScenarioManager | CScenarioManager::Shutdown | 2598 | |
| 24 | CTexLod | CTexLod::ShutdownSession | 2599 | |
| 25 | CPathServer::ShutdownSession | CPathServer::ShutdownSession | 2600 | |
| 26 | CJetpackManager | CJetpackManager::Shutdown | ENABLE_JETPACK | 2602 |
依赖级别 4(src/dev_ng/game/Core/game.cpp:2606-2613)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CVisualEffects | CVisualEffects::Shutdown | 2608 | |
| 2 | CTextTemplate | CTextTemplate::CoreShutdown | GTA_REPLAY | 2610 |
| 3 | CScaleformMgr | CScaleformMgr::Shutdown | 2612 | |
| 4 | CStaticBoundsStore | fwStaticBoundsStoreWrapper::Shutdown | 2613 |
依赖级别 5(src/dev_ng/game/Core/game.cpp:2616-2619)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | CStreaming | CStreaming::Shutdown | 2618 | |
| 2 | CTrain | CTrain::Shutdown | 2619 |
依赖级别 6(src/dev_ng/game/Core/game.cpp:2622-2629)
| # | 系统名 | 回调 | 条件编译 | 行 |
|---|---|---|---|---|
| 1 | fwTxdStore | fwTxdStoreWrapper::Shutdown | 2624 | |
| 2 | fwClothStore | fwClothStoreWrapper::Shutdown | 2625 | |
| 3 | MeshBlendManager | MeshBlendManager::Shutdown | 2626 | |
| 4 | CExtraContentWrapper::Shutdown | CExtraContentWrapper::Shutdown | 2627 | |
| 5 | CExtraMetadataMgr::ShutdownDLCMetaFiles | CExtraMetadataMgr::ShutdownDLCMetaFiles | 2628 | |
| 6 | CExtraMetadataMgr::ClassShutdown | CExtraMetadataMgr::ClassShutdown | 2629 |
7. 一帧的完整时序#
图中证据:
RunGame的调用顺序:src/dev_ng/game/Core/app.cpp:1343-1370、src/dev_ng/game/Core/app.cpp:1377-1385、src/dev_ng/game/Core/app.cpp:1440-1456CSystem::BeginUpdate内fwTimer::Update():src/dev_ng/game/system/system.cpp:1024-1045CGame::Update各步骤:src/dev_ng/game/Core/game.cpp:3365-3521GPU_IdleSection/Synchronise及安全区:src/dev_ng/rage/framework/src/fwrenderer/renderthread.cpp:377-496CGame::Render构建 drawlist:src/dev_ng/game/Core/game.cpp:3594-3599
7.1 CGame::Update 逐步#
src/dev_ng/game/Core/game.cpp:3315-3533
- PS3 商城容器模式:直接走
MarketplaceUpdate()(会话状态机 +COMMERCE_MAIN_UPDATE+ 清渲染列表)后返回src/dev_ng/game/Core/game.cpp:3317-3325、src/dev_ng/game/Core/game.cpp:3251-3265。 - 只有当本帧开始前会话已初始化,才推入 “Update” 预算计时条(20 ms)(注释:落地页创建会话时计时条不配对)
src/dev_ng/game/Core/game.cpp:3327-3333。 - 网络游戏中每帧额外推进一次
CRandomMWCScripts随机数(推断:用于保持多机随机序列同步节奏,源码无注释说明)src/dev_ng/game/Core/game.cpp:3335-3339。 RAGE_MEMORY_DEBUG下 F11 打印全部堆与网络/rline/SCxnMgr 分配器src/dev_ng/game/Core/game.cpp:3341-3363。- 贴花异步工作启动(“尽量紧跟上一帧渲染线程安全区之后”);断言构建使时间周期失效;计算
doFullUpdateRender = ShouldDoFullUpdateRender() || VideoPlayback::IsPlaybackActive()src/dev_ng/game/Core/game.cpp:3365-3375。 m_GameSessionStateMachine.Update()(可能在此同步完成整次换关/读档)src/dev_ng/game/Core/game.cpp:3377。- 回放:等待实体存储、
PreProcess;PC 刷新 CPU 频率src/dev_ng/game/Core/game.cpp:3379-3388。 - 压入游戏视口并按第 8 节规则执行更新模式;
FULL/SIMPLE期间CGameWorld::AllowDelete(true),结束后AllowDelete(false)以免渲染列表里的实体被删除src/dev_ng/game/Core/game.cpp:3390-3429。 - “Visibility” 计时条(网络游戏 3 ms,否则 4 ms):完整模式下复位高优先级加载标志 →
CRenderer::ClearRenderLists()→ 视早启动标志决定是否gPostScan.Reset()/gWorldMgr.PreScan()→gVpMan.BuildRenderLists()→Water::BlockTillUpdateComplete()(注释“约 800 µs,请保持在最后”)→ 回放PostProcess→CRenderer::PreRender()→ 等待 Verlet 布料任务 →COcclusion::BeforeRender();简化模式只清渲染列表、等水体并复位标志src/dev_ng/game/Core/game.cpp:3436-3521。 fwGame::Update()(Bank 下扫描/搜索调试)及 Bank 叠加层src/dev_ng/game/Core/game.cpp:3523-3532、src/dev_ng/rage/framework/src/fwsys/game.cpp:64-70。
物理不是独立的 update 条目:FULL_MAIN_UPDATE 的 CScene::Update 在玩家已定位时调用 CGameWorld::Process(),后者内部执行 CPhysics::Update() src/dev_ng/game/scene/scene.cpp:787-846、src/dev_ng/game/scene/world/GameWorld.cpp:2061。
7.2 CGame::Render 逐步#
src/dev_ng/game/Core/game.cpp:3538-3607:名字叫 Render,但只在主线程构建 drawlist。
- Gen9:会话未初始化或落地页活跃时直接返回。
- 非 final 主线程调试渲染;再次踢 WorldProbe 异步工作线程;
CPostScan::WaitForPostScanHelper();PS3 等待 SPU 渲染列表排序;加入第一人称实体;记录流式 PVS。 CTexLod::Update()、CObjectPopulation::SetHighPriorityDummyObjects()。- 启动异步搜索(
CObjectScanner、音频环境局部对象、火焰)——注释称这是“加异步工作的好位置”。 - “Build Drawlist”(预算 3 ms):
CSystem::AddDrawList_BeginRender()→gVpMan.RenderPhases()→CSystem::AddDrawList_EndRender();之后收尾异步搜索。AddDrawList_BeginRender/EndRender分别以DL_BEGIN_DRAW/DL_END_DRAWdrawlist 包裹整帧,并插入在渲染线程执行的dlCmdBeginRender/dlCmdEndRender(后者调用CSystem::EndRender→ 帧率限制 →grmSetup::EndDraw呈现)src/dev_ng/game/system/system.cpp:1133-1163、src/dev_ng/game/system/system.cpp:1302-1314、src/dev_ng/game/system/system.cpp:1220-1255。
帧率限制器(FORCE_FRAME_LIMIT 仅 PC 与 Durango,PS4 不编译):Durango 在 Present 前(片头视频期间跳过)、PC 在 Present 后执行“芝诺式”睡眠(每次睡剩余时间的一半,提前 5% 的“slop”退出);PC 的最小帧时间为 VSync / RefreshRate(关闭垂直同步时为 1/256 s),Durango 为 gFrameLimit/60(非 PC 的 DEFAULT_FRAME_LIMIT = 2,即 30 fps)src/dev_ng/game/system/system.cpp:137-148、src/dev_ng/game/system/system.cpp:1166-1214。
8. 更新模式选择与明细#
8.1 选择逻辑#
图中证据:src/dev_ng/game/Core/game.cpp:3394-3425。
边界:LANDING_PAGE_PRE_INIT_UPDATE/LANDING_PAGE_UPDATE 只在 Gen9 落地页启用时注册 src/dev_ng/game/Core/game.cpp:1680-1687,而 GEN9_LANDING_PAGE_ENABLED 需要 RSG_GEN9 平台 src/dev_ng/game/frontend/landing_page/LandingPageConfig.h:15-23、src/dev_ng/rage/framework/src/fwutil/Gen9Settings.h:17-20。在 PC/PS4/XB1 上,会话未初始化时 Update(LANDING_PAGE_PRE_INIT_UPDATE) 找不到模式而成为空操作(gameSkeleton::Update 的行为),连 COMMON_MAIN_UPDATE 也不会执行。由于这些平台的首个会话在 RunGame_OnEnter 中同步建立(见 startup-and-app-fsm.md),正常情况下第一次进入 CGame::Update 时会话已初始化。
8.2 ShouldDoFullUpdateRender#
src/dev_ng/game/Core/game.cpp:3158-3212:默认 true;“暂停菜单时不完整更新”的旧逻辑已被注释掉(新暂停菜单会显示背后的游戏画面);网络打开时强制 true;__DEV 可用两个调试开关强制;会话状态机非空闲(IsChangingSessionState())时为 false;Gen9 下落地页需要运行或会话未初始化时也为 false。即:SIMPLE_MAIN_UPDATE 实际只在“会话切换进行中”(以及 Gen9 落地页阶段)使用——例如 START_NEW_GAME/CHANGE_LEVEL 的淡出等待帧。
8.3 各更新模式内容对比#
| 关注点 | COMMON_MAIN_UPDATE | FULL_MAIN_UPDATE | SIMPLE_MAIN_UPDATE |
|---|---|---|---|
| 何时运行 | 会话已初始化的每一帧(无论完整/简化) | 正常游戏帧 | 会话切换中 |
| 典型内容 | 前端菜单、存储、档案、DLC、统计、网络、CTheScripts::Update、后台脚本、权益、安全模块 | 流式、人口、CScene::Update(世界/物理)、游戏逻辑、脚本 Process、ProcessAfterAllMovement、相机、灯光、时间周期、阴影、可见性早启动、HUD、特效、PostFX、音频 | 水体、人口流式、流式、灯光复位、脚本 Process、淡入淡出、视口、相机、时间周期、PostFX、音频、警告屏 |
| 证据 | src/dev_ng/game/Core/game.cpp:2633-2734 | src/dev_ng/game/Core/game.cpp:2736-3077 | src/dev_ng/game/Core/game.cpp:3079-3119 |
FULL_MAIN_UPDATE 中有几条源码注释明确的顺序约束:
CCheat::DoCheats必须在回放的数据存取之后,否则回放中作弊无效src/dev_ng/game/Core/game.cpp:2748。ProcessAfterAllMovement必须在所有会移动物体的代码(包括脚本)之后src/dev_ng/game/Core/game.cpp:2872-2878。camInterface::UpdateFade放在视口处理之前(修复 Bug 999476);相机在物体移动后才更新,“只有现在才能查询本帧相机位置”src/dev_ng/game/Core/game.cpp:2891-2900。ProcessPedsEarlyAfterCameraUpdate先让 ped 发起动画更新,ProcessAfterCameraUpdate再阻塞等待并处理其余实体src/dev_ng/game/Core/game.cpp:2919-2923、src/dev_ng/game/Core/game.cpp:2958-2962。CGameScan::KickVisibilityJobs要尽早启动(依赖遮挡光栅化),但必须在所有修改场景图的操作(光源实体、植被、程序化物体、CNewHud::Update触发的流式放置)之后src/dev_ng/game/Core/game.cpp:2976-3006。
两个编码层面的细节:Script 组的预算写作 NetworkInterface::IsGameInProgress()?3.0f:1.0f,但它只在 CGame::Init 注册时求值一次(那时不可能在网络游戏中),因此实际恒为 1.0 ms src/dev_ng/game/Core/game.cpp:2860;PS3 专用的 RegisterCommerceMainUpdateFunctions 推入了 "Common Main" 组却没有对应的 POP_UPDATE_GROUP(),因此其后的 Streaming/Render Update/Audio 组都嵌套在它里面(下表的分组列反映了这一点)src/dev_ng/game/Core/game.cpp:3219-3248。
8.4 逐模式明细#
说明同 6.4;“所在更新组”列显示组嵌套路径,[x] 为该组 timebar 预算(毫秒);“独立计时条”为 _TIMED 注册。
COMMON_MAIN_UPDATE(CGame::RegisterCommonMainUpdateFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:2633-2734。
| # | 所在更新组 | 系统名 | 回调 | 独立计时条 | 条件编译 | 行 |
|---|---|---|---|---|---|---|
| 1 | Common Main[1.0] | CPS3Achievements - UpdateWidgets | CPS3Achievements::UpdateWidgets | __PPU && __BANK | 2641 | |
| 2 | Common Main[1.0] | REST (web) services | UpdateRestServices | __BANK | 2644 | |
| 3 | Common Main[1.0] | EndUserBenchmarks | EndUserBenchmarks::Update | COLLECT_END_USER_BENCHMARKS | 2648 | |
| 4 | Common Main[1.0] | CDebug - UpdateProfiler | CDebug::UpdateProfiler | !__FINAL | 2652 | |
| 5 | Common Main[1.0] | CDebug | CDebug::Update | !__FINAL | 2653 | |
| 6 | Common Main[1.0] | CVectorMap | fwVectorMap::Update | !__FINAL | 2654 | |
| 7 | Common Main[1.0] | SmokeTests | SmokeTests::ProcessSmokeTest | !__FINAL | 2655 | |
| 8 | Common Main[1.0] | CDebug - UpdateDebugScaleformInfo | CDebug::UpdateDebugScaleformInfo | DEBUG_PAD_INPUT && FINAL_DISPLAY_BAR &! __FINAL_LOGGING | 2659 | |
| 9 | Common Main[1.0] | CDebugBar | CDebugBar::Update | FINAL_DISPLAY_BAR | 2662 | |
| 10 | Common Main[1.0] | Marketing Tools | CMarketingTools::Update | __BANK | 2665 | |
| 11 | Common Main[1.0] | PauseMenu | CPauseMenu::Update | 2668 | ||
| 12 | Common Main[1.0] | CVideoEditorUi | CVideoEditorUi::Update | GTA_REPLAY | 2671 | |
| 13 | Common Main[1.0] | CVideoEditorInterface | CVideoEditorInterface::Update | GTA_REPLAY | 2672 | |
| 14 | Common Main[1.0] | WatermarkRenderer | WatermarkRenderer::Update | GTA_REPLAY | 2673 | |
| 15 | Common Main[1.0] | SocialClubMenu | SocialClubMenu::UpdateWrapper | 2675 | ||
| 16 | Common Main[1.0] | PolicyMenu | PolicyMenu::UpdateWrapper | 2676 | ||
| 17 | Common Main[1.0] | CReportMenu | CReportMenu::Update | 2677 | ||
| 18 | Common Main[1.0] | CTextInputBox | CTextInputBox::Update | RSG_PC | 2679 | |
| 19 | Common Main[1.0] | TamperActions | TamperActions::Update | TAMPERACTIONS_ENABLED | 2683 | |
| 20 | Common Main[1.0] | cStoreScreenMgr | cStoreScreenMgr::Update | 2686 | ||
| 21 | Common Main[1.0] | CGenericGameStorage | CGenericGameStorage::Update | 2687 | ||
| 22 | Common Main[1.0] | GenericGameStoragePhotoGallery | CGenericGameStorage::UpdatePhotoGallery | 2688 | ||
| 23 | Common Main[1.0] | CPhotoManager | CPhotoManager::Update | 2689 | ||
| 24 | Common Main[1.0] | CProfileSettings | CProfileSettingsWrapper::Update | 2690 | ||
| 25 | Common Main[1.0] | CExtraContent | CExtraContentWrapper::Update | 2691 | ||
| 26 | Common Main[1.0] | CDLCScript | CDLCScript::Update | 2692 | ||
| 27 | Common Main[1.0] | CPerformance | CPerformanceWrapper::Update | 2693 | ||
| 28 | Common Main[1.0] | CSaveMigration | CSaveMigration::Update | 2694 | ||
| 29 | Common Main[1.0] | CStatsMgr | CStatsMgr::Update | 2695 | ||
| 30 | Common Main[1.0] | CNetwork | CNetwork::Update | 2696 | ||
| 31 | Common Main[1.0] | CTheScripts | CTheScripts::Update | 2697 | ||
| 32 | Common Main[1.0] | CDebugVideoEditorScreen | CDebugVideoEditorScreen::Update | GTA_REPLAY && __BANK | 2700 | |
| 33 | Common Main[1.0] | CReplayCoordinator | CReplayCoordinator::Update | GTA_REPLAY | 2702 | |
| 34 | Common Main[1.0] | fwGreatestMoments | fwGreatestMoment::Update | GREATEST_MOMENTS_ENABLED | 2710 | |
| 35 | Common Main[1.0] | VideoPlayback | VideoPlayback::Update | defined(VIDEO_PLAYBACK_ENABLED) && VIDEO_PLAYBACK_ENABLED | 2714 | |
| 36 | Common Main[1.0] | VideoPlaybackThumbnailManager | VideoPlaybackThumbnailManager::Update | defined(VIDEO_PLAYBACK_ENABLED) && VIDEO_PLAYBACK_ENABLED | 2715 | |
| 37 | Common Main[1.0] | ImposedTxdCleanup | fwImposedTextureDictionary::UpdateCleanup | 2718 | ||
| 38 | Common Main[1.0] | BackgroundScripts | BackgroundScripts::UpdateClass | 2719 | ||
| 39 | Common Main[1.0] | CEntitlementManager | CEntitlementManager::Update | RSG_ENTITLEMENT_ENABLED | 2722 | |
| 40 | Common Main[1.0] | (安全模块) | rageSecEngine::Update | USE_RAGESEC && !RAGE_SEC_IN_SEPARATE_THREAD | 2726 |
FULL_MAIN_UPDATE(CGame::RegisterFullMainUpdateFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:2736-3077。
| # | 所在更新组 | 系统名 | 回调 | 独立计时条 | 条件编译 | 行 |
|---|---|---|---|---|---|---|
| 1 | Misc[1.0] | Water Update Buffer Unflip | Water::UnflipWaterUpdateIndex | 2742 | ||
| 2 | Misc[1.0] | Visual Effects Pre Update | CVisualEffects::PreUpdate | 2743 | ||
| 3 | Misc[1.0] | Lights - PreSceneUpdate | Lights::PreSceneUpdate | 2744 | ||
| 4 | Misc[1.0] | ScriptHud - PreSceneProcess | CScriptHud::PreSceneProcess | 2745 | ||
| 5 | Misc[1.0] | CutSceneManager - PreSceneUpdate | CutSceneManagerWrapper::PreSceneUpdate | 2746 | ||
| 6 | Misc[1.0] | AnimSceneManager - PreAnimUpdate | CAnimSceneManager::UpdatePreAnim | 2747 | ||
| 7 | Misc[1.0] | CCheat | CCheat::DoCheats | 2748 | ||
| 8 | Misc[1.0] | CClock | CClock::Update | 2749 | ||
| 9 | Misc[1.0] | PedHeadShotManager | PedHeadshotManager::UpdateSafe | 2750 | ||
| 10 | Misc[1.0] | SettingsManager | CSettingsManager::ProcessTests | __DEV && RSG_PC | 2752 | |
| 11 | Misc[1.0] | CDebug::PreUpdate | CDebugScene::PreUpdate | __BANK | 2755 | |
| 12 | Streaming[4.0] | Situational Clip Set Streaming | CSituationalClipSetStreamer::Update | 2762 | ||
| 13 | Streaming[4.0] | Prioritized Clip Set Streaming | CPrioritizedClipSetStreamer::Update | 2763 | ||
| 14 | Streaming[4.0] | Population Streaming | CPopulationStreamingWrapper::Update | 2764 | ||
| 15 | Streaming[4.0] | CStreaming | CStreaming::Update | 2765 | ||
| 16 | Ped and Vehicle assets[1.0] | CPedVariationStream - ProcessStreamRequests | CPedVariationStream::ProcessStreamRequests | 2770 | ||
| 17 | Ped and Vehicle assets[1.0] | CVehicleVariationInstance - ProcessStreamRequests | CVehicleVariationInstance::ProcessStreamRequests | 2771 | ||
| 18 | Ped and Vehicle assets[1.0] | CPedPropsMgr - ProcessStreamRequests | CPedPropsMgr::ProcessStreamRequests | 2772 | ||
| 19 | Ped and Vehicle assets[1.0] | MeshBlendManager | MeshBlendManager::Update | 2773 | ||
| 20 | Ped and Vehicle assets[1.0] | FacialClipSetGroupManager | fwFacialClipSetGroupManager::Update | 2774 | ||
| 21 | Game Update[19.0] › World and Population[2.0] › Zones[3.0] | CMapAreas | CMapAreas::Update | 2783 | ||
| 22 | Game Update[19.0] › World and Population[2.0] › Zones[3.0] | CPopZones | CPopZones::Update | 2784 | ||
| 23 | Game Update[19.0] › World and Population[2.0] › Zones[3.0] | CMapZoneManager | CMapZoneManager::Update | 2785 | ||
| 24 | Game Update[19.0] › World and Population[2.0] › Vehicles[3.0] | CVehiclePopulation | CVehiclePopulation::Process | 2791 | ||
| 25 | Game Update[19.0] › World and Population[2.0] › Vehicles[3.0] | CVehicleAILodManager | CVehicleAILodManager::Update | 2792 | ||
| 26 | Game Update[19.0] › World and Population[2.0] › Vehicles[3.0] | CFlyingVehicleAvoidanceManager | CFlyingVehicleAvoidanceManager::Update | 2793 | ||
| 27 | Game Update[19.0] › World and Population[2.0] › Objects[3.0] | CObjectPopulationNY | CObjectPopulationNY::Process | 2799 | ||
| 28 | Game Update[19.0] › World and Population[2.0] › Peds[3.0] | CPedPopulation | CPedPopulation::Process | 2805 | ||
| 29 | Game Update[19.0] › World and Population[2.0] › Peds[3.0] | CPedAILodManager | CPedAILodManager::Update | 2806 | ||
| 30 | Game Update[19.0] › World and Population[2.0] › Misc[3.0] | CNetworkTelemetry | CNetworkTelemetry::Update | 是 | 2812 | |
| 31 | Game Update[19.0] › World and Population[2.0] › Misc[3.0] | CNetworkDebugTelemetry | CNetworkDebugTelemetry::Update | 是 | !__FINAL | 2813 |
| 32 | Game Update[19.0] › World and Population[2.0] › Misc[3.0] | CRandomEventManager | CRandomEventManager::Update | 2814 | ||
| 33 | Game Update[19.0] › World and Population[2.0] › Misc[3.0] | CRoadBlock | CRoadBlock::Update | 2815 | ||
| 34 | Game Update[19.0] › World and Population[2.0] › Misc[3.0] | CScenarioManager | CScenarioManager::Update | 2816 | ||
| 35 | Game Update[19.0] › World and Population[2.0] › Misc[3.0] | CGameSituation | CGameSituation::Update | 2817 | ||
| 36 | Game Update[19.0] › World and Population[2.0] › Misc[3.0] | CRecentlyPilotedAircraft | CRecentlyPilotedAircraft::Update | 2818 | ||
| 37 | Game Update[19.0] | strStreamingEngine::SubmitDeferredAsyncPlacementRequests | strStreamingEngine::SubmitDeferredAsyncPlacementRequests | 2824 | ||
| 38 | Game Update[19.0] | CScene | CScene::Update | 2826 | ||
| 39 | Game Update[19.0] | CScenarioManager::ResetExclusiveScenarioGroup | CScenarioManager::ResetExclusiveScenarioGroup | 2828 | ||
| 40 | Game Update[19.0] | CWarpManager | CWarpManager::Update | 2830 | ||
| 41 | Game Update[19.0] | CPedPopulation::ResetPerFrameScriptedMultipiers | CPedPopulation::ResetPerFrameScriptedMultipiers | 2832 | ||
| 42 | Game Update[19.0] | CVehiclePopulation::ResetPerFrameModifiers | CVehiclePopulation::ResetPerFrameModifiers | 2833 | ||
| 43 | Game Update[19.0] › Game Logic[0.5] | CGps | CGps::Update | 是 | 2837 | |
| 44 | Game Update[19.0] › Game Logic[0.5] | CGameLogic | CGameLogic::Update | 是 | 2838 | |
| 45 | Game Update[19.0] › Game Logic[0.5] | CSlownessZonesManager | CSlownessZoneManager::Update | 是 | 2839 | |
| 46 | Game Update[19.0] › Game Logic[0.5] | CGarages | CGarages::Update | 是 | 2840 | |
| 47 | Game Update[19.0] › Game Logic[0.5] | CStuntJumpManager | CStuntJumpManager::Update | 是 | 2841 | |
| 48 | Game Update[19.0] › Game Logic[0.5] | CJunctions | CJunctions::Update | 是 | 2842 | |
| 49 | Game Update[19.0] › Game Logic[0.5] | CPhoneMgr | CPhoneMgr::Update | 是 | 2843 | |
| 50 | Game Update[19.0] › Game Logic[0.5] | CTask | CTask::StaticUpdate | 是 | 2844 | |
| 51 | Game Update[19.0] › Game Logic[0.5] | CTrafficLights | CTrafficLights::Update | 是 | 2845 | |
| 52 | Game Update[19.0] › Game Logic[0.5] | CAppDataMgr | CAppDataMgr::Update | 是 | 2846 | |
| 53 | Game Update[19.0] › Game Logic[0.5] | CNetRespawnMgr | CNetRespawnMgr::Update | 是 | 2847 | |
| 54 | Game Update[19.0] › Game Logic[0.5] | CAnimViewer | CAnimViewer::Process | __BANK | 2850 | |
| 55 | Game Update[19.0] › Game Logic[0.5] | PedPopulation Cache | CPedFactory::ProcessDestroyedPedsCache | 是 | 2853 | |
| 56 | Game Update[19.0] › Game Logic[0.5] | VehPopulation Cache | CVehicleFactory::ProcessDestroyedVehsCache | 是 | 2854 | |
| 57 | Game Update[19.0] › Game Logic[0.5] | Kick WorldProbe Async Worker | WorldProbe::CShapeTestManager::KickAsyncWorker | 是 | 2855 | |
| 58 | Game Update[19.0] › Game Logic[0.5] | FirstPersonProp Pre-script | CPedVariationStream::PreScriptUpdateFirstPersonProp | 是 | 2856 | |
| 59 | Game Update[19.0] › Script[IsGameInProgress()?3.0:1.0,注册时求值] | CTheScripts | CTheScripts::Process | 2862 | ||
| 60 | Game Update[19.0] › Script[IsGameInProgress()?3.0:1.0,注册时求值] | CScriptPedAIBlips | CScriptPedAIBlips::Update | 2863 | ||
| 61 | Game Update[19.0] › Script[IsGameInProgress()?3.0:1.0,注册时求值] | CMessages | CMessages::Update | 2864 | ||
| 62 | Game Update[19.0] | CNodeViewer | CNodeViewer::Update | __BANK | 2869 | |
| 63 | Game Update[19.0] › ProcessAfterMovement[1.5] | ProcessAfterMovement | CGameWorld::ProcessAfterAllMovement | 是 | 2876 | |
| 64 | Game Update[19.0] | FireManager Entity Update | CFireManager::ProcessAllEntitiesNextToFires | 2882 | ||
| 65 | Game Update[19.0] | WarningScreen | CWarningScreen::Update | 2884 | ||
| 66 | Render Update[2.0] | Update Fade | camInterface::UpdateFade | 2896 | ||
| 67 | Render Update[2.0] | Viewport Manager | CViewportManagerWrapper::Process | 2897 | ||
| 68 | Render Update[2.0] | camManager | camManager::Update | 2900 | ||
| 69 | Render Update[2.0] | FirstPersonProp | CPedVariationStream::UpdateFirstPersonProp | 2902 | ||
| 70 | Render Update[2.0] | Lights | Lights::Update | 2904 | ||
| 71 | Render Update[2.0] | CLODLightManager | CLODLightManager::Update | 2905 | ||
| 72 | Render Update[2.0] | CLODLights | CLODLights::Update | 2906 | ||
| 73 | Render Update[2.0] | AmbientLights | AmbientLights::Update | 2907 | ||
| 74 | Render Update[2.0] | Pre-vis Vehicle update | CVehicle::PreVisUpdate | 2909 | ||
| 75 | Render Update[2.0] | Occlusion jobs early kick | COcclusion::KickOcclusionJobs | 是 | 2912 | |
| 76 | Render Update[2.0] | PlantsMgr::UpdateBegin | CPlantMgrWrapper::UpdateBegin | 是 | 2915 | |
| 77 | Render Update[2.0] | ShaderLib::Update | CShaderLib::Update | 是 | 2917 | |
| 78 | Render Update[2.0] | ProcessPedsEarlyAfterCameraUpdate | CGameWorld::ProcessPedsEarlyAfterCameraUpdate | 是 | 2923 | |
| 79 | Render Update[2.0] › Water Update | Water | Water::Update | 2927 | ||
| 80 | Render Update[2.0] | Marketing Tools | CMarketingTools::UpdateLights | __BANK | 2932 | |
| 81 | Render Update[2.0] | CRenderPhaseDebugOverlayInterface | CRenderPhaseDebugOverlayInterface::Update | __BANK | 2937 | |
| 82 | Render Update[2.0] | SceneGeometryCapture | SceneGeometryCapture::Update | __BANK | 2938 | |
| 83 | Render Update[2.0] | CTimeCycle | CTimeCycle::UpdateWrapper | 是 | 2941 | |
| 84 | Render Update[2.0] | WaterHeightSim | Water::UpdateHeightSimulation | 是 | 2942 | |
| 85 | Render Update[2.0] | Lights | Lights::UpdateBaseLights | 是 | 2943 | |
| 86 | Render Update[2.0] | CRenderPhaseCascadeShadowsInterface | CRenderPhaseCascadeShadowsInterface::Update | 是 | 2944 | |
| 87 | Render Update[2.0] | CParaboloidShadow | CParaboloidShadow::Update | 是 | 2947 | |
| 88 | Render Update[2.0] | CreateFinalScreenRenderPhaseList | CViewportManagerWrapper::CreateFinalScreenRenderPhaseList | 是 | 2950 | |
| 89 | Render Update[2.0] | Occlusion shadows jobs early kick | COcclusion::KickShadowOcclusionJobs | 是 | 2953 | |
| 90 | Render Update[2.0] | Run ScanCutBlocks Early | Water::ScanCutBlocksWrapper | 是 | 2956 | |
| 91 | Render Update[2.0] | ProcessAfterCameraUpdate | CGameWorld::ProcessAfterCameraUpdate | 是 | 2962 | |
| 92 | Render Update[2.0] | FirstPersonPropCam | CPedVariationStream::UpdateFirstPersonPropFromCamera | 2964 | ||
| 93 | Render Update[2.0] | LightEntityMgr | LightEntityMgr::Update | 是 | 2966 | |
| 94 | Render Update[2.0] | PlantsMgr::UpdateEnd | CPlantMgrWrapper::UpdateEnd | 是 | 2969 | |
| 95 | Render Update[2.0] | Proc Objects | CProcObjectManWrapper::Update | 是 | 2972 | |
| 96 | Render Update[2.0] | CSceneStreamerMgr::PreScanUpdate | CSceneStreamerMgrWrapper::PreScanUpdate | 是 | 2974 | |
| 97 | Render Update[2.0] | NewHud Update | CNewHud::Update | 是 | 2990 | |
| 98 | Render Update[2.0] | CBusySpinner Update | CBusySpinner::Update | 是 | 2991 | |
| 99 | Render Update[2.0] | CDebugScene | CDebugScene::Update | !__FINAL | 2994 | |
| 100 | Render Update[2.0] | CutSceneManager - PostSceneUpdate | CutSceneManagerWrapper::PostSceneUpdate | 2997 | ||
| 101 | Render Update[2.0] | UpdateLightsOnFlagsForAllVehicles | CVehicle::UpdateLightsOnFlagsForAllVehicles | 2999 | ||
| 102 | Render Update[2.0] | ReplayManager - Process | CReplayMgr::Process | GTA_REPLAY | 3003 | |
| 103 | Render Update[2.0] | Visibility jobs early kick | CGameScan::KickVisibilityJobs | 是 | 3006 | |
| 104 | Render Update[2.0] | PlantsMgr::UpdateOcclusion | CPlantMgrWrapper::UpdateOcclusion | 是 | CPLANT_USE_OCCLUSION | 3009 |
| 105 | Render Update[2.0] | CMultiplayerGamerTagHud Update | CMultiplayerGamerTagHud::Update | 是 | 3012 | |
| 106 | Render Update[2.0] | UIWorldIconManager | UIWorldIconManager::UpdateWrapper | 3013 | ||
| 107 | Render Update[2.0] | CMultiplayerChat Update | CMultiplayerChat::Update | RSG_PC | 3016 | |
| 108 | Render Update[2.0] | Credits | CCredits::Update | 是 | 3022 | |
| 109 | Render Update[2.0] | Occlusion | CCullZones::Update | 是 | 3023 | |
| 110 | Render Update[2.0] | CLoadingScreens | CLoadingScreens::Update | 3026 | ||
| 111 | Render Update[2.0] | UpdateModelViewer | CDebugScene::UpdateModelViewer | __DEV | 3028 | |
| 112 | Render Update[2.0] | CBlockView | CBlockView::Update | !__FINAL | 3031 | |
| 113 | Render Update[2.0] | DisplayEntitiesOnVectorMap | CDebugScene::DisplayEntitiesOnVectorMap | __BANK | 3034 | |
| 114 | Render Update[2.0] | CSectorTools | CSectorTools::Update | (SECTOR_TOOLS_EXPORT) | 3037 | |
| 115 | Render Update[2.0] | CVehicleDeformation | CVehicleDeformation::TexCacheUpdate | 3039 | ||
| 116 | Render Update[2.0] | CVisualEffects | CVisualEffects::Update | 3040 | ||
| 117 | Render Update[2.0] | CVolumeManager | CVolumeManager::Update | VOLUME_SUPPORT | 3042 | |
| 118 | Render Update[2.0] | CSky | CSky::Update | 3045 | ||
| 119 | Render Update[2.0] | CTreeImposters | CTreeImposters::Update | USE_TREE_IMPOSTERS | 3048 | |
| 120 | Render Update[2.0] | PostFx | PostFX::Update | 是 | 3051 | |
| 121 | Render Update[2.0] | DebugRenderingMgr | DebugRenderingMgr::Update | 是 | __BANK | 3053 |
| 122 | Audio Update[2.0] | Audio | audNorthAudioEngine::StartUpdate | 是 | 3062 | |
| 123 | Misc Update[1.0] | Streaming of alternate entity graphics | CEntityExt_AltGfxMgr::ProcessExtensions | 是 | 3068 | |
| 124 | Misc Update[1.0] | Population Multplier areas | CThePopMultiplierAreas::Update | __DEV | 3071 | |
| 125 | Misc Update[1.0] | perfClearingHouse Update | perfClearingHouse::Update | 是 | 3074 |
SIMPLE_MAIN_UPDATE(CGame::RegisterSimpleMainUpdateFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:3079-3119。
| # | 所在更新组 | 系统名 | 回调 | 独立计时条 | 条件编译 | 行 |
|---|---|---|---|---|---|---|
| 1 | (顶层) | Water | Water::Update | 3083 | ||
| 2 | (顶层) | Population Streaming | CPopulationStreamingWrapper::Update | 是 | 3084 | |
| 3 | (顶层) | CStreaming | CStreaming::Update | 3085 | ||
| 4 | (顶层) | strStreamingEngine::SubmitDeferredAsyncPlacementRequests | strStreamingEngine::SubmitDeferredAsyncPlacementRequests | 3086 | ||
| 5 | (顶层) | ResetSceneLights | Lights::ResetSceneLights | 3087 | ||
| 6 | Script[1.0] | CTheScripts | CTheScripts::Process | 3091 | ||
| 7 | Script[1.0] | CScriptPedAIBlips | CScriptPedAIBlips::Update | 3092 | ||
| 8 | (顶层) | Update Fade | camInterface::UpdateFade | 3098 | ||
| 9 | (顶层) | Viewport Manager | CViewportManagerWrapper::Process | 3099 | ||
| 10 | (顶层) | camManager | camManager::Update | 3102 | ||
| 11 | (顶层) | Marketing Tools | CMarketingTools::UpdateLights | __BANK | 3104 | |
| 12 | (顶层) | CTimeCycle | CTimeCycle::UpdateWrapper | 3107 | ||
| 13 | (顶层) | CreateFinalScreenRenderPhaseList | CViewportManagerWrapper::CreateFinalScreenRenderPhaseList | 3108 | ||
| 14 | (顶层) | PostFx | PostFX::Update | 是 | 3109 | |
| 15 | Audio Update[0.1] | Audio | audNorthAudioEngine::StartUpdate | 是 | 3113 | |
| 16 | (顶层) | WarningScreen | CWarningScreen::Update | 3117 |
LANDING_PAGE_PRE_INIT_UPDATE(CGame::RegisterLandingPagePreInitUpdateFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:3122-3135。
| # | 所在更新组 | 系统名 | 回调 | 独立计时条 | 条件编译 | 行 |
|---|---|---|---|---|---|---|
| 1 | (顶层) | CSaveMigration | CSaveMigration::Update | 3126 | ||
| 2 | Script | CTheScripts | CTheScripts::Process | 3130 | ||
| 3 | (顶层) | PauseMenu | CPauseMenu::Update | 3134 |
LANDING_PAGE_UPDATE(CGame::RegisterLandingPageUpdateFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:3137-3155。
| # | 所在更新组 | 系统名 | 回调 | 独立计时条 | 条件编译 | 行 |
|---|---|---|---|---|---|---|
| 1 | (顶层) | CLandingPage | CLandingPage::Update | 3143 | ||
| 2 | Streaming | CStreaming | CStreaming::Update | 3147 | ||
| 3 | Streaming | strStreamingEngine::SubmitDeferredAsyncPlacementRequests | strStreamingEngine::SubmitDeferredAsyncPlacementRequests | 3148 | ||
| 4 | (顶层) | WarningScreen | CWarningScreen::Update | 3152 |
COMMERCE_MAIN_UPDATE(CGame::RegisterCommerceMainUpdateFunctions)#
注册函数:src/dev_ng/game/Core/game.cpp:3215-3249。
| # | 所在更新组 | 系统名 | 回调 | 独立计时条 | 条件编译 | 行 |
|---|---|---|---|---|---|---|
| 1 | Common Main | cStoreScreenMgr | cStoreScreenMgr::Update | 3221 | ||
| 2 | Common Main | CLiveManager | CLiveManager::CommerceUpdate | 3222 | ||
| 3 | Common Main | CExtraContent | CExtraContentWrapper::Update | 3223 | ||
| 4 | Common Main | CDLCScript | CDLCScript::Update | 3224 | ||
| 5 | Common Main | WarningScreen | CWarningScreen::Update | 3225 | ||
| 6 | Common Main | PauseMenu | CPauseMenu::Update | 3226 | ||
| 7 | Common Main › Streaming[4.0] | CStreaming | CStreaming::Update | 3231 | ||
| 8 | Common Main › Streaming[4.0] | strStreamingEngine::SubmitDeferredAsyncPlacementRequests | strStreamingEngine::SubmitDeferredAsyncPlacementRequests | 3232 | ||
| 9 | Common Main › Render Update[2.0] | Viewport Manager | CViewportManagerWrapper::Process | 3238 | ||
| 10 | Common Main › Render Update[2.0] | CreateFinalScreenRenderPhaseList | CViewportManagerWrapper::CreateFinalScreenRenderPhaseList | 是 | 3239 | |
| 11 | Common Main › Render Update[2.0] | CBusySpinner Update | CBusySpinner::Update | 是 | 3240 | |
| 12 | Common Main › Audio | Audio | audNorthAudioEngine::StartUpdate | 是 | 3246 |
9. 约束与边界行为#
- 注册只发生一次:
RegisterGameSkeletonFunctions在CGame::Init中调用,此后模式内容固定;运行时条件(如网络状态)只能在回调内部判断,不能改变注册表。 - 同级顺序是隐式契约:同一依赖级别内的系统按源码行序执行,
__DEV的反序测试是唯一的防线;向表中插入新系统时需要关注前后邻居(注释中大量“dependent on …”就是这种契约的记录)。 - 关闭顺序需人工设计:
gameSkeleton不会反转关闭顺序(见 1.4)。 - 主线程独占:注册与执行均无锁,
CGame的所有生命周期函数都只能在 update 线程调用(CGame::VerifyMainThread断言sysThreadType::IsUpdateThread(),src/dev_ng/game/Core/game.cpp:3866-3872)。 - 实体删除窗口:只有在
FULL/SIMPLE_MAIN_UPDATE执行期间CGameWorld::AllowDelete(true);可见性/渲染列表构建期间禁止删除实体。
10. 未决问题 / 证据不足#
- 每个注册回调内部如何依据
mode分派,本页只在个别处验证(如ViewportSystemInit);各系统的具体行为请见其所属页面。 - 表中的条件编译宏(如
GTA_REPLAY、VIDEO_RECORDING_ENABLED、GREATEST_MOMENTS_ENABLED、VOLUME_SUPPORT)在各平台/配置下的取值未逐一核实,因此“某平台实际执行哪些条目”需要结合 ../00-overview/build-and-config.md 判断。 - Gen9 落地页相关路径在本快照中可能不完整(见 session-state-machine.md)。