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/hornet.cpp
src/interp.cpp src/interp.cpp
src/interpsh.cpp src/interpsh.cpp
src/interpso.cpp
src/inv.cpp src/inv.cpp
#src/jbhlp.cpp #src/jbhlp.cpp
src/jplayer.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... :( #pragma warning(disable:4101) // there's too many of these... :(
#endif #endif
#include "build.h"
#include "compat.h" #include "compat.h"
#include "baselayer.h" #include "baselayer.h"
#include "mmulti.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 "compat.h"
#include "pragmas.h" #include "pragmas.h"
@ -31,6 +33,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "interp.h" #include "interp.h"
#include "interpso.h" #include "interpso.h"
BEGIN_SW_NS
#define SO_MAXINTERPOLATIONS MAXINTERPOLATIONS #define SO_MAXINTERPOLATIONS MAXINTERPOLATIONS
static struct so_interp static struct so_interp
@ -304,13 +308,13 @@ SWBOOL so_writeinterpolations(MFILE_WRITE fil)
{ {
int32_t i; int32_t i;
SECTOR_OBJECTp sop; SECTOR_OBJECTp sop;
const so_interp *interp; so_interp *interp;
SWBOOL saveisshot = FALSE; SWBOOL saveisshot = FALSE;
for (sop = SectorObject, interp = so_interpdata; for (sop = SectorObject, interp = so_interpdata;
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++) 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); MWRITE(&interp->numinterpolations,sizeof(interp->numinterpolations),1,fil);
for (i = 0; i < interp->numinterpolations; i++, data++) for (i = 0; i < interp->numinterpolations; i++, data++)
{ {
@ -349,3 +353,5 @@ SWBOOL so_readinterpolations(MFILE_READ fil)
} }
return saveisshot; 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" #include "mfile.h"
BEGIN_SW_NS
extern int32_t so_numinterpolations; extern int32_t so_numinterpolations;
void so_addinterpolation(SECTOR_OBJECTp sop); void so_addinterpolation(SECTOR_OBJECTp sop);
@ -42,4 +44,6 @@ void so_restoreinterpolations(void);
SWBOOL so_writeinterpolations(MFILE_WRITE fil); SWBOOL so_writeinterpolations(MFILE_WRITE fil);
SWBOOL so_readinterpolations(MFILE_READ fil); SWBOOL so_readinterpolations(MFILE_READ fil);
END_SW_NS
#endif #endif

View file

@ -335,7 +335,7 @@ void JS_InitMirrors(void)
{ {
if (mirrorcnt >= MAXMIRRORS) 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; wall[i].overpicnum = sector[s].ceilingpicnum;
continue; continue;
} }

View file

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

View file

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