- replaced homegrown SWORD, SBYTE and uint32_t types.

This commit is contained in:
Christoph Oelckers 2017-03-09 19:31:45 +01:00
parent cc1241a4b8
commit c008ddaf66
61 changed files with 235 additions and 238 deletions

View file

@ -153,12 +153,12 @@ CVAR (Color, am_ovportalcolor, 0x004022, CVAR_ARCHIVE);
struct AMColor
{
int Index;
uint32 RGB;
uint32_t RGB;
void FromCVar(FColorCVar & cv)
{
Index = cv.GetIndex();
RGB = uint32(cv) | MAKEARGB(255, 0, 0, 0);
RGB = uint32_t(cv) | MAKEARGB(255, 0, 0, 0);
}
void FromRGB(int r,int g, int b)

View file

@ -3,11 +3,8 @@
#include <stdint.h>
typedef int8_t SBYTE;
typedef uint8_t BYTE;
typedef int16_t SWORD;
typedef uint16_t WORD;
typedef uint32_t uint32;
typedef uint64_t QWORD;
// windef.h, included by windows.h, has its own incompatible definition
@ -17,9 +14,9 @@ typedef uint64_t QWORD;
// of the source.
#ifndef USE_WINDOWS_DWORD
typedef uint32 DWORD;
typedef uint32_t DWORD;
#endif
typedef uint32 BITFIELD;
typedef uint32_t BITFIELD;
typedef int INTBOOL;
#if !defined(GUID_DEFINED)
@ -58,8 +55,8 @@ typedef DWORD dsfixed_t; // fixedpt used by span drawer
#define FIXED_MAX (signed)(0x7fffffff)
#define FIXED_MIN (signed)(0x80000000)
#define DWORD_MIN ((uint32)0)
#define DWORD_MAX ((uint32)0xffffffff)
#define DWORD_MIN ((uint32_t)0)
#define DWORD_MAX ((uint32_t)0xffffffff)
// the last remnants of tables.h
#define ANGLE_90 (0x40000000)
@ -67,7 +64,7 @@ typedef DWORD dsfixed_t; // fixedpt used by span drawer
#define ANGLE_270 (0xc0000000)
#define ANGLE_MAX (0xffffffff)
typedef uint32 angle_t;
typedef uint32_t angle_t;
#ifdef __GNUC__

View file

@ -1677,7 +1677,7 @@ void C_SetCVarsToDefaults (void)
}
}
void C_ArchiveCVars (FConfigFile *f, uint32 filter)
void C_ArchiveCVars (FConfigFile *f, uint32_t filter)
{
FBaseCVar *cvar = CVars;

View file

@ -96,13 +96,13 @@ class FxCVar;
class FBaseCVar
{
public:
FBaseCVar (const char *name, uint32 flags, void (*callback)(FBaseCVar &));
FBaseCVar (const char *name, uint32_t flags, void (*callback)(FBaseCVar &));
virtual ~FBaseCVar ();
inline void Callback () { if (m_Callback) m_Callback (*this); }
inline const char *GetName () const { return Name; }
inline uint32 GetFlags () const { return Flags; }
inline uint32_t GetFlags () const { return Flags; }
inline FBaseCVar *GetNext() const { return m_Next; }
void CmdSet (const char *newval);
@ -147,11 +147,11 @@ protected:
static UCVarValue FromGUID (const GUID &value, ECVarType type);
char *Name;
uint32 Flags;
uint32_t Flags;
private:
FBaseCVar (const FBaseCVar &var);
FBaseCVar (const char *name, uint32 flags);
FBaseCVar (const char *name, uint32_t flags);
void (*m_Callback)(FBaseCVar &);
FBaseCVar *m_Next;
@ -159,26 +159,26 @@ private:
static bool m_UseCallback;
static bool m_DoNoSet;
friend FString C_GetMassCVarString (uint32 filter, bool compact);
friend FString C_GetMassCVarString (uint32_t filter, bool compact);
friend void C_ReadCVars (uint8_t **demo_p);
friend void C_BackupCVars (void);
friend FBaseCVar *FindCVar (const char *var_name, FBaseCVar **prev);
friend FBaseCVar *FindCVarSub (const char *var_name, int namelen);
friend void UnlatchCVars (void);
friend void DestroyCVarsFlagged (uint32_t flags);
friend void C_ArchiveCVars (FConfigFile *f, uint32 filter);
friend void C_ArchiveCVars (FConfigFile *f, uint32_t filter);
friend void C_SetCVarsToDefaults (void);
friend void FilterCompactCVars (TArray<FBaseCVar *> &cvars, uint32 filter);
friend void FilterCompactCVars (TArray<FBaseCVar *> &cvars, uint32_t filter);
friend void C_DeinitConsole();
};
// Returns a string with all cvars whose flags match filter. In compact mode,
// the cvar names are omitted to save space.
FString C_GetMassCVarString (uint32 filter, bool compact=false);
FString C_GetMassCVarString (uint32_t filter, bool compact=false);
// Writes all cvars that could effect demo sync to *demo_p. These are
// cvars that have either CVAR_SERVERINFO or CVAR_DEMOSAVE set.
void C_WriteCVars (uint8_t **demo_p, uint32 filter, bool compact=false);
void C_WriteCVars (uint8_t **demo_p, uint32_t filter, bool compact=false);
// Read all cvars from *demo_p and set them appropriately.
void C_ReadCVars (uint8_t **demo_p);
@ -205,12 +205,12 @@ void UnlatchCVars (void);
void DestroyCVarsFlagged (uint32_t flags);
// archive cvars to FILE f
void C_ArchiveCVars (FConfigFile *f, uint32 filter);
void C_ArchiveCVars (FConfigFile *f, uint32_t filter);
// initialize cvars to default values after they are created
void C_SetCVarsToDefaults (void);
void FilterCompactCVars (TArray<FBaseCVar *> &cvars, uint32 filter);
void FilterCompactCVars (TArray<FBaseCVar *> &cvars, uint32_t filter);
void C_DeinitConsole();
@ -218,7 +218,7 @@ class FBoolCVar : public FBaseCVar
{
friend class FxCVar;
public:
FBoolCVar (const char *name, bool def, uint32 flags, void (*callback)(FBoolCVar &)=NULL);
FBoolCVar (const char *name, bool def, uint32_t flags, void (*callback)(FBoolCVar &)=NULL);
virtual ECVarType GetRealType () const;
@ -244,7 +244,7 @@ class FIntCVar : public FBaseCVar
{
friend class FxCVar;
public:
FIntCVar (const char *name, int def, uint32 flags, void (*callback)(FIntCVar &)=NULL);
FIntCVar (const char *name, int def, uint32_t flags, void (*callback)(FIntCVar &)=NULL);
virtual ECVarType GetRealType () const;
@ -272,7 +272,7 @@ class FFloatCVar : public FBaseCVar
{
friend class FxCVar;
public:
FFloatCVar (const char *name, float def, uint32 flags, void (*callback)(FFloatCVar &)=NULL);
FFloatCVar (const char *name, float def, uint32_t flags, void (*callback)(FFloatCVar &)=NULL);
virtual ECVarType GetRealType () const;
@ -299,7 +299,7 @@ class FStringCVar : public FBaseCVar
{
friend class FxCVar;
public:
FStringCVar (const char *name, const char *def, uint32 flags, void (*callback)(FStringCVar &)=NULL);
FStringCVar (const char *name, const char *def, uint32_t flags, void (*callback)(FStringCVar &)=NULL);
~FStringCVar ();
virtual ECVarType GetRealType () const;
@ -326,7 +326,7 @@ class FColorCVar : public FIntCVar
{
friend class FxCVar;
public:
FColorCVar (const char *name, int def, uint32 flags, void (*callback)(FColorCVar &)=NULL);
FColorCVar (const char *name, int def, uint32_t flags, void (*callback)(FColorCVar &)=NULL);
virtual ECVarType GetRealType () const;
@ -334,8 +334,8 @@ public:
virtual UCVarValue GetGenericRepDefault (ECVarType type) const;
virtual void SetGenericRepDefault (UCVarValue value, ECVarType type);
inline operator uint32 () const { return Value; }
inline uint32 operator *() const { return Value; }
inline operator uint32_t () const { return Value; }
inline uint32_t operator *() const { return Value; }
inline int GetIndex () const { return Index; }
protected:
@ -351,7 +351,7 @@ class FFlagCVar : public FBaseCVar
{
friend class FxCVar;
public:
FFlagCVar (const char *name, FIntCVar &realvar, uint32 bitval);
FFlagCVar (const char *name, FIntCVar &realvar, uint32_t bitval);
virtual ECVarType GetRealType () const;
@ -372,7 +372,7 @@ protected:
virtual void DoSet (UCVarValue value, ECVarType type);
FIntCVar &ValueVar;
uint32 BitVal;
uint32_t BitVal;
int BitNum;
};
@ -380,7 +380,7 @@ class FMaskCVar : public FBaseCVar
{
friend class FxCVar;
public:
FMaskCVar (const char *name, FIntCVar &realvar, uint32 bitval);
FMaskCVar (const char *name, FIntCVar &realvar, uint32_t bitval);
virtual ECVarType GetRealType () const;
@ -397,14 +397,14 @@ protected:
virtual void DoSet (UCVarValue value, ECVarType type);
FIntCVar &ValueVar;
uint32 BitVal;
uint32_t BitVal;
int BitNum;
};
class FGUIDCVar : public FBaseCVar
{
public:
FGUIDCVar (const char *name, const GUID *defguid, uint32 flags, void (*callback)(FGUIDCVar &)=NULL);
FGUIDCVar (const char *name, const GUID *defguid, uint32_t flags, void (*callback)(FGUIDCVar &)=NULL);
virtual ECVarType GetRealType () const;

View file

@ -412,7 +412,7 @@ bool CheckWildcards (const char *pattern, const char *text)
void FormatGUID (char *buffer, size_t buffsize, const GUID &guid)
{
mysnprintf (buffer, buffsize, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
(uint32)guid.Data1, guid.Data2, guid.Data3,
(uint32_t)guid.Data1, guid.Data2, guid.Data3,
guid.Data4[0], guid.Data4[1],
guid.Data4[2], guid.Data4[3],
guid.Data4[4], guid.Data4[5],

View file

@ -76,5 +76,5 @@ BYTE FColorMatcher::Pick (int r, int g, int b)
if (Pal == NULL)
return 1;
return (BYTE)BestColor ((uint32 *)Pal, r, g, b);
return (BYTE)BestColor ((uint32_t *)Pal, r, g, b);
}

View file

@ -175,7 +175,7 @@ void D_GetPlayerColor (int player, float *h, float *s, float *v, FPlayerColorSet
{
userinfo_t *info = &players[player].userinfo;
FPlayerColorSet *colorset = NULL;
uint32 color;
uint32_t color;
int team;
if (players[player].mo != NULL)
@ -485,7 +485,7 @@ int userinfo_t::ColorSetChanged(int setnum)
return setnum;
}
uint32 userinfo_t::ColorChanged(const char *colorname)
uint32_t userinfo_t::ColorChanged(const char *colorname)
{
FColorCVar *color = static_cast<FColorCVar *>((*this)[NAME_Color]);
assert(color != NULL);
@ -496,7 +496,7 @@ uint32 userinfo_t::ColorChanged(const char *colorname)
return *color;
}
uint32 userinfo_t::ColorChanged(uint32 colorval)
uint32_t userinfo_t::ColorChanged(uint32_t colorval)
{
FColorCVar *color = static_cast<FColorCVar *>((*this)[NAME_Color]);
assert(color != NULL);

View file

@ -308,7 +308,7 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
{
return *static_cast<FIntCVar *>(*CheckKey(NAME_ColorSet));
}
uint32 GetColor() const
uint32_t GetColor() const
{
return *static_cast<FColorCVar *>(*CheckKey(NAME_Color));
}
@ -356,8 +356,8 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
int GenderChanged(const char *gendername);
int PlayerClassChanged(const char *classname);
int PlayerClassNumChanged(int classnum);
uint32 ColorChanged(const char *colorname);
uint32 ColorChanged(uint32 colorval);
uint32_t ColorChanged(const char *colorname);
uint32_t ColorChanged(uint32_t colorval);
int ColorSetChanged(int setnum);
};

View file

@ -237,7 +237,7 @@ namespace GC
extern DObject *Root;
// Current white value for potentially-live objects.
extern uint32 CurrentWhite;
extern uint32_t CurrentWhite;
// Current collector state.
extern EGCState State;
@ -255,7 +255,7 @@ namespace GC
extern bool FinalGC;
// Current white value for known-dead objects.
static inline uint32 OtherWhite()
static inline uint32_t OtherWhite()
{
return CurrentWhite ^ OF_WhiteBits;
}
@ -434,7 +434,7 @@ private:
public:
DObject *ObjNext; // Keep track of all allocated objects
DObject *GCNext; // Next object in this collection list
uint32 ObjectFlags; // Flags for this object
uint32_t ObjectFlags; // Flags for this object
void *ScriptVar(FName field, PType *type);

View file

@ -118,9 +118,9 @@ enum
struct PalEntry
{
PalEntry () {}
PalEntry (uint32 argb) { d = argb; }
operator uint32 () const { return d; }
PalEntry &operator= (uint32 other) { d = other; return *this; }
PalEntry (uint32_t argb) { d = argb; }
operator uint32_t () const { return d; }
PalEntry &operator= (uint32_t other) { d = other; return *this; }
PalEntry InverseColor() const { PalEntry nc; nc.a = a; nc.r = 255 - r; nc.g = 255 - g; nc.b = 255 - b; return nc; }
#ifdef __BIG_ENDIAN__
PalEntry (uint8_t ir, uint8_t ig, uint8_t ib) : a(0), r(ir), g(ig), b(ib) {}
@ -131,7 +131,7 @@ struct PalEntry
{
uint8_t a,r,g,b;
};
uint32 d;
uint32_t d;
};
#else
PalEntry (uint8_t ir, uint8_t ig, uint8_t ib) : b(ib), g(ig), r(ir), a(0) {}
@ -142,7 +142,7 @@ struct PalEntry
{
uint8_t b,g,r,a;
};
uint32 d;
uint32_t d;
};
#endif
};

View file

@ -343,9 +343,9 @@ public:
DBaseStatusBar (int reltop, int hres=320, int vres=200);
void OnDestroy() override;
void AttachMessage (DHUDMessage *msg, uint32 id=0, int layer=HUDMSGLayer_Default);
void AttachMessage (DHUDMessage *msg, uint32_t id=0, int layer=HUDMSGLayer_Default);
DHUDMessage *DetachMessage (DHUDMessage *msg);
DHUDMessage *DetachMessage (uint32 id);
DHUDMessage *DetachMessage (uint32_t id);
void DetachAllMessages ();
void ShowPlayerName ();
double GetDisplacement() { return Displacement; }

View file

@ -8,7 +8,7 @@
struct GLRenderSettings
{
SBYTE lightmode;
int8_t lightmode;
bool nocoloredspritelighting;
bool nolightfade;
bool notexturefill;

View file

@ -253,7 +253,7 @@ void F2DDrawer::AddDim(PalEntry color, float damount, int x1, int y1, int w, int
//
//==========================================================================
void F2DDrawer::AddClear(int left, int top, int right, int bottom, int palcolor, uint32 color)
void F2DDrawer::AddClear(int left, int top, int right, int bottom, int palcolor, uint32_t color)
{
PalEntry p = palcolor == -1 || color != 0 ? (PalEntry)color : GPalette.BaseColors[palcolor];
AddDim(p, 1.f, left, top, right - left, bottom - top);
@ -311,7 +311,7 @@ void F2DDrawer::AddFlatFill(int left, int top, int right, int bottom, FTexture *
//
//==========================================================================
void F2DDrawer::AddLine(int x1, int y1, int x2, int y2, int palcolor, uint32 color)
void F2DDrawer::AddLine(int x1, int y1, int x2, int y2, int palcolor, uint32_t color)
{
PalEntry p = color ? (PalEntry)color : GPalette.BaseColors[palcolor];
p.a = 255;
@ -344,7 +344,7 @@ void F2DDrawer::AddLine(int x1, int y1, int x2, int y2, int palcolor, uint32 col
//
//==========================================================================
void F2DDrawer::AddPixel(int x1, int y1, int palcolor, uint32 color)
void F2DDrawer::AddPixel(int x1, int y1, int palcolor, uint32_t color)
{
PalEntry p = color ? (PalEntry)color : GPalette.BaseColors[palcolor];
p.a = 255;
@ -372,7 +372,7 @@ void F2DDrawer::Draw()
F2DDrawer::EDrawType lasttype = DrawTypeTexture;
if (mData.Size() == 0) return;
SBYTE savedlightmode = glset.lightmode;
int8_t savedlightmode = glset.lightmode;
// lightmode is only relevant for automap subsectors,
// but We cannot use the software light mode here because it doesn't properly calculate the light for 2D rendering.
if (glset.lightmode == 8) glset.lightmode = 0;

View file

@ -57,15 +57,15 @@ class F2DDrawer : public FSimpleVertexBuffer
public:
void AddTexture(FTexture *img, DrawParms &parms);
void AddDim(PalEntry color, float damount, int x1, int y1, int w, int h);
void AddClear(int left, int top, int right, int bottom, int palcolor, uint32 color);
void AddClear(int left, int top, int right, int bottom, int palcolor, uint32_t color);
void AddFlatFill(int left, int top, int right, int bottom, FTexture *src, bool local_origin);
void AddPoly(FTexture *texture, FVector2 *points, int npoints,
double originx, double originy, double scalex, double scaley,
DAngle rotation, FDynamicColormap *colormap, PalEntry flatcolor, int lightlevel);
void AddLine(int x1, int y1, int x2, int y2, int palcolor, uint32 color);
void AddPixel(int x1, int y1, int palcolor, uint32 color);
void AddLine(int x1, int y1, int x2, int y2, int palcolor, uint32_t color);
void AddPixel(int x1, int y1, int palcolor, uint32_t color);
void Draw();
void Clear();

View file

@ -529,7 +529,7 @@ void FGLRenderer::CreateTonemapPalette()
{
for (int b = 0; b < 64; b++)
{
PalEntry color = GPalette.BaseColors[(BYTE)PTM_BestColor((uint32 *)GPalette.BaseColors, (r << 2) | (r >> 4), (g << 2) | (g >> 4), (b << 2) | (b >> 4), 0, 256)];
PalEntry color = GPalette.BaseColors[(BYTE)PTM_BestColor((uint32_t *)GPalette.BaseColors, (r << 2) | (r >> 4), (g << 2) | (g >> 4), (b << 2) | (b >> 4), 0, 256)];
int index = ((r * 64 + g) * 64 + b) * 4;
lut[index] = color.r;
lut[index + 1] = color.g;
@ -832,7 +832,7 @@ void FGLRenderer::ClearBorders()
// [SP] Re-implemented BestColor for more precision rather than speed. This function is only ever called once until the game palette is changed.
int FGLRenderer::PTM_BestColor (const uint32 *pal_in, int r, int g, int b, int first, int num)
int FGLRenderer::PTM_BestColor (const uint32_t *pal_in, int r, int g, int b, int first, int num)
{
const PalEntry *pal = (const PalEntry *)pal_in;
static double powtable[256];

View file

@ -215,7 +215,7 @@ public:
double originx, double originy, double scalex, double scaley,
DAngle rotation, FDynamicColormap *colormap, PalEntry flatcolor, int lightlevel, int bottomclip);
int PTM_BestColor (const uint32 *pal_in, int r, int g, int b, int first, int num);
int PTM_BestColor (const uint32_t *pal_in, int r, int g, int b, int first, int num);
static float GetZNear() { return 5.f; }
static float GetZFar() { return 65536.f; }

View file

@ -423,7 +423,7 @@ void OpenGLFrameBuffer::DrawTextureParms(FTexture *img, DrawParms &parms)
//
//
//==========================================================================
void OpenGLFrameBuffer::DrawLine(int x1, int y1, int x2, int y2, int palcolor, uint32 color)
void OpenGLFrameBuffer::DrawLine(int x1, int y1, int x2, int y2, int palcolor, uint32_t color)
{
if (GLRenderer != nullptr && GLRenderer->m2DDrawer != nullptr)
GLRenderer->m2DDrawer->AddLine(x1, y1, x2, y2, palcolor, color);
@ -434,7 +434,7 @@ void OpenGLFrameBuffer::DrawLine(int x1, int y1, int x2, int y2, int palcolor, u
//
//
//==========================================================================
void OpenGLFrameBuffer::DrawPixel(int x1, int y1, int palcolor, uint32 color)
void OpenGLFrameBuffer::DrawPixel(int x1, int y1, int palcolor, uint32_t color)
{
if (GLRenderer != nullptr && GLRenderer->m2DDrawer != nullptr)
GLRenderer->m2DDrawer->AddPixel(x1, y1, palcolor, color);
@ -475,7 +475,7 @@ void OpenGLFrameBuffer::FlatFill (int left, int top, int right, int bottom, FTex
//
//
//==========================================================================
void OpenGLFrameBuffer::Clear(int left, int top, int right, int bottom, int palcolor, uint32 color)
void OpenGLFrameBuffer::Clear(int left, int top, int right, int bottom, int palcolor, uint32_t color)
{
if (GLRenderer != nullptr && GLRenderer->m2DDrawer != nullptr)
GLRenderer->m2DDrawer->AddClear(left, top, right, bottom, palcolor, color);

View file

@ -62,9 +62,9 @@ public:
// 2D drawing
void DrawTextureParms(FTexture *img, DrawParms &parms);
void DrawLine(int x1, int y1, int x2, int y2, int palcolor, uint32 color);
void DrawPixel(int x1, int y1, int palcolor, uint32 color);
void Clear(int left, int top, int right, int bottom, int palcolor, uint32 color);
void DrawLine(int x1, int y1, int x2, int y2, int palcolor, uint32_t color);
void DrawPixel(int x1, int y1, int palcolor, uint32_t color);
void Clear(int left, int top, int right, int bottom, int palcolor, uint32_t color);
void Dim(PalEntry color=0);
void Dim (PalEntry color, float damount, int x1, int y1, int w, int h);
void FlatFill (int left, int top, int right, int bottom, FTexture *src, bool local_origin=false);

View file

@ -2491,7 +2491,7 @@ FNativePalette *OpenGLSWFrameBuffer::CreatePalette(FRemapTable *remap)
//
//==========================================================================
void OpenGLSWFrameBuffer::Clear(int left, int top, int right, int bottom, int palcolor, uint32 color)
void OpenGLSWFrameBuffer::Clear(int left, int top, int right, int bottom, int palcolor, uint32_t color)
{
if (In2D < 2)
{
@ -2590,7 +2590,7 @@ void OpenGLSWFrameBuffer::EndLineBatch()
//
//==========================================================================
void OpenGLSWFrameBuffer::DrawLine(int x0, int y0, int x1, int y1, int palcolor, uint32 color)
void OpenGLSWFrameBuffer::DrawLine(int x0, int y0, int x1, int y1, int palcolor, uint32_t color)
{
if (In2D < 2)
{
@ -2638,7 +2638,7 @@ void OpenGLSWFrameBuffer::DrawLine(int x0, int y0, int x1, int y1, int palcolor,
//
//==========================================================================
void OpenGLSWFrameBuffer::DrawPixel(int x, int y, int palcolor, uint32 color)
void OpenGLSWFrameBuffer::DrawPixel(int x, int y, int palcolor, uint32_t color)
{
if (In2D < 2)
{

View file

@ -54,11 +54,11 @@ public:
FNativeTexture *CreateTexture(FTexture *gametex, bool wrapping) override;
FNativePalette *CreatePalette(FRemapTable *remap) override;
void DrawTextureParms(FTexture *img, DrawParms &parms) override;
void Clear(int left, int top, int right, int bottom, int palcolor, uint32 color) override;
void Clear(int left, int top, int right, int bottom, int palcolor, uint32_t color) override;
void Dim(PalEntry color, float amount, int x1, int y1, int w, int h) override;
void FlatFill(int left, int top, int right, int bottom, FTexture *src, bool local_origin) override;
void DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32 realcolor) override;
void DrawPixel(int x, int y, int palcolor, uint32 rgbcolor) override;
void DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32_t realcolor) override;
void DrawPixel(int x, int y, int palcolor, uint32_t rgbcolor) override;
void FillSimplePoly(FTexture *tex, FVector2 *points, int npoints, double originx, double originy, double scalex, double scaley, DAngle rotation, FDynamicColormap *colormap, PalEntry flatcolor, int lightlevel, int bottomclip) override;
bool WipeStartScreen(int type) override;
void WipeEndScreen() override;

View file

@ -104,7 +104,7 @@ CUSTOM_CVAR(Int, gl_texture_hqresize_mt_height, 4, CVAR_ARCHIVE | CVAR_GLOBALCON
#endif // GZ_USE_LIBDISPATCH
static void scale2x ( uint32* inputBuffer, uint32* outputBuffer, int inWidth, int inHeight )
static void scale2x ( uint32_t* inputBuffer, uint32_t* outputBuffer, int inWidth, int inHeight )
{
const int width = 2* inWidth;
const int height = 2 * inHeight;
@ -117,15 +117,15 @@ static void scale2x ( uint32* inputBuffer, uint32* outputBuffer, int inWidth, in
{
const int jMinus = (j > 0) ? (j-1) : 0;
const int jPlus = (j < inHeight - 1 ) ? (j+1) : j;
const uint32 A = inputBuffer[ iMinus +inWidth*jMinus];
const uint32 B = inputBuffer[ iMinus +inWidth*j ];
const uint32 C = inputBuffer[ iMinus +inWidth*jPlus];
const uint32 D = inputBuffer[ i +inWidth*jMinus];
const uint32 E = inputBuffer[ i +inWidth*j ];
const uint32 F = inputBuffer[ i +inWidth*jPlus];
const uint32 G = inputBuffer[ iPlus +inWidth*jMinus];
const uint32 H = inputBuffer[ iPlus +inWidth*j ];
const uint32 I = inputBuffer[ iPlus +inWidth*jPlus];
const uint32_t A = inputBuffer[ iMinus +inWidth*jMinus];
const uint32_t B = inputBuffer[ iMinus +inWidth*j ];
const uint32_t C = inputBuffer[ iMinus +inWidth*jPlus];
const uint32_t D = inputBuffer[ i +inWidth*jMinus];
const uint32_t E = inputBuffer[ i +inWidth*j ];
const uint32_t F = inputBuffer[ i +inWidth*jPlus];
const uint32_t G = inputBuffer[ iPlus +inWidth*jMinus];
const uint32_t H = inputBuffer[ iPlus +inWidth*j ];
const uint32_t I = inputBuffer[ iPlus +inWidth*jPlus];
if (B != H && D != F) {
outputBuffer[2*i + width*2*j ] = D == B ? D : E;
outputBuffer[2*i + width*(2*j+1)] = B == F ? F : E;
@ -141,7 +141,7 @@ static void scale2x ( uint32* inputBuffer, uint32* outputBuffer, int inWidth, in
}
}
static void scale3x ( uint32* inputBuffer, uint32* outputBuffer, int inWidth, int inHeight )
static void scale3x ( uint32_t* inputBuffer, uint32_t* outputBuffer, int inWidth, int inHeight )
{
const int width = 3* inWidth;
const int height = 3 * inHeight;
@ -154,15 +154,15 @@ static void scale3x ( uint32* inputBuffer, uint32* outputBuffer, int inWidth, in
{
const int jMinus = (j > 0) ? (j-1) : 0;
const int jPlus = (j < inHeight - 1 ) ? (j+1) : j;
const uint32 A = inputBuffer[ iMinus +inWidth*jMinus];
const uint32 B = inputBuffer[ iMinus +inWidth*j ];
const uint32 C = inputBuffer[ iMinus +inWidth*jPlus];
const uint32 D = inputBuffer[ i +inWidth*jMinus];
const uint32 E = inputBuffer[ i +inWidth*j ];
const uint32 F = inputBuffer[ i +inWidth*jPlus];
const uint32 G = inputBuffer[ iPlus +inWidth*jMinus];
const uint32 H = inputBuffer[ iPlus +inWidth*j ];
const uint32 I = inputBuffer[ iPlus +inWidth*jPlus];
const uint32_t A = inputBuffer[ iMinus +inWidth*jMinus];
const uint32_t B = inputBuffer[ iMinus +inWidth*j ];
const uint32_t C = inputBuffer[ iMinus +inWidth*jPlus];
const uint32_t D = inputBuffer[ i +inWidth*jMinus];
const uint32_t E = inputBuffer[ i +inWidth*j ];
const uint32_t F = inputBuffer[ i +inWidth*jPlus];
const uint32_t G = inputBuffer[ iPlus +inWidth*jMinus];
const uint32_t H = inputBuffer[ iPlus +inWidth*j ];
const uint32_t I = inputBuffer[ iPlus +inWidth*jPlus];
if (B != H && D != F) {
outputBuffer[3*i + width*3*j ] = D == B ? D : E;
outputBuffer[3*i + width*(3*j+1)] = (D == B && E != C) || (B == F && E != A) ? B : E;
@ -188,21 +188,21 @@ static void scale3x ( uint32* inputBuffer, uint32* outputBuffer, int inWidth, in
}
}
static void scale4x ( uint32* inputBuffer, uint32* outputBuffer, int inWidth, int inHeight )
static void scale4x ( uint32_t* inputBuffer, uint32_t* outputBuffer, int inWidth, int inHeight )
{
int width = 2* inWidth;
int height = 2 * inHeight;
uint32 * buffer2x = new uint32[width*height];
uint32_t * buffer2x = new uint32_t[width*height];
scale2x ( reinterpret_cast<uint32*> ( inputBuffer ), reinterpret_cast<uint32*> ( buffer2x ), inWidth, inHeight );
scale2x ( reinterpret_cast<uint32_t*> ( inputBuffer ), reinterpret_cast<uint32_t*> ( buffer2x ), inWidth, inHeight );
width *= 2;
height *= 2;
scale2x ( reinterpret_cast<uint32*> ( buffer2x ), reinterpret_cast<uint32*> ( outputBuffer ), 2*inWidth, 2*inHeight );
scale2x ( reinterpret_cast<uint32_t*> ( buffer2x ), reinterpret_cast<uint32_t*> ( outputBuffer ), 2*inWidth, 2*inHeight );
delete[] buffer2x;
}
static unsigned char *scaleNxHelper( void (*scaleNxFunction) ( uint32* , uint32* , int , int),
static unsigned char *scaleNxHelper( void (*scaleNxFunction) ( uint32_t* , uint32_t* , int , int),
const int N,
unsigned char *inputBuffer,
const int inWidth,
@ -214,7 +214,7 @@ static unsigned char *scaleNxHelper( void (*scaleNxFunction) ( uint32* , uint32*
outHeight = N *inHeight;
unsigned char * newBuffer = new unsigned char[outWidth*outHeight*4];
scaleNxFunction ( reinterpret_cast<uint32*> ( inputBuffer ), reinterpret_cast<uint32*> ( newBuffer ), inWidth, inHeight );
scaleNxFunction ( reinterpret_cast<uint32_t*> ( inputBuffer ), reinterpret_cast<uint32_t*> ( newBuffer ), inWidth, inHeight );
delete[] inputBuffer;
return newBuffer;
}

View file

@ -1255,7 +1255,7 @@ static void UnpackPixels (int width, int bytesPerRow, int bitdepth, const uint8_
// in a cache line.
union
{
uint32 bits2l;
uint32_t bits2l;
uint8_t bits2[4];
};

View file

@ -39,7 +39,7 @@ typedef int32_t Bit32s;
typedef uint16_t Bit16u;
typedef int16_t Bit16s;
typedef uint8_t Bit8u;
typedef SBYTE Bit8s;
typedef int8_t Bit8s;
#define OPLTYPE_IS_OPL3
#undef PI

View file

@ -39,7 +39,7 @@ typedef int32_t Bit32s;
typedef uint16_t Bit16u;
typedef int16_t Bit16s;
typedef uint8_t Bit8u;
typedef SBYTE Bit8s;
typedef int8_t Bit8s;
// Channel types

View file

@ -217,7 +217,7 @@ void P_FindParticleSubsectors ()
static TMap<int, int> ColorSaver;
static uint32 ParticleColor(int rgb)
static uint32_t ParticleColor(int rgb)
{
int *val;
int stuff;
@ -232,7 +232,7 @@ static uint32 ParticleColor(int rgb)
return stuff;
}
static uint32 ParticleColor(int r, int g, int b)
static uint32_t ParticleColor(int r, int g, int b)
{
return ParticleColor(MAKERGB(r, g, b));
}

View file

@ -184,7 +184,7 @@ unsigned int I_FPSTime()
}
double I_GetTimeFrac(uint32* ms)
double I_GetTimeFrac(uint32_t* ms)
{
const uint32_t now = I_MSTime();

View file

@ -62,7 +62,7 @@ extern int (*I_WaitForTic) (int);
// tic will never arrive (unless it's the current one).
extern void (*I_FreezeTime) (bool frozen);
double I_GetTimeFrac (uint32 *ms);
double I_GetTimeFrac (uint32_t *ms);
// Return a seed value for the RNG.
unsigned int I_MakeRNGSeed();

View file

@ -177,7 +177,7 @@ void I_SelectTimer()
}
// Returns the fractional amount of a tic passed since the most recent tic
double I_GetTimeFrac (uint32 *ms)
double I_GetTimeFrac (uint32_t *ms)
{
DWORD now = SDL_GetTicks ();
if (ms) *ms = TicStart + (1000 / TICRATE);

View file

@ -28,7 +28,7 @@ public:
friend class SDLGLVideo;
virtual void SetVSync(bool vsync);
virtual void ScaleCoordsFromWindow(SWORD &x, SWORD &y);
virtual void ScaleCoordsFromWindow(int16_t &x, int16_t &y);
SDL_Window *GetSDLWindow() override { return Screen; }

View file

@ -66,7 +66,7 @@ extern TArray<FSpecialColormap> SpecialColormaps;
// some utility functions to store special colormaps in powerup blends
#define SPECIALCOLORMAP_MASK 0x00b60000
inline uint32 MakeSpecialColormap(int index)
inline uint32_t MakeSpecialColormap(int index)
{
assert(index >= 0 && index < 65536);
return index | SPECIALCOLORMAP_MASK;

View file

@ -105,7 +105,7 @@ static BYTE *GetVoxelRemap(const BYTE *pal)
{
// The voxel palette uses VGA colors, so we have to expand it
// from 6 to 8 bits per component.
remap[i] = BestColor((uint32 *)GPalette.BaseColors,
remap[i] = BestColor((uint32_t *)GPalette.BaseColors,
(oldpal[i*3 + 0] << 2) | (oldpal[i*3 + 0] >> 4),
(oldpal[i*3 + 1] << 2) | (oldpal[i*3 + 1] >> 4),
(oldpal[i*3 + 2] << 2) | (oldpal[i*3 + 2] >> 4));

View file

@ -44,7 +44,7 @@ static const char *BuiltInTypeNames[] =
{
"sint8", "uint8",
"sint16", "uint16",
"sint32", "uint32",
"sint32", "uint32_t",
"intauto",
"bool",

View file

@ -811,7 +811,7 @@ MusInfo *MOD_OpenSong(FileReader &reader);
// Music played via Game Music Emu ------------------------------------------
const char *GME_CheckFormat(uint32 header);
const char *GME_CheckFormat(uint32_t header);
MusInfo *GME_OpenSong(FileReader &reader, const char *fmt);
// --------------------------------------------------------------------------

View file

@ -102,7 +102,7 @@ CUSTOM_CVAR(Float, gme_stereodepth, 0.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
//
//==========================================================================
const char *GME_CheckFormat(uint32 id)
const char *GME_CheckFormat(uint32_t id)
{
return gme_identify_header(&id);
}

View file

@ -133,7 +133,7 @@ EXTERN_CVAR (Bool, snd_pitched)
#define MAKE_PTRID(x) ((void*)(uintptr_t)(x))
#define GET_PTRID(x) ((uint32)(uintptr_t)(x))
#define GET_PTRID(x) ((uint32_t)(uintptr_t)(x))
static ALenum checkALError(const char *fn, unsigned int ln)
@ -1053,7 +1053,7 @@ void OpenALSoundRenderer::SetSfxVolume(float volume)
void OpenALSoundRenderer::SetMusicVolume(float volume)
{
MusicVolume = volume;
for(uint32 i = 0;i < Streams.Size();++i)
for(uint32_t i = 0;i < Streams.Size();++i)
Streams[i]->UpdateVolume();
}
@ -1654,7 +1654,7 @@ void OpenALSoundRenderer::StopChannel(FISoundChannel *chan)
alSourcei(source, AL_BUFFER, 0);
getALError();
uint32 i;
uint32_t i;
if((i=PausableSfx.Find(source)) < PausableSfx.Size())
PausableSfx.Delete(i);
if((i=ReverbSfx.Find(source)) < ReverbSfx.Size())
@ -1747,10 +1747,10 @@ void OpenALSoundRenderer::Sync(bool sync)
TArray<ALuint> toplay = SfxGroup;
if(SFXPaused)
{
uint32 i = 0;
uint32_t i = 0;
while(i < toplay.Size())
{
uint32 p = PausableSfx.Find(toplay[i]);
uint32_t p = PausableSfx.Find(toplay[i]);
if(p < PausableSfx.Size())
toplay.Delete(i);
else
@ -1879,14 +1879,14 @@ void OpenALSoundRenderer::UpdateListener(SoundListener *listener)
alFilterf(EnvFilters[1], AL_LOWPASS_GAINHF, 1.f);
// Apply the updated filters on the sources
for(uint32 i = 0;i < ReverbSfx.Size();++i)
for(uint32_t i = 0;i < ReverbSfx.Size();++i)
{
alSourcei(ReverbSfx[i], AL_DIRECT_FILTER, EnvFilters[0]);
alSource3i(ReverbSfx[i], AL_AUXILIARY_SEND_FILTER, EnvSlot, 0, EnvFilters[1]);
}
}
for(uint32 i = 0;i < ReverbSfx.Size();++i)
for(uint32_t i = 0;i < ReverbSfx.Size();++i)
alSourcef(ReverbSfx[i], AL_PITCH, PITCH_MULT);
getALError();
}
@ -1903,14 +1903,14 @@ void OpenALSoundRenderer::UpdateListener(SoundListener *listener)
alFilterf(EnvFilters[0], AL_LOWPASS_GAINHF, 1.f);
alFilterf(EnvFilters[1], AL_LOWPASS_GAIN, 1.f);
alFilterf(EnvFilters[1], AL_LOWPASS_GAINHF, 1.f);
for(uint32 i = 0;i < ReverbSfx.Size();++i)
for(uint32_t i = 0;i < ReverbSfx.Size();++i)
{
alSourcei(ReverbSfx[i], AL_DIRECT_FILTER, EnvFilters[0]);
alSource3i(ReverbSfx[i], AL_AUXILIARY_SEND_FILTER, EnvSlot, 0, EnvFilters[1]);
}
}
for(uint32 i = 0;i < ReverbSfx.Size();++i)
for(uint32_t i = 0;i < ReverbSfx.Size();++i)
alSourcef(ReverbSfx[i], AL_PITCH, 1.f);
getALError();
}
@ -2009,9 +2009,9 @@ FString OpenALSoundRenderer::GatherStats()
alcGetIntegerv(Device, ALC_REFRESH, 1, &updates);
getALCError(Device);
uint32 total = Sources.Size();
uint32 used = SfxGroup.Size()+Streams.Size();
uint32 unused = FreeSfx.Size();
uint32_t total = Sources.Size();
uint32_t used = SfxGroup.Size()+Streams.Size();
uint32_t unused = FreeSfx.Size();
FString out;
out.Format("%u sources (" TEXTCOLOR_YELLOW"%u" TEXTCOLOR_NORMAL" active, " TEXTCOLOR_YELLOW"%u" TEXTCOLOR_NORMAL" free), Update interval: " TEXTCOLOR_YELLOW"%d" TEXTCOLOR_NORMAL"ms",
@ -2067,7 +2067,7 @@ MIDIDevice* OpenALSoundRenderer::CreateMIDIDevice() const
void OpenALSoundRenderer::PurgeStoppedSources()
{
// Release channels that are stopped
for(uint32 i = 0;i < SfxGroup.Size();++i)
for(uint32_t i = 0;i < SfxGroup.Size();++i)
{
ALuint src = SfxGroup[i];
ALint state = AL_INITIAL;

View file

@ -112,7 +112,7 @@ namespace swrenderer
v_step = 0.0;
}
// Convert to uint32:
// Convert to uint32_t:
uv_pos = (uint32_t)(v * 0x100000000LL);
uv_step = (uint32_t)(v_step * 0x100000000LL);
uv_max = 0;

View file

@ -384,7 +384,7 @@ void SWCanvas::FillSimplePoly(DCanvas *canvas, FTexture *tex, FVector2 *points,
viewport->RenderTarget = screen;
}
void SWCanvas::DrawLine(DCanvas *canvas, int x0, int y0, int x1, int y1, int palColor, uint32 realcolor)
void SWCanvas::DrawLine(DCanvas *canvas, int x0, int y0, int x1, int y1, int palColor, uint32_t realcolor)
{
const int WeightingScale = 0;
const int WEIGHTBITS = 6;
@ -581,7 +581,7 @@ void SWCanvas::DrawLine(DCanvas *canvas, int x0, int y0, int x1, int y1, int pal
canvas->Unlock();
}
void SWCanvas::DrawPixel(DCanvas *canvas, int x, int y, int palColor, uint32 realcolor)
void SWCanvas::DrawPixel(DCanvas *canvas, int x, int y, int palColor, uint32_t realcolor)
{
if (palColor < 0)
{
@ -653,7 +653,7 @@ void SWCanvas::PUTTRANSDOT(DCanvas *canvas, int xx, int yy, int basecolor, int l
}
}
void SWCanvas::Clear(DCanvas *canvas, int left, int top, int right, int bottom, int palcolor, uint32 color)
void SWCanvas::Clear(DCanvas *canvas, int left, int top, int right, int bottom, int palcolor, uint32_t color)
{
int x, y;
@ -828,12 +828,12 @@ void SWCanvas::Dim(DCanvas *canvas, PalEntry color, float damount, int x1, int y
}
}
int SWCanvas::PalFromRGB(uint32 rgb)
int SWCanvas::PalFromRGB(uint32_t rgb)
{
// For routines that take RGB colors, cache the previous lookup in case there
// are several repetitions with the same color.
static int LastPal = -1;
static uint32 LastRGB;
static uint32_t LastRGB;
if (LastPal >= 0 && LastRGB == rgb)
{

View file

@ -11,12 +11,12 @@ public:
static void FillSimplePoly(DCanvas *canvas, FTexture *tex, FVector2 *points, int npoints,
double originx, double originy, double scalex, double scaley, DAngle rotation,
FDynamicColormap *colormap, PalEntry flatcolor, int lightlevel, int bottomclip);
static void DrawLine(DCanvas *canvas, int x0, int y0, int x1, int y1, int palColor, uint32 realcolor);
static void DrawPixel(DCanvas *canvas, int x, int y, int palColor, uint32 realcolor);
static void Clear(DCanvas *canvas, int left, int top, int right, int bottom, int palcolor, uint32 color);
static void DrawLine(DCanvas *canvas, int x0, int y0, int x1, int y1, int palColor, uint32_t realcolor);
static void DrawPixel(DCanvas *canvas, int x, int y, int palColor, uint32_t realcolor);
static void Clear(DCanvas *canvas, int left, int top, int right, int bottom, int palcolor, uint32_t color);
static void Dim(DCanvas *canvas, PalEntry color, float damount, int x1, int y1, int w, int h);
private:
static void PUTTRANSDOT(DCanvas *canvas, int xx, int yy, int basecolor, int level);
static int PalFromRGB(uint32 rgb);
static int PalFromRGB(uint32_t rgb);
};

View file

@ -543,7 +543,7 @@ namespace swrenderer
bool bgra = viewport->RenderTarget->IsBgra();
if (bgra)
{
// The true color slab data array is identical, except its using uint32 instead of uint8.
// The true color slab data array is identical, except its using uint32_t instead of uint8.
//
// We can find the same slab column by calculating the offset from the start of SlabData
// and use that to offset into the BGRA version of the same data.

View file

@ -134,7 +134,7 @@ namespace swrenderer
double uv_stepd = FIXED2DBL(dc_iscale);
double v_step = uv_stepd / tex->GetHeight();
// Convert to uint32:
// Convert to uint32_t:
dc_iscale = (uint32_t)(v_step * (1 << 30));
// Texture mipmap and filter selection:

View file

@ -161,8 +161,8 @@ void FTextureManager::AddTiles (void *tiles)
int width = LittleShort(tilesizx[pic]);
int height = LittleShort(tilesizy[pic]);
DWORD anm = LittleLong(picanm[pic]);
int xoffs = (SBYTE)((anm >> 8) & 255) + width/2;
int yoffs = (SBYTE)((anm >> 16) & 255) + height/2;
int xoffs = (int8_t)((anm >> 8) & 255) + width/2;
int yoffs = (int8_t)((anm >> 16) & 255) + height/2;
int size = width*height;
FTextureID texnum;
FTexture *tex;

View file

@ -106,10 +106,10 @@ struct FDoorAnimation
// textures from the TEXTURE1/2 lists of patches.
struct patch_t
{
SWORD width; // bounding box size
SWORD height;
SWORD leftoffset; // pixels to the left of origin
SWORD topoffset; // pixels below the origin
int16_t width; // bounding box size
int16_t height;
int16_t leftoffset; // pixels to the left of origin
int16_t topoffset; // pixels below the origin
DWORD columnofs[]; // only [width] used
// the [0] is &columnofs[width]
};
@ -140,7 +140,7 @@ public:
static FTexture *CreateTexture(int lumpnum, int usetype);
virtual ~FTexture ();
SWORD LeftOffset, TopOffset;
int16_t LeftOffset, TopOffset;
BYTE WidthBits, HeightBits;
@ -166,7 +166,7 @@ public:
BYTE bKeepAround:1; // This texture was used as part of a multi-patch texture. Do not free it.
WORD Rotations;
SWORD SkyOffset;
int16_t SkyOffset;
enum // UseTypes
{

View file

@ -42,7 +42,7 @@
* T is the enum type of individual flags,
* TT is the underlying integer type used (defaults to uint32_t)
*/
template<typename T, typename TT = uint32>
template<typename T, typename TT = uint32_t>
class TFlags
{
struct ZeroDummy {};

View file

@ -474,7 +474,7 @@ void convert_sample_data(Sample *sp, const void *data)
{
case 0:
{ /* 8-bit, signed */
SBYTE *cp = (SBYTE *)data;
int8_t *cp = (int8_t *)data;
newdata = (sample_t *)safe_malloc((sp->data_length + 1) * sizeof(sample_t));
for (int i = 0; i < sp->data_length; ++i)
{

View file

@ -1123,7 +1123,7 @@ static void load_region_dls(Renderer *song, Sample *sample, DLS_Instrument *ins,
sample->type = INST_DLS;
sample->self_nonexclusive = !!(rgn->header->fusOptions & F_RGN_OPTION_SELFNONEXCLUSIVE);
sample->key_group = (SBYTE)rgn->header->usKeyGroup;
sample->key_group = (int8_t)rgn->header->usKeyGroup;
sample->low_freq = note_to_freq(rgn->header->RangeKey.usLow);
sample->high_freq = note_to_freq(rgn->header->RangeKey.usHigh);
sample->root_freq = note_to_freq(rgn->wsmp->usUnityNote + rgn->wsmp->sFineTune * .01f);

View file

@ -240,7 +240,7 @@ static inline int read_byte(FileReader *f)
static inline int read_char(FileReader *f)
{
SBYTE x;
int8_t x;
if (f->Read(&x, 1) != 1)
{
throw CIOErr();
@ -1487,7 +1487,7 @@ void SFFile::ApplyGeneratorsToRegion(SFGenComposite *gen, SFSample *sfsamp, Rend
// Set tuning (in cents)
sp->tune = gen->coarseTune * 100 + gen->fineTune;
sp->velocity = (SBYTE)gen->velocity;
sp->velocity = (int8_t)gen->velocity;
sp->initial_attenuation = gen->initialAttenuation;
}

View file

@ -43,7 +43,7 @@ struct SFSample
DWORD EndLoop;
DWORD SampleRate;
BYTE OriginalPitch;
SBYTE PitchCorrection;
int8_t PitchCorrection;
uint16_t SampleLink;
uint16_t SampleType;
char Name[21];

View file

@ -255,7 +255,7 @@ struct Sample
// SF2 stuff
int16_t tune;
SBYTE velocity;
int8_t velocity;
float initial_attenuation;
};
@ -312,7 +312,7 @@ struct ToneBankElement
FString name;
int note, pan, fontbank, fontpreset, fontnote;
SBYTE strip_loop, strip_envelope, strip_tail;
int8_t strip_loop, strip_envelope, strip_tail;
};
/* A hack to delay instrument loading until after reading the entire MIDI file. */
@ -430,7 +430,7 @@ struct Channel
pitchsens;
BYTE
volume, expression;
SBYTE
int8_t
panning;
uint16_t
rpn, nrpn;

View file

@ -873,14 +873,14 @@ void DCanvas::FillBorder (FTexture *img)
}
}
void DCanvas::DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32 realcolor)
void DCanvas::DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32_t realcolor)
{
#ifndef NO_SWRENDER
SWCanvas::DrawLine(this, x0, y0, x1, y1, palColor, realcolor);
#endif
}
void DCanvas::DrawPixel(int x, int y, int palColor, uint32 realcolor)
void DCanvas::DrawPixel(int x, int y, int palColor, uint32_t realcolor)
{
#ifndef NO_SWRENDER
SWCanvas::DrawPixel(this, x, y, palColor, realcolor);
@ -895,7 +895,7 @@ void DCanvas::DrawPixel(int x, int y, int palColor, uint32 realcolor)
//
//==========================================================================
void DCanvas::Clear (int left, int top, int right, int bottom, int palcolor, uint32 color)
void DCanvas::Clear (int left, int top, int right, int bottom, int palcolor, uint32_t color)
{
#ifndef NO_SWRENDER
if (palcolor < 0 && APART(color) != 255)

View file

@ -318,7 +318,7 @@ FFont *V_GetFont(const char *name)
if (lump != -1)
{
uint32 head;
uint32_t head;
{
FWadLump lumpy = Wads.OpenLumpNum (lump);
lumpy.Read (&head, 4);

View file

@ -107,7 +107,7 @@ CCMD (bumpgamma)
/* Palette management stuff */
/****************************/
int BestColor (const uint32 *pal_in, int r, int g, int b, int first, int num)
int BestColor (const uint32_t *pal_in, int r, int g, int b, int first, int num)
{
const PalEntry *pal = (const PalEntry *)pal_in;
int bestcolor = first;

View file

@ -70,7 +70,7 @@ extern FPalette GPalette;
// The color overlay to use for depleted items
#define DIM_OVERLAY MAKEARGB(170,0,0,0)
int BestColor (const uint32 *pal, int r, int g, int b, int first=1, int num=255);
int BestColor (const uint32_t *pal, int r, int g, int b, int first=1, int num=255);
void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a);
void InitPalette ();

View file

@ -68,7 +68,7 @@ static void Convert32 (uint8_t *src, int srcpitch,
void *destin, int destpitch, int destwidth, int destheight,
fixed_t xstep, fixed_t ystep, fixed_t xfrac, fixed_t yfrac);
void PfxState::SetFormat (int bits, uint32 redMask, uint32 greenMask, uint32 blueMask)
void PfxState::SetFormat (int bits, uint32_t redMask, uint32_t greenMask, uint32_t blueMask)
{
switch (bits)
{

View file

@ -136,7 +136,7 @@ enum
class FFont;
struct FRemapTable;
class player_t;
typedef uint32 angle_t;
typedef uint32_t angle_t;
struct DrawParms
{
@ -157,9 +157,9 @@ struct DrawParms
double top;
double left;
float Alpha;
uint32 fillcolor;
uint32_t fillcolor;
FRemapTable *remap;
uint32 colorOverlay;
uint32_t colorOverlay;
INTBOOL alphaChannel;
INTBOOL flipX;
//float shadowAlpha;
@ -235,13 +235,13 @@ public:
struct FDynamicColormap *colormap, PalEntry flatcolor, int lightlevel, int bottomclip);
// Set an area to a specified color
virtual void Clear (int left, int top, int right, int bottom, int palcolor, uint32 color);
virtual void Clear (int left, int top, int right, int bottom, int palcolor, uint32_t color);
// Draws a line
virtual void DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32 realcolor);
virtual void DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32_t realcolor);
// Draws a single pixel
virtual void DrawPixel(int x, int y, int palcolor, uint32 rgbcolor);
virtual void DrawPixel(int x, int y, int palcolor, uint32_t rgbcolor);
// Calculate gamma table
void CalcGamma (float gamma, BYTE gammalookup[256]);
@ -288,7 +288,7 @@ protected:
void DrawTextCommon(FFont *font, int normalcolor, double x, double y, const char *string, DrawParms &parms);
bool ClipBox (int &left, int &top, int &width, int &height, const BYTE *&src, const int srcpitch) const;
void DrawTextureV(FTexture *img, double x, double y, uint32 tag, va_list tags) = delete;
void DrawTextureV(FTexture *img, double x, double y, uint32_t tag, va_list tags) = delete;
virtual void DrawTextureParms(FTexture *img, DrawParms &parms);
template<class T>
@ -426,9 +426,9 @@ public:
virtual bool WipeDo(int ticks);
virtual void WipeCleanup();
virtual void ScaleCoordsFromWindow(SWORD &x, SWORD &y) {}
virtual void ScaleCoordsFromWindow(int16_t &x, int16_t &y) {}
uint32 GetLastFPS() const { return LastCount; }
uint32_t GetLastFPS() const { return LastCount; }
#ifdef _WIN32
virtual void PaletteChanged () = 0;
@ -448,7 +448,7 @@ protected:
DFrameBuffer () {}
private:
uint32 LastMS, LastSec, FrameCount, LastCount, LastTic;
uint32_t LastMS, LastSec, FrameCount, LastCount, LastTic;
};

View file

@ -2636,7 +2636,7 @@ FNativePalette *D3DFB::CreatePalette(FRemapTable *remap)
//
//==========================================================================
void D3DFB::Clear (int left, int top, int right, int bottom, int palcolor, uint32 color)
void D3DFB::Clear (int left, int top, int right, int bottom, int palcolor, uint32_t color)
{
if (In2D < 2)
{
@ -2735,7 +2735,7 @@ void D3DFB::EndLineBatch()
//
//==========================================================================
void D3DFB::DrawLine(int x0, int y0, int x1, int y1, int palcolor, uint32 color)
void D3DFB::DrawLine(int x0, int y0, int x1, int y1, int palcolor, uint32_t color)
{
if (In2D < 2)
{
@ -2783,7 +2783,7 @@ void D3DFB::DrawLine(int x0, int y0, int x1, int y1, int palcolor, uint32 color)
//
//==========================================================================
void D3DFB::DrawPixel(int x, int y, int palcolor, uint32 color)
void D3DFB::DrawPixel(int x, int y, int palcolor, uint32_t color)
{
if (In2D < 2)
{

View file

@ -781,7 +781,7 @@ void DDrawFB::RebuildColorTable ()
}
for (i = 0; i < 256; i++)
{
GPfxPal.Pal8[i] = (BYTE)BestColor ((uint32 *)syspal, PalEntries[i].peRed,
GPfxPal.Pal8[i] = (BYTE)BestColor ((uint32_t *)syspal, PalEntries[i].peRed,
PalEntries[i].peGreen, PalEntries[i].peBlue);
}
}

View file

@ -168,15 +168,15 @@ struct PS2Descriptor
{
const char *AdapterName;
BYTE PacketSize;
SBYTE ControllerNumber;
SBYTE ControllerStatus;
int8_t ControllerNumber;
int8_t ControllerStatus;
BYTE LeftX;
BYTE LeftY;
BYTE RightX;
BYTE RightY;
SBYTE DPadHat;
int8_t DPadHat;
BYTE DPadButtonsNibble:1;
SBYTE DPadButtons:7; // up, right, down, left
int8_t DPadButtons:7; // up, right, down, left
BYTE ButtonSet1:7; // triangle, circle, cross, square
BYTE ButtonSet1Nibble:1;
BYTE ButtonSet2:7; // L2, R2, L1, R1

View file

@ -163,7 +163,7 @@ UINT TimerPeriod;
UINT TimerEventID;
UINT MillisecondsPerTic;
HANDLE NewTicArrived;
uint32 LanguageIDs[4];
uint32_t LanguageIDs[4];
int (*I_GetTime) (bool saveMS);
int (*I_WaitForTic) (int);
@ -487,7 +487,7 @@ static void CALLBACK TimerTicked(UINT id, UINT msg, DWORD_PTR user, DWORD_PTR dw
//
//==========================================================================
double I_GetTimeFrac(uint32 *ms)
double I_GetTimeFrac(uint32_t *ms)
{
DWORD now = timeGetTime();
if (ms != NULL)

View file

@ -36,7 +36,7 @@ enum
LANGIDX_SysPreferred,
LANGIDX_SysDefault
};
extern uint32 LanguageIDs[4];
extern uint32_t LanguageIDs[4];
extern void SetLanguageIDs ();
// [RH] Detects the OS the game is running under.
@ -66,7 +66,7 @@ extern int (*I_WaitForTic) (int);
// tic will never arrive (unless it's the current one).
extern void (*I_FreezeTime) (bool frozen);
double I_GetTimeFrac (uint32 *ms);
double I_GetTimeFrac (uint32_t *ms);
// Return a seed value for the RNG.
unsigned int I_MakeRNGSeed();

View file

@ -132,11 +132,11 @@ public:
FNativeTexture *CreateTexture (FTexture *gametex, bool wrapping);
FNativePalette *CreatePalette (FRemapTable *remap);
void DrawTextureParms (FTexture *img, DrawParms &parms);
void Clear (int left, int top, int right, int bottom, int palcolor, uint32 color);
void Clear (int left, int top, int right, int bottom, int palcolor, uint32_t color);
void Dim (PalEntry color, float amount, int x1, int y1, int w, int h);
void FlatFill (int left, int top, int right, int bottom, FTexture *src, bool local_origin);
void DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32 realcolor);
void DrawPixel(int x, int y, int palcolor, uint32 rgbcolor);
void DrawLine(int x0, int y0, int x1, int y1, int palColor, uint32_t realcolor);
void DrawPixel(int x, int y, int palcolor, uint32_t rgbcolor);
void FillSimplePoly(FTexture *tex, FVector2 *points, int npoints,
double originx, double originy, double scalex, double scaley,
DAngle rotation, FDynamicColormap *colormap, PalEntry flatcolor, int lightlevel, int bottomclip) override;

View file

@ -8,12 +8,12 @@ struct CPUInfo // 92 bytes
union
{
char VendorID[16];
uint32 dwVendorID[4];
uint32_t dwVendorID[4];
};
union
{
char CPUString[48];
uint32 dwCPUString[12];
uint32_t dwCPUString[12];
};
BYTE Stepping;
@ -30,55 +30,55 @@ struct CPUInfo // 92 bytes
BYTE CPUCount;
BYTE APICID;
uint32 bSSE3:1;
uint32 DontCare1:8;
uint32 bSSSE3:1;
uint32 DontCare1a:9;
uint32 bSSE41:1;
uint32 bSSE42:1;
uint32 DontCare2a:11;
uint32_t bSSE3:1;
uint32_t DontCare1:8;
uint32_t bSSSE3:1;
uint32_t DontCare1a:9;
uint32_t bSSE41:1;
uint32_t bSSE42:1;
uint32_t DontCare2a:11;
uint32 bFPU:1;
uint32 bVME:1;
uint32 bDE:1;
uint32 bPSE:1;
uint32 bRDTSC:1;
uint32 bMSR:1;
uint32 bPAE:1;
uint32 bMCE:1;
uint32 bCX8:1;
uint32 bAPIC:1;
uint32 bReserved1:1;
uint32 bSEP:1;
uint32 bMTRR:1;
uint32 bPGE:1;
uint32 bMCA:1;
uint32 bCMOV:1;
uint32 bPAT:1;
uint32 bPSE36:1;
uint32 bPSN:1;
uint32 bCFLUSH:1;
uint32 bReserved2:1;
uint32 bDS:1;
uint32 bACPI:1;
uint32 bMMX:1;
uint32 bFXSR:1;
uint32 bSSE:1;
uint32 bSSE2:1;
uint32 bSS:1;
uint32 bHTT:1;
uint32 bTM:1;
uint32 bReserved3:1;
uint32 bPBE:1;
uint32_t bFPU:1;
uint32_t bVME:1;
uint32_t bDE:1;
uint32_t bPSE:1;
uint32_t bRDTSC:1;
uint32_t bMSR:1;
uint32_t bPAE:1;
uint32_t bMCE:1;
uint32_t bCX8:1;
uint32_t bAPIC:1;
uint32_t bReserved1:1;
uint32_t bSEP:1;
uint32_t bMTRR:1;
uint32_t bPGE:1;
uint32_t bMCA:1;
uint32_t bCMOV:1;
uint32_t bPAT:1;
uint32_t bPSE36:1;
uint32_t bPSN:1;
uint32_t bCFLUSH:1;
uint32_t bReserved2:1;
uint32_t bDS:1;
uint32_t bACPI:1;
uint32_t bMMX:1;
uint32_t bFXSR:1;
uint32_t bSSE:1;
uint32_t bSSE2:1;
uint32_t bSS:1;
uint32_t bHTT:1;
uint32_t bTM:1;
uint32_t bReserved3:1;
uint32_t bPBE:1;
uint32 DontCare2:22;
uint32 bMMXPlus:1; // AMD's MMX extensions
uint32 bMMXAgain:1; // Just a copy of bMMX above
uint32 DontCare3:6;
uint32 b3DNowPlus:1;
uint32 b3DNow:1;
uint32_t DontCare2:22;
uint32_t bMMXPlus:1; // AMD's MMX extensions
uint32_t bMMXAgain:1; // Just a copy of bMMX above
uint32_t DontCare3:6;
uint32_t b3DNowPlus:1;
uint32_t b3DNow:1;
};
uint32 FeatureFlags[4];
uint32_t FeatureFlags[4];
};
BYTE AMDStepping;
@ -95,7 +95,7 @@ struct CPUInfo // 92 bytes
BYTE DataL1Associativity;
BYTE DataL1SizeKB;
};
uint32 AMD_DataL1Info;
uint32_t AMD_DataL1Info;
};
};