- DECORATE now has atan2(y,x) and VectorAngle(x,y) functions. They are
identical except for the order of their parameters. The returned angle
is in degrees (not radians).
- Enhancements to lemon to generate more compact action tables and to avoid making array bounds tests that can never fail on action table calculations. (user: drh)
- Update zcc-parse.lemon: YY_SZ_ACTTAB is now YY_ACTTAB_COUNT
- Don't bother keeping track of uncompiled nodes in a special table. Use
the regular symbol table instead. This should in the future make
compiling nodes referenced deeper than (and before) their definitions
fairly straightforward.
- Also, break up the compiler's Message() function into Warn() and Error()
and get rid of zcc_errors.h. I can't really see having a set of error
numbers being useful.
Patched up everything so that it compiles without errors again. This only addresses code related to some compile error. A large portion of the angle code still uses angle_t and converts back and forth.
- Added new state options that DECORATE got to the lemon parser.
- Enable token generation for state options. They were previously not
generated, so the grammar treated them as function calls instead.
- Now that state jumps are handled by returning a state, we still need a
way for them to jump to a NULL state. If the parameter processed by this
macro turns out to be NULL, Actor's 'Null' state will be substituted
instead, since that's something that can be jumped to.
- The A_Jump family of action functions now return the state to jump
to (NULL if no jump is to be taken) instead of jumping directly.
It is the caller's responsibility to handle the jump. This will
make it possible to use their results in if statements and
do something other than jump.
- DECORATE return statements can now return the result of a function
(but not any random expression--it must be a function call). To
make a jump happen from inside a multi-action block, you must
return the value of an A_Jump function. e.g.:
{ return A_Jump(128, "SomeState"); }
- The VMFunction class now contains its prototype instead of storing
it at a higher level in PFunction. This is so that
FState::CallAction can easily tell if a function returns a state.
- Removed the FxTailable class because with explicit return
statements, it's not useful anymore.
Converting a floating point value that is out of range for a signed integer will result in 0x80000000 with SSE math, which is used exclusively for this purpose on modern Visual C++ compilers, so this cannot be used anywhere.
On ARM there's problems with float to unsigned int conversions.
xs_Float does not depend on these
- I kept getting confused trying to read these instructions, so now their
disassembly looks more MIPS-like:
* All mnemonics have had 'b' prepended to them for "branch".
* The CMP_CHECK bit alters the displayed mnemonic for the inverted
versions. e.g. BEQ can be displayed as BNE.
* The following JMP instruction that encodes the branch destination has
been folded into the disassembly of the branch instruction. Unlike
MIPS, I chose to display it offset from the branch check with =>
instead of another comma.
- Fixed: Don't assume operator new will return a pointer with 16-byte
alignment when allocating a block for the VMFrameStack. Because it seems
it's actually guaranteed to be 8-byte aligned. Don't know where I got
the idea it would always be 16-byte aligned.
- This replaces the general extensibility that had existed formerly
in thingdef_function.cpp. Parameter parsing for function calls is
shared with state parameter parsing. Functions are defined exactly in
the same way as action functions, but without the 'action' keyword.
- Fixed: Integer constants passed to pick() need to manually generate load
instructions, since FxConstant::Emit() will just return a constant
register with its value.
- Fixed: VMFunctionBuilder::RegAvailability::Reuse() didn't actually
calculate a proper mask. Also added another assert to this function.
Conflicts:
src/CMakeLists.txt
src/b_think.cpp
src/g_doom/a_doomweaps.cpp
src/g_hexen/a_clericstaff.cpp
src/g_hexen/a_fighterplayer.cpp
src/namedef.h
src/p_enemy.cpp
src/p_local.h
src/p_mobj.cpp
src/p_teleport.cpp
src/sc_man_tokens.h
src/thingdef/thingdef_codeptr.cpp
src/thingdef/thingdef_function.cpp
src/thingdef/thingdef_parse.cpp
wadsrc/static/actors/actor.txt
wadsrc/static/actors/constants.txt
wadsrc/static/actors/shared/inventory.txt
- Added register reuse to VMFunctionBuilder for FxPick's code emitter.
- Note to self: Need to reimplement IsPointerEqual and CheckClass, which
were added to thingdef_function.cpp over the past year, as this file no
longer exists in this branch.
- The binary form of ZCC_OpInfoType::FindBestProto() needs special
handling for conversion from single to double precision floating point
so that it doesn't choose an integer form over a floating point form
when picking the best prototype.
- This information is already stored in the node's NodeType field, so
there's no reason to go do a table lookup for it elsewhere. Must have
been a brain fart when I wrote them in the first place.