SW: Make game compile after upstream backports.

This commit is contained in:
Mitchell Richters 2020-05-22 00:25:41 +10:00 committed by Christoph Oelckers
parent 0ab81904c2
commit 45cc95401f
7 changed files with 17 additions and 5 deletions

View file

@ -26,6 +26,7 @@ set( PCH_SOURCES
src/hornet.cpp
src/interp.cpp
src/interpsh.cpp
src/interpso.cpp
src/inv.cpp
#src/jbhlp.cpp
src/jplayer.cpp

View file

@ -36,6 +36,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#pragma warning(disable:4101) // there's too many of these... :(
#endif
#include "build.h"
#include "compat.h"
#include "baselayer.h"
#include "mmulti.h"

View file

@ -24,6 +24,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
#include "ns.h"
#include "compat.h"
#include "pragmas.h"
@ -31,6 +33,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "interp.h"
#include "interpso.h"
BEGIN_SW_NS
#define SO_MAXINTERPOLATIONS MAXINTERPOLATIONS
static struct so_interp
@ -304,13 +308,13 @@ SWBOOL so_writeinterpolations(MFILE_WRITE fil)
{
int32_t i;
SECTOR_OBJECTp sop;
const so_interp *interp;
so_interp *interp;
SWBOOL saveisshot = FALSE;
for (sop = SectorObject, interp = so_interpdata;
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
{
const so_interp::interp_data *data = interp->data;
so_interp::interp_data *data = interp->data;
MWRITE(&interp->numinterpolations,sizeof(interp->numinterpolations),1,fil);
for (i = 0; i < interp->numinterpolations; i++, data++)
{
@ -349,3 +353,5 @@ SWBOOL so_readinterpolations(MFILE_READ fil)
}
return saveisshot;
}
END_SW_NS

View file

@ -29,6 +29,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "mfile.h"
BEGIN_SW_NS
extern int32_t so_numinterpolations;
void so_addinterpolation(SECTOR_OBJECTp sop);
@ -42,4 +44,6 @@ void so_restoreinterpolations(void);
SWBOOL so_writeinterpolations(MFILE_WRITE fil);
SWBOOL so_readinterpolations(MFILE_READ fil);
END_SW_NS
#endif

View file

@ -335,7 +335,7 @@ void JS_InitMirrors(void)
{
if (mirrorcnt >= MAXMIRRORS)
{
buildprintf("MAXMIRRORS reached! Skipping mirror wall[%d]\n", i);
Printf("MAXMIRRORS reached! Skipping mirror wall[%d]\n", i);
wall[i].overpicnum = sector[s].ceilingpicnum;
continue;
}

View file

@ -47,7 +47,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "reserve.h"
//#define FILE_TYPE 1
#include "mfile.h"
#include "weapon.h"
#include "cache.h"
@ -1002,7 +1001,7 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
// SO interpolations
saveisshot |= so_readinterpolations(fil);
if (saveisshot) { MCLOSE_READ(fil); return -1; }
if (saveisshot) { MCLOSE_READ(fil); return false; }
// parental lock
for (i = 0; i < (int)SIZ(otlist); i++)

View file

@ -25,6 +25,7 @@
#include "compat.h"
#include "tarray.h"
#include "debugbreak.h"
BEGIN_SW_NS
#include "saveable.h"