From c008ddaf6640d093f8703f1131883739e30c2083 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 9 Mar 2017 19:31:45 +0100 Subject: [PATCH] - replaced homegrown SWORD, SBYTE and uint32_t types. --- src/am_map.cpp | 4 +- src/basictypes.h | 13 ++- src/c_cvars.cpp | 2 +- src/c_cvars.h | 46 +++++----- src/cmdlib.cpp | 2 +- src/colormatcher.cpp | 2 +- src/d_netinfo.cpp | 6 +- src/d_player.h | 6 +- src/dobject.h | 6 +- src/doomtype.h | 10 +-- src/g_statusbar/sbar.h | 4 +- src/gl/data/gl_data.h | 2 +- src/gl/renderer/gl_2ddrawer.cpp | 8 +- src/gl/renderer/gl_2ddrawer.h | 6 +- src/gl/renderer/gl_postprocess.cpp | 4 +- src/gl/renderer/gl_renderer.h | 2 +- src/gl/system/gl_framebuffer.cpp | 6 +- src/gl/system/gl_framebuffer.h | 6 +- src/gl/system/gl_swframebuffer.cpp | 6 +- src/gl/system/gl_swframebuffer.h | 6 +- src/gl/textures/gl_hqresize.cpp | 52 ++++++------ src/m_png.cpp | 2 +- src/oplsynth/dosbox/opl.cpp | 2 +- src/oplsynth/nukedopl3.h | 2 +- src/p_effect.cpp | 4 +- src/posix/cocoa/i_timer.cpp | 2 +- src/posix/i_system.h | 2 +- src/posix/sdl/i_timer.cpp | 2 +- src/posix/sdl/sdlvideo.h | 2 +- src/r_data/colormaps.h | 2 +- src/r_data/voxels.cpp | 2 +- src/scripting/zscript/ast.cpp | 2 +- src/sound/i_musicinterns.h | 2 +- src/sound/music_gme.cpp | 2 +- src/sound/oalsound.cpp | 26 +++--- src/swrenderer/line/r_walldraw.cpp | 2 +- src/swrenderer/r_swcanvas.cpp | 10 +-- src/swrenderer/r_swcanvas.h | 8 +- src/swrenderer/things/r_voxel.cpp | 2 +- src/swrenderer/viewport/r_spritedrawer.cpp | 2 +- src/textures/buildtexture.cpp | 4 +- src/textures/textures.h | 12 +-- src/tflags.h | 2 +- src/timidity/instrum.cpp | 2 +- src/timidity/instrum_dls.cpp | 2 +- src/timidity/instrum_sf2.cpp | 4 +- src/timidity/sf2.h | 2 +- src/timidity/timidity.h | 6 +- src/v_draw.cpp | 6 +- src/v_font.cpp | 2 +- src/v_palette.cpp | 2 +- src/v_palette.h | 2 +- src/v_pfx.cpp | 2 +- src/v_video.h | 20 ++--- src/win32/fb_d3d9.cpp | 6 +- src/win32/fb_ddraw.cpp | 2 +- src/win32/i_rawps2.cpp | 8 +- src/win32/i_system.cpp | 4 +- src/win32/i_system.h | 4 +- src/win32/win32swiface.h | 6 +- src/x86.h | 98 +++++++++++----------- 61 files changed, 235 insertions(+), 238 deletions(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index 797569da8..480ef3e09 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -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) diff --git a/src/basictypes.h b/src/basictypes.h index ac267f558..262ec9f2b 100644 --- a/src/basictypes.h +++ b/src/basictypes.h @@ -3,11 +3,8 @@ #include -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__ diff --git a/src/c_cvars.cpp b/src/c_cvars.cpp index fa4b8d148..5b33cc263 100644 --- a/src/c_cvars.cpp +++ b/src/c_cvars.cpp @@ -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; diff --git a/src/c_cvars.h b/src/c_cvars.h index 5a918bc63..02e9d67a2 100644 --- a/src/c_cvars.h +++ b/src/c_cvars.h @@ -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 &cvars, uint32 filter); + friend void FilterCompactCVars (TArray &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 &cvars, uint32 filter); +void FilterCompactCVars (TArray &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; diff --git a/src/cmdlib.cpp b/src/cmdlib.cpp index 471c02cc8..6fc253ff3 100644 --- a/src/cmdlib.cpp +++ b/src/cmdlib.cpp @@ -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], diff --git a/src/colormatcher.cpp b/src/colormatcher.cpp index bc0a92128..b15e617a6 100644 --- a/src/colormatcher.cpp +++ b/src/colormatcher.cpp @@ -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); } diff --git a/src/d_netinfo.cpp b/src/d_netinfo.cpp index 5c4b24978..a178ff917 100644 --- a/src/d_netinfo.cpp +++ b/src/d_netinfo.cpp @@ -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((*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((*this)[NAME_Color]); assert(color != NULL); diff --git a/src/d_player.h b/src/d_player.h index 031083bbf..66a2ce547 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -308,7 +308,7 @@ struct userinfo_t : TMap { return *static_cast(*CheckKey(NAME_ColorSet)); } - uint32 GetColor() const + uint32_t GetColor() const { return *static_cast(*CheckKey(NAME_Color)); } @@ -356,8 +356,8 @@ struct userinfo_t : TMap 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); }; diff --git a/src/dobject.h b/src/dobject.h index 31215b981..2adb0b5e4 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -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); diff --git a/src/doomtype.h b/src/doomtype.h index 0d0b79068..15717b65a 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -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 }; diff --git a/src/g_statusbar/sbar.h b/src/g_statusbar/sbar.h index 0e1eca144..c9b217872 100644 --- a/src/g_statusbar/sbar.h +++ b/src/g_statusbar/sbar.h @@ -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; } diff --git a/src/gl/data/gl_data.h b/src/gl/data/gl_data.h index cf79fe138..70fdc7a25 100644 --- a/src/gl/data/gl_data.h +++ b/src/gl/data/gl_data.h @@ -8,7 +8,7 @@ struct GLRenderSettings { - SBYTE lightmode; + int8_t lightmode; bool nocoloredspritelighting; bool nolightfade; bool notexturefill; diff --git a/src/gl/renderer/gl_2ddrawer.cpp b/src/gl/renderer/gl_2ddrawer.cpp index 1907edeef..cad83885f 100644 --- a/src/gl/renderer/gl_2ddrawer.cpp +++ b/src/gl/renderer/gl_2ddrawer.cpp @@ -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; diff --git a/src/gl/renderer/gl_2ddrawer.h b/src/gl/renderer/gl_2ddrawer.h index 61f3153d3..80003b159 100644 --- a/src/gl/renderer/gl_2ddrawer.h +++ b/src/gl/renderer/gl_2ddrawer.h @@ -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(); diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index 72121d338..73edd6975 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -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]; diff --git a/src/gl/renderer/gl_renderer.h b/src/gl/renderer/gl_renderer.h index 1688cfc1a..67f7aa0cf 100644 --- a/src/gl/renderer/gl_renderer.h +++ b/src/gl/renderer/gl_renderer.h @@ -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; } diff --git a/src/gl/system/gl_framebuffer.cpp b/src/gl/system/gl_framebuffer.cpp index 0eb35e1c6..c6aad4abe 100644 --- a/src/gl/system/gl_framebuffer.cpp +++ b/src/gl/system/gl_framebuffer.cpp @@ -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); diff --git a/src/gl/system/gl_framebuffer.h b/src/gl/system/gl_framebuffer.h index d6306fcdf..7d6ce0800 100644 --- a/src/gl/system/gl_framebuffer.h +++ b/src/gl/system/gl_framebuffer.h @@ -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); diff --git a/src/gl/system/gl_swframebuffer.cpp b/src/gl/system/gl_swframebuffer.cpp index a0fc6e716..33c93c187 100644 --- a/src/gl/system/gl_swframebuffer.cpp +++ b/src/gl/system/gl_swframebuffer.cpp @@ -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) { diff --git a/src/gl/system/gl_swframebuffer.h b/src/gl/system/gl_swframebuffer.h index a9e7aa888..387b023b2 100644 --- a/src/gl/system/gl_swframebuffer.h +++ b/src/gl/system/gl_swframebuffer.h @@ -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; diff --git a/src/gl/textures/gl_hqresize.cpp b/src/gl/textures/gl_hqresize.cpp index 253d91f4b..08a340199 100644 --- a/src/gl/textures/gl_hqresize.cpp +++ b/src/gl/textures/gl_hqresize.cpp @@ -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 ( inputBuffer ), reinterpret_cast ( buffer2x ), inWidth, inHeight ); + scale2x ( reinterpret_cast ( inputBuffer ), reinterpret_cast ( buffer2x ), inWidth, inHeight ); width *= 2; height *= 2; - scale2x ( reinterpret_cast ( buffer2x ), reinterpret_cast ( outputBuffer ), 2*inWidth, 2*inHeight ); + scale2x ( reinterpret_cast ( buffer2x ), reinterpret_cast ( 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 ( inputBuffer ), reinterpret_cast ( newBuffer ), inWidth, inHeight ); + scaleNxFunction ( reinterpret_cast ( inputBuffer ), reinterpret_cast ( newBuffer ), inWidth, inHeight ); delete[] inputBuffer; return newBuffer; } diff --git a/src/m_png.cpp b/src/m_png.cpp index 50ecb29f4..c51f37be8 100644 --- a/src/m_png.cpp +++ b/src/m_png.cpp @@ -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]; }; diff --git a/src/oplsynth/dosbox/opl.cpp b/src/oplsynth/dosbox/opl.cpp index 8f2fdd859..3795fc0c8 100644 --- a/src/oplsynth/dosbox/opl.cpp +++ b/src/oplsynth/dosbox/opl.cpp @@ -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 diff --git a/src/oplsynth/nukedopl3.h b/src/oplsynth/nukedopl3.h index b5abf3b38..2c42233fa 100644 --- a/src/oplsynth/nukedopl3.h +++ b/src/oplsynth/nukedopl3.h @@ -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 diff --git a/src/p_effect.cpp b/src/p_effect.cpp index b2e5e99a0..0928a0e6a 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -217,7 +217,7 @@ void P_FindParticleSubsectors () static TMap 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)); } diff --git a/src/posix/cocoa/i_timer.cpp b/src/posix/cocoa/i_timer.cpp index 5141f8750..85a0ae8ce 100644 --- a/src/posix/cocoa/i_timer.cpp +++ b/src/posix/cocoa/i_timer.cpp @@ -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(); diff --git a/src/posix/i_system.h b/src/posix/i_system.h index 3754d29e7..e4369d749 100644 --- a/src/posix/i_system.h +++ b/src/posix/i_system.h @@ -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(); diff --git a/src/posix/sdl/i_timer.cpp b/src/posix/sdl/i_timer.cpp index 84108f3b7..bf02415ee 100644 --- a/src/posix/sdl/i_timer.cpp +++ b/src/posix/sdl/i_timer.cpp @@ -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); diff --git a/src/posix/sdl/sdlvideo.h b/src/posix/sdl/sdlvideo.h index 33192800d..86241538d 100644 --- a/src/posix/sdl/sdlvideo.h +++ b/src/posix/sdl/sdlvideo.h @@ -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; } diff --git a/src/r_data/colormaps.h b/src/r_data/colormaps.h index 675f669b9..9f50fb308 100644 --- a/src/r_data/colormaps.h +++ b/src/r_data/colormaps.h @@ -66,7 +66,7 @@ extern TArray 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; diff --git a/src/r_data/voxels.cpp b/src/r_data/voxels.cpp index 4b8081288..3f2f093ec 100644 --- a/src/r_data/voxels.cpp +++ b/src/r_data/voxels.cpp @@ -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)); diff --git a/src/scripting/zscript/ast.cpp b/src/scripting/zscript/ast.cpp index 81c7ff6d3..63a098498 100644 --- a/src/scripting/zscript/ast.cpp +++ b/src/scripting/zscript/ast.cpp @@ -44,7 +44,7 @@ static const char *BuiltInTypeNames[] = { "sint8", "uint8", "sint16", "uint16", - "sint32", "uint32", + "sint32", "uint32_t", "intauto", "bool", diff --git a/src/sound/i_musicinterns.h b/src/sound/i_musicinterns.h index c6bf2c98c..833bdea83 100644 --- a/src/sound/i_musicinterns.h +++ b/src/sound/i_musicinterns.h @@ -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); // -------------------------------------------------------------------------- diff --git a/src/sound/music_gme.cpp b/src/sound/music_gme.cpp index d00728ec6..e5ee6975f 100644 --- a/src/sound/music_gme.cpp +++ b/src/sound/music_gme.cpp @@ -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); } diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index 6bd2dc091..bfeb0b317 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -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 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; diff --git a/src/swrenderer/line/r_walldraw.cpp b/src/swrenderer/line/r_walldraw.cpp index 40c9f3551..d35890653 100644 --- a/src/swrenderer/line/r_walldraw.cpp +++ b/src/swrenderer/line/r_walldraw.cpp @@ -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; diff --git a/src/swrenderer/r_swcanvas.cpp b/src/swrenderer/r_swcanvas.cpp index aa817e707..1301c2970 100644 --- a/src/swrenderer/r_swcanvas.cpp +++ b/src/swrenderer/r_swcanvas.cpp @@ -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) { diff --git a/src/swrenderer/r_swcanvas.h b/src/swrenderer/r_swcanvas.h index a3f80113b..01c9cbb7d 100644 --- a/src/swrenderer/r_swcanvas.h +++ b/src/swrenderer/r_swcanvas.h @@ -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); }; diff --git a/src/swrenderer/things/r_voxel.cpp b/src/swrenderer/things/r_voxel.cpp index b337cd857..b9102e0bd 100644 --- a/src/swrenderer/things/r_voxel.cpp +++ b/src/swrenderer/things/r_voxel.cpp @@ -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. diff --git a/src/swrenderer/viewport/r_spritedrawer.cpp b/src/swrenderer/viewport/r_spritedrawer.cpp index 85f187259..d30f3d58b 100644 --- a/src/swrenderer/viewport/r_spritedrawer.cpp +++ b/src/swrenderer/viewport/r_spritedrawer.cpp @@ -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: diff --git a/src/textures/buildtexture.cpp b/src/textures/buildtexture.cpp index 1155dacc4..3b9f036ab 100644 --- a/src/textures/buildtexture.cpp +++ b/src/textures/buildtexture.cpp @@ -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; diff --git a/src/textures/textures.h b/src/textures/textures.h index 44d0d92bc..346016904 100644 --- a/src/textures/textures.h +++ b/src/textures/textures.h @@ -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 { diff --git a/src/tflags.h b/src/tflags.h index 203fa70e6..96ba53fb5 100644 --- a/src/tflags.h +++ b/src/tflags.h @@ -42,7 +42,7 @@ * T is the enum type of individual flags, * TT is the underlying integer type used (defaults to uint32_t) */ -template +template class TFlags { struct ZeroDummy {}; diff --git a/src/timidity/instrum.cpp b/src/timidity/instrum.cpp index e4d591879..642f6af7b 100644 --- a/src/timidity/instrum.cpp +++ b/src/timidity/instrum.cpp @@ -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) { diff --git a/src/timidity/instrum_dls.cpp b/src/timidity/instrum_dls.cpp index 06ce83df2..def075d03 100644 --- a/src/timidity/instrum_dls.cpp +++ b/src/timidity/instrum_dls.cpp @@ -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); diff --git a/src/timidity/instrum_sf2.cpp b/src/timidity/instrum_sf2.cpp index fe839ce45..aa9df7a0c 100644 --- a/src/timidity/instrum_sf2.cpp +++ b/src/timidity/instrum_sf2.cpp @@ -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; } diff --git a/src/timidity/sf2.h b/src/timidity/sf2.h index 45dec4ae0..13049fa7f 100644 --- a/src/timidity/sf2.h +++ b/src/timidity/sf2.h @@ -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]; diff --git a/src/timidity/timidity.h b/src/timidity/timidity.h index 28f4908af..dc1b1526f 100644 --- a/src/timidity/timidity.h +++ b/src/timidity/timidity.h @@ -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; diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 5315657f4..cc91255f3 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -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) diff --git a/src/v_font.cpp b/src/v_font.cpp index 0bdbf0749..7f1f496d5 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -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); diff --git a/src/v_palette.cpp b/src/v_palette.cpp index 5873de10b..f816c9728 100644 --- a/src/v_palette.cpp +++ b/src/v_palette.cpp @@ -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; diff --git a/src/v_palette.h b/src/v_palette.h index 62628eb5c..28ced55f3 100644 --- a/src/v_palette.h +++ b/src/v_palette.h @@ -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 (); diff --git a/src/v_pfx.cpp b/src/v_pfx.cpp index 260e87944..96f9b0592 100644 --- a/src/v_pfx.cpp +++ b/src/v_pfx.cpp @@ -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) { diff --git a/src/v_video.h b/src/v_video.h index 81b666124..1b7074ebe 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -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 @@ -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; }; diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index 160ec434d..1a391a3d7 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -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) { diff --git a/src/win32/fb_ddraw.cpp b/src/win32/fb_ddraw.cpp index bd3c2588e..6425e0b1f 100644 --- a/src/win32/fb_ddraw.cpp +++ b/src/win32/fb_ddraw.cpp @@ -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); } } diff --git a/src/win32/i_rawps2.cpp b/src/win32/i_rawps2.cpp index 29f477a14..3a1dbce94 100644 --- a/src/win32/i_rawps2.cpp +++ b/src/win32/i_rawps2.cpp @@ -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 diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index f07fb8f1d..39b762409 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -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) diff --git a/src/win32/i_system.h b/src/win32/i_system.h index e7437beb8..e6b19cea5 100644 --- a/src/win32/i_system.h +++ b/src/win32/i_system.h @@ -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(); diff --git a/src/win32/win32swiface.h b/src/win32/win32swiface.h index 424c8f37b..7e2d85b2d 100644 --- a/src/win32/win32swiface.h +++ b/src/win32/win32swiface.h @@ -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; diff --git a/src/x86.h b/src/x86.h index cf9ae0e01..39ea9b6b6 100644 --- a/src/x86.h +++ b/src/x86.h @@ -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; }; };