mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-27 22:42:29 +00:00
- 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. SVN r326 (trunk)
This commit is contained in:
parent
06630b0fee
commit
c412b42703
175 changed files with 1488 additions and 1340 deletions
|
@ -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
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
|
@ -142,6 +145,135 @@
|
|||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
EnableIntrinsicFunctions="true"
|
||||
OmitFramePointers="true"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
CallingConvention="1"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
|
|
@ -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<<WEIGHTBITS)
|
||||
#define WEIGHTMASK (NUMWEIGHTS-1)
|
||||
static byte antialias[NUMALIASES][NUMWEIGHTS];
|
||||
static BYTE antialias[NUMALIASES][NUMWEIGHTS];
|
||||
|
||||
|
||||
|
||||
void AM_rotatePoint (fixed_t *x, fixed_t *y);
|
||||
void AM_rotate (fixed_t *x, fixed_t *y, angle_t an);
|
||||
|
||||
void DrawWuLine (int X0, int Y0, int X1, int Y1, byte *BaseColor);
|
||||
void DrawTransWuLine (int X0, int Y0, int X1, int Y1, byte BaseColor);
|
||||
void DrawWuLine (int X0, int Y0, int X1, int Y1, BYTE *BaseColor);
|
||||
void DrawTransWuLine (int X0, int Y0, int X1, int Y1, BYTE BaseColor);
|
||||
|
||||
// Calculates the slope and slope according to the x-axis of a line
|
||||
// segment in map coordinates (with the upright y-axis n' all) so
|
||||
|
@ -612,7 +612,7 @@ static void GetComponents (int color, DWORD *palette, float &r, float &g, float
|
|||
b = (float)BPART(color);
|
||||
}
|
||||
|
||||
static void AM_initColors (BOOL overlayed)
|
||||
static void AM_initColors (bool overlayed)
|
||||
{
|
||||
static DWORD *lastpal = NULL;
|
||||
static int lastback = -1;
|
||||
|
@ -891,9 +891,9 @@ void AM_ToggleMap ()
|
|||
//
|
||||
// Handle events (user inputs) in automap mode
|
||||
//
|
||||
BOOL AM_Responder (event_t *ev)
|
||||
bool AM_Responder (event_t *ev)
|
||||
{
|
||||
int rc;
|
||||
bool rc;
|
||||
static int cheatstate = 0;
|
||||
static int bigstate = 0;
|
||||
|
||||
|
@ -1120,7 +1120,7 @@ void AM_clearFB (int color)
|
|||
// faster reject and precalculated slopes. If the speed is needed,
|
||||
// use a hash algorithm to handle the common cases.
|
||||
//
|
||||
BOOL AM_clipMline (mline_t *ml, fline_t *fl)
|
||||
bool AM_clipMline (mline_t *ml, fline_t *fl)
|
||||
{
|
||||
enum {
|
||||
LEFT =1,
|
||||
|
@ -1293,7 +1293,7 @@ void AM_drawFline (fline_t *fl, int color)
|
|||
if (ax > 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 ()
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1160,15 +1160,15 @@ void FilterCompactCVars (TArray<FBaseCVar *> &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<FBaseCVar *> 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;
|
||||
|
|
|
@ -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<FBaseCVar *> &cvars, DWORD filter);
|
||||
friend void FilterCompactCVars (TArray<FBaseCVar *> &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<FBaseCVar *> &cvars, DWORD filter);
|
||||
void FilterCompactCVars (TArray<FBaseCVar *> &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); }
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
// cmdlib.c (mostly borrowed from the Q2 source)
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <direct.h>
|
||||
#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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
14
src/d_net.h
14
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 ();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 <assert.h>
|
||||
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;
|
||||
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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:$
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 <stdint.h>
|
||||
|
||||
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__
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 ();
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
int wipe_StartScreen (int type);
|
||||
int wipe_EndScreen (void);
|
||||
int wipe_ScreenWipe (int ticks);
|
||||
bool wipe_ScreenWipe (int ticks);
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ void A_ThrustImpale (AActor *);
|
|||
|
||||
AActor *tsthing;
|
||||
|
||||
BOOL PIT_ThrustStompThing (AActor *thing)
|
||||
bool PIT_ThrustStompThing (AActor *thing)
|
||||
{
|
||||
fixed_t blockdist;
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ static FRandom pr_classchoice ("RandomPlayerClassChoice");
|
|||
|
||||
TArray<EndSequence> 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)
|
||||
{
|
||||
|
|
|
@ -249,7 +249,7 @@ enum EndTypes
|
|||
|
||||
struct EndSequence
|
||||
{
|
||||
byte EndType;
|
||||
BYTE EndType;
|
||||
char PicName[9];
|
||||
};
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <lmcons.h>
|
||||
#include <shlobj.h>
|
||||
extern HWND Window;
|
||||
#define USE_WINDOWS_DWORD
|
||||
#endif
|
||||
|
||||
#include "doomdef.h"
|
||||
|
|
4
src/gi.h
4
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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
# include <sys/ioctl.h>
|
||||
#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);
|
||||
|
||||
|
||||
//
|
||||
|
|
|
@ -461,7 +461,7 @@ CCMD (dumpmapthings)
|
|||
FDoomEdMap::DumpMapThings ();
|
||||
}
|
||||
|
||||
BOOL CheckCheatmode ();
|
||||
bool CheckCheatmode ();
|
||||
|
||||
CCMD (summon)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#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 ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
#else
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -162,7 +162,7 @@ typedef struct
|
|||
|
||||
extern TArray<intercept_t> 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<AActor *> &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<AActor *> &checkarray, AActor *start=NULL);
|
||||
|
||||
|
||||
#define PT_ADDLINES 1
|
||||
|
@ -228,14 +228,14 @@ BOOL P_BlockThingsIterator (int x, int y, BOOL(*func)(AActor*), TArray<AActor *>
|
|||
|
||||
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<line_t *> 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
|
||||
|
|
|
@ -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<AActor *> 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<AActor *> 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] ||
|
||||
|
|
|
@ -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<AActor *> &checkarray, AActor *actor)
|
||||
bool P_BlockThingsIterator (int x, int y, bool(*func)(AActor*), TArray<AActor *> &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<AActor *>
|
|||
TArray<intercept_t> 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<AActor *> pathbt;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
19
src/p_spec.h
19
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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 -------------------------------------------------
|
||||
|
||||
TArray<byte>TerrainTypes;
|
||||
TArray<BYTE> TerrainTypes;
|
||||
TArray<FSplashDef> Splashes;
|
||||
TArray<FTerrainDef> 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:
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "tarray.h"
|
||||
#include "name.h"
|
||||
|
||||
extern TArray<byte> TerrainTypes;
|
||||
extern TArray<BYTE> 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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue