Build 4108
SVN-
make it possible to build with LuaJIT 2.1, add -Lopts=profile there.
SVN handles and Git names are merged into one person.
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().
slight Makefile tweak for Windows preparation.
Add doc/how_to_build_lunatic.txt and doc/lpeg-lunatic.patch.
retire per-sprite tsprite access for per-tile animation callback reg.
Don't yet make this official API though, since there are unresolved issues with newly created tsprites potentially being fed back to the animation loop. Add xmath.angvec(), xmath.bangvec(), tspr:set_sectnum(), tspr:setpos().
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
partially fix LTO=1 build with GCC.
Having to tag these few variables and functions as ATTRIBUTE((used)) seems sensible, but what follows is just strange. OSD_Printf? headspritesect?
make g_playerWeapon an array of a corresponding bcarray type.
document the additions of the preceding commits.
various changes.
- swap 2d and 3rd args in xmath.rotate() -- now rotate(point, ang, pivot) - add vec3 method 'rotate', calling xmath.rotate - store game tic count in savegames
many changes, motivated by writing test "helixspawner".
- some renames of functions/methods - con.actorvar: explicitly allow (for now) boolean and number values - added gv.gametic, player.holdskey(), player.all(), actor.check*()/hit*(), gv.rendmode, gv.REND, <bitint>:mask(), spr:getheightofs() - make read of nil var in "finalized" (live) module produce error, too - add test/helixspawner.lua
in con.action and con.move, allow mixed number/string key tables.
E.g. con.action{0, 4, delay=20}; for convenience, viewtype and incval are initialized to 1 (not 0) here.
retire an actor's sprite[].hitag/lotag for new actor[] members.
add actor methods allowing overriding action delay and move hvel/vvel.
Add testing code for an example actor 1275 (newspaper) to test.elua.
require'CON.ACTION' etc. gets composites from CON; add actor.MOVFLAGS.
don't register con.action/move/ai by name, make these return a cdata.
merge updatesector and ~breadth, making the former accept a flag.
retire 'geom' module, putting vector types into xmath.
allow serialization of tables in more general cases.
begin writing LunaCON documentation.
don't pass 0x80000000 to int32_t arg, document xmath functions.
document vector types, add forgotten warning icon.
various minor tweaks and fixes.
- Pass original module name (dot=dirsep) to module via our require() - geom.lua: fix some operations using the vector type constructor - geom.lua: provide constructor for ivec3, useable like vec3