Build 4194
SVN-
invalidate a wall when its sector's visibility has changed.
SVN handles and Git names are merged into one person.
invalidate a wall when its sector's visibility has changed.
Guard a sprite/actor access with sector[].hitag as index from OOB.
Unlikely but possible for rogue CON code.
handle HUD model 'fov' DEF token.
This "simply" requires an appropriate factor in the projection matrix. Also, get rid of a special-case factor for >=1.6 aspects (making HUD models wider then, I think).
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.
a.m32: add [']+[F] menu function setting xvel=1 on all sel. wall/floor sprites.
For sanitizing underwater sections, see r4166. Also, don't print "Menu function executed successfully" when the function printed something itself.
Amend r4142: make e.g. 'include a' (names shorter 4 chars) append ".m32".
DONT_BUILD.
make underwater blocking floor sprites w/ xvel 1 NOT act like sprite bridge.
Likewise for blocking wall sprites. This makes it possible to construct underwater sections containing complex spritework without losing the "underwater-ness" when over such sprites, in a backward-compatible way. Actually, the check is for bit 1 being set, but all other bits should be considered reserved.
lunatic/util/foreachmap.lua: don't expand .xxx after ']'.
Add an example searching for all maps containing blocking floor-aligned sprites in underwater sectors.
show a message when setting the initial position with SCROLL LOCK.
fix Ctrl-F/Ctrl-G as "key FIFO" keys, used in Mapster32.
By detecting them in the SDL_KEYDOWN events. This list is getting a bit ridiculous...
a-c.c: prevent stray lines on bottom of sprites by saturating v. tex coords.
The functions mvlineasm1, mvlineasm4 and tvlineasm2 can now be set to clamp the vertical texture coordinate (vplc), preventing the unsightly stray lines on the bottom of non-y-flipped sprites. (The first part of this effort, r3483, handled their top). However, this is only enabled for the mvlineasm ones: the vectorized variants suffered almost no slowdown (even though a PADDUSD SSE instruction would be a nice thing to have), while it was pretty significant for the sequential translucent ones. Summarizing, this leaves two cases where stray lines may appear in the non-ASM build (the saturation is NYI for a.nasm): - at the bottom of y-flipped sprites - at the bottom of translucent sprites (can be toggled by #define) Another observation is that recent GCC generates much faster code for this stuff than Clang from SVN.
In exprs like "Bmemcpy(&p->pos.x, &sprite[i].x, sizeof(vec3_t))", drop the ".x".
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.
save r_usetileshades and r_pr_artmapping with mapster32.cfg.
take initial map file name from ExtPreInit()->G_CheckCommandLine().
Instead of directly in build.c:app_main(). Previously, it was possible that an argument to an option, e.g. "WGR2" with "-game_dir WGR2", would get interpreted as the initial map to load. This in turn would attempt to execute WGR2.cfg as sequence of OSD commands -- where that file is an EDuke32 config file instead! Now: maps are passed without any options, e.g. "mapster32 [opts...] debug.map". The map file name is not added to the "additional parameters" for map testing.
At end of G_RestoreMapState(), update g_player[].ps->i from STAT_PLAYER sprites.
This fixes a potential crash caused by violating the expected invariant sprite[g_player[player_index].ps->i].yvel == player_index otherwise.
Fix OpenGL texture cache "leak" and slightly tweak hash string construction.
The leak happened because a struct was hashed that had uninitialized bytes in padding inserted by the compiler. The hash string in now constructed as concatenation of three CRC32s as 8-byte hex strings, i.e. the individual CRC32s are padded with leading zeros. Note to users: because of the hash change, it's sensible to delete the 'textures' and 'textures.cache' files.
Revert "Move CONTROL_ProcessBinds() to CONTROL_GetInput()." [r3981]
That change confounded character-based input with e.g. HUD control under certain circumstances, see http://forums.duke4.net/topic/6845-eduke32-savegame-annoyances/ Also, BUILD_LUNATIC ... just for the hit.sect -> hit.sector change.
Clean up some GUI/WM minutiae. Should fix linking Mapster32 on *nix with HAVE_GTK=0.
Merge a patch and suggestions from NY00123 improving SDL2 support. This fixes the flickering in OpenGL in SDL2 on Windows. It also provides a proper list of resolutions.
Fix OpenGL under SDL && Windows. (Almost. SDL 1.2 works fine, but SDL2 has an unresolved problem where OpenGL screen updates flicker over a black background.)
Split the handling of audio based on RENDERTYPE into a new variable named MIXERTYPE, allowing Windows builds to use SDL for input and rendering (RENDERTYPE=SDL) while using DirectSound and Windows' MIDI interface (MIXERTYPE=WIN [current default]) so that EMIDI works.
Fix the Classic renderer under SDL2.
rename hitdata_t member 'sect' to 'sector' for consistency. DONT_BUILD.
Clear GL depth buffer before drawing a frame in Polymost. This should fix the issue with skies in the Duke64 TC.
in model preprocessing, implement cos/sin by table lookup.
This reduces the proportion of time the trig calculations take of the whole preprocessing from 50% to about 13%.
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.
make spriteext[].{x,y,z}off independent of xdimen/viewingrange/aspect.
The offsets (that will translate the axes for .pitch/.roll rotation) were calculated improperly with screen sizes other than 1280 x 1024 and were dependent on other related variables. The fix proceeded empirically, i.e. mostly trial, error, and some educated guesswork. (It's telling that the magic constant 1280 is needed.) A test for Lunatic is added to test.lua that will rotate SEENINES. Bug pointed out by Mblackwell.
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".)
A couple of minor changes.
- engine.c: comment out some unused decls with RELEASE=0 DEBUGANYWAY=1 - Lunatic: update dump.lua and v.lua - Lunatic: test/test_geom.lua: note a perf regression (wrt older LuaJIT, or I mis-configured / built something wrong)
fix _digitalnumber, remove player._INPUT_BITS, add sprite.all().
a.m32: add 'moveselsects', moving them so that each sector's 1st pt is at (0,0).
after auto-inserting inner sector, change sectnums for sprites now in it.
(Auto-insertion of an inner sector from a loop happens either because the loop is created in an extended sector, or because it has been punched through a ceiling/floor into the upper/lower neighbor sector.)
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
allow inserting point on wall line even if a sprite is highlighted.
Note: the wall line will not light up periodically, but point insertion will be possible nontheless. A bit inconsistent, but I didn't want to do a full analysis of which side effects allowing a sprite highlight and a line highlight to coexist at the same time would have.