- implemented Vavoom's vertex height things (1505, 1506). These are not tested yet!

- added Updaterevision tool to print proper revision information in the console.
- removed support for specialty file formats from ModPlug loader. Having the 4 basic
  module formats (MOD, XM, S3M and IT) plus UMX should be enough.
- added new brightmaps by phi108 (Player and Baron attack)
- fixed a few brightmap definition errors
- fixed: DFraggleThinker::Destroy still treated the SpawnedThings array as DActorPointers 
  although that helper class has been removed.
- merged the GC branch into the trunk
- updated to ZDoom r796

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@54 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2008-03-12 15:21:17 +00:00
parent e8e77c8122
commit 0c2560bb36
262 changed files with 11637 additions and 16759 deletions

View file

@ -53,6 +53,10 @@
#define XHAIRPICKUPSIZE (FRACUNIT*2+XHAIRSHRINKSIZE)
#define POWERUPICONSIZE 32
IMPLEMENT_POINTY_CLASS(DBaseStatusBar)
DECLARE_POINTER(Messages)
END_POINTERS
EXTERN_CVAR (Bool, am_showmonsters)
EXTERN_CVAR (Bool, am_showsecrets)
EXTERN_CVAR (Bool, am_showitems)
@ -62,7 +66,7 @@ EXTERN_CVAR (Bool, noisedebug)
EXTERN_CVAR (Bool, hud_scale)
EXTERN_CVAR (Int, con_scaletext)
FBaseStatusBar *StatusBar;
DBaseStatusBar *StatusBar;
extern int setblocks;
@ -126,7 +130,7 @@ CVAR (Bool, idmypos, false, 0);
// [RH] Amount of red flash for up to 114 damage points. Calculated by hand
// using a logarithmic scale and my trusty HP48G.
BYTE FBaseStatusBar::DamageToAlpha[114] =
BYTE DBaseStatusBar::DamageToAlpha[114] =
{
0, 8, 16, 23, 30, 36, 42, 47, 53, 58, 62, 67, 71, 75, 79,
83, 87, 90, 94, 97, 100, 103, 107, 109, 112, 115, 118, 120, 123, 125,
@ -144,7 +148,7 @@ BYTE FBaseStatusBar::DamageToAlpha[114] =
//
//---------------------------------------------------------------------------
FBaseStatusBar::FBaseStatusBar (int reltop)
DBaseStatusBar::DBaseStatusBar (int reltop)
{
Centering = false;
FixedOrigin = false;
@ -160,11 +164,11 @@ FBaseStatusBar::FBaseStatusBar (int reltop)
//---------------------------------------------------------------------------
//
// Destructor
// PROP Destroy
//
//---------------------------------------------------------------------------
FBaseStatusBar::~FBaseStatusBar ()
void DBaseStatusBar::Destroy ()
{
DHUDMessage *msg;
@ -172,9 +176,10 @@ FBaseStatusBar::~FBaseStatusBar ()
while (msg)
{
DHUDMessage *next = msg->Next;
delete msg;
msg->Destroy();
msg = next;
}
Super::Destroy();
}
//---------------------------------------------------------------------------
@ -183,7 +188,7 @@ FBaseStatusBar::~FBaseStatusBar ()
//
//---------------------------------------------------------------------------
void FBaseStatusBar::SetScaled (bool scale)
void DBaseStatusBar::SetScaled (bool scale)
{
Scaled = RelTop != 0 && (SCREENWIDTH != 320 && scale);
if (!Scaled)
@ -225,7 +230,7 @@ void FBaseStatusBar::SetScaled (bool scale)
//
//---------------------------------------------------------------------------
void FBaseStatusBar::AttachToPlayer (player_s *player)
void DBaseStatusBar::AttachToPlayer (player_s *player)
{
CPlayer = player;
SB_state = screen->GetPageCount ();
@ -237,7 +242,7 @@ void FBaseStatusBar::AttachToPlayer (player_s *player)
//
//---------------------------------------------------------------------------
int FBaseStatusBar::GetPlayer ()
int DBaseStatusBar::GetPlayer ()
{
return int(CPlayer - players);
}
@ -248,7 +253,7 @@ int FBaseStatusBar::GetPlayer ()
//
//---------------------------------------------------------------------------
void FBaseStatusBar::MultiplayerChanged ()
void DBaseStatusBar::MultiplayerChanged ()
{
SB_state = screen->GetPageCount ();
}
@ -259,7 +264,7 @@ void FBaseStatusBar::MultiplayerChanged ()
//
//---------------------------------------------------------------------------
void FBaseStatusBar::Tick ()
void DBaseStatusBar::Tick ()
{
DHUDMessage *msg = Messages;
DHUDMessage **prev = &Messages;
@ -271,7 +276,7 @@ void FBaseStatusBar::Tick ()
if (msg->Tick ())
{
*prev = next;
delete msg;
msg->Destroy();
}
else
{
@ -297,15 +302,16 @@ void FBaseStatusBar::Tick ()
//
//---------------------------------------------------------------------------
void FBaseStatusBar::AttachMessage (DHUDMessage *msg, DWORD id)
void DBaseStatusBar::AttachMessage (DHUDMessage *msg, DWORD id)
{
DHUDMessage *old = NULL;
DHUDMessage **prev;
DObject *container = this;
old = (id == 0 || id == 0xFFFFFFFF) ? NULL : DetachMessage (id);
if (old != NULL)
{
delete old;
old->Destroy();
}
prev = &Messages;
@ -315,12 +321,14 @@ void FBaseStatusBar::AttachMessage (DHUDMessage *msg, DWORD id)
// it gets drawn back to front.)
while (*prev != NULL && (*prev)->SBarID > id)
{
container = *prev;
prev = &(*prev)->Next;
}
msg->Next = *prev;
msg->SBarID = id;
*prev = msg;
GC::WriteBarrier(container, msg);
}
//---------------------------------------------------------------------------
@ -329,7 +337,7 @@ void FBaseStatusBar::AttachMessage (DHUDMessage *msg, DWORD id)
//
//---------------------------------------------------------------------------
DHUDMessage *FBaseStatusBar::DetachMessage (DHUDMessage *msg)
DHUDMessage *DBaseStatusBar::DetachMessage (DHUDMessage *msg)
{
DHUDMessage *probe = Messages;
DHUDMessage **prev = &Messages;
@ -349,7 +357,7 @@ DHUDMessage *FBaseStatusBar::DetachMessage (DHUDMessage *msg)
return probe;
}
DHUDMessage *FBaseStatusBar::DetachMessage (DWORD id)
DHUDMessage *DBaseStatusBar::DetachMessage (DWORD id)
{
DHUDMessage *probe = Messages;
DHUDMessage **prev = &Messages;
@ -375,7 +383,7 @@ DHUDMessage *FBaseStatusBar::DetachMessage (DWORD id)
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DetachAllMessages ()
void DBaseStatusBar::DetachAllMessages ()
{
DHUDMessage *probe = Messages;
@ -383,7 +391,7 @@ void FBaseStatusBar::DetachAllMessages ()
while (probe != NULL)
{
DHUDMessage *next = probe->Next;
delete probe;
probe->Destroy();
probe = next;
}
}
@ -394,7 +402,7 @@ void FBaseStatusBar::DetachAllMessages ()
//
//---------------------------------------------------------------------------
bool FBaseStatusBar::CheckMessage (DHUDMessage *msg)
bool DBaseStatusBar::CheckMessage (DHUDMessage *msg)
{
DHUDMessage *probe = Messages;
while (probe && probe != msg)
@ -410,7 +418,7 @@ bool FBaseStatusBar::CheckMessage (DHUDMessage *msg)
//
//---------------------------------------------------------------------------
void FBaseStatusBar::ShowPlayerName ()
void DBaseStatusBar::ShowPlayerName ()
{
EColorRange color;
@ -427,7 +435,7 @@ void FBaseStatusBar::ShowPlayerName ()
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrawImage (FTexture *img,
void DBaseStatusBar::DrawImage (FTexture *img,
int x, int y, FRemapTable *translation) const
{
if (img != NULL)
@ -448,7 +456,7 @@ void FBaseStatusBar::DrawImage (FTexture *img,
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrawDimImage (FTexture *img,
void DBaseStatusBar::DrawDimImage (FTexture *img,
int x, int y, bool dimmed) const
{
if (img != NULL)
@ -469,7 +477,7 @@ void FBaseStatusBar::DrawDimImage (FTexture *img,
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrawFadedImage (FTexture *img,
void DBaseStatusBar::DrawFadedImage (FTexture *img,
int x, int y, fixed_t shade) const
{
if (img != NULL)
@ -491,7 +499,7 @@ void FBaseStatusBar::DrawFadedImage (FTexture *img,
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrawPartialImage (FTexture *img, int wx, int ww) const
void DBaseStatusBar::DrawPartialImage (FTexture *img, int wx, int ww) const
{
if (img != NULL)
{
@ -511,7 +519,7 @@ void FBaseStatusBar::DrawPartialImage (FTexture *img, int wx, int ww) const
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrINumber (signed int val, int x, int y, int imgBase) const
void DBaseStatusBar::DrINumber (signed int val, int x, int y, int imgBase) const
{
int oldval;
@ -551,7 +559,7 @@ void FBaseStatusBar::DrINumber (signed int val, int x, int y, int imgBase) const
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrBNumber (signed int val, int x, int y, int size) const
void DBaseStatusBar::DrBNumber (signed int val, int x, int y, int size) const
{
bool neg;
int i, w;
@ -611,7 +619,7 @@ void FBaseStatusBar::DrBNumber (signed int val, int x, int y, int size) const
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrSmallNumber (int val, int x, int y) const
void DBaseStatusBar::DrSmallNumber (int val, int x, int y) const
{
int digit = 0;
@ -642,7 +650,7 @@ void FBaseStatusBar::DrSmallNumber (int val, int x, int y) const
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrINumberOuter (signed int val, int x, int y, bool center, int w) const
void DBaseStatusBar::DrINumberOuter (signed int val, int x, int y, bool center, int w) const
{
bool negative = false;
@ -706,7 +714,7 @@ void FBaseStatusBar::DrINumberOuter (signed int val, int x, int y, bool center,
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrBNumberOuter (signed int val, int x, int y, int size) const
void DBaseStatusBar::DrBNumberOuter (signed int val, int x, int y, int size) const
{
int xpos;
int w;
@ -813,7 +821,7 @@ void FBaseStatusBar::DrBNumberOuter (signed int val, int x, int y, int size) con
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrBNumberOuterFont (signed int val, int x, int y, int size) const
void DBaseStatusBar::DrBNumberOuterFont (signed int val, int x, int y, int size) const
{
int xpos;
int w, v;
@ -914,7 +922,7 @@ void FBaseStatusBar::DrBNumberOuterFont (signed int val, int x, int y, int size)
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrSmallNumberOuter (int val, int x, int y, bool center) const
void DBaseStatusBar::DrSmallNumberOuter (int val, int x, int y, bool center) const
{
int digit = 0;
@ -946,7 +954,7 @@ void FBaseStatusBar::DrSmallNumberOuter (int val, int x, int y, bool center) con
//
//---------------------------------------------------------------------------
void FBaseStatusBar::RefreshBackground () const
void DBaseStatusBar::RefreshBackground () const
{
int x, x2, y, ratio;
@ -981,7 +989,7 @@ void FBaseStatusBar::RefreshBackground () const
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrawCrosshair ()
void DBaseStatusBar::DrawCrosshair ()
{
static DWORD prevcolor = 0xffffffff;
static int palettecolor = 0;
@ -1072,7 +1080,7 @@ void FBaseStatusBar::DrawCrosshair ()
//
//---------------------------------------------------------------------------
void FBaseStatusBar::FlashCrosshair ()
void DBaseStatusBar::FlashCrosshair ()
{
CrosshairSize = XHAIRPICKUPSIZE;
}
@ -1083,7 +1091,7 @@ void FBaseStatusBar::FlashCrosshair ()
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrawMessages (int bottom) const
void DBaseStatusBar::DrawMessages (int bottom)
{
DHUDMessage *msg = Messages;
while (msg)
@ -1100,7 +1108,7 @@ void FBaseStatusBar::DrawMessages (int bottom) const
//
//---------------------------------------------------------------------------
void FBaseStatusBar::Draw (EHudState state)
void DBaseStatusBar::Draw (EHudState state)
{
char line[64+10];
@ -1254,7 +1262,7 @@ void FBaseStatusBar::Draw (EHudState state)
}
void FBaseStatusBar::DrawLog ()
void DBaseStatusBar::DrawLog ()
{
int hudwidth, hudheight;
@ -1318,7 +1326,7 @@ void FBaseStatusBar::DrawLog ()
}
}
bool FBaseStatusBar::MustDrawLog(EHudState)
bool DBaseStatusBar::MustDrawLog(EHudState)
{
return true;
}
@ -1329,7 +1337,7 @@ bool FBaseStatusBar::MustDrawLog(EHudState)
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrawTopStuff (EHudState state)
void DBaseStatusBar::DrawTopStuff (EHudState state)
{
if (demoplayback && demover != DEMOGAMEVERSION)
{
@ -1360,7 +1368,7 @@ void FBaseStatusBar::DrawTopStuff (EHudState state)
//
//---------------------------------------------------------------------------
void FBaseStatusBar::DrawPowerups ()
void DBaseStatusBar::DrawPowerups ()
{
// Each icon gets a 32x32 block to draw itself in.
int x, y;
@ -1388,7 +1396,7 @@ SV_AddBlend
[RH] This is from Q2.
=============
*/
void FBaseStatusBar::AddBlend (float r, float g, float b, float a, float v_blend[4])
void DBaseStatusBar::AddBlend (float r, float g, float b, float a, float v_blend[4])
{
float a2, a3;
@ -1409,7 +1417,7 @@ void FBaseStatusBar::AddBlend (float r, float g, float b, float a, float v_blend
//
//---------------------------------------------------------------------------
void FBaseStatusBar::BlendView (float blend[4])
void DBaseStatusBar::BlendView (float blend[4])
{
int cnt;
@ -1480,7 +1488,7 @@ void FBaseStatusBar::BlendView (float blend[4])
(int)(blend[2] * 255.0f), (int)(blend[3] * 256.0f));
}
void FBaseStatusBar::DrawConsistancy () const
void DBaseStatusBar::DrawConsistancy () const
{
static bool firsttime = true;
int i;
@ -1524,37 +1532,37 @@ void FBaseStatusBar::DrawConsistancy () const
}
}
void FBaseStatusBar::FlashItem (const PClass *itemtype)
void DBaseStatusBar::FlashItem (const PClass *itemtype)
{
}
void FBaseStatusBar::SetFace (void *)
void DBaseStatusBar::SetFace (void *)
{
}
void FBaseStatusBar::NewGame ()
void DBaseStatusBar::NewGame ()
{
}
void FBaseStatusBar::SetInteger (int pname, int param)
void DBaseStatusBar::SetInteger (int pname, int param)
{
}
void FBaseStatusBar::ShowPop (int popnum)
void DBaseStatusBar::ShowPop (int popnum)
{
ShowLog = (popnum == POP_Log && !ShowLog);
}
void FBaseStatusBar::ReceivedWeapon (AWeapon *weapon)
void DBaseStatusBar::ReceivedWeapon (AWeapon *weapon)
{
}
void FBaseStatusBar::Serialize (FArchive &arc)
void DBaseStatusBar::Serialize (FArchive &arc)
{
arc << Messages;
}
void FBaseStatusBar::ScreenSizeChanged ()
void DBaseStatusBar::ScreenSizeChanged ()
{
st_scale.Callback ();
SB_state = screen->GetPageCount ();
@ -1576,7 +1584,7 @@ void FBaseStatusBar::ScreenSizeChanged ()
//
//---------------------------------------------------------------------------
AInventory *FBaseStatusBar::ValidateInvFirst (int numVisible) const
AInventory *DBaseStatusBar::ValidateInvFirst (int numVisible) const
{
AInventory *item;
int i;
@ -1660,14 +1668,14 @@ AInventory *FBaseStatusBar::ValidateInvFirst (int numVisible) const
//============================================================================
//
// FBaseStatusBar :: GetCurrentAmmo
// DBaseStatusBar :: GetCurrentAmmo
//
// Returns the types and amounts of ammo used by the current weapon. If the
// weapon only uses one type of ammo, it is always returned as ammo1.
//
//============================================================================
void FBaseStatusBar::GetCurrentAmmo (AAmmo *&ammo1, AAmmo *&ammo2, int &ammocount1, int &ammocount2) const
void DBaseStatusBar::GetCurrentAmmo (AAmmo *&ammo1, AAmmo *&ammo2, int &ammocount1, int &ammocount2) const
{
if (CPlayer->ReadyWeapon != NULL)
{