Conflicts:
	game-music-emu/game-music-emu.vcproj
This commit is contained in:
Christoph Oelckers 2014-04-05 15:37:10 +02:00
commit d74f045004
105 changed files with 1155 additions and 650 deletions

View file

@ -34,6 +34,10 @@
// source files, so we can't use it. So define PATH_MAX to be what MAX_PATH
// currently is:
#define PATH_MAX 260
// Disable warning about using unsized arrays in structs. It supports it just
// fine, and so do Clang and GCC, but the latter two don't warn about it.
#pragma warning(disable:4200)
#endif
#include <limits.h>

View file

@ -7893,7 +7893,7 @@ scriptwait:
if (tag != 0)
secnum = P_FindSectorFromTag (tag, -1);
else
secnum = P_PointInSector (x, y) - sectors;
secnum = int(P_PointInSector (x, y) - sectors);
if (secnum >= 0)
{

View file

@ -2138,7 +2138,7 @@ void P_ZMovement (AActor *mo, fixed_t oldfloorz)
fixed_t oldz = mo->z;
fixed_t grav = mo->GetGravity();
//
//
// check for smooth step up
//
if (mo->player && mo->player->mo == mo && mo->z < mo->floorz)

View file

@ -558,8 +558,8 @@ static visplane_t *new_visplane (unsigned hash)
if (check == NULL)
{
check = (visplane_t *)M_Malloc (sizeof(*check) + sizeof(*check->top)*(MAXWIDTH*2));
memset(check, 0, sizeof(*check) + sizeof(*check->top)*(MAXWIDTH*2));
check = (visplane_t *)M_Malloc (sizeof(*check) + 3 + sizeof(*check->top)*(MAXWIDTH*2));
memset(check, 0, sizeof(*check) + 3 + sizeof(*check->top)*(MAXWIDTH*2));
check->bottom = check->top + MAXWIDTH+2;
}
else if (NULL == (freetail = freetail->next))

View file

@ -63,7 +63,7 @@ struct visplane_s
unsigned short *bottom; // [RH] bottom and top arrays are dynamically
unsigned short pad; // allocated immediately after the
unsigned short top[3]; // visplane.
unsigned short top[]; // visplane.
};
typedef struct visplane_s visplane_t;

View file

@ -55,7 +55,7 @@ struct FStringTable::StringEntry
StringEntry *Next;
char *Name;
BYTE PassNum;
char String[2];
char String[];
};
FStringTable::FStringTable ()
@ -283,7 +283,7 @@ void FStringTable::LoadLanguage (int lumpnum, DWORD code, bool exactMatch, int p
}
if (entry == NULL || cmpval > 0)
{
entry = (StringEntry *)M_Malloc (sizeof(*entry) + strText.Len() + strName.Len());
entry = (StringEntry *)M_Malloc (sizeof(*entry) + strText.Len() + strName.Len() + 2);
entry->Next = *pentry;
*pentry = entry;
strcpy (entry->String, strText.GetChars());
@ -409,7 +409,7 @@ void FStringTable::SetString (const char *name, const char *newString)
size_t namelen = strlen (name);
// Create a new string entry
StringEntry *entry = (StringEntry *)M_Malloc (sizeof(*entry) + newlen + namelen);
StringEntry *entry = (StringEntry *)M_Malloc (sizeof(*entry) + newlen + namelen + 2);
strcpy (entry->String, newString);
strcpy (entry->Name = entry->String + newlen + 1, name);
entry->PassNum = 0;

View file

@ -130,8 +130,6 @@ struct FDoorAnimation
FName CloseSound;
};
// Patches.
// A patch holds one or more columns.
// Patches are used for sprites and all masked pictures, and we compose
@ -142,7 +140,7 @@ struct patch_t
SWORD height;
SWORD leftoffset; // pixels to the left of origin
SWORD topoffset; // pixels below the origin
DWORD columnofs[8]; // only [width] used
DWORD columnofs[]; // only [width] used
// the [0] is &columnofs[width]
};

View file

@ -57,7 +57,7 @@ void CheckCPUID(CPUInfo *cpu)
#if defined(_M_IX86) || defined(__i386__)
// Old 486s do not have CPUID, so we must test for its presence.
// This code is adapted from the samples in AMD's document
// entitled "AMD-K6 MMX Processor Multimedia Extensions."
// entitled "AMD-K6 MMX Processor Multimedia Extensions."
#ifndef __GNUC__
__asm
{