diff options
author | Paul Gilbert | 2012-05-14 21:06:03 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-05-14 21:06:03 +1000 |
commit | 47ddb2ff339ed21d5cc518b8851961b097169652 (patch) | |
tree | ba019656496fae18d79a0d3681e3b3baaed109ba /engines/tony/custom.cpp | |
parent | 9eb66a2324120a6c4e22a980a9114bce437fcd8b (diff) | |
download | scummvm-rg350-47ddb2ff339ed21d5cc518b8851961b097169652.tar.gz scummvm-rg350-47ddb2ff339ed21d5cc518b8851961b097169652.tar.bz2 scummvm-rg350-47ddb2ff339ed21d5cc518b8851961b097169652.zip |
TONY: Replace stubs for TakeOwnership/ReleaseOwnership with actual implementation
Diffstat (limited to 'engines/tony/custom.cpp')
-rw-r--r-- | engines/tony/custom.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp index 0392fc409d..d6e7fdd2ee 100644 --- a/engines/tony/custom.cpp +++ b/engines/tony/custom.cpp @@ -2134,15 +2134,12 @@ DECLARE_CUSTOM_FUNCTION(StartDialog)(CORO_PARAM, uint32 nDialog, uint32 nStartGr */ DECLARE_CUSTOM_FUNCTION(TakeOwnership)(CORO_PARAM, uint32 num, uint32, uint32, uint32) { -// EnterCriticalSection(&cs[num]); -// WaitForSingleObject(mut[num],CORO_INFINITE); - warning("TODO: TakeOwnership"); + CoroScheduler.waitForSingleObject(coroParam, GLOBALS.mut[num], CORO_INFINITE); } DECLARE_CUSTOM_FUNCTION(ReleaseOwnership)(CORO_PARAM, uint32 num, uint32, uint32, uint32) { -// LeaveCriticalSection(&cs[num]); -// g_system->unlockMutex(mut[num]); - warning("TODO: ReleaseOwnership"); + CoroScheduler.pulseEvent(GLOBALS.mut[num]); + warning("TODO: Validate that the use of events in TakeOwnership/ReleaseOwnership match original"); } @@ -2646,11 +2643,9 @@ void SetupGlobalVars(RMTony *tony, RMPointer *ptr, RMGameBoxes *box, RMLocation GLOBALS.bAlwaysDisplay = false; int i; -/* for (i = 0;i < 10; i++) - cs[i] = g_system->createMutex(); for (i = 0;i < 10; i++) - mut[i] = CreateMutex(NULL, false, NULL); -*/ + GLOBALS.mut[i] = CoroScheduler.createEvent(false, false); + for (i = 0; i < 200; i++) GLOBALS.tappeti[i] = 0; |