Build 3822
SVN-
remove "found `gettspr' outside of EVENT_ANIMATESPRITES" warning.
Show details
Because one may obviously use gettspr/settspr in states called from that event.
SVN handles and Git names are merged into one person.
remove "found `gettspr' outside of EVENT_ANIMATESPRITES" warning.
Because one may obviously use gettspr/settspr in states called from that event.
add a couple of ud members, gamevars; handle 'dynamicremap' only once.
Also, allow MAXVOLUMES+1 to first arg of 'music'.
-Wchained-loadactor option for LunaCON, clear errors on restart.
The last only in release builds.
implement dragpoint, clipmove*; fix gamearray serialization.
fix 'copy' on 64-bit archs.
LunaCON standalone: don't try default path on file-not-found for root names.
partially sync with r3803, link with lpeg.a (update to LPeg 0.12).
For pre-1.3 CONs, determining the older script version with gamestartup and/or definelevelname is not implemented.
prototypical gamevar serialization, currently very CON-centric.
partially implement {save,load}mapstate CON commands.
What is missing is saving and restoring per-player and per-actor gamevars. Also add a test CON mutator 'mapstate.con'.
fix Lua->CON line translation by recreating the line info, too.
conditionally compile out more code in savegame/gamevars.[ch].
Also, make the savegame major version 2 in the Lunatic build.
accept any number of *.lua modules on the command line.
There's no option letter for loading them, and the extension is checked case sensitively. Lua modules are loaded after CON translated to Lua. Also remove -testlua option.
back up generated LunaCON code, recreate Lua state on map entering.
remove old gamevar/serialization code.
sync rotatesprite* with CON.
make on-disk gamearray footer contain non-printable chars.
Also, allow writing userdefs[].auto_run.
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.
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.
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).