Build 2352
SVN-
General
osxbuild.sh: detect whether we're keeping the source in SVN or git.
SVN handles and Git names are merged into one person.
osxbuild.sh: detect whether we're keeping the source in SVN or git.
Update samples/trueror1.map with some tests of sprites lying on TROR floors.
Also, there's a "ladder" that passes through a TROR portal, and the mirror in that map has been fixed for the classic renderer.
Fix extended ceiling/floor picnums taking on picnum 0 in Polymer.
The reason was that drawmasks(), which was where the resetting of the fake RoR textures happened under Polymer, can be called from polymer_displayrooms() when mirrors are present. I was assuming that drawmasks() was only ever called after the 'main' drawrooms and that hence the sequence of fake RoR tile tweaking was set, reset, set, reset, ... which it was not. Now, do the resetting explicitly after every drawmasks() in the editor.
When loading a map in-game, clear TROR wall members corresponding to up/down links.
I find this cleaner for two reasons. First, lotags won't get in the way of neartag(), so that doors and switches near constrained TROR walls can be pushed. Second, this removes the information leak so that CON coders aren't tempted to read that values directly before a proper API for that comes along. When writing out a map in-game (e.g. with dndebug), restore the respective members so that it can be loaded in the editor again.
engine.c: Rewrite tslopevlin (translucent slope vline texmapping) for clarity.
Fix player being not blocked by sprites lying on an extended floor.
getzrange() returns the floor rather than the sprite if their heights are equal. Now, make an exception for extended floors (analogously, ceilings).
Fix use of an uninitialized variable in P_FindWall->FindDistance2D with noclip.
engine.c: replace 0xXXXXXXXX literals with INT32_MIN/MAX; whitespace changes.
Fix a couple of out-of-bounds accesses when roaming around with noclip.
- guard cansee() against negative sectnums (return 0 immediately), since it's often called with the player sectnum as one argument - in resetpspritevars(), don't inset APLAYER sprite if sectnum < 0, which can happen if a map is started in void space accidentally (e.g. from the editor) - two checks before accessing sector[] with a player sectnum
Fix sprite rendering glitches with r_usenewaspect=1 in 8-bit mode.
Make 5th mouse button functional in Windows.
Draw HANDHOLDINGLASER and ~ACCESS with guniqhud=200 and 201, respectively.
This fixes updateanimation picking up foreign (and thus potentially oob) frame numbers at "3: c > n".
Remix mdsprite.c's updateanimation() to look prettier and clearer.
Specifically, - rearrange conditionals - factor out constant expressions - add a couple of debugging printfs for extraordinary events (oob frames) - add VERIFY comments for implicit assertions I'd like to verify sometime Also, one calloc -> malloc.
Debugging helper disabling a.nasm calls with OpenGL renderers.
Uncomment #define DEBUG_VALGRIND_NO_SMC in duke3d.h to be able to valgrind --smc-check=none (or the default stack-only) with Polymost and Polymer renderers.
Patch up out-of-bounds access (r/w) when mixing 16-bit stereo *source* data.
... by allocating two bytes more for the mixing buffers.
Fix uninitialized mem access in dorotatesprite with thin tiles (e.g. 3085).
jmact/control.c: rewrite strange looking loop.
Draw translucent black background only when playing (back a demo or oneself).
Fix menu text not drawing when not playing (back), introduced in r2326.
Fix zero-size calloc when enumerating a joystick with no hats in SDL.
Remove a couple of redundant declarations.
interface to events.
Add some #includes to gameexec.h and sector.h so that they can be included directly
Use a tokenlist for the event names and add tokenlist typedef to gamedef.h.
Make r_maxfps functional in demo playback.
Probably fix crash when reaching light count limit in G_MoveEffectors SE50 code.
use enum constants
rotatesprite(..., windowx1,windowy1,windowx2,windowy2) --> rotatesprite_win
a bit rearrangement, getbunch.
game.c: trivial tweaks to reduce code duplication (which is hard on the eyes)
fix crash with 'vidmode <bpp>' introduced in r2311.
Factor out four instances of identical code into M32_DrawRoomsAndMasks().
Various menu tweaks and one fix.
- make PGUP/PGDN and HOME/END behave as expected across all menus - in keyboard/mouse button mapping menu, draw function names that have been given custom names via CON with pal 8 for easier recognition - fix tinting of function names in mouse button mapping menu
When in menus, always draw a black (33%) translucent background.
Internally, there's a new function fade_screen_black() that implements the fading more efficiently than calling rotatesprite for classic, and uses tile 0 (assumed to have at least 64x32 size) in the GL modes. The black background of the user map selector is still done with rotatesprite and tile BLANK in every renderer.
Check 'bpp' parameter to vidmode OSD command in EDuke32.
So that the game won't exit if you write 'vidmode 4' when intending 'setrendermode 4'.
fix interface when compiled with 'pointered' main arrays. Argh!
Fix not-initialized variable warning in 'soundanims' CON token parser.
legibility improvements: rotatesprite(..., 0,0,xdim-1,ydim-1) -> rotatesprite_fs
Fix an update issue with the recent screen tint retaining on palette change.
When loading a map and in a few other places, reset screen tinting.
Fix a sector[-1] access when starting to draw a wall in an empty map.
Fix demo progress bar in OpenGL modes by adding bit 1024 to rotatesprite calls.
The problems still remains that rotatesprite behaves differently in classic and OpenGL modes with clipping boundaries specified (and maybe in some other cases)
Don't wait for pain tinting to subside when changing a base palette.
This means that when e.g. emerging from water hurt will change the palette instantly, but because bit 16 is added to the P_SetGamePalette call, the tinting is retained.
tweak dragging a single sprite so that they can be dragged 'uphill'.
The implementation uses the recently introduced updatesector_onlynextwall when setspritez fails.
Make savegames between dynamicremap-enabled and -disabled builds compatible.
Of course, only when the mod/TC in question doesn't use that feature.
Dynamic tile remapping shouldn't actually be disabled in synthesis builds, whether the source allows it to be compi
led out or not. Removing features that certain mods may depend on to operate correctly without throwing any kind of error or warning at startup other than a logged message is bad.
add one line forgotten with dynamictileremap disabling
sectorsofbunch iterator, error(..., 2), temp 'ud' access
Conditionally compile out the dynamic-to-static tile remapping feature.
Move inithashnames() and freehashnames() declarations into namesdyn.h.
Fix and clean up dynamic-to-static tile remapping source.
Remove a couple of nested externs and #include some headers directly
... instead of relying on indirect inclusion via duke3d.h.
In Mapster32, register the 'vidmode' OSD command in non-GL builds.
Two tweaks for USE_OPENGL=0 builds.
- Always parse 'animsounds' defs - don't print "ignored frame/animation definition" warnings
Fix USE_OPENGL=0 build; squelch one warning.
Fix building with GCC 4.6 link-time optimization.
It looks like GCC doesn't honor the 'used' attribute with LTO. This is "fixed" by declaring the variables in question with external linkage (i.e. removing the 'static'). I consider such behavior a GCC bug, though.
Route the 5th mouse button to the game; bump savegame version.
The "double-click button4" had to make way for MOUSE5 in the button binds menu, but I don't think anyone cares. Savegame compatibility was actually silently broken with the MAXTILES update earlier, but I forgot updating the version...
small correction of a memory-clearing line in namesdyn.c
Rearrange 'struct hicreplc_t' members so that no padding is inserted on x64.
engine.c cleanup, making some variables static mostly
Fix a potential sector[-1] access when drawing a masked wall in Polymost.
Fix the insert cicle wall-points bug reported by Norvak.