Skip to content

Commit

Permalink
TONY: Further bugfixes for gcc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 4, 2012
1 parent 23cd3b7 commit 9c2ccc4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions engines/tony/mpal/mpal.cpp
Expand Up @@ -97,7 +97,6 @@ typedef LPCFCALL* LPLPCFCALL;

uint32 mpalError;

static bool bInit=false;
static byte * lpMpcImage;

LPITEMIRQFUNCTION lpiifCustom=NULL;
Expand Down Expand Up @@ -786,11 +785,11 @@ static LPITEM GetItemData(uint32 nOrdItem) {
patlength = dat;
dat+=ret->numpattern;

for (i=1;i<ret->numpattern;i++) {
for (j=0;j<patlength[i];j++)
ret->pattern[i][j]=dat[j];
ret->pattern[i][patlength[i]]=255; // Termina i pattern
dat+=patlength[i];
for (i = 1; i < ret->numpattern; i++) {
for (j = 0; j < patlength[i]; j++)
ret->pattern[i][j] = dat[j];
ret->pattern[i][(int)patlength[i]] = 255; // Termina i pattern
dat += patlength[i];
}

// Carica i singoli frame di animazione
Expand Down Expand Up @@ -2284,9 +2283,9 @@ bool bDontOutput;
struct MsgCommentsStruct {
uint16 wStart;
uint16 wEnd;
char *pComment;
const char *pComment;
};
MsgCommentsStruct MsgComments[] = {
const MsgCommentsStruct MsgComments[] = {
{ 10, 16, "###" },
{ 560, 563, "@@@ BUTCH & DUDLEY:" },
{ 551, 553, "@@@ JACK'S LETTER (JACK'S VOICE):" },
Expand Down Expand Up @@ -2894,7 +2893,7 @@ const char *DLG590[] = { "Tony", "Pantagruel", NULL };

#define HANDLE_DIALOG(num) \
case num: \
if (nPers >= sizeof(DLG##num) / sizeof(char*) || DLG##num[nPers]==NULL) \
if (nPers >= (int)(sizeof(DLG##num) / sizeof(const char *)) || DLG##num[nPers] == NULL) \
{ \
warning("ERROR: Il personaggio #%d non esiste nel dialogo %d!\n", nPers, nDlg); \
return "ERROR"; \
Expand Down

0 comments on commit 9c2ccc4

Please sign in to comment.