Also I've got 50 test programs on my offline PC and I'll test all those late tonight with the new code so if there are any bugs in the code they won't go unnoticed for more than 12 hours
<insert a bunch of const ints here> -> enum { UNDEF, NORTHWEST, NORTH, NORTHEAST, WEST, EAST, SOUTHWEST, SOUTH, SOUTHEAST};
Why introduce so much confusion with dx and dy?
switch (direction) {
case NORTHWEST: dx = -1; dy = -1; break;
case NORTH: dx = -1; dy = 2; break;
case NORTHEAST: dx = 0; dy = -1; break;
case WEST: dx = -1; dy = 0; break;
case EAST: dx = 1; dy = 0; break;
case SOUTHWEST: dx = 0; dy = 1; break;
case SOUTH: dx = 1; dy = 2; break;
case SOUTHEAST: dx = 1; dy = 1; break;
}
x += dx * (skip + 1);
y += dy * (skip + 1);
That's a bit less manageable than it used to be...
@LeakyNun Hm, I think it was my best guess as to why I put that useless code in there. Actually, I'm pretty sure that code was to prevent x or y going under 0, and then the error-check that exits if the code is empty later ... yeah never mind
@MDXF you write ] move the instruction pointer back to the most recent ( if the ToS is > 0, but you only check stack[size-1]: what is the ToS is negative?