mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-04-22 16:33:31 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom into g1.8
This commit is contained in:
commit
8f2a9d988b
11 changed files with 103 additions and 36 deletions
|
@ -487,12 +487,15 @@ public:
|
|||
|
||||
void Uncrouch()
|
||||
{
|
||||
crouchfactor = FRACUNIT;
|
||||
crouchoffset = 0;
|
||||
crouchdir = 0;
|
||||
crouching = 0;
|
||||
crouchviewdelta = 0;
|
||||
viewheight = mo->ViewHeight;
|
||||
if (crouchfactor != FRACUNIT)
|
||||
{
|
||||
crouchfactor = FRACUNIT;
|
||||
crouchoffset = 0;
|
||||
crouchdir = 0;
|
||||
crouching = 0;
|
||||
crouchviewdelta = 0;
|
||||
viewheight = mo->ViewHeight;
|
||||
}
|
||||
}
|
||||
|
||||
bool CanCrouch() const
|
||||
|
|
|
@ -240,6 +240,7 @@ void level_info_t::Reset()
|
|||
flags2 = 0;
|
||||
else
|
||||
flags2 = LEVEL2_LAXMONSTERACTIVATION;
|
||||
flags3 = 0;
|
||||
Music = "";
|
||||
LevelName = "";
|
||||
FadeTable = "COLORMAP";
|
||||
|
|
|
@ -136,7 +136,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
player->cheats &= ~CF_NOCLIP;
|
||||
msg = GStrings("STSTR_NCOFF");
|
||||
}
|
||||
player->mo->velx = 1; // force some lateral movement so that internal variables are up to date
|
||||
if (player->mo->velx == 0) player->mo->velx = 1; // force some lateral movement so that internal variables are up to date
|
||||
break;
|
||||
|
||||
case CHT_NOVELOCITY:
|
||||
|
|
|
@ -903,7 +903,7 @@ FUNC(LS_Teleport_NoFog)
|
|||
// Teleport_NoFog (tid, useang, sectortag, keepheight)
|
||||
{
|
||||
int flags = 0;
|
||||
if (arg1)
|
||||
if (!arg1)
|
||||
{
|
||||
flags |= TELF_KEEPORIENTATION;
|
||||
}
|
||||
|
|
|
@ -77,6 +77,27 @@
|
|||
|
||||
@end
|
||||
|
||||
@interface NSWindow(EnterFullscreenOnZoom)
|
||||
- (void)enterFullscreenOnZoom;
|
||||
@end
|
||||
|
||||
@implementation NSWindow(EnterFullscreenOnZoom)
|
||||
|
||||
- (void)enterFullscreen:(id)sender
|
||||
{
|
||||
ToggleFullscreen = true;
|
||||
}
|
||||
|
||||
- (void)enterFullscreenOnZoom
|
||||
{
|
||||
NSButton* zoomButton = [self standardWindowButton:NSWindowZoomButton];
|
||||
[zoomButton setEnabled:YES];
|
||||
[zoomButton setAction:@selector(enterFullscreen:)];
|
||||
[zoomButton setTarget:self];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
EXTERN_CVAR(Bool, ticker )
|
||||
EXTERN_CVAR(Bool, vid_vsync)
|
||||
|
@ -807,6 +828,7 @@ void CocoaVideo::SetWindowedMode(const int width, const int height)
|
|||
|
||||
[m_window setContentSize:windowSize];
|
||||
[m_window center];
|
||||
[m_window enterFullscreenOnZoom];
|
||||
[m_window exitAppOnClose];
|
||||
}
|
||||
|
||||
|
|
|
@ -1082,7 +1082,7 @@ void wallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixed_t
|
|||
basecolormapdata = basecolormap->Maps;
|
||||
|
||||
x = x1;
|
||||
//while ((umost[x] > dmost[x]) && (x <= x2)) x++;
|
||||
//while ((umost[x] > dmost[x]) && (x < x2)) x++;
|
||||
|
||||
bool fixed = (fixedcolormap != NULL || fixedlightlev >= 0);
|
||||
if (fixed)
|
||||
|
@ -1439,7 +1439,7 @@ void maskwallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixe
|
|||
palookupoffse[3] = dc_colormap;
|
||||
}
|
||||
|
||||
for(; (x <= x2) && ((size_t)p & 3); ++x, ++p)
|
||||
for(; (x < x2) && ((size_t)p & 3); ++x, ++p)
|
||||
{
|
||||
light += rw_lightstep;
|
||||
y1ve[0] = uwal[x];//max(uwal[x],umost[x]);
|
||||
|
|
|
@ -359,11 +359,24 @@ void R_DrawVisSprite (vissprite_t *vis)
|
|||
spryscale = vis->yscale;
|
||||
sprflipvert = false;
|
||||
dc_iscale = 0xffffffffu / (unsigned)vis->yscale;
|
||||
dc_texturemid = vis->texturemid;
|
||||
frac = vis->startfrac;
|
||||
xiscale = vis->xiscale;
|
||||
dc_texturemid = vis->texturemid;
|
||||
|
||||
sprtopscreen = centeryfrac - FixedMul (dc_texturemid, spryscale);
|
||||
|
||||
if (vis->renderflags & RF_YFLIP)
|
||||
{
|
||||
sprflipvert = true;
|
||||
spryscale = -spryscale;
|
||||
dc_iscale = -dc_iscale;
|
||||
dc_texturemid -= (vis->pic->GetHeight() << FRACBITS);
|
||||
sprtopscreen = centeryfrac + FixedMul(dc_texturemid, spryscale);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprflipvert = false;
|
||||
sprtopscreen = centeryfrac - FixedMul(dc_texturemid, spryscale);
|
||||
}
|
||||
|
||||
dc_x = vis->x1;
|
||||
x2 = vis->x2;
|
||||
|
@ -652,8 +665,6 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
FTexture *tex;
|
||||
FVoxelDef *voxel;
|
||||
|
||||
WORD flip;
|
||||
|
||||
vissprite_t* vis;
|
||||
|
||||
fixed_t iscale;
|
||||
|
@ -673,7 +684,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
fixedvec3 pos = thing->InterpolatedPosition(r_TicFrac);
|
||||
fx = pos.x;
|
||||
fy = pos.y;
|
||||
fz = pos.z +thing->GetBobOffset(r_TicFrac);
|
||||
fz = pos.z + thing->GetBobOffset(r_TicFrac);
|
||||
|
||||
tex = NULL;
|
||||
voxel = NULL;
|
||||
|
@ -681,6 +692,12 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
int spritenum = thing->sprite;
|
||||
fixed_t spritescaleX = thing->scaleX;
|
||||
fixed_t spritescaleY = thing->scaleY;
|
||||
int renderflags = thing->renderflags;
|
||||
if (spritescaleY < 0)
|
||||
{
|
||||
spritescaleY = -spritescaleY;
|
||||
renderflags ^= RF_YFLIP;
|
||||
}
|
||||
if (thing->player != NULL)
|
||||
{
|
||||
P_CheckPlayerSprite(thing, spritenum, spritescaleX, spritescaleY);
|
||||
|
@ -695,7 +712,6 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
{
|
||||
return;
|
||||
}
|
||||
flip = 0;
|
||||
|
||||
if (tex->Rotations != 0xFFFF)
|
||||
{
|
||||
|
@ -712,7 +728,10 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
rot = (ang - thing->angle + (angle_t)(ANGLE_45/2)*9-(angle_t)(ANGLE_180/16)) >> 28;
|
||||
}
|
||||
picnum = sprframe->Texture[rot];
|
||||
flip = sprframe->Flip & (1 << rot);
|
||||
if (sprframe->Flip & (1 << rot))
|
||||
{
|
||||
renderflags ^= RF_XFLIP;
|
||||
}
|
||||
tex = TexMan[picnum]; // Do not animate the rotation
|
||||
}
|
||||
}
|
||||
|
@ -748,7 +767,10 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
rot = (ang - thing->angle + (angle_t)(ANGLE_45/2)*9-(angle_t)(ANGLE_180/16)) >> 28;
|
||||
}
|
||||
picnum = sprframe->Texture[rot];
|
||||
flip = sprframe->Flip & (1 << rot);
|
||||
if (sprframe->Flip & (1 << rot))
|
||||
{
|
||||
renderflags ^= RF_XFLIP;
|
||||
}
|
||||
tex = TexMan[picnum]; // Do not animate the rotation
|
||||
if (r_drawvoxels)
|
||||
{
|
||||
|
@ -759,16 +781,16 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
if (spritescaleX < 0)
|
||||
{
|
||||
spritescaleX = -spritescaleX;
|
||||
flip = !flip;
|
||||
renderflags ^= RF_XFLIP;
|
||||
}
|
||||
if (voxel == NULL && (tex == NULL || tex->UseType == FTexture::TEX_Null))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((thing->renderflags & RF_SPRITETYPEMASK) == RF_WALLSPRITE)
|
||||
if ((renderflags & RF_SPRITETYPEMASK) == RF_WALLSPRITE)
|
||||
{
|
||||
R_ProjectWallSprite(thing, fx, fy, fz, picnum, spritescaleX, spritescaleY, flip);
|
||||
R_ProjectWallSprite(thing, fx, fy, fz, picnum, spritescaleX, spritescaleY, renderflags);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -855,16 +877,13 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
return;
|
||||
}
|
||||
|
||||
// [RH] Flip for mirrors and renderflags
|
||||
if ((MirrorFlags ^ thing->renderflags) & RF_XFLIP)
|
||||
{
|
||||
flip = !flip;
|
||||
}
|
||||
// [RH] Flip for mirrors
|
||||
renderflags ^= MirrorFlags & RF_XFLIP;
|
||||
|
||||
// calculate edges of the shape
|
||||
const fixed_t thingxscalemul = DivScale16(spritescaleX, tex->xScale);
|
||||
|
||||
tx -= (flip ? (tex->GetWidth() - tex->LeftOffset - 1) : tex->LeftOffset) * thingxscalemul;
|
||||
tx -= ((renderflags & RF_XFLIP) ? (tex->GetWidth() - tex->LeftOffset - 1) : tex->LeftOffset) * thingxscalemul;
|
||||
x1 = centerx + MulScale32 (tx, xscale);
|
||||
|
||||
// off the right side?
|
||||
|
@ -895,7 +914,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
vis->x2 = x2 > WindowRight ? WindowRight : x2;
|
||||
vis->angle = thing->angle;
|
||||
|
||||
if (flip)
|
||||
if (renderflags & RF_XFLIP)
|
||||
{
|
||||
vis->startfrac = (tex->GetWidth() << FRACBITS) - 1;
|
||||
vis->xiscale = -iscale;
|
||||
|
@ -949,7 +968,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
vis->gzt = gzt; // killough 3/27/98
|
||||
vis->deltax = fx - viewx;
|
||||
vis->deltay = fy - viewy;
|
||||
vis->renderflags = thing->renderflags;
|
||||
vis->renderflags = renderflags;
|
||||
if(thing->flags5 & MF5_BRIGHT) vis->renderflags |= RF_FULLBRIGHT; // kg3D
|
||||
vis->Style.RenderStyle = thing->RenderStyle;
|
||||
vis->FillColor = thing->fillcolor;
|
||||
|
@ -960,6 +979,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
vis->fakeceiling = fakeceiling;
|
||||
vis->ColormapNum = 0;
|
||||
vis->bInMirror = MirrorFlags & RF_XFLIP;
|
||||
vis->bSplitSprite = false;
|
||||
|
||||
if (voxel != NULL)
|
||||
{
|
||||
|
@ -1021,7 +1041,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
{
|
||||
vis->Style.colormap = mybasecolormap->Maps + fixedlightlev;
|
||||
}
|
||||
else if (!foggy && ((thing->renderflags & RF_FULLBRIGHT) || (thing->flags5 & MF5_BRIGHT)))
|
||||
else if (!foggy && ((renderflags & RF_FULLBRIGHT) || (thing->flags5 & MF5_BRIGHT)))
|
||||
{ // full bright
|
||||
vis->Style.colormap = mybasecolormap->Maps;
|
||||
}
|
||||
|
@ -1034,7 +1054,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
|||
}
|
||||
}
|
||||
|
||||
static void R_ProjectWallSprite(AActor *thing, fixed_t fx, fixed_t fy, fixed_t fz, FTextureID picnum, fixed_t xscale, fixed_t yscale, INTBOOL flip)
|
||||
static void R_ProjectWallSprite(AActor *thing, fixed_t fx, fixed_t fy, fixed_t fz, FTextureID picnum, fixed_t xscale, fixed_t yscale, int renderflags)
|
||||
{
|
||||
FWallCoords wallc;
|
||||
int x1, x2;
|
||||
|
@ -1088,7 +1108,7 @@ static void R_ProjectWallSprite(AActor *thing, fixed_t fx, fixed_t fy, fixed_t f
|
|||
vis->gzt = gzt;
|
||||
vis->deltax = fx - viewx;
|
||||
vis->deltay = fy - viewy;
|
||||
vis->renderflags = thing->renderflags;
|
||||
vis->renderflags = renderflags;
|
||||
if(thing->flags5 & MF5_BRIGHT) vis->renderflags |= RF_FULLBRIGHT; // kg3D
|
||||
vis->Style.RenderStyle = thing->RenderStyle;
|
||||
vis->FillColor = thing->fillcolor;
|
||||
|
@ -1895,7 +1915,7 @@ void R_DrawSprite (vissprite_t *spr)
|
|||
{ // diminished light
|
||||
spriteshade = LIGHT2SHADE(sec->lightlevel + r_actualextralight);
|
||||
spr->Style.colormap = mybasecolormap->Maps + (GETPALOOKUP (
|
||||
(fixed_t)DivScale12 (r_SpriteVisibility, spr->depth), spriteshade) << COLORMAPSHIFT);
|
||||
(fixed_t)DivScale12 (r_SpriteVisibility, MAX(MINZ, spr->depth)), spriteshade) << COLORMAPSHIFT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6200,6 +6200,7 @@ enum CBF
|
|||
CBF_SETMASTER = 1 << 2, //^ but with master.
|
||||
CBF_SETTRACER = 1 << 3, //^ but with tracer.
|
||||
CBF_SETONPTR = 1 << 4, //Sets the pointer change on the actor doing the checking instead of self.
|
||||
CBF_DROPOFF = 1 << 5, //Check for dropoffs.
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock)
|
||||
|
@ -6219,7 +6220,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock)
|
|||
}
|
||||
|
||||
//Nothing to block it so skip the rest.
|
||||
if (P_TestMobjLocation(mobj)) return;
|
||||
bool checker = (flags & CBF_DROPOFF) ? P_CheckMove(mobj, mobj->X(), mobj->Y()) : P_TestMobjLocation(mobj);
|
||||
if (checker) return;
|
||||
|
||||
if (mobj->BlockingMobj)
|
||||
{
|
||||
|
|
|
@ -979,9 +979,11 @@ void FWadCollection::FixMacHexen()
|
|||
const long iwadSize = reader->GetLength();
|
||||
|
||||
static const long DEMO_SIZE = 13596228;
|
||||
static const long BETA_SIZE = 13749984;
|
||||
static const long FULL_SIZE = 21078584;
|
||||
|
||||
if ( DEMO_SIZE != iwadSize
|
||||
&& BETA_SIZE != iwadSize
|
||||
&& FULL_SIZE != iwadSize)
|
||||
{
|
||||
return;
|
||||
|
@ -1000,13 +1002,22 @@ void FWadCollection::FixMacHexen()
|
|||
0x4b, 0x0a, 0x6a, 0x3b, 0xed, 0x3a, 0x6f, 0x31
|
||||
};
|
||||
|
||||
static const BYTE HEXEN_BETA_MD5[16] =
|
||||
{
|
||||
0x2a, 0xf1, 0xb2, 0x7c, 0xd1, 0x1f, 0xb1, 0x59,
|
||||
0xe6, 0x08, 0x47, 0x2a, 0x1b, 0x53, 0xe4, 0x0e
|
||||
};
|
||||
|
||||
static const BYTE HEXEN_FULL_MD5[16] =
|
||||
{
|
||||
0xb6, 0x81, 0x40, 0xa7, 0x96, 0xf6, 0xfd, 0x7f,
|
||||
0x3a, 0x5d, 0x32, 0x26, 0xa3, 0x2b, 0x93, 0xbe
|
||||
};
|
||||
|
||||
if ( 0 != memcmp(HEXEN_DEMO_MD5, checksum, sizeof checksum)
|
||||
const bool isBeta = 0 == memcmp(HEXEN_BETA_MD5, checksum, sizeof checksum);
|
||||
|
||||
if ( !isBeta
|
||||
&& 0 != memcmp(HEXEN_DEMO_MD5, checksum, sizeof checksum)
|
||||
&& 0 != memcmp(HEXEN_FULL_MD5, checksum, sizeof checksum))
|
||||
{
|
||||
return;
|
||||
|
@ -1014,7 +1025,10 @@ void FWadCollection::FixMacHexen()
|
|||
|
||||
static const int EXTRA_LUMPS = 299;
|
||||
|
||||
const int lastLump = GetLastLump(IWAD_FILENUM);
|
||||
// Hexen Beta is very similar to Demo but it has MAP41: Maze at the end of the WAD
|
||||
// So keep this map if it's present but discard all extra lumps
|
||||
|
||||
const int lastLump = GetLastLump(IWAD_FILENUM) - (isBeta ? 12 : 0);
|
||||
assert(GetFirstLump(IWAD_FILENUM) + 299 < lastLump);
|
||||
|
||||
for (int i = lastLump - EXTRA_LUMPS + 1; i <= lastLump; ++i)
|
||||
|
|
|
@ -516,6 +516,7 @@ enum
|
|||
CBF_SETMASTER = 1 << 2, //^ but with master.
|
||||
CBF_SETTRACER = 1 << 3, //^ but with tracer.
|
||||
CBF_SETONPTR = 1 << 4, //Sets the pointer change on the actor doing the checking instead of self.
|
||||
CBF_DROPOFF = 1 << 5, //Check for dropoffs.
|
||||
};
|
||||
|
||||
enum
|
||||
|
|
|
@ -897,6 +897,10 @@ OptionMenu "MiscOptions"
|
|||
Option "Merge left+right Alt/Ctrl/Shift", "k_mergekeys", "OnOff"
|
||||
Option "Alt-Enter toggles fullscreen", "k_allowfullscreentoggle", "OnOff"
|
||||
}
|
||||
IfOption(Mac)
|
||||
{
|
||||
Option "Command-F toggles fullscreen", "k_allowfullscreentoggle", "OnOff"
|
||||
}
|
||||
Option "Show IWAD selection dialog", "queryiwad", "OnOff"
|
||||
StaticText " "
|
||||
Option "Enable cheats from all games", "allcheats", "OnOff"
|
||||
|
|
Loading…
Reference in a new issue