mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
GCC fixes.
SVN r677 (trunk)
This commit is contained in:
parent
016ac67376
commit
bec0d3438f
9 changed files with 30 additions and 22 deletions
|
@ -104,7 +104,7 @@ bool wipe_doMelt (int ticks)
|
|||
int i, j, dy, x;
|
||||
const short *s;
|
||||
short *d;
|
||||
bool done;
|
||||
bool done = true;
|
||||
|
||||
while (ticks--)
|
||||
{
|
||||
|
|
|
@ -2166,7 +2166,7 @@ static void M_PlayerSetupDrawer ()
|
|||
(PSetupDef.y + LINEHEIGHT*3 + 57 - 104)*CleanYfac + (SCREENHEIGHT/2),
|
||||
DTA_DestWidth, MulScale16 (tex->GetWidth() * CleanXfac, Scale),
|
||||
DTA_DestHeight, MulScale16 (tex->GetHeight() * CleanYfac, Scale),
|
||||
DTA_Translation, translationtables[TRANSLATION_Players][MAXPLAYERS],
|
||||
DTA_Translation, translationtables[TRANSLATION_Players](MAXPLAYERS),
|
||||
TAG_DONE);
|
||||
}
|
||||
}
|
||||
|
@ -2596,7 +2596,7 @@ static void M_ChangePlayerTeam (int choice)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (team == teams.Size () - 1)
|
||||
if (team == int(teams.Size () - 1))
|
||||
{
|
||||
team = TEAM_None;
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ int FTextureManager::ListTextures (const char *name, TArray<int> &list)
|
|||
// NULL textures must be ignored.
|
||||
if (tex->UseType!=FTexture::TEX_Null)
|
||||
{
|
||||
int j;
|
||||
unsigned int j;
|
||||
for(j = 0; j < list.Size(); j++)
|
||||
{
|
||||
// Check for overriding definitions from newer WADs
|
||||
|
@ -383,7 +383,7 @@ void FTextureManager::AddHiresTextures ()
|
|||
}
|
||||
else
|
||||
{
|
||||
for(int i = 0; i < tlist.Size(); i++)
|
||||
for(unsigned int i = 0; i < tlist.Size(); i++)
|
||||
{
|
||||
FTexture * newtex = FTexture::CreateTexture (firsttx, FTexture::TEX_Any);
|
||||
if (newtex != NULL)
|
||||
|
@ -460,7 +460,7 @@ void FTextureManager::LoadHiresTex()
|
|||
}
|
||||
else
|
||||
{
|
||||
for(int i = 0; i < tlist.Size(); i++)
|
||||
for(unsigned int i = 0; i < tlist.Size(); i++)
|
||||
{
|
||||
FTexture * oldtex = Textures[tlist[i]].Texture;
|
||||
int sl;
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "gi.h"
|
||||
#include "stats.h"
|
||||
|
||||
TAutoGrowArray<FRemapTablePtr> translationtables[NUM_TRANSLATION_TABLES];
|
||||
TAutoGrowArray<FRemapTablePtr, FRemapTable *> translationtables[NUM_TRANSLATION_TABLES];
|
||||
|
||||
/****************************************************/
|
||||
/****************************************************/
|
||||
|
@ -281,7 +281,7 @@ FRemapTable *TranslationToTable(int translation)
|
|||
{
|
||||
unsigned int type = GetTranslationType(translation);
|
||||
unsigned int index = GetTranslationIndex(translation);
|
||||
TAutoGrowArray<FRemapTablePtr> *slots;
|
||||
TAutoGrowArray<FRemapTablePtr, FRemapTable *> *slots;
|
||||
|
||||
if (type <= 0 || type >= NUM_TRANSLATION_TABLES)
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ class FRemapTablePtr
|
|||
public:
|
||||
FRemapTablePtr() throw() : Ptr(0) {}
|
||||
FRemapTablePtr(FRemapTable *p) throw() : Ptr(p) {}
|
||||
FRemapTablePtr(FRemapTablePtr &p) throw() : Ptr(p.Ptr) {}
|
||||
FRemapTablePtr(const FRemapTablePtr &p) throw() : Ptr(p.Ptr) {}
|
||||
operator FRemapTable *() const throw() { return Ptr; }
|
||||
FRemapTablePtr &operator= (FRemapTable *p) throw() { Ptr = p; return *this; }
|
||||
FRemapTablePtr &operator= (FRemapTablePtr &p) throw() { Ptr = p.Ptr; return *this; }
|
||||
|
@ -66,7 +66,7 @@ private:
|
|||
FRemapTable *Ptr;
|
||||
};
|
||||
|
||||
extern TAutoGrowArray<FRemapTablePtr> translationtables[NUM_TRANSLATION_TABLES];
|
||||
extern TAutoGrowArray<FRemapTablePtr, FRemapTable *> translationtables[NUM_TRANSLATION_TABLES];
|
||||
|
||||
#define TRANSLATION_SHIFT 16
|
||||
#define TRANSLATION_MASK ((1<<TRANSLATION_SHIFT)-1)
|
||||
|
@ -87,8 +87,8 @@ inline int GetTranslationIndex(DWORD trans)
|
|||
// Retrieve the FRemapTable that an actor's translation value maps to.
|
||||
FRemapTable *TranslationToTable(int translation);
|
||||
|
||||
const int MAX_ACS_TRANSLATIONS = 65535;
|
||||
const int MAX_DECORATE_TRANSLATIONS = 65535;
|
||||
#define MAX_ACS_TRANSLATIONS 65535
|
||||
#define MAX_DECORATE_TRANSLATIONS 65535
|
||||
|
||||
// Initialize color translation tables, for player rendering etc.
|
||||
void R_InitTranslationTables (void);
|
||||
|
|
14
src/tarray.h
14
src/tarray.h
|
@ -43,7 +43,9 @@
|
|||
|
||||
// TArray -------------------------------------------------------------------
|
||||
|
||||
template <class T>
|
||||
// T is the type stored in the array.
|
||||
// TT is the type returned by operator().
|
||||
template <class T, class TT=T>
|
||||
class TArray
|
||||
{
|
||||
public:
|
||||
|
@ -107,10 +109,16 @@ public:
|
|||
Most = 0;
|
||||
}
|
||||
}
|
||||
// Return a reference to an element
|
||||
T &operator[] (unsigned int index) const
|
||||
{
|
||||
return Array[index];
|
||||
}
|
||||
// Returns the value of an element
|
||||
TT operator() (unsigned int index) const
|
||||
{
|
||||
return Array[index];
|
||||
}
|
||||
unsigned int Push (const T &item)
|
||||
{
|
||||
Grow (1);
|
||||
|
@ -283,8 +291,8 @@ private:
|
|||
// It can still be used as a normal TArray if needed. ACS uses this for
|
||||
// world and global arrays.
|
||||
|
||||
template <class T>
|
||||
class TAutoGrowArray : public TArray<T>
|
||||
template <class T, class TT=T>
|
||||
class TAutoGrowArray : public TArray<T, TT>
|
||||
{
|
||||
public:
|
||||
T GetVal (unsigned int index)
|
||||
|
|
|
@ -1584,13 +1584,13 @@ void WI_drawNetgameStats ()
|
|||
x = NG_STATSX;
|
||||
// [RH] Only use one graphic for the face backgrounds
|
||||
screen->DrawTexture (p, x - p->GetWidth(), y,
|
||||
DTA_Translation, translationtables[TRANSLATION_Players][i],
|
||||
DTA_Translation, translationtables[TRANSLATION_Players](i),
|
||||
DTA_Clean, true,
|
||||
TAG_DONE);
|
||||
|
||||
if (i == me)
|
||||
screen->DrawTexture (star, x - p->GetWidth(), y,
|
||||
DTA_Translation, translationtables[TRANSLATION_Players][i],
|
||||
DTA_Translation, translationtables[TRANSLATION_Players](i),
|
||||
DTA_Clean, true,
|
||||
TAG_DONE);
|
||||
|
||||
|
@ -1634,13 +1634,13 @@ void WI_drawNetgameStats ()
|
|||
if (gameinfo.gametype == GAME_Heretic)
|
||||
{
|
||||
screen->DrawTexture (star, 25, y,
|
||||
DTA_Translation, translationtables[TRANSLATION_Players][i],
|
||||
DTA_Translation, translationtables[TRANSLATION_Players](i),
|
||||
DTA_Clean, true,
|
||||
TAG_DONE);
|
||||
}
|
||||
else // Hexen and Strife don't have a face graphic for this.
|
||||
{
|
||||
char pstr[3]={'P', '1'+i};
|
||||
char pstr[3]={'P', '1'+i, 0};
|
||||
screen->SetFont (BigFont);
|
||||
screen->DrawText(CR_UNTRANSLATED, 25, y+10, pstr, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
|
|
|
@ -530,7 +530,7 @@ bool D3DFB::Wiper_Melt::Run(int ticks, D3DFB *fb)
|
|||
fb->D3DDevice->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, 2, verts, sizeof(FBVERTEX));
|
||||
|
||||
int i, dy;
|
||||
bool done;
|
||||
bool done = true;
|
||||
|
||||
// Copy the old screen in vertical strips on top of the new one.
|
||||
while (ticks--)
|
||||
|
|
Loading…
Reference in a new issue