コメント
スレッド: Doom
New Zealandt13378 years ago

Sys_SetPhysicalWorkMemory( 192 << 20, 1024 << 20 ); //Min = 201,326,592 Max = 1,073,741,824 Sys_CreateConsole();

    // Since the engine is multi-threaded mutexes are initialized here: One mutex per "critical" (concurrent execution) section of code.
    for (int i = 0; i < MAX_CRITICAL_SECTIONS; i++ ) { 
        InitializeCriticalSection( &win32.criticalSections[i] );
    }
        
    common->Init( 0, NULL, lpCmdLine );              // Assess how much VRAM is available (not done via OpenGL but OS call)
        
    Sys_StartAsyncThread(){                          // The next look runs is a separate thread.
        while ( 1 ){
            usleep( 16666 );                         // Run at 60Hz
            common->Async();                         // Do the job
            Sys_TriggerEvent( TRIGGER_EVENT_ONE );   // Unlock other thread waiting for inputs
            pthread_testcancel();                    // Check if we have been cancelled by the main thread (on shutdown).
        }
    }
    
    Sys_ShowConsole
        
    while( 1 ){
        Win_Frame();                                 // Show or hide the console
        common->Frame(){
            session->Frame()                         // Game logic
            {
                for (int i = 0 ; i < gameTicsToRun ; i++ ) 
                    RunGameTic(){
                        game->RunFrame( &cmd );      // From this point execution jumps in the GameX86.dll address space.
                          for( ent = activeEntities.Next(); ent != NULL; ent = ent->activeNode.Next() ) 
                            ent->GetPhysics()->UpdateTime( time );  // let entities think
                    }
            }
            
            session->UpdateScreen( false ); // normal, in-sequence screen update
            {
                renderSystem->BeginFrame
                    idGame::Draw            // Renderer front-end. Doesn't actually communicate with the GPU !!
                renderSystem->EndFrame
                    R_IssueRenderCommands   // Renderer back-end. Issue GPU optimized commands to the GPU.
            }
        }
    }
}
t1337について
参加日
8 years ago
オンライン
5 years ago
走行
4
プレイしたゲーム
Doom (XBLA/PS3)
Doom (XBLA/PS3)
最終ラン 5 years ago
3
走行
Doom (Playstation)
Doom (Playstation)
最終ラン 5 years ago
1
走行
フォロー中のゲーム
Hexen: Beyond Heretic
Hexen: Beyond Heretic
最終訪問 5 years ago
27
訪問