From 41692ef48ab9cb5b38d80e580316186e9c76cec5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 11 May 2012 23:10:12 +1000 Subject: TINSEL: Refactored Tinsel engine to use the Common coroutine scheduler --- engines/tinsel/scene.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'engines/tinsel/scene.cpp') diff --git a/engines/tinsel/scene.cpp b/engines/tinsel/scene.cpp index f635ce13a3..79bb30f7a3 100644 --- a/engines/tinsel/scene.cpp +++ b/engines/tinsel/scene.cpp @@ -193,7 +193,7 @@ void SendSceneTinselProcess(TINSEL_EVENT event) { init.event = event; init.hTinselCode = ss->hSceneScript; - g_scheduler->createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); + CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); } } } @@ -271,7 +271,7 @@ static void LoadScene(SCNHANDLE scene, int entry) { init.event = STARTUP; init.hTinselCode = es->hScript; - g_scheduler->createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); + CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); } break; } @@ -291,7 +291,7 @@ static void LoadScene(SCNHANDLE scene, int entry) { init.event = STARTUP; init.hTinselCode = ss->hSceneScript; - g_scheduler->createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); + CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); } } @@ -344,7 +344,7 @@ void EndScene() { KillAllObjects(); // kill all destructable process - g_scheduler->killMatchingProcess(PID_DESTROY, PID_DESTROY); + CoroScheduler.killMatchingProcess(PID_DESTROY, PID_DESTROY); } /** @@ -405,16 +405,16 @@ void PrimeScene() { if (!TinselV2) EnableTags(); // Next scene with tags enabled - g_scheduler->createProcess(PID_SCROLL, ScrollProcess, NULL, 0); - g_scheduler->createProcess(PID_SCROLL, EffectPolyProcess, NULL, 0); + CoroScheduler.createProcess(PID_SCROLL, ScrollProcess, NULL, 0); + CoroScheduler.createProcess(PID_SCROLL, EffectPolyProcess, NULL, 0); #ifdef DEBUG if (g_ShowPosition) - g_scheduler->createProcess(PID_POSITION, CursorPositionProcess, NULL, 0); + CoroScheduler.createProcess(PID_POSITION, CursorPositionProcess, NULL, 0); #endif - g_scheduler->createProcess(PID_TAG, TagProcess, NULL, 0); - g_scheduler->createProcess(PID_TAG, PointProcess, NULL, 0); + CoroScheduler.createProcess(PID_TAG, TagProcess, NULL, 0); + CoroScheduler.createProcess(PID_TAG, PointProcess, NULL, 0); // init the current background PrimeBackground(); @@ -471,7 +471,7 @@ void DoHailScene(SCNHANDLE scene) { init.event = NOEVENT; init.hTinselCode = ss->hSceneScript; - g_scheduler->createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); + CoroScheduler.createProcess(PID_TCODE, SceneTinselProcess, &init, sizeof(init)); } } -- cgit v1.2.3