Build 2049
SVN-
General
fix for the fix
SVN handles and Git names are merged into one person.
fix for the fix
Sanitize drawing sprites at different levels with TROR/classic. This should fix
most problems where sprites appear to be drawn through walls.
backtrace.c: add flags to open() so that the log file is opened user-r/w.
This way, crashlogs will really be appended. Additionally, print a time at the end of each backtrace. winlayer.c: load ebacktrace1.dll instead of the old one Makefile.common: when building with DEBUGANYWAY=1, don't omit frame pointers This will let us get a stack trace for crashes with the release build code.
Fix
http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__st__480 (I think, didn't test it)
fix picking
More natural mouse picking in software mode, closer to "what's under the cursor
is picked" but still not perfect. In particular, sometimes a wrong wall is selected, and sprites don't get picked through portals. As a rule of thumb, don't be too far away from the objects you're modifying in 3D mode.
Add high-resolution timers C API for profiling. The functions are called
uint64_t gethiticks() and gethitickspersec(). For SDL 1.2, the timer has the same resolution as getticks (1000 Hz). For Windows and SDL 1.3, the resolution of the underlying perf-timers is used. The only user of these functions right now is some TROR on-screen debugging code. Revert an earlier change regarding r_preview_mouseaim. We can't do the check because editstatus is set later.
- Add new trueror1.map that showcases the functionality and limitations of
the additional rendering pass - Remove r_preview_mouseaim cvar from the game, since it's only for Mapster - sdlmusic.c: (Failed) attempt to fix a call of waitpid() with a non-existent process ID in the external MIDI playing code. I think there's a race there...
Support for drawing 'island sectors' for TROR/classic (and with limited
functionality, Polymost). The new feature can be enabled/disabled with the 'r_tror_nomaskpass' cvar. The basic idea is that when drawing lower or upper levels, a first pass is performed that ignores all red walls for which the TROR nextwall link 'towards' the viewer arrives at a red wall. Thus, in the worst case, there can be up to twice as many rendering passes now (when it is discovered that the no-mask-pass isn't different that what would be drawn with the ordinary one, the latter is skipped, since we've already drawn all needed geometry). Hovever, this kind of multi-pass splitting is only suitable for simple scenes, like the upper subway in the TROR test map. In particular, multiple islands shouldn't 'see' each other. Two issues are worth mentioning: first, care needs to be taken for translucent ceilings or floors, since drawing them twice isn't the same as drawing them once. This is done for classic, but not for Polymost. Second, sprites (which are always drawn _after_ the geometry for a given pass) are still clipped to the geometry of the ordinary pass, resulting in their disappearance from certain angles. -- Additionaly, a change made it into this commit that fixes redundant collection of sprites in TROR:classic/Polymost.
- In the editor, make bunch-equal-making [J] stricter, because the way it was
handled could lead to a bunch whose floors and ceilings covered different areas. A fix for the reduced functionality arising from this change is underway. - Rewrite a small portion of code using yax_vnextsec() in game.c.
fix a couple of editor issues:
- one reported by Micky: http://forums.duke4.net/topic/3911-true-room-over-room/page__view__findpost__p__106610 - malloc(0) call when saving a map with no sprites - update 'asksave' after Alt-S and corrupt-check on starting a new map
In setbrightness() and qsetmodeany(), call setpalette() only if the
palette changed from the last one (either globally or within the last call of one of the function). This fixes the ugly OSD flickering in 8-bit mode when a screen tint effect is in action (such as when being hurt or snotted on).
make the heinum&2 and stat inconsistency be displayed only once
with 'corruptcheck now', but still print each corrected one on tryfix.
polymer.c: Fix a potential zero-size calloc call when a two-walled sector
is present (like in E4L1). Also sneak in a trivial change in cache1d.c
Using this dynamic checking tool: http://embed.cs.utah.edu/ubc/,
fix two issues with signed integer overflow. One is related to clipping and the other to Polymost mouse-picking for overlong walls. Many more remain especially in the 8-bit rendering code, but I expect many of them to be intended.
Make Polymer declare a callback function G_Polymer_UnInit() that is called
whenever we change to another renderer etc. and define it for the game and editor. The purpose of the function is to clean up references to Polymer resources like lights. This fixes 1) all lights becoming spot lights in the game and 2) an issue with maphack lights in the editor (can't recall which exactly).
Better handling of tsprites that are duplicated through TROR portals.
Specifically, now also consider the sprite tile's yoffset, and fix an issue when a tsprite got duplicated 'toward' the viewer. Also add a couple of tests in trueror1.map.
Oops...
BACKSPACE key in 3D mode now deletes a red-wall link when aimed at a wall or mask.
With script_expertmode enabled, SHIFT-BACKSPACE clears the upwall link and CTRL- BACKSPACE the downwall link. These functions are useful because the automatic nextwall determination code sometimes gets it wrong (not corrupting anything) or if you want to vertically displace a sector attached to a higher or lower level. Also add the exploding ceiling example to the TROR test map.
Much more elegant solution to updating the player's sectnum when passing through
TROR portals that works with a little help from updatesectorz() (change not visible from CON code). Relies only on the presence of an extension whose portal isn't blocked and also plays nicely with corner cases like being shrunk and enabling the jetpack. This should fix the upward moving platforms in WGR2.
* game and editor: emit a warning when a search-path directory specified
on the command-line isn't found (instead of saying nothing) * editor: Move inconsistent (stat&2)/heinum detection into the corruption checker. This makes a lot of original maps spew countless 'errors', but it's preferable for new maps since such floors and ceilings could behave strangely with TROR.
Various cleanup work:
- fix an earlier 'oops': make highpals load correctly again - maphack lights shouldn't be double-loaded now - slight tweak to the loading screen fadein/out timing - two bound checks - make some variables static in engine.c
* "Fix" two bugs introduced by r1450. In quotation marks, because I merely tracked down the offending changes without understanding them. Mild breakage of TX's ROR is expected.
The two bugs are: - RPG projectiles don't pass through water - can't emerge from slime in bobsp2 * Coalesce Polymer lights that are at the same position for FIRE-like sprites so that only one light is actually generated. This is good for usermaps that have multi-sprite fires, like bobsp2 again.
fix sector updating between TROR bunches, leading to 'being stuck' glitches. Difference: one character.
fix rotscrnang weirdness for any r_usenewaspect
* fix screen warping with r_usenewaspect: now you have a larger FOV when being shrunk
* fix 'squishing' when taking off shrunk (the reason was TROR game code using updatesectorz) and a potential sector[-1] access
* Address http://forums.duke4.net/topic/3911-true-room-over-room/page__view__findpost__p__103306
by using setspritez() instead of setsprite() for the sectnum updating. * Change 'yax-nextwall(0/1)' to 'upwall/downwall' in the corruption checker, makes it much nicer to read.
don't crash wall alignment with void-tiled walls
Lots of M32script tweaks:
* fix breaking out of 'switch' blocks and compilation of the 'default' case * Have a way of assigning 'special function' menu [' F] entries to script states. Writing a string literal after the state name will register the state under that name. Menu names are limited to 24 characters and it's possible to have up to 16 of them. * new branching command 'ifinteractive', true if a state runs from the menu mentioned above. * new command: getnumberfromuser <<retvar>> "query_string" <maxnum> <flags> See 'state collect_teleporting_sectors' in a.m32 for a combined usage of the new functionality.