Build 4190
SVN-
in fs.listpath() use FIND_NOCURDIR. Also document that function.
SVN handles and Git names are merged into one person.
in fs.listpath() use FIND_NOCURDIR. Also document that function.
document a couple of player members, especially some 'bool' ones.
Important because in Lua, a value of zero yields true in a boolean context. BUILD_LUNATIC.
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
slightly tweak the event/actor times printout when exiting.
fix assignment to projectile sound/bsound/isound.
add two names forgotten for dynsymlist.
Let's BUILD_LUNATIC to see whether it still works...
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.
fix ported A_FurthestVisiblePoint().
implement NORESET flag for gamevars.
add 'lua' OSD command, permitting to execute arbitrary code.
That is, everything that would be possible via scripting.
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.
make it possible to build with LuaJIT 2.1, add -Lopts=profile there.
add forgotten g_argv to dynsymlist_m32.
rename hitdata_t member 'sect' to 'sector' for consistency. DONT_BUILD.
document xmath.kangvec() and hitscan().
make hitscan accept ray as vector, add xmath.kangvec.
Also, add hitscan test to test.lua -- a crosshair-like sprite is spawned and continuously updated to the position of where the player aims at.
document gv.getangle(), -Lopts=strict, sec:zrangeat(). DONT_BUILD.
r/w gamearrays in binary mode, checks for mapdiff.sh, add test/gamearray.con.
make -Lopts=strict also error on some table reads w/ nonexistent keys.
Specifically, for the tables returned with require"DEFS" etc. This allows to check if maybe parts of a bundle of files is missing (because comparisons like "spr.picnum == D.NONEXISTENT_NAME" do not yield errors normally).
add option -Lopts=... from command line.
Permitting to enable various debugging options. See "eduke32 -debughelp" for which ones those are: they were previously settable from defs_common.lua, and a new option 'strict' has been added that makes accesses to void sprites error. (That is, already "sprite[i]", not "sprite[i].some_member".)
fix _digitalnumber, remove player._INPUT_BITS, add sprite.all().
gv.getangle() vs. analogous Lua function test, add some anchors to doc.
Also, in listglobals.sh, check for file existence.
in control.lua, use C's fwrite() to write gamearray to disk, fix typo.
update documentation a bit.
- add gv.GET, gv.WEAPON, gv.RETURN - specify that sprite[].x/y/z and wall[].x/y are 32-bit ints - add an example for con.longjmp() - add an appendix listing the RETURN usage of various events
on the Lua side, rename gv.g_RETURN to the prettier gv.RETURN.
On the C side, keep the name g_RETURN. I'm still superstitious about dropping the "g_".
retire gv.*_WEAPON and gv.GET_* for gv.WEAPON.* and gv.GET.*.
fix passing some string members to con.action(), rewrite conststruct().
... by creating a struct with 'static const int' members, as recommended on http://www.freelists.org/post/luajit/Performance-implications-of-large-FFI-constants,4
allow a certain type error present in 1.3D GAME.CON to pass.
a couple of trivial changes.
sync defs.ilua's user_defs with r3993, adding member MasterVolume.
add LuaJIT's jit/bcsave.lua and headers for synthesis build preparation.
prepare Makefiles for synthesis build.
- libs and headers are expected in platform/Windows/* (not there yet) - prefix Lua #includes with luajit-2.0/ - build bytecode objects with absolute path name (used for debug info)
disable printing debug messages for the preview build. BUILD_LUNATIC.
sanity-check some arguments passed to con.action().
Add pre-compiled LPeg 0.12 for 32-bit Windows (MinGW).
rename test.elua to test.lua.
The old extension is an artifact from when I was thought that extensions should label whether a Lunatic module is to be used in internal/external contexts. Also, change test.lua slightly and commit a little updated documentation.
protect global environment.
remove DBG_ variable for _DEBUG_LUNATIC=0.
fix some must-fail tests and module()s without require'end_gamevars'.
document previous additions and more of the existing stuff.
rework weapondata_t __newindex handling for the sound members.
Also, in test.elua, add a currently failing must-fail test (i.e. it wrongly succeeds where it should not!).
revamp sector changing/updating functions of sprites.
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.
call G_ShowView() using the Lua C API and not through the FFI.
G_ShowView() may call events. Ouch!
document more stuff (not too carefully), add red DRAFT marker.
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.
swap first and second arg of con.spawn().