Build 5909
SVN-
General
C-CON and M32script: Only accept hex literals beginning with '0' and not any other digit.
SVN handles and Git names are merged into one person.
C-CON and M32script: Only accept hex literals beginning with '0' and not any other digit.
Implement "divscale" and "scalevar" (scale()) in C-CON and "scalevar" in M32script.
Fix addlogvar command, broken in r5835.
Allow gamestartup to read in one additional parameter (MAXFLAMETHROWERAMMO). Do nothing with it yet.
Implement "ifplaybackon" conditional, used by World Tour to determine if the replay feature is enabled. In our case, it is always false.
Minor changes to gamevar error handling
Misc cleanup. Removed ability to use .CON files found in the .GRP when the .CON files found in the directory can't be compiled.
Fix detection of menu sounds in EVENT_SOUND
Support saving specified CON arrays in map states
Add an optional sixth parameter, a flags bitfield, to action definitions. Bump BYTEVERSION.
Remove some unused gamevars pertaining to the original multiplayer code. DONT_BUILD.
Fix EVENT_DISPLAYROOMS and EVENT_DISPLAYROOMSCAMERA RETURN values
Fix problem with C-CON sector and wall structure access. Oops.
CON compilation and debug message fuckery affecting virtually nobody
Clean up a couple instances of direct usage of a magic number in the CON compiler. DONT_BUILD.
Make the bitptr stuff in the CON compiler more readable.
Add getpv and setpv as short forms for get/setplayervar, and #include as an alternate for include.
Add ifvarge, ifvarle, and ifvarboth in line with ifvarvarge, ifvarvarle, and ifvarvarboth.
Fix the return command within events, broken since r5097.
Fix VM_ScriptInfo so that it never reads before the beginning of the bytecode.
Minor change to some gamevar warnings. DONT_BUILD.
Fix CON compiler errors. Me no smart.
Misc cleanup, add shorthand versions of getplayer, getactor, etc.
Treat "[]" as "[THISACTOR]" when accessing structure members through CON.
Add "klabs" keyword to CON, to take a gamevar and set it to its absolute value. The internal "inv" function to invert a gamevar's value has also been exposed externally.
Add commands added in previous commit to g_keywdate[], clean up a few CON compilation warning messages
Adds the following keywords from M32script into CON: shiftvarvarl, shiftvarvarr, ifvarvarle, ifvarvarge, ifvarvarboth, whilevarl, and whilevarvarl.
This also adds the shorthand versions of some commands, like "set" for "setvarvar", "add" for "addvarvar", "ife" for "ifvarvare", etc. There are about 30 of these. Because some of these names may already be used in some projects as variable names, this revision also includes a somewhat large change in variable naming rules: gamevars may now have the same names as CON keywords, with the caveat that the masked keyword is no longer accessible. This results in a warning at compile time but should ensure nobody's project ever stops compiling due to the introduction of new keywords.
Fix issue with sin/cos CON commands that prevented using the special builtin structure shortcut access vars for input.
Add vm_player, vm_sprite and vm_distance to get/setuserdef. This controls the sprite and player referenced by things like "THISACTOR", all of the "ifp" conditionals, per-actor gamevar access, etc. This is intended to be used to un-gimp things like EVENT_WORLD.
Draw frame at level start after EVENT_LOADPLAYER instead of before.
When RETURN is set to INT32_MIN in EVENT_CHANGEMENU, cancel any animations in addition to not changing the current menu.
add byte array editorcolors[256] to m32script variables.
This makes it possible to set up editor colors at startup (from m32_autoexec.cfg). For example: script_expertmode 1 do for i range 256 ifge i 33 { set editorcolors[i] i } script_expertmode 0 Use this method in the description of how to get old-style 2D colors in tiles.cfg and suggest an alternative color index pair.
Correct handling of size-zero gamearrays: Prevent a crash upon loading a savegame containing them, and allow resizearray to zero.
Fix a harmless "Internal compiler error" warning when using quick structure access on userdef.
Add "defstate" token which functions identically as in M32script: synonymous with CON's "state" only at top-level (when defining a state). Useful for syntax highlighting.
amend action's viewtype -8 to be more in line with the others.