- scriptified Hexen's Dragon.

- fixed several places in the code generator that did not consider locked registers for local variables: array indices, abs and floating point builtin functions.
- added some debug aids to the bounds opcode. Just triggering an exception here which loses all relevant info is perfectly useless in a debug situation.
This commit is contained in:
Christoph Oelckers 2016-11-16 19:18:21 +01:00
commit 76a74e0364
5 changed files with 327 additions and 347 deletions

View file

@ -696,6 +696,8 @@ begin:
OP(BOUND):
if (reg.d[a] >= BC)
{
assert(false);
Printf("Array access out of bounds: Max. index = %u, current index = %u\n", BC, reg.d[a]);
THROW(X_ARRAY_OUT_OF_BOUNDS);
}
NEXTOP;