Build 6355
SVN-
General
Remove special limitations on CON customization access to the DNCGS cheat.
SVN handles and Git names are merged into one person.
Remove special limitations on CON customization access to the DNCGS cheat.
When calculating which rotation to use for CON action viewtype 7, offset the frame intervals by 15 degrees instead of 22.5, clearly a copypaste error from viewtypes 5 or 8. Now these are properly centered.
Add wall.blend to structure access.
Add EVENT_PRELOADGAME and EVENT_POSTLOADGAME.
Add drawline256 and drawlinergb commands that call the internal functions used for the automap lines.
drawline256 <x0> <y0> <x1> <y1> <index> drawlinergb <x0> <y0> <x1> <y1> <index> <rgb> The coordinates are xdim<<12/ydim<<12 based, not 320<<16x200<<16. <index> is a palette index, and for drawlinergb is used as a fallback in the software renderer. <rgb> is encoded the same as PROJ_FLASH_COLOR.
Add getclosestcol command, which finds the closest palette index given
getclosestcol <return> <color> <limit> <color> is encoded the same as PROJ_FLASH_COLOR. <limit> is the index of the last palette color that should be considered. Use 255 for the whole palette, 254 to exclude the transparent color, 239 to exclude Duke 3D's fullbrights, etc.
Add EVENT_DISPLAYOVERHEADMAPTEXT.
Set RETURN to any non-zero value to disable hardcoded display of text. If you wish to replace the hardcoded text, you must check that userdef[].overhead_on == 2 yourself.
Handle the save and savenn commands after the full tic is processed, instead of in the middle of it during execution. DONT_BUILD.
Add undefinegamefunc.
Factor out code for launching EVENT_GAME and EVENT_PREGAME.
weapons.con.sample: Use full precision when applying weapon scaling.
weapons.con.sample: Add internal temp variables for rotatesprite parameters that the subroutines need to modify. This fixes weapon scaling.
weapons.con.sample: Rename hud_G_Draw_temp* to hud_int_temp*.
weapons.con.sample: Only setvar RETURN -1 for values of drawweapon that we actually handle. (Currently all of them, but this is more future-proof.)
weapons.con.sample: No need to andvar before getting a sine value. The source does that for us.
Remove bounds check on rotatesprite coordinates.
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.
Add an optional sixth parameter, a flags bitfield, to action definitions. Bump BYTEVERSION.
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.
When RETURN is set to INT32_MIN in EVENT_CHANGEMENU, cancel any animations in addition to not changing the current menu.
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.
Add EVENT_PREDRAW2DSCREEN.
Add SFLAG_HURTSPAWNBLOOD, which allows actors (particularly useractor enemies) to spawn blood when hurt as hardcoded enemies do.
Add userdef members "globalflags" and "globalgameflags", which control the values specified by the def commands of the same name.
Expose all structs to inline access. Tiledata and paldata are still to-do.
DONT_BUILD.
Add player[].index, which returns the player ID that you put in. Mostly useful to get the magic value of THISACTOR when applied to the player struct.
DONT_BUILD.
Correct the month used in automatic names of savegames created by the "save" CON command.