Build 3666
SVN-
fix test.elua after map-int VX and one rename, add one microbenchmark.
SVN handles and Git names are merged into one person.
fix test.elua after map-int VX and one rename, add one microbenchmark.
new-generation map format, in-memory representation ("map-int VX").
The Lunatic build compiles with new structures for sector and wall types. They have separate members for TROR {up,down}{bunch,nextwall}, so there are no conflicts with other uses of members into which they were previously shoehorned. Also, the maximum bunch limit is bumped to 512 in that build. Currently, loading from V7/8/9 and saving to V7 and V8 are supported.
move utility scripts to util/, bittest.lua -> test/test_bitar.lua.
fix stuff after last commits; translator: clean up -f parsing code.
Also, implement 'cmenu' in LunaCON, make 'definequote' also allowed as inner command.
replace DukePlayer_t set-member methods with metatable magic.
So that members needing it are checked when they're assigned to using the usual syntax. What kind of check to perform (sector, player, ... x whether negative values are allowed) is written in a declarative fashion inside the C declaration. Also, make Lunatic's MAXQUOTES be C's OBITQUOTEINDEX and bound-check an access of sprite[p->wackedbyplayer] in the C code.
get rid of some now unneeded set-member methods, add others.
access to show2dsector[], fix some permit-negative bound checks.
gen. cleaner code, make actor[].movflag internal, update listglobals.sh
custom integer types treated as bitfields.
Used for engine struct's (c)stat and actor[].flags members.
begin gamevar system. Not much there yet.
In Lunatic, gamevars (variables that are saved with savegames) are per-module.
make palette_t a bcarray-generated type, various tweaks.
- Increase LuaJIT max. machine code limit to 10 MiB
ifsquished.
chaining of actor callback functions.
For events and actors, a flag can be now passed whether to chain the new function at the beginning or end of an already existing one, or to replace it entirely. Also, for the translator, add option -fno-error-nostate, disabled by default.
readarrayfromfile: fail silently if file can't be opened.
simplify RETURN handling, make its behavior across events same as C-CON.
There's only one RETURN value on the C side (g_RETURN), which is also referenced from Lua. Upon entering an event, its value takes on the per-event default one, and its value when the event code finishes is passed back to the game. Independently of that, its value is always saved and restored across event calls.
add LuaJIT's 'dump' module, printing traced bytecode, IR and mcode.
actor usertypes from CON, set SFLAGs as 2nd gameactor() arg in Lua.
In passing, fix a couple of omissions: gameactor() being passed nil's in the middle, more than one moveflag to CON *actor.
make some variables local, fix some bugs found using listglobals.sh.
fix weapondata_t read access, Lua->CON line mapping for if* commands.
make ivec3 and dvec3 types share same metatable, orthogonalize API.
Specifically, remove ivec3's blen1() method and add from/to BUILD coordinate (z scaled by 16) conversion methods.
slightly cleaner weapondata_t access.
Also, for the embedded translator: don't warn on unrecognized command line opt.
properly protect weapondata_t members, fix Lua->CON line mapping.
Also, make -Werror-bad-getactorvar disabled by default.
allow indexing some weapon/inventory arrays with their names.
g_tile access, rudimentary system gamearray support for the translator.
The only operation for which proper code is generated is reading a single value from a system gamearray.
spritesof{stat,sect} iterators that allow deletion inside the loop.
Also, - an optimization for sprite[]:setpos(). Calls to get_sprite_index() seem to be pretty slow (at least when they're not compiled). - add getzrange to the dynsymlists
correct SFLAG_* and actor_t definitions.
replace some allocations by static data, some translator fixes.
Fix 'setsprite' and 'music'. A good timing test for actors performance is the starfield of WGR2's E1L1 ("Nexus").
also save min, max actor times; fix release build.
make con.ai accept literal action/move, check for calling from top.
Also, fix con._setgamepalette.
fixups and debugging helpers.
- add LuaJIT's 'v' module printing trace info - translator: fix game function name definitions - revert math.fmod -> math.modf, they are different! - disable JIT compilation for a function we're getting strange crashes with - Make some of DukePlayer_t's members 'bool' on the Lua side. It's way too easy to write something like "ps.jetpack_on" where "ps.jetpack_on~=0" was meant. [Background: Kyle873 observed that Duke was always floating.] - Error out if looping in our_module(). I find this behavior more logical than returning true. - fix a couple of missed FORBID variables
initialize test Lua state earlier so that 'setdefname' has an effect.
sector[]:zrangeat(), 'getzrange' command for the translator.
Also, fix quote commands there.
export C functions that may call into CON events using the Lua C API.
We must not call these functions using the FFI, since the Lua state is considered locked across such calls.
begin fixing up the code because it's now actually live!
compile defs.ilua as bytecode and load it from the executable.
more commands...
more commands, timing test for xmath's sine functions.
xmath module + timing test for distance functions.
input access.
sprite.change{sect,stat}, access to more members, member read test.
[gs]et{player,actor}var, access to protected projectile members.
working tsprite methods, static members, struct array timing test.
projectiles...
conditionally compile out more legacy code, remove old mixed mode code.