shithub: choc

Download patch

ref: 44efcf1a9088a1a050049fa34779c7279d201676
parent: 840e87ce39fe2319cbcfc4ff97c2781ce36e5549
author: Simon Howard <fraggle@gmail.com>
date: Thu Mar 27 20:12:09 EDT 2014

video: Fix calculation of -devparm ticker.

The released linuxdoom source had the devparm ticker dots at a spacing
of two pixels rather than four pixels (as used in Vanilla Doom). In
commit 4a31ec8fcee20e.. I changed this back to four pixel spacing, but
forgot to multiply the number of tics to adjust as appropriate. Fix
this so that the dots are calculated just like Vanilla Doom is.

Thanks to _bruce_ for pointing this out on Doomworld, and to
Alexandre-Xavier for questioning my reasoning when I wasn't convinced
that the current behavior was wrong. This fixes #360.

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1104,7 +1104,7 @@
 	lasttic = i;
 	if (tics > 20) tics = 20;
 
-	for (i=0 ; i<tics*2 ; i+=4)
+	for (i=0 ; i<tics*4 ; i+=4)
 	    I_VideoBuffer[ (SCREENHEIGHT-1)*SCREENWIDTH + i] = 0xff;
 	for ( ; i<20*4 ; i+=4)
 	    I_VideoBuffer[ (SCREENHEIGHT-1)*SCREENWIDTH + i] = 0x0;