Skip to content

Commit

Permalink
TONY: Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 12, 2012
1 parent ef4846c commit 63e3b47
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions engines/tony/custom.cpp
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions engines/tony/mpal/mpal.cpp
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions engines/tony/mpal/mpal.h
Expand Up @@ -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))


/****************************************************************************\
*
Expand Down

0 comments on commit 63e3b47

Please sign in to comment.