mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Fixed GCC 4 warnings in FNodeBuilder::CreateSubsectorsForReal().
- Changed f_finale.cpp/atkstates[] into a static variable, since its anonymous type prevents it from being accessed from other files anyway. - Fixed: The behavior of the eventtail advancement in d_net.cpp/CheckAbort() was compiler-dependant. - Fixed warnings GCC 4 threw up while compiling re2c and lemon. - Removed __cdecl from makewad.c again. This is already defined as a builtin for MinGW, and redefining it produces a warning. (Why is main explicitly declared __cdecl anyway?) - Fixed building ccdv-win32 with GCC 4. GCC 4 creates a memcpy call, which won't work because it doesn't get linked with the standard C library. SVN r135 (trunk)
This commit is contained in:
parent
62b7dd3efc
commit
df799ade24
23 changed files with 2914 additions and 2169 deletions
|
@ -35,7 +35,7 @@ RELEASEOBJDIR = releaseobj
|
|||
|
||||
CCDV = @ccdv
|
||||
|
||||
FMODDIR = c:/fmods/fmodapi374win
|
||||
FMODDIR = "c:/program files/fmodapi375win"
|
||||
|
||||
CPPFLAGS = -DWIN32 -D_WIN32 -D_WINDOWS -DHAVE_STRUPR -DHAVE_FILELENGTH -DI_DO_NOT_LIKE_BIG_DOWNLOADS -D__forceinline=inline -MMD -Izlib -IFLAC -Isrc -Isrc/win32 -Isrc/g_doom -Isrc/g_heretic -I src/g_hexen -Isrc/g_raven -Isrc/g_strife -Isrc/g_shared -Isrc/oplsynth -Isrc/sound
|
||||
LDFLAGS += flac/libflac.a zlib/libz.a -lfmod -lwsock32 -lwinmm -lddraw -ldsound -ldxguid -ldinput8 -lole32 -luser32 -lgdi32 -lcomctl32 -lcomdlg32 -lsetupapi -lws2_32 -Wl,--subsystem,windows
|
||||
|
|
12
ccdv-win32.c
12
ccdv-win32.c
|
@ -77,7 +77,7 @@ static void DumpFormattedOutput()
|
|||
DWORD out;
|
||||
WORD color;
|
||||
char *cp;
|
||||
char spaces[8 + 1] = " ";
|
||||
char spaces[8 + 1];
|
||||
char *saved;
|
||||
int curcol;
|
||||
int i;
|
||||
|
@ -89,6 +89,16 @@ static void DumpFormattedOutput()
|
|||
return;
|
||||
}
|
||||
|
||||
spaces[0] = ' ';
|
||||
spaces[1] = ' ';
|
||||
spaces[2] = ' ';
|
||||
spaces[3] = ' ';
|
||||
spaces[4] = ' ';
|
||||
spaces[5] = ' ';
|
||||
spaces[6] = ' ';
|
||||
spaces[7] = ' ';
|
||||
spaces[8] = '\0';
|
||||
|
||||
color = info.wAttributes & ~(FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY);
|
||||
curcol = 0;
|
||||
saved = NULL;
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
May 21, 2006
|
||||
- Fixed GCC 4 warnings in FNodeBuilder::CreateSubsectorsForReal().
|
||||
- Changed f_finale.cpp/atkstates[] into a static variable, since its
|
||||
anonymous type prevents it from being accessed from other files anyway.
|
||||
- Fixed: The behavior of the eventtail advancement in d_net.cpp/CheckAbort()
|
||||
was compiler-dependant.
|
||||
- Fixed warnings GCC 4 threw up while compiling re2c and lemon.
|
||||
- Removed __cdecl from makewad.c again. This is already defined as a builtin
|
||||
for MinGW, and redefining it produces a warning. (Why is main explicitly
|
||||
declared __cdecl anyway?)
|
||||
- Fixed building ccdv-win32 with GCC 4. GCC 4 creates a memcpy call, which
|
||||
won't work because it doesn't get linked with the standard C library.
|
||||
|
||||
May 20, 2006
|
||||
- Fixed default.cbd and Makefile.mingw for current code state.
|
||||
- New: Pausing the game (through any means, not just the pause key) now pauses
|
||||
|
|
|
@ -336,11 +336,11 @@ private:
|
|||
Span DummySpan[2];
|
||||
int LumpNum;
|
||||
};
|
||||
|
||||
static FAutomapTexture *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 FAutomapTexture *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;
|
||||
|
||||
|
||||
|
@ -543,22 +543,22 @@ static void AM_ClipRotatedExtents ()
|
|||
|
||||
static void AM_ScrollParchment (fixed_t dmapx, fixed_t dmapy)
|
||||
{
|
||||
mapxstart -= MulScale12 (dmapx, scale_mtof);
|
||||
mapystart -= MulScale12 (dmapy, scale_mtof);
|
||||
|
||||
if (mapback != NULL)
|
||||
{
|
||||
int pwidth = mapback->GetWidth() << MAPBITS;
|
||||
int pheight = mapback->GetHeight() << MAPBITS;
|
||||
|
||||
while(mapxstart > 0)
|
||||
mapxstart -= pwidth;
|
||||
while(mapxstart <= -pwidth)
|
||||
mapxstart += pwidth;
|
||||
while(mapystart > 0)
|
||||
mapystart -= pheight;
|
||||
while(mapystart <= -pheight)
|
||||
mapystart += pheight;
|
||||
mapxstart -= MulScale12 (dmapx, scale_mtof);
|
||||
mapystart -= MulScale12 (dmapy, scale_mtof);
|
||||
|
||||
if (mapback != NULL)
|
||||
{
|
||||
int pwidth = mapback->GetWidth() << MAPBITS;
|
||||
int pheight = mapback->GetHeight() << MAPBITS;
|
||||
|
||||
while(mapxstart > 0)
|
||||
mapxstart -= pwidth;
|
||||
while(mapxstart <= -pwidth)
|
||||
mapxstart += pwidth;
|
||||
while(mapystart > 0)
|
||||
mapystart -= pheight;
|
||||
while(mapystart <= -pheight)
|
||||
mapystart += pheight;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1066,15 +1066,15 @@ void AM_doFollowPlayer ()
|
|||
m_x2 = m_x + m_w;
|
||||
m_y2 = m_y + m_h;
|
||||
|
||||
// do the parallax parchment scrolling.
|
||||
sx = (players[consoleplayer].camera->x - f_oldloc.x) >> FRACTOMAPBITS;
|
||||
sy = (f_oldloc.y - players[consoleplayer].camera->y) >> FRACTOMAPBITS;
|
||||
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
|
||||
{
|
||||
AM_rotate (&sx, &sy, players[consoleplayer].camera->angle - ANG90);
|
||||
}
|
||||
AM_ScrollParchment (sx, sy);
|
||||
|
||||
// do the parallax parchment scrolling.
|
||||
sx = (players[consoleplayer].camera->x - f_oldloc.x) >> FRACTOMAPBITS;
|
||||
sy = (f_oldloc.y - players[consoleplayer].camera->y) >> FRACTOMAPBITS;
|
||||
if (am_rotate == 1 || (am_rotate == 2 && viewactive))
|
||||
{
|
||||
AM_rotate (&sx, &sy, players[consoleplayer].camera->angle - ANG90);
|
||||
}
|
||||
AM_ScrollParchment (sx, sy);
|
||||
|
||||
f_oldloc.x = players[consoleplayer].camera->x;
|
||||
f_oldloc.y = players[consoleplayer].camera->y;
|
||||
}
|
||||
|
@ -1114,18 +1114,18 @@ void AM_clearFB (int color)
|
|||
}
|
||||
else
|
||||
{
|
||||
int pwidth = mapback->GetWidth();
|
||||
int pheight = mapback->GetHeight();
|
||||
int x, y;
|
||||
|
||||
//blit the automap background to the screen.
|
||||
for (y = mapystart >> MAPBITS; y < f_h; y += pheight)
|
||||
{
|
||||
for (x = mapxstart >> MAPBITS; x < f_w; x += pwidth)
|
||||
{
|
||||
screen->DrawTexture (mapback, x, y, DTA_ClipBottom, f_h, TAG_DONE);
|
||||
}
|
||||
}
|
||||
int pwidth = mapback->GetWidth();
|
||||
int pheight = mapback->GetHeight();
|
||||
int x, y;
|
||||
|
||||
//blit the automap background to the screen.
|
||||
for (y = mapystart >> MAPBITS; y < f_h; y += pheight)
|
||||
{
|
||||
for (x = mapxstart >> MAPBITS; x < f_w; x += pwidth)
|
||||
{
|
||||
screen->DrawTexture (mapback, x, y, DTA_ClipBottom, f_h, TAG_DONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -733,7 +733,7 @@ CCMD(monster)
|
|||
if (CheckCheatmode ()) return;
|
||||
TThinkerIterator<AActor> it;
|
||||
|
||||
while (mo=it.Next())
|
||||
while ( (mo = it.Next()) )
|
||||
{
|
||||
if (mo->flags3&MF3_ISMONSTER && !(mo->flags&MF_CORPSE) && !(mo->flags&MF_FRIENDLY))
|
||||
{
|
||||
|
@ -756,7 +756,7 @@ CCMD(items)
|
|||
if (CheckCheatmode ()) return;
|
||||
TThinkerIterator<AActor> it;
|
||||
|
||||
while (mo=it.Next())
|
||||
while ( (mo = it.Next()) )
|
||||
{
|
||||
if (mo->IsKindOf(RUNTIME_CLASS(AInventory)) && mo->flags&MF_SPECIAL)
|
||||
{
|
||||
|
|
|
@ -1272,7 +1272,7 @@ BOOL CheckAbort (void)
|
|||
I_WaitForTic (I_GetTime (false) + TICRATE/4);
|
||||
I_StartTic ();
|
||||
for ( ; eventtail != eventhead
|
||||
; eventtail = (++eventtail)&(MAXEVENTS-1) )
|
||||
; eventtail = (eventtail+1)&(MAXEVENTS-1) )
|
||||
{
|
||||
ev = &events[eventtail];
|
||||
if (ev->type == EV_KeyDown && ev->data1 == KEY_ESCAPE)
|
||||
|
|
|
@ -478,7 +478,7 @@ castinfo_t castorder[] =
|
|||
{0, NULL}
|
||||
};
|
||||
|
||||
struct
|
||||
static struct
|
||||
{
|
||||
const char *type;
|
||||
byte melee;
|
||||
|
|
|
@ -172,6 +172,10 @@ void FNodeBuilder::CreateSubsectorsForReal ()
|
|||
unsigned int i;
|
||||
|
||||
sub.poly = NULL;
|
||||
sub.validcount = 0;
|
||||
sub.CenterX = 0; // Code in p_setup.cpp will set these for us later.
|
||||
sub.CenterY = 0;
|
||||
sub.sector = NULL;
|
||||
|
||||
for (i = 0; i < SubsectorSets.Size(); ++i)
|
||||
{
|
||||
|
|
|
@ -333,7 +333,7 @@ void FNodeBuilder::FindPolyContainers (TArray<FPolyStart> &spots, TArray<FPolySt
|
|||
|
||||
if (GetPolyExtents (spot->polynum, bbox))
|
||||
{
|
||||
FPolyStart *anchor;
|
||||
FPolyStart *anchor = NULL;
|
||||
|
||||
unsigned int j;
|
||||
|
||||
|
|
|
@ -96,6 +96,8 @@ struct OPLdata {
|
|||
};
|
||||
|
||||
struct OPLio {
|
||||
virtual ~OPLio() {}
|
||||
|
||||
void OPLwriteChannel(uint regbase, uint channel, uchar data1, uchar data2);
|
||||
void OPLwriteValue(uint regbase, uint channel, uchar value);
|
||||
void OPLwriteFreq(uint channel, uint freq, uint octave, uint keyon);
|
||||
|
|
|
@ -273,7 +273,7 @@ void MessagePump (const SDL_Event &sev)
|
|||
else
|
||||
{ // set focus
|
||||
if (!paused)
|
||||
S_ResumeSound (false);
|
||||
S_ResumeSound ();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -3014,7 +3014,7 @@ static void ActorFlagSetOrReset (AActor *defaults, Baggage &bag)
|
|||
SC_MustGetString ();
|
||||
part2 = sc_String;
|
||||
}
|
||||
if (fd = FindFlag (bag.Info->Class, part1.GetChars(), part2))
|
||||
if ( (fd = FindFlag (bag.Info->Class, part1.GetChars(), part2)) )
|
||||
{
|
||||
DWORD * flagvar = (DWORD*) ((char*)defaults + fd->structoffset);
|
||||
if (mod == '+')
|
||||
|
|
|
@ -1530,7 +1530,7 @@ void A_KillChildren(AActor * self)
|
|||
TThinkerIterator<AActor> it;
|
||||
AActor * mo;
|
||||
|
||||
while (mo=it.Next())
|
||||
while ( (mo = it.Next()) )
|
||||
{
|
||||
if (mo->master == self)
|
||||
{
|
||||
|
|
|
@ -623,7 +623,7 @@ void FWadCollection::AddFile (const char *filename, const char * data, int lengt
|
|||
{
|
||||
char * c;
|
||||
|
||||
while (c=(char*)memchr(lump_p->name, '^', 8))
|
||||
while ((c=(char*)memchr(lump_p->name, '^', 8)))
|
||||
{
|
||||
*c='\\';
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
**---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#include <windows.h>
|
||||
|
@ -1005,16 +1005,16 @@ static void WriteBlock (HANDLE file, LPCVOID buffer, DWORD bytes, z_stream *stre
|
|||
stream->avail_in = bytes;
|
||||
*crc = crc32 (*crc, (const Bytef *)buffer, bytes);
|
||||
|
||||
while (stream->avail_in != 0)
|
||||
{
|
||||
if (stream->avail_out == 0)
|
||||
{
|
||||
stream->next_out = outbuf;
|
||||
stream->avail_out = sizeof(tar::record);
|
||||
WriteFile (file, outbuf, sizeof(tar::record), &bytes, NULL);
|
||||
}
|
||||
deflate (stream, Z_NO_FLUSH);
|
||||
}
|
||||
while (stream->avail_in != 0)
|
||||
{
|
||||
if (stream->avail_out == 0)
|
||||
{
|
||||
stream->next_out = outbuf;
|
||||
stream->avail_out = sizeof(tar::record);
|
||||
WriteFile (file, outbuf, sizeof(tar::record), &bytes, NULL);
|
||||
}
|
||||
deflate (stream, Z_NO_FLUSH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2780,7 +2780,7 @@ void DisplayCrashLog ()
|
|||
{
|
||||
HINSTANCE riched;
|
||||
HANDLE file;
|
||||
bool gzipped;
|
||||
bool gzipped = false;
|
||||
|
||||
if (NumFiles == 0 || (riched = LoadLibrary ("riched20.dll")) == NULL)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -23,7 +23,7 @@ int ErrorCount;
|
|||
void WriteWord (int word);
|
||||
void WriteLabel (char *label);
|
||||
void WriteWords (int count, short *array);
|
||||
void WriteBytes (int count, char *array);
|
||||
void WriteBytes (int count, unsigned char *array);
|
||||
|
||||
void WriteNameTable ();
|
||||
|
||||
|
@ -855,7 +855,7 @@ void WriteWords (int count, short *array)
|
|||
}
|
||||
}
|
||||
|
||||
void WriteBytes (int count, char *array)
|
||||
void WriteBytes (int count, unsigned char *array)
|
||||
{
|
||||
WriteWord (count);
|
||||
fwrite (array, 1, count, Dest);
|
||||
|
@ -952,7 +952,7 @@ void WriteHeights ()
|
|||
void WriteCodePConv ()
|
||||
{
|
||||
WriteLabel ("CODP");
|
||||
WriteWords (CodePMapSize, CodePMap);
|
||||
WriteWords (CodePMapSize, (short *)CodePMap);
|
||||
}
|
||||
|
||||
void WriteSprites ()
|
||||
|
|
|
@ -2359,7 +2359,7 @@ static void preprocess_input(char *z){
|
|||
void Parse(gp)
|
||||
struct lemon *gp;
|
||||
{
|
||||
struct pstate ps;
|
||||
struct pstate ps = { 0, };
|
||||
FILE *fp;
|
||||
char *filebuf;
|
||||
int filesize;
|
||||
|
|
|
@ -450,11 +450,7 @@ int buildwad (FILE *listfile, char *listfilename, char *makecmd, char *makefile)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if !defined(_MSC_VER)
|
||||
#define __cdecl
|
||||
#endif
|
||||
|
||||
int __cdecl main (int argc, char **argv)
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
FILE *listfile = NULL;
|
||||
char *listfilename = NULL;
|
||||
|
|
|
@ -16,6 +16,7 @@ public:
|
|||
State *state;
|
||||
public:
|
||||
Action(State*);
|
||||
virtual ~Action() {}
|
||||
virtual void emit(std::ostream&, bool&) = 0;
|
||||
virtual bool isRule() const;
|
||||
virtual bool isMatch() const;
|
||||
|
|
|
@ -45,6 +45,7 @@ inline std::ostream& operator<<(std::ostream &o, const Range *r){
|
|||
class RegExp {
|
||||
public:
|
||||
uint size;
|
||||
virtual ~RegExp() {}
|
||||
public:
|
||||
virtual char *typeOf() = 0;
|
||||
RegExp *isA(char *t)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -638,7 +638,6 @@ int yylex (void)
|
|||
{
|
||||
char token[80];
|
||||
int toksize;
|
||||
int buildup;
|
||||
int c;
|
||||
|
||||
loop:
|
||||
|
@ -661,7 +660,7 @@ loop:
|
|||
}
|
||||
if (isdigit (c))
|
||||
{
|
||||
buildup = c - '0';
|
||||
int buildup = c - '0';
|
||||
if (c == '0')
|
||||
{
|
||||
c = fgetc (Source);
|
||||
|
@ -705,6 +704,8 @@ loop:
|
|||
}
|
||||
if (isalpha (c))
|
||||
{
|
||||
int buildup = 0;
|
||||
|
||||
token[0] = c;
|
||||
toksize = 1;
|
||||
while (toksize < 79 && (isalnum (c = fgetc (Source)) || c == '_'))
|
||||
|
|
Loading…
Reference in a new issue