Build 7333
SVN-
General
Remove read only bit from SPRITE_SECTNUM and SPRITE_STATNUM in m32script
SVN handles and Git names are merged into one person.
Remove read only bit from SPRITE_SECTNUM and SPRITE_STATNUM in m32script
Add mousebits gamevar to m32script for querying mouse button states
Fix issue where a useless error would be printed to the log and bad memory reads could occur when compiling a CON script with an invalid structure member passed as gamevar structure access shortcut shorthand
CON access to raw q16 values for player horiz and ang etc
Add EVENT_DISPLAYROOMSCAMERATILE
Fix CON commands leaving useless extra values in the bytecode. They were only valid outside of executable blocks so it was never noticed.
Fix CON compiler line number accounting problem introduced with the optimization that transforms CON_SETVARVAR -> CON_SETVAR if the second parameter is a constant
After some refactoring, several CON error checks done at runtime stood out as things that could be determined at script compile time. They have been moved.
Attempting to compile a CON with something stupid like "mul var 0" or "div var 0" in it now throws an error
Comment out actor and player versions of gamevar manipulation opcodes as they aren't performant with our current switch-based method of processing instructions. This also tweaks the beginning of VM_Execute() to gain a little more performance.
CON syntax extension: the empty "[]" shortcut for accessing a struct at index THISACTOR can now be omitted.
This allows cleaner syntax such as "geta .x temp", "ife sprite.x temp", etc.
Misc CON fixups
Minor CON compiler cleanup
Direct struct access for tsprite, and break special gamevar access out of Gv_GetVar() and into a separate function like it already was with Gv_GetVarX()
gamedef.cpp and friends: use preprocessor defines instead of hard-coded values for gamevar IDs that are really constants or arrays or structs
CON structure member access readability cleanup
Add per-sound volume support to audiolib. This allows you to control the volume of sounds independently from the distance-based system exposed through CON. To use this, you must define your sounds via the .def syntax and set the "volume" property--default is 1.0.
Tweak gamevar struct shortcut error handling
Prevent OOB array access when EVENT_INVENTORYLEFT or EVENT_INVENTORYRIGHT returns a bad value
Remove compiled CON script from savegames in favor of storing a simple CRC32 value computed from the uncompiled CON text--this means that savegames can now only be loaded if the currently loaded CONs match what was in use when the game was saved.
Add "swaparrays" command, which performs a pointer-swap on arrays of the same storage class.
Factor out the parsing of gamearray names.
Remix resizearray in the following ways:
Make only one allocation instead of two. Calculate array byte sizes in a way compatible with GAMEARRAY_BOOLEAN. Clear the expanded part of grown arrays using correct counts for non-int32 sizes. Support resizing an array to 0 to free it.
Implement the copy command for GAMEARRAY_BOOLEAN.
Fix two regressions completely breaking the correctness of the copy command, introduced in r6343.
Move some of the more commonly used CON functions to the top of the switch in VM_Execute(), and promote some of the loop's variables to native_t. Unfortunately, Visual Studio's new clang-format integration took it upon itself to reformat everything. Use diff -w.
make setting a sector's .wallptr call setfirstwall() instead of setting it directly and corrupting the map
Revert r6526 and r6527. This restores the longstanding behavior of the killit command, and setting sprites' xrepeat to zero, to not actually delete sprites unless their statnum is STAT_ACTOR or STAT_MISC. Be sure to set a sprite's statnum to one of these statnums if you want it to be deleted.
This should fix the broken E1L1 sector warp in the existing release of the Duke 64 mod, and the Polymer light culling used in HHR.
WWII GI: Update the default values of the weapon gamevars to correctly match the original game.
Use references in some gamevar stuff
Add spawnceilingglass, spawnwallglass, and spawnwallstainedglass commands.
Patch from Striker.
Add resetplayerflag 8, which mandates reload and not savegame load in single player.
Add EVENT_DAMAGESPRITE, EVENT_POSTDAMAGESPRITE, EVENT_DAMAGEWALL, EVENT_DAMAGECEILING, and EVENT_DAMAGEFLOOR.
In these events, THISACTOR is the projectile (or source of damage), and RETURN is the sprite/wall/sector affected. Set RETURN to -1 to cancel any hardcoded effects. ud.return 1 through 5 are the parameters passed to hitradius if RADIUSEXPLOSION is the source of the damage. ud.return 1 is -1 otherwise. New tokens "damageeventtile" and "damageeventtilerange" or tiledata[].gameflags & SFLAG_DAMAGEEVENT to enable processing for receivers with corresponding tilenums. CON commands to replicate hardcoded effects (beyond switching tilenums, such as spawning glass) are forthcoming. Use of EVENT_DAMAGEHPLANE is hereby discouraged. Patch from Striker, based on work by Fox.
Add gettiledata/settiledata. Same members as tiledata[] quick access struct. Not all fields writable.
Patch from Striker.
CSV format for CON timing output
Improve r6723. Adds EVENT_LASTWEAPON.
Patch from Fox.