Build 3492
SVN-
General
Refactor C code related to gettimedate and sect*interpolation CON commands.
Show details
No functional changes.
SVN handles and Git names are merged into one person.
Refactor C code related to gettimedate and sect*interpolation CON commands.
No functional changes.
CON myosx*: move masking orientation with user-bits-mask to G_DrawTileGeneric().
Rework how the z velocity is passed from *zshoot to A_Shoot().
Previously, actor[].shootzvel (implementation detail, not available to CON) was checked, and if it was !=0, that was the overridden velocity. The value 0 meant "hardcoded, projectile-dependent velocity". But that neccesiated a hack where if zvel 0 was passed and really meant, it needed to be set to 1 instead. Now we have A_ShootWithZvel() taking an additional last argument plus a macro SHOOT_HARDCODED_ZVEL permissible for that argument.
NULL spriteext[].tpsr after each running EVENT_ANIMATESPRITES for a tsprite.
Meaning that only *ettsprite[THISACTOR] makes sense from CON. It did before too, because .tspr was set before each event run (and not before all runs), only that it was never nulled, which was kind of untidy.
remove unused tsprite access via spriteext[].tspr.
Don't set spriteext[].tspr when creating tsprites from the engine.
Its only use is to have a actor -> tsprite mapping for the EVENT_ANIMATESPRITE event and .tspr will be set before it is run.
RESPAWN-preview coded in M32-script.
The m32script variable 'showrespawn_always' toggles whether the respawned picnum is shown unconditionally instead of only when aimed at (and locked onto the RESPAWN sprite) in 3D mode. Cool idea by Micky C. NOTE: sometimes doesn't work because of a bug in the m32script interpreter.
CON parser: don't accept read-only gamevars for 1st arg of *sprite{sect,stat}.
CON/m32script: remove GAMEVAR_DEFAULT uses, since they had no effect.
In CON, the bit is still always cleared for user-defined gamevars.
gamevars.c: implement Gv_Clear() in terms of Gv_Free() + own code.
Also, some commenting.
Simplify HUD scale and viewport size logic and clean up related code.
* Make the "classic status bar fullscreen viewport" mode accessible in classic too. * Make range of status bar scale 36..100 * Update ud.statusbarmode when executing OSD command r_size (ud.screen_size). NOTE: ud.statusbarmode is considered internal. Don't use from CON! * Make sure 1) loading any configuration and 2) menu bars work correctly. (The "classic status bar fullscreen viewport" mode will never be restored though because ud.statusbarmode isn't handled by the OSD var system).
Encapsulate aplWeapon* array accesses in a PWEAPON(Player, Weapon, Wmember) macro.
In the normal game, these arrays are conceptually [MAX_WEAPONS][MAXPLAYERS], allocated as CON per-player gamevars (e.g. WEAPONx_WORKSLIKE). For Lunatic, they are replaced with weapondata_t g_playerWeapon[MAXPLAYERS][MAX_WEAPONS].
Replace wall of dup'd code in Gv_AddSystemVars with something more readable.
Specifically, have a weapondata_t type mimicking the aplWeapon* arrays. Keep a list weapondefaults[] which undergoes some static->dynamic tweaks and then makes its way to the WEAPONx_XXX per-player gamevars.
Port system gamearray access from M32Script to CON. Expose tilesizx and tilesizy.
Also, fix deficient logic in Gv_Free and Gv_Clear (both M32 and CON) so that gamevar and gamearray erasure results are (closer to) correct, and so that the game does not crash when system arrays are accessed from CON because they all have been nulled.
Move the definitions like MAXGAMEVARS out of the enums used for the gamevar flags, because it didn't really make a whole lot of sense for them to be there.
Don't call setaspect_new() at end of rotatesprite.
This fixes 2nd and following rotatesprite calls drawing differently from the first in a context with custom set-up aspect, as reported by Lezing here: http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__143090 Also, back up and restore the aspect state across EVENT_DISPLAYREST.
proper bound checks for {re,}definequote commands.
Add "ulotag" and "uhitag" to get/setactor/wall/sector, which exposes the tags unsigned, without the typecast to int16_t. This might be useful to someone.
make lotag/hitag getters return signed values, as per agreement on IRC.
This means that the internal change done to these sprite members in r3159 is hidden from CON for backward-compatibility purposes. Note that .cstat and .{ceiling,floor}stat aren't touched, and will return unsigned values to CON.
Fix the warnings when building with C++, add MSVC C++ build support. This also changes the internal type of lotags, hitags and cstat type fields to uint16_t instead of int16_t to clean up some dubious behavior wherein the code was using a value of 32768 as a flag in these fields for certain types of things, like invisible sprites (using the value as if it was uint16_t) where it was elsewhere checking if the value was < 0 (using the value as if it was int16_t). This change may break a few specific effects if any part of the relevant code was missed when looking for areas that needed to be addressed.
I think there's also a fix for the CON precache system breakage in here (lost it in my local tree when I started getting the C++ build working in MSVC, sorry!)
Fix useractor enemystayput breakage
Add EVENT_CHANGEMENU and clean up menus.c a little more.
This event is useful in certain circumstances where you want to skip a menu/screen value and the design of the monster switch statement would require the M_ChangeMenu() call to be intercepted or the unwanted screen will flash for a split second.
Add some CON defines for friendly names to pass to definegamefuncname. Now, instead of "definegamefuncname 36 something" you would "definegamefuncname GAMEFUNC_TURNAROUND something". It's just a little something to make CON files more readable.
CON access to ud.runkey_mode through get/setuserdef