File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed
Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ void R_InitMeltRes(void)
7777static int wipe_initMelt (int ticks )
7878{
7979 int i ;
80+ int block_width = WIDE_SCREENWIDTH / 320 ;
8081
8182 if (V_IsSoftwareMode ())
8283 {
@@ -89,16 +90,20 @@ static int wipe_initMelt(int ticks)
8990
9091 // setup initial column positions (y<0 => not ready to scroll yet)
9192 y_lookup [0 ] = - (M_Random ()%16 );
92- for (i = 1 ;i < SCREENWIDTH ;i ++ )
93- {
94- int r = (M_Random ()%3 ) - 1 ;
95- y_lookup [i ] = y_lookup [i - 1 ] + r ;
96- if (y_lookup [i ] > 0 )
97- y_lookup [i ] = 0 ;
98- else
99- if (y_lookup [i ] == -16 )
100- y_lookup [i ] = -15 ;
101- }
93+ for (i = 1 ; i < SCREENWIDTH ; i ++ )
94+ {
95+ int r = y_lookup [i - 1 ];
96+
97+ if (i % block_width == 0 )
98+ r += (M_Random ()%3 ) - 1 ;
99+
100+ y_lookup [i ] = r ;
101+ if (y_lookup [i ] > 0 )
102+ y_lookup [i ] = 0 ;
103+ else
104+ if (y_lookup [i ] == -16 )
105+ y_lookup [i ] = -15 ;
106+ }
102107 return 0 ;
103108}
104109
You can’t perform that action at this time.
0 commit comments