Build 4237
SVN-
run EVENT_INIT after initial Lua state creation.
SVN handles and Git names are merged into one person.
run EVENT_INIT after initial Lua state creation.
don't allow starting demo recording, since gamevar diffing is NYI.
Pass RETURN to EVENT_DAMAGEHPLANE in the 'dist' arg to allow chained callbacks.
Add EVENT_DAMAGEHPLANE and document it in Lunatic doc Appendix B.
Also add test/damagehplane.lua with these demonstrations: - custom breakable ceilings - breakable TROR glass
fix parsing negated labels, getnumber* with neg. 'max'.
Exposed by this snippet from a.m32: getnumber256 .owner "OWNER (projection picnum): " -MAXTILES Now, Alt+KP2 works as expected in 3D mode.
statically check some member assignments with literal numbers.
And issue warnings whenever the assignment would fail (error) at game time.
Do not consider system gamearrays for updating from demos.
This generally fixes demo playback. Before, tilesizx[]/tilesizy[] were written into twice as many bytes as needed. Now, don't do that at all.
Guard a sprite/actor access with sector[].hitag as index from OOB.
Unlikely but possible for rogue CON code.
disable some player members, tweak decls of others.
The ones disabled are because they were found to not be used in any mod I tested. Exposing members directly is rarely good API. - bool toggle_key_flag -> const uint8_t ... (because value 2 is used) - make scream_voice, cheat_phase read-only
fix assignment to projectile sound/bsound/isound.
implement horiz. tex panning for sprites (spriteext[].xpanning).
Known as getactor/sprite[].xpanning from CON, values are 0-255. It should be assumed that this is only valid for wall-aligned sprites (currently, face sprites also pan). A test is provided in lunatic/test/animatesprites.con. It should be run in E1L2 and only with the Lunatic build.
implement 'setcfgname'.
Factor out a block of code into C_SetCfgName() and use that from lunacon.lua.
on 'starttrack' with null music, issue a 'soft' error.
That is, one that doesn't break the control flow.
implement NORESET flag for gamevars.
when failing to load file, don't append '.m32' if already there.
So that there are no error messages like "M32 file `a.m32.m32' not found." Also, in build.c's 'save as' code, add a bound check that would probably always pass in practice, but looks a bit safer and may fail in very cornerly cases.
when printing error line, replace tabs with spaces.
very primitive gamevar handling logic for {save,load}mapstate.
in {save,load}mapstate, warn that saving/restoring gamevars is NYI.
implement NODEFAULT flag (1024) as session variables.
This is in contrast to C-CON, where the implications are not clearly obvious. See this discussion/monologue: http://forums.duke4.net/topic/955-eduke32-scripting/page__view__findpost__p__159613 Currently not implemented for session gamevars: - per-player, will be made a global one instead - per-actor, will be made a plain per-actor one instead DONT_BUILD.
add necessary identifier-is-not-gamevar check.
Add LOGO_FLAGS bits 4096-32768 to disable E1-E4 bonus scenes, respectively.
Each scene is disabled in its entirety, there's no way to disable only a particular part. DONT_BUILD.
r/w gamearrays in binary mode, checks for mapdiff.sh, add test/gamearray.con.
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