mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-03 10:41:12 +00:00
* Updated to ZDoom 4170:
- Moved all BorderNeedRefresh and SB_state updating code into separate functions that won't crash if screen is NULL. - Fixed: G_DoLoadLevel() has a for loop where it resets player cameras that incremented and checked the wrong variable. - Fixed: Players using colorsets instead of custom colors overrode their team colors. - Added TheFortuneTeller's NORANDOMPUFFZ submission. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1534 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
ad91214e85
commit
d51123c1a1
28 changed files with 121 additions and 65 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "farchive.h"
|
||||
#include "r_renderer.h"
|
||||
#include "r_sky.h"
|
||||
#include "sbar.h"
|
||||
|
||||
#include "m_cheat.h"
|
||||
#include "i_system.h"
|
||||
|
@ -1081,7 +1082,7 @@ void AM_Stop ()
|
|||
{
|
||||
automapactive = false;
|
||||
stopped = true;
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
viewactive = true;
|
||||
}
|
||||
|
||||
|
@ -1180,7 +1181,7 @@ void AM_ToggleMap ()
|
|||
if (dmflags2 & DF2_NO_AUTOMAP)
|
||||
return;
|
||||
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
if (!automapactive)
|
||||
{
|
||||
AM_Start ();
|
||||
|
@ -1191,7 +1192,7 @@ void AM_ToggleMap ()
|
|||
if (am_overlay==1 && viewactive)
|
||||
{
|
||||
viewactive = false;
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1134,7 +1134,7 @@ void C_DrawConsole (bool hw2d)
|
|||
(viewwindowx || viewwindowy) &&
|
||||
viewactive)
|
||||
{
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
|
||||
oldbottom = ConBottom;
|
||||
|
@ -1224,8 +1224,8 @@ void C_DrawConsole (bool hw2d)
|
|||
{
|
||||
screen->Dim (PalEntry ((unsigned char)(player->BlendR*255), (unsigned char)(player->BlendG*255), (unsigned char)(player->BlendB*255)),
|
||||
player->BlendA, 0, ConBottom, screen->GetWidth(), screen->GetHeight() - ConBottom);
|
||||
SB_state = screen->GetPageCount ();
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -697,21 +697,21 @@ void D_Display ()
|
|||
|
||||
if (screen->Lock (false))
|
||||
{
|
||||
SB_state = screen->GetPageCount ();
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
|
||||
// [RH] Allow temporarily disabling wipes
|
||||
if (NoWipe)
|
||||
{
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
NoWipe--;
|
||||
wipe = false;
|
||||
wipegamestate = gamestate;
|
||||
}
|
||||
else if (gamestate != wipegamestate && gamestate != GS_FULLCONSOLE && gamestate != GS_TITLELEVEL)
|
||||
{ // save the current screen if about to wipe
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
switch (wipegamestate)
|
||||
{
|
||||
default:
|
||||
|
@ -780,8 +780,8 @@ void D_Display ()
|
|||
if ((hw2d = screen->Begin2D(viewactive)))
|
||||
{
|
||||
// Redraw everything every frame when using 2D accel
|
||||
SB_state = screen->GetPageCount();
|
||||
BorderNeedRefresh = screen->GetPageCount();
|
||||
ST_SetNeedRefresh();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
Renderer->DrawRemainingPlayerSprites();
|
||||
screen->DrawBlendingRect();
|
||||
|
@ -1278,7 +1278,7 @@ void D_DoAdvanceDemo (void)
|
|||
Advisory = NULL;
|
||||
if (!M_DemoNoPlay)
|
||||
{
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
democount++;
|
||||
mysnprintf (demoname + 4, countof(demoname) - 4, "%d", democount);
|
||||
if (Wads.CheckNumForName (demoname) < 0)
|
||||
|
|
|
@ -2245,7 +2245,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
paused = player + 1;
|
||||
S_PauseSound (false, false);
|
||||
}
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -223,6 +223,9 @@ void D_GetPlayerColor (int player, float *h, float *s, float *v, FPlayerColorSet
|
|||
|
||||
*s = clamp(ts + *s * 0.15f - 0.075f, 0.f, 1.f);
|
||||
*v = clamp(tv + *v * 0.5f - 0.25f, 0.f, 1.f);
|
||||
|
||||
// Make sure not to pass back any colorset in teamplay.
|
||||
colorset = NULL;
|
||||
}
|
||||
if (set != NULL)
|
||||
{
|
||||
|
|
|
@ -227,7 +227,7 @@ void G_NewInit ()
|
|||
int i;
|
||||
|
||||
G_ClearSnapshots ();
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
netgame = false;
|
||||
multiplayer = false;
|
||||
if (demoplayback)
|
||||
|
@ -424,7 +424,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
demoplayback = false;
|
||||
automapactive = false;
|
||||
viewactive = true;
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
|
||||
//Added by MC: Initialize bots.
|
||||
if (!deathmatch)
|
||||
|
@ -927,7 +927,7 @@ void G_DoLoadLevel (int position, bool autosave)
|
|||
G_UnSnapshotLevel (!savegamerestore); // [RH] Restore the state of the level.
|
||||
G_FinishTravel ();
|
||||
// For each player, if they are viewing through a player, make sure it is themselves.
|
||||
for (int ii = 0; i < MAXPLAYERS; ++i)
|
||||
for (int ii = 0; ii < MAXPLAYERS; ++ii)
|
||||
{
|
||||
if (playeringame[ii] && (players[ii].camera == NULL || players[ii].camera->player != NULL))
|
||||
{
|
||||
|
|
|
@ -163,7 +163,7 @@ DHUDMessage::~DHUDMessage ()
|
|||
Lines = NULL;
|
||||
if (screen != NULL)
|
||||
{
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
}
|
||||
if (SourceText != NULL)
|
||||
|
@ -597,7 +597,7 @@ void DHUDMessageFadeOut::DoDraw (int linenum, int x, int y, bool clean, int hudh
|
|||
DTA_RenderStyle, Style,
|
||||
TAG_DONE);
|
||||
}
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -698,7 +698,7 @@ void DHUDMessageFadeInOut::DoDraw (int linenum, int x, int y, bool clean, int hu
|
|||
DTA_RenderStyle, Style,
|
||||
TAG_DONE);
|
||||
}
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -55,6 +55,8 @@ enum EHudState
|
|||
|
||||
class AWeapon;
|
||||
|
||||
void ST_SetNeedRefresh();
|
||||
|
||||
// HUD Message base object --------------------------------------------------
|
||||
|
||||
class DHUDMessage : public DObject
|
||||
|
|
|
@ -209,6 +209,17 @@ void ST_Clear()
|
|||
CrosshairNum = 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// ST_SetNeedRefresh
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void ST_SetNeedRefresh()
|
||||
{
|
||||
SB_state = (StatusBar == NULL || screen == NULL) ? 0 : screen->GetPageCount();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Constructor
|
||||
|
@ -297,7 +308,7 @@ void DBaseStatusBar::SetScaled (bool scale, bool force)
|
|||
Displacement = 0;
|
||||
}
|
||||
::ST_X = ST_X;
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -309,7 +320,7 @@ void DBaseStatusBar::SetScaled (bool scale, bool force)
|
|||
void DBaseStatusBar::AttachToPlayer (player_t *player)
|
||||
{
|
||||
CPlayer = player;
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -331,7 +342,7 @@ int DBaseStatusBar::GetPlayer ()
|
|||
|
||||
void DBaseStatusBar::MultiplayerChanged ()
|
||||
{
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -441,7 +452,7 @@ DHUDMessage *DBaseStatusBar::DetachMessage (DHUDMessage *msg)
|
|||
// Redraw the status bar in case it was covered
|
||||
if (screen != NULL)
|
||||
{
|
||||
SB_state = screen->GetPageCount();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
return probe;
|
||||
}
|
||||
|
@ -468,7 +479,7 @@ DHUDMessage *DBaseStatusBar::DetachMessage (DWORD id)
|
|||
// Redraw the status bar in case it was covered
|
||||
if (screen != NULL)
|
||||
{
|
||||
SB_state = screen->GetPageCount();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
return probe;
|
||||
}
|
||||
|
@ -1281,7 +1292,7 @@ void DBaseStatusBar::Draw (EHudState state)
|
|||
DTA_KeepRatio, true,
|
||||
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
||||
TAG_DONE);
|
||||
BorderNeedRefresh = screen->GetPageCount();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1641,7 +1652,7 @@ void DBaseStatusBar::Serialize (FArchive &arc)
|
|||
void DBaseStatusBar::ScreenSizeChanged ()
|
||||
{
|
||||
st_scale.Callback ();
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
|
||||
for (unsigned int i = 0; i < countof(Messages); ++i)
|
||||
{
|
||||
|
|
|
@ -234,7 +234,7 @@ public:
|
|||
{
|
||||
if (state == HUD_Fullscreen)
|
||||
{
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
DrawFullScreenStuff ();
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ private:
|
|||
|
||||
CursorImage = Images[imgINVCURS] != NULL ? imgINVCURS : imgCURSOR01;
|
||||
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
|
||||
CurrentPop = POP_None;
|
||||
PendingPop = POP_NoChange;
|
||||
|
|
|
@ -168,7 +168,7 @@ void HU_DrawScores (player_t *player)
|
|||
|
||||
HU_DoDrawScores (player, sortedplayers);
|
||||
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -88,7 +88,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
msg = GStrings("STSTR_DQDON");
|
||||
else
|
||||
msg = GStrings("STSTR_DQDOFF");
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
break;
|
||||
|
||||
case CHT_BUDDHA:
|
||||
|
|
|
@ -961,7 +961,7 @@ void DSaveMenu::DoSave (FSaveGameNode *node)
|
|||
G_SaveGame (filename, savegamestring);
|
||||
}
|
||||
M_ClearMenus();
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
@ -1100,7 +1100,7 @@ bool DLoadMenu::MenuEvent (int mkey, bool fromcontroller)
|
|||
quickSaveSlot = SaveGames[Selected];
|
||||
}
|
||||
M_ClearMenus();
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
LastAccessed = Selected;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -734,7 +734,7 @@ void M_ClearMenus ()
|
|||
DMenu::CurrentMenu->Destroy();
|
||||
DMenu::CurrentMenu = NULL;
|
||||
}
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
menuactive = MENU_Off;
|
||||
}
|
||||
|
||||
|
|
|
@ -179,8 +179,8 @@ void DMessageBoxMenu::Drawer ()
|
|||
PalEntry fade = 0;
|
||||
|
||||
int fontheight = SmallFont->GetHeight();
|
||||
//BorderNeedRefresh = screen->GetPageCount ();
|
||||
//SB_state = screen->GetPageCount ();
|
||||
//V_SetBorderNeedRefresh();
|
||||
//ST_SetNeedRefresh();
|
||||
|
||||
y = 100;
|
||||
|
||||
|
|
|
@ -128,7 +128,8 @@ enum EPuffFlags
|
|||
PF_HITTHING = 1,
|
||||
PF_MELEERANGE = 2,
|
||||
PF_TEMPORARY = 4,
|
||||
PF_HITTHINGBLEED = 8
|
||||
PF_HITTHINGBLEED = 8,
|
||||
PF_NORANDOMZ = 16
|
||||
};
|
||||
|
||||
AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t y, fixed_t z, angle_t dir, int updown, int flags = 0);
|
||||
|
@ -453,8 +454,14 @@ enum // P_AimLineAttack flags
|
|||
ALF_NOFRIENDS = 16,
|
||||
};
|
||||
|
||||
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, const PClass *pufftype, bool ismelee = false, AActor **victim = NULL);
|
||||
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, FName pufftype, bool ismelee = false, AActor **victim = NULL);
|
||||
enum // P_LineAttack flags
|
||||
{
|
||||
LAF_ISMELEEATTACK = 1,
|
||||
LAF_NORANDOMPUFFZ = 2
|
||||
};
|
||||
|
||||
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, const PClass *pufftype, int flags = 0, AActor **victim = NULL);
|
||||
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, int pitch, int damage, FName damageType, FName pufftype, int flags = 0, AActor **victim = NULL);
|
||||
void P_TraceBleed (int damage, fixed_t x, fixed_t y, fixed_t z, AActor *target, angle_t angle, int pitch);
|
||||
void P_TraceBleed (int damage, AActor *target, angle_t angle, int pitch);
|
||||
void P_TraceBleed (int damage, AActor *target, AActor *missile); // missile version
|
||||
|
|
|
@ -3467,7 +3467,7 @@ static bool CheckForSpectral (FTraceResults &res)
|
|||
//==========================================================================
|
||||
|
||||
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||
int pitch, int damage, FName damageType, const PClass *pufftype, bool ismeleeattack, AActor **victim)
|
||||
int pitch, int damage, FName damageType, const PClass *pufftype, int flags, AActor **victim)
|
||||
{
|
||||
fixed_t vx, vy, vz, shootz;
|
||||
FTraceResults trace;
|
||||
|
@ -3476,8 +3476,10 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
bool hitGhosts;
|
||||
bool killPuff = false;
|
||||
AActor *puff = NULL;
|
||||
int flags = ismeleeattack? PF_MELEERANGE : 0;
|
||||
int pflag = 0;
|
||||
int puffFlags = (flags & LAF_ISMELEEATTACK)? PF_MELEERANGE : 0;
|
||||
if (flags & LAF_NORANDOMPUFFZ)
|
||||
puffFlags |= PF_NORANDOMZ;
|
||||
|
||||
if (victim != NULL)
|
||||
{
|
||||
|
@ -3539,7 +3541,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
}
|
||||
if (puffDefaults->flags3 & MF3_ALWAYSPUFF)
|
||||
{ // Spawn the puff anyway
|
||||
puff = P_SpawnPuff (t1, pufftype, trace.X, trace.Y, trace.Z, angle - ANG180, 2, flags);
|
||||
puff = P_SpawnPuff (t1, pufftype, trace.X, trace.Y, trace.Z, angle - ANG180, 2, puffFlags);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3558,7 +3560,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
fixed_t closer = trace.Distance - 4*FRACUNIT;
|
||||
puff = P_SpawnPuff (t1, pufftype, t1->x + FixedMul (vx, closer),
|
||||
t1->y + FixedMul (vy, closer),
|
||||
shootz + FixedMul (vz, closer), angle - ANG90, 0, flags);
|
||||
shootz + FixedMul (vz, closer), angle - ANG90, 0, puffFlags);
|
||||
}
|
||||
|
||||
// [RH] Spawn a decal
|
||||
|
@ -3619,10 +3621,10 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
(trace.Actor->flags2 & (MF2_INVULNERABLE|MF2_DORMANT)))
|
||||
{
|
||||
if (!(trace.Actor->flags & MF_NOBLOOD))
|
||||
flags |= PF_HITTHINGBLEED;
|
||||
puffFlags |= PF_HITTHINGBLEED;
|
||||
|
||||
// We must pass the unreplaced puff type here
|
||||
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, flags|PF_HITTHING);
|
||||
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, puffFlags|PF_HITTHING);
|
||||
}
|
||||
|
||||
// Allow puffs to inflict poison damage, so that hitscans can poison, too.
|
||||
|
@ -3648,7 +3650,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
{
|
||||
// Since the puff is the damage inflictor we need it here
|
||||
// regardless of whether it is displayed or not.
|
||||
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, flags|PF_HITTHING|PF_TEMPORARY);
|
||||
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, puffFlags|PF_HITTHING|PF_TEMPORARY);
|
||||
killPuff = true;
|
||||
}
|
||||
newdam = P_DamageMobj (trace.Actor, puff ? puff : t1, t1, damage, damageType, dmgflags);
|
||||
|
@ -3694,7 +3696,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
|
||||
if (puff == NULL)
|
||||
{ // Spawn puff just to get a mass for the splash
|
||||
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, flags|PF_HITTHING|PF_TEMPORARY);
|
||||
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, puffFlags|PF_HITTHING|PF_TEMPORARY);
|
||||
killPuff = true;
|
||||
}
|
||||
SpawnDeepSplash (t1, trace, puff, vx, vy, vz, shootz, trace.Crossed3DWater != NULL);
|
||||
|
@ -3709,7 +3711,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
}
|
||||
|
||||
AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||
int pitch, int damage, FName damageType, FName pufftype, bool ismeleeattack, AActor **victim)
|
||||
int pitch, int damage, FName damageType, FName pufftype, int flags, AActor **victim)
|
||||
{
|
||||
const PClass * type = PClass::FindClass(pufftype);
|
||||
if (victim != NULL)
|
||||
|
@ -3722,7 +3724,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
}
|
||||
else
|
||||
{
|
||||
return P_LineAttack(t1, angle, distance, pitch, damage, damageType, type, ismeleeattack, victim);
|
||||
return P_LineAttack(t1, angle, distance, pitch, damage, damageType, type, flags, victim);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -4009,6 +4011,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color
|
|||
fixed_t x, y, z;
|
||||
bool spawnpuff;
|
||||
bool bleed = false;
|
||||
|
||||
int puffflags = PF_HITTHING;
|
||||
|
||||
x = x1 + FixedMul (RailHits[i].Distance, vx);
|
||||
|
|
|
@ -4739,6 +4739,7 @@ AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t
|
|||
{
|
||||
AActor *puff;
|
||||
|
||||
if (!(flags & PF_NORANDOMZ))
|
||||
z += pr_spawnpuff.Random2 () << 10;
|
||||
|
||||
puff = Spawn (pufftype, x, y, z, ALLOW_REPLACE);
|
||||
|
|
|
@ -460,7 +460,7 @@ void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight)
|
|||
void R_ExecuteSetViewSize ()
|
||||
{
|
||||
setsizeneeded = false;
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
|
||||
R_SetWindow (setblocks, SCREENWIDTH, SCREENHEIGHT, ST_Y);
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ void S_NoiseDebug (void)
|
|||
}
|
||||
chan = (FSoundChan *)((size_t)chan->PrevChan - myoffsetof(FSoundChan, NextChan));
|
||||
}
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
}
|
||||
|
||||
static FString LastLocalSndInfo;
|
||||
|
|
|
@ -29,7 +29,6 @@ struct event_t;
|
|||
extern int ST_X;
|
||||
extern int ST_Y;
|
||||
|
||||
extern int SB_state;
|
||||
bool ST_Responder(event_t* ev);
|
||||
|
||||
// [RH] Base blending values (for e.g. underwater)
|
||||
|
|
|
@ -94,7 +94,7 @@ void FStat::ToggleStat (const char *name)
|
|||
void FStat::ToggleStat ()
|
||||
{
|
||||
m_Active = !m_Active;
|
||||
SB_state = StatusBar == NULL ? 0 : screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
|
||||
void FStat::PrintStat ()
|
||||
|
@ -124,7 +124,7 @@ void FStat::PrintStat ()
|
|||
}
|
||||
if (count)
|
||||
{
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
// This file was automatically generated by the
|
||||
// updaterevision tool. Do not edit by hand.
|
||||
|
||||
#define ZD_SVN_REVISION_STRING "4166"
|
||||
#define ZD_SVN_REVISION_NUMBER 4166
|
||||
#define ZD_SVN_REVISION_STRING "4170"
|
||||
#define ZD_SVN_REVISION_NUMBER 4170
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include "gi.h"
|
||||
#include "g_level.h"
|
||||
#include "st_stuff.h"
|
||||
#include "sbar.h"
|
||||
|
||||
#include "i_system.h"
|
||||
#include "i_video.h"
|
||||
|
@ -1377,8 +1378,32 @@ bool DCanvas::ClipBox (int &x, int &y, int &w, int &h, const BYTE *&src, const i
|
|||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// V_SetBorderNeedRefresh
|
||||
//
|
||||
// Flag the border as in need of updating. (Probably because something that
|
||||
// was on top of it has changed.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void V_SetBorderNeedRefresh()
|
||||
{
|
||||
if (screen != NULL)
|
||||
{
|
||||
BorderNeedRefresh = screen->GetPageCount();
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// V_DrawFrame
|
||||
//
|
||||
// Draw a frame around the specified area using the view border
|
||||
// frame graphics. The border is drawn outside the area, not in it.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void V_DrawFrame (int left, int top, int width, int height)
|
||||
{
|
||||
FTexture *p;
|
||||
|
@ -1411,7 +1436,7 @@ void V_DrawFrame (int left, int top, int width, int height)
|
|||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
// V_DrawBorder
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
|
@ -1455,7 +1480,7 @@ static void V_DrawViewBorder (void)
|
|||
// Will draw borders around itself, too.
|
||||
if (SCREENWIDTH > 320)
|
||||
{
|
||||
SB_state = screen->GetPageCount ();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
|
||||
if (viewwidth == SCREENWIDTH)
|
||||
|
|
|
@ -1605,7 +1605,7 @@ void V_Init2()
|
|||
FBaseCVar::ResetColors ();
|
||||
C_NewModeAdjust();
|
||||
M_InitVideoModesMenu();
|
||||
BorderNeedRefresh = screen->GetPageCount ();
|
||||
V_SetBorderNeedRefresh();
|
||||
setsizeneeded = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -485,6 +485,7 @@ void V_DrawFrame (int left, int top, int width, int height);
|
|||
void V_DrawBorder (int x1, int y1, int x2, int y2);
|
||||
void V_RefreshViewBorder ();
|
||||
|
||||
void V_SetBorderNeedRefresh();
|
||||
|
||||
#if defined(X86_ASM) || defined(X64_ASM)
|
||||
extern "C" void ASM_PatchPitch (void);
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
#include "r_main.h"
|
||||
#include "r_data/r_translate.h"
|
||||
#include "f_wipe.h"
|
||||
#include "st_stuff.h"
|
||||
#include "sbar.h"
|
||||
#include "win32iface.h"
|
||||
#include "doomstat.h"
|
||||
#include "v_palette.h"
|
||||
|
@ -225,7 +225,8 @@ const char *const D3DFB::ShaderNames[D3DFB::NUM_SHADERS] =
|
|||
|
||||
CUSTOM_CVAR(Bool, vid_hw2d, true, CVAR_NOINITCALL)
|
||||
{
|
||||
BorderNeedRefresh = SB_state = screen->GetPageCount();
|
||||
V_SetBorderNeedRefresh();
|
||||
ST_SetNeedRefresh();
|
||||
}
|
||||
|
||||
CVAR(Bool, d3d_antilag, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
|
|
@ -27,6 +27,7 @@ const int CBAF_AIMFACING = 1;
|
|||
const int CBAF_NORANDOM = 2;
|
||||
const int CBAF_EXPLICITANGLE = 4;
|
||||
const int CBAF_NOPITCH = 8;
|
||||
const int CBAF_NORANDOMPUFFZ = 16;
|
||||
|
||||
// Flags for A_GunFlash
|
||||
const int GFF_NOEXTCHANGE = 1;
|
||||
|
@ -37,6 +38,7 @@ const int FBF_NORANDOM = 2;
|
|||
const int FBF_EXPLICITANGLE = 4;
|
||||
const int FBF_NOPITCH = 8;
|
||||
const int FBF_NOFLASH = 16;
|
||||
const int FBF_NORANDOMPUFFZ = 32;
|
||||
|
||||
// Flags for A_SpawnItemEx
|
||||
const int SXF_TRANSFERTRANSLATION=1;
|
||||
|
@ -150,10 +152,10 @@ const int SMF_CURSPEED = 4;
|
|||
const int CPF_USEAMMO = 1;
|
||||
const int CPF_DAGGER = 2;
|
||||
const int CPF_PULLIN = 4;
|
||||
const int CPF_NORANDOMPUFFZ = 8;
|
||||
|
||||
// Flags for A_Teleport
|
||||
const int TF_TELEFRAG = 1;
|
||||
const int TF_RANDOMDECIDE = 2;
|
||||
const int TF_TELEFRAG = 1;const int TF_RANDOMDECIDE = 2;
|
||||
|
||||
// Flags for A_WolfAttack
|
||||
const int WAF_NORANDOM = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue