------------------------------------------------------------------------ r3484 | helixhorned | 2013-02-14 08:02:16 -0800 (Thu, 14 Feb 2013) | 1 line Fix build without Ken's ZIP library (WITHKPLIB not #define'd in compat.h). ------------------------------------------------------------------------ r3483 | helixhorned | 2013-02-14 08:02:12 -0800 (Thu, 14 Feb 2013) | 20 lines Classic renderer: high-precision sprite drawing, preventing stray lines on top. Face- and wall-aligned sprites are drawn using the wall routines in BUILD. However, the per-x-screen-coordinate distance (swall[]) is calculated in a way that potentially incurs great precision loss (for example 5 bits for xdimen=1280, yxaspect=65536). This leads to the starting (top) vertical texture coordinate possibly wrapping to large values, leaving an unsightly "stray line" on top of the sprite from certain viewing angles/horiz values. The approach to fix it has two parts: first, the distance is calculated using float values, preventing the precision loss. Because this doesn't fully prevent the unwanted lines, the texture coords are clamped to the mininum and maximum (0 and UINT32_MAX respectively) when calculating them for sprites. Note that stray lines may still appear at the *bottom* of sprites under certain circumstances, for example when viewing at a y-flipped sprite from above. These should be less noticable in real-world usage though. The feature is guarded by a macro HIGH_PRECISION_SPRITE in case using floating point or 64-bit integers is undesirable/impossible on some platforms. ------------------------------------------------------------------------ r3482 | helixhorned | 2013-02-14 08:02:06 -0800 (Thu, 14 Feb 2013) | 1 line engine.c: factor out calculation of texture coords / addresses in wall drawing. ------------------------------------------------------------------------ r3481 | helixhorned | 2013-02-14 08:01:59 -0800 (Thu, 14 Feb 2013) | 1 line engine.c: don't pass [udls]wal to maskwallscan(), use *wall globals instead. ------------------------------------------------------------------------