Build 3370
SVN-
Generale
Bring the SDL.h include in SDLMain.m up to speed with driver_sdl.c in jaudiolib and sdl_inc.h in the engine. Also address some Apple macro problems.
Nickname SVN e nomi Git sono unificati per persona.
Bring the SDL.h include in SDLMain.m up to speed with driver_sdl.c in jaudiolib and sdl_inc.h in the engine. Also address some Apple macro problems.
fix a possible crash with texel-hitscan.
Reproduced as follows (assuming all tiles have texel-hitscan for simplicity): In E2L5, shoot the opening switch with the shotgun, aiming for the border. The crash occurs because the *other*, depressed switch tile isn't yet loaded when we index into its tile storage. Dereferencing 0+small number == BAD!
fix stack discipline.
Preventing a continuously growing stack top and inevitable program termination. Also, commonize the error handling to live on the engine side.
Remove commented code using former engine variable "automapping".
Fix SVN mime-types of binary files.
Windows batch file: for /r %%G in (*.a) do svn propset svn:mime-type application/octet-stream "%%~G" for /r %%G in (*.lib) do svn propset svn:mime-type application/octet-stream "%%~G" for /r %%G in (*.dll) do svn propset svn:mime-type application/x-msdownload "%%~G" for /r %%G in (*.ico) do svn propset svn:mime-type image/vnd.microsoft.icon "%%~G" for /r %%G in (*.icns) do svn propset svn:mime-type image/icns "%%~G" for /r %%G in (*.bmp) do svn propset svn:mime-type image/bmp "%%~G" for /r %%G in (*.png) do svn propset svn:mime-type image/png "%%~G" for /r %%G in (*.xcf) do svn propset svn:mime-type image/x-xcf "%%~G" for /r %%G in (*.psd) do svn propset svn:mime-type image/vnd.adobe.photoshop "%%~G" for /r %%G in (*.nib) do svn propset svn:mime-type application/octet-stream "%%~G" for /r %%G in (*.map) do svn propset svn:mime-type application/octet-stream "%%~G" svn propset -R svn:mime-type application/octet-stream polymer/eduke32/Apple/lib svn propset -R svn:mime-type application/octet-stream polymer/eduke32/Windows/lib/32 svn propset -R svn:mime-type application/octet-stream polymer/eduke32/Windows/lib/64 svn propset -R svn:mime-type application/octet-stream polymer/eduke32/source/jaudiolib/third-party/Apple/lib svn propset -R svn:mime-type application/octet-stream polymer/eduke32/source/jaudiolib/third-party/Windows/lib/32 svn propset -R svn:mime-type application/octet-stream polymer/eduke32/source/jaudiolib/third-party/Windows/lib/64
DEF "voxel": fix a tile range check failure message.
Replace wall of dup'd code in Gv_AddSystemVars with something more readable.
Specifically, have a weapondata_t type mimicking the aplWeapon* arrays. Keep a list weapondefaults[] which undergoes some static->dynamic tweaks and then makes its way to the WEAPONx_XXX per-player gamevars.
Fix rotation-fixed useractors (those having usertype bit 4 set).
Rotation-fixing happens for a couple of hard-coded statnums that presumably never move (DEFAULT, STANDABLE, FX, FALLER, LIGHT), but for actors it wouldn't make sense since the common case is that they do move. For this reason, bit 4 was introduced in r1934. The position of such useractors will not diverge due to error roundoff accumulation in rotating sectors (SE0, train).
save r_usenewshading in configuration file.
engine.c: remove some old "#if 1"s, add compilation switch MULTI_COLUMN_VLINE.
Unconditionally enabled, but useful for comparing the behavior of the 1-column vline functions against the 2- or 4-column ones.
fix drawing tilesizy=512 walls, use non-pow2 routines with pskies.
The former is really only a workaround. Walls/vertical sprites/pskies with ysize 512 (and presumably greater, but this was not tested) are rendered with one shade higher at the borders (1 pixel vlines) because of a certain assumption in the ASM (see comments there). With very dark shades, the palookup[] buffer is accessed oob. We simply allocate 256 bytes more at the end for each. The latter is only for CLASSIC_NONPOW2_YSIZE_WALLS builds, which is not enabled yet. It seems to matter only for the uncommon case where the such pskies repeat in the height. A 1680x1050 window fully covered with such a sky is then rendered at about 60/85 the FPS for me (mostly due to not using the 4 pixel vline routines), so it may be leaning a bit too much on the side of correctness. A compilation switch DEBUG_TILESIZY_512 is introduced in engine.c for demonstration purposes.
in 3D mode's tile info, highlight members of swapped bottom walls.
- If aiming at a swapped bottom wall, display "Wall <wallnum> -> <otherwallnum>" - highlight pic, shade, pal, cstat in yellow then - in printext256, accept at most 3 digits for the color format string (e.g. ^123)
In Polymost, make r_usenewaspect=2 fog independent of screen x size.
when pasting single wall, take over bits 4, 1+64 and 8+256.
That is, everything concerning orientation. Previously, it was wrongly the bitwise NOT of these bits that got taken over. In particular, if bit 2 (swap bottom walls) would get pasted, ridiculousness could ensue.
Move fog calc routines into polymost.c, declare in engine_priv.h.
Don't enable fog in polymost_printext256() and when drawing tile view in M32.
The new "r_usenewshading 2" mode could darken these otherwise.
Classic-like visibility/fog for OpenGL modes, r_usenewshading 2 (new default).
Implemented using GL_LINEAR fog. The only source of difference (besides the obvious indexed vs. true color) should now be the distance constant, which still had to be determined experimentally. Polymer implements this mode in its fog fragment program part. Parallaxed skies are always drawn with full visibility, I'm not sure if there are any maps that expect otherwise. Also, accidentally committed: factor out initialization code from polymost_printext256() into gen_font_glyph_tex(), small game.c changes.
correct message when changing shade by small steps ([+], [-], mwheel)
OpenGL modes: factor out shade factor calculation.
This also means that the "r_shadescale_unbounded 0" option will work in Polymer (except on models).
engine.c: factor a frequent getpalookup() use into getpalookupsh().
Limit attempting to toggle DWM off when using OpenGL modes to Vista/7, because Windows 8 no longer supports disabling DWM. Apparently, Windows 8 contains a software DWM renderer, and all of the "Metro" bs is directly tied to DWM, so there is no longer a way for an app to disable it at will.
In 3D mode, [,] auto-aligns walls to the left.
fix LAlt (carry over xrepeat) option for auto-alignment [.].
Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs: *libogg 1.3.0 *libvorbis 1.3.3 *zlib 1.2.7 *libpng 1.5.13 *libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd *SDL_mixer 1.2.12 (for RENDERTYPE=SDL) *DirectX import libraries: dsound and dxguid (now included) To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons. All compiler and linker warnings when building in 64-bit mode have been fixed. Remaining 64-bit to-do: - The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll. - RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version(). - DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in. - Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.) This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d. In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.
Port system gamearray access from M32Script to CON. Expose tilesizx and tilesizy.
Also, fix deficient logic in Gv_Free and Gv_Clear (both M32 and CON) so that gamevar and gamearray erasure results are (closer to) correct, and so that the game does not crash when system arrays are accessed from CON because they all have been nulled.
Don't call setaspect_new() at end of rotatesprite.
This fixes 2nd and following rotatesprite calls drawing differently from the first in a context with custom set-up aspect, as reported by Lezing here: http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__143090 Also, back up and restore the aspect state across EVENT_DISPLAYREST.
Initialize BADGUY sprite flags for hardcoded enemies.
... instead of switch/case-ing them in A_CheckEnemyTile(). Because this requires bumping BYTEVERSION, we also get rid of the excess trailing bytes in the save game's "rest" data. (See r3052.)
Makefile tweaks, protect sprite[].picnum.