Build 4050
SVN-
General
premap.c: delete GPSPEED/CYCLERs only after the loop with EVENT_LOADACTOR events
-
in control.lua, use C's fwrite() to write gamearray to disk, fix typo.
SVN handles and Git names are merged into one person.
premap.c: delete GPSPEED/CYCLERs only after the loop with EVENT_LOADACTOR events
in control.lua, use C's fwrite() to write gamearray to disk, fix typo.
Bounds-check the tile number gotten from EVENT_GETMENUTILE.
allow a certain type error present in 1.3D GAME.CON to pass.
create game Lua state just before EVENT_NEWGAME, not in G_EnterLevel().
add -ftrapv, -fwrapv opts, providing trapping/wrapping arith semantics.
Currently only for multiplication.
add forgotted "screensound" to keyword list in con_lang.lua.
Also, fix 'spriteflags' directive.
Add predefined labels MAXSPRITES, MAXSTATUS and MAX_WEAPONS.
implement 'tossweapon'.
handle system gamearrays for some array commands.
- 'copy' may have them as source, 'getarraysize' works fine - 'setarray' and 'resizearray' are obviously forbidden - 'readarrayfromfile' and 'writearrayfromfile' is not implemented for them (use case?) Also, in the Makefile: don't use realpath on directories. It may give an empty string.
various unrelated changes and more documentation.
- check map-text version on load - LunaCON: don't allow (back)slash as identifier char - LunaCON stand-alone: don't resort to default directory for root file names - document non-local control flow functions and for LunaCON, ambigious lexical elements
on palfrom from CON or C, set palsfade{speed,next} and regard prio.
various tweaks and fixes.
- fix getv movflags handling in VM_Move() - add actor.fall() - LunaCON: sanity-check some action members
Retire actor[].shootzvel, as it was only ever used in local scope.
That is, its value was only referenced during the duration of a function call that had previously set it. It was also never accessible from CON.
require'CON.ACTION' etc. gets composites from CON; add actor.MOVFLAGS.
New command 'screensound', unconditionally playing a session-wide sound.
begin writing LunaCON documentation.
major overhaul of gamevar serialization for savegames.
- Handle local gamevars. - Restore gamevars from require('end_gamevars').
check reserved bits for sound and ai movement flags.
make mail, money, paper be affected by tile remapping, fix one printf.
implement qgetsysstr/STR_VOLUMENAME.
Propagate potentially remapped CON defines to the control module.
(This is the module that implements much of the "hard-coded" functionality formerly on the C side.)
provide CON-defined labels in read-only table require("CON.DEFS").
add projectile member .userdata and predefined label PROJ_USERDATA.
It is a 32-bit signed integer. No version bump necessary, although CON code accessing this new member will not work with earlier revisions (obviously).
bound-check defineprojectile tile/sound members.
Also from Lunatic, make these members read-only and provide methods that allow setting them to either -1 or a number in [0..MAX{TILES,SOUNDS}-1].
strip dir prefixes on file-not-found; _getpname, ud.m_player_skill.
showview and showviewunbiased.
add preliminary helper code for local gamevar saving.
fix current incarnation of gamevar saving/restoration.
properly generate references to gamevars named like Lua keywords.
free a couple of file-scope local slots by storing stuff in tables.
proper handling of dynamic remappings with weapon defaults.
That is, the gamevars named WEAPONx_* in CON will now have the remapped value if they were not overridden from CON ('gamevar' at file scope). For C-CON, everything except signaling an override from the CON parser is in place.
hook up dynamicsoundremap.
hook up qstrdim and screentext.
Also add some recent keywords to the list in con_lang.lua which I had forgotten all along.
real user per-player vars.
The previous behavior was to translate them as global gamevars, since LunaCON currently has no support for multiplayer. However, then some errors would be missed where such gamevars are accessed in no-player context (e.g. EVENT_ENTERLEVEL). On by default, disabled with -fno-playervar.
fix mistranslation of CON "else { if" to Lua "elseif".
When encountering a non-empty statement inside braces, emit "do" ... "end".
also reset per-actor gamevars from spawns originating from C.
Take care not to do it twice. Still untested though.
split 'replace' option for actor chaining flags into soft/hard.
Hard replacement reassigns the tile flags, while soft replacement bitwise ORs them, as in CON (since some flags might already have been set using commands like spritenoshade).
reset per-actor gamevars on actor spawn, untested.
implement 'definegametype', allow writing userdef.level_number.
Also, allow (implicit) actor index -1 to 'sound' like in C-CON and fix MULTIMODE gamevar definition (was 0, not 1).
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'.