Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/fabiangreffrath/woof
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed Nov 26, 2021
2 parents 9b1bb6a + c06a477 commit c439e06
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Source/doomdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ extern int bfgedition;
#define ORIGWIDTH 320 // [crispy]
#define ORIGHEIGHT 200 // [crispy]

#define MAX_SCREENWIDTH (ORIGWIDTH << 2) // [crispy]
#define MAX_SCREENWIDTH 1120 // [FG] corresponds to 21:9 in hires mode
#define MAX_SCREENHEIGHT (ORIGHEIGHT << 1) // [crispy]

// The maximum number of players, multiplayer/networking.
Expand Down
2 changes: 2 additions & 0 deletions Source/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -2435,6 +2435,7 @@ static int G_GetWadComplevel(void)
static void G_MBFComp()
{
comp[comp_respawn] = 1;
comp[comp_soul] = 1;
comp[comp_ledgeblock] = 0;
comp[comp_friendlyspawn] = 1;
comp[comp_voodooscroller] = 1;
Expand All @@ -2451,6 +2452,7 @@ static void G_BoomComp()
comp[comp_zombie] = 1;
comp[comp_infcheat] = 1;
comp[comp_respawn] = 1;
comp[comp_soul] = 1;
comp[comp_ledgeblock] = 0;
comp[comp_friendlyspawn] = 1;
comp[comp_voodooscroller] = 0;
Expand Down
13 changes: 10 additions & 3 deletions Source/i_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,9 +1259,16 @@ void I_GetScreenDimensions(void)
{
SCREENWIDTH = w * ah / h;
// [crispy] make sure SCREENWIDTH is an integer multiple of 4 ...
SCREENWIDTH = (SCREENWIDTH + (hires ? 0 : 3)) & (int)~3;
// [crispy] ... but never exceeds MAXWIDTH (array size!)
SCREENWIDTH = MIN(SCREENWIDTH, MAX_SCREENWIDTH);
if (hires)
{
SCREENWIDTH = ((2 * SCREENWIDTH) & (int)~3) / 2;
}
else
{
SCREENWIDTH = (SCREENWIDTH + 3) & (int)~3;
}
// [crispy] ... but never exceeds MAX_SCREENWIDTH (array size!)
SCREENWIDTH = MIN(SCREENWIDTH, MAX_SCREENWIDTH / 2);
}

WIDESCREENDELTA = (SCREENWIDTH - NONWIDEWIDTH) / 2;
Expand Down
4 changes: 2 additions & 2 deletions Source/p_enemy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3011,7 +3011,7 @@ void A_FindTracer(mobj_t *actor)
fov = FixedToAngle(actor->state->args[0]);
dist = (actor->state->args[1]);

actor->tracer = P_RoughTargetSearch(actor, fov, dist);
P_SetTarget(&actor->tracer, P_RoughTargetSearch(actor, fov, dist));
}

//
Expand All @@ -3023,7 +3023,7 @@ void A_ClearTracer(mobj_t *actor)
if (!mbf21 || !actor)
return;

actor->tracer = NULL;
P_SetTarget(&actor->tracer, NULL);
}

//
Expand Down
13 changes: 11 additions & 2 deletions Source/p_mobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ static void P_ZMovement (mobj_t* mo)
// [FG] game version specific differences
int correct_lost_soul_bounce = !demo_compatibility || gameversion >= exe_ultimate;

if (correct_lost_soul_bounce && mo->flags & MF_SKULLFLY)
if ((!comp[comp_soul] || correct_lost_soul_bounce) && mo->flags & MF_SKULLFLY)
{
mo->momz = -mo->momz; // the skull slammed into something
}
Expand Down Expand Up @@ -567,14 +567,23 @@ static void P_ZMovement (mobj_t* mo)

if (mo->z + mo->height > mo->ceilingz)
{
// cph 2001/04/15 -
// Lost souls were meant to bounce off of ceilings
if (!comp[comp_soul] && mo->flags & MF_SKULLFLY)
mo->momz = -mo->momz; // the skull slammed into something

// hit the ceiling

if (mo->momz > 0)
mo->momz = 0;

mo->z = mo->ceilingz - mo->height;

if (mo->flags & MF_SKULLFLY)
// cph 2001/04/15 -
// We might have hit a ceiling but had downward momentum (e.g. ceiling is
// lowering on us), so for old demos we must still do the buggy
// momentum reversal here
if (comp[comp_soul] && mo->flags & MF_SKULLFLY)
mo->momz = -mo->momz; // the skull slammed into something

if (!((mo->flags ^ MF_MISSILE) & (MF_MISSILE | MF_NOCLIP)))
Expand Down
12 changes: 11 additions & 1 deletion Source/r_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,19 @@ void R_InitTextures (void)

for (j=0 ; j<texture->patchcount ; j++, mpatch++, patch++)
{
short p;
patch->originx = SHORT(mpatch->originx);
patch->originy = SHORT(mpatch->originy);
patch->patch = patchlookup[SHORT(mpatch->patch)];
p = SHORT(mpatch->patch);
// [crispy] catch out-of-range patches
if (p >= 0 && p < nummappatches)
{
patch->patch = patchlookup[p];
}
else
{
patch->patch = -1;
}
if (patch->patch == -1)
{ // killough 8/8/98
printf("\nR_InitTextures: Missing patch %d in texture %.8s",
Expand Down
2 changes: 1 addition & 1 deletion Source/w_wad.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void ExtractFileBase(const char *path, char *dest)
if (++length == 9)
{
// [FG] remove length check
printf ("Filename base of %s >8 chars",path);
printf ("Filename base of %s >8 chars\n",path);
break;
}
else
Expand Down

0 comments on commit c439e06

Please sign in to comment.