Build 3704
SVN-
General
Remove 'cl_angleinterpolation' cvar because it had no effect for a while.
Show details
Also remove the two instances of commented out code, but not the respective CON structure access code.
SVN handles and Git names are merged into one person.
Remove 'cl_angleinterpolation' cvar because it had no effect for a while.
Also remove the two instances of commented out code, but not the respective CON structure access code.
in tsprite access, fix checking min/max/RO; tweak RESPAWN preview.
This fixes RESPAWN preview wrongly clamping the previewed tsprite z coords to [-524288 .. 524288] (x/y limits). Also, make the previewed tsprites be 33% translucent with the option of 66% translucency by setting 'showrespawn_fulltrans' to 1 in a.m32.
fix stuff after last commits; translator: clean up -f parsing code.
Also, implement 'cmenu' in LunaCON, make 'definequote' also allowed as inner command.
a.m32: Implement a Polymer "head light" emanating from your position in 3D mode.
Toggled with Ctrl+Shift+[KP-]. Variable 'headlight_range' controls its range. For the implementation, a new event EVENT_PREDRAW3DSCREEN was added.
gen. cleaner code, make actor[].movflag internal, update listglobals.sh
begin gamevar system. Not much there yet.
In Lunatic, gamevars (variables that are saved with savegames) are per-module.
ifsquished.
fix rotatesprite coordinate check, gen. events to chain at beginning.
Add some test CON files to source/lunatic/test.
The code is mostly by other people, who are credited in the CON files.
Return early from A_IncurDamage() if actor[].picnum ("htpicnum" in CON) is < 0.
With this change, it is impossible for negative values to be used as array indices inside this function, and I believe that it is also impossible that they escape to somewhere they might be used as such. For Lunatic, allow setting actor[].picnum to negative values and in the translator, add (commented out) code to warn whenever it is set to a constant negative value. Also, fix a _sound call in _addphealth in control.lua.
Properly implement rotatesprite16 by adding ROTATESPRITE_FULL16 to orientation.
Add "rotatespritea" to CON and M32script.
I hope I didn't bruise Lunatic too much.
Add orientation bit 2048, enumerated as ROTATESPRITE_FULL16, which is a courtesy provided by the engine for the purpose of the game to internally force use of full 32-bit coordinates. With this bit set, all CON screen drawing commands can use rotatesprite16-like coordinates.
While the functionality was already internally in place for gametext as one of two hacks using ROTATESPRITE_MAX (the other still used by minitext_() to align with the statusbar) we must codify a bit in the engine for safe external use. (Otherwise, ROTATESPRITE_MAX could/would theoretically increase and leave modders high and dry.) (Dev note: In G_DrawTXDigiNumZ(), ROTATESPRITE_MAX was used to bitshift the value used to calculate digit spacing for no reason I can ascertain other than to introduce rounding errors into the zoom/textscale calculations. It was never used anywhere, so I removed it.) Bonus: The scaling code for digitalnumberz and gametextz has been modified so that the spacing is no longer affected by rounding errors. Try animating the zoom value and compare how the text used to jump but now does not.
Lunatic translator: proper Lua->CON line mapping for actor/event/etc. headers.
return early with 0 from cansee() if either sector is >= MAXSECTORS.
Previously, only the <0 condition was checked. However, the passed sectnums could be >= MAXSECTORS (at least in C-CON), for example when issuing 'canseespr' on a sprite not in the game world.
readarrayfromfile: fail silently if file can't be opened.
simplify RETURN handling, make its behavior across events same as C-CON.
There's only one RETURN value on the C side (g_RETURN), which is also referenced from Lua. Upon entering an event, its value takes on the per-event default one, and its value when the event code finishes is passed back to the game. Independently of that, its value is always saved and restored across event calls.
actor usertypes from CON, set SFLAGs as 2nd gameactor() arg in Lua.
In passing, fix a couple of omissions: gameactor() being passed nil's in the middle, more than one moveflag to CON *actor.
fix weapondata_t read access, Lua->CON line mapping for if* commands.
cancel logo on EVENT_LOGO error, fix CON mulscale and writable gv.
weapons.con.sample: Fix three C to CON porting bugs. Thanks to Fox for the reports.
(Modders who used an older version: Take a look at the SVN diff, the fixes can easily be applied by hand.)
properly protect weapondata_t members, fix Lua->CON line mapping.
Also, make -Werror-bad-getactorvar disabled by default.
Lunatic t.: allow hex literals with >9 digits if the high ones are all 'F's.
(Or '0's, but that case is handled automatically.) The resulting generated number is taken by looking at the 8 lower nibbles and interpreting them as a signed 32-bit integer. Also add some number parsing tests to test/nlcf_break.con.
Lunatic translator: new switch -W(no-)error-bad-getactorvar.
Toggling whether a getactorvar for a global or per-player gamevar issues a warning or a hard error, the latter being the default. Also, make it possible to readgamevar/savegamevar per-actor gamevars and add userdefs member "idplayers" (read-only).
Lunatic translator: warn if setting reserved bits in some system gamevar redef.
g_tile access, rudimentary system gamearray support for the translator.
The only operation for which proper code is generated is reading a single value from a system gamearray.
Lunatic translator: handle LOGO_FLAGS.
This is the only gamevar of its kind that is handled for Lunatic, neither PLR_MORALE nor LOGO_FLAGS are.
Lunatic translator standalone: allow specifying list files.
All non-option positional arguments after an @ sign are taken as list files: hashes at the beginning of a line denote comments, truly empty lines are ignored, all other lines should contain one root CON file name.
Fix accessing gamearrays on 64-bit archs.
From the PM conversation "gamearrays in 64-bit". A test case is the breaking glass at the beginning of the DukePlus map.
Lunatic translator: dangling else for the 1000th time: not dangling any more.
Also update test/dangling_else.con. See there for how if* cascades are handled in CON. It's actually kind of pretty. Also, take care to handle code deferred to after the if/if-else properly (ifpdistl, ifpdistg, ifcanseetartet).
Lunatic t.: {read,save}gamevar, fix break in nested while, fix rotatesprite16.
Lunatic translator: fix codegen for "break" inside while loops.
Note: usually, languages call this "continue". Jeez, CON...
CON parser: don't allow read-only gamevars to 'readgamevar' command.
export C functions that may call into CON events using the Lua C API.
We must not call these functions using the FFI, since the Lua state is considered locked across such calls.
Lunatic translator: nearing a workable state...
- some more outer commands - gamearray persistence - faster 'mod': use math.modf instead of math.fmod (the former is JIT-compiled) - checkavail* - THISACTOR special handling - Fix building in Windows (export A_ShootWithZvel instead of A_Shoot).