Skip to content

Commit 4ba1997

Browse files
committed
Line special 142 for bloodfalls
1 parent ec1f935 commit 4ba1997

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

p_spec.c

+16-4
Original file line numberDiff line numberDiff line change
@@ -822,19 +822,30 @@ void P_UpdateSpecials (void)
822822
/* */
823823
for (i = 0; i < numlinespecials; i++)
824824
{
825-
int textureoffset, rowoffset;
825+
side_t *side;
826+
int16_t textureoffset, rowoffset;
826827
line = linespeciallist[i];
828+
side = &sides[line->sidenum[0]];
827829
switch(line->special)
828830
{
829831
case 48: /* EFFECT FIRSTCOL SCROLL + */
830832
// 12-bit texture offset + 4-bit rowoffset
831-
textureoffset = sides[line->sidenum[0]].textureoffset;
832-
rowoffset = textureoffset & 0xf00;
833+
textureoffset = side->textureoffset;
834+
rowoffset = textureoffset & 0xf000;
833835
textureoffset <<= 4;
834836
textureoffset += 1<<4;
835837
textureoffset >>= 4;
836838
textureoffset |= rowoffset;
837-
sides[line->sidenum[0]].textureoffset = textureoffset;
839+
side->textureoffset = textureoffset;
840+
break;
841+
842+
case 142: /* MODERATE VERT SCROLL */
843+
// 12-bit texture offset + 4-bit rowoffset
844+
textureoffset = side->textureoffset;
845+
rowoffset = ((textureoffset & 0xf000)>>4) | side->rowoffset;
846+
rowoffset -= 3;
847+
side->rowoffset = rowoffset & 0xff;
848+
side->textureoffset = (textureoffset & 0xfff) | (rowoffset & 0xf00);
838849
break;
839850
}
840851
}
@@ -1023,6 +1034,7 @@ void P_SpawnSpecials (void)
10231034
switch (lines[i].special)
10241035
{
10251036
case 48: /* EFFECT FIRSTCOL SCROLL+ */
1037+
case 142: /* MODERATE VERT SCROLL */
10261038
linespeciallist[numlinespecials] = &lines[i];
10271039
numlinespecials++;
10281040
if (numlinespecials == MAXLINEANIMS)

p_spec.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extern anim_t *anims/*[MAXANIMS]*/, * lastanim;
3838
/* */
3939
/* Animating line specials */
4040
/* */
41-
#define MAXLINEANIMS 64
41+
#define MAXLINEANIMS 128
4242
extern int numlinespecials;
4343
extern line_t **linespeciallist/*[MAXLINEANIMS]*/;
4444

0 commit comments

Comments
 (0)