- 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 2903 additions and 2158 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue