------------------------------------------------------------------------ r4875 | helixhorned | 2015-01-04 10:45:00 -0800 (Sun, 04 Jan 2015) | 5 lines Cleanup of various engine functions. - factor out calculation of player-relative and screen+clipped-player-relative coordinates into get_rel_coords() and get_screen_coords(), respectively - the usual beautification stuff, especially since we're now on C99 ------------------------------------------------------------------------ r4874 | helixhorned | 2015-01-04 10:44:58 -0800 (Sun, 04 Jan 2015) | 16 lines CON: always return non-negative values from 'clipmove' and related. Previously, the C function clipmove() returned negative values when hit a wall (32768+wallnum) or sprite (49152+spritenum) because internally, these values were encoded into a *signed* 16-bit integer. This made no difference to C code using it, since it always proceeded by bit checks, but was inconsistent with documentation on CON 'clipmove' on the wiki. The following commands are affected too, since they use the value returned by clipmove(): 'clipmovenoslide', 'movesprite'. Also, the value of actor[].movflag ('htmovflag' from CON). Also, fix 'clipmove*' in LunaCON and add lunatic/test/checknearwall.con as an example of how to implement a being-close-to-a-wall checker as requested in http://forums.duke4.net/topic/7869-determining-closeness-to-a-wall/ ------------------------------------------------------------------------ See http://svn.eduke32.com/listing.php?repname=eduke32 for more details.