Build 2066
SVN-
Generale
Show fake TROR texture when show-invisibility [I] is on in Mapster32/Polymer.
Mostra dettagli
Also move a 'int16_t editstatus' declaration from polymost.c to engine_priv.h.
Nickname SVN e nomi Git sono unificati per persona.
Show fake TROR texture when show-invisibility [I] is on in Mapster32/Polymer.
Also move a 'int16_t editstatus' declaration from polymost.c to engine_priv.h.
fix stupid typo that broke r2057
remove two instances of duplicate USE_OPENGL preprocessor checks missed by the removal of the POLYMOST definition
constantly get the textures handle for projective spotlights
Getting the texture handles without requiring invalidation means we can handle ART-animating tilenums without impacting performance too much.
fix horizontal spotlight SEs constantly getting invalidated
Polymer has a hack that snaps horiz values of spotlights between 90 and 110 to 90 and 110 to avoid triggering aliasing artifacts with perfectly horizontal spotlights. Propagate that change all the way to the spotlight SE sprite so that the code won't think that the horiz is always different from the light and mark it invalid each frame.
preliminary support for GL_ARB_debug_output
This won't actually do anything until the a debug bit is added when creating the context, but that requires support for GLX_create_context which SDL doesn't support. I'll add support for WGL_create_context to winlayer in a bit as a stopgap. Also updates our local copy of glext.h with a fresh one from the Khronos registry.
Fix upside-down projective textures
We need to Y-invert the projection texcoords when sampling from the lightmap.
apply ART animation to spotlight lightmaps.
Discard cached sprite planes on texinvalidate
Sprites would stick with their old material on global palette change. This goes through all prsprites and clobbers their CRCs so that an alternate skin / tint / highpal can be applied accordingly.
account for model flipping for backface culling.
The winding order of faces is different if only flipping about X or Y, and we were unconditionally culling CW faces.
fix leading whitespace in polymer_drawmdsprite
fix a stupid copy&paste error that made sector[].ceilingbunch/floorbunch not functioning
When X- or Y-flipping a selection of highlighted sectors, also handle setting
the nextwall pointers correctly; Add some 'asksave=1' and 'make old-nextwalls invalid'.
Sanitize drawing sprites at different levels with TROR/classic. This should fix
most problems where sprites appear to be drawn through walls.
Two tweaks to make the precaching more efficient/less redundant in the game.
First, if we're in Polymer, don't precache tinted tiles that have a highpal for that certain pal. Second, don't precache tiles for palnum 251 (the last non-reserved one, which is used as a crosshair pal). Assuming that there are no other tints, this cuts the initial precache time and cache size on disk in half.
When inserting a new sprite and determining its picnum by frequency count
of the picnums of all sprites, omit the newly inserted sprite itself!
When searching a nextwall for a white wall after dragging a point,
exclude grayed out walls.
Fix
http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__st__480 (I think, didn't test it)
- protect stat bit 2 when pasting to ceilings or floors
- when pasting to walls or maskwalls, the following user bits are kept now: 4 (top/bottom alignment [O]) 1+64 (blocking, hitscan) 8+256 (x/y-flip) - print '(one-sided)' when pressing Shift + ([B] or [H]) on a wall
sanitize backface culling
Keep track of which side is getting culled, swap around mirrors, swap around model drawing.
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.
In the textured 2D mode of Mapster32, only texture non-grayed out sectors.
Three-way clipping in Mapster32 (still toggled with 'N): on and off as
before, and additionally a mode that doesn't clip against masked walls and sprites.
In the editor, when rescaling the texture after dragging a wall-point, also
traverse the TROR neighbors.
- 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 camera viewscreen tiles, also draw upper and lower TROR levels. Works
in any renderer because it's drawn with the software one... Also add a hack to make Polymer realize that viewscreen tiles can change each tic so that they don't show a static image anymore.
Make a couple of variables static in the engine; don't initialize umost/dmost
with other than base levels, since the y*most arrays are copied there later.
add funtion 'yax_vnextsec(wall, cf)' to C API. It's often useful when
dealing with sectors on the two sides of a bunch. Make yax_globallev and yax_globalbunch variables non-static. Rewrite a TROR-related bit in the engine code using the new function.