diff --git a/docs/rh-log.txt b/docs/rh-log.txt
index 17334ed9e..ed518de9d 100644
--- a/docs/rh-log.txt
+++ b/docs/rh-log.txt
@@ -1,3 +1,22 @@
+September 13, 2006
+- Fixed: cycle_t was still a DWORD and not a QWORD under GCC.
+- The stat meters now return an FString instead of sprintfing into a fixed
+ output buffer.
+- NOASM is now automatically defined when compiling for a non-x86 target.
+- Some changes have been made to the integral types in doomtype.h:
+ - For consistancy with the other integral types, byte is no longer a
+ synonym for BYTE.
+ - Most uses of BOOL have been change to the standard C++ bool type. Those
+ that weren't were changed to INTBOOL to indicate they may contain values
+ other than 0 or 1 but are still used as a boolean.
+ - Compiler-provided types with explicit bit sizes are now used. In
+ particular, DWORD is no longer a long so it will work with both 64-bit
+ Windows and Linux.
+ - Since some files need to include Windows headers, uint32 is a synonym
+ for the non-Windows version of DWORD.
+- Removed d_textur.h. The pic_t struct it defined was used nowhere, and that
+ was all it contained.
+
September 9, 2006 (Changes by Graf Zahl)
- Added support for scaled textures to DCanvas::DrawTexture.
- Changed deh.MaxHealth use to be consistent with other source ports.
@@ -6,7 +25,7 @@ September 9, 2006 (Changes by Graf Zahl)
September 8, 2006
- Fixed: Weapons did not give you double ammo at baby and nightmare skills.
-- Fixed: SetTexture() in p_setup.cpp assumed that all color values were
+- Fixed: SetTextureNoErr() in p_setup.cpp assumed that all color values were
six characters. Although this was the intended way to specify colors,
earlier versions did no error checking, so other lengths worked too.
- Fixed: FPatchTexture waited until MakeTexture() to call CalcBitSize(),
@@ -12992,7 +13011,7 @@ June 19, 1998
June 18, 1998
- Removed R_OK #define from one of the source files and changed the typedef
- for BOOL in doomtype.h. Also created dxcrap.c which holds some information
+ for bool in doomtype.h. Also created dxcrap.c which holds some information
from dinput.lib and dxguid.lib since Microsoft seems to have left most of
the Watcom DX libraries out of its DX 5 SDK.
- Started work on player setup menu.
@@ -13442,10 +13461,10 @@ April 23, 1998
rpcndr.h is the culprit with this line:
typedef unsigned char boolean;
Went through all my files where I've defined __BYTEBOOL__ by hand and
- changed all occurances of boolean to BOOL. Then I found out that that
+ changed all occurances of boolean to bool. Then I found out that that
caused problems with variables that had been declared as boolean in
header files, so I changed all the remaining instances of boolean to
- BOOL.
+ bool.
- Started work on the video modes menu.
April 22, 1998
diff --git a/jpeg-6b/jpeg-6b.vcproj b/jpeg-6b/jpeg-6b.vcproj
index 0c1719374..f99a9999c 100644
--- a/jpeg-6b/jpeg-6b.vcproj
+++ b/jpeg-6b/jpeg-6b.vcproj
@@ -11,6 +11,9 @@
+
@@ -142,6 +145,135 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/am_map.cpp b/src/am_map.cpp
index 48911879e..26de065bc 100644
--- a/src/am_map.cpp
+++ b/src/am_map.cpp
@@ -62,7 +62,7 @@ static int Background, YourColor, WallColor, TSWallColor,
SecretSectorColor;
static int DoomColors[11];
-static byte DoomPaletteVals[11*3] =
+static BYTE DoomPaletteVals[11*3] =
{
0x00,0x00,0x00, 0xff,0xff,0xff, 0x10,0x10,0x10,
0xfc,0x00,0x00, 0x80,0x80,0x80, 0xbc,0x78,0x48,
@@ -277,7 +277,7 @@ static int f_w;
static int f_h;
static int f_p; // [RH] # of bytes from start of a line to start of next
-static byte *fb; // pseudo-frame buffer
+static BYTE *fb; // pseudo-frame buffer
static int amclock;
static mpoint_t m_paninc; // how far the window pans each tic (map coords)
@@ -324,7 +324,7 @@ static FTexture *mapback; // the automap background
static fixed_t mapystart=0; // y-value for the start of the map bitmap...used in the parallax stuff.
static fixed_t mapxstart=0; //x-value for the bitmap.
-static BOOL stopped = true;
+static bool stopped = true;
#define NUMALIASES 3
@@ -336,15 +336,15 @@ static BOOL stopped = true;
#define WEIGHTSHIFT (16-WEIGHTBITS)
#define NUMWEIGHTS (1< ay) {
d = ay - ax/2;
for (;;) {
- PUTDOTP(x,y,(byte)color);
+ PUTDOTP(x,y,(BYTE)color);
if (x == fl->b.x)
return;
if (d>=0) {
@@ -1306,7 +1306,7 @@ void AM_drawFline (fline_t *fl, int color)
} else {
d = ax - ay/2;
for (;;) {
- PUTDOTP(x, y, (byte)color);
+ PUTDOTP(x, y, (BYTE)color);
if (y == fl->b.y)
return;
if (d >= 0) {
@@ -1331,11 +1331,11 @@ void AM_drawFline (fline_t *fl, int color)
* IntensityBits = log base 2 of NumLevels; the # of bits used to describe
* the intensity of the drawing color. 2**IntensityBits==NumLevels
*/
-void PUTDOT (int xx, int yy,byte *cc, byte *cm)
+void PUTDOT (int xx, int yy, BYTE *cc, BYTE *cm)
{
static int oldyy;
static int oldyyshifted;
- byte *oldcc=cc;
+ BYTE *oldcc=cc;
#if 0
if(xx < 32)
@@ -1376,7 +1376,7 @@ void PUTDOT (int xx, int yy,byte *cc, byte *cm)
fb[oldyyshifted+xx] = *(cc);
}
-void DrawWuLine (int x0, int y0, int x1, int y1, byte *baseColor)
+void DrawWuLine (int x0, int y0, int x1, int y1, BYTE *baseColor)
{
int deltaX, deltaY, xDir;
@@ -1549,7 +1549,7 @@ void PUTTRANSDOT (int xx, int yy, int basecolor, int level)
oldyyshifted = yy*SCREENPITCH;
}
- byte *spot = fb + oldyyshifted + xx;
+ BYTE *spot = fb + oldyyshifted + xx;
DWORD *bg2rgb = Col2RGB8[1+level];
DWORD *fg2rgb = Col2RGB8[63-level];
DWORD fg = fg2rgb[basecolor];
@@ -1558,7 +1558,7 @@ void PUTTRANSDOT (int xx, int yy, int basecolor, int level)
*spot = RGB32k[0][0][bg&(bg>>15)];
}
-void DrawTransWuLine (int x0, int y0, int x1, int y1, byte baseColor)
+void DrawTransWuLine (int x0, int y0, int x1, int y1, BYTE baseColor)
{
int deltaX, deltaY, xDir;
@@ -1591,7 +1591,7 @@ void DrawTransWuLine (int x0, int y0, int x1, int y1, byte baseColor)
}
if (deltaX == 0)
{ // vertical line
- byte *spot = screen->GetBuffer() + y0*screen->GetPitch() + x0;
+ BYTE *spot = screen->GetBuffer() + y0*screen->GetPitch() + x0;
int pitch = screen->GetPitch ();
do
{
@@ -1602,7 +1602,7 @@ void DrawTransWuLine (int x0, int y0, int x1, int y1, byte baseColor)
}
if (deltaX == deltaY)
{ // diagonal line.
- byte *spot = screen->GetBuffer() + y0*screen->GetPitch() + x0;
+ BYTE *spot = screen->GetBuffer() + y0*screen->GetPitch() + x0;
int advance = screen->GetPitch() + xDir;
do
{
@@ -2129,7 +2129,7 @@ void AM_drawMarks ()
void AM_drawCrosshair (int color)
{
- fb[f_p*((f_h+1)/2)+(f_w/2)] = (byte)color; // single point for now
+ fb[f_p*((f_h+1)/2)+(f_w/2)] = (BYTE)color; // single point for now
}
void AM_Drawer ()
diff --git a/src/am_map.h b/src/am_map.h
index 3e97cd3af..67672692f 100644
--- a/src/am_map.h
+++ b/src/am_map.h
@@ -25,7 +25,7 @@
#include "d_event.h"
// Called by main loop.
-BOOL AM_Responder (event_t* ev);
+bool AM_Responder (event_t* ev);
// Called by main loop.
void AM_Ticker (void);
diff --git a/src/b_bot.h b/src/b_bot.h
index 01bc675e1..ddc8f06d0 100644
--- a/src/b_bot.h
+++ b/src/b_bot.h
@@ -101,7 +101,7 @@ public:
//(B_move.c)
void Roam (AActor *actor, ticcmd_t *cmd);
- BOOL Move (AActor *actor, ticcmd_t *cmd);
+ bool Move (AActor *actor, ticcmd_t *cmd);
bool TryWalk (AActor *actor, ticcmd_t *cmd);
void NewChaseDir (AActor *actor, ticcmd_t *cmd);
bool CleanAhead (AActor *thing, fixed_t x, fixed_t y, ticcmd_t *cmd);
diff --git a/src/b_func.cpp b/src/b_func.cpp
index a3b9a20ed..c1ef82a3a 100644
--- a/src/b_func.cpp
+++ b/src/b_func.cpp
@@ -33,7 +33,7 @@ static fixed_t last_z;
static sector_t *last_s;
static fixed_t estimated_dist;
-static int PTR_Reachable (intercept_t *in)
+static bool PTR_Reachable (intercept_t *in)
{
fixed_t hitx, hity;
fixed_t frac;
diff --git a/src/b_game.cpp b/src/b_game.cpp
index ae02d136e..9183ab917 100644
--- a/src/b_game.cpp
+++ b/src/b_game.cpp
@@ -354,7 +354,7 @@ bool DCajunMaster::SpawnBot (const char *name, int color)
void DCajunMaster::DoAddBot (int bnum, char *info)
{
- byte *infob = (byte *)info;
+ BYTE *infob = (BYTE *)info;
D_ReadUserInfoStrings (bnum, &infob, false);
if (!deathmatch && playerstarts[bnum].type == 0)
{
@@ -646,10 +646,12 @@ bool DCajunMaster::LoadBots ()
return true;
}
-ADD_STAT (bots, out)
+ADD_STAT (bots)
{
- sprintf (out, "think = %04.1f ms support = %04.1f ms wtg = %lu",
+ FString out;
+ out.Format ("think = %04.1f ms support = %04.1f ms wtg = %llu",
(double)BotThinkCycles * 1000 * SecondsPerCycle,
(double)BotSupportCycles * 1000 * SecondsPerCycle,
BotWTG);
+ return out;
}
diff --git a/src/b_move.cpp b/src/b_move.cpp
index 80c8f815e..eccca2dde 100644
--- a/src/b_move.cpp
+++ b/src/b_move.cpp
@@ -72,11 +72,11 @@ void DCajunMaster::Roam (AActor *actor, ticcmd_t *cmd)
}
}
-BOOL DCajunMaster::Move (AActor *actor, ticcmd_t *cmd)
+bool DCajunMaster::Move (AActor *actor, ticcmd_t *cmd)
{
fixed_t tryx, tryy;
bool try_ok;
- BOOL good;
+ int good;
if (actor->movedir == DI_NODIR)
return false;
diff --git a/src/c_bind.cpp b/src/c_bind.cpp
index 0234bab8d..76be223cd 100644
--- a/src/c_bind.cpp
+++ b/src/c_bind.cpp
@@ -247,7 +247,7 @@ const char *KeyNames[NUM_KEYS] =
static FString Bindings[NUM_KEYS];
static FString DoubleBindings[NUM_KEYS];
static unsigned int DClickTime[NUM_KEYS];
-static byte DClicked[(NUM_KEYS+7)/8];
+static BYTE DClicked[(NUM_KEYS+7)/8];
static int GetKeyFromName (const char *name)
{
@@ -507,12 +507,12 @@ void C_SetDefaultBindings ()
C_BindDefaults ();
}
-BOOL C_DoKey (event_t *ev)
+bool C_DoKey (event_t *ev)
{
FString binding;
bool dclick;
int dclickspot;
- byte dclickmask;
+ BYTE dclickmask;
if (ev->type != EV_KeyDown && ev->type != EV_KeyUp)
return false;
diff --git a/src/c_bind.h b/src/c_bind.h
index e0e738439..26667453b 100644
--- a/src/c_bind.h
+++ b/src/c_bind.h
@@ -40,7 +40,7 @@
class FConfigFile;
-BOOL C_DoKey (event_t *ev);
+bool C_DoKey (event_t *ev);
void C_ArchiveBindings (FConfigFile *f, bool dodouble, const char *matchcmd=NULL);
// Stuff used by the customize controls menu
diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp
index d4d87c952..e9a252a64 100644
--- a/src/c_cmds.cpp
+++ b/src/c_cmds.cpp
@@ -77,7 +77,7 @@ CCMD (toggleconsole)
C_ToggleConsole();
}
-BOOL CheckCheatmode ()
+bool CheckCheatmode ()
{
if (((gameskill == sk_nightmare) || netgame || deathmatch) && (!sv_cheats))
{
@@ -762,7 +762,7 @@ CCMD(monster)
{
if (mo->flags3&MF3_ISMONSTER && !(mo->flags&MF_CORPSE) && !(mo->flags&MF_FRIENDLY))
{
- Printf ("%s at (%ld,%ld,%ld)\n",
+ Printf ("%s at (%d,%d,%d)\n",
mo->GetClass()->TypeName.GetChars(),
mo->x >> FRACBITS, mo->y >> FRACBITS, mo->z >> FRACBITS);
}
@@ -785,7 +785,7 @@ CCMD(items)
{
if (mo->IsKindOf(RUNTIME_CLASS(AInventory)) && mo->flags&MF_SPECIAL)
{
- Printf ("%s at (%ld,%ld,%ld)\n",
+ Printf ("%s at (%d,%d,%d)\n",
mo->GetClass()->TypeName.GetChars(),
mo->x >> FRACBITS, mo->y >> FRACBITS, mo->z >> FRACBITS);
}
diff --git a/src/c_console.cpp b/src/c_console.cpp
index d553fe3fd..7e008c554 100644
--- a/src/c_console.cpp
+++ b/src/c_console.cpp
@@ -85,14 +85,14 @@ static bool conline;
extern int gametic;
extern bool automapactive; // in AM_map.c
-extern BOOL advancedemo;
+extern bool advancedemo;
extern FBaseCVar *CVars;
extern FConsoleCommand *Commands[FConsoleCommand::HASH_SIZE];
int ConCols, PhysRows;
-BOOL vidactive = false, gotconback = false;
-BOOL cursoron = false;
+bool vidactive = false, gotconback = false;
+bool cursoron = false;
int ConBottom, ConScroll, RowAdjust;
int CursorTicker;
constate_e ConsoleState = c_up;
@@ -143,7 +143,7 @@ struct History
// CmdLine[1] = cursor position
// CmdLine[2+] = command line (max 255 chars + NULL)
// CmdLine[259]= offset from beginning of cmdline to display
-static byte CmdLine[260];
+static BYTE CmdLine[260];
#define MAXHISTSIZE 50
static struct History *HistHead = NULL, *HistTail = NULL, *HistPos = NULL;
@@ -286,7 +286,7 @@ void DequeueConsoleText ()
EnqueuedTextTail = &EnqueuedText;
}
-void C_InitConsole (int width, int height, BOOL ingame)
+void C_InitConsole (int width, int height, bool ingame)
{
if ( (vidactive = ingame) )
{
@@ -868,7 +868,7 @@ int PrintString (int printlevel, const char *outline)
return (int)strlen (outline);
}
-extern BOOL gameisdead;
+extern bool gameisdead;
int VPrintf (int printlevel, const char *format, va_list parms)
{
@@ -1193,7 +1193,7 @@ void C_DrawConsole ()
tickstr[tickend + 2] = ' ';
if (TickerPercent)
{
- sprintf (tickstr + tickend + 3, "%lu%%", Scale (TickerAt, 100, TickerMax));
+ sprintf (tickstr + tickend + 3, "%d%%", Scale (TickerAt, 100, TickerMax));
}
else
{
@@ -1386,7 +1386,7 @@ static void makestartposgood ()
CmdLine[259] = n;
}
-static BOOL C_HandleKey (event_t *ev, byte *buffer, int len)
+static bool C_HandleKey (event_t *ev, BYTE *buffer, int len)
{
int i;
int data1 = ev->data1;
@@ -1780,7 +1780,7 @@ static BOOL C_HandleKey (event_t *ev, byte *buffer, int len)
return true;
}
-BOOL C_Responder (event_t *ev)
+bool C_Responder (event_t *ev)
{
if (ev->type != EV_GUI_Event ||
ConsoleState == c_up ||
@@ -1910,7 +1910,7 @@ static int TabPos; // Last TabCommand tabbed to
static int TabStart; // First char in CmdLine to use for tab completion
static int TabSize; // Size of tab string
-static BOOL FindTabCommand (const char *name, int *stoppos, int len)
+static bool FindTabCommand (const char *name, int *stoppos, int len)
{
FName aname(name);
unsigned int i;
diff --git a/src/c_console.h b/src/c_console.h
index 4a6fc0152..8f44ba509 100644
--- a/src/c_console.h
+++ b/src/c_console.h
@@ -50,7 +50,7 @@ typedef enum cstate_t {
extern constate_e ConsoleState;
// Initialize the console
-void C_InitConsole (int width, int height, BOOL ingame);
+void C_InitConsole (int width, int height, bool ingame);
void C_DeinitConsole ();
// Adjust the console for a new screen mode
@@ -75,7 +75,7 @@ void C_SetTicker (unsigned int at, bool forceUpdate=false);
void C_MidPrint (const char *message);
void C_MidPrintBold (const char *message);
-BOOL C_Responder (event_t *ev);
+bool C_Responder (event_t *ev);
void C_AddTabCommand (const char *name);
void C_RemoveTabCommand (const char *name);
diff --git a/src/c_cvars.cpp b/src/c_cvars.cpp
index cb790ac70..9393db8de 100644
--- a/src/c_cvars.cpp
+++ b/src/c_cvars.cpp
@@ -1160,15 +1160,15 @@ void FilterCompactCVars (TArray &cvars, DWORD filter)
}
}
-void C_WriteCVars (byte **demo_p, DWORD filter, bool compact)
+void C_WriteCVars (BYTE **demo_p, DWORD filter, bool compact)
{
FBaseCVar *cvar = CVars;
- byte *ptr = *demo_p;
+ BYTE *ptr = *demo_p;
if (compact)
{
TArray cvars;
- ptr += sprintf ((char *)ptr, "\\\\%lux", filter);
+ ptr += sprintf ((char *)ptr, "\\\\%ux", filter);
FilterCompactCVars (cvars, filter);
while (cvars.Pop (cvar))
{
@@ -1194,7 +1194,7 @@ void C_WriteCVars (byte **demo_p, DWORD filter, bool compact)
*demo_p = ptr + 1;
}
-void C_ReadCVars (byte **demo_p)
+void C_ReadCVars (BYTE **demo_p)
{
char *ptr = *((char **)demo_p);
char *breakpt;
diff --git a/src/c_cvars.h b/src/c_cvars.h
index 55b1ed4ca..a49c3449f 100644
--- a/src/c_cvars.h
+++ b/src/c_cvars.h
@@ -89,13 +89,13 @@ class AActor;
class FBaseCVar
{
public:
- FBaseCVar (const char *name, DWORD flags, void (*callback)(FBaseCVar &));
+ FBaseCVar (const char *name, uint32 flags, void (*callback)(FBaseCVar &));
virtual ~FBaseCVar ();
inline void Callback () { if (m_Callback) m_Callback (*this); }
inline const char *GetName () const { return Name; }
- inline DWORD GetFlags () const { return Flags; }
+ inline uint32 GetFlags () const { return Flags; }
void CmdSet (const char *newval);
void ForceSet (UCVarValue value, ECVarType type);
@@ -137,11 +137,11 @@ protected:
static UCVarValue FromGUID (const GUID &value, ECVarType type);
char *Name;
- DWORD Flags;
+ uint32 Flags;
private:
FBaseCVar (const FBaseCVar &var);
- FBaseCVar (const char *name, DWORD flags);
+ FBaseCVar (const char *name, uint32 flags);
void (*m_Callback)(FBaseCVar &);
FBaseCVar *m_Next;
@@ -149,24 +149,24 @@ private:
static bool m_UseCallback;
static bool m_DoNoSet;
- friend void C_WriteCVars (byte **demo_p, DWORD filter, bool compact);
- friend void C_ReadCVars (byte **demo_p);
+ friend void C_WriteCVars (BYTE **demo_p, uint32 filter, bool compact);
+ friend void C_ReadCVars (BYTE **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 C_ArchiveCVars (FConfigFile *f, int type);
friend void C_SetCVarsToDefaults (void);
- friend void FilterCompactCVars (TArray &cvars, DWORD filter);
+ friend void FilterCompactCVars (TArray &cvars, uint32 filter);
friend void C_DeinitConsole();
};
// 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 (byte **demo_p, DWORD filter, bool compact=false);
+void C_WriteCVars (BYTE **demo_p, uint32 filter, bool compact=false);
// Read all cvars from *demo_p and set them appropriately.
-void C_ReadCVars (byte **demo_p);
+void C_ReadCVars (BYTE **demo_p);
// Backup demo cvars. Called before a demo starts playing to save all
// cvars the demo might change.
@@ -185,14 +185,14 @@ void C_ArchiveCVars (FConfigFile *f, int type);
// initialize cvars to default values after they are created
void C_SetCVarsToDefaults (void);
-void FilterCompactCVars (TArray &cvars, DWORD filter);
+void FilterCompactCVars (TArray &cvars, uint32 filter);
void C_DeinitConsole();
class FBoolCVar : public FBaseCVar
{
public:
- FBoolCVar (const char *name, bool def, DWORD flags, void (*callback)(FBoolCVar &)=NULL);
+ FBoolCVar (const char *name, bool def, uint32 flags, void (*callback)(FBoolCVar &)=NULL);
virtual ECVarType GetRealType () const;
@@ -217,7 +217,7 @@ protected:
class FIntCVar : public FBaseCVar
{
public:
- FIntCVar (const char *name, int def, DWORD flags, void (*callback)(FIntCVar &)=NULL);
+ FIntCVar (const char *name, int def, uint32 flags, void (*callback)(FIntCVar &)=NULL);
virtual ECVarType GetRealType () const;
@@ -244,7 +244,7 @@ protected:
class FFloatCVar : public FBaseCVar
{
public:
- FFloatCVar (const char *name, float def, DWORD flags, void (*callback)(FFloatCVar &)=NULL);
+ FFloatCVar (const char *name, float def, uint32 flags, void (*callback)(FFloatCVar &)=NULL);
virtual ECVarType GetRealType () const;
@@ -269,7 +269,7 @@ protected:
class FStringCVar : public FBaseCVar
{
public:
- FStringCVar (const char *name, const char *def, DWORD flags, void (*callback)(FStringCVar &)=NULL);
+ FStringCVar (const char *name, const char *def, uint32 flags, void (*callback)(FStringCVar &)=NULL);
~FStringCVar ();
virtual ECVarType GetRealType () const;
@@ -295,7 +295,7 @@ protected:
class FColorCVar : public FIntCVar
{
public:
- FColorCVar (const char *name, int def, DWORD flags, void (*callback)(FColorCVar &)=NULL);
+ FColorCVar (const char *name, int def, uint32 flags, void (*callback)(FColorCVar &)=NULL);
virtual ECVarType GetRealType () const;
@@ -303,8 +303,8 @@ public:
virtual UCVarValue GetGenericRepDefault (ECVarType type) const;
virtual void SetGenericRepDefault (UCVarValue value, ECVarType type);
- inline operator DWORD () const { return Value; }
- inline DWORD operator *() const { return Value; }
+ inline operator uint32 () const { return Value; }
+ inline uint32 operator *() const { return Value; }
inline int GetIndex () const { return Index; }
protected:
@@ -319,7 +319,7 @@ protected:
class FFlagCVar : public FBaseCVar
{
public:
- FFlagCVar (const char *name, FIntCVar &realvar, DWORD bitval);
+ FFlagCVar (const char *name, FIntCVar &realvar, uint32 bitval);
virtual ECVarType GetRealType () const;
@@ -338,14 +338,14 @@ protected:
virtual void DoSet (UCVarValue value, ECVarType type);
FIntCVar &ValueVar;
- DWORD BitVal;
+ uint32 BitVal;
int BitNum;
};
class FGUIDCVar : public FBaseCVar
{
public:
- FGUIDCVar (const char *name, const GUID *defguid, DWORD flags, void (*callback)(FGUIDCVar &)=NULL);
+ FGUIDCVar (const char *name, const GUID *defguid, uint32 flags, void (*callback)(FGUIDCVar &)=NULL);
virtual ECVarType GetRealType () const;
@@ -372,8 +372,8 @@ extern int cvar_defflags;
FBaseCVar *cvar_set (const char *var_name, const char *value);
FBaseCVar *cvar_forceset (const char *var_name, const char *value);
-inline FBaseCVar *cvar_set (const char *var_name, const byte *value) { return cvar_set (var_name, (const char *)value); }
-inline FBaseCVar *cvar_forceset (const char *var_name, const byte *value) { return cvar_forceset (var_name, (const char *)value); }
+inline FBaseCVar *cvar_set (const char *var_name, const BYTE *value) { return cvar_set (var_name, (const char *)value); }
+inline FBaseCVar *cvar_forceset (const char *var_name, const BYTE *value) { return cvar_forceset (var_name, (const char *)value); }
diff --git a/src/c_dispatch.cpp b/src/c_dispatch.cpp
index 816e69b26..b8b901010 100644
--- a/src/c_dispatch.cpp
+++ b/src/c_dispatch.cpp
@@ -893,7 +893,7 @@ char *BuildString (int argc, char **argv)
}
}
-static int DumpHash (FConsoleCommand **table, BOOL aliases, const char *pattern=NULL)
+static int DumpHash (FConsoleCommand **table, bool aliases, const char *pattern=NULL)
{
int bucket, count;
FConsoleCommand *cmd;
@@ -1152,7 +1152,7 @@ void FConsoleAlias::SafeDelete ()
}
extern void D_AddFile (const char *file);
-static byte PullinBad = 2;
+static BYTE PullinBad = 2;
static const char *PullinFile;
int C_ExecFile (const char *file, bool usePullin)
diff --git a/src/cmdlib.cpp b/src/cmdlib.cpp
index 538e67d59..568e628d1 100644
--- a/src/cmdlib.cpp
+++ b/src/cmdlib.cpp
@@ -1,11 +1,6 @@
// cmdlib.c (mostly borrowed from the Q2 source)
-#ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN
-#include
#include
-#endif
-
#include "doomtype.h"
#include "cmdlib.h"
#include "i_system.h"
@@ -110,7 +105,7 @@ int Q_filelength (FILE *f)
FileExists
==============
*/
-BOOL FileExists (const char *filename)
+bool FileExists (const char *filename)
{
FILE *f;
@@ -265,7 +260,7 @@ int ParseNum (char *str)
// [RH] Returns true if the specified string is a valid decimal number
-BOOL IsNum (char *str)
+bool IsNum (char *str)
{
while (*str)
{
@@ -365,7 +360,7 @@ int i;
i=(int)strlen(p);
if (p[i-1]=='/' || p[i-1]=='\\') p[i-1]=0;
if (*path) DoCreatePath(p);
- CreateDirectory(p,NULL);
+ _mkdir(p);
#else
// FIXME: write me
#endif
diff --git a/src/cmdlib.h b/src/cmdlib.h
index 54f3074e5..33fc20615 100644
--- a/src/cmdlib.h
+++ b/src/cmdlib.h
@@ -26,7 +26,7 @@
#define myoffsetof(type,identifier) ((size_t)&((type *)0)->identifier)
int Q_filelength (FILE *f);
-BOOL FileExists (const char *filename);
+bool FileExists (const char *filename);
extern char progdir[1024];
@@ -40,7 +40,7 @@ FString ExtractFileBase (const char *path, bool keep_extension=false);
int ParseHex (char *str);
int ParseNum (char *str);
-BOOL IsNum (char *str); // [RH] added
+bool IsNum (char *str); // [RH] added
char *copystring(const char *s);
void ReplaceString (char **ptr, const char *str);
diff --git a/src/colormatcher.cpp b/src/colormatcher.cpp
index b8cc632bf..f489d1e03 100644
--- a/src/colormatcher.cpp
+++ b/src/colormatcher.cpp
@@ -48,21 +48,21 @@
struct FColorMatcher::Seed
{
- byte r, g, b;
- byte bad;
- byte color;
+ BYTE r, g, b;
+ BYTE bad;
+ BYTE color;
};
struct FColorMatcher::PalEntry
{
#ifndef WORDS_BIGENDIAN
- byte b, g, r, a;
+ BYTE b, g, r, a;
#else
- byte a, r, g, b;
+ BYTE a, r, g, b;
#endif
};
-extern int BestColor (const DWORD *palette, int r, int g, int b, int first = 0, int num = 256);
+extern int BestColor (const uint32 *palette, int r, int g, int b, int first = 0, int num = 256);
FColorMatcher::FColorMatcher ()
{
@@ -97,7 +97,7 @@ void FColorMatcher::SetPalette (const DWORD *palette)
#ifdef BEFAST
Seed seeds[255];
- byte seedspread[CHISIZE+1][CHISIZE+1][CHISIZE+1];
+ BYTE seedspread[CHISIZE+1][CHISIZE+1][CHISIZE+1];
int numseeds;
int i, radius;
@@ -155,7 +155,7 @@ void FColorMatcher::SetPalette (const DWORD *palette)
b2 = seeds[i].b + radius; /* v g (0,HISIZE,0) */
// Check to see which planes are acceptable
- byte bad = 0;
+ BYTE bad = 0;
if (r1 < 0) bad |= 1, r1 = 0;
if (r2 > CHISIZE) bad |= 2, r2 = CHISIZE;
if (g1 < 0) bad |= 4, g1 = 0;
@@ -224,11 +224,11 @@ void FColorMatcher::SetPalette (const DWORD *palette)
}
int FColorMatcher::FillPlane (int r1, int r2, int g1, int g2, int b1, int b2,
- byte seedspread[CHISIZE+1][CHISIZE+1][CHISIZE+1],
+ BYTE seedspread[CHISIZE+1][CHISIZE+1][CHISIZE+1],
Seed *seeds, int thisseed)
{
const Seed *secnd = seeds + thisseed;
- byte color = secnd->color;
+ BYTE color = secnd->color;
int r, g, b;
int numhits = 0;
@@ -267,16 +267,16 @@ int FColorMatcher::FillPlane (int r1, int r2, int g1, int g2, int b1, int b2,
return numhits;
}
-byte FColorMatcher::Pick (int r, int g, int b)
+BYTE FColorMatcher::Pick (int r, int g, int b)
{
if (Pal == NULL)
return 0;
#ifdef BEFAST
- byte bestcolor;
+ BYTE bestcolor;
int bestdist;
- byte color = FirstColor[(r+CLOSIZE/2)>>CLOBITS][(g+CLOSIZE/2)>>CLOBITS][(b+CLOSIZE/2)>>CLOBITS];
+ BYTE color = FirstColor[(r+CLOSIZE/2)>>CLOBITS][(g+CLOSIZE/2)>>CLOBITS][(b+CLOSIZE/2)>>CLOBITS];
if (NextColor[color] == 0)
return color;
@@ -300,6 +300,6 @@ byte FColorMatcher::Pick (int r, int g, int b)
} while (color != 0);
return bestcolor;
#else
- return BestColor ((DWORD *)Pal, r, g, b);
+ return BestColor ((uint32 *)Pal, r, g, b);
#endif
}
diff --git a/src/colormatcher.h b/src/colormatcher.h
index 633b7f4ce..449e484ba 100644
--- a/src/colormatcher.h
+++ b/src/colormatcher.h
@@ -60,7 +60,7 @@ public:
FColorMatcher (const FColorMatcher &other);
void SetPalette (const DWORD *palette);
- byte Pick (int r, int g, int b);
+ BYTE Pick (int r, int g, int b);
FColorMatcher &operator= (const FColorMatcher &other);
private:
@@ -69,11 +69,11 @@ private:
struct PalEntry;
const PalEntry *Pal;
- byte FirstColor[CHISIZE+1][CHISIZE+1][CHISIZE+1];
- byte NextColor[256];
+ BYTE FirstColor[CHISIZE+1][CHISIZE+1][CHISIZE+1];
+ BYTE NextColor[256];
int FillPlane (int r1, int r2, int g1, int g2, int b1, int b2,
- byte seedspread[CHISIZE+1][CHISIZE+1][CHISIZE+1],
+ BYTE seedspread[CHISIZE+1][CHISIZE+1][CHISIZE+1],
Seed *seeds, int thisseed);
};
diff --git a/src/ct_chat.cpp b/src/ct_chat.cpp
index 9097ba23d..a85c34c23 100644
--- a/src/ct_chat.cpp
+++ b/src/ct_chat.cpp
@@ -41,7 +41,7 @@ EXTERN_CVAR (Int, con_scaletext)
void CT_Init ();
void CT_Drawer ();
-BOOL CT_Responder (event_t *ev);
+bool CT_Responder (event_t *ev);
int chatmodeon;
@@ -54,7 +54,7 @@ static void ShoveChatStr (const char *str, BYTE who);
static bool DoSubstitution (char *out, const char *in);
static int len;
-static byte ChatQueue[QUEUESIZE];
+static BYTE ChatQueue[QUEUESIZE];
CVAR (String, chatmacro1, "I'm ready to kick butt!", CVAR_ARCHIVE)
CVAR (String, chatmacro2, "I'm OK.", CVAR_ARCHIVE)
@@ -114,7 +114,7 @@ void CT_Stop ()
//
//===========================================================================
-BOOL CT_Responder (event_t *ev)
+bool CT_Responder (event_t *ev)
{
if (chatmodeon && ev->type == EV_GUI_Event)
{
diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp
index fb0e1ef46..d4493b410 100644
--- a/src/d_dehacked.cpp
+++ b/src/d_dehacked.cpp
@@ -245,7 +245,7 @@ DehSpriteMappings[] =
static char *PatchFile, *PatchPt, *PatchName;
static char *Line1, *Line2;
static int dversion, pversion;
-static BOOL including, includenotext;
+static bool including, includenotext;
static const char *unknown_str = "Unknown key %s encountered in %s %d.\n";
@@ -265,7 +265,7 @@ static int NumNames;
// These are the original heights of every Doom 2 thing. They are used if a patch
// specifies that a thing should be hanging from the ceiling but doesn't specify
// a height for the thing, since these are the heights it probably wants.
-static byte *OrgHeights;
+static BYTE *OrgHeights;
static int NumOrgHeights;
// This is a list of all the action functions used by each of Doom's states.
@@ -380,8 +380,8 @@ static const struct {
};
static int HandleMode (const char *mode, int num);
-static BOOL HandleKey (const struct Key *keys, void *structure, const char *key, int value);
-static BOOL ReadChars (char **stuff, int size);
+static bool HandleKey (const struct Key *keys, void *structure, const char *key, int value);
+static bool ReadChars (char **stuff, int size);
static char *igets (void);
static int GetLine (void);
@@ -435,13 +435,13 @@ static int HandleMode (const char *mode, int num)
return i;
}
-static BOOL HandleKey (const struct Key *keys, void *structure, const char *key, int value)
+static bool HandleKey (const struct Key *keys, void *structure, const char *key, int value)
{
while (keys->name && stricmp (keys->name, key))
keys++;
if (keys->name) {
- *((int *)(((byte *)structure) + keys->offset)) = value;
+ *((int *)(((BYTE *)structure) + keys->offset)) = value;
return false;
}
@@ -514,7 +514,7 @@ int FindStyle (const char *namestr)
return -1;
}
-static BOOL ReadChars (char **stuff, int size)
+static bool ReadChars (char **stuff, int size)
{
char *str = *stuff;
@@ -1006,8 +1006,8 @@ static int PatchThing (int thingy)
else
info->renderflags &= ~RF_INVISIBLE;
}
- DPrintf ("Bits: %ld,%ld (0x%08lx,0x%08lx)\n", info->flags, info->flags2,
- info->flags, info->flags2);
+ DPrintf ("Bits: %d,%d (0x%08x,0x%08x)\n", info->flags, info->flags2,
+ info->flags, info->flags2);
}
else if (stricmp (Line1, "ID #") == 0)
{
@@ -1804,7 +1804,7 @@ static int PatchText (int oldSize)
char *oldStr;
char *newStr;
char *temp;
- BOOL good;
+ INTBOOL good;
int result;
int i;
@@ -2052,7 +2052,7 @@ static int DoInclude (int dummy)
return GetLine();
}
-void DoDehPatch (const char *patchfile, BOOL autoloading)
+void DoDehPatch (const char *patchfile, bool autoloading)
{
char file[256];
int cont;
diff --git a/src/d_dehacked.h b/src/d_dehacked.h
index df5c04b9a..6490976af 100644
--- a/src/d_dehacked.h
+++ b/src/d_dehacked.h
@@ -34,7 +34,7 @@
#ifndef __D_DEHACK_H__
#define __D_DEHACK_H__
-void DoDehPatch (const char *patchfile, BOOL autoloading);
+void DoDehPatch (const char *patchfile, bool autoloading);
void FinishDehPatch ();
void HandleNoSector();
diff --git a/src/d_main.cpp b/src/d_main.cpp
index 394e8c053..df4ea27b1 100644
--- a/src/d_main.cpp
+++ b/src/d_main.cpp
@@ -136,11 +136,11 @@ extern gameinfo_t StrifeTeaserGameInfo;
extern gameinfo_t StrifeTeaser2GameInfo;
extern int testingmode;
-extern BOOL setmodeneeded;
-extern BOOL netdemo;
+extern bool setmodeneeded;
+extern bool netdemo;
extern int NewWidth, NewHeight, NewBits, DisplayBits;
EXTERN_CVAR (Bool, st_scale)
-extern BOOL gameisdead;
+extern bool gameisdead;
extern bool demorecording;
extern bool M_DemoNoPlay; // [RH] if true, then skip any demos in the loop
extern bool insave;
@@ -157,13 +157,13 @@ CVAR (Int, wipetype, 1, CVAR_ARCHIVE);
bool DrawFSHUD; // [RH] Draw fullscreen HUD?
wadlist_t *wadfiles; // [RH] remove limit on # of loaded wads
-BOOL devparm; // started game with -devparm
+bool devparm; // started game with -devparm
char *D_DrawIcon; // [RH] Patch name of icon to draw on next refresh
int NoWipe; // [RH] Allow wipe? (Needs to be set each time)
-BOOL singletics = false; // debug flag to cancel adaptiveness
+bool singletics = false; // debug flag to cancel adaptiveness
char startmap[8];
-BOOL autostart;
-BOOL advancedemo;
+bool autostart;
+bool advancedemo;
FILE *debugfile;
event_t events[MAXEVENTS];
int eventhead;
@@ -597,7 +597,7 @@ void D_Display (bool screenshot)
{
// wipe update
int wipestart, nowtime, tics;
- BOOL done;
+ bool done;
wipe_EndScreen ();
screen->Unlock ();
@@ -2162,7 +2162,7 @@ void D_DoomMain (void)
if (Args.CheckParm ("-respawn")) flags |= DF_MONSTERS_RESPAWN;
if (Args.CheckParm ("-fast")) flags |= DF_FAST_MONSTERS;
- devparm = Args.CheckParm ("-devparm");
+ devparm = !!Args.CheckParm ("-devparm");
if (Args.CheckParm ("-altdeath"))
{
@@ -2375,15 +2375,16 @@ void D_DoomMain (void)
//
//==========================================================================
-ADD_STAT (fps, out)
+ADD_STAT (fps)
{
- sprintf (out,
- "frame=%04.1f ms walls=%04.1f ms planes=%04.1f ms masked=%04.1f ms",
+ FString out;
+ out.Format("frame=%04.1f ms walls=%04.1f ms planes=%04.1f ms masked=%04.1f ms",
(double)FrameCycles * SecondsPerCycle * 1000,
(double)WallCycles * SecondsPerCycle * 1000,
(double)PlaneCycles * SecondsPerCycle * 1000,
(double)MaskedCycles * SecondsPerCycle * 1000
);
+ return out;
}
//==========================================================================
@@ -2396,11 +2397,13 @@ ADD_STAT (fps, out)
static cycle_t bestwallcycles = INT_MAX;
-ADD_STAT (wallcycles, out)
+ADD_STAT (wallcycles)
{
+ FString out;
if (WallCycles && WallCycles < bestwallcycles)
bestwallcycles = WallCycles;
- sprintf (out, "%lu", bestwallcycles);
+ out.Format ("%llu", bestwallcycles);
+ return out;
}
//==========================================================================
@@ -2420,11 +2423,13 @@ CCMD (clearwallcycles)
// To use these, also uncomment the clock/unclock in wallscan
static cycle_t bestscancycles = INT_MAX;
-ADD_STAT (scancycles, out)
+ADD_STAT (scancycles)
{
+ FString out;
if (WallScanCycles && WallScanCycles < bestscancycles)
bestscancycles = WallScanCycles;
- sprintf (out, "%lu", bestscancycles);
+ out.Format ("%llu", bestscancycles);
+ return out;
}
CCMD (clearscancycles)
diff --git a/src/d_net.cpp b/src/d_net.cpp
index daa96c96c..843dffcfe 100644
--- a/src/d_net.cpp
+++ b/src/d_net.cpp
@@ -87,7 +87,7 @@ int P_StartScript (AActor *who, line_t *where, int script, char *map, bool backS
//
// Setup packets are different, and are described just before D_ArbitrateNetStart().
-extern byte *demo_p; // [RH] Special "ticcmds" get recorded in demos
+extern BYTE *demo_p; // [RH] Special "ticcmds" get recorded in demos
extern char savedescription[SAVESTRINGSIZE];
extern FString savegamefile;
@@ -118,9 +118,9 @@ ticcmd_t localcmds[LOCALCMDTICS];
FDynamicBuffer NetSpecs[MAXPLAYERS][BACKUPTICS];
ticcmd_t netcmds[MAXPLAYERS][BACKUPTICS];
int nettics[MAXNETNODES];
-BOOL nodeingame[MAXNETNODES]; // set false as nodes leave game
+bool nodeingame[MAXNETNODES]; // set false as nodes leave game
bool nodejustleft[MAXNETNODES]; // set when a node just left
-BOOL remoteresend[MAXNETNODES]; // set when local needs tics
+bool remoteresend[MAXNETNODES]; // set when local needs tics
int resendto[MAXNETNODES]; // set when remote needs tics
int resendcount[MAXNETNODES];
@@ -151,20 +151,20 @@ int mastertics;
static int entertic;
static int oldentertics;
-extern BOOL advancedemo;
+extern bool advancedemo;
CVAR (Bool, cl_capfps, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
// [RH] Special "ticcmds" get stored in here
static struct TicSpecial
{
- byte *streams[BACKUPTICS];
+ BYTE *streams[BACKUPTICS];
size_t used[BACKUPTICS];
- byte *streamptr;
+ BYTE *streamptr;
size_t streamoffs;
int specialsize;
int lastmaketic;
- BOOL okay;
+ bool okay;
TicSpecial ()
{
@@ -178,7 +178,7 @@ static struct TicSpecial
for (i = 0; i < BACKUPTICS; i++)
{
- streams[i] = (byte *)M_Malloc (256);
+ streams[i] = (BYTE *)M_Malloc (256);
used[i] = 0;
}
okay = true;
@@ -210,7 +210,7 @@ static struct TicSpecial
DPrintf ("Expanding special size to %d\n", specialsize);
for (i = 0; i < BACKUPTICS; i++)
- streams[i] = (byte *)M_Realloc (streams[i], specialsize);
+ streams[i] = (BYTE *)M_Realloc (streams[i], specialsize);
streamptr = streams[(maketic/ticdup)%BACKUPTICS] + streamoffs;
}
@@ -238,7 +238,7 @@ static struct TicSpecial
streamoffs = 0;
}
- TicSpecial &operator << (byte it)
+ TicSpecial &operator << (BYTE it)
{
if (streamptr)
{
@@ -365,7 +365,7 @@ int NetbufferSize ()
return k + 3 * count * numtics;
}
- byte *skipper = &netbuffer[k];
+ BYTE *skipper = &netbuffer[k];
if ((netbuffer[0] & NCMD_EXIT) == 0)
{
while (count-- > 0)
@@ -412,13 +412,13 @@ void HSendPacket (int node, int len)
{
fprintf (debugfile,"%i/%i send %i = SETUP [%3i]", gametic, maketic, node, len);
for (i = 0; i < len; i++)
- fprintf (debugfile," %2x", ((byte *)netbuffer)[i]);
+ fprintf (debugfile," %2x", ((BYTE *)netbuffer)[i]);
}
else if (netbuffer[0] & NCMD_EXIT)
{
fprintf (debugfile,"%i/%i send %i = EXIT [%3i]", gametic, maketic, node, len);
for (i = 0; i < len; i++)
- fprintf (debugfile," %2x", ((byte *)netbuffer)[i]);
+ fprintf (debugfile," %2x", ((BYTE *)netbuffer)[i]);
}
else
{
@@ -446,7 +446,7 @@ void HSendPacket (int node, int len)
numtics, realretrans, len);
for (i = 0; i < len; i++)
- fprintf (debugfile, "%c%2x", i==k?'|':' ', ((byte *)netbuffer)[i]);
+ fprintf (debugfile, "%c%2x", i==k?'|':' ', ((BYTE *)netbuffer)[i]);
}
fprintf (debugfile, " [[ ");
for (i = 0; i < doomcom.numnodes; ++i)
@@ -496,7 +496,7 @@ void HSendPacket (int node, int len)
// HGetPacket
// Returns false if no packet is waiting
//
-BOOL HGetPacket (void)
+bool HGetPacket (void)
{
if (reboundpacket)
{
@@ -526,14 +526,14 @@ BOOL HGetPacket (void)
{
fprintf (debugfile,"%i/%i get %i = SETUP [%3i]", gametic, maketic, doomcom.remotenode, doomcom.datalength);
for (i = 0; i < doomcom.datalength; i++)
- fprintf (debugfile, " %2x", ((byte *)netbuffer)[i]);
+ fprintf (debugfile, " %2x", ((BYTE *)netbuffer)[i]);
fprintf (debugfile, "\n");
}
else if (netbuffer[0] & NCMD_EXIT)
{
fprintf (debugfile,"%i/%i get %i = EXIT [%3i]", gametic, maketic, doomcom.remotenode, doomcom.datalength);
for (i = 0; i < doomcom.datalength; i++)
- fprintf (debugfile, " %2x", ((byte *)netbuffer)[i]);
+ fprintf (debugfile, " %2x", ((BYTE *)netbuffer)[i]);
fprintf (debugfile, "\n");
}
else {
@@ -561,7 +561,7 @@ BOOL HGetPacket (void)
numtics, realretrans, doomcom.datalength);
for (i = 0; i < doomcom.datalength; i++)
- fprintf (debugfile, "%c%2x", i==k?'|':' ', ((byte *)netbuffer)[i]);
+ fprintf (debugfile, "%c%2x", i==k?'|':' ', ((BYTE *)netbuffer)[i]);
if (numtics)
fprintf (debugfile, " <<%4x>>\n",
consistancy[playerfornode[doomcom.remotenode]][nettics[doomcom.remotenode]%BACKUPTICS] & 0xFFFF);
@@ -664,7 +664,7 @@ void PlayerIsGone (int netnode, int netconsole)
G_CheckDemoStatus ();
//WriteByte (DEM_DROPPLAYER, &demo_p);
- //WriteByte ((byte)netconsole, &demo_p);
+ //WriteByte ((BYTE)netconsole, &demo_p);
}
}
@@ -829,7 +829,7 @@ void GetPackets (void)
// update command store from the packet
{
- byte *start;
+ BYTE *start;
int i, tics;
remoteresend[netnode] = false;
@@ -909,7 +909,7 @@ void NetUpdate (void)
int newtics;
int i,j;
int realstart;
- byte *cmddata;
+ BYTE *cmddata;
bool resendOnly;
if (ticdup == 0)
@@ -1264,10 +1264,10 @@ void NetUpdate (void)
//
// CheckAbort
//
-BOOL CheckAbort (void)
+bool CheckAbort (void)
{
event_t *ev;
- BOOL res = false;
+ bool res = false;
PrintString (PRINT_HIGH, ""); // [RH] Give the console a chance to redraw itself
// This WaitForTic is to avoid flooding the network with packets on startup.
@@ -1336,7 +1336,7 @@ void D_ArbitrateNetStart (void)
DWORD playersdetected[MAXNETNODES];
BYTE gotsetup[MAXNETNODES];
char *s;
- byte *stream;
+ BYTE *stream;
int node;
bool allset = false;
@@ -1855,7 +1855,7 @@ void Net_NewMakeTic (void)
specials.NewMakeTic ();
}
-void Net_WriteByte (byte it)
+void Net_WriteByte (BYTE it)
{
specials << it;
}
@@ -1880,7 +1880,7 @@ void Net_WriteString (const char *it)
specials << it;
}
-void Net_WriteBytes (const byte *block, int len)
+void Net_WriteBytes (const BYTE *block, int len)
{
while (len--)
specials << *block++;
@@ -1908,12 +1908,12 @@ FDynamicBuffer::~FDynamicBuffer ()
m_Len = m_BufferLen = 0;
}
-void FDynamicBuffer::SetData (const byte *data, int len)
+void FDynamicBuffer::SetData (const BYTE *data, int len)
{
if (len > m_BufferLen)
{
m_BufferLen = (len + 255) & ~255;
- m_Data = (byte *)M_Realloc (m_Data, m_BufferLen);
+ m_Data = (BYTE *)M_Realloc (m_Data, m_BufferLen);
}
if (data)
{
@@ -1926,7 +1926,7 @@ void FDynamicBuffer::SetData (const byte *data, int len)
}
}
-byte *FDynamicBuffer::GetData (int *len)
+BYTE *FDynamicBuffer::GetData (int *len)
{
if (len)
*len = m_Len;
@@ -1937,9 +1937,9 @@ byte *FDynamicBuffer::GetData (int *len)
// [RH] Execute a special "ticcmd". The type byte should
// have already been read, and the stream is positioned
// at the beginning of the command's actual data.
-void Net_DoCommand (int type, byte **stream, int player)
+void Net_DoCommand (int type, BYTE **stream, int player)
{
- byte pos = 0;
+ BYTE pos = 0;
char *s = NULL;
int i;
@@ -1948,7 +1948,7 @@ void Net_DoCommand (int type, byte **stream, int player)
case DEM_SAY:
{
const char *name = players[player].userinfo.netname;
- byte who = ReadByte (stream);
+ BYTE who = ReadByte (stream);
s = ReadString (stream);
if (((who & 1) == 0) || players[player].userinfo.team == TEAM_None)
@@ -2042,7 +2042,7 @@ void Net_DoCommand (int type, byte **stream, int player)
case DEM_ADDBOT:
{
- byte num = ReadByte (stream);
+ BYTE num = ReadByte (stream);
bglobal.DoAddBot (num, s = ReadString (stream));
}
break;
@@ -2275,7 +2275,7 @@ void Net_DoCommand (int type, byte **stream, int player)
delete[] s;
}
-void Net_SkipCommand (int type, byte **stream)
+void Net_SkipCommand (int type, BYTE **stream)
{
BYTE t;
size_t skip;
diff --git a/src/d_net.h b/src/d_net.h
index c6b15b76c..30fa2bcff 100644
--- a/src/d_net.h
+++ b/src/d_net.h
@@ -93,11 +93,11 @@ public:
FDynamicBuffer ();
~FDynamicBuffer ();
- void SetData (const byte *data, int len);
- byte *GetData (int *len = NULL);
+ void SetData (const BYTE *data, int len);
+ BYTE *GetData (int *len = NULL);
private:
- byte *m_Data;
+ BYTE *m_Data;
int m_Len, m_BufferLen;
};
@@ -115,15 +115,15 @@ void TryRunTics (void);
// [RH] Functions for making and using special "ticcmds"
void Net_NewMakeTic ();
-void Net_WriteByte (byte);
+void Net_WriteByte (BYTE);
void Net_WriteWord (short);
void Net_WriteLong (int);
void Net_WriteFloat (float);
void Net_WriteString (const char *);
-void Net_WriteBytes (const byte *, int len);
+void Net_WriteBytes (const BYTE *, int len);
-void Net_DoCommand (int type, byte **stream, int player);
-void Net_SkipCommand (int type, byte **stream);
+void Net_DoCommand (int type, BYTE **stream, int player);
+void Net_SkipCommand (int type, BYTE **stream);
void Net_ClearBuffers ();
diff --git a/src/d_netinf.h b/src/d_netinf.h
index 3612bf841..522fe0d25 100644
--- a/src/d_netinf.h
+++ b/src/d_netinf.h
@@ -88,10 +88,10 @@ void D_UserInfoChanged (FBaseCVar *info);
void D_SendServerInfoChange (const FBaseCVar *cvar, UCVarValue value, ECVarType type);
void D_SendServerFlagChange (const FBaseCVar *cvar, int bitnum, bool set);
-void D_DoServerInfoChange (byte **stream, bool singlebit);
+void D_DoServerInfoChange (BYTE **stream, bool singlebit);
-void D_WriteUserInfoStrings (int player, byte **stream, bool compact=false);
-void D_ReadUserInfoStrings (int player, byte **stream, bool update);
+void D_WriteUserInfoStrings (int player, BYTE **stream, bool compact=false);
+void D_ReadUserInfoStrings (int player, BYTE **stream, bool update);
void D_GetPlayerColor (int player, float *h, float *s, float *v);
void D_PickRandomTeam (int player);
diff --git a/src/d_netinfo.cpp b/src/d_netinfo.cpp
index e234fef48..850ad04a8 100644
--- a/src/d_netinfo.cpp
+++ b/src/d_netinfo.cpp
@@ -55,7 +55,7 @@
static FRandom pr_pickteam ("PickRandomTeam");
-extern BOOL st_firsttime;
+extern bool st_firsttime;
EXTERN_CVAR (Bool, teamplay)
CVAR (Float, autoaim, 5000.f, CVAR_USERINFO | CVAR_ARCHIVE);
@@ -179,7 +179,7 @@ void D_PickRandomTeam (int player)
{
static char teamline[8] = "\\team\\X";
- byte *foo = (byte *)teamline;
+ BYTE *foo = (BYTE *)teamline;
teamline[6] = D_PickRandomTeam() + '0';
D_ReadUserInfoStrings (player, &foo, teamplay);
}
@@ -361,7 +361,7 @@ void D_UserInfoChanged (FBaseCVar *cvar)
Net_WriteString (foo);
}
-static const char *SetServerVar (char *name, ECVarType type, byte **stream, bool singlebit)
+static const char *SetServerVar (char *name, ECVarType type, BYTE **stream, bool singlebit)
{
FBaseCVar *var = FindCVar (name, NULL);
UCVarValue value;
@@ -466,7 +466,7 @@ void D_SendServerFlagChange (const FBaseCVar *cvar, int bitnum, bool set)
Net_WriteByte (bitnum | (set << 5));
}
-void D_DoServerInfoChange (byte **stream, bool singlebit)
+void D_DoServerInfoChange (BYTE **stream, bool singlebit)
{
const char *value;
char name[64];
@@ -488,7 +488,7 @@ void D_DoServerInfoChange (byte **stream, bool singlebit)
}
}
-void D_WriteUserInfoStrings (int i, byte **stream, bool compact)
+void D_WriteUserInfoStrings (int i, BYTE **stream, bool compact)
{
if (i >= MAXPLAYERS)
{
@@ -561,7 +561,7 @@ void D_WriteUserInfoStrings (int i, byte **stream, bool compact)
*stream += strlen (*((char **)stream)) + 1;
}
-void D_ReadUserInfoStrings (int i, byte **stream, bool update)
+void D_ReadUserInfoStrings (int i, BYTE **stream, bool update)
{
userinfo_t *info = &players[i].userinfo;
char *ptr = *((char **)stream);
diff --git a/src/d_player.h b/src/d_player.h
index 0f11d68ce..24505d890 100644
--- a/src/d_player.h
+++ b/src/d_player.h
@@ -210,7 +210,7 @@ public:
fixed_t momx, momy; // killough 10/98
bool centering;
- byte turnticks;
+ BYTE turnticks;
short oldbuttons;
bool attackdown;
int health; // only used between levels, mo->health
@@ -224,8 +224,8 @@ public:
int frags[MAXPLAYERS]; // kills of other players
int fragcount; // [RH] Cumulative frags for this player
int lastkilltime; // [RH] For multikills
- byte multicount;
- byte spreecount; // [RH] Keep track of killing sprees
+ BYTE multicount;
+ BYTE spreecount; // [RH] Keep track of killing sprees
AWeapon *ReadyWeapon;
AWeapon *PendingWeapon; // WP_NOCHANGE if not changing
@@ -302,8 +302,8 @@ public:
FString LogText; // [RH] Log for Strife
- signed char crouching;
- signed char crouchdir;
+ SBYTE crouching;
+ SBYTE crouchdir;
fixed_t crouchfactor;
fixed_t crouchoffset;
fixed_t crouchviewdelta;
diff --git a/src/d_protocol.cpp b/src/d_protocol.cpp
index cff2da224..91db0a5de 100644
--- a/src/d_protocol.cpp
+++ b/src/d_protocol.cpp
@@ -42,7 +42,7 @@
#include "cmdlib.h"
-char *ReadString (byte **stream)
+char *ReadString (BYTE **stream)
{
char *string = *((char **)stream);
@@ -50,28 +50,28 @@ char *ReadString (byte **stream)
return copystring (string);
}
-int ReadByte (byte **stream)
+int ReadByte (BYTE **stream)
{
- byte v = **stream;
+ BYTE v = **stream;
*stream += 1;
return v;
}
-int ReadWord (byte **stream)
+int ReadWord (BYTE **stream)
{
short v = (((*stream)[0]) << 8) | (((*stream)[1]));
*stream += 2;
return v;
}
-int ReadLong (byte **stream)
+int ReadLong (BYTE **stream)
{
int v = (((*stream)[0]) << 24) | (((*stream)[1]) << 16) | (((*stream)[2]) << 8) | (((*stream)[3]));
*stream += 4;
return v;
}
-float ReadFloat (byte **stream)
+float ReadFloat (BYTE **stream)
{
union
{
@@ -82,7 +82,7 @@ float ReadFloat (byte **stream)
return fakeint.f;
}
-void WriteString (const char *string, byte **stream)
+void WriteString (const char *string, BYTE **stream)
{
char *p = *((char **)stream);
@@ -91,24 +91,24 @@ void WriteString (const char *string, byte **stream)
}
*p++ = 0;
- *stream = (byte *)p;
+ *stream = (BYTE *)p;
}
-void WriteByte (byte v, byte **stream)
+void WriteByte (BYTE v, BYTE **stream)
{
**stream = v;
*stream += 1;
}
-void WriteWord (short v, byte **stream)
+void WriteWord (short v, BYTE **stream)
{
(*stream)[0] = v >> 8;
(*stream)[1] = v & 255;
*stream += 2;
}
-void WriteLong (int v, byte **stream)
+void WriteLong (int v, BYTE **stream)
{
(*stream)[0] = v >> 24;
(*stream)[1] = (v >> 16) & 255;
@@ -117,7 +117,7 @@ void WriteLong (int v, byte **stream)
*stream += 4;
}
-void WriteFloat (float v, byte **stream)
+void WriteFloat (float v, BYTE **stream)
{
union
{
@@ -129,10 +129,10 @@ void WriteFloat (float v, byte **stream)
}
// Returns the number of bytes read
-int UnpackUserCmd (usercmd_t *ucmd, const usercmd_t *basis, byte **stream)
+int UnpackUserCmd (usercmd_t *ucmd, const usercmd_t *basis, BYTE **stream)
{
- byte *start = *stream;
- byte flags;
+ BYTE *start = *stream;
+ BYTE flags;
if (basis != NULL)
{
@@ -170,11 +170,11 @@ int UnpackUserCmd (usercmd_t *ucmd, const usercmd_t *basis, byte **stream)
}
// Returns the number of bytes written
-int PackUserCmd (const usercmd_t *ucmd, const usercmd_t *basis, byte **stream)
+int PackUserCmd (const usercmd_t *ucmd, const usercmd_t *basis, BYTE **stream)
{
- byte flags = 0;
- byte *temp = *stream;
- byte *start = *stream;
+ BYTE flags = 0;
+ BYTE *temp = *stream;
+ BYTE *start = *stream;
usercmd_t blank;
if (basis == NULL)
@@ -229,8 +229,8 @@ int PackUserCmd (const usercmd_t *ucmd, const usercmd_t *basis, byte **stream)
FArchive &operator<< (FArchive &arc, usercmd_t &cmd)
{
- byte bytes[256];
- byte *stream = bytes;
+ BYTE bytes[256];
+ BYTE *stream = bytes;
if (arc.IsStoring ())
{
BYTE len = PackUserCmd (&cmd, NULL, &stream);
@@ -247,7 +247,7 @@ FArchive &operator<< (FArchive &arc, usercmd_t &cmd)
return arc;
}
-int WriteUserCmdMessage (usercmd_t *ucmd, const usercmd_t *basis, byte **stream)
+int WriteUserCmdMessage (usercmd_t *ucmd, const usercmd_t *basis, BYTE **stream)
{
if (basis == NULL)
{
@@ -281,10 +281,10 @@ int WriteUserCmdMessage (usercmd_t *ucmd, const usercmd_t *basis, byte **stream)
}
-int SkipTicCmd (byte **stream, int count)
+int SkipTicCmd (BYTE **stream, int count)
{
int i, skip;
- byte *flow = *stream;
+ BYTE *flow = *stream;
for (i = count; i > 0; i--)
{
@@ -293,7 +293,7 @@ int SkipTicCmd (byte **stream, int count)
flow += 2; // Skip consistancy marker
while (moreticdata)
{
- byte type = *flow++;
+ BYTE type = *flow++;
if (type == DEM_USERCMD)
{
@@ -327,10 +327,10 @@ int SkipTicCmd (byte **stream, int count)
#include
extern short consistancy[MAXPLAYERS][BACKUPTICS];
-void ReadTicCmd (byte **stream, int player, int tic)
+void ReadTicCmd (BYTE **stream, int player, int tic)
{
int type;
- byte *start;
+ BYTE *start;
ticcmd_t *tcmd;
int ticmod = tic % BACKUPTICS;
@@ -368,7 +368,7 @@ void ReadTicCmd (byte **stream, int player, int tic)
void RunNetSpecs (int player, int buf)
{
- byte *stream;
+ BYTE *stream;
int len;
if (gametic % ticdup == 0)
@@ -376,7 +376,7 @@ void RunNetSpecs (int player, int buf)
stream = NetSpecs[player][buf].GetData (&len);
if (stream)
{
- byte *end = stream + len;
+ BYTE *end = stream + len;
while (stream < end)
{
int type = ReadByte (&stream);
@@ -388,11 +388,11 @@ void RunNetSpecs (int player, int buf)
}
}
-byte *lenspot;
+BYTE *lenspot;
// Write the header of an IFF chunk and leave space
// for the length field.
-void StartChunk (int id, byte **stream)
+void StartChunk (int id, BYTE **stream)
{
WriteLong (id, stream);
lenspot = *stream;
@@ -401,7 +401,7 @@ void StartChunk (int id, byte **stream)
// Write the length field for the chunk and insert
// pad byte if the chunk is odd-sized.
-void FinishChunk (byte **stream)
+void FinishChunk (BYTE **stream)
{
int len;
@@ -418,7 +418,7 @@ void FinishChunk (byte **stream)
// Skip past an unknown chunk. *stream should be
// pointing to the chunk's length field.
-void SkipChunk (byte **stream)
+void SkipChunk (BYTE **stream)
{
int len;
diff --git a/src/d_protocol.h b/src/d_protocol.h
index 159927839..f35c154c5 100644
--- a/src/d_protocol.h
+++ b/src/d_protocol.h
@@ -57,19 +57,19 @@
struct zdemoheader_s {
- byte demovermajor;
- byte demoverminor;
- byte minvermajor;
- byte minverminor;
- byte map[8];
+ BYTE demovermajor;
+ BYTE demoverminor;
+ BYTE minvermajor;
+ BYTE minverminor;
+ BYTE map[8];
unsigned int rngseed;
- byte consoleplayer;
+ BYTE consoleplayer;
};
struct usercmd_s
{
- byte buttons;
- byte pad;
+ BYTE buttons;
+ BYTE pad;
short pitch; // up/down
short yaw; // left/right // If you haven't guessed, I just
short roll; // tilt // ripped these from Quake2's usercmd.
@@ -182,29 +182,29 @@ enum ECheatCommand
CHT_RESSURECT, // [GRB]
};
-void StartChunk (int id, byte **stream);
-void FinishChunk (byte **stream);
-void SkipChunk (byte **stream);
+void StartChunk (int id, BYTE **stream);
+void FinishChunk (BYTE **stream);
+void SkipChunk (BYTE **stream);
-int UnpackUserCmd (usercmd_t *ucmd, const usercmd_t *basis, byte **stream);
-int PackUserCmd (const usercmd_t *ucmd, const usercmd_t *basis, byte **stream);
-int WriteUserCmdMessage (usercmd_t *ucmd, const usercmd_t *basis, byte **stream);
+int UnpackUserCmd (usercmd_t *ucmd, const usercmd_t *basis, BYTE **stream);
+int PackUserCmd (const usercmd_t *ucmd, const usercmd_t *basis, BYTE **stream);
+int WriteUserCmdMessage (usercmd_t *ucmd, const usercmd_t *basis, BYTE **stream);
struct ticcmd_t;
-int SkipTicCmd (byte **stream, int count);
-void ReadTicCmd (byte **stream, int player, int tic);
+int SkipTicCmd (BYTE **stream, int count);
+void ReadTicCmd (BYTE **stream, int player, int tic);
void RunNetSpecs (int player, int buf);
-int ReadByte (byte **stream);
-int ReadWord (byte **stream);
-int ReadLong (byte **stream);
-float ReadFloat (byte **stream);
-char *ReadString (byte **stream);
-void WriteByte (byte val, byte **stream);
-void WriteWord (short val, byte **stream);
-void WriteLong (int val, byte **stream);
-void WriteFloat (float val, byte **stream);
-void WriteString (const char *string, byte **stream);
+int ReadByte (BYTE **stream);
+int ReadWord (BYTE **stream);
+int ReadLong (BYTE **stream);
+float ReadFloat (BYTE **stream);
+char *ReadString (BYTE **stream);
+void WriteByte (BYTE val, BYTE **stream);
+void WriteWord (short val, BYTE **stream);
+void WriteLong (int val, BYTE **stream);
+void WriteFloat (float val, BYTE **stream);
+void WriteString (const char *string, BYTE **stream);
#endif //__D_PROTOCOL_H__
diff --git a/src/d_textur.h b/src/d_textur.h
deleted file mode 100644
index 887649670..000000000
--- a/src/d_textur.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Typedefs related to to textures etc.,
-// isolated here to make it easier separating modules.
-//
-//-----------------------------------------------------------------------------
-
-
-#ifndef __D_TEXTUR__
-#define __D_TEXTUR__
-
-#include "doomtype.h"
-
-
-
-
-//
-// Flats?
-//
-// a pic is an unmasked block of pixels
-typedef struct
-{
- byte width;
- byte height;
- byte data;
-} pic_t;
-
-
-
-
-#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
diff --git a/src/decallib.cpp b/src/decallib.cpp
index 5cd4d1788..fcc7c4d87 100644
--- a/src/decallib.cpp
+++ b/src/decallib.cpp
@@ -433,7 +433,7 @@ BYTE FDecalLib::GetDecalID ()
void FDecalLib::ParseDecal ()
{
char decalName[64];
- byte decalNum;
+ BYTE decalNum;
FDecalTemplate newdecal;
int code, picnum;
@@ -834,7 +834,7 @@ void FDecalLib::ParseCombiner ()
}
}
-void FDecalLib::AddDecal (const char *name, byte num, const FDecalTemplate &decal)
+void FDecalLib::AddDecal (const char *name, BYTE num, const FDecalTemplate &decal)
{
FDecalTemplate *newDecal = new FDecalTemplate;
@@ -903,7 +903,7 @@ void FDecalLib::AddDecal (FDecalBase *decal)
}
}
-const FDecalTemplate *FDecalLib::GetDecalByNum (byte num) const
+const FDecalTemplate *FDecalLib::GetDecalByNum (BYTE num) const
{
if (num == 0)
{
diff --git a/src/decallib.h b/src/decallib.h
index 6406103db..6793a694f 100644
--- a/src/decallib.h
+++ b/src/decallib.h
@@ -95,7 +95,7 @@ public:
void ReadDecals (); // SC_Open() should have just been called
void ReadAllDecals ();
- const FDecalTemplate *GetDecalByNum (byte num) const;
+ const FDecalTemplate *GetDecalByNum (BYTE num) const;
const FDecalTemplate *GetDecalByName (const char *name) const;
private:
@@ -105,7 +105,7 @@ private:
static FDecalBase *ScanTreeForNum (const BYTE num, FDecalBase *root);
static FDecalBase *ScanTreeForName (const char *name, FDecalBase *root);
FTranslation *GenerateTranslation (DWORD start, DWORD end);
- void AddDecal (const char *name, byte num, const FDecalTemplate &decal);
+ void AddDecal (const char *name, BYTE num, const FDecalTemplate &decal);
void AddDecal (FDecalBase *decal);
FDecalAnimator *FindAnimator (const char *name);
diff --git a/src/decorations.cpp b/src/decorations.cpp
index 1aaa0dbf1..86ea4fcb1 100644
--- a/src/decorations.cpp
+++ b/src/decorations.cpp
@@ -90,7 +90,7 @@ public:
bool TryPickup (AActor *toucher)
{
- BOOL success = LineSpecials[special] (NULL, toucher, false,
+ INTBOOL success = LineSpecials[special] (NULL, toucher, false,
args[0], args[1], args[2], args[3], args[4]);
if (success)
diff --git a/src/dobject.cpp b/src/dobject.cpp
index 221cd2227..90c2e021a 100644
--- a/src/dobject.cpp
+++ b/src/dobject.cpp
@@ -620,8 +620,10 @@ void DObject::CheckIfSerialized () const
}
}
-ADD_STAT (destroys, out)
+ADD_STAT (destroys)
{
- sprintf (out, "Pointer fixing: %d in %04.1f ms",
+ FString out;
+ out.Format ("Pointer fixing: %d in %04.1f ms",
StaleCount, SecondsPerCycle * (double)StaleCycles * 1000);
+ return out;
}
diff --git a/src/doomdata.h b/src/doomdata.h
index baed91397..cc6c49d4b 100644
--- a/src/doomdata.h
+++ b/src/doomdata.h
@@ -100,8 +100,8 @@ typedef struct
WORD v1;
WORD v2;
WORD flags;
- byte special;
- byte args[5];
+ BYTE special;
+ BYTE args[5];
WORD sidenum[2];
} maplinedef2_t;
@@ -248,8 +248,8 @@ typedef struct MapThing
short angle;
short type;
short flags;
- byte special;
- byte args[5];
+ BYTE special;
+ BYTE args[5];
void Serialize (FArchive &);
} mapthing2_t;
@@ -306,11 +306,11 @@ typedef struct MapThing
//
typedef struct
{
- short originx;
- short originy;
- short patch;
- short stepdir;
- short colormap;
+ SWORD originx;
+ SWORD originy;
+ SWORD patch;
+ SWORD stepdir;
+ SWORD colormap;
} mappatch_t;
//
@@ -319,14 +319,14 @@ typedef struct
//
typedef struct
{
- char name[8];
+ BYTE name[8];
WORD Flags; // [RH] Was unused
BYTE ScaleX; // [RH] Scaling (8 is normal)
BYTE ScaleY; // [RH] Same as above
- short width;
- short height;
- byte columndirectory[4]; // OBSOLETE
- short patchcount;
+ SWORD width;
+ SWORD height;
+ BYTE columndirectory[4]; // OBSOLETE
+ SWORD patchcount;
mappatch_t patches[1];
} maptexture_t;
@@ -337,9 +337,9 @@ typedef struct
typedef struct
{
- short originx;
- short originy;
- short patch;
+ SWORD originx;
+ SWORD originy;
+ SWORD patch;
} strifemappatch_t;
//
@@ -348,13 +348,13 @@ typedef struct
//
typedef struct
{
- char name[8];
- WORD Flags; // [RH] Was nused
+ BYTE name[8];
+ WORD Flags; // [RH] Was unused
BYTE ScaleX; // [RH] Scaling (8 is normal)
BYTE ScaleY; // [RH] Same as above
- short width;
- short height;
- short patchcount;
+ SWORD width;
+ SWORD height;
+ SWORD patchcount;
strifemappatch_t patches[1];
} strifemaptexture_t;
diff --git a/src/doomstat.h b/src/doomstat.h
index a80dead30..24d5021cf 100644
--- a/src/doomstat.h
+++ b/src/doomstat.h
@@ -54,7 +54,7 @@ extern EGameSpeed GameSpeed;
// ------------------------
// Command line parameters.
//
-extern BOOL devparm; // DEBUG: launched with -devparm
+extern bool devparm; // DEBUG: launched with -devparm
@@ -70,7 +70,7 @@ extern GameMission_t gamemission;
extern char startmap[8]; // [RH] Actual map name now
-extern BOOL autostart;
+extern bool autostart;
// Selected by user.
EXTERN_CVAR (Int, gameskill);
@@ -80,10 +80,10 @@ extern int NextSkill; // [RH] Skill to use at next level load
extern int respawnmonsters;
// Netgame? Only true if >1 player.
-extern BOOL netgame;
+extern bool netgame;
// Bot game? Like netgame, but doesn't involve network communication.
-extern BOOL multiplayer;
+extern bool multiplayer;
// Flag: true only if started as net deathmatch.
EXTERN_CVAR (Int, deathmatch)
@@ -127,8 +127,8 @@ extern int paused; // Game Pause?
extern bool viewactive;
-extern BOOL nodrawers;
-extern BOOL noblit;
+extern bool nodrawers;
+extern bool noblit;
extern int viewwindowx;
extern int viewwindowy;
@@ -166,7 +166,7 @@ extern bool demorecording;
extern int demover;
// Quit after playing a demo from cmdline.
-extern BOOL singledemo;
+extern bool singledemo;
@@ -217,7 +217,7 @@ extern struct wbstartstruct_s wminfo;
extern FILE* debugfile;
// if true, load all graphics at level load
-extern BOOL precache;
+extern bool precache;
//-------
@@ -228,7 +228,7 @@ extern BOOL precache;
// to force a wipe on the next draw
extern gamestate_t wipegamestate;
extern bool setsizeneeded;
-extern BOOL setmodeneeded;
+extern bool setmodeneeded;
extern int BorderNeedRefresh;
extern int BorderTopRefresh;
@@ -237,7 +237,7 @@ extern int BorderTopRefresh;
EXTERN_CVAR (Float, mouse_sensitivity)
//?
// debug flag to cancel adaptiveness
-extern BOOL singletics;
+extern bool singletics;
extern int bodyqueslot;
diff --git a/src/doomtype.h b/src/doomtype.h
index 9518b1c70..26e063680 100644
--- a/src/doomtype.h
+++ b/src/doomtype.h
@@ -40,13 +40,21 @@
#include "zstring.h"
#include "name.h"
-#ifndef __BYTEBOOL__
-#define __BYTEBOOL__
-// [RH] Some windows includes already define this
-#if !defined(_WINDEF_) && !defined(__wtypes_h__)
-typedef int BOOL;
+// Since this file is included by everything, it seems an appropriate place
+// to check the NOASM/USEASM macros.
+#if !defined(_M_IX86) && !defined(__i386__)
+// The assembly code requires an x86 processor.
+#define NOASM
+#endif
+
+#ifndef NOASM
+#ifndef USEASM
+#define USEASM 1
+#endif
+#else
+#ifdef USEASM
+#undef USEASM
#endif
-typedef unsigned char byte;
#endif
#if defined(_MSC_VER) || defined(__WATCOMC__)
@@ -61,21 +69,39 @@ typedef unsigned char byte;
#define NOVTABLE
#endif
-#if defined(__GNUC__)
-#define __int64 long long
+#ifdef _MSC_VER
+typedef __int8 SBYTE;
+typedef unsigned __int8 BYTE;
+typedef __int16 SWORD;
+typedef unsigned __int16 WORD;
+typedef __int32 SDWORD;
+typedef unsigned __int32 uint32;
+typedef __int64 SQWORD;
+typedef unsigned __int64 QWORD;
+#else
+#include
+
+typedef int8_t SBYTE;
+typedef uint8_t BYTE;
+typedef int16_t SWORD;
+typedef uint16_t WORD;
+typedef int32_t SDWORD;
+typedef uint32_t uint32;
+typedef int64_t SQWORD;
+typedef uint64_t QWORD;
#endif
-typedef unsigned char BYTE;
-typedef signed char SBYTE;
+// windef.h, included by windows.h, has its own incompatible definition
+// of DWORD as a long. In files that mix Doom and Windows code, you
+// must define USE_WINDOWS_DWORD before including doomtype.h so that
+// you are aware that those files have a different DWORD than the rest
+// of the source.
-typedef unsigned short WORD;
-typedef signed short SWORD;
-
-typedef unsigned long DWORD;
-typedef signed long SDWORD;
-
-typedef unsigned __int64 QWORD;
-typedef signed __int64 SQWORD;
+#ifndef USE_WINDOWS_DWORD
+typedef uint32 DWORD;
+#endif
+typedef uint32 BITFIELD;
+typedef int INTBOOL;
// a 64-bit constant
#ifdef __GNUC__
@@ -86,8 +112,6 @@ typedef signed __int64 SQWORD;
#define UCONST64(v) ((QWORD)(v))
#endif
-typedef DWORD BITFIELD;
-
#if !defined(GUID_DEFINED)
#define GUID_DEFINED
typedef struct _GUID
@@ -111,18 +135,8 @@ typedef DWORD dsfixed_t; // fixedpt used
#define FIXED_MAX (signed)(0x7fffffff)
#define FIXED_MIN (signed)(0x80000000)
-#define DWORD_MIN ((DWORD)0)
-#define DWORD_MAX ((DWORD)0xffffffff)
-
-#ifndef NOASM
-#ifndef USEASM
-#define USEASM 1
-#endif
-#else
-#ifdef USEASM
-#undef USEASM
-#endif
-#endif
+#define DWORD_MIN ((uint32)0)
+#define DWORD_MAX ((uint32)0xffffffff)
#ifdef __GNUC__
diff --git a/src/dthinker.cpp b/src/dthinker.cpp
index 374aeb0fb..3daf8b9ef 100644
--- a/src/dthinker.cpp
+++ b/src/dthinker.cpp
@@ -418,8 +418,10 @@ DThinker *FThinkerIterator::Next ()
return NULL;
}
-ADD_STAT (think, out)
+ADD_STAT (think)
{
- sprintf (out, "Think time = %04.1f ms",
+ FString out;
+ out.Format ("Think time = %04.1f ms",
SecondsPerCycle * (double)ThinkCycles * 1000);
+ return out;
}
diff --git a/src/f_finale.cpp b/src/f_finale.cpp
index bc3664a0d..3cb96a8b9 100644
--- a/src/f_finale.cpp
+++ b/src/f_finale.cpp
@@ -73,7 +73,7 @@ static char *FinaleFlat;
void F_StartCast (void);
void F_CastTicker (void);
-BOOL F_CastResponder (event_t *ev);
+bool F_CastResponder (event_t *ev);
void F_CastDrawer (void);
void F_AdvanceSlideshow ();
@@ -81,7 +81,7 @@ void F_AdvanceSlideshow ();
// F_StartFinale
//
void F_StartFinale (char *music, int musicorder, int cdtrack, unsigned int cdid, char *flat, char *text,
- BOOL textInLump, BOOL finalePic, BOOL lookupText)
+ INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText)
{
bool ending = strncmp (level.nextmap, "enDSeQ", 6) == 0;
bool loopmusic = ending ? !(gameinfo.flags & GI_NOLOOPFINALEMUSIC) : true;
@@ -175,7 +175,7 @@ void F_EndFinale ()
FinaleTextLen = 0;
}
-BOOL F_Responder (event_t *event)
+bool F_Responder (event_t *event)
{
if (FinaleStage == 3)
{
@@ -375,7 +375,7 @@ void F_TextWrite (void)
int c;
int cx;
int cy;
- const byte *range;
+ const BYTE *range;
int leftmargin;
int rowheight;
bool scale;
@@ -481,8 +481,8 @@ castinfo_t castorder[] =
static struct
{
const char *type;
- byte melee;
- byte ofs;
+ BYTE melee;
+ BYTE ofs;
const char *sound;
FState *match;
} atkstates[] =
@@ -521,10 +521,10 @@ int casttics;
int castsprite; // [RH] For overriding the player sprite with a skin
const BYTE * casttranslation; // [RH] Draw "our hero" with their chosen suit color
FState* caststate;
-BOOL castdeath;
+bool castdeath;
int castframes;
int castonmelee;
-BOOL castattacking;
+bool castattacking;
static FState *advplayerstate;
@@ -698,7 +698,7 @@ void F_CastTicker (void)
// F_CastResponder
//
-BOOL F_CastResponder (event_t* ev)
+bool F_CastResponder (event_t* ev)
{
if (ev->type != EV_KeyDown)
return false;
@@ -834,12 +834,12 @@ void F_DrawUnderwater(void)
case 1:
{
PalEntry *palette;
- const byte *orgpal;
+ const BYTE *orgpal;
FMemLump lump;
int i;
lump = Wads.ReadLump ("E2PAL");
- orgpal = (byte *)lump.GetMem();
+ orgpal = (BYTE *)lump.GetMem();
palette = screen->GetPalette ();
for (i = 256; i > 0; i--, orgpal += 3)
{
diff --git a/src/f_finale.h b/src/f_finale.h
index 361dc15bf..918f1fd2e 100644
--- a/src/f_finale.h
+++ b/src/f_finale.h
@@ -30,7 +30,7 @@
//
// Called by main loop.
-BOOL F_Responder (event_t* ev);
+bool F_Responder (event_t* ev);
// Called by main loop.
void F_Ticker ();
@@ -40,7 +40,7 @@ void F_Drawer ();
void F_StartFinale (char *music, int musicorder, int cdtrack, unsigned int cdid, char *flat, char *text,
- BOOL textInLump, BOOL finalePic, BOOL lookupText);
+ INTBOOL textInLump, INTBOOL finalePic, INTBOOL lookupText);
void F_StartSlideshow ();
diff --git a/src/f_wipe.cpp b/src/f_wipe.cpp
index f10aa7174..412f154de 100644
--- a/src/f_wipe.cpp
+++ b/src/f_wipe.cpp
@@ -42,7 +42,7 @@ static int *y;
// [RH] Fire Wipe
#define FIREWIDTH 64
#define FIREHEIGHT 64
-static byte *burnarray;
+static BYTE *burnarray;
static int density;
static int burntime;
@@ -74,7 +74,7 @@ int wipe_initMelt (int ticks)
int i, r;
// copy start screen to main screen
- screen->DrawBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (byte *)wipe_scr_start);
+ screen->DrawBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (BYTE *)wipe_scr_start);
// makes this wipe faster (in theory)
// to have stuff in column-major format
@@ -105,7 +105,7 @@ int wipe_doMelt (int ticks)
short* s;
short* d;
- BOOL done = true;
+ bool done = true;
int width = SCREENWIDTH / 2;
@@ -162,7 +162,7 @@ int wipe_exitMelt (int ticks)
int wipe_initBurn (int ticks)
{
- burnarray = new byte[FIREWIDTH * (FIREHEIGHT+5)];
+ burnarray = new BYTE[FIREWIDTH * (FIREHEIGHT+5)];
memset (burnarray, 0, FIREWIDTH * (FIREHEIGHT+5));
density = 4;
burntime = 0;
@@ -172,7 +172,7 @@ int wipe_initBurn (int ticks)
int wipe_doBurn (int ticks)
{
static int voop;
- BOOL done;
+ bool done;
// This is a modified version of the fire from the player
// setup menu.
@@ -183,7 +183,7 @@ int wipe_doBurn (int ticks)
while (ticks--)
{
int a, b;
- byte *from;
+ BYTE *from;
// generator
from = burnarray + FIREHEIGHT * FIREWIDTH;
@@ -206,10 +206,10 @@ int wipe_doBurn (int ticks)
from = burnarray;
for (b = 0; b <= FIREHEIGHT; b += 2)
{
- byte *pixel = from;
+ BYTE *pixel = from;
// special case: first pixel on line
- byte *p = pixel + (FIREWIDTH << 1);
+ BYTE *p = pixel + (FIREWIDTH << 1);
unsigned int top = *p + *(p + FIREWIDTH - 1) + *(p + 1);
unsigned int bottom = *(pixel + (FIREWIDTH << 2));
unsigned int c1 = (top + bottom) >> 2;
@@ -258,13 +258,13 @@ int wipe_doBurn (int ticks)
{
fixed_t xstep, ystep, firex, firey;
int x, y;
- byte *to, *fromold, *fromnew;
+ BYTE *to, *fromold, *fromnew;
xstep = (FIREWIDTH * FRACUNIT) / SCREENWIDTH;
ystep = (FIREHEIGHT * FRACUNIT) / SCREENHEIGHT;
to = screen->GetBuffer();
- fromold = (byte *)wipe_scr_start;
- fromnew = (byte *)wipe_scr_end;
+ fromold = (BYTE *)wipe_scr_start;
+ fromnew = (BYTE *)wipe_scr_end;
done = true;
for (y = 0, firey = 0; y < SCREENHEIGHT; y++, firey += ystep)
@@ -325,7 +325,7 @@ int wipe_doFade (int ticks)
fade += ticks;
if (fade > 64)
{
- screen->DrawBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (byte *)wipe_scr_end);
+ screen->DrawBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (BYTE *)wipe_scr_end);
return 1;
}
else
@@ -334,9 +334,9 @@ int wipe_doFade (int ticks)
fixed_t bglevel = 64 - fade;
DWORD *fg2rgb = Col2RGB8[fade];
DWORD *bg2rgb = Col2RGB8[bglevel];
- byte *fromnew = (byte *)wipe_scr_end;
- byte *fromold = (byte *)wipe_scr_start;
- byte *to = screen->GetBuffer();
+ BYTE *fromnew = (BYTE *)wipe_scr_end;
+ BYTE *fromold = (BYTE *)wipe_scr_start;
+ BYTE *to = screen->GetBuffer();
for (y = 0; y < SCREENHEIGHT; y++)
{
@@ -375,7 +375,7 @@ int wipe_StartScreen (int type)
{
wipe_scr_start = new short[SCREENWIDTH * SCREENHEIGHT / 2];
- screen->GetBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (byte *)wipe_scr_start);
+ screen->GetBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (BYTE *)wipe_scr_start);
}
return 0;
@@ -387,16 +387,16 @@ int wipe_EndScreen (void)
{
wipe_scr_end = new short[SCREENWIDTH * SCREENHEIGHT / 2];
- screen->GetBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (byte *)wipe_scr_end);
- screen->DrawBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (byte *)wipe_scr_start); // restore start scr.
+ screen->GetBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (BYTE *)wipe_scr_end);
+ screen->DrawBlock (0, 0, SCREENWIDTH, SCREENHEIGHT, (BYTE *)wipe_scr_start); // restore start scr.
}
return 0;
}
-int wipe_ScreenWipe (int ticks)
+bool wipe_ScreenWipe (int ticks)
{
- static BOOL go = 0; // when zero, stop the wipe
+ static bool go = 0; // when zero, stop the wipe
static int (*wipes[])(int) =
{
wipe_initMelt, wipe_doMelt, wipe_exitMelt,
diff --git a/src/f_wipe.h b/src/f_wipe.h
index 5f5f1f98f..e6d393a57 100644
--- a/src/f_wipe.h
+++ b/src/f_wipe.h
@@ -29,7 +29,7 @@
int wipe_StartScreen (int type);
int wipe_EndScreen (void);
-int wipe_ScreenWipe (int ticks);
+bool wipe_ScreenWipe (int ticks);
enum
{
diff --git a/src/farchive.cpp b/src/farchive.cpp
index e5d18bd76..574b9f7db 100644
--- a/src/farchive.cpp
+++ b/src/farchive.cpp
@@ -204,7 +204,7 @@ void FCompressedFile::PostOpen ()
sizes[0] = SWAP_DWORD (sizes[0]);
sizes[1] = SWAP_DWORD (sizes[1]);
unsigned int len = sizes[0] == 0 ? sizes[1] : sizes[0];
- m_Buffer = (byte *)M_Malloc (len+8);
+ m_Buffer = (BYTE *)M_Malloc (len+8);
fread (m_Buffer+8, len, 1, m_File);
sizes[0] = SWAP_DWORD (sizes[0]);
sizes[1] = SWAP_DWORD (sizes[1]);
@@ -258,7 +258,7 @@ FFile &FCompressedFile::Write (const void *mem, unsigned int len)
m_MaxBufferSize = m_MaxBufferSize ? m_MaxBufferSize * 2 : 16384;
}
while (m_Pos + len > m_MaxBufferSize);
- m_Buffer = (byte *)M_Realloc (m_Buffer, m_MaxBufferSize);
+ m_Buffer = (BYTE *)M_Realloc (m_Buffer, m_MaxBufferSize);
}
if (len == 1)
m_Buffer[m_Pos] = *(BYTE *)mem;
@@ -325,7 +325,7 @@ void FCompressedFile::Implode ()
uLong outlen;
uLong len = m_BufferSize;
Byte *compressed = NULL;
- byte *oldbuf = m_Buffer;
+ BYTE *oldbuf = m_Buffer;
int r;
if (!nofilecompression && !m_NoCompress)
@@ -560,7 +560,7 @@ FPNGChunkFile::FPNGChunkFile (FILE *file, DWORD id)
FPNGChunkFile::FPNGChunkFile (FILE *file, DWORD id, size_t chunklen)
: FCompressedFile (file, EReading, true, false), m_ChunkID (id)
{
- m_Buffer = (byte *)M_Malloc (chunklen);
+ m_Buffer = (BYTE *)M_Malloc (chunklen);
m_BufferSize = (unsigned int)chunklen;
fread (m_Buffer, chunklen, 1, m_File);
// Skip the CRC for now. Maybe later it will be used.
@@ -693,7 +693,7 @@ void FArchive::Close ()
{
m_File->Close ();
m_File = NULL;
- DPrintf ("Processed %ld objects\n", m_ObjectCount);
+ DPrintf ("Processed %u objects\n", m_ObjectCount);
}
}
@@ -770,7 +770,7 @@ const char *FArchive::ReadName ()
DWORD index = ReadCount ();
if (index >= m_Names.Size())
{
- I_Error ("Name %lu has not been read yet\n", index);
+ I_Error ("Name %u has not been read yet\n", index);
}
return &m_NameStorage[m_Names[index].StringStart];
}
@@ -988,7 +988,7 @@ FArchive &FArchive::SerializePointer (void *ptrbase, BYTE **ptr, DWORD elemSize)
w = ReadCount ();
if (w != ~0u)
{
- *(void **)ptr = (byte *)ptrbase + w * elemSize;
+ *(void **)ptr = (BYTE *)ptrbase + w * elemSize;
}
else
{
@@ -1122,7 +1122,7 @@ FArchive &FArchive::ReadObject (DObject* &obj, PClass *wanttype)
index = ReadCount ();
if (index >= m_ObjectCount)
{
- I_Error ("Object reference too high (%lu; max is %lu)\n", index, m_ObjectCount);
+ I_Error ("Object reference too high (%u; max is %u)\n", index, m_ObjectCount);
}
obj = (DObject *)m_ObjectMap[index].object;
break;
@@ -1254,7 +1254,7 @@ int FArchive::ReadSprite ()
DWORD index = ReadCount ();
if (index >= m_NumSprites)
{
- I_Error ("Sprite %lu has not been read yet\n", index);
+ I_Error ("Sprite %u has not been read yet\n", index);
}
return m_SpriteMap[index];
}
@@ -1402,7 +1402,7 @@ const PClass *FArchive::ReadStoredClass (const PClass *wanttype)
DWORD index = ReadCount ();
if (index >= m_ClassCount)
{
- I_Error ("Class reference too high (%lu; max is %lu)\n", index, m_ClassCount);
+ I_Error ("Class reference too high (%u; max is %u)\n", index, m_ClassCount);
}
const PClass *type = m_TypeMap[index].toCurrent;
if (!type->IsDescendantOf (wanttype))
diff --git a/src/farchive.h b/src/farchive.h
index 1960c619a..50a3385f1 100644
--- a/src/farchive.h
+++ b/src/farchive.h
@@ -193,7 +193,6 @@ virtual void Read (void *mem, unsigned int len);
void WriteSprite (int spritenum);
int ReadSprite ();
-inline FArchive& operator<< (char &c) { return operator<< ((BYTE &)c); }
inline FArchive& operator<< (SBYTE &c) { return operator<< ((BYTE &)c); }
inline FArchive& operator<< (SWORD &s) { return operator<< ((WORD &)s); }
inline FArchive& operator<< (SDWORD &i) { return operator<< ((DWORD &)i); }
@@ -201,8 +200,6 @@ inline FArchive& operator<< (SQWORD &i) { return operator<< ((QWORD &)i); }
inline FArchive& operator<< (unsigned char *&str) { return operator<< ((char *&)str); }
inline FArchive& operator<< (signed char *&str) { return operator<< ((char *&)str); }
inline FArchive& operator<< (bool &b) { return operator<< ((BYTE &)b); }
-inline FArchive& operator<< (int &i) { return operator<< ((DWORD &)i); }
-inline FArchive& operator<< (unsigned int &i) { return operator<< ((DWORD &)i); }
inline FArchive& operator<< (DObject* &object) { return ReadObject (object, RUNTIME_CLASS(DObject)); }
protected:
diff --git a/src/g_doom/a_archvile.cpp b/src/g_doom/a_archvile.cpp
index 3b1660594..b41e54a86 100644
--- a/src/g_doom/a_archvile.cpp
+++ b/src/g_doom/a_archvile.cpp
@@ -153,10 +153,10 @@ static AActor *vileobj;
static fixed_t viletryx;
static fixed_t viletryy;
-BOOL PIT_VileCheck (AActor *thing)
+bool PIT_VileCheck (AActor *thing)
{
int maxdist;
- BOOL check;
+ bool check;
if (!(thing->flags & MF_CORPSE) )
return true; // not a monster
diff --git a/src/g_doom/doom_sbar.cpp b/src/g_doom/doom_sbar.cpp
index 6b75ecca8..e4fbd6a20 100644
--- a/src/g_doom/doom_sbar.cpp
+++ b/src/g_doom/doom_sbar.cpp
@@ -323,7 +323,7 @@ private:
void DrawArms ()
{
- byte arms[6];
+ BYTE arms[6];
int i, j;
// Catalog the weapons the player owns
@@ -1008,7 +1008,7 @@ private:
int FaceCount;
int RandomNumber;
int OldFaceIndex;
- byte OldArms[6];
+ BYTE OldArms[6];
int OldKeys;
int OldAmmo[4];
int OldMaxAmmo[4];
diff --git a/src/g_game.cpp b/src/g_game.cpp
index a4809c451..3046686b2 100644
--- a/src/g_game.cpp
+++ b/src/g_game.cpp
@@ -83,7 +83,7 @@ static FRandom pr_dmspawn ("DMSpawn");
const int SAVEPICWIDTH = 216;
const int SAVEPICHEIGHT = 162;
-BOOL G_CheckDemoStatus (void);
+bool G_CheckDemoStatus (void);
void G_ReadDemoTiccmd (ticcmd_t *cmd, int player);
void G_WriteDemoTiccmd (ticcmd_t *cmd, int player, int buf);
void G_PlayerReborn (int player);
@@ -115,14 +115,14 @@ bool sendturn180; // [RH] send a 180 degree turn next tic
bool usergame; // ok to save / end game
bool insave; // Game is saving - used to block exit commands
-BOOL timingdemo; // if true, exit with report on completion
-BOOL nodrawers; // for comparative timing purposes
-BOOL noblit; // for comparative timing purposes
+bool timingdemo; // if true, exit with report on completion
+bool nodrawers; // for comparative timing purposes
+bool noblit; // for comparative timing purposes
bool viewactive;
-BOOL netgame; // only true if packets are broadcast
-BOOL multiplayer;
+bool netgame; // only true if packets are broadcast
+bool multiplayer;
player_t players[MAXPLAYERS];
bool playeringame[MAXPLAYERS];
@@ -136,22 +136,22 @@ bool demoplayback;
bool netdemo;
bool demonew; // [RH] Only used around G_InitNew for demos
int demover;
-byte* demobuffer;
-byte* demo_p;
-byte* democompspot;
-byte* demobodyspot;
+BYTE* demobuffer;
+BYTE* demo_p;
+BYTE* democompspot;
+BYTE* demobodyspot;
size_t maxdemosize;
-byte* zdemformend; // end of FORM ZDEM chunk
-byte* zdembodyend; // end of ZDEM BODY chunk
-BOOL singledemo; // quit after playing a demo from cmdline
+BYTE* zdemformend; // end of FORM ZDEM chunk
+BYTE* zdembodyend; // end of ZDEM BODY chunk
+bool singledemo; // quit after playing a demo from cmdline
-BOOL precache = true; // if true, load all graphics at start
+bool precache = true; // if true, load all graphics at start
wbstartstruct_t wminfo; // parms for world map / intermission
short consistancy[MAXPLAYERS][BACKUPTICS];
-byte* savebuffer;
+BYTE* savebuffer;
#define MAXPLMOVE (forwardmove[1])
@@ -230,7 +230,7 @@ CCMD (turnspeeds)
{
if (argv.argc() == 1)
{
- Printf ("Current turn speeds: %ld %ld %ld %ld\n", angleturn[0],
+ Printf ("Current turn speeds: %d %d %d %d\n", angleturn[0],
angleturn[1], angleturn[2], angleturn[3]);
}
else
@@ -736,7 +736,7 @@ CCMD (spyprev)
// G_Responder
// Get info needed to make ticcmd_ts for the players.
//
-BOOL G_Responder (event_t *ev)
+bool G_Responder (event_t *ev)
{
// any other key pops up menu if in demos
// [RH] But only if the key isn't bound to a "special" command
@@ -1213,7 +1213,7 @@ void G_PlayerReborn (int player)
// because something is occupying it
//
-BOOL G_CheckSpot (int playernum, mapthing2_t *mthing)
+bool G_CheckSpot (int playernum, mapthing2_t *mthing)
{
fixed_t x;
fixed_t y;
@@ -1675,7 +1675,7 @@ void G_DoLoadGame ()
text = M_GetPNGText (png, "Important CVARs");
if (text != NULL)
{
- byte *vars_p = (byte *)text;
+ BYTE *vars_p = (BYTE *)text;
C_ReadCVars (&vars_p);
delete[] text;
}
@@ -1999,7 +1999,7 @@ void G_DoSaveGame (bool okForQuicksave)
G_WriteHubInfo(stdfile);
{
- byte vars[4096], *vars_p;
+ BYTE vars[4096], *vars_p;
vars_p = vars;
C_WriteCVars (&vars_p, CVAR_SERVERINFO);
*vars_p = 0;
@@ -2102,7 +2102,7 @@ void G_ReadDemoTiccmd (ticcmd_t *cmd, int player)
case DEM_DROPPLAYER:
{
- byte i = ReadByte (&demo_p);
+ BYTE i = ReadByte (&demo_p);
if (i < MAXPLAYERS)
playeringame[i] = false;
}
@@ -2115,18 +2115,18 @@ void G_ReadDemoTiccmd (ticcmd_t *cmd, int player)
}
}
-BOOL stoprecording;
+bool stoprecording;
CCMD (stop)
{
stoprecording = true;
}
-extern byte *lenspot;
+extern BYTE *lenspot;
void G_WriteDemoTiccmd (ticcmd_t *cmd, int player, int buf)
{
- byte *specdata;
+ BYTE *specdata;
int speclen;
if (stoprecording)
@@ -2159,7 +2159,7 @@ void G_WriteDemoTiccmd (ticcmd_t *cmd, int player, int buf)
ptrdiff_t body = demobodyspot - demobuffer;
// [RH] Allocate more space for the demo
maxdemosize += 0x20000;
- demobuffer = (byte *)M_Realloc (demobuffer, maxdemosize);
+ demobuffer = (BYTE *)M_Realloc (demobuffer, maxdemosize);
demo_p = demobuffer + pos;
lenspot = demobuffer + spot;
democompspot = demobuffer + comp;
@@ -2182,7 +2182,7 @@ void G_RecordDemo (char* name)
DefaultExtension (demoname, ".lmp");
v = Args.CheckValue ("-maxdemo");
maxdemosize = 0x20000;
- demobuffer = (byte *)M_Malloc (maxdemosize);
+ demobuffer = (BYTE *)M_Malloc (maxdemosize);
demorecording = true;
}
@@ -2225,7 +2225,7 @@ void G_BeginRecording (const char *startmap)
if (playeringame[i])
{
StartChunk (UINF_ID, &demo_p);
- WriteByte ((byte)i, &demo_p);
+ WriteByte ((BYTE)i, &demo_p);
D_WriteUserInfoStrings (i, &demo_p);
FinishChunk (&demo_p);
}
@@ -2280,14 +2280,14 @@ CCMD (timedemo)
// [RH] Process all the information in a FORM ZDEM
// until a BODY chunk is entered.
-BOOL G_ProcessIFFDemo (char *mapname)
+bool G_ProcessIFFDemo (char *mapname)
{
- BOOL headerHit = false;
- BOOL bodyHit = false;
+ bool headerHit = false;
+ bool bodyHit = false;
int numPlayers = 0;
int id, len, i;
uLong uncompSize = 0;
- byte *nextchunk;
+ BYTE *nextchunk;
demoplayback = true;
@@ -2418,7 +2418,7 @@ void G_DoPlayDemo (void)
if (demolump >= 0)
{
int demolen = Wads.LumpLength (demolump);
- demobuffer = new byte[demolen];
+ demobuffer = new BYTE[demolen];
Wads.ReadLump (demolump, demobuffer);
}
else
@@ -2472,8 +2472,8 @@ void G_DoPlayDemo (void)
//
void G_TimeDemo (char* name)
{
- nodrawers = Args.CheckParm ("-nodraw");
- noblit = Args.CheckParm ("-noblit");
+ nodrawers = !!Args.CheckParm ("-nodraw");
+ noblit = !!Args.CheckParm ("-noblit");
timingdemo = true;
singletics = true;
@@ -2492,7 +2492,7 @@ void G_TimeDemo (char* name)
===================
*/
-BOOL G_CheckDemoStatus (void)
+bool G_CheckDemoStatus (void)
{
if (!demorecording)
{ // [RH] Restore the player's userinfo settings.
@@ -2552,7 +2552,7 @@ BOOL G_CheckDemoStatus (void)
if (demorecording)
{
- byte *formlen;
+ BYTE *formlen;
WriteByte (DEM_STOP, &demo_p);
diff --git a/src/g_game.h b/src/g_game.h
index bb3ae6d69..7d28b8808 100644
--- a/src/g_game.h
+++ b/src/g_game.h
@@ -51,12 +51,12 @@ void G_BeginRecording (const char *startmap);
void G_PlayDemo (char* name);
void G_TimeDemo (char* name);
-BOOL G_CheckDemoStatus (void);
+bool G_CheckDemoStatus (void);
void G_WorldDone (void);
void G_Ticker (void);
-BOOL G_Responder (event_t* ev);
+bool G_Responder (event_t* ev);
void G_ScreenShot (char *filename);
diff --git a/src/g_hexen/a_spike.cpp b/src/g_hexen/a_spike.cpp
index 007f891c9..e412991a4 100644
--- a/src/g_hexen/a_spike.cpp
+++ b/src/g_hexen/a_spike.cpp
@@ -37,7 +37,7 @@ void A_ThrustImpale (AActor *);
AActor *tsthing;
-BOOL PIT_ThrustStompThing (AActor *thing)
+bool PIT_ThrustStompThing (AActor *thing)
{
fixed_t blockdist;
diff --git a/src/g_level.cpp b/src/g_level.cpp
index 5768c51c4..e2b28177f 100644
--- a/src/g_level.cpp
+++ b/src/g_level.cpp
@@ -105,7 +105,7 @@ static FRandom pr_classchoice ("RandomPlayerClassChoice");
TArray EndSequences;
-extern int timingdemo;
+extern bool timingdemo;
// Start time for timing demos
int starttime;
@@ -742,9 +742,9 @@ static void ParseMapInfoLower (MapInfoHandler *handlers,
{
int entry;
MapInfoHandler *handler;
- byte *info;
+ BYTE *info;
- info = levelinfo ? (byte *)levelinfo : (byte *)clusterinfo;
+ info = levelinfo ? (BYTE *)levelinfo : (BYTE *)clusterinfo;
while (SC_GetString ())
{
@@ -1557,9 +1557,9 @@ void G_InitNew (char *mapname, bool bTitleLevel)
//
// G_DoCompleted
//
-BOOL secretexit;
+bool secretexit;
static int startpos; // [RH] Support for multiple starts per level
-extern BOOL NoWipe; // [RH] Don't wipe when travelling in hubs
+extern int NoWipe; // [RH] Don't wipe when travelling in hubs
static bool startkeepfacing; // [RH] Support for keeping your facing angle
static bool resetinventory; // Reset the inventory to the player's default for the next level
@@ -1917,7 +1917,7 @@ void G_DoLoadLevel (int position, bool autosave)
if (timingdemo)
{
- static BOOL firstTime = true;
+ static bool firstTime = true;
if (firstTime)
{
diff --git a/src/g_level.h b/src/g_level.h
index 4f99693c4..84889b1d5 100644
--- a/src/g_level.h
+++ b/src/g_level.h
@@ -249,7 +249,7 @@ enum EndTypes
struct EndSequence
{
- byte EndType;
+ BYTE EndType;
char PicName[9];
};
diff --git a/src/g_shared/a_decals.cpp b/src/g_shared/a_decals.cpp
index dc4e3c17f..8179173f6 100644
--- a/src/g_shared/a_decals.cpp
+++ b/src/g_shared/a_decals.cpp
@@ -724,7 +724,7 @@ void ADecal::BeginPlay ()
{
if (tpl->PicNum == 65535)
{
- Printf("Decal actor at (%ld,%ld) does not have a valid texture\n", x>>FRACBITS, y>>FRACBITS);
+ Printf("Decal actor at (%d,%d) does not have a valid texture\n", x>>FRACBITS, y>>FRACBITS);
}
else
@@ -751,13 +751,13 @@ void ADecal::BeginPlay ()
}
else
{
- DPrintf ("Could not find a wall to stick decal to at (%ld,%ld)\n", x>>FRACBITS, y>>FRACBITS);
+ DPrintf ("Could not find a wall to stick decal to at (%d,%d)\n", x>>FRACBITS, y>>FRACBITS);
}
}
}
else
{
- DPrintf ("Decal actor at (%ld,%ld) does not have a good template\n", x>>FRACBITS, y>>FRACBITS);
+ DPrintf ("Decal actor at (%d,%d) does not have a good template\n", x>>FRACBITS, y>>FRACBITS);
}
// This actor doesn't need to stick around anymore.
Destroy();
diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp
index 93b490f9f..61ec700ba 100644
--- a/src/g_shared/a_pickups.cpp
+++ b/src/g_shared/a_pickups.cpp
@@ -1204,7 +1204,7 @@ CCMD (printinv)
}
for (item = players[consoleplayer].mo->Inventory; item != NULL; item = item->Inventory)
{
- Printf ("%s #%lu (%d/%d)\n", item->GetClass()->TypeName.GetChars(),
+ Printf ("%s #%u (%d/%d)\n", item->GetClass()->TypeName.GetChars(),
item->InventoryID,
item->Amount, item->MaxAmount);
}
diff --git a/src/g_shared/hudmessages.cpp b/src/g_shared/hudmessages.cpp
index 1173ad1e0..892e1bc54 100644
--- a/src/g_shared/hudmessages.cpp
+++ b/src/g_shared/hudmessages.cpp
@@ -214,7 +214,7 @@ void DHUDMessage::ResetText (const char *text)
screen->SetFont (Font);
- Lines = V_BreakLines (width, (byte *)text);
+ Lines = V_BreakLines (width, (BYTE *)text);
NumLines = 0;
Width = 0;
diff --git a/src/g_shared/sbar.h b/src/g_shared/sbar.h
index 4ab4c60a8..c718d9e17 100644
--- a/src/g_shared/sbar.h
+++ b/src/g_shared/sbar.h
@@ -166,9 +166,9 @@ public:
void SetScaled (bool scale);
- void AttachMessage (DHUDMessage *msg, DWORD id=0);
+ void AttachMessage (DHUDMessage *msg, uint32 id=0);
DHUDMessage *DetachMessage (DHUDMessage *msg);
- DHUDMessage *DetachMessage (DWORD id);
+ DHUDMessage *DetachMessage (uint32 id);
void DetachAllMessages ();
bool CheckMessage (DHUDMessage *msg);
void ShowPlayerName ();
@@ -198,7 +198,7 @@ protected:
void DrawPowerups ();
void UpdateRect (int x, int y, int width, int height) const;
- void DrawImage (FTexture *image, int x, int y, byte *translation=NULL) const;
+ void DrawImage (FTexture *image, int x, int y, BYTE *translation=NULL) const;
void DrawFadedImage (FTexture *image, int x, int y, fixed_t shade) const;
void DrawPartialImage (FTexture *image, int wx, int ww) const;
@@ -246,7 +246,7 @@ private:
void DrawMessages (int bottom) const;
void DrawConsistancy () const;
- static byte DamageToAlpha[114];
+ static BYTE DamageToAlpha[114];
DHUDMessage *Messages;
};
diff --git a/src/g_shared/shared_sbar.cpp b/src/g_shared/shared_sbar.cpp
index 816a96494..3f53b8cb3 100644
--- a/src/g_shared/shared_sbar.cpp
+++ b/src/g_shared/shared_sbar.cpp
@@ -125,7 +125,7 @@ CVAR (Bool, idmypos, false, 0);
// [RH] Amount of red flash for up to 114 damage points. Calculated by hand
// using a logarithmic scale and my trusty HP48G.
-byte FBaseStatusBar::DamageToAlpha[114] =
+BYTE FBaseStatusBar::DamageToAlpha[114] =
{
0, 8, 16, 23, 30, 36, 42, 47, 53, 58, 62, 67, 71, 75, 79,
83, 87, 90, 94, 97, 100, 103, 107, 109, 112, 115, 118, 120, 123, 125,
@@ -410,7 +410,7 @@ void FBaseStatusBar::ShowPlayerName ()
//---------------------------------------------------------------------------
void FBaseStatusBar::DrawImage (FTexture *img,
- int x, int y, byte *translation) const
+ int x, int y, BYTE *translation) const
{
if (img != NULL)
{
@@ -1108,7 +1108,7 @@ void FBaseStatusBar::Draw (EHudState state)
value = &CPlayer->mo->z;
for (i = 2, value = &CPlayer->mo->z; i >= 0; y -= height, --value, --i)
{
- sprintf (line, "%c: %ld", labels[i], *value >> FRACBITS);
+ sprintf (line, "%c: %d", labels[i], *value >> FRACBITS);
screen->DrawText (CR_GREEN, SCREENWIDTH - 80, y, line, TAG_DONE);
BorderNeedRefresh = screen->GetPageCount();
}
diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp
index 5f19dfd6a..889eedf73 100644
--- a/src/gameconfigfile.cpp
+++ b/src/gameconfigfile.cpp
@@ -41,6 +41,7 @@
#include
#include
extern HWND Window;
+#define USE_WINDOWS_DWORD
#endif
#include "doomdef.h"
diff --git a/src/gi.h b/src/gi.h
index 62e4cb7d9..084edfa6c 100644
--- a/src/gi.h
+++ b/src/gi.h
@@ -67,8 +67,8 @@ extern const char *GameNames[9];
typedef struct
{
- byte offset;
- byte size;
+ BYTE offset;
+ BYTE size;
char tl[8];
char t[8];
char tr[8];
diff --git a/src/hu_stuff.h b/src/hu_stuff.h
index c776f16f8..cf638a6e1 100644
--- a/src/hu_stuff.h
+++ b/src/hu_stuff.h
@@ -27,8 +27,8 @@
//
// Globally visible constants.
//
-const byte HU_FONTSTART = '!'; // the first font characters
-const byte HU_FONTEND = 'ß'; // the last font characters
+const BYTE HU_FONTSTART = '!'; // the first font characters
+const BYTE HU_FONTEND = 'ß'; // the last font characters
// Calculate # of glyphs in font.
const int HU_FONTSIZE = HU_FONTEND - HU_FONTSTART + 1;
@@ -38,7 +38,7 @@ const int HU_FONTSIZE = HU_FONTEND - HU_FONTSTART + 1;
//
void CT_Init (void);
-BOOL CT_Responder (event_t* ev);
+bool CT_Responder (event_t* ev);
void CT_Drawer (void);
extern int chatmodeon;
diff --git a/src/i_net.cpp b/src/i_net.cpp
index 6456cf282..bb2ef6ab6 100644
--- a/src/i_net.cpp
+++ b/src/i_net.cpp
@@ -47,6 +47,7 @@
# include
#endif
+#define USE_WINDOWS_DWORD
#include "doomtype.h"
#include "i_system.h"
#include "d_event.h"
@@ -83,7 +84,7 @@ typedef int SOCKET;
typedef int socklen_t;
#endif
-extern BOOL CheckAbort (void);
+extern bool CheckAbort (void);
//
diff --git a/src/info.cpp b/src/info.cpp
index 17244db49..493d2befe 100644
--- a/src/info.cpp
+++ b/src/info.cpp
@@ -461,7 +461,7 @@ CCMD (dumpmapthings)
FDoomEdMap::DumpMapThings ();
}
-BOOL CheckCheatmode ();
+bool CheckCheatmode ();
CCMD (summon)
{
diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp
index 97cc216f2..d4377d73f 100644
--- a/src/m_cheat.cpp
+++ b/src/m_cheat.cpp
@@ -452,7 +452,7 @@ void GiveSpawner (player_t *player, const PClass *type, int amount)
void cht_Give (player_t *player, char *name, int amount)
{
- BOOL giveall;
+ bool giveall;
int i;
const PClass *type;
@@ -687,7 +687,7 @@ void cht_Suicide (player_t *plyr)
}
}
-BOOL CheckCheatmode ();
+bool CheckCheatmode ();
CCMD (mdk)
{
diff --git a/src/m_menu.cpp b/src/m_menu.cpp
index f2543f2dd..b58a310ef 100644
--- a/src/m_menu.cpp
+++ b/src/m_menu.cpp
@@ -120,7 +120,7 @@ static FSaveGameNode *M_RemoveSaveSlot (FSaveGameNode *file);
static void M_ExtractSaveData (const FSaveGameNode *file);
static void M_UnloadSaveData ();
static void M_InsertSaveNode (FSaveGameNode *node);
-static BOOL M_SaveLoadResponder (event_t *ev);
+static bool M_SaveLoadResponder (event_t *ev);
static void M_DeleteSaveResponse (int choice);
static void M_DrawMainMenu ();
@@ -220,7 +220,7 @@ static oldmenu_t *currentMenu; // current menudef
static oldmenu_t *TopLevelMenu; // The main menu everything hangs off of
static DCanvas *FireScreen;
-static byte FireRemap[256];
+static BYTE FireRemap[256];
static char *genders[3] = { "male", "female", "other" };
static FPlayerClass *PlayerClass;
@@ -2297,7 +2297,7 @@ static BYTE smoke[1024] =
static void M_RenderPlayerBackdrop ()
{
- byte *from;
+ BYTE *from;
int width, height, pitch;
width = FireScreen->GetWidth();
@@ -2395,7 +2395,7 @@ static void M_DrawPlayerBackdrop (int x, int y)
{
DCanvas *src = FireScreen;
DCanvas *dest = screen;
- byte *destline, *srcline;
+ BYTE *destline, *srcline;
const int destwidth = src->GetWidth() * CleanXfac / 2;
const int destheight = src->GetHeight() * CleanYfac / 2;
const int desty = y;
@@ -2688,7 +2688,7 @@ int M_StringHeight (const char *string)
//
// M_Responder
//
-BOOL M_Responder (event_t *ev)
+bool M_Responder (event_t *ev)
{
int ch;
int i;
@@ -2905,7 +2905,7 @@ BOOL M_Responder (event_t *ev)
return (ev->subtype == EV_GUI_KeyDown);
}
-BOOL M_SaveLoadResponder (event_t *ev)
+bool M_SaveLoadResponder (event_t *ev)
{
char workbuf[512];
diff --git a/src/m_menu.h b/src/m_menu.h
index 30886d194..56499fb56 100644
--- a/src/m_menu.h
+++ b/src/m_menu.h
@@ -34,7 +34,7 @@
// Even when the menu is not displayed,
// this can resize the view and change game parameters.
// Does all the real work of the menu interaction.
-BOOL M_Responder (event_t *ev);
+bool M_Responder (event_t *ev);
// Called by main loop,
// only used for menu (skull cursor) animation.
diff --git a/src/m_misc.cpp b/src/m_misc.cpp
index 54757d32a..6708a8a08 100644
--- a/src/m_misc.cpp
+++ b/src/m_misc.cpp
@@ -92,7 +92,7 @@ static long ParseCommandLine (const char *args, int *argc, char **argv);
#define O_BINARY 0
#endif
-BOOL M_WriteFile (char const *name, void *source, int length)
+bool M_WriteFile (char const *name, void *source, int length)
{
int handle;
int count;
@@ -115,11 +115,11 @@ BOOL M_WriteFile (char const *name, void *source, int length)
//
// M_ReadFile
//
-int M_ReadFile (char const *name, byte **buffer)
+int M_ReadFile (char const *name, BYTE **buffer)
{
int handle, count, length;
struct stat fileinfo;
- byte *buf;
+ BYTE *buf;
handle = open (name, O_RDONLY | O_BINARY, 0666);
if (handle == -1)
@@ -520,7 +520,7 @@ void WritePNGfile (FILE *file, const DCanvas *canvas, const PalEntry *palette)
//
// M_ScreenShot
//
-static BOOL FindFreeName (FString &fullname, const char *extension)
+static bool FindFreeName (FString &fullname, const char *extension)
{
FString lbmname;
int i;
diff --git a/src/m_misc.h b/src/m_misc.h
index 15dcc12ea..49333fc53 100644
--- a/src/m_misc.h
+++ b/src/m_misc.h
@@ -30,8 +30,8 @@ class FGameConfigFile;
extern FGameConfigFile *GameConfig;
-BOOL M_WriteFile (char const *name, void *source, int length);
-int M_ReadFile (char const *name, byte **buffer);
+bool M_WriteFile (char const *name, void *source, int length);
+int M_ReadFile (char const *name, BYTE **buffer);
void M_FindResponseFile (void);
// [RH] M_ScreenShot now accepts a filename parameter.
diff --git a/src/m_options.cpp b/src/m_options.cpp
index 65b6b1e15..4d4f3dbed 100644
--- a/src/m_options.cpp
+++ b/src/m_options.cpp
@@ -805,7 +805,7 @@ menu_t MessagesMenu =
*
*=======================================*/
-extern BOOL setmodeneeded;
+extern bool setmodeneeded;
extern int NewWidth, NewHeight, NewBits;
extern int DisplayBits;
@@ -814,7 +814,7 @@ int OldWidth, OldHeight, OldBits;
void M_FreeModesList ();
static void BuildModesList (int hiwidth, int hiheight, int hi_id);
-static BOOL GetSelectedSize (int line, int *width, int *height);
+static bool GetSelectedSize (int line, int *width, int *height);
static void SetModesMenu (int w, int h, int bits);
EXTERN_CVAR (Int, vid_defwidth)
@@ -1187,7 +1187,7 @@ static void ConfirmIsAGo ()
//
// Set some stuff up for the video modes menu
//
-static byte BitTranslate[16];
+static BYTE BitTranslate[16];
void M_OptInit (void)
{
@@ -2792,7 +2792,7 @@ void M_FreeModesList ()
}
}
-static BOOL GetSelectedSize (int line, int *width, int *height)
+static bool GetSelectedSize (int line, int *width, int *height)
{
if (ModesItems[line].type != screenres)
{
diff --git a/src/nodebuild.cpp b/src/nodebuild.cpp
index b211b5478..71b408da3 100644
--- a/src/nodebuild.cpp
+++ b/src/nodebuild.cpp
@@ -473,7 +473,7 @@ int FNodeBuilder::SelectSplitter (DWORD set, node_t &node, DWORD &splitseg, int
return nosplitters ? -1 : 0;
}
- D(Printf ("split seg %lu in set %d, score %d, step %d, nosplit %d\n", bestseg, set, bestvalue, step, nosplit));
+ D(Printf ("split seg %u in set %d, score %d, step %d, nosplit %d\n", bestseg, set, bestvalue, step, nosplit));
splitseg = bestseg;
SetNodeFromSeg (node, &Segs[bestseg]);
@@ -751,7 +751,7 @@ void FNodeBuilder::SplitSegs (DWORD set, node_t &node, DWORD splitseg, DWORD &ou
if (seg->loopnum)
{
- Printf (" Split seg %lu (%ld,%ld)-(%ld,%ld) of sector %d in loop %d\n",
+ Printf (" Split seg %u (%d,%d)-(%d,%d) of sector %d in loop %d\n",
set,
Vertices[seg->v1].x>>16, Vertices[seg->v1].y>>16,
Vertices[seg->v2].x>>16, Vertices[seg->v2].y>>16,
@@ -991,7 +991,7 @@ void FNodeBuilder::PrintSet (int l, DWORD set)
Printf ("set %d:\n", l);
for (; set != DWORD_MAX; set = Segs[set].next)
{
- Printf ("\t%lu(%d):%d(%ld,%ld)-%d(%ld,%ld) ", set, Segs[set].frontsector-sectors,
+ Printf ("\t%u(%d):%d(%d,%d)-%d(%d,%d) ", set, Segs[set].frontsector-sectors,
Segs[set].v1,
Vertices[Segs[set].v1].x>>16, Vertices[Segs[set].v1].y>>16,
Segs[set].v2,
diff --git a/src/oplsynth/fmopl.cpp b/src/oplsynth/fmopl.cpp
index 8aa819d41..b333338e6 100644
--- a/src/oplsynth/fmopl.cpp
+++ b/src/oplsynth/fmopl.cpp
@@ -1853,11 +1853,12 @@ static bool CalcVoice (FM_OPL *OPL, int voice, INT32 *buffer, int length)
return true;
}
-void YM3812GetVoiceString(char *out)
+FString YM3812GetVoiceString()
{
FM_OPL *OPL = OPL_YM3812[0];
- int i;
- for (i = 0; i <= 8; ++i)
+ char out[9*3];
+
+ for (int i = 0; i <= 8; ++i)
{
int color;
@@ -1873,5 +1874,5 @@ void YM3812GetVoiceString(char *out)
out[i*3+1] = color;
out[i*3+2] = '*';
}
- out[i*3] = 0;
+ return FString (out, 9*3);
}
diff --git a/src/oplsynth/fmopl.h b/src/oplsynth/fmopl.h
index cd8c14625..22b6bb0e6 100644
--- a/src/oplsynth/fmopl.h
+++ b/src/oplsynth/fmopl.h
@@ -1,6 +1,8 @@
#ifndef __FMOPL_H_
#define __FMOPL_H_
+#include "zstring.h"
+
/* select output bits size of output : 8 or 16 */
#define OPL_SAMPLE_BITS 16
@@ -42,6 +44,6 @@ void YM3812SetTimerHandler(int which, OPL_TIMERHANDLER TimerHandler, int channel
void YM3812SetIRQHandler(int which, OPL_IRQHANDLER IRQHandler, int param);
void YM3812SetUpdateHandler(int which, OPL_UPDATEHANDLER UpdateHandler, int param);
-void YM3812GetVoiceString(char *out);
+FString YM3812GetVoiceString();
#endif
diff --git a/src/oplsynth/opl_mus_player.cpp b/src/oplsynth/opl_mus_player.cpp
index 7a4e1a021..83a9e5e18 100644
--- a/src/oplsynth/opl_mus_player.cpp
+++ b/src/oplsynth/opl_mus_player.cpp
@@ -4,9 +4,9 @@
#include
#include
+#include "opl_mus_player.h"
#include "doomtype.h"
#include "fmopl.h"
-#include "opl_mus_player.h"
#include "w_wad.h"
#include "templates.h"
#include "c_cvars.h"
@@ -422,41 +422,37 @@ int OPLmusicBlock::PlayTick ()
return 0;
}
-ADD_STAT (opl, out)
+ADD_STAT (opl)
{
- uint i;
-
if (BlockForStats != NULL)
{
- for (i = 0; i < BlockForStats->io->OPLchannels; ++i)
+ FString out;
+ char star[3] = { TEXTCOLOR_ESCAPE, 'A', '*' };
+ for (uint i = 0; i < BlockForStats->io->OPLchannels; ++i)
{
- int color;
-
if (BlockForStats->channels[i].flags & CH_FREE)
{
- color = CR_BRICK;
+ star[1] = CR_BRICK + 'A';
}
else if (BlockForStats->channels[i].flags & CH_SUSTAIN)
{
- color = CR_ORANGE;
+ star[1] = CR_ORANGE + 'A';
}
else if (BlockForStats->channels[i].flags & CH_SECONDARY)
{
- color = CR_BLUE;
+ star[1] = CR_BLUE + 'A';
}
else
{
- color = CR_GREEN;
+ star[1] = CR_GREEN + 'A';
}
- out[i*3+0] = '\x1c';
- out[i*3+1] = 'A'+color;
- out[i*3+2] = '*';
+ out.AppendCStrPart (star, 3);
}
- out[i*3] = 0;
+ return out;
}
else
{
- YM3812GetVoiceString (out);
+ return YM3812GetVoiceString ();
}
}
diff --git a/src/oplsynth/opl_mus_player.h b/src/oplsynth/opl_mus_player.h
index 8bc7edeec..fbe87ab9e 100644
--- a/src/oplsynth/opl_mus_player.h
+++ b/src/oplsynth/opl_mus_player.h
@@ -1,6 +1,7 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include
+#define USE_WINDOWS_DWORD
#else
#include
#endif
diff --git a/src/p_acs.cpp b/src/p_acs.cpp
index 021c58947..3cd345433 100644
--- a/src/p_acs.cpp
+++ b/src/p_acs.cpp
@@ -698,7 +698,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len)
return;
}
- object = new byte[len];
+ object = new BYTE[len];
if (fr == NULL)
{
Wads.ReadLump (lumpnum, object);
@@ -1018,7 +1018,7 @@ FBehavior::FBehavior (int lumpnum, FileReader * fr, int len)
if (lib->ArrayStore[impNum].ArraySize != expectedSize)
{
Format = ACS_Unknown;
- Printf ("The array %s in %s has %ld elements, but %s expects it to only have %ld.\n",
+ Printf ("The array %s in %s has %u elements, but %s expects it to only have %u.\n",
parse, lib->ModuleName, lib->ArrayStore[impNum].ArraySize,
ModuleName, expectedSize);
}
@@ -3663,7 +3663,7 @@ int DLevelScript::RunScript ()
break;
case PCD_PRINTNUMBER:
- work.AppendFormat ("%ld", STACK(1));
+ work.AppendFormat ("%d", STACK(1));
--sp;
break;
@@ -3696,7 +3696,7 @@ int DLevelScript::RunScript ()
}
else
{
- work.AppendFormat ("Player %ld", STACK(1));
+ work.AppendFormat ("Player %d", STACK(1));
sp--;
break;
}
@@ -4379,7 +4379,7 @@ int DLevelScript::RunScript ()
case PCD_SETACTORPOSITION:
{
- BOOL result = false;
+ bool result = false;
AActor *actor = SingleActorFromTID (STACK(5), activator);
if (actor != NULL)
result = P_MoveThing(actor, STACK(4), STACK(3), STACK(2), !!STACK(1));
diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp
index 5ef5bc238..48d1fbaaa 100644
--- a/src/p_conversation.cpp
+++ b/src/p_conversation.cpp
@@ -348,7 +348,7 @@ static FStrifeDialogueNode *ReadTeaserNode (FWadLump *lump, DWORD &prevSpeakerTy
// The speaker's voice for this node, if any.
if (speech.VoiceNumber != 0)
{
- sprintf (fullsound, "svox/voc%lu", speech.VoiceNumber);
+ sprintf (fullsound, "svox/voc%u", speech.VoiceNumber);
node->SpeakerVoice = S_FindSound (fullsound);
}
else
@@ -442,7 +442,7 @@ static void ParseReplies (FStrifeDialogueReply **replyptr, Response *responses)
{
char moneystr[128];
- sprintf (moneystr, "%s for %lu", rsp->Reply, rsp->Count[0]);
+ sprintf (moneystr, "%s for %u", rsp->Reply, rsp->Count[0]);
reply->Reply = copystring (moneystr);
reply->NeedsGold = true;
}
diff --git a/src/p_effect.cpp b/src/p_effect.cpp
index 022914cf5..de88f3a84 100644
--- a/src/p_effect.cpp
+++ b/src/p_effect.cpp
@@ -59,7 +59,7 @@ static int grey1, grey2, grey3, grey4, red, green, blue, yellow, black,
static const struct ColorList {
int *color;
- byte r, g, b;
+ BYTE r, g, b;
} Colors[] = {
{&grey1, 85, 85, 85 },
{&grey2, 171, 171, 171},
@@ -110,7 +110,7 @@ void P_ThinkParticles ()
prev = NULL;
while (i != NO_PARTICLE)
{
- byte oldtrans;
+ BYTE oldtrans;
particle = Particles + i;
i = particle->tnext;
diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp
index e4ae7921e..f62016ce4 100644
--- a/src/p_enemy.cpp
+++ b/src/p_enemy.cpp
@@ -287,7 +287,7 @@ bool P_CheckMeleeRange2 (AActor *actor)
// P_CheckMissileRange
//
//=============================================================================
-BOOL P_CheckMissileRange (AActor *actor)
+bool P_CheckMissileRange (AActor *actor)
{
fixed_t dist;
@@ -366,11 +366,11 @@ bool P_HitFriend(AActor * self)
// Move in the current direction,
// returns false if the move is blocked.
//
-BOOL P_Move (AActor *actor)
+bool P_Move (AActor *actor)
{
fixed_t tryx, tryy, deltax, deltay, origx, origy;
- BOOL try_ok;
+ bool try_ok;
int speed;
int movefactor = ORIG_FRICTION_FACTOR;
int friction = ORIG_FRICTION;
@@ -550,7 +550,7 @@ BOOL P_Move (AActor *actor)
//
//=============================================================================
-BOOL P_TryWalk (AActor *actor)
+bool P_TryWalk (AActor *actor)
{
if (!P_Move (actor))
{
@@ -699,7 +699,7 @@ struct avoiddropoff_t
fixed_t t_bbox[4];
} a;
-static BOOL PIT_AvoidDropoff(line_t *line)
+static bool PIT_AvoidDropoff(line_t *line)
{
if (line->backsector && // Ignore one-sided linedefs
a.t_bbox[BOXRIGHT] > line->bbox[BOXLEFT] &&
@@ -987,7 +987,7 @@ void P_RandomChaseDir (AActor *actor)
#define MONS_LOOK_RANGE (20*64*FRACUNIT)
#define MONS_LOOK_LIMIT 64
-BOOL P_LookForMonsters (AActor *actor)
+bool P_LookForMonsters (AActor *actor)
{
int count;
AActor *mo;
@@ -1120,7 +1120,7 @@ AActor *LookForTIDinBlock (AActor *lookee, int index)
//
//============================================================================
-BOOL P_LookForTID (AActor *actor, BOOL allaround)
+bool P_LookForTID (AActor *actor, INTBOOL allaround)
{
AActor *other;
@@ -1327,7 +1327,7 @@ AActor *LookForEnemiesInBlock (AActor *lookee, int index)
//
//============================================================================
-BOOL P_LookForEnemies (AActor *actor, BOOL allaround)
+bool P_LookForEnemies (AActor *actor, INTBOOL allaround)
{
AActor *other;
@@ -1372,7 +1372,7 @@ BOOL P_LookForEnemies (AActor *actor, BOOL allaround)
================
*/
-BOOL P_LookForPlayers (AActor *actor, BOOL allaround)
+bool P_LookForPlayers (AActor *actor, INTBOOL allaround)
{
int c;
int stop;
@@ -2003,7 +2003,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
&& !P_CheckSight (actor, actor->target, 0) )
{
bool lookForBetter = false;
- BOOL gotNew;
+ bool gotNew;
if (actor->flags3 & MF3_NOSIGHTCHECK)
{
actor->flags3 &= ~MF3_NOSIGHTCHECK;
diff --git a/src/p_enemy.h b/src/p_enemy.h
index 064455327..71ebf4dd7 100644
--- a/src/p_enemy.h
+++ b/src/p_enemy.h
@@ -22,10 +22,10 @@ extern fixed_t xspeed[8], yspeed[8];
bool P_HitFriend (AActor *self);
void P_NoiseAlert (AActor *target, AActor *emmiter, bool splash=false);
bool P_CheckMeleeRange2 (AActor *actor);
-BOOL P_Move (AActor *actor);
-BOOL P_TryWalk (AActor *actor);
+bool P_Move (AActor *actor);
+bool P_TryWalk (AActor *actor);
void P_NewChaseDir (AActor *actor);
-BOOL P_LookForPlayers (AActor *actor, BOOL allaround);
+bool P_LookForPlayers (AActor *actor, INTBOOL allaround);
AInventory *P_DropItem (AActor *source, const PClass *type, int special, int chance);
inline AInventory *P_DropItem (AActor *source, const char *type, int special, int chance)
{
@@ -58,6 +58,6 @@ bool A_SinkMobj (AActor *);
bool CheckBossDeath (AActor *);
int P_Massacre ();
-BOOL P_CheckMissileRange (AActor *actor);
+bool P_CheckMissileRange (AActor *actor);
#endif //__P_ENEMY_H__
diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp
index 6d45df12c..d8ebedc3e 100644
--- a/src/p_interaction.cpp
+++ b/src/p_interaction.cpp
@@ -176,7 +176,7 @@ void ClientObituary (AActor *self, AActor *inflictor, AActor *attacker)
const char *message;
const char *messagename;
char gendermessage[1024];
- BOOL friendly;
+ INTBOOL friendly;
int gender;
// No obituaries for non-players, voodoo dolls or when not wanted
@@ -1336,7 +1336,7 @@ void P_PoisonDamage (player_t *player, AActor *source, int damage,
*/
}
-BOOL CheckCheatmode ();
+bool CheckCheatmode ();
CCMD (kill)
{
diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp
index 14c8a189d..a3ed2e8ee 100644
--- a/src/p_lnspec.cpp
+++ b/src/p_lnspec.cpp
@@ -793,7 +793,7 @@ FUNC(LS_Teleport_Line)
return EV_SilentLineTeleport (ln, backSide, it, arg1, arg2);
}
-static void ThrustThingHelper (AActor *it, angle_t angle, int force, BOOL nolimit);
+static void ThrustThingHelper (AActor *it, angle_t angle, int force, INTBOOL nolimit);
FUNC(LS_ThrustThing)
// ThrustThing (angle, force, nolimit, tid)
{
@@ -814,7 +814,7 @@ FUNC(LS_ThrustThing)
return false;
}
-static void ThrustThingHelper (AActor *it, angle_t angle, int force, BOOL nolimit)
+static void ThrustThingHelper (AActor *it, angle_t angle, int force, INTBOOL nolimit)
{
angle >>= ANGLETOFINESHIFT;
it->momx += force * finecosine[angle];
diff --git a/src/p_local.h b/src/p_local.h
index 22b1aeb7e..5fc02706c 100644
--- a/src/p_local.h
+++ b/src/p_local.h
@@ -162,7 +162,7 @@ typedef struct
extern TArray intercepts;
-typedef BOOL (*traverser_t) (intercept_t *in);
+typedef bool (*traverser_t) (intercept_t *in);
fixed_t P_AproxDistance (fixed_t dx, fixed_t dy);
@@ -218,8 +218,8 @@ extern fixed_t lowfloor;
void P_LineOpening (const line_t *linedef, fixed_t x, fixed_t y, fixed_t refx=FIXED_MIN, fixed_t refy=0);
-BOOL P_BlockLinesIterator (int x, int y, BOOL(*func)(line_t*));
-BOOL P_BlockThingsIterator (int x, int y, BOOL(*func)(AActor*), TArray &checkarray, AActor *start=NULL);
+bool P_BlockLinesIterator (int x, int y, bool(*func)(line_t*));
+bool P_BlockThingsIterator (int x, int y, bool(*func)(AActor*), TArray &checkarray, AActor *start=NULL);
#define PT_ADDLINES 1
@@ -228,14 +228,14 @@ BOOL P_BlockThingsIterator (int x, int y, BOOL(*func)(AActor*), TArray
extern divline_t trace;
-BOOL
+bool
P_PathTraverse
( fixed_t x1,
fixed_t y1,
fixed_t x2,
fixed_t y2,
int flags,
- BOOL (*trav) (intercept_t *));
+ bool (*trav) (intercept_t *));
AActor *P_BlockmapSearch (AActor *origin, int distance, AActor *(*func)(AActor *, int));
AActor *P_RoughMonsterSearch (AActor *mo, int distance);
@@ -246,7 +246,7 @@ AActor *P_RoughMonsterSearch (AActor *mo, int distance);
// If "floatok" true, move would be ok
// if within "tmfloorz - tmceilingz".
-extern BOOL floatok;
+extern bool floatok;
extern fixed_t tmfloorz;
extern fixed_t tmceilingz;
extern msecnode_t *sector_list; // phares 3/16/98
@@ -276,13 +276,13 @@ extern TArray spechit;
extern bool DoRipping;
extern AActor *LastRipped;
-BOOL P_TestMobjLocation (AActor *mobj);
+bool P_TestMobjLocation (AActor *mobj);
bool P_TestMobjZ (AActor *mobj, bool quick=true);
-BOOL P_CheckPosition (AActor *thing, fixed_t x, fixed_t y);
+bool P_CheckPosition (AActor *thing, fixed_t x, fixed_t y);
AActor *P_CheckOnmobj (AActor *thing);
void P_FakeZMovement (AActor *mo);
-BOOL P_TryMove (AActor* thing, fixed_t x, fixed_t y, BOOL dropoff, bool onfloor = false);
-BOOL P_TeleportMove (AActor* thing, fixed_t x, fixed_t y, fixed_t z, BOOL telefrag); // [RH] Added z and telefrag parameters
+bool P_TryMove (AActor* thing, fixed_t x, fixed_t y, bool dropoff, bool onfloor = false);
+bool P_TeleportMove (AActor* thing, fixed_t x, fixed_t y, fixed_t z, bool telefrag); // [RH] Added z and telefrag parameters
void P_PlayerStartStomp (AActor *actor); // [RH] Stomp on things for a newly spawned player
void P_SlideMove (AActor* mo, fixed_t tryx, fixed_t tryy, int numsteps);
bool P_BounceWall (AActor *mo);
@@ -322,7 +322,7 @@ void P_DelSeclist(msecnode_t *); // phares 3/16/98
void P_CreateSecNodeList(AActor*,fixed_t,fixed_t); // phares 3/14/98
int P_GetMoveFactor(const AActor *mo, int *frictionp); // phares 3/6/98
int P_GetFriction(const AActor *mo, int *frictionfactor);
-BOOL Check_Sides(AActor *, int, int); // phares
+bool Check_Sides(AActor *, int, int); // phares
// [RH]
bool P_CheckSlopeWalk (AActor *actor, fixed_t &xmove, fixed_t &ymove);
@@ -330,7 +330,7 @@ bool P_CheckSlopeWalk (AActor *actor, fixed_t &xmove, fixed_t &ymove);
//
// P_SETUP
//
-extern byte* rejectmatrix; // for fast sight rejection
+extern BYTE* rejectmatrix; // for fast sight rejection
extern int* blockmaplump; // offsets in blockmap are from here
extern int* blockmap;
extern int bmapwidth;
@@ -406,12 +406,12 @@ public:
private:
DRotatePoly ();
- friend bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle, int direction, BOOL overRide);
+ friend bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle, int direction, bool overRide);
};
-bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle, int direction, BOOL overRide);
+bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle, int direction, bool overRide);
-bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle, int direction, BOOL overRide);
+bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle, int direction, bool overRide);
class DMovePoly : public DPolyAction
{
@@ -426,10 +426,10 @@ protected:
fixed_t m_xSpeed; // for sliding walls
fixed_t m_ySpeed;
- friend bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle, fixed_t dist, BOOL overRide);
+ friend bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle, fixed_t dist, bool overRide);
};
-bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle, fixed_t dist, BOOL overRide);
+bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle, fixed_t dist, bool overRide);
class DPolyDoor : public DMovePoly
{
@@ -485,10 +485,10 @@ extern int po_NumPolyobjs;
extern polyspawns_t *polyspawns; // [RH] list of polyobject things to spawn
-BOOL PO_MovePolyobj (int num, int x, int y);
-BOOL PO_RotatePolyobj (int num, angle_t angle);
+bool PO_MovePolyobj (int num, int x, int y);
+bool PO_RotatePolyobj (int num, angle_t angle);
void PO_Init ();
-BOOL PO_Busy (int polyobj);
+bool PO_Busy (int polyobj);
//
// P_SPEC
diff --git a/src/p_map.cpp b/src/p_map.cpp
index e6d677db1..44717f3c3 100644
--- a/src/p_map.cpp
+++ b/src/p_map.cpp
@@ -86,7 +86,7 @@ static FRandom pr_crunch ("DoCrunch");
// If "floatok" true, move would be ok
// if within "tmfloorz - tmceilingz".
-BOOL floatok;
+bool floatok;
fixed_t tmfloorz;
fixed_t tmceilingz;
@@ -137,7 +137,7 @@ AActor *LastRipped;
//
//==========================================================================
-static BOOL PIT_FindFloorCeiling (line_t *ld)
+static bool PIT_FindFloorCeiling (line_t *ld)
{
if (tmfbbox[BOXRIGHT] <= ld->bbox[BOXLEFT]
|| tmfbbox[BOXLEFT] >= ld->bbox[BOXRIGHT]
@@ -256,9 +256,9 @@ void P_FindFloorCeiling (AActor *actor)
//
// PIT_StompThing
//
-static BOOL StompAlwaysFrags;
+static bool StompAlwaysFrags;
-BOOL PIT_StompThing (AActor *thing)
+bool PIT_StompThing (AActor *thing)
{
fixed_t blockdist;
@@ -310,7 +310,7 @@ BOOL PIT_StompThing (AActor *thing)
// move was made, so the height checking I added for 1.13 could
// potentially erroneously indicate the move was okay if the thing
// was being teleported between two non-overlapping height ranges.
-BOOL P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, BOOL telefrag)
+bool P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefrag)
{
static TArray telebt;
@@ -424,7 +424,7 @@ BOOL P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, BOOL telefr
// Like P_TeleportMove, but it doesn't move anything, and only monsters and other
// players get telefragged.
//
-BOOL PIT_StompThing2 (AActor *thing)
+bool PIT_StompThing2 (AActor *thing)
{
fixed_t blockdist;
@@ -616,7 +616,7 @@ int P_GetMoveFactor (const AActor *mo, int *frictionp)
//
static // killough 3/26/98: make static
-BOOL PIT_CrossLine (line_t* ld)
+bool PIT_CrossLine (line_t* ld)
{
if (!(ld->flags & ML_TWOSIDED) ||
(ld->flags & (ML_BLOCKING|ML_BLOCKMONSTERS|ML_BLOCKEVERYTHING)))
@@ -635,7 +635,7 @@ BOOL PIT_CrossLine (line_t* ld)
//
static // killough 3/26/98: make static
-BOOL PIT_CheckLine (line_t *ld)
+bool PIT_CheckLine (line_t *ld)
{
bool rail = false;
@@ -812,11 +812,11 @@ BOOL PIT_CheckLine (line_t *ld)
static AActor *stepthing;
-BOOL PIT_CheckThing (AActor *thing)
+bool PIT_CheckThing (AActor *thing)
{
fixed_t topz;
fixed_t blockdist;
- BOOL solid;
+ bool solid;
int damage;
// don't clip against self
@@ -1106,7 +1106,7 @@ BOOL PIT_CheckThing (AActor *thing)
// sides of the blocking line. If so, return true, otherwise
// false.
-BOOL Check_Sides(AActor* actor, int x, int y)
+bool Check_Sides(AActor* actor, int x, int y)
{
int bx,by,xl,xh,yl,yh;
@@ -1145,7 +1145,7 @@ BOOL Check_Sides(AActor* actor, int x, int y)
//
//---------------------------------------------------------------------------
-BOOL PIT_CheckOnmobjZ (AActor *thing)
+bool PIT_CheckOnmobjZ (AActor *thing)
{
if (!(thing->flags & MF_SOLID))
{ // Can't hit thing
@@ -1201,7 +1201,7 @@ BOOL PIT_CheckOnmobjZ (AActor *thing)
//
//----------------------------------------------------------------------------
-BOOL P_TestMobjLocation (AActor *mobj)
+bool P_TestMobjLocation (AActor *mobj)
{
int flags;
@@ -1248,7 +1248,7 @@ BOOL P_TestMobjLocation (AActor *mobj)
// numspeciallines
// AActor *BlockingMobj = pointer to thing that blocked position (NULL if not
// blocked, or blocked by a line).
-BOOL P_CheckPosition (AActor *thing, fixed_t x, fixed_t y)
+bool P_CheckPosition (AActor *thing, fixed_t x, fixed_t y)
{
static TArray checkpbt;
@@ -1549,8 +1549,8 @@ static void CheckForPushSpecial (line_t *line, int side, AActor *mobj)
// Attempt to move to a new position,
// crossing special lines unless MF_TELEPORT is set.
//
-BOOL P_TryMove (AActor *thing, fixed_t x, fixed_t y,
- BOOL dropoff, // killough 3/15/98: allow dropoff as option
+bool P_TryMove (AActor *thing, fixed_t x, fixed_t y,
+ bool dropoff, // killough 3/15/98: allow dropoff as option
bool onfloor) // [RH] Let P_TryMove keep the thing on the floor
{
fixed_t oldx;
@@ -1897,7 +1897,7 @@ AActor* slidemo;
fixed_t tmxmove;
fixed_t tmymove;
-extern BOOL onground;
+extern bool onground;
//
@@ -1915,7 +1915,7 @@ void P_HitSlideLine (line_t* ld)
angle_t deltaangle;
fixed_t movelen;
- BOOL icyfloor; // is floor icy? // phares
+ bool icyfloor; // is floor icy? // phares
// |
// Under icy conditions, if the angle of approach to the wall // V
// is more than 45 degrees, then you'll bounce and lose half
@@ -2042,7 +2042,7 @@ void P_HitSlideLine (line_t* ld)
//
// PTR_SlideTraverse
//
-BOOL PTR_SlideTraverse (intercept_t* in)
+bool PTR_SlideTraverse (intercept_t* in)
{
line_t* li;
@@ -2329,7 +2329,7 @@ bool P_CheckSlopeWalk (AActor *actor, fixed_t &xmove, fixed_t &ymove)
//
//============================================================================
-BOOL PTR_BounceTraverse (intercept_t *in)
+bool PTR_BounceTraverse (intercept_t *in)
{
line_t *li;
@@ -2509,7 +2509,7 @@ static fixed_t bottompitch;
// PTR_AimTraverse
// Sets linetaget and aimpitch when a target is aimed at.
//
-BOOL PTR_AimTraverse (intercept_t* in)
+bool PTR_AimTraverse (intercept_t* in)
{
line_t* li;
AActor* th;
@@ -3135,7 +3135,7 @@ void P_AimCamera (AActor *t1)
AActor *usething;
bool foundline;
-BOOL PTR_UseTraverse (intercept_t *in)
+bool PTR_UseTraverse (intercept_t *in)
{
// [RH] Check for things to talk with or use a puzzle item on
if (!in->isaline)
@@ -3259,7 +3259,7 @@ blocked:
// by Lee Killough
//
-BOOL PTR_NoWayTraverse (intercept_t *in)
+bool PTR_NoWayTraverse (intercept_t *in)
{
line_t *ld = in->d.line;
@@ -3327,7 +3327,7 @@ static AActor *PuzzleItemUser;
static int PuzzleItemType;
static bool PuzzleActivated;
-BOOL PTR_PuzzleItemTraverse (intercept_t *in)
+bool PTR_PuzzleItemTraverse (intercept_t *in)
{
AActor *mobj;
@@ -3434,7 +3434,7 @@ CUSTOM_CVAR (Float, splashfactor, 1.f, CVAR_SERVERINFO)
selfthrustscale = 1.f / self;
}
-BOOL PIT_RadiusAttack (AActor *thing)
+bool PIT_RadiusAttack (AActor *thing)
{
if (!(thing->flags & MF_SHOOTABLE) )
return true;
@@ -3657,9 +3657,9 @@ EXTERN_CVAR (Int, cl_bloodtype)
//
//=============================================================================
-BOOL P_AdjustFloorCeil (AActor *thing)
+bool P_AdjustFloorCeil (AActor *thing)
{
- BOOL isgood = P_CheckPosition (thing, thing->x, thing->y);
+ bool isgood = P_CheckPosition (thing, thing->x, thing->y);
thing->floorz = tmfloorz;
thing->ceilingz = tmceilingz;
thing->dropoffz = tmdropoffz; // killough 11/98: remember dropoffs
@@ -3676,7 +3676,7 @@ BOOL P_AdjustFloorCeil (AActor *thing)
//
//=============================================================================
-BOOL PIT_FindAboveIntersectors (AActor *thing)
+bool PIT_FindAboveIntersectors (AActor *thing)
{
if (!(thing->flags & MF_SOLID))
{ // Can't hit thing
@@ -3709,7 +3709,7 @@ BOOL PIT_FindAboveIntersectors (AActor *thing)
//
//=============================================================================
-BOOL PIT_FindBelowIntersectors (AActor *thing)
+bool PIT_FindBelowIntersectors (AActor *thing)
{
if (!(thing->flags & MF_SOLID))
{ // Can't hit thing
@@ -4153,7 +4153,7 @@ void PIT_CeilingLower (AActor *thing)
void PIT_CeilingRaise (AActor *thing)
{
- BOOL isgood = P_AdjustFloorCeil (thing);
+ bool isgood = P_AdjustFloorCeil (thing);
// For DOOM compatibility, only move things that are inside the floor.
// (or something else?) Things marked as hanging from the ceiling will
@@ -4438,7 +4438,7 @@ void P_DelSeclist (msecnode_t *node)
// blocking lines.
//=============================================================================
-BOOL PIT_GetSectors (line_t *ld)
+bool PIT_GetSectors (line_t *ld)
{
if (tmbbox[BOXRIGHT] <= ld->bbox[BOXLEFT] ||
tmbbox[BOXLEFT] >= ld->bbox[BOXRIGHT] ||
diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp
index 423a7e9e6..3239485e1 100644
--- a/src/p_maputl.cpp
+++ b/src/p_maputl.cpp
@@ -550,7 +550,7 @@ sector_t *AActor::LinkToWorldForMapThing ()
num = (SQWORD)(x-ldef->v1->x)*ldef->dx+(SQWORD)(y-ldef->v1->y)*ldef->dy;
if (num >= 0 && num <= den)
{
- DPrintf ("%s at (%ld,%ld) lies directly on line %d\n",
+ DPrintf ("%s at (%d,%d) lies directly on line %d\n",
this->GetClass()->TypeName.GetChars(), x>>FRACBITS, y>>FRACBITS, ldef-lines);
angle_t finean = R_PointToAngle2 (0, 0, ldef->dx, ldef->dy);
if (ldef->backsector != NULL && ldef->backsector == ssec->sector)
@@ -635,7 +635,7 @@ void FBlockNode::Release ()
//
extern polyblock_t **PolyBlockMap;
-BOOL P_BlockLinesIterator (int x, int y, BOOL(*func)(line_t*))
+bool P_BlockLinesIterator (int x, int y, bool(*func)(line_t*))
{
if (x<0 || y<0 || x>=bmapwidth || y>=bmapheight)
{
@@ -702,7 +702,7 @@ BOOL P_BlockLinesIterator (int x, int y, BOOL(*func)(line_t*))
// P_BlockThingsIterator
//
-BOOL P_BlockThingsIterator (int x, int y, BOOL(*func)(AActor*), TArray &checkarray, AActor *actor)
+bool P_BlockThingsIterator (int x, int y, bool(*func)(AActor*), TArray &checkarray, AActor *actor)
{
if ((unsigned int)x >= (unsigned int)bmapwidth ||
(unsigned int)y >= (unsigned int)bmapheight)
@@ -765,7 +765,7 @@ BOOL P_BlockThingsIterator (int x, int y, BOOL(*func)(AActor*), TArray
TArray intercepts (128);
divline_t trace;
-BOOL earlyout;
+INTBOOL earlyout;
int ptflags;
//
@@ -778,7 +778,7 @@ int ptflags;
// are on opposite sides of the trace.
// Returns true if earlyout and a solid line hit.
//
-BOOL PIT_AddLineIntercepts (line_t *ld)
+bool PIT_AddLineIntercepts (line_t *ld)
{
int s1;
int s2;
@@ -834,7 +834,7 @@ BOOL PIT_AddLineIntercepts (line_t *ld)
//
// PIT_AddThingIntercepts
//
-BOOL PIT_AddThingIntercepts (AActor* thing)
+bool PIT_AddThingIntercepts (AActor* thing)
{
int numfronts = 0;
divline_t line;
@@ -925,7 +925,7 @@ BOOL PIT_AddThingIntercepts (AActor* thing)
// Returns true if the traverser function returns true
// for all lines.
//
-BOOL P_TraverseIntercepts (traverser_t func, fixed_t maxfrac)
+bool P_TraverseIntercepts (traverser_t func, fixed_t maxfrac)
{
unsigned int count;
fixed_t dist;
@@ -970,7 +970,7 @@ BOOL P_TraverseIntercepts (traverser_t func, fixed_t maxfrac)
// Returns true if the traverser function returns true
// for all lines.
//
-BOOL P_PathTraverse (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags, BOOL (*trav) (intercept_t *))
+bool P_PathTraverse (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags, bool (*trav) (intercept_t *))
{
static TArray pathbt;
diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp
index 71537c7ef..998aa7153 100644
--- a/src/p_mobj.cpp
+++ b/src/p_mobj.cpp
@@ -427,12 +427,12 @@ AActor::AActor () throw()
AActor::AActor (const AActor &other) throw()
{
- memcpy (&x, &other.x, (byte *)&this[1] - (byte *)&x);
+ memcpy (&x, &other.x, (BYTE *)&this[1] - (BYTE *)&x);
}
AActor &AActor::operator= (const AActor &other)
{
- memcpy (&x, &other.x, (byte *)&this[1] - (byte *)&x);
+ memcpy (&x, &other.x, (BYTE *)&this[1] - (BYTE *)&x);
return *this;
}
@@ -2459,9 +2459,9 @@ void AActor::SetShade (int r, int g, int b)
void AActor::Tick ()
{
// [RH] Data for Heretic/Hexen scrolling sectors
- static const byte HexenScrollDirs[8] = { 64, 0, 192, 128, 96, 32, 224, 160 };
- static const char HexenSpeedMuls[3] = { 5, 10, 25 };
- static const char HexenScrollies[24][2] =
+ static const BYTE HexenScrollDirs[8] = { 64, 0, 192, 128, 96, 32, 224, 160 };
+ static const BYTE HexenSpeedMuls[3] = { 5, 10, 25 };
+ static const SBYTE HexenScrollies[24][2] =
{
{ 0, 1 }, { 0, 2 }, { 0, 4 },
{ -1, 0 }, { -2, 0 }, { -4, 0 },
@@ -2473,8 +2473,8 @@ void AActor::Tick ()
{ 1, -1 }, { 2, -2 }, { 4, -4 }
};
- static const byte HereticScrollDirs[4] = { 6, 9, 1, 4 };
- static const char HereticSpeedMuls[5] = { 5, 10, 25, 30, 35 };
+ static const BYTE HereticScrollDirs[4] = { 6, 9, 1, 4 };
+ static const BYTE HereticSpeedMuls[5] = { 5, 10, 25, 30, 35 };
AActor *onmo;
int i;
@@ -2670,7 +2670,7 @@ void AActor::Tick ()
scrolltype <= Carry_West35)
{ // Heretic scroll special
scrolltype -= Carry_East5;
- byte dir = HereticScrollDirs[scrolltype / 5];
+ BYTE dir = HereticScrollDirs[scrolltype / 5];
fixed_t carryspeed = DivScale32 (HereticSpeedMuls[scrolltype % 5], 32*CARRYFACTOR);
if (scrolltype<=Carry_East35 && !(i_compatflags&COMPATF_RAVENSCROLL))
{
@@ -2943,7 +2943,7 @@ void AActor::Tick ()
bool AActor::UpdateWaterLevel (fixed_t oldz)
{
- byte lastwaterlevel = waterlevel;
+ BYTE lastwaterlevel = waterlevel;
waterlevel = 0;
diff --git a/src/p_plats.cpp b/src/p_plats.cpp
index d04437b7a..02be48cd1 100644
--- a/src/p_plats.cpp
+++ b/src/p_plats.cpp
@@ -196,7 +196,7 @@ bool EV_DoPlat (int tag, line_t *line, DPlat::EPlatType type, int height,
int secnum;
sector_t *sec;
bool rtn = false;
- BOOL manual = false;
+ bool manual = false;
fixed_t newheight = 0;
vertex_t *spot;
diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp
index db1b09b0f..58517aa3f 100644
--- a/src/p_pspr.cpp
+++ b/src/p_pspr.cpp
@@ -691,7 +691,7 @@ void P_BulletSlope (AActor *mo)
//
// P_GunShot
//
-void P_GunShot (AActor *mo, BOOL accurate, const PClass *pufftype)
+void P_GunShot (AActor *mo, bool accurate, const PClass *pufftype)
{
angle_t angle;
int damage;
diff --git a/src/p_pspr.h b/src/p_pspr.h
index 8a12d680e..0553f3766 100644
--- a/src/p_pspr.h
+++ b/src/p_pspr.h
@@ -91,7 +91,7 @@ void P_FireWeapon (player_s *player);
void P_DropWeapon (player_s *player);
void P_BobWeapon (player_s *player, pspdef_t *psp, fixed_t *x, fixed_t *y);
void P_BulletSlope (AActor *mo);
-void P_GunShot (AActor *mo, BOOL accurate, const PClass *pufftype);
+void P_GunShot (AActor *mo, bool accurate, const PClass *pufftype);
void A_WeaponReady (AActor *actor);
void A_ReFire (AActor *actor);
diff --git a/src/p_setup.cpp b/src/p_setup.cpp
index 1824d5149..cbac55f4f 100644
--- a/src/p_setup.cpp
+++ b/src/p_setup.cpp
@@ -164,7 +164,7 @@ FBlockNode** blocklinks; // for thing chains
// Without special effect, this could be
// used as a PVS lookup as well.
//
-byte* rejectmatrix;
+BYTE* rejectmatrix;
static bool ForceNodeBuild;
@@ -765,8 +765,8 @@ static void P_LoadZNodes (FileReader &dalump, DWORD id)
void P_LoadSegs (MapData * map)
{
int i;
- byte *data;
- byte *vertchanged = new byte[numvertexes]; // phares 10/4/98
+ BYTE *data;
+ BYTE *vertchanged = new BYTE[numvertexes]; // phares 10/4/98
DWORD segangle;
line_t* line; // phares 10/4/98
int ptp_angle; // phares 10/4/98
@@ -793,7 +793,7 @@ void P_LoadSegs (MapData * map)
segs = new seg_t[numsegs];
memset (segs, 0, numsegs*sizeof(seg_t));
- data = new byte[lumplen];
+ data = new BYTE[lumplen];
map->Read(ML_SEGS, data);
// phares: 10/4/98: Vertchanged is an array that represents the vertices.
@@ -987,7 +987,7 @@ void P_LoadSubsectors (MapData * map)
if (subsectors[i].firstline >= maxseg)
{
- Printf ("Subsector %d contains invalid segs %lu-%lu\n"
+ Printf ("Subsector %d contains invalid segs %u-%u\n"
"The BSP will be rebuilt.\n", i, subsectors[i].firstline,
subsectors[i].firstline + subsectors[i].numlines - 1);
ForceNodeBuild = true;
@@ -997,7 +997,7 @@ void P_LoadSubsectors (MapData * map)
}
else if (subsectors[i].firstline + subsectors[i].numlines > maxseg)
{
- Printf ("Subsector %d contains invalid segs %lu-%lu\n"
+ Printf ("Subsector %d contains invalid segs %u-%u\n"
"The BSP will be rebuilt.\n", i, maxseg,
subsectors[i].firstline + subsectors[i].numlines - 1);
ForceNodeBuild = true;
@@ -1268,7 +1268,7 @@ void P_LoadThings (MapData * map, int position)
//
//===========================================================================
-static void P_SlopeLineToPoint (int lineid, fixed_t x, fixed_t y, fixed_t z, BOOL slopeCeil)
+static void P_SlopeLineToPoint (int lineid, fixed_t x, fixed_t y, fixed_t z, bool slopeCeil)
{
int linenum = -1;
@@ -1344,7 +1344,7 @@ static void P_SlopeLineToPoint (int lineid, fixed_t x, fixed_t y, fixed_t z, BOO
//
//===========================================================================
-static void P_CopyPlane (int tag, fixed_t x, fixed_t y, BOOL copyCeil)
+static void P_CopyPlane (int tag, fixed_t x, fixed_t y, bool copyCeil)
{
sector_t *dest = R_PointInSubsector (x, y)->sector;
sector_t *source;
@@ -1376,7 +1376,7 @@ static void P_CopyPlane (int tag, fixed_t x, fixed_t y, BOOL copyCeil)
//
//===========================================================================
-void P_SetSlope (secplane_t *plane, BOOL setCeil, int xyangi, int zangi,
+void P_SetSlope (secplane_t *plane, bool setCeil, int xyangi, int zangi,
fixed_t x, fixed_t y, fixed_t z)
{
angle_t xyang;
@@ -2703,7 +2703,7 @@ void P_LoadBlockMap (MapData * map)
}
else
{
- byte * data = new byte[count];
+ BYTE *data = new BYTE[count];
map->Read(ML_BLOCKMAP, data);
const short *wadblockmaplump = (short *)data;
int i;
@@ -3019,11 +3019,7 @@ static void P_GroupLines (bool buildmap)
Printf ("---Group Lines Times---\n");
for (i = 0; i < 7; ++i)
{
-#ifdef _MSC_VER
- Printf (" time %d:%10I64u\n", i, times[i]);
-#else
- Printf (" time %d:%10lu\n", i, times[i]);
-#endif
+ Printf (" time %d:%10llu\n", i, times[i]);
}
}
}
@@ -3743,11 +3739,7 @@ void P_SetupLevel (char *lumpname, int position)
"init polys",
"precache"
};
-#ifdef _MSC_VER
- Printf ("Time%3d:%10I64u cycles (%s)\n", i, times[i], timenames[i]);
-#else
- Printf ("Time%3d:%10lu cycles (%s)\n", i, times[i], timenames[i]);
-#endif
+ Printf ("Time%3d:%10llu cycles (%s)\n", i, times[i], timenames[i]);
}
}
}
@@ -3795,7 +3787,7 @@ CCMD (lineloc)
{
Printf ("No such line\n");
}
- Printf ("(%ld,%ld) -> (%ld,%ld)\n", lines[linenum].v1->x >> FRACBITS,
+ Printf ("(%d,%d) -> (%d,%d)\n", lines[linenum].v1->x >> FRACBITS,
lines[linenum].v1->y >> FRACBITS,
lines[linenum].v2->x >> FRACBITS,
lines[linenum].v2->y >> FRACBITS);
diff --git a/src/p_sight.cpp b/src/p_sight.cpp
index 5adf53b8d..9b3718311 100644
--- a/src/p_sight.cpp
+++ b/src/p_sight.cpp
@@ -543,12 +543,14 @@ done:
return res;
}
-ADD_STAT (sight, out)
+ADD_STAT (sight)
{
- sprintf (out, "%04.1f ms (%04.1f max), %5d %2d%4d%4d%4d%4d\n",
+ FString out;
+ out.Format ("%04.1f ms (%04.1f max), %5d %2d%4d%4d%4d%4d\n",
(double)SightCycles * 1000 * SecondsPerCycle,
(double)MaxSightCycles * 1000 * SecondsPerCycle,
sightcounts[3], sightcounts[0], sightcounts[1], sightcounts[2], sightcounts[4], sightcounts[5]);
+ return out;
}
void P_ResetSightCounters (bool full)
diff --git a/src/p_spec.cpp b/src/p_spec.cpp
index a580056cb..f99cabb5e 100644
--- a/src/p_spec.cpp
+++ b/src/p_spec.cpp
@@ -180,12 +180,12 @@ int P_FindLineFromID (int id, int start)
//
//============================================================================
-BOOL P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
+bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
{
int lineActivation;
- BOOL repeat;
- BOOL buttonSuccess;
- byte special;
+ INTBOOL repeat;
+ INTBOOL buttonSuccess;
+ BYTE special;
if (!P_TestActivateLine (line, mo, side, activationType))
{
@@ -249,7 +249,7 @@ BOOL P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
//
//============================================================================
-BOOL P_TestActivateLine (line_t *line, AActor *mo, int side, int activationType)
+bool P_TestActivateLine (line_t *line, AActor *mo, int side, int activationType)
{
int lineActivation;
@@ -1589,7 +1589,7 @@ DPusher::DPusher (DPusher::EPusher type, line_t *l, int magnitude, int angle,
DPusher *tmpusher; // pusher structure for blockmap searches
-BOOL PIT_PushThing (AActor *thing)
+bool PIT_PushThing (AActor *thing)
{
if ((thing->flags2 & MF2_WINDTHRUST) && !(thing->flags & MF_NOCLIP))
{
diff --git a/src/p_spec.h b/src/p_spec.h
index 513ce5c67..dcb9151eb 100644
--- a/src/p_spec.h
+++ b/src/p_spec.h
@@ -135,10 +135,10 @@ protected:
int m_Y; // Y of point source if point pusher
int m_Affectee; // Number of affected sector
- friend BOOL PIT_PushThing (AActor *thing);
+ friend bool PIT_PushThing (AActor *thing);
};
-BOOL PIT_PushThing (AActor *thing);
+bool PIT_PushThing (AActor *thing);
inline FArchive &operator<< (FArchive &arc, DPusher::EPusher &type)
{
@@ -164,8 +164,8 @@ void P_SpawnSpecials (void);
void P_UpdateSpecials (void);
// when needed
-BOOL P_ActivateLine (line_t *ld, AActor *mo, int side, int activationType);
-BOOL P_TestActivateLine (line_t *ld, AActor *mo, int side, int activationType);
+bool P_ActivateLine (line_t *ld, AActor *mo, int side, int activationType);
+bool P_TestActivateLine (line_t *ld, AActor *mo, int side, int activationType);
void P_PlayerInSpecialSector (player_t *player);
void P_PlayerOnSpecialFlat (player_t *player, int floorType);
@@ -348,8 +348,8 @@ public:
void Serialize (FArchive &arc);
void Tick ();
protected:
- byte m_BaseLevel;
- byte m_Phase;
+ BYTE m_BaseLevel;
+ BYTE m_Phase;
private:
DPhased ();
DPhased (sector_t *sector, int baselevel);
@@ -382,7 +382,7 @@ void EV_StartLightFading (int tag, int value, int tics);
#define BUTTONTIME TICRATE // 1 second, in ticks.
-bool P_ChangeSwitchTexture (side_t *side, int useAgain, byte special, bool *quest=NULL);
+bool P_ChangeSwitchTexture (side_t *side, int useAgain, BYTE special, bool *quest=NULL);
void P_InitSwitchList ();
void P_ProcessSwitchDef ();
@@ -433,7 +433,7 @@ protected:
int m_Count;
EPlatState m_Status;
EPlatState m_OldStatus;
- BOOL m_Crush;
+ int m_Crush;
int m_Tag;
EPlatType m_Type;
@@ -931,8 +931,7 @@ bool EV_DoChange (line_t *line, EChange changetype, int tag);
//
bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, bool useFog, bool sourceFog, bool keepOrientation);
bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog, bool sourceFog, bool keepOrientation);
-bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id,
- BOOL reverse);
+bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id, INTBOOL reverse);
bool EV_TeleportOther (int other_tid, int dest_tid, bool fog);
bool EV_TeleportGroup (int group_tid, AActor *victim, int source_tid, int dest_tid, bool moveSource, bool fog);
bool EV_TeleportSector (int tag, int source_tid, int dest_tid, bool fog, int group_tid);
diff --git a/src/p_switch.cpp b/src/p_switch.cpp
index d5a82c905..c0ada71c7 100644
--- a/src/p_switch.cpp
+++ b/src/p_switch.cpp
@@ -217,7 +217,7 @@ void P_ProcessSwitchDef ()
char *picname;
FSwitchDef *def1, *def2;
SWORD picnum;
- byte max;
+ BYTE max;
bool quest = false;
def1 = def2 = NULL;
@@ -492,7 +492,7 @@ static int TryFindSwitch (SWORD texture)
// Function that changes wall texture.
// Tell it if switch is ok to use again (1=yes, it's a button).
//
-bool P_ChangeSwitchTexture (side_t *side, int useAgain, byte special, bool *quest)
+bool P_ChangeSwitchTexture (side_t *side, int useAgain, BYTE special, bool *quest)
{
DActiveButton::EWhere where;
short *texture;
diff --git a/src/p_teleport.cpp b/src/p_teleport.cpp
index b83a9b0aa..4ee8395ea 100644
--- a/src/p_teleport.cpp
+++ b/src/p_teleport.cpp
@@ -430,8 +430,7 @@ bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool
// [RH] Modified to support different source and destination ids.
// [RH] Modified some more to be accurate.
-bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id,
- BOOL reverse)
+bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id, INTBOOL reverse)
{
int i;
line_t *l;
diff --git a/src/p_terrain.cpp b/src/p_terrain.cpp
index 85c9fdaf8..9508de8ee 100644
--- a/src/p_terrain.cpp
+++ b/src/p_terrain.cpp
@@ -49,7 +49,7 @@
// MACROS ------------------------------------------------------------------
-#define SET_FIELD(type,val) *((type*)((byte *)fields + \
+#define SET_FIELD(type,val) *((type*)((BYTE *)fields + \
parser[keyword].u.Offset)) = val;
// TYPES -------------------------------------------------------------------
@@ -136,7 +136,7 @@ static void ParseFriction (int keyword, void *fields);
// PUBLIC DATA DEFINITIONS -------------------------------------------------
-TArrayTerrainTypes;
+TArray TerrainTypes;
TArray Splashes;
TArray Terrains;
@@ -270,7 +270,7 @@ void P_InitTerrainTypes ()
int lump;
int size;
- size = (TexMan.NumTextures()+1)*sizeof(byte);
+ size = (TexMan.NumTextures()+1)*sizeof(BYTE);
TerrainTypes.Resize(size);
memset (&TerrainTypes[0], 0, size);
@@ -590,7 +590,7 @@ static void GenericParse (FGenericParse *parser, const char **keywords,
case GEN_Byte:
SC_MustGetNumber ();
- SET_FIELD (byte, sc_Number);
+ SET_FIELD (BYTE, sc_Number);
break;
case GEN_Class:
diff --git a/src/p_terrain.h b/src/p_terrain.h
index 5c85021ad..98095e802 100644
--- a/src/p_terrain.h
+++ b/src/p_terrain.h
@@ -39,7 +39,7 @@
#include "tarray.h"
#include "name.h"
-extern TArray TerrainTypes;
+extern TArray TerrainTypes;
// at game start
void P_InitTerrainTypes ();
@@ -52,9 +52,9 @@ struct FSplashDef
const PClass *SmallSplash;
const PClass *SplashBase;
const PClass *SplashChunk;
- byte ChunkXVelShift;
- byte ChunkYVelShift;
- byte ChunkZVelShift;
+ BYTE ChunkXVelShift;
+ BYTE ChunkYVelShift;
+ BYTE ChunkZVelShift;
fixed_t ChunkBaseZVel;
fixed_t SmallSplashClip;
bool NoAlert;
diff --git a/src/p_trace.cpp b/src/p_trace.cpp
index f84a9dd64..ccb48e0a6 100644
--- a/src/p_trace.cpp
+++ b/src/p_trace.cpp
@@ -47,7 +47,7 @@ static fixed_t EnterDist;
static bool (*TraceCallback)(FTraceResults &res);
static DWORD TraceFlags;
-static BOOL PTR_TraceIterator (intercept_t *);
+static bool PTR_TraceIterator (intercept_t *);
static bool CheckSectorPlane (const sector_t *sector, bool checkFloor);
static bool EditTraceResult (DWORD flags, FTraceResults &res);
@@ -122,7 +122,7 @@ bool Trace (fixed_t x, fixed_t y, fixed_t z, sector_t *sector,
}
}
-static BOOL PTR_TraceIterator (intercept_t *in)
+static bool PTR_TraceIterator (intercept_t *in)
{
fixed_t hitx, hity, hitz;
fixed_t dist;
diff --git a/src/p_trace.h b/src/p_trace.h
index d2fa16603..291a5ecef 100644
--- a/src/p_trace.h
+++ b/src/p_trace.h
@@ -62,8 +62,8 @@ struct FTraceResults
AActor *Actor; // valid if hit an actor
line_t *Line; // valid if hit a line
- byte Side;
- byte Tier;
+ BYTE Side;
+ BYTE Tier;
ETraceResult HitType;
sector_t *CrossedWater;
};
diff --git a/src/p_user.cpp b/src/p_user.cpp
index 01e454578..1dec97db8 100644
--- a/src/p_user.cpp
+++ b/src/p_user.cpp
@@ -196,7 +196,7 @@ CCMD (playerclasses)
// 16 pixels of bob
#define MAXBOB 0x100000
-BOOL onground;
+bool onground;
// The player_s constructor. Since LogText is not a POD, we cannot just
// memset it all to 0.
@@ -1386,7 +1386,7 @@ void P_MovePlayer (player_t *player)
if (debugfile)
{
- fprintf (debugfile, "move player for pl %d%c: (%ld,%ld,%ld) (%ld,%ld) %d %d w%d [", player-players,
+ fprintf (debugfile, "move player for pl %d%c: (%d,%d,%d) (%d,%d) %d %d w%d [", player-players,
player->cheats&CF_PREDICTING?'p':' ',
player->mo->x, player->mo->y, player->mo->z,forwardmove, sidemove, movefactor, friction, player->mo->waterlevel);
msecnode_t *n = player->mo->touching_sectorlist;
@@ -1663,7 +1663,7 @@ void P_PlayerThink (player_t *player)
if (debugfile && !(player->cheats & CF_PREDICTING))
{
- fprintf (debugfile, "tic %d for pl %d: (%ld, %ld, %ld, %lu) b:%02x p:%d y:%d f:%d s:%d u:%d\n",
+ fprintf (debugfile, "tic %d for pl %d: (%d, %d, %d, %u) b:%02x p:%d y:%d f:%d s:%d u:%d\n",
gametic, player-players, player->mo->x, player->mo->y, player->mo->z,
player->mo->angle>>ANGLETOFINESHIFT, player->cmd.ucmd.buttons,
player->cmd.ucmd.pitch, player->cmd.ucmd.yaw, player->cmd.ucmd.forwardmove,
diff --git a/src/p_writemap.cpp b/src/p_writemap.cpp
index 99d8a95ef..b05066cd2 100644
--- a/src/p_writemap.cpp
+++ b/src/p_writemap.cpp
@@ -217,7 +217,7 @@ static int WriteNODES (FILE *file)
WORD child;
if ((size_t)nodes[i].children[j] & 1)
{
- child = NF_SUBSECTOR | WORD((subsector_t *)((byte *)nodes[i].children[j] - 1) - subsectors);
+ child = NF_SUBSECTOR | WORD((subsector_t *)((BYTE *)nodes[i].children[j] - 1) - subsectors);
}
else
{
diff --git a/src/p_xlat.cpp b/src/p_xlat.cpp
index 12a81805b..a938e6dc2 100644
--- a/src/p_xlat.cpp
+++ b/src/p_xlat.cpp
@@ -68,7 +68,7 @@ void P_TranslateLineDef (line_t *ld, maplinedef_t *mld)
short special = LittleShort(mld->special);
short tag = LittleShort(mld->tag);
DWORD flags = LittleShort(mld->flags);
- BOOL passthrough;
+ INTBOOL passthrough;
int i;
if (flags & ML_TRANSLUCENT_STRIFE)
diff --git a/src/po_man.cpp b/src/po_man.cpp
index 2846128eb..c43460b78 100644
--- a/src/po_man.cpp
+++ b/src/po_man.cpp
@@ -32,8 +32,8 @@
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
-BOOL PO_MovePolyobj (int num, int x, int y);
-BOOL PO_RotatePolyobj (int num, angle_t angle);
+bool PO_MovePolyobj (int num, int x, int y);
+bool PO_RotatePolyobj (int num, angle_t angle);
void PO_Init (void);
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
@@ -45,7 +45,7 @@ static void RotatePt (int an, fixed_t *x, fixed_t *y, fixed_t startSpotX,
fixed_t startSpotY);
static void UnLinkPolyobj (polyobj_t *po);
static void LinkPolyobj (polyobj_t *po);
-static BOOL CheckMobjBlocking (seg_t *seg, polyobj_t *po);
+static bool CheckMobjBlocking (seg_t *seg, polyobj_t *po);
static void InitBlockMap (void);
static void IterFindPolySegs (vertex_t *v1, vertex_t *v2, seg_t **segList);
static void SpawnPolyobj (int index, int tag, int type);
@@ -219,7 +219,7 @@ void DRotatePoly::Tick ()
bool EV_RotatePoly (line_t *line, int polyNum, int speed, int byteAngle,
- int direction, BOOL overRide)
+ int direction, bool overRide)
{
int mirror;
DRotatePoly *pe;
@@ -332,7 +332,7 @@ void DMovePoly::Tick ()
//==========================================================================
bool EV_MovePoly (line_t *line, int polyNum, int speed, angle_t angle,
- fixed_t dist, BOOL overRide)
+ fixed_t dist, bool overRide)
{
int mirror;
DMovePoly *pe;
@@ -757,7 +757,7 @@ static void UpdateSegBBox (seg_t *seg)
//
//==========================================================================
-BOOL PO_MovePolyobj (int num, int x, int y)
+bool PO_MovePolyobj (int num, int x, int y)
{
int count;
seg_t **segList;
@@ -860,7 +860,7 @@ static void RotatePt (int an, fixed_t *x, fixed_t *y, fixed_t startSpotX, fixed_
//
//==========================================================================
-BOOL PO_RotatePolyobj (int num, angle_t angle)
+bool PO_RotatePolyobj (int num, angle_t angle)
{
int count;
seg_t **segList;
@@ -868,7 +868,7 @@ BOOL PO_RotatePolyobj (int num, angle_t angle)
vertex_t *prevPts;
int an;
polyobj_t *po;
- BOOL blocked;
+ bool blocked;
if(!(po = GetPolyobj(num)))
{
@@ -1061,7 +1061,7 @@ static void LinkPolyobj (polyobj_t *po)
//
//==========================================================================
-static BOOL CheckMobjBlocking (seg_t *seg, polyobj_t *po)
+static bool CheckMobjBlocking (seg_t *seg, polyobj_t *po)
{
static TArray checker;
FBlockNode *block;
@@ -1070,7 +1070,7 @@ static BOOL CheckMobjBlocking (seg_t *seg, polyobj_t *po)
int left, right, top, bottom;
fixed_t tmbbox[4];
line_t *ld;
- BOOL blocked;
+ bool blocked;
ld = seg->linedef;
@@ -1244,7 +1244,7 @@ static void IterFindPolySegs (vertex_t *v1, vertex_t *v2p, seg_t **segList)
}
v2 = int(segs[j].v2 - vertexes);
}
- I_Error ("IterFindPolySegs: Non-closed Polyobj around (%ld,%ld).\n",
+ I_Error ("IterFindPolySegs: Non-closed Polyobj around (%d,%d).\n",
v1->x >> FRACBITS, v1->y >> FRACBITS);
}
@@ -1540,7 +1540,7 @@ void PO_Init (void)
//
//==========================================================================
-BOOL PO_Busy (int polyobj)
+bool PO_Busy (int polyobj)
{
polyobj_t *poly;
diff --git a/src/r_anim.cpp b/src/r_anim.cpp
index f8204d977..05ca83524 100644
--- a/src/r_anim.cpp
+++ b/src/r_anim.cpp
@@ -275,7 +275,7 @@ static void R_InitAnimDefs ()
else if (SC_Compare ("warp") || SC_Compare ("warp2"))
{
bool isflat = false;
- BOOL type2 = SC_Compare ("warp2"); // [GRB]
+ bool type2 = SC_Compare ("warp2"); // [GRB]
SC_MustGetString ();
if (SC_Compare ("flat"))
{
diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp
index 47b1956a5..9d5ad0c21 100644
--- a/src/r_bsp.cpp
+++ b/src/r_bsp.cpp
@@ -335,7 +335,7 @@ bool CopyPlaneIfValid (secplane_t *dest, const secplane_t *source, const secplan
sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec,
int *floorlightlevel, int *ceilinglightlevel,
- BOOL back)
+ bool back)
{
// [RH] allow per-plane lighting
if (floorlightlevel != NULL)
@@ -873,7 +873,7 @@ extern "C" const int checkcoord[12][4] =
};
-static BOOL R_CheckBBox (fixed_t *bspcoord) // killough 1/28/98: static
+static bool R_CheckBBox (fixed_t *bspcoord) // killough 1/28/98: static
{
int boxx;
int boxy;
@@ -979,7 +979,7 @@ static BOOL R_CheckBBox (fixed_t *bspcoord) // killough 1/28/98: static
void R_GetExtraLight (int *light, const secplane_t &plane, FExtraLight *el)
{
- byte *floodcolormap;
+ BYTE *floodcolormap;
int floodlight;
bool flooding;
vertex_t **triangle;
diff --git a/src/r_bsp.h b/src/r_bsp.h
index 17d6536cc..2a7469706 100644
--- a/src/r_bsp.h
+++ b/src/r_bsp.h
@@ -76,7 +76,7 @@ void R_ClearDrawSegs ();
void R_RenderBSPNode (void *node);
// killough 4/13/98: fake floors/ceilings for deep water / fake ceilings:
-sector_t *R_FakeFlat(sector_t *, sector_t *, int *, int *, BOOL);
+sector_t *R_FakeFlat(sector_t *, sector_t *, int *, int *, bool);
#endif
diff --git a/src/r_data.cpp b/src/r_data.cpp
index 767dc5f09..823259881 100644
--- a/src/r_data.cpp
+++ b/src/r_data.cpp
@@ -68,7 +68,7 @@ void R_DeinitBuildTiles();
// for global animation
bool* flatwarp;
-byte** warpedflats;
+BYTE** warpedflats;
int* flatwarpedwhen;
@@ -352,7 +352,7 @@ void FTextureManager::LoadHiresTex()
char src[9];
bool is32bit;
int width, height;
- int type,mode;
+ int type, mode;
lastLump = 0;
src[8] = '\0';
@@ -370,7 +370,7 @@ void FTextureManager::LoadHiresTex()
if (SC_Compare("wall")) type=FTexture::TEX_Wall, mode=FTextureManager::TEXMAN_Overridable;
else if (SC_Compare("flat")) type=FTexture::TEX_Flat, mode=FTextureManager::TEXMAN_Overridable;
else if (SC_Compare("sprite")) type=FTexture::TEX_Sprite, mode=0;
- else type = FTexture::TEX_Any;
+ else type = FTexture::TEX_Any, mode = 0;
sc_String[8]=0;
@@ -524,7 +524,7 @@ static struct FakeCmap {
} *fakecmaps;
size_t numfakecmaps;
int firstfakecmap;
-byte *realcolormaps;
+BYTE *realcolormaps;
int lastusedcolormap;
void R_SetDefaultColormap (const char *name)
diff --git a/src/r_data.h b/src/r_data.h
index 7dbb2ae94..18e9df4a2 100644
--- a/src/r_data.h
+++ b/src/r_data.h
@@ -519,7 +519,7 @@ void R_PrecacheLevel (void);
DWORD R_ColormapNumForName(const char *name); // killough 4/4/98
void R_SetDefaultColormap (const char *name); // [RH] change normal fadetable
DWORD R_BlendForColormap (DWORD map); // [RH] return calculated blend for a colormap
-extern byte *realcolormaps; // [RH] make the colormaps externally visible
+extern BYTE *realcolormaps; // [RH] make the colormaps externally visible
extern size_t numfakecmaps;
int R_FindSkin (const char *name, int pclass); // [RH] Find a skin
diff --git a/src/r_defs.h b/src/r_defs.h
index f851b8bff..abc69f5f0 100644
--- a/src/r_defs.h
+++ b/src/r_defs.h
@@ -303,7 +303,7 @@ struct sector_t
BYTE lightlevel;
AActor * SoundTarget;
- byte soundtraversed; // 0 = untraversed, 1,2 = sndlines -1
+ BYTE soundtraversed; // 0 = untraversed, 1,2 = sndlines -1
short special;
short tag;
@@ -425,8 +425,8 @@ struct line_s
vertex_t *v1, *v2; // vertices, from v1 to v2
fixed_t dx, dy; // precalculated v2 - v1 for side checking
DWORD flags;
- byte special; // [RH] specials are only one byte (like Hexen)
- byte alpha; // <--- translucency (0-255/255=opaque)
+ BYTE special; // [RH] specials are only one byte (like Hexen)
+ BYTE alpha; // <--- translucency (0-255/255=opaque)
short id; // <--- same as tag or set with Line_SetIdentification
int args[5]; // <--- hexen-style arguments (expanded to ZDoom's full width)
int firstid, nextid;
@@ -463,7 +463,7 @@ typedef struct msecnode_s
struct msecnode_s *m_tnext; // next msecnode_t for this thing
struct msecnode_s *m_sprev; // prev msecnode_t for this sector
struct msecnode_s *m_snext; // next msecnode_t for this sector
- BOOL visited; // killough 4/4/98, 4/7/98: used in search algorithms
+ bool visited; // killough 4/4/98, 4/7/98: used in search algorithms
} msecnode_t;
//
@@ -556,8 +556,8 @@ typedef struct polyblock_s
// posts are runs of non masked source pixels
struct post_s
{
- byte topdelta; // -1 is the last post in a column
- byte length; // length data bytes follows
+ BYTE topdelta; // -1 is the last post in a column
+ BYTE length; // length data bytes follows
};
typedef struct post_s post_t;
@@ -570,7 +570,7 @@ typedef post_t column_t;
// OTHER TYPES
//
-typedef byte lighttable_t; // This could be wider for >8 bit display.
+typedef BYTE lighttable_t; // This could be wider for >8 bit display.
// Patches.
// A patch holds one or more columns.
@@ -851,10 +851,10 @@ class FPlayerSkin
public:
char name[17]; // 16 chars + NULL
char face[3];
- byte gender; // This skin's gender (not really used)
- byte range0start;
- byte range0end;
- byte scale;
+ BYTE gender; // This skin's gender (not really used)
+ BYTE range0start;
+ BYTE range0end;
+ BYTE scale;
bool othergame; // [GRB]
int sprite;
int crouchsprite;
diff --git a/src/r_draw.cpp b/src/r_draw.cpp
index 1b213be5f..a1e4c8bbc 100644
--- a/src/r_draw.cpp
+++ b/src/r_draw.cpp
@@ -55,9 +55,9 @@ extern int ST_Y;
// and the total size == width*height*depth/8.,
//
-extern byte decorate_translations[];
+extern BYTE decorate_translations[];
-byte* viewimage;
+BYTE* viewimage;
extern "C" {
int viewwidth;
int halfviewwidth;
@@ -77,9 +77,9 @@ int detailyshift; // [RH] Y shift for vertical detail level
}
#ifdef USEASM
-extern "C" void STACK_ARGS DoubleHoriz_MMX (int height, int width, byte *dest, int pitch);
-extern "C" void STACK_ARGS DoubleHorizVert_MMX (int height, int width, byte *dest, int pitch);
-extern "C" void STACK_ARGS DoubleVert_ASM (int height, int width, byte *dest, int pitch);
+extern "C" void STACK_ARGS DoubleHoriz_MMX (int height, int width, BYTE *dest, int pitch);
+extern "C" void STACK_ARGS DoubleHorizVert_MMX (int height, int width, BYTE *dest, int pitch);
+extern "C" void STACK_ARGS DoubleVert_ASM (int height, int width, BYTE *dest, int pitch);
#endif
// [RH] Pointers to the different column drawers.
@@ -115,9 +115,9 @@ DWORD *dc_srcblend; // [RH] Source and destination
DWORD *dc_destblend; // blending lookups
// first pixel in a column (possibly virtual)
-const byte* dc_source;
+const BYTE* dc_source;
-byte* dc_dest;
+BYTE* dc_dest;
int dc_count;
DWORD vplce[4];
@@ -132,8 +132,8 @@ int dccount;
cycle_t DetailDoubleCycles;
int dc_fillcolor;
-byte *dc_translation;
-byte *translationtables[NUM_TRANSLATION_TABLES];
+BYTE *dc_translation;
+BYTE *translationtables[NUM_TRANSLATION_TABLES];
/************************************/
/* */
@@ -152,7 +152,7 @@ byte *translationtables[NUM_TRANSLATION_TABLES];
void R_DrawColumnP_C (void)
{
int count;
- byte* dest;
+ BYTE* dest;
fixed_t frac;
fixed_t fracstep;
@@ -173,8 +173,8 @@ void R_DrawColumnP_C (void)
{
// [RH] Get local copies of these variables so that the compiler
// has a better chance of optimizing this well.
- byte *colormap = dc_colormap;
- const byte *source = dc_source;
+ BYTE *colormap = dc_colormap;
+ const BYTE *source = dc_source;
int pitch = dc_pitch;
// Inner loop that does the actual texture mapping,
@@ -198,7 +198,7 @@ void R_DrawColumnP_C (void)
void R_FillColumnP (void)
{
int count;
- byte* dest;
+ BYTE* dest;
count = dc_count;
@@ -209,7 +209,7 @@ void R_FillColumnP (void)
{
int pitch = dc_pitch;
- byte color = dc_color;
+ BYTE color = dc_color;
do
{
@@ -296,7 +296,7 @@ void R_InitFuzzTable (int fuzzoff)
void R_DrawFuzzColumnP_C (void)
{
int count;
- byte *dest;
+ BYTE *dest;
// Adjust borders. Low...
if (dc_yl == 0)
@@ -323,7 +323,7 @@ void R_DrawFuzzColumnP_C (void)
int pitch = dc_pitch;
int fuzz = fuzzpos;
int cnt;
- byte *map = &NormalLight.Maps[6*256];
+ BYTE *map = &NormalLight.Maps[6*256];
// [RH] Split this into three separate loops to minimize
// the number of times fuzzpos needs to be clamped.
@@ -414,7 +414,7 @@ algorithm that uses RGB tables.
void R_DrawAddColumnP_C (void)
{
int count;
- byte *dest;
+ BYTE *dest;
fixed_t frac;
fixed_t fracstep;
@@ -430,8 +430,8 @@ void R_DrawAddColumnP_C (void)
{
DWORD *fg2rgb = dc_srcblend;
DWORD *bg2rgb = dc_destblend;
- byte *colormap = dc_colormap;
- const byte *source = dc_source;
+ BYTE *colormap = dc_colormap;
+ const BYTE *source = dc_source;
int pitch = dc_pitch;
do
@@ -460,7 +460,7 @@ void R_DrawAddColumnP_C (void)
void R_DrawTranslatedColumnP_C (void)
{
int count;
- byte* dest;
+ BYTE* dest;
fixed_t frac;
fixed_t fracstep;
@@ -475,9 +475,9 @@ void R_DrawTranslatedColumnP_C (void)
{
// [RH] Local copies of global vars to improve compiler optimizations
- byte *colormap = dc_colormap;
- byte *translation = dc_translation;
- const byte *source = dc_source;
+ BYTE *colormap = dc_colormap;
+ BYTE *translation = dc_translation;
+ const BYTE *source = dc_source;
int pitch = dc_pitch;
do
@@ -494,7 +494,7 @@ void R_DrawTranslatedColumnP_C (void)
void R_DrawTlatedAddColumnP_C (void)
{
int count;
- byte *dest;
+ BYTE *dest;
fixed_t frac;
fixed_t fracstep;
@@ -510,9 +510,9 @@ void R_DrawTlatedAddColumnP_C (void)
{
DWORD *fg2rgb = dc_srcblend;
DWORD *bg2rgb = dc_destblend;
- byte *translation = dc_translation;
- byte *colormap = dc_colormap;
- const byte *source = dc_source;
+ BYTE *translation = dc_translation;
+ BYTE *colormap = dc_colormap;
+ const BYTE *source = dc_source;
int pitch = dc_pitch;
do
@@ -535,7 +535,7 @@ void R_DrawTlatedAddColumnP_C (void)
void R_DrawShadedColumnP_C (void)
{
int count;
- byte *dest;
+ BYTE *dest;
fixed_t frac, fracstep;
count = dc_count;
@@ -549,8 +549,8 @@ void R_DrawShadedColumnP_C (void)
frac = dc_texturefrac;
{
- const byte *source = dc_source;
- byte *colormap = dc_colormap;
+ const BYTE *source = dc_source;
+ BYTE *colormap = dc_colormap;
int pitch = dc_pitch;
DWORD *fgstart = &Col2RGB8[0][dc_color];
@@ -571,7 +571,7 @@ void R_DrawShadedColumnP_C (void)
void R_DrawAddClampColumnP_C ()
{
int count;
- byte *dest;
+ BYTE *dest;
fixed_t frac;
fixed_t fracstep;
@@ -585,8 +585,8 @@ void R_DrawAddClampColumnP_C ()
frac = dc_texturefrac;
{
- byte *colormap = dc_colormap;
- const byte *source = dc_source;
+ BYTE *colormap = dc_colormap;
+ const BYTE *source = dc_source;
int pitch = dc_pitch;
DWORD *fg2rgb = dc_srcblend;
DWORD *bg2rgb = dc_destblend;
@@ -613,7 +613,7 @@ void R_DrawAddClampColumnP_C ()
void R_DrawAddClampTranslatedColumnP_C ()
{
int count;
- byte *dest;
+ BYTE *dest;
fixed_t frac;
fixed_t fracstep;
@@ -627,9 +627,9 @@ void R_DrawAddClampTranslatedColumnP_C ()
frac = dc_texturefrac;
{
- byte *translation = dc_translation;
- byte *colormap = dc_colormap;
- const byte *source = dc_source;
+ BYTE *translation = dc_translation;
+ BYTE *colormap = dc_colormap;
+ const BYTE *source = dc_source;
int pitch = dc_pitch;
DWORD *fg2rgb = dc_srcblend;
DWORD *bg2rgb = dc_destblend;
@@ -691,7 +691,7 @@ int ds_xbits;
int ds_ybits;
// start of a floor/ceiling tile image
-const byte* ds_source;
+const BYTE* ds_source;
// just for profiling
int dscount;
@@ -706,9 +706,9 @@ void R_DrawSpanP_C (void)
dsfixed_t yfrac;
dsfixed_t xstep;
dsfixed_t ystep;
- byte* dest;
- const byte* source = ds_source;
- const byte* colormap = ds_colormap;
+ BYTE* dest;
+ const BYTE* source = ds_source;
+ const BYTE* colormap = ds_colormap;
int count;
int spot;
@@ -777,9 +777,9 @@ void R_DrawSpanMaskedP_C (void)
dsfixed_t yfrac;
dsfixed_t xstep;
dsfixed_t ystep;
- byte* dest;
- const byte* source = ds_source;
- const byte* colormap = ds_colormap;
+ BYTE* dest;
+ const BYTE* source = ds_source;
+ const BYTE* colormap = ds_colormap;
int count;
int spot;
@@ -840,9 +840,9 @@ void R_DrawSpanTranslucentP_C (void)
dsfixed_t yfrac;
dsfixed_t xstep;
dsfixed_t ystep;
- byte* dest;
- const byte* source = ds_source;
- const byte* colormap = ds_colormap;
+ BYTE* dest;
+ const BYTE* source = ds_source;
+ const BYTE* colormap = ds_colormap;
int count;
int spot;
DWORD *fg2rgb = dc_srcblend;
@@ -900,9 +900,9 @@ void R_DrawSpanMaskedTranslucentP_C (void)
dsfixed_t yfrac;
dsfixed_t xstep;
dsfixed_t ystep;
- byte* dest;
- const byte* source = ds_source;
- const byte* colormap = ds_colormap;
+ BYTE* dest;
+ const BYTE* source = ds_source;
+ const BYTE* colormap = ds_colormap;
int count;
int spot;
DWORD *fg2rgb = dc_srcblend;
@@ -1603,8 +1603,8 @@ void R_InitTranslationTables ()
static void R_CreatePlayerTranslation (float h, float s, float v, FPlayerSkin *skin, BYTE *table, BYTE *alttable)
{
int i;
- byte start = skin->range0start;
- byte end = skin->range0end;
+ BYTE start = skin->range0start;
+ BYTE end = skin->range0end;
float r, g, b;
float bases, basev;
float sdelta, vdelta;
@@ -1890,7 +1890,7 @@ void R_DetailDouble ()
int rowsize = realviewwidth;
int pitch = RenderTarget->GetPitch();
int y;
- byte *line;
+ BYTE *line;
line = dc_destorg;
for (y = viewheight; y != 0; --y, line += pitch<<1)
@@ -1913,7 +1913,7 @@ void R_DetailDouble ()
int rowsize = viewwidth;
int pitch = RenderTarget->GetPitch();
int y,x;
- byte *linefrom, *lineto;
+ BYTE *linefrom, *lineto;
linefrom = dc_destorg;
for (y = viewheight; y != 0; --y, linefrom += pitch)
@@ -1921,7 +1921,7 @@ void R_DetailDouble ()
lineto = linefrom - viewwidth;
for (x = 0; x < rowsize; ++x)
{
- byte c = linefrom[x];
+ BYTE c = linefrom[x];
lineto[x*2] = c;
lineto[x*2+1] = c;
}
@@ -1942,7 +1942,7 @@ void R_DetailDouble ()
int realpitch = RenderTarget->GetPitch();
int pitch = realpitch << 1;
int y,x;
- byte *linefrom, *lineto;
+ BYTE *linefrom, *lineto;
linefrom = dc_destorg;
for (y = viewheight; y != 0; --y, linefrom += pitch)
@@ -1950,7 +1950,7 @@ void R_DetailDouble ()
lineto = linefrom - viewwidth;
for (x = 0; x < rowsize; ++x)
{
- byte c = linefrom[x];
+ BYTE c = linefrom[x];
lineto[x*2] = c;
lineto[x*2+1] = c;
lineto[x*2+realpitch] = c;
@@ -1964,9 +1964,11 @@ void R_DetailDouble ()
unclock (DetailDoubleCycles);
}
-ADD_STAT(detail,out)
+ADD_STAT(detail)
{
- sprintf (out, "doubling = %04.1f ms", (double)DetailDoubleCycles * 1000 * SecondsPerCycle);
+ FString out;
+ out.Format ("doubling = %04.1f ms", (double)DetailDoubleCycles * 1000 * SecondsPerCycle);
+ return out;
}
// [RH] Initialize the column drawer pointers
diff --git a/src/r_draw.h b/src/r_draw.h
index a72d12725..74be88219 100644
--- a/src/r_draw.h
+++ b/src/r_draw.h
@@ -42,9 +42,9 @@ extern "C" DWORD *dc_srcblend;
extern "C" DWORD *dc_destblend;
// first pixel in a column
-extern "C" const byte* dc_source;
+extern "C" const BYTE* dc_source;
-extern "C" byte *dc_dest, *dc_destorg;
+extern "C" BYTE *dc_dest, *dc_destorg;
extern "C" int dc_count;
extern "C" DWORD vplce[4];
@@ -53,7 +53,7 @@ extern "C" BYTE* palookupoffse[4];
extern "C" const BYTE* bufplce[4];
// [RH] Temporary buffer for column drawing
-extern "C" byte dc_temp[MAXHEIGHT*4];
+extern "C" BYTE dc_temp[MAXHEIGHT*4];
extern "C" unsigned int dc_tspans[4][MAXHEIGHT];
extern "C" unsigned int *dc_ctspan[4];
extern "C" unsigned int horizspans[4];
@@ -197,7 +197,7 @@ extern "C" int ds_ybits;
extern "C" fixed_t ds_alpha;
// start of a 64*64 tile image
-extern "C" const byte* ds_source;
+extern "C" const BYTE* ds_source;
extern "C" int ds_color; // [RH] For flat color (no texturing)
@@ -216,8 +216,8 @@ enum
NUM_TRANSLATION_TABLES
};
-extern byte* translationtables[NUM_TRANSLATION_TABLES];
-extern byte* dc_translation;
+extern BYTE* translationtables[NUM_TRANSLATION_TABLES];
+extern BYTE* dc_translation;
inline WORD TRANSLATION(BYTE a, BYTE b)
{
@@ -274,12 +274,12 @@ bool R_GetTransMaskDrawers (fixed_t (**tmvline1)(), void (**tmvline4)());
// to just use the texture's GetColumn() method. It just exists
// for double-layer skies.
const BYTE *R_GetColumn (FTexture *tex, int col);
-void wallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixed_t *lwal, const byte *(*getcol)(FTexture *tex, int col)=R_GetColumn);
+void wallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixed_t *lwal, const BYTE *(*getcol)(FTexture *tex, int col)=R_GetColumn);
// maskwallscan is exactly like wallscan but does not draw anything where the texture is color 0.
-void maskwallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixed_t *lwal, const byte *(*getcol)(FTexture *tex, int col)=R_GetColumn);
+void maskwallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixed_t *lwal, const BYTE *(*getcol)(FTexture *tex, int col)=R_GetColumn);
// transmaskwallscan is like maskwallscan, but it can also blend to the background
-void transmaskwallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixed_t *lwal, const byte *(*getcol)(FTexture *tex, int col)=R_GetColumn);
+void transmaskwallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixed_t *lwal, const BYTE *(*getcol)(FTexture *tex, int col)=R_GetColumn);
#endif
diff --git a/src/r_drawt.cpp b/src/r_drawt.cpp
index 611f9d7b6..89b9b967d 100644
--- a/src/r_drawt.cpp
+++ b/src/r_drawt.cpp
@@ -54,7 +54,7 @@
// dc_ctspan points into dc_tspans.
// But what is horizspan, and what is its relation with dc_ctspan?
-byte dc_temp[MAXHEIGHT*4];
+BYTE dc_temp[MAXHEIGHT*4];
unsigned int dc_tspans[4][MAXHEIGHT];
unsigned int *dc_ctspan[4];
unsigned int *horizspan[4];
@@ -63,8 +63,8 @@ unsigned int *horizspan[4];
// Copies one span at hx to the screen at sx.
void rt_copy1col_c (int hx, int sx, int yl, int yh)
{
- byte *source;
- byte *dest;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -137,9 +137,9 @@ void rt_copy4cols_c (int sx, int yl, int yh)
// Maps one span at hx to the screen at sx.
void rt_map1col_c (int hx, int sx, int yl, int yh)
{
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -172,9 +172,9 @@ void rt_map1col_c (int hx, int sx, int yl, int yh)
// Maps all four spans to the screen starting at sx.
void rt_map4cols_c (int sx, int yl, int yh)
{
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -217,10 +217,10 @@ void rt_map4cols_c (int sx, int yl, int yh)
// Translates one span at hx to the screen at sx.
void rt_tlate1col (int hx, int sx, int yl, int yh)
{
- byte *translation;
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *translation;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -245,10 +245,10 @@ void rt_tlate1col (int hx, int sx, int yl, int yh)
// Translates all four spans to the screen starting at sx.
void rt_tlate4cols (int sx, int yl, int yh)
{
- byte *translation;
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *translation;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -276,9 +276,9 @@ void rt_tlate4cols (int sx, int yl, int yh)
// Adds one span at hx to the screen at sx without clamping.
void rt_add1col (int hx, int sx, int yl, int yh)
{
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -310,9 +310,9 @@ void rt_add1col (int hx, int sx, int yl, int yh)
// Adds all four spans to the screen starting at sx without clamping.
void rt_add4cols (int sx, int yl, int yh)
{
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -366,10 +366,10 @@ void rt_add4cols (int sx, int yl, int yh)
// Translates and adds one span at hx to the screen at sx without clamping.
void rt_tlateadd1col (int hx, int sx, int yl, int yh)
{
- byte *translation;
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *translation;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -402,10 +402,10 @@ void rt_tlateadd1col (int hx, int sx, int yl, int yh)
// Translates and adds all four spans to the screen starting at sx without clamping.
void rt_tlateadd4cols (int sx, int yl, int yh)
{
- byte *translation;
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *translation;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -461,9 +461,9 @@ void rt_tlateadd4cols (int sx, int yl, int yh)
void rt_shaded1col (int hx, int sx, int yl, int yh)
{
DWORD *fgstart;
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -493,9 +493,9 @@ void rt_shaded4cols (int sx, int yl, int yh)
{
BYTE fill;
DWORD *fgstart;
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -572,9 +572,9 @@ void rt_shaded4cols (int sx, int yl, int yh)
// Adds one span at hx to the screen at sx with clamping.
void rt_addclamp1col (int hx, int sx, int yl, int yh)
{
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -608,9 +608,9 @@ void rt_addclamp1col (int hx, int sx, int yl, int yh)
// Adds all four spans to the screen starting at sx with clamping.
void rt_addclamp4cols (int sx, int yl, int yh)
{
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -672,10 +672,10 @@ void rt_addclamp4cols (int sx, int yl, int yh)
// Translates and adds one span at hx to the screen at sx with clamping.
void rt_tlateaddclamp1col (int hx, int sx, int yl, int yh)
{
- byte *translation;
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *translation;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -710,10 +710,10 @@ void rt_tlateaddclamp1col (int hx, int sx, int yl, int yh)
// Translates and adds all four spans to the screen starting at sx with clamping.
void rt_tlateaddclamp4cols (int sx, int yl, int yh)
{
- byte *translation;
- byte *colormap;
- byte *source;
- byte *dest;
+ BYTE *translation;
+ BYTE *colormap;
+ BYTE *source;
+ BYTE *dest;
int count;
int pitch;
@@ -925,7 +925,7 @@ void rt_initcols (void)
void R_DrawColumnHorizP_C (void)
{
int count = dc_count;
- byte *dest;
+ BYTE *dest;
fixed_t fracstep;
fixed_t frac;
@@ -946,7 +946,7 @@ void R_DrawColumnHorizP_C (void)
frac = dc_texturefrac;
{
- const byte *source = dc_source;
+ const BYTE *source = dc_source;
if (count & 1) {
*dest = source[frac>>FRACBITS];
@@ -1001,8 +1001,8 @@ void R_DrawColumnHorizP_C (void)
void R_FillColumnHorizP (void)
{
int count = dc_count;
- byte color = dc_color;
- byte *dest;
+ BYTE color = dc_color;
+ BYTE *dest;
if (count <= 0)
return;
diff --git a/src/r_main.cpp b/src/r_main.cpp
index 1e8e3edab..8d97308bf 100644
--- a/src/r_main.cpp
+++ b/src/r_main.cpp
@@ -2044,10 +2044,12 @@ FArchive &operator << (FArchive &arc, FActiveInterpolation *&interp)
return arc;
}
-ADD_STAT (interpolations, out)
+ADD_STAT (interpolations)
{
int inuse, minuse, maxuse, total;
+ FString out;
total = FActiveInterpolation::CountInterpolations (&inuse, &minuse, &maxuse);
- sprintf (out, "%d interpolations buckets:%3d min:%3d max:%3d avg:%3d %d%% full %d%% buckfull",
+ out.Format ("%d interpolations buckets:%3d min:%3d max:%3d avg:%3d %d%% full %d%% buckfull",
total, inuse, minuse, maxuse, inuse?total/inuse:0, total*100/INTERPOLATION_BUCKETS, inuse*100/INTERPOLATION_BUCKETS);
+ return out;
}
diff --git a/src/r_main.h b/src/r_main.h
index 99f483cb2..c628bf6f6 100644
--- a/src/r_main.h
+++ b/src/r_main.h
@@ -70,7 +70,7 @@ extern fixed_t centeryfrac;
extern fixed_t yaspectmul;
extern float iyaspectmulfloat;
-extern byte* basecolormap; // [RH] Colormap for sector currently being drawn
+extern BYTE* basecolormap; // [RH] Colormap for sector currently being drawn
extern int validcount;
diff --git a/src/r_plane.cpp b/src/r_plane.cpp
index 7aa2f977e..ee25f2c53 100644
--- a/src/r_plane.cpp
+++ b/src/r_plane.cpp
@@ -118,7 +118,7 @@ extern "C" {
// spanend holds the end of a plane span in each screen row
//
short spanend[MAXHEIGHT];
-byte *tiltlighting[MAXWIDTH];
+BYTE *tiltlighting[MAXWIDTH];
int planeshade;
vec3_t plane_sz, plane_su, plane_sv;
@@ -135,11 +135,11 @@ static DWORD xstepscale, ystepscale;
static DWORD basexfrac, baseyfrac;
#ifdef USEASM
-extern "C" void R_SetSpanSource_ASM (const byte *flat);
+extern "C" void R_SetSpanSource_ASM (const BYTE *flat);
extern "C" void STACK_ARGS R_SetSpanSize_ASM (int xbits, int ybits);
-extern "C" void R_SetSpanColormap_ASM (byte *colormap);
-extern "C" void R_SetTiltedSpanSource_ASM (const byte *flat);
-extern "C" byte *ds_curcolormap, *ds_cursource, *ds_curtiltedsource;
+extern "C" void R_SetSpanColormap_ASM (BYTE *colormap);
+extern "C" void R_SetTiltedSpanSource_ASM (const BYTE *flat);
+extern "C" BYTE *ds_curcolormap, *ds_cursource, *ds_curtiltedsource;
#endif
void R_DrawSinglePlane (visplane_t *, fixed_t alpha, bool masked);
@@ -235,7 +235,7 @@ extern "C" {
void STACK_ARGS R_CalcTiltedLighting (fixed_t lval, fixed_t lend, int width)
{
fixed_t lstep;
- byte *lightfiller;
+ BYTE *lightfiller;
int i = 0;
lval = planeshade - lval;
@@ -255,7 +255,7 @@ void STACK_ARGS R_CalcTiltedLighting (fixed_t lval, fixed_t lend, int width)
{
if (lval >= NUMCOLORMAPS*FRACUNIT)
{ // Starts beyond the dark end
- byte *clight = basecolormap + ((NUMCOLORMAPS-1) << COLORMAPSHIFT);
+ BYTE *clight = basecolormap + ((NUMCOLORMAPS-1) << COLORMAPSHIFT);
while (lval >= NUMCOLORMAPS*FRACUNIT && i <= width)
{
tiltlighting[i++] = clight;
@@ -314,7 +314,7 @@ void R_MapTiltedPlane (int y, int x1)
int x2 = spanend[y];
int width = x2 - x1;
float iz, uz, vz;
- byte *fb;
+ BYTE *fb;
DWORD u, v;
int i;
@@ -1221,9 +1221,11 @@ void R_DrawSkyBoxes ()
freehead = &(*freehead)->next;
}
-ADD_STAT(skyboxes, out)
+ADD_STAT(skyboxes)
{
- sprintf (out, "%d skybox planes", numskyboxes);
+ FString out;
+ out.Format (out, "%d skybox planes", numskyboxes);
+ return out;
}
//==========================================================================
@@ -1617,7 +1619,7 @@ void R_MapVisPlane (visplane_t *pl, void (*mapfunc)(int y, int x1))
//
//==========================================================================
-BOOL R_PlaneInitData ()
+bool R_PlaneInitData ()
{
int i;
visplane_t *pl;
diff --git a/src/r_plane.h b/src/r_plane.h
index 9b68a5d8f..c026286b7 100644
--- a/src/r_plane.h
+++ b/src/r_plane.h
@@ -40,7 +40,7 @@ struct visplane_s
int lightlevel;
fixed_t xoffs, yoffs; // killough 2/28/98: Support scrolling flats
int minx, maxx;
- byte *colormap; // [RH] Support multiple colormaps
+ BYTE *colormap; // [RH] Support multiple colormaps
fixed_t xscale, yscale; // [RH] Support flat scaling
angle_t angle; // [RH] Support flat rotation
ASkyViewpoint *skybox; // [RH] Support sky boxes
@@ -106,7 +106,7 @@ visplane_t *R_CheckPlane (visplane_t *pl, int start, int stop);
bool R_AlignFlat (int linenum, int side, int fc);
// [RH] Added for multires support
-BOOL R_PlaneInitData (void);
+bool R_PlaneInitData (void);
extern visplane_t* floorplane;
diff --git a/src/r_polymost.cpp b/src/r_polymost.cpp
index f280d538a..ec41003d8 100644
--- a/src/r_polymost.cpp
+++ b/src/r_polymost.cpp
@@ -526,7 +526,7 @@ CVAR(Bool, testpolymost, false, 0)
static int pmx, pmy;
static int pt, px0, py0, px1, py1;
static struct polypt { float x, y; } polypts[80];
-static byte polysize[32];
+static BYTE polysize[32];
static int numpoly, polypt;
PolyClipper TestPoly;
@@ -1489,7 +1489,7 @@ void RP_Subsector (subsector_t *sub)
extern "C" const int checkcoord[12][4];
-static BOOL RP_CheckBBox (fixed_t *bspcoord)
+static bool RP_CheckBBox (fixed_t *bspcoord)
{
int boxx;
int boxy;
diff --git a/src/r_segs.cpp b/src/r_segs.cpp
index 340624fcd..be31b7a64 100644
--- a/src/r_segs.cpp
+++ b/src/r_segs.cpp
@@ -65,7 +65,7 @@ extern fixed_t globaluclip, globaldclip;
// killough 1/6/98: replaced globals with statics where appropriate
-static BOOL segtextured; // True if any of the segs textures might be visible.
+static bool segtextured; // True if any of the segs textures might be visible.
bool markfloor; // False if the back side is the same plane.
bool markceiling;
FTexture *toptexture;
@@ -385,7 +385,7 @@ clearfog:
}
// prevlineasm1 is like vlineasm1 but skips the loop if only drawing one pixel
-inline fixed_t prevline1 (fixed_t vince, byte *colormap, int count, fixed_t vplce, const byte *bufplce, byte *dest)
+inline fixed_t prevline1 (fixed_t vince, BYTE *colormap, int count, fixed_t vplce, const BYTE *bufplce, BYTE *dest)
{
dc_iscale = vince;
dc_colormap = colormap;
@@ -560,11 +560,11 @@ void wallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixed_t
void wallscan_striped (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixed_t *lwal)
{
bool flooding = false;
- byte *startcolormap = basecolormap;
+ BYTE *startcolormap = basecolormap;
int startshade = wallshade;
bool fogginess = foggy;
- byte *floodcolormap = startcolormap;
+ BYTE *floodcolormap = startcolormap;
int floodshade = startshade;
bool floodfoggy = foggy;
@@ -630,7 +630,7 @@ void wallscan_striped (int x1, int x2, short *uwal, short *dwal, fixed_t *swal,
wallshade = startshade;
}
-inline fixed_t mvline1 (fixed_t vince, byte *colormap, int count, fixed_t vplce, const byte *bufplce, byte *dest)
+inline fixed_t mvline1 (fixed_t vince, BYTE *colormap, int count, fixed_t vplce, const BYTE *bufplce, BYTE *dest)
{
dc_iscale = vince;
dc_colormap = colormap;
@@ -798,7 +798,7 @@ void maskwallscan (int x1, int x2, short *uwal, short *dwal, fixed_t *swal, fixe
NetUpdate ();
}
-inline void preptmvline1 (fixed_t vince, byte *colormap, int count, fixed_t vplce, const byte *bufplce, byte *dest)
+inline void preptmvline1 (fixed_t vince, BYTE *colormap, int count, fixed_t vplce, const BYTE *bufplce, BYTE *dest)
{
dc_iscale = vince;
dc_colormap = colormap;
@@ -2113,7 +2113,7 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
int x1, x2;
fixed_t xscale, yscale;
fixed_t topoff;
- byte flipx;
+ BYTE flipx;
fixed_t zpos;
int needrepeat = 0;
sector_t *front, *back;
@@ -2165,7 +2165,7 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
yscale = decal->ScaleY;
WallSpriteTile = TexMan(decal->PicNum);
- flipx = (byte)(decal->RenderFlags & RF_XFLIP);
+ flipx = (BYTE)(decal->RenderFlags & RF_XFLIP);
if (WallSpriteTile->UseType == FTexture::TEX_Null)
{
diff --git a/src/r_things.cpp b/src/r_things.cpp
index 94e98dcca..1ac898969 100644
--- a/src/r_things.cpp
+++ b/src/r_things.cpp
@@ -120,7 +120,7 @@ CVAR (Bool, r_particles, true, 0);
// [RH] Removed checks for coexistance of rotation 0 with other
// rotations and made it look more like BOOM's version.
//
-static void R_InstallSpriteLump (int lump, unsigned frame, char rot, BOOL flipped)
+static void R_InstallSpriteLump (int lump, unsigned frame, char rot, bool flipped)
{
unsigned rotation;
@@ -453,6 +453,7 @@ void R_InitSkins (void)
remove = false;
basetype = NULL;
+ transtype = NULL;
// Data is stored as "key = data".
while (SC_GetString ())
@@ -2194,7 +2195,7 @@ void R_ProjectParticle (particle_t *particle, const sector_t *sector, int shade,
int x1, x2, y1, y2;
vissprite_t* vis;
sector_t* heightsec = NULL;
- byte* map;
+ BYTE* map;
// transform the origin point
tr_x = particle->x - viewx;
@@ -2366,9 +2367,9 @@ void R_DrawParticle (vissprite_t *vis)
{
DWORD *bg2rgb;
int spacing;
- byte *dest;
+ BYTE *dest;
DWORD fg;
- byte color = vis->colormap[vis->startfrac];
+ BYTE color = vis->colormap[vis->startfrac];
int yl = vis->gz;
int ycount = vis->gzt - yl + 1;
int x1 = vis->x1;
diff --git a/src/r_things.h b/src/r_things.h
index 791d0d1de..6f166ea0c 100644
--- a/src/r_things.h
+++ b/src/r_things.h
@@ -29,10 +29,10 @@ struct particle_t
fixed_t x,y,z;
fixed_t velx,vely,velz;
fixed_t accx,accy,accz;
- byte ttl;
- byte trans;
- byte size;
- byte fade;
+ BYTE ttl;
+ BYTE trans;
+ BYTE size;
+ BYTE fade;
int color;
WORD tnext;
WORD snext;
diff --git a/src/s_sound.cpp b/src/s_sound.cpp
index 81630ba2f..e9b5b1362 100644
--- a/src/s_sound.cpp
+++ b/src/s_sound.cpp
@@ -133,7 +133,7 @@ extern float S_GetMusicVolume (const char *music);
static fixed_t P_AproxDistance2 (fixed_t *listener, fixed_t x, fixed_t y);
static void S_StopChannel (int cnum);
static void S_StartSound (fixed_t *pt, AActor *mover, int channel,
- int sound_id, float volume, float attenuation, BOOL looping);
+ int sound_id, float volume, float attenuation, bool looping);
static void S_ActivatePlayList (bool goBack);
static void CalcPosVel (fixed_t *pt, AActor *mover, int constz, float pos[3],
float vel[3]);
@@ -146,7 +146,7 @@ static bool SoundPaused; // whether sound effects are paused
static bool MusicPaused; // whether music is paused
static MusPlayingInfo mus_playing; // music currently being played
static FString LastSong; // last music that was played
-static byte *SoundCurve;
+static BYTE *SoundCurve;
static int nextcleanup;
static FPlayList *PlayList;
@@ -241,15 +241,15 @@ void S_NoiseDebug (void)
Wads.GetLumpName (temp, Channel[i].sfxinfo->lumpnum);
temp[8] = 0;
screen->DrawText (color, 0, y, temp, TAG_DONE);
- sprintf (temp, "%ld", ox / FRACUNIT);
+ sprintf (temp, "%d", ox >> FRACBITS);
screen->DrawText (color, 70, y, temp, TAG_DONE);
- sprintf (temp, "%ld", oy / FRACUNIT);
+ sprintf (temp, "%d", oy >> FRACBITS);
screen->DrawText (color, 120, y, temp, TAG_DONE);
sprintf (temp, "%g", Channel[i].volume);
screen->DrawText (color, 170, y, temp, TAG_DONE);
sprintf (temp, "%d", Channel[i].priority);
screen->DrawText (color, 200, y, temp, TAG_DONE);
- sprintf (temp, "%ld", P_AproxDistance2 (players[consoleplayer].camera, ox, oy) / FRACUNIT);
+ sprintf (temp, "%d", P_AproxDistance2 (players[consoleplayer].camera, ox, oy) / FRACUNIT);
screen->DrawText (color, 240, y, temp, TAG_DONE);
sprintf (temp, "%d", Channel[i].entchannel);
screen->DrawText (color, 280, y, temp, TAG_DONE);
@@ -1035,7 +1035,7 @@ void S_LoopedSound (AActor *ent, int channel, const char *name, float volume, in
// Stops more than copies of the sound from playing at once.
//==========================================================================
-BOOL S_StopSoundID (int sound_id, int priority, int limit, bool singular, fixed_t x, fixed_t y)
+bool S_StopSoundID (int sound_id, int priority, int limit, bool singular, fixed_t x, fixed_t y)
{
int i;
int lp; //least priority
diff --git a/src/s_sound.h b/src/s_sound.h
index 22a899b5b..462d02dcf 100644
--- a/src/s_sound.h
+++ b/src/s_sound.h
@@ -138,7 +138,7 @@ void S_CacheRandomSound (sfxinfo_t *sfx);
// [RH] From Hexen.
// Prevents too many of the same sound from playing simultaneously.
-BOOL S_StopSoundID (int sound_id, int priority, int limit, bool singular, fixed_t x, fixed_t y);
+bool S_StopSoundID (int sound_id, int priority, int limit, bool singular, fixed_t x, fixed_t y);
// Stops a sound emanating from one of an entity's channels
void S_StopSound (AActor *ent, int channel);
diff --git a/src/sc_man.cpp b/src/sc_man.cpp
index ee7ccebec..5d980bbd2 100644
--- a/src/sc_man.cpp
+++ b/src/sc_man.cpp
@@ -56,9 +56,9 @@ int sc_StringLen;
int sc_Number;
float sc_Float;
int sc_Line;
-BOOL sc_End;
-BOOL sc_Crossed;
-BOOL sc_FileScripts = false;
+bool sc_End;
+bool sc_Crossed;
+bool sc_FileScripts = false;
char *sc_ScriptsDir = "";
// PRIVATE DATA DEFINITIONS ------------------------------------------------
@@ -104,7 +104,7 @@ void SC_Open (const char *name)
void SC_OpenFile (const char *name)
{
- byte *filebuf;
+ BYTE *filebuf;
SC_Close ();
ScriptSize = M_ReadFile (name, &filebuf);
@@ -271,7 +271,7 @@ void SC_SetEscape (bool esc)
//
//==========================================================================
-BOOL SC_GetString ()
+bool SC_GetString ()
{
char *marker, *tok;
@@ -349,7 +349,7 @@ bool SC_CheckString (const char *name)
//
//==========================================================================
-BOOL SC_GetNumber (void)
+bool SC_GetNumber (void)
{
char *stopper;
@@ -399,7 +399,7 @@ void SC_MustGetNumber (void)
//
//==========================================================================
-BOOL SC_CheckNumber (void)
+bool SC_CheckNumber (void)
{
char *stopper;
@@ -435,7 +435,7 @@ BOOL SC_CheckNumber (void)
//
//==========================================================================
-BOOL SC_CheckFloat (void)
+bool SC_CheckFloat (void)
{
char *stopper;
@@ -463,7 +463,7 @@ BOOL SC_CheckFloat (void)
//
//==========================================================================
-BOOL SC_GetFloat (void)
+bool SC_GetFloat (void)
{
char *stopper;
@@ -521,7 +521,7 @@ void SC_UnGet (void)
//==========================================================================
/*
-BOOL SC_Check(void)
+bool SC_Check(void)
{
char *text;
@@ -598,7 +598,7 @@ int SC_MustMatchString (const char **strings)
//
//==========================================================================
-BOOL SC_Compare (const char *text)
+bool SC_Compare (const char *text)
{
return (stricmp (text, sc_String) == 0);
}
@@ -655,9 +655,9 @@ static void CheckOpen(void)
struct SavedScript
{
int sc_Line;
- BOOL sc_End;
- BOOL sc_Crossed;
- BOOL sc_FileScripts;
+ bool sc_End;
+ bool sc_Crossed;
+ bool sc_FileScripts;
FString *ScriptName;
char *ScriptBuffer;
diff --git a/src/sc_man.h b/src/sc_man.h
index b335b24d5..5cca3fe33 100644
--- a/src/sc_man.h
+++ b/src/sc_man.h
@@ -10,19 +10,19 @@ void SC_SetCMode (bool cmode);
void SC_SetEscape (bool esc);
void SC_SavePos (void);
void SC_RestorePos (void);
-BOOL SC_GetString (void);
+bool SC_GetString (void);
void SC_MustGetString (void);
void SC_MustGetStringName (const char *name);
bool SC_CheckString (const char *name);
-BOOL SC_GetNumber (void);
+bool SC_GetNumber (void);
void SC_MustGetNumber (void);
-BOOL SC_CheckNumber (void);
-BOOL SC_CheckFloat (void);
-BOOL SC_GetFloat (void);
+bool SC_CheckNumber (void);
+bool SC_CheckFloat (void);
+bool SC_GetFloat (void);
void SC_MustGetFloat (void);
void SC_UnGet (void);
//boolean SC_Check(void);
-BOOL SC_Compare (const char *text);
+bool SC_Compare (const char *text);
int SC_MatchString (const char **strings);
int SC_MustMatchString (const char **strings);
void STACK_ARGS SC_ScriptError (const char *message, ...);
@@ -34,9 +34,9 @@ extern int sc_StringLen;
extern int sc_Number;
extern float sc_Float;
extern int sc_Line;
-extern BOOL sc_End;
-extern BOOL sc_Crossed;
-extern BOOL sc_FileScripts;
+extern bool sc_End;
+extern bool sc_Crossed;
+extern bool sc_FileScripts;
extern char *sc_ScriptsDir;
#endif //__SC_MAN_H__
diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp
index 12cd7ccb1..8f5d537f1 100644
--- a/src/sdl/i_system.cpp
+++ b/src/sdl/i_system.cpp
@@ -145,7 +145,7 @@ int I_WaitForTicPolled (int prevtic)
}
// Returns the fractional amount of a tic passed since the most recent tic
-fixed_t I_GetTimeFrac (DWORD *ms)
+fixed_t I_GetTimeFrac (uint32 *ms)
{
DWORD now = SDL_GetTicks ();
if (ms) *ms = TicNext;
@@ -291,7 +291,7 @@ void I_Quit (void)
// I_Error
//
extern FILE *Logfile;
-BOOL gameisdead;
+bool gameisdead;
void STACK_ARGS I_FatalError (const char *error, ...)
{
diff --git a/src/sdl/i_system.h b/src/sdl/i_system.h
index abe93b368..2a4a085dd 100644
--- a/src/sdl/i_system.h
+++ b/src/sdl/i_system.h
@@ -132,7 +132,7 @@ extern int (*I_WaitForTic) (int);
int I_GetTimePolled (bool saveMS);
int I_GetTimeFake (void);
-fixed_t I_GetTimeFrac (DWORD *ms);
+fixed_t I_GetTimeFrac (uint32 *ms);
//
diff --git a/src/sdl/i_video.h b/src/sdl/i_video.h
index fbb878b33..74ca3f192 100644
--- a/src/sdl/i_video.h
+++ b/src/sdl/i_video.h
@@ -40,7 +40,7 @@ void I_FinishUpdateNoBlit (void);
// Wait for vertical retrace or pause a bit.
void I_WaitVBL(int count);
-void I_ReadScreen (byte *scr);
+void I_ReadScreen (BYTE *scr);
bool I_CheckResolution (int width, int height, int bits);
void I_ClosestResolution (int *width, int *height, int bits);
diff --git a/src/sdl/sdlvideo.cpp b/src/sdl/sdlvideo.cpp
index 121effbb3..fed080d3d 100644
--- a/src/sdl/sdlvideo.cpp
+++ b/src/sdl/sdlvideo.cpp
@@ -496,11 +496,13 @@ bool SDLFB::IsFullscreen ()
return (Screen->flags & SDL_FULLSCREEN) != 0;
}
-ADD_STAT (blit, out)
+ADD_STAT (blit)
{
- sprintf (out,
+ FString out;
+ out.Format (
"blit=%04.1f ms flip=%04.1f ms",
(double)BlitCycles * SecondsPerCycle * 1000,
(double)SDLFlipCycles * SecondsPerCycle * 1000
);
+ return out;
}
diff --git a/src/sound/altsound.cpp b/src/sound/altsound.cpp
index aaa61d06d..f9b359178 100644
--- a/src/sound/altsound.cpp
+++ b/src/sound/altsound.cpp
@@ -44,6 +44,7 @@
#include
#include
+#define USE_WINDOWS_DWORD
#include "altsound.h"
#include "doomtype.h"
#include "c_cvars.h"
@@ -1370,7 +1371,7 @@ void AltSoundRenderer::PrintDriversList ()
//
//==========================================================================
-void AltSoundRenderer::GatherStats (char *outstring)
+FString AltSoundRenderer::GatherStats ()
{
int i, countc, counts, totals;
for (i = countc = 0; i < NumChannels; ++i)
@@ -1396,7 +1397,9 @@ void AltSoundRenderer::GatherStats (char *outstring)
{
perf += PerfMeter[i];
}
- sprintf (outstring, "%2d/%2d channels, %d/%d streams, %.2f%%", countc, NumChannels, counts, totals, perf*100.0/NUM_PERFMETERS);
+ FString out;
+ out.Format ("%2d/%2d channels, %d/%d streams, %.2f%%", countc, NumChannels, counts, totals, perf*100.0/NUM_PERFMETERS);
+ return out;
}
#endif
diff --git a/src/sound/altsound.h b/src/sound/altsound.h
index 5d92cca84..dd6c41e60 100644
--- a/src/sound/altsound.h
+++ b/src/sound/altsound.h
@@ -47,7 +47,7 @@ public:
void PrintStatus ();
void PrintDriversList ();
- void GatherStats (char *outstring);
+ FString GatherStats ();
private:
struct Channel;
diff --git a/src/sound/altsoundmixer.cpp b/src/sound/altsoundmixer.cpp
index a738158bf..232f968d2 100644
--- a/src/sound/altsoundmixer.cpp
+++ b/src/sound/altsoundmixer.cpp
@@ -1,5 +1,6 @@
#ifdef _WIN32
+#define USE_WINDOWS_DWORD
#include "altsound.h"
#include "c_cvars.h"
diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp
index bccdc9a54..3c87dcaa2 100644
--- a/src/sound/fmodsound.cpp
+++ b/src/sound/fmodsound.cpp
@@ -43,6 +43,7 @@ extern HWND Window;
#define TRUE 1
#endif
+#define USE_WINDOWS_DWORD
#include "templates.h"
#include "fmodsound.h"
#include "c_cvars.h"
@@ -529,19 +530,20 @@ void FMODSoundRenderer::PrintStatus ()
void FMODSoundRenderer::PrintDriversList ()
{
- long numdrivers = FSOUND_GetNumDrivers ();
- long i;
+ int numdrivers = FSOUND_GetNumDrivers ();
- for (i = 0; i < numdrivers; i++)
+ for (int i = 0; i < numdrivers; i++)
{
- Printf ("%ld. %s\n", i, FSOUND_GetDriverName (i));
+ Printf ("%d. %s\n", i, FSOUND_GetDriverName (i));
}
}
-void FMODSoundRenderer::GatherStats (char *outstring)
+FString FMODSoundRenderer::GatherStats ()
{
- sprintf (outstring, "%d channels, %.2f%% CPU", FSOUND_GetChannelsPlaying(),
+ FString out;
+ out.Format ("%d channels, %.2f%% CPU", FSOUND_GetChannelsPlaying(),
FSOUND_GetCPUUsage());
+ return out;
}
void FMODSoundRenderer::MovieDisableSound ()
@@ -685,9 +687,7 @@ long FMODSoundRenderer::StartSound (sfxinfo_t *sfx, int vol, int sep, int pitch,
if (chan != -1)
{
- //FSOUND_SetReserved (chan, TRUE);
FSOUND_SetSurround (chan, sep == -1 ? TRUE : FALSE);
- //printf ("%ld\n", freq);
FSOUND_SetFrequency (chan, freq);
FSOUND_SetVolume (chan, vol);
FSOUND_SetPan (chan, pan);
@@ -1072,7 +1072,7 @@ void FMODSoundRenderer::DoLoad (void **slot, sfxinfo_t *sfx)
}
FWadLump wlump = Wads.OpenLumpNum (sfx->lumpnum);
- sfxdata = new byte[size];
+ sfxdata = new BYTE[size];
wlump.Read (sfxdata, size);
SDWORD len = ((SDWORD *)sfxdata)[1];
diff --git a/src/sound/fmodsound.h b/src/sound/fmodsound.h
index fca3d671c..17766d0d8 100644
--- a/src/sound/fmodsound.h
+++ b/src/sound/fmodsound.h
@@ -50,7 +50,7 @@ public:
void PrintStatus ();
void PrintDriversList ();
- void GatherStats (char *outstring);
+ FString GatherStats ();
void ResetEnvironment ();
private:
diff --git a/src/sound/i_music.cpp b/src/sound/i_music.cpp
index 4e498aba6..9289b2e50 100644
--- a/src/sound/i_music.cpp
+++ b/src/sound/i_music.cpp
@@ -56,10 +56,10 @@ extern void ChildSigHandler (int signum);
#include
#include
+#include "i_musicinterns.h"
#include "doomtype.h"
#include "m_argv.h"
#include "i_music.h"
-#include "i_musicinterns.h"
#include "w_wad.h"
#include "c_console.h"
#include "c_dispatch.h"
diff --git a/src/sound/i_musicinterns.h b/src/sound/i_musicinterns.h
index e2d1eea44..d10c941a2 100644
--- a/src/sound/i_musicinterns.h
+++ b/src/sound/i_musicinterns.h
@@ -1,5 +1,6 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
+#define USE_WINDOWS_DWORD
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0400
#undef _WIN32_WINNT
#endif
@@ -74,20 +75,20 @@ protected:
void OutputVolume (DWORD volume);
int SendCommand ();
- enum
- {
- SEND_DONE,
- SEND_WAIT
+ enum
+ {
+ SEND_DONE,
+ SEND_WAIT
};
- HMIDIOUT MidiOut;
- HANDLE PlayerThread;
- HANDLE PauseEvent;
- HANDLE ExitEvent;
- HANDLE VolumeChangeEvent;
- DWORD SavedVolume;
- bool VolumeWorks;
-
+ HMIDIOUT MidiOut;
+ HANDLE PlayerThread;
+ HANDLE PauseEvent;
+ HANDLE ExitEvent;
+ HANDLE VolumeChangeEvent;
+ DWORD SavedVolume;
+ bool VolumeWorks;
+
BYTE *MusBuffer;
MUSHeader *MusHeader;
BYTE LastVelocity[16];
@@ -115,8 +116,8 @@ public:
bool IsValid () const;
protected:
- struct TrackInfo;
-
+ struct TrackInfo;
+
static DWORD WINAPI PlayerProc (LPVOID lpParameter);
void OutputVolume (DWORD volume);
void ProcessInitialMetaEvents ();
@@ -124,14 +125,14 @@ protected:
void SendCommand (TrackInfo *track);
TrackInfo *FindNextDue ();
- HMIDIOUT MidiOut;
- HANDLE PlayerThread;
- HANDLE PauseEvent;
- HANDLE ExitEvent;
- HANDLE VolumeChangeEvent;
- DWORD SavedVolume;
- bool VolumeWorks;
-
+ HMIDIOUT MidiOut;
+ HANDLE PlayerThread;
+ HANDLE PauseEvent;
+ HANDLE ExitEvent;
+ HANDLE VolumeChangeEvent;
+ DWORD SavedVolume;
+ bool VolumeWorks;
+
BYTE *MusHeader;
BYTE ChannelVolumes[16];
TrackInfo *Tracks;
diff --git a/src/sound/i_sound.cpp b/src/sound/i_sound.cpp
index b24329a27..fe9c996ed 100644
--- a/src/sound/i_sound.cpp
+++ b/src/sound/i_sound.cpp
@@ -48,6 +48,7 @@ extern HINSTANCE g_hInst;
#include
#include
+#define USE_WINDOWS_DWORD
#include "doomtype.h"
#include "m_alloc.h"
#include
@@ -153,7 +154,7 @@ CUSTOM_CVAR (Float, snd_sfxvolume, 0.5f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOI
#ifdef _WIN32
// [RH] Dialog procedure for the error dialog that appears if FMOD
// could not be initialized for some reason.
-BOOL CALLBACK InitBoxCallback (HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
+bool CALLBACK InitBoxCallback (HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
@@ -284,15 +285,15 @@ CCMD (snd_listdrivers)
}
}
-ADD_STAT (sound, out)
+ADD_STAT (sound)
{
if (GSnd != NULL)
{
- GSnd->GatherStats (out);
+ return GSnd->GatherStats ();
}
else
{
- strcpy (out, "no sound");
+ return "no sound";
}
}
@@ -327,9 +328,9 @@ void SoundRenderer::UpdateSounds ()
{
}
-void SoundRenderer::GatherStats (char *outstring)
+FString SoundRenderer::GatherStats ()
{
- sprintf (outstring, "No stats for this sound renderer.");
+ return "No stats for this sound renderer.";
}
void SoundRenderer::ResetEnvironment ()
diff --git a/src/sound/i_sound.h b/src/sound/i_sound.h
index 300e8ce2d..280a9aec8 100644
--- a/src/sound/i_sound.h
+++ b/src/sound/i_sound.h
@@ -119,7 +119,7 @@ public:
virtual bool IsValid () = 0;
virtual void PrintStatus () = 0;
virtual void PrintDriversList () = 0;
- virtual void GatherStats (char *outstring);
+ virtual FString GatherStats ();
virtual void ResetEnvironment ();
bool Sound3D;
diff --git a/src/sound/music_flac.cpp b/src/sound/music_flac.cpp
index f81779a29..ee3609f14 100644
--- a/src/sound/music_flac.cpp
+++ b/src/sound/music_flac.cpp
@@ -14,26 +14,26 @@ public:
bool ServiceStream (void *buff, int len, bool loop);
- unsigned NumChannels, SampleBits, SampleRate;
-
+ unsigned NumChannels, SampleBits, SampleRate;
+
protected:
- virtual ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[], unsigned *bytes);
- virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]);
- virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata);
- virtual void error_callback(::FLAC__StreamDecoderErrorStatus status);
-
- void CopyToStream (void *&sbuff, FLAC__int32 **buffer, size_t ofs, size_t samples);
-
- FileReader *File;
- long StartPos, EndPos;
-
- FLAC__int32 *SamplePool[2];
- size_t PoolSize;
- size_t PoolUsed;
- size_t PoolPos;
-
- void *SBuff;
- size_t SLen;
+ virtual ::FLAC__StreamDecoderReadStatus read_callback(FLAC__byte buffer[], unsigned *bytes);
+ virtual ::FLAC__StreamDecoderWriteStatus write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[]);
+ virtual void metadata_callback(const ::FLAC__StreamMetadata *metadata);
+ virtual void error_callback(::FLAC__StreamDecoderErrorStatus status);
+
+ void CopyToStream (void *&sbuff, FLAC__int32 **buffer, size_t ofs, size_t samples);
+
+ FileReader *File;
+ long StartPos, EndPos;
+
+ FLAC__int32 *SamplePool[2];
+ size_t PoolSize;
+ size_t PoolUsed;
+ size_t PoolPos;
+
+ void *SBuff;
+ size_t SLen;
};
FLACSong::FLACSong (FILE *file, char * musiccache, int length)
@@ -194,130 +194,130 @@ bool FLACSong::FLACStreamer::ServiceStream (void *buff1, int len, bool loop)
return TRUE;
}
-void FLACSong::FLACStreamer::CopyToStream (void *&sbuff, FLAC__int32 **buffer, size_t ofs, size_t len)
-{
- size_t i;
-
- if (SampleBits == 16)
- {
- SWORD *buff = (SWORD *)sbuff;
- if (NumChannels == 1)
- {
- for (i = 0; i < len; ++i)
- {
- buff[i] = SWORD(buffer[0][i + ofs]);
- }
- sbuff = buff + i;
- }
- else
- {
- for (i = 0; i < len; ++i)
- {
- buff[i*2] = SWORD(buffer[0][i + ofs]);
- buff[i*2+1] = SWORD(buffer[1][i + ofs]);
- }
- sbuff = buff + i*2;
- }
- }
- else if (SampleBits == 8)
- {
- SBYTE *buff = (SBYTE *)sbuff;
- if (NumChannels == 1)
- {
- for (i = 0; i < len; ++i)
- {
- buff[i] = SBYTE(buffer[0][i + ofs]);
- }
- sbuff = buff + i;
- }
- else
- {
- for (i = 0; i < len; ++i)
- {
- buff[i*2] = SBYTE(buffer[0][i + ofs]);
- buff[i*2+1] = SBYTE(buffer[1][i + ofs]);
- }
- sbuff = buff + i*2;
- }
- }
-}
+void FLACSong::FLACStreamer::CopyToStream (void *&sbuff, FLAC__int32 **buffer, size_t ofs, size_t len)
+{
+ size_t i;
-::FLAC__StreamDecoderReadStatus FLACSong::FLACStreamer::read_callback(FLAC__byte buffer[], unsigned *bytes)
-{
- if (*bytes > 0)
- {
- long here = File->Tell();
- if (here == EndPos)
- {
- return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
- }
- else
- {
- if (*bytes > (size_t)(EndPos - here))
- {
- *bytes = EndPos - here;
- }
- File->Read (buffer, *bytes);
- return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
- }
- }
- else
- {
- return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
- }
-}
-
-::FLAC__StreamDecoderWriteStatus FLACSong::FLACStreamer::write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[])
-{
- size_t blockSize = frame->header.blocksize;
- size_t blockGrab = 0;
- size_t buffAvail;
- size_t blockOfs;
-
- buffAvail = SLen;
- blockGrab = MIN (SLen, blockSize);
- CopyToStream (SBuff, (FLAC__int32 **)buffer, 0, blockGrab);
- blockSize -= blockGrab;
- SLen -= blockGrab;
- blockOfs = blockGrab;
-
- if (blockSize > 0)
- {
- buffAvail = PoolSize - PoolUsed;
- blockGrab = MIN (buffAvail, blockSize);
- memcpy (SamplePool[0] + PoolUsed, buffer[0] + blockOfs, sizeof(buffer[0])*blockGrab);
- if (NumChannels > 1)
- {
- memcpy (SamplePool[1] + PoolUsed, buffer[1] + blockOfs, sizeof(buffer[1])*blockGrab);
- }
- PoolUsed += blockGrab;
- }
-
- return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
-}
-
-void FLACSong::FLACStreamer::metadata_callback(const ::FLAC__StreamMetadata *metadata)
-{
- if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO && PoolSize == 0)
- {
- switch (metadata->data.stream_info.bits_per_sample)
- {
- case 8: case 16: break;
- default:
- Printf ("Only FLACs with 8 or 16 bits per sample are supported\n");
- return;
- }
- SampleRate = metadata->data.stream_info.sample_rate;
- NumChannels = (unsigned int)MIN (2u, metadata->data.stream_info.channels);
- SampleBits = metadata->data.stream_info.bits_per_sample;
- PoolSize = metadata->data.stream_info.max_blocksize * 2;
-
- SamplePool[0] = new FLAC__int32[PoolSize * NumChannels];
- SamplePool[1] = SamplePool[0] + PoolSize;
- }
-}
-
-void FLACSong::FLACStreamer::error_callback(::FLAC__StreamDecoderErrorStatus status)
-{
- status = status;
-}
+ if (SampleBits == 16)
+ {
+ SWORD *buff = (SWORD *)sbuff;
+ if (NumChannels == 1)
+ {
+ for (i = 0; i < len; ++i)
+ {
+ buff[i] = SWORD(buffer[0][i + ofs]);
+ }
+ sbuff = buff + i;
+ }
+ else
+ {
+ for (i = 0; i < len; ++i)
+ {
+ buff[i*2] = SWORD(buffer[0][i + ofs]);
+ buff[i*2+1] = SWORD(buffer[1][i + ofs]);
+ }
+ sbuff = buff + i*2;
+ }
+ }
+ else if (SampleBits == 8)
+ {
+ SBYTE *buff = (SBYTE *)sbuff;
+ if (NumChannels == 1)
+ {
+ for (i = 0; i < len; ++i)
+ {
+ buff[i] = SBYTE(buffer[0][i + ofs]);
+ }
+ sbuff = buff + i;
+ }
+ else
+ {
+ for (i = 0; i < len; ++i)
+ {
+ buff[i*2] = SBYTE(buffer[0][i + ofs]);
+ buff[i*2+1] = SBYTE(buffer[1][i + ofs]);
+ }
+ sbuff = buff + i*2;
+ }
+ }
+}
+
+::FLAC__StreamDecoderReadStatus FLACSong::FLACStreamer::read_callback(FLAC__byte buffer[], unsigned *bytes)
+{
+ if (*bytes > 0)
+ {
+ long here = File->Tell();
+ if (here == EndPos)
+ {
+ return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;
+ }
+ else
+ {
+ if (*bytes > (size_t)(EndPos - here))
+ {
+ *bytes = EndPos - here;
+ }
+ File->Read (buffer, *bytes);
+ return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;
+ }
+ }
+ else
+ {
+ return FLAC__STREAM_DECODER_READ_STATUS_ABORT;
+ }
+}
+
+::FLAC__StreamDecoderWriteStatus FLACSong::FLACStreamer::write_callback(const ::FLAC__Frame *frame, const FLAC__int32 * const buffer[])
+{
+ size_t blockSize = frame->header.blocksize;
+ size_t blockGrab = 0;
+ size_t buffAvail;
+ size_t blockOfs;
+
+ buffAvail = SLen;
+ blockGrab = MIN (SLen, blockSize);
+ CopyToStream (SBuff, (FLAC__int32 **)buffer, 0, blockGrab);
+ blockSize -= blockGrab;
+ SLen -= blockGrab;
+ blockOfs = blockGrab;
+
+ if (blockSize > 0)
+ {
+ buffAvail = PoolSize - PoolUsed;
+ blockGrab = MIN (buffAvail, blockSize);
+ memcpy (SamplePool[0] + PoolUsed, buffer[0] + blockOfs, sizeof(buffer[0])*blockGrab);
+ if (NumChannels > 1)
+ {
+ memcpy (SamplePool[1] + PoolUsed, buffer[1] + blockOfs, sizeof(buffer[1])*blockGrab);
+ }
+ PoolUsed += blockGrab;
+ }
+
+ return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
+}
+
+void FLACSong::FLACStreamer::metadata_callback(const ::FLAC__StreamMetadata *metadata)
+{
+ if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO && PoolSize == 0)
+ {
+ switch (metadata->data.stream_info.bits_per_sample)
+ {
+ case 8: case 16: break;
+ default:
+ Printf ("Only FLACs with 8 or 16 bits per sample are supported\n");
+ return;
+ }
+ SampleRate = metadata->data.stream_info.sample_rate;
+ NumChannels = (unsigned int)MIN (2u, metadata->data.stream_info.channels);
+ SampleBits = metadata->data.stream_info.bits_per_sample;
+ PoolSize = metadata->data.stream_info.max_blocksize * 2;
+
+ SamplePool[0] = new FLAC__int32[PoolSize * NumChannels];
+ SamplePool[1] = SamplePool[0] + PoolSize;
+ }
+}
+
+void FLACSong::FLACStreamer::error_callback(::FLAC__StreamDecoderErrorStatus status)
+{
+ status = status;
+}
diff --git a/src/sound/music_midi_stream.cpp b/src/sound/music_midi_stream.cpp
index 571beff12..cfb8b5149 100644
--- a/src/sound/music_midi_stream.cpp
+++ b/src/sound/music_midi_stream.cpp
@@ -1,6 +1,6 @@
#ifdef _WIN32
-#include "c_dispatch.h"
#include "i_musicinterns.h"
+#include "c_dispatch.h"
#include "i_music.h"
#include "templates.h"
diff --git a/src/st_stuff.cpp b/src/st_stuff.cpp
index a619233a9..47f007c59 100644
--- a/src/st_stuff.cpp
+++ b/src/st_stuff.cpp
@@ -39,21 +39,21 @@ struct cheatseq_t
BYTE DontCheck;
BYTE CurrentArg;
BYTE Args[2];
- BOOL (*Handler)(cheatseq_t *);
+ bool (*Handler)(cheatseq_t *);
};
-static bool CheatAddKey (cheatseq_t *cheat, byte key, BOOL *eat);
-static BOOL Cht_Generic (cheatseq_t *);
-static BOOL Cht_Music (cheatseq_t *);
-static BOOL Cht_BeholdMenu (cheatseq_t *);
-static BOOL Cht_PumpupMenu (cheatseq_t *);
-static BOOL Cht_AutoMap (cheatseq_t *);
-static BOOL Cht_ChangeLevel (cheatseq_t *);
-static BOOL Cht_ChangeStartSpot (cheatseq_t *);
-static BOOL Cht_WarpTransLevel (cheatseq_t *);
-static BOOL Cht_MyPos (cheatseq_t *);
-static BOOL Cht_Sound (cheatseq_t *);
-static BOOL Cht_Ticker (cheatseq_t *);
+static bool CheatAddKey (cheatseq_t *cheat, BYTE key, bool *eat);
+static bool Cht_Generic (cheatseq_t *);
+static bool Cht_Music (cheatseq_t *);
+static bool Cht_BeholdMenu (cheatseq_t *);
+static bool Cht_PumpupMenu (cheatseq_t *);
+static bool Cht_AutoMap (cheatseq_t *);
+static bool Cht_ChangeLevel (cheatseq_t *);
+static bool Cht_ChangeStartSpot (cheatseq_t *);
+static bool Cht_WarpTransLevel (cheatseq_t *);
+static bool Cht_MyPos (cheatseq_t *);
+static bool Cht_Sound (cheatseq_t *);
+static bool Cht_Ticker (cheatseq_t *);
BYTE CheatPowerup[7][10] =
{
@@ -221,13 +221,13 @@ static cheatseq_t StrifeCheats[] =
{ CheatLego, 0, 0, 0, {CHT_LEGO,0}, Cht_Generic },
};
-extern BOOL CheckCheatmode ();
+extern bool CheckCheatmode ();
// Respond to keyboard input events, intercept cheats.
// [RH] Cheats eat the last keypress used to trigger them
-BOOL ST_Responder (event_t *ev)
+bool ST_Responder (event_t *ev)
{
- BOOL eat = false;
+ bool eat = false;
if (ev->type == EV_KeyDown)
{
@@ -263,7 +263,7 @@ BOOL ST_Responder (event_t *ev)
for (i = 0; i < numcheats; i++, cheats++)
{
- if (CheatAddKey (cheats, (byte)ev->data2, &eat))
+ if (CheatAddKey (cheats, (BYTE)ev->data2, &eat))
{
if (cheats->DontCheck || !CheckCheatmode ())
{
@@ -289,7 +289,7 @@ BOOL ST_Responder (event_t *ev)
//
//--------------------------------------------------------------------------
-static bool CheatAddKey (cheatseq_t *cheat, byte key, BOOL *eat)
+static bool CheatAddKey (cheatseq_t *cheat, BYTE key, bool *eat)
{
if (cheat->Pos == NULL)
{
@@ -326,14 +326,14 @@ static bool CheatAddKey (cheatseq_t *cheat, byte key, BOOL *eat)
//
//--------------------------------------------------------------------------
-static BOOL Cht_Generic (cheatseq_t *cheat)
+static bool Cht_Generic (cheatseq_t *cheat)
{
Net_WriteByte (DEM_GENERICCHEAT);
Net_WriteByte (cheat->Args[0]);
return true;
}
-static BOOL Cht_Music (cheatseq_t *cheat)
+static bool Cht_Music (cheatseq_t *cheat)
{
char buf[9] = "idmus xx";
@@ -343,13 +343,13 @@ static BOOL Cht_Music (cheatseq_t *cheat)
return true;
}
-static BOOL Cht_BeholdMenu (cheatseq_t *cheat)
+static bool Cht_BeholdMenu (cheatseq_t *cheat)
{
Printf ("%s\n", GStrings("STSTR_BEHOLD"));
return false;
}
-static BOOL Cht_PumpupMenu (cheatseq_t *cheat)
+static bool Cht_PumpupMenu (cheatseq_t *cheat)
{
// How many people knew about the PUMPUPT cheat, since
// it isn't printed in the list?
@@ -357,7 +357,7 @@ static BOOL Cht_PumpupMenu (cheatseq_t *cheat)
return false;
}
-static BOOL Cht_AutoMap (cheatseq_t *cheat)
+static bool Cht_AutoMap (cheatseq_t *cheat)
{
if (automapactive)
{
@@ -370,7 +370,7 @@ static BOOL Cht_AutoMap (cheatseq_t *cheat)
}
}
-static BOOL Cht_ChangeLevel (cheatseq_t *cheat)
+static bool Cht_ChangeLevel (cheatseq_t *cheat)
{
char cmd[10] = "idclev xx";
@@ -380,7 +380,7 @@ static BOOL Cht_ChangeLevel (cheatseq_t *cheat)
return true;
}
-static BOOL Cht_ChangeStartSpot (cheatseq_t *cheat)
+static bool Cht_ChangeStartSpot (cheatseq_t *cheat)
{
char cmd[64];
@@ -389,7 +389,7 @@ static BOOL Cht_ChangeStartSpot (cheatseq_t *cheat)
return true;
}
-static BOOL Cht_WarpTransLevel (cheatseq_t *cheat)
+static bool Cht_WarpTransLevel (cheatseq_t *cheat)
{
char cmd[11] = "hxvisit xx";
cmd[8] = cheat->Args[0];
@@ -398,20 +398,20 @@ static BOOL Cht_WarpTransLevel (cheatseq_t *cheat)
return true;
}
-static BOOL Cht_MyPos (cheatseq_t *cheat)
+static bool Cht_MyPos (cheatseq_t *cheat)
{
C_DoCommand ("toggle idmypos");
return true;
}
-static BOOL Cht_Ticker (cheatseq_t *cheat)
+static bool Cht_Ticker (cheatseq_t *cheat)
{
ticker = !ticker;
Printf ("%s\n", GStrings(ticker ? "TXT_CHEATTICKERON" : "TXT_CHEATTICKEROFF"));
return true;
}
-static BOOL Cht_Sound (cheatseq_t *cheat)
+static bool Cht_Sound (cheatseq_t *cheat)
{
noisedebug = !noisedebug;
Printf ("%s\n", GStrings(noisedebug ? "TXT_CHEATSOUNDON" : "TXT_CHEATSOUNDOFF"));
diff --git a/src/st_stuff.h b/src/st_stuff.h
index 565743c98..bd4823859 100644
--- a/src/st_stuff.h
+++ b/src/st_stuff.h
@@ -30,7 +30,7 @@ extern int ST_X;
extern int ST_Y;
extern int SB_state;
-BOOL ST_Responder(event_t* ev);
+bool ST_Responder(event_t* ev);
// [RH] Base blending values (for e.g. underwater)
extern int BaseBlendR, BaseBlendG, BaseBlendB;
diff --git a/src/stats.cpp b/src/stats.cpp
index b99341407..7e3357123 100644
--- a/src/stats.cpp
+++ b/src/stats.cpp
@@ -109,9 +109,7 @@ void FStat::PrintStat ()
{
if (m_CurrStat)
{
- char stattext[256];
-
- m_CurrStat->GetStats (stattext);
+ FString stattext(m_CurrStat->GetStats());
screen->SetFont (ConFont);
screen->DrawText (CR_GREEN, 5, SCREENHEIGHT -
SmallFont->GetHeight(), stattext, TAG_DONE);
diff --git a/src/stats.h b/src/stats.h
index 4ca3463b7..93cbc76df 100644
--- a/src/stats.h
+++ b/src/stats.h
@@ -35,6 +35,7 @@
#define __STATS_H__
#include "i_system.h"
+#include "zstring.h"
extern "C" double SecondsPerCycle;
extern "C" double CyclesPerSecond;
@@ -55,14 +56,14 @@ inline cycle_t GetClockCycle ()
#elif (defined __GNUG__)
-typedef DWORD cycle_t;
+typedef QWORD cycle_t;
inline cycle_t GetClockCycle()
{
if (CPU.bRDTSC)
{
cycle_t res;
- asm volatile ("rdtsc" : "=a" (res) : : "%edx");
+ asm volatile ("rdtsc" : "=A" (res));
return res;
}
else
@@ -90,7 +91,8 @@ public:
FStat (const char *name);
virtual ~FStat ();
- virtual void GetStats (char *out) = 0;
+ virtual FString GetStats () = 0;
+
static void PrintStat ();
static FStat *FindStat (const char *name);
static void SelectStat (const char *name);
@@ -107,11 +109,11 @@ private:
static FStat *m_CurrStat;
};
-#define ADD_STAT(n,out) \
+#define ADD_STAT(n) \
static class Stat_##n : public FStat { \
public: \
Stat_##n () : FStat (#n) {} \
- void GetStats (char *out); } Istaticstat##n; \
- void Stat_##n::GetStats (char *out)
+ FString GetStats (); } Istaticstat##n; \
+ FString Stat_##n::GetStats ()
#endif //__STATS_H__
diff --git a/src/tables.h b/src/tables.h
index 405e45b4b..6e916729e 100644
--- a/src/tables.h
+++ b/src/tables.h
@@ -89,7 +89,7 @@ extern fixed_t finetangent[FINEANGLES/2];
#define SLOPEBITS 11
#define DBITS (FRACBITS-SLOPEBITS)
-typedef DWORD angle_t;
+typedef uint32 angle_t;
// Avoid "ambiguous call to overloaded function" errors
// Only to be used when you have subtracted two angles.
diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp
index 608dc0fff..292668963 100644
--- a/src/textures/multipatchtexture.cpp
+++ b/src/textures/multipatchtexture.cpp
@@ -45,7 +45,7 @@
// all and only while initing the textures is beyond me.
#ifdef ALPHA
-#define SAFESHORT(s) ((short)(((byte *)&(s))[0] + ((byte *)&(s))[1] * 256))
+#define SAFESHORT(s) ((short)(((BYTE *)&(s))[0] + ((BYTE *)&(s))[1] * 256))
#else
#define SAFESHORT(s) LittleShort(s)
#endif
@@ -91,7 +91,7 @@ FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchl
Parts = new TexPart[NumParts];
Width = SAFESHORT(mtexture.d->width);
Height = SAFESHORT(mtexture.d->height);
- strncpy (Name, mtexture.d->name, 8);
+ strncpy (Name, (const char *)mtexture.d->name, 8);
Name[8] = 0;
CalcBitSize ();
@@ -355,12 +355,12 @@ void FMultiPatchTexture::CheckForHacks ()
{
for (x = 0; x < x2; ++x)
{
- const column_t *col = (column_t*)((byte*)realpatch+LittleLong(cofs[x]));
+ const column_t *col = (column_t*)((BYTE*)realpatch+LittleLong(cofs[x]));
if (col->topdelta != 0 || col->length != 0)
{
break; // It's not bad!
}
- col = (column_t *)((byte *)col + 256 + 4);
+ col = (column_t *)((BYTE *)col + 256 + 4);
if (col->topdelta != 0xFF)
{
break; // More than one post in a column!
@@ -403,7 +403,7 @@ void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int p
int lumplength = Wads.LumpLength(patcheslump);
if (numpatches > DWORD((lumplength-4)/8))
{
- Printf("PNAMES lump is shorter than required (%ld entries reported but only %d bytes (%d entries) long\n",
+ Printf("PNAMES lump is shorter than required (%u entries reported but only %d bytes (%d entries) long\n",
numpatches, lumplength, (lumplength-4)/8);
// Truncate but continue reading. Who knows how many such lumps exist?
numpatches = (lumplength-4)/8;
diff --git a/src/textures/warptexture.cpp b/src/textures/warptexture.cpp
index 87e8691a0..59bb1c179 100644
--- a/src/textures/warptexture.cpp
+++ b/src/textures/warptexture.cpp
@@ -144,7 +144,7 @@ void FWarpTexture::MakeTexture (DWORD time)
GenTime = time;
- byte *buffer = (byte *)alloca (MAX (Width, Height));
+ BYTE *buffer = (BYTE *)alloca (MAX (Width, Height));
int xsize = Width;
int ysize = Height;
int xmask = WidthMask;
diff --git a/src/thingdef.cpp b/src/thingdef.cpp
index 55fea1e6f..49d5db458 100644
--- a/src/thingdef.cpp
+++ b/src/thingdef.cpp
@@ -786,7 +786,7 @@ static const actionf_p BasicAttacks[3] =
//----------------------------------------------------------------------------
static int NumUsedTranslations;
static int NumUsedBloodTranslations;
-byte decorate_translations[256*256*2];
+BYTE decorate_translations[256*256*2];
PalEntry BloodTranslations[256];
void InitDecorateTranslations()
diff --git a/src/thingdef_codeptr.cpp b/src/thingdef_codeptr.cpp
index d6dcdb885..509023bf6 100644
--- a/src/thingdef_codeptr.cpp
+++ b/src/thingdef_codeptr.cpp
@@ -294,7 +294,7 @@ void A_PlaySoundEx (AActor *self)
int soundid = StateParameters[index];
ENamedName channel = ENamedName(StateParameters[index + 1]);
- BOOL looping = StateParameters[index + 2];
+ INTBOOL looping = StateParameters[index + 2];
if (channel < NAME_Auto || channel > NAME_SoundSlot7)
{
@@ -875,7 +875,7 @@ void A_FireCustomMissile (AActor * self)
bool UseAmmo=EvalExpressionN (StateParameters[index+2], self);
int SpawnOfs_XY=EvalExpressionI (StateParameters[index+3], self);
fixed_t SpawnHeight=fixed_t(EvalExpressionF (StateParameters[index+4], self) * FRACUNIT);
- BOOL AimAtAngle=EvalExpressionI (StateParameters[index+5], self);
+ INTBOOL AimAtAngle=EvalExpressionI (StateParameters[index+5], self);
player_t *player=self->player;
AWeapon * weapon=player->ReadyWeapon;
@@ -1176,7 +1176,7 @@ void A_SpawnItem(AActor * self)
fixed_t distance = fixed_t(EvalExpressionF (StateParameters[index+1], self) * FRACUNIT);
fixed_t zheight = fixed_t(EvalExpressionF (StateParameters[index+2], self) * FRACUNIT);
bool useammo = EvalExpressionN (StateParameters[index+3], self);
- BOOL transfer_translation = EvalExpressionI (StateParameters[index+4], self);
+ INTBOOL transfer_translation = EvalExpressionI (StateParameters[index+4], self);
if (!missile)
{
@@ -1467,7 +1467,7 @@ void A_SpawnDebris(AActor * self)
int index=CheckIndex(2, NULL);
if (index<0) return;
- BOOL transfer_translation = EvalExpressionI (StateParameters[index+1], self);
+ INTBOOL transfer_translation = EvalExpressionI (StateParameters[index+1], self);
debris = PClass::FindClass((ENamedName)StateParameters[index]);
if (debris == NULL) return;
diff --git a/src/v_draw.cpp b/src/v_draw.cpp
index 845006836..4f9035a41 100644
--- a/src/v_draw.cpp
+++ b/src/v_draw.cpp
@@ -63,7 +63,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
static short bottomclipper[MAXWIDTH], topclipper[MAXWIDTH];
va_list tags;
DWORD tag;
- BOOL boolval;
+ INTBOOL boolval;
int intval;
if (img == NULL || img->UseType == FTexture::TEX_Null)
@@ -87,13 +87,13 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
fixed_t alpha = FRACUNIT;
int fillcolor = -1;
const BYTE *translation = NULL;
- BOOL alphaChannel = false;
- BOOL flipX = false;
+ INTBOOL alphaChannel = false;
+ INTBOOL flipX = false;
fixed_t shadowAlpha = 0;
int shadowColor = 0;
int virtWidth = this->GetWidth();
int virtHeight = this->GetHeight();
- BOOL keepratio = false;
+ INTBOOL keepratio = false;
x0 <<= FRACBITS;
y0 <<= FRACBITS;
@@ -135,7 +135,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
break;
case DTA_Clean:
- boolval = va_arg (tags, BOOL);
+ boolval = va_arg (tags, INTBOOL);
if (boolval)
{
x0 = (x0 - 160*FRACUNIT) * CleanXfac + (Width * (FRACUNIT/2));
@@ -146,7 +146,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
break;
case DTA_CleanNoMove:
- boolval = va_arg (tags, BOOL);
+ boolval = va_arg (tags, INTBOOL);
if (boolval)
{
destwidth = texwidth * CleanXfac * FRACUNIT;
@@ -155,7 +155,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
break;
case DTA_320x200:
- boolval = va_arg (tags, BOOL);
+ boolval = va_arg (tags, INTBOOL);
if (boolval)
{
virtWidth = 320;
@@ -207,7 +207,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
break;
case DTA_AlphaChannel:
- alphaChannel = va_arg (tags, BOOL);
+ alphaChannel = va_arg (tags, INTBOOL);
break;
case DTA_FillColor:
@@ -219,7 +219,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
break;
case DTA_FlipX:
- flipX = va_arg (tags, BOOL);
+ flipX = va_arg (tags, INTBOOL);
break;
case DTA_TopOffset:
@@ -295,7 +295,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
break;
case DTA_Shadow:
- boolval = va_arg (tags, BOOL);
+ boolval = va_arg (tags, INTBOOL);
if (boolval)
{
shadowAlpha = FRACUNIT/2;
@@ -308,7 +308,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
break;
case DTA_Masked:
- boolval = va_arg (tags, BOOL);
+ boolval = va_arg (tags, INTBOOL);
if (boolval)
{
spanptr = &spans;
@@ -320,7 +320,7 @@ void STACK_ARGS DCanvas::DrawTexture (FTexture *img, int x0, int y0, DWORD tags_
break;
case DTA_KeepRatio:
- keepratio = va_arg (tags, BOOL);
+ keepratio = va_arg (tags, INTBOOL);
break;
}
tag = va_arg (tags, DWORD);
@@ -591,11 +591,11 @@ void DCanvas::FillBorder (FTexture *img)
// V_DrawBlock
// Draw a linear block of pixels into the view buffer.
//
-void DCanvas::DrawBlock (int x, int y, int _width, int _height, const byte *src) const
+void DCanvas::DrawBlock (int x, int y, int _width, int _height, const BYTE *src) const
{
int srcpitch = _width;
int destpitch;
- byte *dest;
+ BYTE *dest;
if (ClipBox (x, y, _width, _height, src, srcpitch))
{
@@ -617,9 +617,9 @@ void DCanvas::DrawBlock (int x, int y, int _width, int _height, const byte *src)
// V_GetBlock
// Gets a linear block of pixels from the view buffer.
//
-void DCanvas::GetBlock (int x, int y, int _width, int _height, byte *dest) const
+void DCanvas::GetBlock (int x, int y, int _width, int _height, BYTE *dest) const
{
- const byte *src;
+ const BYTE *src;
#ifdef RANGECHECK
if (x<0
@@ -642,7 +642,7 @@ void DCanvas::GetBlock (int x, int y, int _width, int _height, byte *dest) const
}
// Returns true if the box was completely clipped. False otherwise.
-bool DCanvas::ClipBox (int &x, int &y, int &w, int &h, const byte *&src, const int srcpitch) const
+bool DCanvas::ClipBox (int &x, int &y, int &w, int &h, const BYTE *&src, const int srcpitch) const
{
if (x >= Width || y >= Height || x+w <= 0 || y+h <= 0)
{ // Completely clipped off screen
diff --git a/src/v_font.cpp b/src/v_font.cpp
index 45f1cee3a..b8f1a85e4 100644
--- a/src/v_font.cpp
+++ b/src/v_font.cpp
@@ -139,7 +139,7 @@ int NumTextColors;
// PRIVATE DATA DEFINITIONS ------------------------------------------------
-static const byte myislower[256] =
+static const BYTE myislower[256] =
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -233,7 +233,7 @@ FFont::FFont (const char *name, const char *nametemplate, int first, int count,
int i, lump;
char buffer[12];
int *charlumps;
- byte usedcolors[256], identity[256];
+ BYTE usedcolors[256], identity[256];
double *luminosity;
int maxyoffs;
bool doomtemplate = gameinfo.gametype == GAME_Doom ? strncmp (nametemplate, "STCFN", 5) == 0 : false;
@@ -405,7 +405,7 @@ FFont *FFont::FindFont (const char *name)
//
//==========================================================================
-void RecordTextureColors (FTexture *pic, byte *usedcolors)
+void RecordTextureColors (FTexture *pic, BYTE *usedcolors)
{
int x;
@@ -439,12 +439,12 @@ void RecordTextureColors (FTexture *pic, byte *usedcolors)
static int STACK_ARGS compare (const void *arg1, const void *arg2)
{
- if (RPART(GPalette.BaseColors[*((byte *)arg1)]) * 299 +
- GPART(GPalette.BaseColors[*((byte *)arg1)]) * 587 +
- BPART(GPalette.BaseColors[*((byte *)arg1)]) * 114 <
- RPART(GPalette.BaseColors[*((byte *)arg2)]) * 299 +
- GPART(GPalette.BaseColors[*((byte *)arg2)]) * 587 +
- BPART(GPalette.BaseColors[*((byte *)arg2)]) * 114)
+ if (RPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 299 +
+ GPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 587 +
+ BPART(GPalette.BaseColors[*((BYTE *)arg1)]) * 114 <
+ RPART(GPalette.BaseColors[*((BYTE *)arg2)]) * 299 +
+ GPART(GPalette.BaseColors[*((BYTE *)arg2)]) * 587 +
+ BPART(GPalette.BaseColors[*((BYTE *)arg2)]) * 114)
return -1;
else
return 1;
@@ -469,7 +469,7 @@ static int STACK_ARGS compare (const void *arg1, const void *arg2)
//
//==========================================================================
-int FFont::SimpleTranslation (byte *colorsused, byte *translation, byte *reverse, double **luminosity)
+int FFont::SimpleTranslation (BYTE *colorsused, BYTE *translation, BYTE *reverse, double **luminosity)
{
double min, max, diver;
int i, j;
@@ -530,7 +530,7 @@ void FFont::BuildTranslations (const double *luminosity, const BYTE *identity, c
const TranslationParm *parmstart = (const TranslationParm *)ranges;
BYTE *range;
- range = Ranges = new byte[NumTextColors * ActiveColors];
+ range = Ranges = new BYTE[NumTextColors * ActiveColors];
// Create different translations for different color ranges
for (i = 0; i < NumTextColors; i++)
@@ -590,7 +590,7 @@ void FFont::BuildTranslations (const double *luminosity, const BYTE *identity, c
//
//==========================================================================
-byte *FFont::GetColorTranslation (EColorRange range) const
+BYTE *FFont::GetColorTranslation (EColorRange range) const
{
if (ActiveColors == 0)
return NULL;
@@ -1330,7 +1330,7 @@ FSpecialFont::FSpecialFont (const char *name, int first, int count, int *lumplis
int i, j, lump;
char buffer[12];
int *charlumps;
- byte usedcolors[256], identity[256];
+ BYTE usedcolors[256], identity[256];
double *luminosity;
int maxyoffs;
int TotalColors;
@@ -1426,8 +1426,8 @@ FSpecialFont::FSpecialFont (const char *name, int first, int count, int *lumplis
if (ActiveColors < TotalColors)
{
int factor = 1;
- byte *oldranges = Ranges;
- Ranges = new byte[NumTextColors * TotalColors * factor];
+ BYTE *oldranges = Ranges;
+ Ranges = new BYTE[NumTextColors * TotalColors * factor];
for (i = 0; i < CR_UNTRANSLATED; i++)
{
diff --git a/src/v_font.h b/src/v_font.h
index f41dca493..cebf4dac1 100644
--- a/src/v_font.h
+++ b/src/v_font.h
@@ -85,7 +85,7 @@ public:
FTexture *GetChar (int code, int *const width) const;
int GetCharWidth (int code) const;
- byte *GetColorTranslation (EColorRange range) const;
+ BYTE *GetColorTranslation (EColorRange range) const;
int GetSpaceWidth () const { return SpaceWidth; }
int GetHeight () const { return FontHeight; }
int GetDefaultKerning () const { return GlobalKerning; }
@@ -93,15 +93,15 @@ public:
static FFont *FindFont (const char *fontname);
// Return width of string in pixels (unscaled)
- int StringWidth (const byte *str) const;
- inline int StringWidth (const char *str) const { return StringWidth ((const byte *)str); }
+ int StringWidth (const BYTE *str) const;
+ inline int StringWidth (const char *str) const { return StringWidth ((const BYTE *)str); }
protected:
FFont ();
void BuildTranslations (const double *luminosity, const BYTE *identity, const void *ranges);
- static int SimpleTranslation (byte *colorsused, byte *translation, byte *identity, double **luminosity);
+ static int SimpleTranslation (BYTE *colorsused, BYTE *translation, BYTE *identity, double **luminosity);
int FirstChar, LastChar;
int SpaceWidth;
@@ -145,7 +145,7 @@ protected:
void CreateFontFromPic (int picnum);
};
-void RecordTextureColors (FTexture *pic, byte *colorsused);
+void RecordTextureColors (FTexture *pic, BYTE *colorsused);
extern FFont *SmallFont, *SmallFont2, *BigFont, *ConFont;
diff --git a/src/v_palette.cpp b/src/v_palette.cpp
index 6f2e08f0c..94911cb4d 100644
--- a/src/v_palette.cpp
+++ b/src/v_palette.cpp
@@ -77,7 +77,7 @@ static int STACK_ARGS sortforremap2 (const void *a, const void *b);
/* Gamma correction stuff */
/**************************/
-byte newgamma[256];
+BYTE newgamma[256];
CUSTOM_CVAR (Float, Gamma, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
{
if (self == 0.f)
@@ -99,10 +99,10 @@ CUSTOM_CVAR (Float, Gamma, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
extern "C"
{
- byte BestColor_MMX (DWORD rgb, const DWORD *pal);
+ BYTE BestColor_MMX (DWORD rgb, const DWORD *pal);
}
-int BestColor (const DWORD *pal_in, int r, int g, int b, int first, int num)
+int BestColor (const uint32 *pal_in, int r, int g, int b, int first, int num)
{
#ifdef USEASM
if (CPU.bMMX)
diff --git a/src/v_palette.h b/src/v_palette.h
index 658ad70a4..39d86f4bb 100644
--- a/src/v_palette.h
+++ b/src/v_palette.h
@@ -87,7 +87,7 @@ extern FDynamicColormap NormalLight;
}
extern int Near255; // A color near 255 in appearance, but not 255
-int BestColor (const DWORD *pal, int r, int g, int b, int first = 0, int num=256);
+int BestColor (const uint32 *pal, int r, int g, int b, int first = 0, int num=256);
void InitPalette ();
diff --git a/src/v_pfx.cpp b/src/v_pfx.cpp
index 4907fc998..852379da4 100644
--- a/src/v_pfx.cpp
+++ b/src/v_pfx.cpp
@@ -65,7 +65,7 @@ static void Convert32 (BYTE *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, DWORD redMask, DWORD greenMask, DWORD blueMask)
+void PfxState::SetFormat (int bits, uint32 redMask, uint32 greenMask, uint32 blueMask)
{
switch (bits)
{
diff --git a/src/v_pfx.h b/src/v_pfx.h
index ac24c948f..7e668c9b4 100644
--- a/src/v_pfx.h
+++ b/src/v_pfx.h
@@ -58,9 +58,9 @@ struct PfxState
} Bits16;
struct
{
- DWORD Red;
- DWORD Green;
- DWORD Blue;
+ uint32 Red;
+ uint32 Green;
+ uint32 Blue;
} Bits32;
} Masks;
BYTE RedShift;
@@ -70,7 +70,7 @@ struct PfxState
BITFIELD BlueLeft:1;
BITFIELD GreenLeft:1;
- void SetFormat (int bits, DWORD redMask, DWORD greenMask, DWORD blueMask);
+ void SetFormat (int bits, uint32 redMask, uint32 greenMask, uint32 blueMask);
void (*SetPalette) (const PalEntry *pal);
void (*Convert) (BYTE *src, int srcpitch,
void *dest, int destpitch, int destwidth, int destheight,
diff --git a/src/v_text.cpp b/src/v_text.cpp
index 528b7a709..f2ae68467 100644
--- a/src/v_text.cpp
+++ b/src/v_text.cpp
@@ -57,7 +57,7 @@ void DCanvas::SetFont (FFont *font)
Font = font;
}
-void STACK_ARGS DCanvas::DrawChar (int normalcolor, int x, int y, byte character, ...)
+void STACK_ARGS DCanvas::DrawChar (int normalcolor, int x, int y, BYTE character, ...)
{
if (Font == NULL)
return;
@@ -87,16 +87,16 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
{
va_list tags;
DWORD tag;
- BOOL boolval;
+ INTBOOL boolval;
int maxstrlen = INT_MAX;
int w, maxwidth;
- const byte *ch;
+ const BYTE *ch;
int c;
int cx;
int cy;
int boldcolor;
- const byte *range;
+ const BYTE *range;
int height;
int scalex, scaley;
int kerning;
@@ -113,7 +113,7 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
height = Font->GetHeight () + 1;
kerning = Font->GetDefaultKerning ();
- ch = (const byte *)string;
+ ch = (const BYTE *)string;
cx = x;
cy = y;
@@ -159,7 +159,7 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
break;
case DTA_CleanNoMove:
- boolval = va_arg (tags, BOOL);
+ boolval = va_arg (tags, INTBOOL);
if (boolval)
{
scalex = CleanXfac;
@@ -170,7 +170,7 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
case DTA_Clean:
case DTA_320x200:
- boolval = va_arg (tags, BOOL);
+ boolval = va_arg (tags, INTBOOL);
if (boolval)
{
scalex = scaley = 1;
@@ -216,7 +216,7 @@ void STACK_ARGS DCanvas::DrawText (int normalcolor, int x, int y, const char *st
}
else if (newcolor == '[') // Named
{
- const byte *namestart = ch;
+ const BYTE *namestart = ch;
while (*ch != ']' && *ch != '\0')
{
ch++;
@@ -307,7 +307,7 @@ int FFont::StringWidth (const BYTE *string) const
//
// Break long lines of text into multiple lines no longer than maxwidth pixels
//
-static void breakit (FBrokenLines *line, const byte *start, const byte *string, bool keepspace, FString &linecolor)
+static void breakit (FBrokenLines *line, const BYTE *start, const BYTE *string, bool keepspace, FString &linecolor)
{
// Leave out trailing white space
if (!keepspace)
@@ -325,11 +325,11 @@ static void breakit (FBrokenLines *line, const byte *start, const byte *string,
line->Width = screen->Font->StringWidth (line->Text);
}
-FBrokenLines *V_BreakLines (int maxwidth, const byte *string, bool keepspace)
+FBrokenLines *V_BreakLines (int maxwidth, const BYTE *string, bool keepspace)
{
FBrokenLines lines[128]; // Support up to 128 lines (should be plenty)
- const byte *space = NULL, *start = string;
+ const BYTE *space = NULL, *start = string;
int i, c, w, nw;
FString lastcolor, linecolor;
bool lastWasSpace = false;
@@ -345,7 +345,7 @@ FBrokenLines *V_BreakLines (int maxwidth, const byte *string, bool keepspace)
{
if (*string == '[')
{
- const byte *start = string;
+ const BYTE *start = string;
while (*string != ']' && *string != '\0')
{
string++;
@@ -419,7 +419,7 @@ FBrokenLines *V_BreakLines (int maxwidth, const byte *string, bool keepspace)
if (string - start > 1)
{
- const byte *s = start;
+ const BYTE *s = start;
while (s < string)
{
diff --git a/src/v_text.h b/src/v_text.h
index 49838780c..e0e8fb8a9 100644
--- a/src/v_text.h
+++ b/src/v_text.h
@@ -73,9 +73,9 @@ struct FBrokenLines
#define TEXTCOLOR_NORMAL "\034-"
#define TEXTCOLOR_BOLD "\034+"
-FBrokenLines *V_BreakLines (int maxwidth, const byte *str, bool keepspace=false);
+FBrokenLines *V_BreakLines (int maxwidth, const BYTE *str, bool keepspace=false);
void V_FreeBrokenLines (FBrokenLines *lines);
inline FBrokenLines *V_BreakLines (int maxwidth, const char *str, bool keepspace=false)
- { return V_BreakLines (maxwidth, (const byte *)str, keepspace); }
+ { return V_BreakLines (maxwidth, (const BYTE *)str, keepspace); }
#endif //__V_TEXT_H__
diff --git a/src/v_video.cpp b/src/v_video.cpp
index 3b5392a02..47df530cc 100644
--- a/src/v_video.cpp
+++ b/src/v_video.cpp
@@ -73,7 +73,7 @@ FFont *SmallFont, *SmallFont2, *BigFont, *ConFont;
extern "C" {
DWORD *Col2RGB8_LessPrecision[65];
DWORD Col2RGB8[65][256];
-byte RGB32k[32][32][32];
+BYTE RGB32k[32][32][32];
}
static DWORD Col2RGB8_2[63][256];
@@ -103,7 +103,7 @@ CUSTOM_CVAR (Float, dimamount, 0.2f, CVAR_ARCHIVE)
CVAR (Color, dimcolor, 0xffd700, CVAR_ARCHIVE)
// [RH] Set true when vid_setmode command has been executed
-BOOL setmodeneeded = false;
+bool setmodeneeded = false;
// [RH] Resolution to change to when setmodeneeded is true
int NewWidth, NewHeight, NewBits;
@@ -186,7 +186,7 @@ void DCanvas::FlatFill (int left, int top, int right, int bottom, FTexture *src)
void DCanvas::Clear (int left, int top, int right, int bottom, int color) const
{
int x, y;
- byte *dest;
+ BYTE *dest;
dest = Buffer + top * Pitch + left;
x = right - left;
@@ -227,7 +227,7 @@ void DCanvas::Dim (PalEntry color, float damount, int x1, int y1, int w, int h)
DWORD *bg2rgb;
DWORD fg;
int gap;
- byte *spot;
+ BYTE *spot;
int x, y;
{
@@ -490,9 +490,9 @@ void DCanvas::Blit (int srcx, int srcy, int srcwidth, int srcheight,
fracystep = (srcheight << FRACBITS) / destheight;
fracxstep = (srcwidth << FRACBITS) / destwidth;
- byte *destline, *srcline;
- byte *destbuffer = dest->Buffer;
- byte *srcbuffer = Buffer;
+ BYTE *destline, *srcline;
+ BYTE *destbuffer = dest->Buffer;
+ BYTE *srcbuffer = Buffer;
if (fracxstep == FRACUNIT)
{
@@ -626,14 +626,14 @@ void DFrameBuffer::DrawRateStuff ()
// Draws frame time and cumulative fps
if (vid_fps)
{
- QWORD ms = I_MSTime ();
- DWORD howlong = DWORD(ms - LastMS);
+ DWORD ms = I_MSTime ();
+ DWORD howlong = ms - LastMS;
if (howlong > 0)
{
char fpsbuff[40];
int chars;
- chars = sprintf (fpsbuff, "%2lu ms (%3lu fps)", howlong, LastCount);
+ chars = sprintf (fpsbuff, "%2u ms (%3u fps)", howlong, LastCount);
Clear (0, screen->GetHeight() - 8, chars * 8, screen->GetHeight(), 0);
SetFont (ConFont);
DrawText (CR_WHITE, 0, screen->GetHeight() - 8, (char *)&fpsbuff[0], TAG_DONE);
@@ -817,7 +817,7 @@ bool V_SetResolution (int width, int height, int bits)
CCMD (vid_setmode)
{
- BOOL goodmode = false;
+ bool goodmode = false;
int width = 0, height = SCREENHEIGHT;
int bits = DisplayBits;
diff --git a/src/v_video.h b/src/v_video.h
index b2171f11d..660b3087d 100644
--- a/src/v_video.h
+++ b/src/v_video.h
@@ -143,10 +143,10 @@ public:
virtual void Blit (int srcx, int srcy, int srcwidth, int srcheight, DCanvas *dest, int destx, int desty, int destwidth, int destheight);
// Draw a linear block of pixels into the canvas
- virtual void DrawBlock (int x, int y, int width, int height, const byte *src) const;
+ virtual void DrawBlock (int x, int y, int width, int height, const BYTE *src) const;
// Reads a linear block of pixels into the view buffer.
- virtual void GetBlock (int x, int y, int width, int height, byte *dest) const;
+ virtual void GetBlock (int x, int y, int width, int height, BYTE *dest) const;
// Dim the entire canvas for the menus
virtual void Dim (PalEntry color = 0) const;
@@ -182,7 +182,7 @@ protected:
int Pitch;
int LockCount;
- bool ClipBox (int &left, int &top, int &width, int &height, const byte *&src, const int srcpitch) const;
+ bool ClipBox (int &left, int &top, int &width, int &height, const BYTE *&src, const int srcpitch) const;
private:
// Keep track of canvases, for automatic destruction at exit
@@ -278,7 +278,7 @@ EXTERN_CVAR (Float, Gamma)
// Translucency tables
extern "C" DWORD Col2RGB8[65][256];
-extern "C" byte RGB32k[32][32][32];
+extern "C" BYTE RGB32k[32][32][32];
extern "C" DWORD *Col2RGB8_LessPrecision[65];
// Allocates buffer screens, call before R_Init.
diff --git a/src/w_wad.cpp b/src/w_wad.cpp
index 0d2a982ea..f2342ede9 100644
--- a/src/w_wad.cpp
+++ b/src/w_wad.cpp
@@ -422,7 +422,7 @@ void FWadCollection::AddFile (const char *filename, const char * data, int lengt
wadinfo->Seek (header.wad.InfoTableOfs, SEEK_SET);
wadinfo->Read (fileinfo, header.wad.NumLumps * sizeof(wadlump_t));
NumLumps += header.wad.NumLumps;
- Printf (" (%ld lumps)", header.wad.NumLumps);
+ Printf (" (%u lumps)", header.wad.NumLumps);
}
else if (header.magic[0] == RFF_ID)
{ // This is a Blood RFF file
@@ -477,7 +477,7 @@ void FWadCollection::AddFile (const char *filename, const char * data, int lengt
lump_p++;
}
- Printf (" (%ld files)", header.rff.NumLumps);
+ Printf (" (%u files)", header.rff.NumLumps);
delete[] lumps;
}
else if (header.magic[0] == GRP_ID_0 && header.magic[1] == GRP_ID_1 && header.magic[2] == GRP_ID_2)
@@ -509,7 +509,7 @@ void FWadCollection::AddFile (const char *filename, const char * data, int lengt
lump_p->namespc = ns_global;
lump_p++;
}
- Printf (" (%ld files)", header.grp.NumLumps);
+ Printf (" (%u files)", header.grp.NumLumps);
delete[] lumps;
}
else if (header.magic[0] == ZIP_ID)
@@ -1364,7 +1364,7 @@ int FWadCollection::MergeLumps (const char *start, const char *end, int space)
int newlumps, oldlumps;
int markerpos = -1;
unsigned int i;
- BOOL insideBlock;
+ bool insideBlock;
uppercopy (ustart, start);
uppercopy (uend, end);
@@ -2022,41 +2022,6 @@ void BloodCrypt (void *data, int key, int len)
}
}
-//==========================================================================
-//
-// PrintLastError
-//
-//==========================================================================
-
-#ifdef _WIN32
-#define WIN32_LEAN_AND_MEAN
-#include
-
-static void PrintLastError ()
-{
- char *lpMsgBuf;
- FormatMessageA(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPTSTR)&lpMsgBuf,
- 0,
- NULL
- );
- Printf (TEXTCOLOR_RED " %s\n", lpMsgBuf);
- // Free the buffer.
- LocalFree( lpMsgBuf );
-}
-#else
-static void PrintLastError ()
-{
- Printf (TEXTCOLOR_RED " %s\n", strerror(errno));
-}
-#endif
-
// WadFileRecord ------------------------------------------------------------
FWadCollection::WadFileRecord::WadFileRecord (FILE *file)
@@ -2302,3 +2267,51 @@ FMemLump::~FMemLump ()
delete[] Block;
}
}
+
+//==========================================================================
+//
+// PrintLastError
+//
+//==========================================================================
+
+#ifdef _WIN32
+//#define WIN32_LEAN_AND_MEAN
+//#include
+
+extern "C" {
+__declspec(dllimport) unsigned long __stdcall FormatMessageA(
+ unsigned long dwFlags,
+ const void *lpSource,
+ unsigned long dwMessageId,
+ unsigned long dwLanguageId,
+ char **lpBuffer,
+ unsigned long nSize,
+ va_list *Arguments
+ );
+__declspec(dllimport) void * __stdcall LocalFree (void *);
+__declspec(dllimport) unsigned long __stdcall GetLastError ();
+}
+
+static void PrintLastError ()
+{
+ char *lpMsgBuf;
+ FormatMessageA(0x1300 /*FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS*/,
+ NULL,
+ GetLastError(),
+ 1 << 10 /*MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT)*/, // Default language
+ &lpMsgBuf,
+ 0,
+ NULL
+ );
+ Printf (TEXTCOLOR_RED " %s\n", lpMsgBuf);
+ // Free the buffer.
+ LocalFree( lpMsgBuf );
+}
+#else
+static void PrintLastError ()
+{
+ Printf (TEXTCOLOR_RED " %s\n", strerror(errno));
+}
+#endif
diff --git a/src/w_wad.h b/src/w_wad.h
index 35a9e11c9..588f25adf 100644
--- a/src/w_wad.h
+++ b/src/w_wad.h
@@ -170,12 +170,12 @@ public:
int CheckNumForName (const char *name, int namespc, int wadfile);
int GetNumForName (const char *name, int namespc);
- inline int CheckNumForName (const byte *name) { return CheckNumForName ((const char *)name, ns_global); }
+ inline int CheckNumForName (const BYTE *name) { return CheckNumForName ((const char *)name, ns_global); }
inline int CheckNumForName (const char *name) { return CheckNumForName (name, ns_global); }
- inline int CheckNumForName (const byte *name, int ns) { return CheckNumForName ((const char *)name, ns); }
+ inline int CheckNumForName (const BYTE *name, int ns) { return CheckNumForName ((const char *)name, ns); }
inline int GetNumForName (const char *name) { return GetNumForName (name, ns_global); }
- inline int GetNumForName (const byte *name) { return GetNumForName ((const char *)name); }
- inline int GetNumForName (const byte *name, int ns) { return GetNumForName ((const char *)name, ns); }
+ inline int GetNumForName (const BYTE *name) { return GetNumForName ((const char *)name); }
+ inline int GetNumForName (const BYTE *name, int ns) { return GetNumForName ((const char *)name, ns); }
int CheckNumForFullName (const char *name);
int CheckNumForFullName (const char *name, int wadfile);
diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp
index f1906e2da..78669c6fe 100644
--- a/src/wi_stuff.cpp
+++ b/src/wi_stuff.cpp
@@ -1071,7 +1071,7 @@ void WI_updateNoState ()
}
}
-static BOOL snl_pointeron = false;
+static bool snl_pointeron = false;
void WI_initShowNextLoc ()
{
@@ -1185,7 +1185,7 @@ void WI_updateDeathmatchStats ()
{
/*
int i, j;
- BOOL stillticking;
+ bool stillticking;
*/
WI_updateAnimatedBack();
@@ -1408,7 +1408,7 @@ void WI_updateNetgameStats ()
int i;
int fsum;
- BOOL stillticking;
+ bool stillticking;
WI_updateAnimatedBack ();
diff --git a/src/wi_stuff.h b/src/wi_stuff.h
index 643b702f0..e14d08dda 100644
--- a/src/wi_stuff.h
+++ b/src/wi_stuff.h
@@ -30,7 +30,7 @@
//
typedef struct wbplayerstruct_s
{
- BOOL in; // whether the player is in game
+ bool in; // whether the player is in game
// Player stats, kills, collected items etc.
int skills;
diff --git a/src/win32/eaxedit.cpp b/src/win32/eaxedit.cpp
index 1fb65fb61..ab0b5dfc7 100644
--- a/src/win32/eaxedit.cpp
+++ b/src/win32/eaxedit.cpp
@@ -9,6 +9,7 @@
#include
#include
+#define USE_WINDOWS_DWORD
#include "resource.h"
#include "s_sound.h"
#include "templates.h"
diff --git a/src/win32/hardware.cpp b/src/win32/hardware.cpp
index a8003e7dd..936cbedde 100644
--- a/src/win32/hardware.cpp
+++ b/src/win32/hardware.cpp
@@ -35,6 +35,7 @@
#define WIN32_LEAN_AND_MEAN
#include
+#define USE_WINDOWS_DWORD
#include "hardware.h"
#include "win32iface.h"
#include "i_video.h"
diff --git a/src/win32/i_cd.cpp b/src/win32/i_cd.cpp
index 54c65dde4..5008cf634 100644
--- a/src/win32/i_cd.cpp
+++ b/src/win32/i_cd.cpp
@@ -39,6 +39,7 @@
#include
#include
+#define USE_WINDOWS_DWORD
#include "doomtype.h"
#include "c_cvars.h"
#include "c_dispatch.h"
diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp
index f314682ac..6072be736 100644
--- a/src/win32/i_input.cpp
+++ b/src/win32/i_input.cpp
@@ -74,6 +74,7 @@
#include
#endif
+#define USE_WINDOWS_DWORD
#include "c_dispatch.h"
#include "doomtype.h"
#include "doomdef.h"
@@ -362,7 +363,7 @@ static int ActiveDIKState;
static void SetSoundPaused (int state);
// Convert DIK_* code to ASCII using Qwerty keymap
-static const byte Convert [256] =
+static const BYTE Convert [256] =
{
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', 8, 9, // 0
@@ -1401,7 +1402,7 @@ static BOOL I_GetDIMouse ()
return TRUE;
}
-BOOL I_InitInput (void *hwnd)
+bool I_InitInput (void *hwnd)
{
HRESULT hr;
diff --git a/src/win32/i_input.h b/src/win32/i_input.h
index 7f300d2d0..b75caa153 100644
--- a/src/win32/i_input.h
+++ b/src/win32/i_input.h
@@ -36,7 +36,7 @@
#include "doomtype.h"
-BOOL I_InitInput (void *hwnd);
+bool I_InitInput (void *hwnd);
void I_ShutdownInput ();
void I_PutInClipboard (const char *str);
char *I_GetFromClipboard ();
diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp
index 4fb7e33b7..c79bdb8e0 100644
--- a/src/win32/i_main.cpp
+++ b/src/win32/i_main.cpp
@@ -45,6 +45,7 @@
#include
#include
+#define USE_WINDOWS_DWORD
#include "doomerrors.h"
#include "hardware.h"
diff --git a/src/win32/i_movie.cpp b/src/win32/i_movie.cpp
index b3b607d25..598510eef 100644
--- a/src/win32/i_movie.cpp
+++ b/src/win32/i_movie.cpp
@@ -32,12 +32,15 @@
*/
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- * If you do not have dshow.h, either download the latest DirectX SDK from
- *
+ * If you do not have dshow.h, either download the latest DirectX SDK
* or #define I_DO_NOT_LIKE_BIG_DOWNLOADS
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
+#define WIN32_LEAN_AND_MEAN
+#include
+#define USE_WINDOWS_DWORD
+
#include "c_cvars.h"
CUSTOM_CVAR (Float, snd_movievolume, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
@@ -59,11 +62,7 @@ int I_PlayMovie (const char *movie)
#else
-#define WIN32_LEAN_AND_MEAN
-
-#include
#include
-
#include "i_movie.h"
#include "i_sound.h"
#include "v_video.h"
diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp
index fb0125f96..2154da292 100644
--- a/src/win32/i_system.cpp
+++ b/src/win32/i_system.cpp
@@ -36,6 +36,7 @@
#include
#include
+#define USE_WINDOWS_DWORD
#include "hardware.h"
#include "doomerrors.h"
#include
@@ -81,7 +82,7 @@ UINT TimerPeriod;
UINT TimerEventID;
UINT MillisecondsPerTic;
HANDLE NewTicArrived;
-DWORD LanguageIDs[4];
+uint32 LanguageIDs[4];
void CalculateCPUSpeed ();
int (*I_GetTime) (bool saveMS);
@@ -151,7 +152,7 @@ int I_WaitForTicPolled (int prevtic)
static int tics;
-DWORD ted_start, ted_next;
+static DWORD ted_start, ted_next;
int I_GetTimeEventDriven (bool saveMS)
{
@@ -182,7 +183,7 @@ void CALLBACK TimerTicked (UINT id, UINT msg, DWORD user, DWORD dw1, DWORD dw2)
}
// Returns the fractional amount of a tic passed since the most recent tic
-fixed_t I_GetTimeFrac (DWORD *ms)
+fixed_t I_GetTimeFrac (uint32 *ms)
{
DWORD now = timeGetTime();
if (ms) *ms = TicNext;
@@ -505,7 +506,7 @@ void I_Quit (void)
// I_Error
//
extern FILE *Logfile;
-BOOL gameisdead;
+bool gameisdead;
void STACK_ARGS I_FatalError (const char *error, ...)
{
@@ -519,8 +520,6 @@ void STACK_ARGS I_FatalError (const char *error, ...)
va_list argptr;
va_start (argptr, error);
index = vsprintf (errortext, error, argptr);
-// GetLastError() is usually useless because we don't do a lot of Win32 stuff
-// sprintf (errortext + index, "\nGetLastError = %ld", GetLastError());
va_end (argptr);
// Record error to log (if logging)
diff --git a/src/win32/i_system.h b/src/win32/i_system.h
index 7f8772e83..333282792 100644
--- a/src/win32/i_system.h
+++ b/src/win32/i_system.h
@@ -35,7 +35,7 @@ enum
LANGIDX_SysPreferred,
LANGIDX_SysDefault
};
-extern DWORD LanguageIDs[4];
+extern uint32 LanguageIDs[4];
extern void SetLanguageIDs ();
// [RH] Detects the OS the game is running under.
@@ -138,7 +138,7 @@ extern int (*I_WaitForTic) (int);
int I_GetTimePolled (bool saveMS);
int I_GetTimeFake (void);
-fixed_t I_GetTimeFrac (DWORD *ms);
+fixed_t I_GetTimeFrac (uint32 *ms);
//
diff --git a/src/win32/win32video.cpp b/src/win32/win32video.cpp
index 9c069d005..8820a05cf 100644
--- a/src/win32/win32video.cpp
+++ b/src/win32/win32video.cpp
@@ -42,7 +42,7 @@
#include
#include
-#define __BYTEBOOL__
+#define USE_WINDOWS_DWORD
#include "doomtype.h"
#include "c_dispatch.h"
@@ -1161,7 +1161,7 @@ void DDrawFB::RebuildColorTable ()
}
for (i = 0; i < 256; i++)
{
- GPfxPal.Pal8[i] = BestColor ((DWORD *)syspal, PalEntries[i].peRed,
+ GPfxPal.Pal8[i] = BestColor ((uint32 *)syspal, PalEntries[i].peRed,
PalEntries[i].peGreen, PalEntries[i].peBlue);
}
}
@@ -1713,10 +1713,12 @@ CCMD (vid_speedtest)
}
}
-ADD_STAT (blit, out)
+ADD_STAT (blit)
{
- sprintf (out,
+ FString out;
+ out.Format (
"blit=%04.1f ms",
(double)BlitCycles * SecondsPerCycle * 1000
);
+ return out;
}
diff --git a/src/zstring.h b/src/zstring.h
index 97059f147..bf67d7f4d 100644
--- a/src/zstring.h
+++ b/src/zstring.h
@@ -7,6 +7,12 @@
#include
#include "tarray.h"
+#ifdef __GNUC__
+#define PRINTFISH(x) __attribute__((format(printf, 2, x)))
+#else
+#define PRINTFISH(x)
+#endif
+
struct FStringData
{
unsigned int Len; // Length of string, excluding terminating null
@@ -166,10 +172,10 @@ public:
void Substitute (const char *oldstr, const char *newstr);
void Substitute (const char *oldstr, const char *newstr, size_t oldstrlen, size_t newstrlen);
- void Format (const char *fmt, ...);
- void AppendFormat (const char *fmt, ...);
- void VFormat (const char *fmt, va_list arglist);
- void VAppendFormat (const char *fmt, va_list arglist);
+ void Format (const char *fmt, ...) PRINTFISH(3);
+ void AppendFormat (const char *fmt, ...) PRINTFISH(3);
+ void VFormat (const char *fmt, va_list arglist) PRINTFISH(0);
+ void VAppendFormat (const char *fmt, va_list arglist) PRINTFISH(0);
bool IsInt () const;
bool IsFloat () const;
@@ -235,4 +241,6 @@ namespace StringFormat
int Worker (OutputFunc output, void *outputData, const char *fmt, ...);
};
+#undef PRINTFISH
+
#endif
diff --git a/zdoom.sln b/zdoom.sln
index 04e17b71f..e8a222603 100644
--- a/zdoom.sln
+++ b/zdoom.sln
@@ -4,10 +4,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zdoom", "zdoom.vcproj", "{8
ProjectSection(ProjectDependencies) = postProject
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466} = {AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}
{1D179D4B-F008-431B-8C72-111F8372584F} = {1D179D4B-F008-431B-8C72-111F8372584F}
- {873F2EEA-24DF-454C-B245-CB9738BA993E} = {873F2EEA-24DF-454C-B245-CB9738BA993E}
- {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E} = {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}
- {6077B7D6-349F-4077-B552-3BC302EF5859} = {6077B7D6-349F-4077-B552-3BC302EF5859}
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63} = {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}
+ {6077B7D6-349F-4077-B552-3BC302EF5859} = {6077B7D6-349F-4077-B552-3BC302EF5859}
+ {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E} = {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}
+ {873F2EEA-24DF-454C-B245-CB9738BA993E} = {873F2EEA-24DF-454C-B245-CB9738BA993E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib\zlib.vcproj", "{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}"
@@ -20,9 +20,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "re2c", "tools\re2c\re2c.vcp
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wadsrc", "wadsrc\wadsrc.vcproj", "{1D179D4B-F008-431B-8C72-111F8372584F}"
ProjectSection(ProjectDependencies) = postProject
- {3FFA68B3-9449-4B03-ADEE-194C3638623B} = {3FFA68B3-9449-4B03-ADEE-194C3638623B}
- {AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8} = {AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8}
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3} = {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}
+ {AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8} = {AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8}
+ {3FFA68B3-9449-4B03-ADEE-194C3638623B} = {3FFA68B3-9449-4B03-ADEE-194C3638623B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makewad", "tools\makewad\makewad.vcproj", "{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}"
@@ -34,8 +34,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xlatcc", "tools\xlatcc\xlat
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dehsupp", "tools\dehsupp\dehsupp.vcproj", "{AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8}"
ProjectSection(ProjectDependencies) = postProject
- {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E} = {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}
{0F80ACBF-460E-44F0-B28E-B3272D1774A7} = {0F80ACBF-460E-44F0-B28E-B3272D1774A7}
+ {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E} = {667D2EE7-C357-49E2-9BAB-0A4A45F0F76E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "updaterevision", "tools\updaterevision\updaterevision.vcproj", "{6077B7D6-349F-4077-B552-3BC302EF5859}"
@@ -52,28 +52,28 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8049475B-5C87-46F9-9358-635218A4EF18}.Debug|Win32.ActiveCfg = Debug|Win32
{8049475B-5C87-46F9-9358-635218A4EF18}.Debug|Win32.Build.0 = Debug|Win32
- {8049475B-5C87-46F9-9358-635218A4EF18}.Debug|x64.ActiveCfg = Release|x64
- {8049475B-5C87-46F9-9358-635218A4EF18}.Debug|x64.Build.0 = Release|x64
+ {8049475B-5C87-46F9-9358-635218A4EF18}.Debug|x64.ActiveCfg = Debug|x64
+ {8049475B-5C87-46F9-9358-635218A4EF18}.Debug|x64.Build.0 = Debug|x64
{8049475B-5C87-46F9-9358-635218A4EF18}.Release|Win32.ActiveCfg = Release|Win32
{8049475B-5C87-46F9-9358-635218A4EF18}.Release|Win32.Build.0 = Release|Win32
- {8049475B-5C87-46F9-9358-635218A4EF18}.Release|x64.ActiveCfg = Release|x64
- {8049475B-5C87-46F9-9358-635218A4EF18}.Release|x64.Build.0 = Release|x64
+ {8049475B-5C87-46F9-9358-635218A4EF18}.Release|x64.ActiveCfg = Debug|x64
+ {8049475B-5C87-46F9-9358-635218A4EF18}.Release|x64.Build.0 = Debug|x64
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|Win32.ActiveCfg = Debug|Win32
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|Win32.Build.0 = Debug|Win32
- {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|x64.ActiveCfg = Release|x64
- {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|x64.Build.0 = Release|x64
+ {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|x64.ActiveCfg = Debug|x64
+ {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Debug|x64.Build.0 = Debug|x64
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|Win32.ActiveCfg = Release|Win32
{F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|Win32.Build.0 = Release|Win32
- {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|x64.ActiveCfg = Release|x64
- {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|x64.Build.0 = Release|x64
+ {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|x64.ActiveCfg = Debug|x64
+ {F9D9E7D4-E1A2-4866-9E85-B1B14137EE63}.Release|x64.Build.0 = Debug|x64
{873F2EEA-24DF-454C-B245-CB9738BA993E}.Debug|Win32.ActiveCfg = Debug|Win32
{873F2EEA-24DF-454C-B245-CB9738BA993E}.Debug|Win32.Build.0 = Debug|Win32
- {873F2EEA-24DF-454C-B245-CB9738BA993E}.Debug|x64.ActiveCfg = Release|x64
- {873F2EEA-24DF-454C-B245-CB9738BA993E}.Debug|x64.Build.0 = Release|x64
+ {873F2EEA-24DF-454C-B245-CB9738BA993E}.Debug|x64.ActiveCfg = Debug|x64
+ {873F2EEA-24DF-454C-B245-CB9738BA993E}.Debug|x64.Build.0 = Debug|x64
{873F2EEA-24DF-454C-B245-CB9738BA993E}.Release|Win32.ActiveCfg = Release|Win32
{873F2EEA-24DF-454C-B245-CB9738BA993E}.Release|Win32.Build.0 = Release|Win32
- {873F2EEA-24DF-454C-B245-CB9738BA993E}.Release|x64.ActiveCfg = Release|x64
- {873F2EEA-24DF-454C-B245-CB9738BA993E}.Release|x64.Build.0 = Release|x64
+ {873F2EEA-24DF-454C-B245-CB9738BA993E}.Release|x64.ActiveCfg = Debug|x64
+ {873F2EEA-24DF-454C-B245-CB9738BA993E}.Release|x64.Build.0 = Debug|x64
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Debug|Win32.ActiveCfg = Debug|Win32
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Debug|Win32.Build.0 = Debug|Win32
{0F80ACBF-460E-44F0-B28E-B3272D1774A7}.Debug|x64.ActiveCfg = Release|Win32
@@ -100,12 +100,12 @@ Global
{1D179D4B-F008-431B-8C72-111F8372584F}.Release|x64.Build.0 = Release|Win32
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|Win32.ActiveCfg = Debug|Win32
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|Win32.Build.0 = Debug|Win32
- {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|x64.ActiveCfg = Release|x64
- {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|x64.Build.0 = Release|x64
+ {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|x64.ActiveCfg = Debug|x64
+ {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Debug|x64.Build.0 = Debug|x64
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|Win32.ActiveCfg = Release|Win32
{24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|Win32.Build.0 = Release|Win32
- {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|x64.ActiveCfg = Release|x64
- {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|x64.Build.0 = Release|x64
+ {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|x64.ActiveCfg = Debug|x64
+ {24A19C02-F041-4AB0-A1A1-02E1E88EDBD3}.Release|x64.Build.0 = Debug|x64
{3FFA68B3-9449-4B03-ADEE-194C3638623B}.Debug|Win32.ActiveCfg = Debug|Win32
{3FFA68B3-9449-4B03-ADEE-194C3638623B}.Debug|Win32.Build.0 = Debug|Win32
{3FFA68B3-9449-4B03-ADEE-194C3638623B}.Debug|x64.ActiveCfg = Release|Win32
@@ -124,18 +124,18 @@ Global
{AC64EE8F-F019-4A3E-BCAF-BD1FD072B9C8}.Release|x64.Build.0 = Release|Win32
{6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|Win32.ActiveCfg = Debug|Win32
{6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|Win32.Build.0 = Debug|Win32
- {6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|x64.ActiveCfg = Release|Win32
- {6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|x64.Build.0 = Release|Win32
+ {6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|x64.ActiveCfg = Debug|x64
+ {6077B7D6-349F-4077-B552-3BC302EF5859}.Debug|x64.Build.0 = Debug|x64
{6077B7D6-349F-4077-B552-3BC302EF5859}.Release|Win32.ActiveCfg = Release|Win32
{6077B7D6-349F-4077-B552-3BC302EF5859}.Release|Win32.Build.0 = Release|Win32
- {6077B7D6-349F-4077-B552-3BC302EF5859}.Release|x64.ActiveCfg = Release|Win32
- {6077B7D6-349F-4077-B552-3BC302EF5859}.Release|x64.Build.0 = Release|Win32
+ {6077B7D6-349F-4077-B552-3BC302EF5859}.Release|x64.ActiveCfg = Debug|x64
+ {6077B7D6-349F-4077-B552-3BC302EF5859}.Release|x64.Build.0 = Debug|x64
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Debug|Win32.ActiveCfg = Debug|Win32
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Debug|Win32.Build.0 = Debug|Win32
- {AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Debug|x64.ActiveCfg = Debug|Win32
+ {AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Debug|x64.ActiveCfg = Debug|x64
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Release|Win32.ActiveCfg = Release|Win32
{AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Release|Win32.Build.0 = Release|Win32
- {AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Release|x64.ActiveCfg = Release|Win32
+ {AC3F5340-40CB-4C3A-8AA7-CB7158DB4466}.Release|x64.ActiveCfg = Debug|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/zdoom.vcproj b/zdoom.vcproj
index dc48972a2..db0931253 100644
--- a/zdoom.vcproj
+++ b/zdoom.vcproj
@@ -4427,10 +4427,6 @@
RelativePath=".\src\d_protocol.h"
>
-
-