Skip to content

Commit

Permalink
Line special 142 for bloodfalls
Browse files Browse the repository at this point in the history
  • Loading branch information
viciious committed Dec 21, 2023
1 parent b31c769 commit 1d9a801
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions p_spec.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,19 +817,29 @@ void P_UpdateSpecials (void)
/* */
for (i = 0; i < numlinespecials; i++)
{
int textureoffset, rowoffset;
side_t *side;
int16_t textureoffset, rowoffset;
line = linespeciallist[i];
side = &sides[line->sidenum[0]];
switch(line->special)
{
case 48: /* EFFECT FIRSTCOL SCROLL + */
// 12-bit texture offset + 4-bit rowoffset
textureoffset = sides[line->sidenum[0]].textureoffset;
textureoffset = side->textureoffset;
rowoffset = textureoffset & 0xf00;
textureoffset <<= 4;
textureoffset += 1<<4;
textureoffset >>= 4;
textureoffset |= rowoffset;
sides[line->sidenum[0]].textureoffset = textureoffset;
side->textureoffset = textureoffset;
break;

case 142: /* MODERATE VERT SCROLL */
// 12-bit texture offset + 4-bit rowoffset
rowoffset = (side->textureoffset & 0xf000) | side->rowoffset;
rowoffset -= 3;
side->rowoffset = rowoffset & 0xff;
side->textureoffset = (textureoffset & 0xfff) | (rowoffset & 0xf00);
break;
}
}
Expand Down Expand Up @@ -1018,6 +1028,7 @@ void P_SpawnSpecials (void)
switch (lines[i].special)
{
case 48: /* EFFECT FIRSTCOL SCROLL+ */
case 142: /* MODERATE VERT SCROLL */
linespeciallist[numlinespecials] = &lines[i];
numlinespecials++;
if (numlinespecials == MAXLINEANIMS)
Expand Down
2 changes: 1 addition & 1 deletion p_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern anim_t *anims/*[MAXANIMS]*/, * lastanim;
/* */
/* Animating line specials */
/* */
#define MAXLINEANIMS 64
#define MAXLINEANIMS 128
extern int numlinespecials;
extern line_t **linespeciallist/*[MAXLINEANIMS]*/;

Expand Down

0 comments on commit 1d9a801

Please sign in to comment.