Build 4397
SVN-
provide access to wall[].blend.
SVN handles and Git names are merged into one person.
provide access to wall[].blend.
patch up off-by-one line numbering problem. DONT_BUILD.
add safety checks for qgetsysstr/STR_{,MAP,PLAYER,VOLUME}NAME.
Add test/qgetsysstr.con. BUILD_LUNATIC.
qgetsysstr/STR_MAP*NAME: add informative err. msg. for void vol/lev.
warn if a 'spriteflags' is issued after its actor definition...
... or another 'spriteflags' or 'sprite*' directive.
warn if using reserved bits in 'spriteflags'.
Reserved bits are those that have no predefined SFLAG_* label in CON.
Add new actor flag and predefined CON label SFLAG_NODAMAGEPUSH.
This flag is set from C for some enemies that should not be pushed back when damaged, such as TANK. Both the tile flag and the per-sprite flag are used (i.e. the ultimate flag value is the XOR of the two). Add currently non-functional example to test.lua that attempts to set this bit for NEWBEAST.
implement passing string label to 'spawn' OSD command.
Unlike in C-CON, it only tries an exact match with the given and uppercased label, not "full" case-insensitive search.
fix 'getincangle'.
add and document option -ferror-negative-tag-write.
Rename SPRITE_* flag enum constants to SFLAG_*, for consistency with CON.
rewrite shadexfog.create_128_trans to allow creating fewer tables.
It must be a power of two in [2 .. 128]. Rewrite test/sprite_access.con's liztroop example to account for that. Also, add function shadexfog.create_trans() which aceepts a function (r,g,b,R,G,B) -> blended (r,g,b) and rewrite shadexfog.create_additive_trans() in terms of it.
add *actor[].blend as an alias to .detail, *tspr[].tsprblend analogously.
See lunatic/test/sprite_access.con for a LIZTROOP that periodically smoothly alpha-fades in and out. (Assuming that the 128 alpha blending tables from shadexfog.create_128_trans(1) are installed.) BUILD_LUNATIC.
remove sprite members 'detail' and 'filler', add 'blend', make r/w.
In the C code, rename sprite[].filler to 'blend'.
Also, fix a missed .filler -> g_ambiencePlaying[] rewrite in the editor. In C-CON, 'detail' is kept as alias to C-side (former) .filler / now .blend, but that name is *deprecated*.
rename sprite[].filler member to 'blend' on the Lua side.
From LunaCON, remove 'detail' as alias to that member.
add and document -Wnever-used-gamevar and -Wnever-read-gamevar.
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