Build 4292
SVN-
implement 'precache'.
SVN handles and Git names are merged into one person.
implement 'precache'.
add option -ferror-nonlocal-userdef, on by default.
BUILD_LUNATIC.
accept empty square brackets for {g,s}etuserdef optional index part.
error on userdefs accesses with non-local current player.
Add lunatic/test/getuserdef.con.
Get rid of neartag* global variables. LunaCON: fix 'operate'.
add codegen option -fbad-getactorvar-use-pli for C-CON compatibility.
Also, improve -Wnumber-conversion warning by printing the resulting number. BUILD_LUNATIC.
make gv.current{Level,Episode} one-based and document them.
Also, in LunaCON, make player .palette member read-only. BUILD_LUNATIC.
for readgamevar, if ud.config.scripthandle < 0, keep value, don't err.
Block off hacks for the primitive splitscreen CON mod with SPLITSCREEN_MOD_HACKS so they are no longer compiled.
These hacks could no longer be allowed to co-opt the fake multiplayer mode, used for local testing and mod development. I have half a mind to remove the hacks outright because they could be likened to drilling bolts directly into your car engine just so you could mount a bowling ball as a hood ornament. However, I don't want to take away the splitscreen hack mod from anyone who uses it, and the work done on these hacks should be useful if proper splitscreen were implemented internally using per-player input and multiple renderer/audio passes.
Always run tsprites with statnum TSPR_TEMP though EVENT_ANIMATESPRITES, such as the "show opponent's weapon" in multiplayer.
Add EVENT_LOADMAP, EVENT_SAVEMAP, EVENT_PRELOADMAP, and EVENT_PRESAVEMAP.
Some are more useful than others.
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.