mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-04 04:48:05 +03:00
Report errors using SDL message box
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user