Build 4242
SVN-
General
Fix USE_OPENGL=0 build. DONT_BUILD.
SVN handles and Git names are merged into one person.
Fix USE_OPENGL=0 build. DONT_BUILD.
Lunatic/m32: make Mapster23 actually start stand-alone, oops.
fix setup under Mapster32, remove a few obsolete lines in defs_common.lua.
fix a couple of spelling mistakes in the doc, found using Emacs ispell.
fix parsing negated labels, getnumber* with neg. 'max'.
Exposed by this snippet from a.m32: getnumber256 .owner "OWNER (projection picnum): " -MAXTILES Now, Alt+KP2 works as expected in 3D mode.
Really fix the Pause key on Windows/SDL2.
This requires enabling the same workaround as for Linux. Maybe it's not system-dependent at all.
Do not consider system gamearrays for updating from demos.
This generally fixes demo playback. Before, tilesizx[]/tilesizy[] were written into twice as many bytes as needed. Now, don't do that at all.
Fix mouse buttons 4 and 5 on SDL2/Windows.
Fix building stand-alone libcache1d.so.
a-c.c: Make vector extensions also be compiled with Clang.
I was checking for GCC >= 4.7, while Clangs pretends to be GCC 4.2. Use a feature test macro instead. The comment I made in r4161 regarding GCC vs. Clang code was wrong. Now, Clang generates slightly faster code for these cases (solid and masked 4-pixel wide vlines).
fix assignment to projectile sound/bsound/isound.
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...
fix ported A_FurthestVisiblePoint().
on non-Windows, make textmode=0 the default, just like in Windows.
This fixes some init and update anomalies: before, - init would always be the graphical mode (0), but writing merely "osdtextmode" would switch it - osdtextmode would not get saved to the cfg
textfont.c: make TAB character display blank.
This renders tweaks like r4122 unnecessary. Also, note a "bug" with the program generating that C code.
In G_SaveMapState, fix 1024-byte write beyond array bound on 64-bit platforms.
This was caused by mismatched for types mapstate_t's animateptr[] and the global one (int32_t vs. int32_t *). Bump BYTEVERSION.
Add SDL scancode -> ASCII value translation for the "key FIFO" for ESCAPE.
This fixes ESC in certain situations such as the editor map selection menu.
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 quote and pause keys.
- Add SDL scancode -> our key code map for SDL_SCANCODE_APOSTROPHE - Remove duplicate map for SDL_SCANCODE_PAUSE
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.
Fix mouse grabbing in SDL debugging builds.
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.
In C++ build, fix "narrowing conversion inside { } is ill-formed" warning.
This also exposes an actual issue. The sound definitions may be dynamically remapped, in which case they are not necessarily <=255 any more. BUILD_LUNATIC.
Prevent calling function pointers cast to an incompatible type.
Most often, this had happened when casting comparison functions for qsort() like these: "int yax_cmpbunches(const int16_t *b1, const int16_t *b2)" to a function pointer type expecting "const void *". Alas, this is undefined behavior: see http://blog.frama-c.com/index.php?post/2013/08/24/Function-pointers-in-C and posts linked from it. At least two cases have not been fixed: - The savegame system maintains pointers which are either to data or a function in the generic "void *". This ought to be made into a union. - Probably also: #define OSD_ALIAS (int32_t (*)(const osdfuncparm_t*))0x1337
Add WIP x86_64 assembly texture mapping routines.
- Currently: only tvlineasm1 and tvlineasm2, but incomplete (no reverse translucency, nonpow2 textures will crash) - For System V AMD64 calling conventions; requires YASM
Revert "Prettify the DEF progress meter by relocating '\n' en masse."
This reverts commit c7e51147f1869d42fc8365f748bb8f6bd4c6fc2f. [r3835] Conflicts: eduke32/build/src/defs.c [Dunno what caused this, but I cleaned this out. Also, the change from build.c was not reverted.]
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.
Lunatic/util: fixes for Windows.
- Need to open some files in binary mode. - MinGW's "find" doesn't provide -L option, detect that.
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().
in control.lua, use C's fwrite() to write gamearray to disk, fix typo.