mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-01 17:52:05 +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 "farchive.h"
|
||||||
#include "r_renderer.h"
|
#include "r_renderer.h"
|
||||||
#include "r_sky.h"
|
#include "r_sky.h"
|
||||||
|
#include "sbar.h"
|
||||||
|
|
||||||
#include "m_cheat.h"
|
#include "m_cheat.h"
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
|
@ -1081,7 +1082,7 @@ void AM_Stop ()
|
||||||
{
|
{
|
||||||
automapactive = false;
|
automapactive = false;
|
||||||
stopped = true;
|
stopped = true;
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
viewactive = true;
|
viewactive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1180,7 +1181,7 @@ void AM_ToggleMap ()
|
||||||
if (dmflags2 & DF2_NO_AUTOMAP)
|
if (dmflags2 & DF2_NO_AUTOMAP)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
if (!automapactive)
|
if (!automapactive)
|
||||||
{
|
{
|
||||||
AM_Start ();
|
AM_Start ();
|
||||||
|
@ -1191,7 +1192,7 @@ void AM_ToggleMap ()
|
||||||
if (am_overlay==1 && viewactive)
|
if (am_overlay==1 && viewactive)
|
||||||
{
|
{
|
||||||
viewactive = false;
|
viewactive = false;
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1134,7 +1134,7 @@ void C_DrawConsole (bool hw2d)
|
||||||
(viewwindowx || viewwindowy) &&
|
(viewwindowx || viewwindowy) &&
|
||||||
viewactive)
|
viewactive)
|
||||||
{
|
{
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
oldbottom = ConBottom;
|
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)),
|
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);
|
player->BlendA, 0, ConBottom, screen->GetWidth(), screen->GetHeight() - ConBottom);
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -697,21 +697,21 @@ void D_Display ()
|
||||||
|
|
||||||
if (screen->Lock (false))
|
if (screen->Lock (false))
|
||||||
{
|
{
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
// [RH] Allow temporarily disabling wipes
|
// [RH] Allow temporarily disabling wipes
|
||||||
if (NoWipe)
|
if (NoWipe)
|
||||||
{
|
{
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
NoWipe--;
|
NoWipe--;
|
||||||
wipe = false;
|
wipe = false;
|
||||||
wipegamestate = gamestate;
|
wipegamestate = gamestate;
|
||||||
}
|
}
|
||||||
else if (gamestate != wipegamestate && gamestate != GS_FULLCONSOLE && gamestate != GS_TITLELEVEL)
|
else if (gamestate != wipegamestate && gamestate != GS_FULLCONSOLE && gamestate != GS_TITLELEVEL)
|
||||||
{ // save the current screen if about to wipe
|
{ // save the current screen if about to wipe
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
switch (wipegamestate)
|
switch (wipegamestate)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
@ -780,8 +780,8 @@ void D_Display ()
|
||||||
if ((hw2d = screen->Begin2D(viewactive)))
|
if ((hw2d = screen->Begin2D(viewactive)))
|
||||||
{
|
{
|
||||||
// Redraw everything every frame when using 2D accel
|
// Redraw everything every frame when using 2D accel
|
||||||
SB_state = screen->GetPageCount();
|
ST_SetNeedRefresh();
|
||||||
BorderNeedRefresh = screen->GetPageCount();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
Renderer->DrawRemainingPlayerSprites();
|
Renderer->DrawRemainingPlayerSprites();
|
||||||
screen->DrawBlendingRect();
|
screen->DrawBlendingRect();
|
||||||
|
@ -1278,7 +1278,7 @@ void D_DoAdvanceDemo (void)
|
||||||
Advisory = NULL;
|
Advisory = NULL;
|
||||||
if (!M_DemoNoPlay)
|
if (!M_DemoNoPlay)
|
||||||
{
|
{
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
democount++;
|
democount++;
|
||||||
mysnprintf (demoname + 4, countof(demoname) - 4, "%d", democount);
|
mysnprintf (demoname + 4, countof(demoname) - 4, "%d", democount);
|
||||||
if (Wads.CheckNumForName (demoname) < 0)
|
if (Wads.CheckNumForName (demoname) < 0)
|
||||||
|
|
|
@ -2245,7 +2245,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
||||||
paused = player + 1;
|
paused = player + 1;
|
||||||
S_PauseSound (false, false);
|
S_PauseSound (false, false);
|
||||||
}
|
}
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
break;
|
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);
|
*s = clamp(ts + *s * 0.15f - 0.075f, 0.f, 1.f);
|
||||||
*v = clamp(tv + *v * 0.5f - 0.25f, 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)
|
if (set != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -227,7 +227,7 @@ void G_NewInit ()
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
G_ClearSnapshots ();
|
G_ClearSnapshots ();
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
netgame = false;
|
netgame = false;
|
||||||
multiplayer = false;
|
multiplayer = false;
|
||||||
if (demoplayback)
|
if (demoplayback)
|
||||||
|
@ -424,7 +424,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
||||||
demoplayback = false;
|
demoplayback = false;
|
||||||
automapactive = false;
|
automapactive = false;
|
||||||
viewactive = true;
|
viewactive = true;
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
|
|
||||||
//Added by MC: Initialize bots.
|
//Added by MC: Initialize bots.
|
||||||
if (!deathmatch)
|
if (!deathmatch)
|
||||||
|
@ -927,7 +927,7 @@ void G_DoLoadLevel (int position, bool autosave)
|
||||||
G_UnSnapshotLevel (!savegamerestore); // [RH] Restore the state of the level.
|
G_UnSnapshotLevel (!savegamerestore); // [RH] Restore the state of the level.
|
||||||
G_FinishTravel ();
|
G_FinishTravel ();
|
||||||
// For each player, if they are viewing through a player, make sure it is themselves.
|
// 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))
|
if (playeringame[ii] && (players[ii].camera == NULL || players[ii].camera->player != NULL))
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,7 +163,7 @@ DHUDMessage::~DHUDMessage ()
|
||||||
Lines = NULL;
|
Lines = NULL;
|
||||||
if (screen != NULL)
|
if (screen != NULL)
|
||||||
{
|
{
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (SourceText != NULL)
|
if (SourceText != NULL)
|
||||||
|
@ -597,7 +597,7 @@ void DHUDMessageFadeOut::DoDraw (int linenum, int x, int y, bool clean, int hudh
|
||||||
DTA_RenderStyle, Style,
|
DTA_RenderStyle, Style,
|
||||||
TAG_DONE);
|
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,
|
DTA_RenderStyle, Style,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
}
|
}
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,6 +55,8 @@ enum EHudState
|
||||||
|
|
||||||
class AWeapon;
|
class AWeapon;
|
||||||
|
|
||||||
|
void ST_SetNeedRefresh();
|
||||||
|
|
||||||
// HUD Message base object --------------------------------------------------
|
// HUD Message base object --------------------------------------------------
|
||||||
|
|
||||||
class DHUDMessage : public DObject
|
class DHUDMessage : public DObject
|
||||||
|
|
|
@ -209,6 +209,17 @@ void ST_Clear()
|
||||||
CrosshairNum = 0;
|
CrosshairNum = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// ST_SetNeedRefresh
|
||||||
|
//
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void ST_SetNeedRefresh()
|
||||||
|
{
|
||||||
|
SB_state = (StatusBar == NULL || screen == NULL) ? 0 : screen->GetPageCount();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Constructor
|
// Constructor
|
||||||
|
@ -297,7 +308,7 @@ void DBaseStatusBar::SetScaled (bool scale, bool force)
|
||||||
Displacement = 0;
|
Displacement = 0;
|
||||||
}
|
}
|
||||||
::ST_X = ST_X;
|
::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)
|
void DBaseStatusBar::AttachToPlayer (player_t *player)
|
||||||
{
|
{
|
||||||
CPlayer = player;
|
CPlayer = player;
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -331,7 +342,7 @@ int DBaseStatusBar::GetPlayer ()
|
||||||
|
|
||||||
void DBaseStatusBar::MultiplayerChanged ()
|
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
|
// Redraw the status bar in case it was covered
|
||||||
if (screen != NULL)
|
if (screen != NULL)
|
||||||
{
|
{
|
||||||
SB_state = screen->GetPageCount();
|
ST_SetNeedRefresh();
|
||||||
}
|
}
|
||||||
return probe;
|
return probe;
|
||||||
}
|
}
|
||||||
|
@ -468,7 +479,7 @@ DHUDMessage *DBaseStatusBar::DetachMessage (DWORD id)
|
||||||
// Redraw the status bar in case it was covered
|
// Redraw the status bar in case it was covered
|
||||||
if (screen != NULL)
|
if (screen != NULL)
|
||||||
{
|
{
|
||||||
SB_state = screen->GetPageCount();
|
ST_SetNeedRefresh();
|
||||||
}
|
}
|
||||||
return probe;
|
return probe;
|
||||||
}
|
}
|
||||||
|
@ -1281,7 +1292,7 @@ void DBaseStatusBar::Draw (EHudState state)
|
||||||
DTA_KeepRatio, true,
|
DTA_KeepRatio, true,
|
||||||
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
DTA_VirtualWidth, vwidth, DTA_VirtualHeight, vheight,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
BorderNeedRefresh = screen->GetPageCount();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1641,7 +1652,7 @@ void DBaseStatusBar::Serialize (FArchive &arc)
|
||||||
void DBaseStatusBar::ScreenSizeChanged ()
|
void DBaseStatusBar::ScreenSizeChanged ()
|
||||||
{
|
{
|
||||||
st_scale.Callback ();
|
st_scale.Callback ();
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < countof(Messages); ++i)
|
for (unsigned int i = 0; i < countof(Messages); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -234,7 +234,7 @@ public:
|
||||||
{
|
{
|
||||||
if (state == HUD_Fullscreen)
|
if (state == HUD_Fullscreen)
|
||||||
{
|
{
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
DrawFullScreenStuff ();
|
DrawFullScreenStuff ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ private:
|
||||||
|
|
||||||
CursorImage = Images[imgINVCURS] != NULL ? imgINVCURS : imgCURSOR01;
|
CursorImage = Images[imgINVCURS] != NULL ? imgINVCURS : imgCURSOR01;
|
||||||
|
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
|
|
||||||
CurrentPop = POP_None;
|
CurrentPop = POP_None;
|
||||||
PendingPop = POP_NoChange;
|
PendingPop = POP_NoChange;
|
||||||
|
|
|
@ -168,7 +168,7 @@ void HU_DrawScores (player_t *player)
|
||||||
|
|
||||||
HU_DoDrawScores (player, sortedplayers);
|
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");
|
msg = GStrings("STSTR_DQDON");
|
||||||
else
|
else
|
||||||
msg = GStrings("STSTR_DQDOFF");
|
msg = GStrings("STSTR_DQDOFF");
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHT_BUDDHA:
|
case CHT_BUDDHA:
|
||||||
|
|
|
@ -961,7 +961,7 @@ void DSaveMenu::DoSave (FSaveGameNode *node)
|
||||||
G_SaveGame (filename, savegamestring);
|
G_SaveGame (filename, savegamestring);
|
||||||
}
|
}
|
||||||
M_ClearMenus();
|
M_ClearMenus();
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -1100,7 +1100,7 @@ bool DLoadMenu::MenuEvent (int mkey, bool fromcontroller)
|
||||||
quickSaveSlot = SaveGames[Selected];
|
quickSaveSlot = SaveGames[Selected];
|
||||||
}
|
}
|
||||||
M_ClearMenus();
|
M_ClearMenus();
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
LastAccessed = Selected;
|
LastAccessed = Selected;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -734,7 +734,7 @@ void M_ClearMenus ()
|
||||||
DMenu::CurrentMenu->Destroy();
|
DMenu::CurrentMenu->Destroy();
|
||||||
DMenu::CurrentMenu = NULL;
|
DMenu::CurrentMenu = NULL;
|
||||||
}
|
}
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
menuactive = MENU_Off;
|
menuactive = MENU_Off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,8 +179,8 @@ void DMessageBoxMenu::Drawer ()
|
||||||
PalEntry fade = 0;
|
PalEntry fade = 0;
|
||||||
|
|
||||||
int fontheight = SmallFont->GetHeight();
|
int fontheight = SmallFont->GetHeight();
|
||||||
//BorderNeedRefresh = screen->GetPageCount ();
|
//V_SetBorderNeedRefresh();
|
||||||
//SB_state = screen->GetPageCount ();
|
//ST_SetNeedRefresh();
|
||||||
|
|
||||||
y = 100;
|
y = 100;
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,8 @@ enum EPuffFlags
|
||||||
PF_HITTHING = 1,
|
PF_HITTHING = 1,
|
||||||
PF_MELEERANGE = 2,
|
PF_MELEERANGE = 2,
|
||||||
PF_TEMPORARY = 4,
|
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);
|
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,
|
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);
|
enum // P_LineAttack flags
|
||||||
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);
|
{
|
||||||
|
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, 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, angle_t angle, int pitch);
|
||||||
void P_TraceBleed (int damage, AActor *target, AActor *missile); // missile version
|
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,
|
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;
|
fixed_t vx, vy, vz, shootz;
|
||||||
FTraceResults trace;
|
FTraceResults trace;
|
||||||
|
@ -3476,8 +3476,10 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||||
bool hitGhosts;
|
bool hitGhosts;
|
||||||
bool killPuff = false;
|
bool killPuff = false;
|
||||||
AActor *puff = NULL;
|
AActor *puff = NULL;
|
||||||
int flags = ismeleeattack? PF_MELEERANGE : 0;
|
|
||||||
int pflag = 0;
|
int pflag = 0;
|
||||||
|
int puffFlags = (flags & LAF_ISMELEEATTACK)? PF_MELEERANGE : 0;
|
||||||
|
if (flags & LAF_NORANDOMPUFFZ)
|
||||||
|
puffFlags |= PF_NORANDOMZ;
|
||||||
|
|
||||||
if (victim != NULL)
|
if (victim != NULL)
|
||||||
{
|
{
|
||||||
|
@ -3539,7 +3541,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||||
}
|
}
|
||||||
if (puffDefaults->flags3 & MF3_ALWAYSPUFF)
|
if (puffDefaults->flags3 & MF3_ALWAYSPUFF)
|
||||||
{ // Spawn the puff anyway
|
{ // 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
|
else
|
||||||
{
|
{
|
||||||
|
@ -3558,7 +3560,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||||
fixed_t closer = trace.Distance - 4*FRACUNIT;
|
fixed_t closer = trace.Distance - 4*FRACUNIT;
|
||||||
puff = P_SpawnPuff (t1, pufftype, t1->x + FixedMul (vx, closer),
|
puff = P_SpawnPuff (t1, pufftype, t1->x + FixedMul (vx, closer),
|
||||||
t1->y + FixedMul (vy, 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
|
// [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)))
|
(trace.Actor->flags2 & (MF2_INVULNERABLE|MF2_DORMANT)))
|
||||||
{
|
{
|
||||||
if (!(trace.Actor->flags & MF_NOBLOOD))
|
if (!(trace.Actor->flags & MF_NOBLOOD))
|
||||||
flags |= PF_HITTHINGBLEED;
|
puffFlags |= PF_HITTHINGBLEED;
|
||||||
|
|
||||||
// We must pass the unreplaced puff type here
|
// 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.
|
// 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
|
// Since the puff is the damage inflictor we need it here
|
||||||
// regardless of whether it is displayed or not.
|
// 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;
|
killPuff = true;
|
||||||
}
|
}
|
||||||
newdam = P_DamageMobj (trace.Actor, puff ? puff : t1, t1, damage, damageType, dmgflags);
|
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)
|
if (puff == NULL)
|
||||||
{ // Spawn puff just to get a mass for the splash
|
{ // 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;
|
killPuff = true;
|
||||||
}
|
}
|
||||||
SpawnDeepSplash (t1, trace, puff, vx, vy, vz, shootz, trace.Crossed3DWater != NULL);
|
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,
|
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);
|
const PClass * type = PClass::FindClass(pufftype);
|
||||||
if (victim != NULL)
|
if (victim != NULL)
|
||||||
|
@ -3722,7 +3724,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||||
}
|
}
|
||||||
else
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -4009,6 +4011,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color
|
||||||
fixed_t x, y, z;
|
fixed_t x, y, z;
|
||||||
bool spawnpuff;
|
bool spawnpuff;
|
||||||
bool bleed = false;
|
bool bleed = false;
|
||||||
|
|
||||||
int puffflags = PF_HITTHING;
|
int puffflags = PF_HITTHING;
|
||||||
|
|
||||||
x = x1 + FixedMul (RailHits[i].Distance, vx);
|
x = x1 + FixedMul (RailHits[i].Distance, vx);
|
||||||
|
|
|
@ -4738,8 +4738,9 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t y, fixed_t z, angle_t dir, int updown, int flags)
|
AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t y, fixed_t z, angle_t dir, int updown, int flags)
|
||||||
{
|
{
|
||||||
AActor *puff;
|
AActor *puff;
|
||||||
|
|
||||||
z += pr_spawnpuff.Random2 () << 10;
|
if (!(flags & PF_NORANDOMZ))
|
||||||
|
z += pr_spawnpuff.Random2 () << 10;
|
||||||
|
|
||||||
puff = Spawn (pufftype, x, y, z, ALLOW_REPLACE);
|
puff = Spawn (pufftype, x, y, z, ALLOW_REPLACE);
|
||||||
if (puff == NULL) return NULL;
|
if (puff == NULL) return NULL;
|
||||||
|
|
|
@ -460,7 +460,7 @@ void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight)
|
||||||
void R_ExecuteSetViewSize ()
|
void R_ExecuteSetViewSize ()
|
||||||
{
|
{
|
||||||
setsizeneeded = false;
|
setsizeneeded = false;
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
|
|
||||||
R_SetWindow (setblocks, SCREENWIDTH, SCREENHEIGHT, ST_Y);
|
R_SetWindow (setblocks, SCREENWIDTH, SCREENHEIGHT, ST_Y);
|
||||||
|
|
||||||
|
|
|
@ -268,7 +268,7 @@ void S_NoiseDebug (void)
|
||||||
}
|
}
|
||||||
chan = (FSoundChan *)((size_t)chan->PrevChan - myoffsetof(FSoundChan, NextChan));
|
chan = (FSoundChan *)((size_t)chan->PrevChan - myoffsetof(FSoundChan, NextChan));
|
||||||
}
|
}
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
static FString LastLocalSndInfo;
|
static FString LastLocalSndInfo;
|
||||||
|
|
|
@ -29,7 +29,6 @@ struct event_t;
|
||||||
extern int ST_X;
|
extern int ST_X;
|
||||||
extern int ST_Y;
|
extern int ST_Y;
|
||||||
|
|
||||||
extern int SB_state;
|
|
||||||
bool ST_Responder(event_t* ev);
|
bool ST_Responder(event_t* ev);
|
||||||
|
|
||||||
// [RH] Base blending values (for e.g. underwater)
|
// [RH] Base blending values (for e.g. underwater)
|
||||||
|
|
|
@ -94,7 +94,7 @@ void FStat::ToggleStat (const char *name)
|
||||||
void FStat::ToggleStat ()
|
void FStat::ToggleStat ()
|
||||||
{
|
{
|
||||||
m_Active = !m_Active;
|
m_Active = !m_Active;
|
||||||
SB_state = StatusBar == NULL ? 0 : screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FStat::PrintStat ()
|
void FStat::PrintStat ()
|
||||||
|
@ -124,7 +124,7 @@ void FStat::PrintStat ()
|
||||||
}
|
}
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
// This file was automatically generated by the
|
// This file was automatically generated by the
|
||||||
// updaterevision tool. Do not edit by hand.
|
// updaterevision tool. Do not edit by hand.
|
||||||
|
|
||||||
#define ZD_SVN_REVISION_STRING "4166"
|
#define ZD_SVN_REVISION_STRING "4170"
|
||||||
#define ZD_SVN_REVISION_NUMBER 4166
|
#define ZD_SVN_REVISION_NUMBER 4170
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
#include "gi.h"
|
#include "gi.h"
|
||||||
#include "g_level.h"
|
#include "g_level.h"
|
||||||
#include "st_stuff.h"
|
#include "st_stuff.h"
|
||||||
|
#include "sbar.h"
|
||||||
|
|
||||||
#include "i_system.h"
|
#include "i_system.h"
|
||||||
#include "i_video.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;
|
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
|
// Draw a frame around the specified area using the view border
|
||||||
// frame graphics. The border is drawn outside the area, not in it.
|
// frame graphics. The border is drawn outside the area, not in it.
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
void V_DrawFrame (int left, int top, int width, int height)
|
void V_DrawFrame (int left, int top, int width, int height)
|
||||||
{
|
{
|
||||||
FTexture *p;
|
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.
|
// Will draw borders around itself, too.
|
||||||
if (SCREENWIDTH > 320)
|
if (SCREENWIDTH > 320)
|
||||||
{
|
{
|
||||||
SB_state = screen->GetPageCount ();
|
ST_SetNeedRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (viewwidth == SCREENWIDTH)
|
if (viewwidth == SCREENWIDTH)
|
||||||
|
|
|
@ -1605,7 +1605,7 @@ void V_Init2()
|
||||||
FBaseCVar::ResetColors ();
|
FBaseCVar::ResetColors ();
|
||||||
C_NewModeAdjust();
|
C_NewModeAdjust();
|
||||||
M_InitVideoModesMenu();
|
M_InitVideoModesMenu();
|
||||||
BorderNeedRefresh = screen->GetPageCount ();
|
V_SetBorderNeedRefresh();
|
||||||
setsizeneeded = true;
|
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_DrawBorder (int x1, int y1, int x2, int y2);
|
||||||
void V_RefreshViewBorder ();
|
void V_RefreshViewBorder ();
|
||||||
|
|
||||||
|
void V_SetBorderNeedRefresh();
|
||||||
|
|
||||||
#if defined(X86_ASM) || defined(X64_ASM)
|
#if defined(X86_ASM) || defined(X64_ASM)
|
||||||
extern "C" void ASM_PatchPitch (void);
|
extern "C" void ASM_PatchPitch (void);
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
#include "r_main.h"
|
#include "r_main.h"
|
||||||
#include "r_data/r_translate.h"
|
#include "r_data/r_translate.h"
|
||||||
#include "f_wipe.h"
|
#include "f_wipe.h"
|
||||||
#include "st_stuff.h"
|
#include "sbar.h"
|
||||||
#include "win32iface.h"
|
#include "win32iface.h"
|
||||||
#include "doomstat.h"
|
#include "doomstat.h"
|
||||||
#include "v_palette.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)
|
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)
|
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_NORANDOM = 2;
|
||||||
const int CBAF_EXPLICITANGLE = 4;
|
const int CBAF_EXPLICITANGLE = 4;
|
||||||
const int CBAF_NOPITCH = 8;
|
const int CBAF_NOPITCH = 8;
|
||||||
|
const int CBAF_NORANDOMPUFFZ = 16;
|
||||||
|
|
||||||
// Flags for A_GunFlash
|
// Flags for A_GunFlash
|
||||||
const int GFF_NOEXTCHANGE = 1;
|
const int GFF_NOEXTCHANGE = 1;
|
||||||
|
@ -37,6 +38,7 @@ const int FBF_NORANDOM = 2;
|
||||||
const int FBF_EXPLICITANGLE = 4;
|
const int FBF_EXPLICITANGLE = 4;
|
||||||
const int FBF_NOPITCH = 8;
|
const int FBF_NOPITCH = 8;
|
||||||
const int FBF_NOFLASH = 16;
|
const int FBF_NOFLASH = 16;
|
||||||
|
const int FBF_NORANDOMPUFFZ = 32;
|
||||||
|
|
||||||
// Flags for A_SpawnItemEx
|
// Flags for A_SpawnItemEx
|
||||||
const int SXF_TRANSFERTRANSLATION=1;
|
const int SXF_TRANSFERTRANSLATION=1;
|
||||||
|
@ -150,10 +152,10 @@ const int SMF_CURSPEED = 4;
|
||||||
const int CPF_USEAMMO = 1;
|
const int CPF_USEAMMO = 1;
|
||||||
const int CPF_DAGGER = 2;
|
const int CPF_DAGGER = 2;
|
||||||
const int CPF_PULLIN = 4;
|
const int CPF_PULLIN = 4;
|
||||||
|
const int CPF_NORANDOMPUFFZ = 8;
|
||||||
|
|
||||||
// Flags for A_Teleport
|
// Flags for A_Teleport
|
||||||
const int TF_TELEFRAG = 1;
|
const int TF_TELEFRAG = 1;const int TF_RANDOMDECIDE = 2;
|
||||||
const int TF_RANDOMDECIDE = 2;
|
|
||||||
|
|
||||||
// Flags for A_WolfAttack
|
// Flags for A_WolfAttack
|
||||||
const int WAF_NORANDOM = 1;
|
const int WAF_NORANDOM = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue