- added a new type 'NativeStruct'. This will be used for types that cannot be instantiated, and is also needed to cleanly handle many internal types that only can exist as reference.
- changed Dehacked weapon function lookup to check the symbol table instead of directly referencing the VM functions. Once scriptified these pointers will no longer be available.
- removed all special ATAGs from the VM. While well intentioned any pointer tagged with them is basically unusable because it'd trigger asserts all over the place.
- scriptified A_Punch for testing pass-by-reference parameters and stack variables.
- gave OP_CONCAT some sane semantics. The way this was defined, by specifying the source operands as a range of registers instead of a pair like everything else made it completely useless for the task at hand.
- changed formatting for floats to %.5f which for normal output in a game makes more sense. For special cases there should be a special formatting function for ints and floats that can do more specialized conversions.
- make the pointer to string cast a bit more useful by using the actual object's type rather than 'Object' which can be a great asset when debugging.
- fixed a few bad asserts.
- fixed code generation for using local variables as array index. This must use a different register for the array element offset because the original register may not be overwritten.
- instead add a list of SpecialInits to VMScriptFunction so this can be done transparently when setting up and popping the stack frame. The only drawback is that this requires permanent allocation of stack objects for the entire lifetime of a function but this is a relatively small tradeoff for significantly reduced maintenance work throughout.
- removed most #include "vm.h", because nearly all files already pull this in through dobject.h.
- 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.
- added a DActorIterator class.
- fixed: It was not possible to have functions of the same name in two different classes because the name they were searched for was not qualified by the class. Changed so that the class name is included now, but to avoid renaming several hundreds of functions all at once, if the search fails, it will repeat with 'Actor' as class name.
This commit contains preparations for scriptifying Hexen's Dragon, but that doesn't work yet so it's not included.
- preserve a state's source line information for the postprocessing phase so that the checker can output more useful information.
- added missing check for weapon psprites to DPSprite::SetState.
- added state usage specifiers to Actor and Inventory. The states in these classes must be set to full access so that any existing mod can link to them.
This appears to be the only case where an actor was set to a state owned by a completely unrelated actor which would present some problems with state owner checking in AActor::SetState, so let's better get rid of it ASAP.
I believe the only reason this wasn't changed when all actors were exported 8 years ago was that old binary DEHSUPP lump.