From 63e3b47857fe5a507858b4256b1f3f4d7fe50c22 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 13 May 2012 00:53:09 +1000 Subject: [PATCH] TONY: Fix compiler warnings --- engines/tony/custom.cpp | 6 +++--- engines/tony/mpal/mpal.cpp | 4 ++-- engines/tony/mpal/mpal.h | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp index a3a57dfce9ca..3e8f0b95e67e 100644 --- a/engines/tony/custom.cpp +++ b/engines/tony/custom.cpp @@ -2130,7 +2130,7 @@ DECLARE_CUSTOM_FUNCTION(StartDialog)(CORO_PARAM, uint32 nDialog, uint32 nStartGr CORO_BEGIN_CONTEXT; uint32 nChoice; uint32 *sl; - int i, num; + uint32 i, num; char *string; RMDialogChoice dc; int sel; @@ -2153,7 +2153,7 @@ DECLARE_CUSTOM_FUNCTION(StartDialog)(CORO_PARAM, uint32 nDialog, uint32 nStartGr // Se c'e' una sola opzione, la fa automaticamente, e aspetta la prossima scelta if (_ctx->num == 1) { - mpalQueryDialogSelection(_ctx->nChoice, _ctx->sl[0]); + mpalQueryDialogSelectionDWORD(_ctx->nChoice, _ctx->sl[0]); GlobalFree(_ctx->sl); // Wait for the next choice to be made @@ -2192,7 +2192,7 @@ DECLARE_CUSTOM_FUNCTION(StartDialog)(CORO_PARAM, uint32 nDialog, uint32 nStartGr MainHideMouse(); CORO_INVOKE_0(_ctx->dc.Hide); - mpalQueryDialogSelection(_ctx->nChoice, _ctx->sl[_ctx->sel]); + mpalQueryDialogSelectionDWORD(_ctx->nChoice, _ctx->sl[_ctx->sel]); // Chiude la scelta _ctx->dc.Close(); diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index d28fd8e8e2b7..bfde7fe2a655 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -1618,10 +1618,10 @@ static uint32 DoAction(uint32 nAction, uint32 ordItem, uint32 dwParam) { // 0 dell'item, e poi liberera' la memoria con la GlobalFree() // !!! New thread management - if ((h = CoroScheduler.createProcess(ActionThread, &newitem, sizeof(LPMPALITEM))) == NULL) + if ((h = CoroScheduler.createProcess(ActionThread, &newitem, sizeof(LPMPALITEM))) == CORO_INVALID_PID_VALUE) return CORO_INVALID_PID_VALUE; - if (CoroScheduler.createProcess(ShutUpActionThread, &h, sizeof(uint32)) == NULL) + if (CoroScheduler.createProcess(ShutUpActionThread, &h, sizeof(uint32)) == CORO_INVALID_PID_VALUE) return CORO_INVALID_PID_VALUE; nExecutingAction = item->nObj; diff --git a/engines/tony/mpal/mpal.h b/engines/tony/mpal/mpal.h index 1d298b4f2602..319f71c6a872 100644 --- a/engines/tony/mpal/mpal.h +++ b/engines/tony/mpal/mpal.h @@ -522,6 +522,9 @@ typedef LPITEMIRQFUNCTION* LPLPITEMIRQFUNCTION; #define mpalQueryDialogSelection(nChoice,dwData) \ (bool)mpalQueryDWORD(MPQ_DIALOG_SELECTION,(uint32)(nChoice),(uint32)(dwData)) +#define mpalQueryDialogSelectionDWORD(nChoice,dwData) \ + mpalQueryDWORD(MPQ_DIALOG_SELECTION,(uint32)(nChoice),(uint32)(dwData)) + /****************************************************************************\ *