Report errors using SDL message box

This commit is contained in:
kichikuou
2019-12-27 19:41:55 +09:00
parent 874f6bae5b
commit 6e73c48e68
6 changed files with 41 additions and 26 deletions
+8 -5
View File
@@ -225,7 +225,7 @@ void NACT::cmd_branch()
// message (2 bytes)
getd();
} else {
fatal_error = true;
fatal("cmd_branch: invalid command %2x", cmd);
break;
}
}
@@ -1575,7 +1575,7 @@ uint16 NACT::cali()
{
uint32 cali[256];
int p = 1;
fatal_error = true;
bool ok = false;
while(p > 0) {
uint8 dat = getd();
@@ -1628,11 +1628,14 @@ uint16 NACT::cali()
p--;
} else if(dat == 0x7f) {
if(p == 2) {
fatal_error = false;
ok = true;
}
p = 0;
}
}
if (!ok) {
fatal("cali: invalid expression");
}
return (uint16)(cali[1] & 0xffff);
}
@@ -1646,10 +1649,10 @@ uint16 NACT::cali2()
} else if(0xc0 <= dat && dat <= 0xff) {
val = ((dat & 0x3f) << 8) | getd();
} else {
fatal_error = true;
fatal("cali2: invalid expression");
}
if(getd() != 0x7f) {
fatal_error = true;
fatal("cali2: invalid expression");
}
return val;
}