mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 04:50:42 +00:00
- more header consolidation and cleanup.
In particular, this removes the pointless kTrue and kFalse constants.
This commit is contained in:
parent
4ea93ebccc
commit
aa5f42e5f4
60 changed files with 253 additions and 818 deletions
|
@ -22,7 +22,6 @@ set( PCH_SOURCES
|
||||||
src/move.cpp
|
src/move.cpp
|
||||||
src/movie.cpp
|
src/movie.cpp
|
||||||
src/mummy.cpp
|
src/mummy.cpp
|
||||||
src/network.cpp
|
|
||||||
src/object.cpp
|
src/object.cpp
|
||||||
src/osdcmds.cpp
|
src/osdcmds.cpp
|
||||||
src/player.cpp
|
src/player.cpp
|
||||||
|
|
|
@ -21,8 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "random.h"
|
|
||||||
#include "init.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -20,9 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "random.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -18,11 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "random.h"
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "init.h"
|
|
||||||
#include "init.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -21,10 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "init.h"
|
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include "random.h"
|
|
||||||
#include "names.h"
|
#include "names.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -439,7 +436,7 @@ HITSPRITE:
|
||||||
short nPlayer = GetPlayerFromSprite(hitsprite);
|
short nPlayer = GetPlayerFromSprite(hitsprite);
|
||||||
if (!PlayerList[nPlayer].bIsMummified)
|
if (!PlayerList[nPlayer].bIsMummified)
|
||||||
{
|
{
|
||||||
PlayerList[nPlayer].bIsMummified = kTrue;
|
PlayerList[nPlayer].bIsMummified = true;
|
||||||
SetNewWeapon(nPlayer, kWeaponMummified);
|
SetNewWeapon(nPlayer, kWeaponMummified);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
#include "cd.h"
|
#include "engine.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __cd_h__
|
|
||||||
#define __cd_h__
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
bool playCDtrack(int nTrack, bool bLoop);
|
|
||||||
void StartfadeCDaudio();
|
|
||||||
int StepFadeCDaudio();
|
|
||||||
bool CDplaying();
|
|
||||||
void StopCD();
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -22,16 +22,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "pragmas.h"
|
#include "pragmas.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
||||||
#define kMaxTiles 6144
|
|
||||||
#define kMaxSprites 4096
|
#define kMaxSprites 4096
|
||||||
#define kMaxSectors 1024
|
#define kMaxSectors 1024
|
||||||
#define kMaxWalls 8192
|
#define kMaxWalls 8192
|
||||||
#define kMaxTiles 6144
|
|
||||||
#define kMaxVoxels 4096
|
#define kMaxVoxels 4096
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -39,12 +35,123 @@ enum
|
||||||
kStatIgnited = 404
|
kStatIgnited = 404
|
||||||
};
|
};
|
||||||
|
|
||||||
#define kMaxSpritesOnscreen 1024
|
|
||||||
|
|
||||||
#define kMaxPalookups 256
|
#define kMaxPalookups 256
|
||||||
#define kMaxStatus 1024
|
#define kMaxStatus 1024
|
||||||
//#define MAXPSKYTILES 256
|
//#define MAXPSKYTILES 256
|
||||||
|
|
||||||
|
|
||||||
|
int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask);
|
||||||
|
void overwritesprite(int thex, int they, short tilenum, signed char shade, char stat, char dapalnum, int basepal = 0);
|
||||||
|
void precache();
|
||||||
|
void resettiming();
|
||||||
|
void printext(int x, int y, const char* buffer, short tilenum, char invisiblecol);
|
||||||
|
|
||||||
|
// cd
|
||||||
|
|
||||||
|
bool playCDtrack(int nTrack, bool bLoop);
|
||||||
|
void StartfadeCDaudio();
|
||||||
|
int StepFadeCDaudio();
|
||||||
|
bool CDplaying();
|
||||||
|
void StopCD();
|
||||||
|
|
||||||
|
// init
|
||||||
|
#define kMap20 20
|
||||||
|
|
||||||
|
enum {
|
||||||
|
kSectUnderwater = 0x2000,
|
||||||
|
kSectLava = 0x4000,
|
||||||
|
};
|
||||||
|
|
||||||
|
extern ClockTicks ototalclock;
|
||||||
|
|
||||||
|
extern int initx;
|
||||||
|
extern int inity;
|
||||||
|
extern int initz;
|
||||||
|
extern short inita;
|
||||||
|
extern short initsect;
|
||||||
|
|
||||||
|
extern short nCurChunkNum;
|
||||||
|
extern short nBodyGunSprite[50];
|
||||||
|
extern int movefifoend;
|
||||||
|
extern int movefifopos;
|
||||||
|
extern short nCurBodyGunNum;
|
||||||
|
|
||||||
|
void SnapSectors(short nSectorA, short nSectorB, short b);
|
||||||
|
|
||||||
|
extern short SectSound[];
|
||||||
|
extern short SectDamage[];
|
||||||
|
extern short SectSpeed[];
|
||||||
|
extern int SectBelow[];
|
||||||
|
extern short SectFlag[];
|
||||||
|
extern int SectDepth[];
|
||||||
|
extern short SectSoundSect[];
|
||||||
|
extern int SectAbove[];
|
||||||
|
|
||||||
|
uint8_t LoadLevel(int nMap);
|
||||||
|
void LoadObjects();
|
||||||
|
|
||||||
|
// light
|
||||||
|
|
||||||
|
int LoadPaletteLookups();
|
||||||
|
void WaitVBL();
|
||||||
|
void SetGreenPal();
|
||||||
|
void RestoreGreenPal();
|
||||||
|
void FixPalette();
|
||||||
|
void FadeToWhite();
|
||||||
|
int HavePLURemap();
|
||||||
|
uint8_t RemapPLU(uint8_t pal);
|
||||||
|
|
||||||
|
//extern unsigned char kenpal[];
|
||||||
|
extern short overscanindex;
|
||||||
|
|
||||||
|
extern char *origpalookup[];
|
||||||
|
|
||||||
|
extern short nPalDiff;
|
||||||
|
|
||||||
|
// map
|
||||||
|
|
||||||
|
extern short bShowTowers;
|
||||||
|
extern int ldMapZoom;
|
||||||
|
extern int lMapZoom;
|
||||||
|
|
||||||
|
void InitMap();
|
||||||
|
void GrabMap();
|
||||||
|
void UpdateMap();
|
||||||
|
void DrawMap();
|
||||||
|
|
||||||
|
// movie
|
||||||
|
|
||||||
|
void PlayMovie(const char *fileName);
|
||||||
|
|
||||||
|
// network
|
||||||
|
|
||||||
|
extern short nNetMoveFrames;
|
||||||
|
|
||||||
|
// random
|
||||||
|
|
||||||
|
void InitRandom();
|
||||||
|
int RandomBit();
|
||||||
|
char RandomByte();
|
||||||
|
uint16_t RandomWord();
|
||||||
|
int RandomLong();
|
||||||
|
int RandomSize(int nSize);
|
||||||
|
|
||||||
|
// record
|
||||||
|
|
||||||
|
extern short record_mode;
|
||||||
|
|
||||||
|
// save
|
||||||
|
|
||||||
|
// trigdat
|
||||||
|
|
||||||
|
#define kAngleMask 0x7FF
|
||||||
|
|
||||||
|
int GetMyAngle(int x, int y);
|
||||||
|
|
||||||
|
int AngleDiff(short a, short b);
|
||||||
|
int AngleDelta(int a, int b, int c);
|
||||||
|
|
||||||
inline int Sin(int angle)
|
inline int Sin(int angle)
|
||||||
{
|
{
|
||||||
return sintable[angle & kAngleMask];
|
return sintable[angle & kAngleMask];
|
||||||
|
@ -55,12 +162,6 @@ inline int Cos(int angle)
|
||||||
return sintable[(angle + 512) & kAngleMask];
|
return sintable[(angle + 512) & kAngleMask];
|
||||||
}
|
}
|
||||||
|
|
||||||
int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask);
|
|
||||||
void overwritesprite(int thex, int they, short tilenum, signed char shade, char stat, char dapalnum, int basepal = 0);
|
|
||||||
void precache();
|
|
||||||
void resettiming();
|
|
||||||
void printext(int x, int y, const char* buffer, short tilenum, char invisiblecol);
|
|
||||||
|
|
||||||
END_PS_NS
|
END_PS_NS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,31 +18,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "osdcmds.h"
|
|
||||||
#include "map.h"
|
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "movie.h"
|
|
||||||
#include "names.h"
|
#include "names.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "network.h"
|
|
||||||
#include "ps_input.h"
|
#include "ps_input.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "cd.h"
|
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "init.h"
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "light.h"
|
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "network.h"
|
|
||||||
#include "random.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include "record.h"
|
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <cstdio> // for printf
|
#include <cstdio> // for printf
|
||||||
|
@ -66,6 +54,7 @@ BEGIN_PS_NS
|
||||||
|
|
||||||
void FinishLevel();
|
void FinishLevel();
|
||||||
void uploadCinemaPalettes();
|
void uploadCinemaPalettes();
|
||||||
|
int32_t registerosdcommands(void);
|
||||||
|
|
||||||
int htimer = 0;
|
int htimer = 0;
|
||||||
|
|
||||||
|
@ -600,7 +589,7 @@ void InstallEngine()
|
||||||
|
|
||||||
//nScreenWidth *= 2;
|
//nScreenWidth *= 2;
|
||||||
//nScreenHeight *= 2;
|
//nScreenHeight *= 2;
|
||||||
bHiRes = kTrue;
|
bHiRes = true;
|
||||||
// TEMP
|
// TEMP
|
||||||
|
|
||||||
if (engineInit())
|
if (engineInit())
|
||||||
|
@ -696,7 +685,7 @@ short nButtonColor;
|
||||||
short nEnergyChan;
|
short nEnergyChan;
|
||||||
|
|
||||||
|
|
||||||
short bModemPlay = kFalse;
|
short bModemPlay = false;
|
||||||
int lCountDown = 0;
|
int lCountDown = 0;
|
||||||
short nEnergyTowers = 0;
|
short nEnergyTowers = 0;
|
||||||
|
|
||||||
|
@ -712,8 +701,8 @@ short forcelevel = -1;
|
||||||
int lLocalButtons = 0;
|
int lLocalButtons = 0;
|
||||||
int lLocalCodes = 0;
|
int lLocalCodes = 0;
|
||||||
|
|
||||||
short bHiRes = kFalse;
|
short bHiRes = false;
|
||||||
short bCoordinates = kFalse;
|
short bCoordinates = false;
|
||||||
|
|
||||||
int nNetTime = -1;
|
int nNetTime = -1;
|
||||||
|
|
||||||
|
@ -737,7 +726,7 @@ short textpages;
|
||||||
short lastfps;
|
short lastfps;
|
||||||
|
|
||||||
short nMapMode = 0;
|
short nMapMode = 0;
|
||||||
short bNoCreatures = kFalse;
|
short bNoCreatures = false;
|
||||||
|
|
||||||
short nTotalPlayers = 1;
|
short nTotalPlayers = 1;
|
||||||
// TODO: Rename this (or make it static) so it doesn't conflict with library function
|
// TODO: Rename this (or make it static) so it doesn't conflict with library function
|
||||||
|
@ -749,13 +738,13 @@ short nPasswordCount = 0;
|
||||||
|
|
||||||
short screensize;
|
short screensize;
|
||||||
|
|
||||||
short bSnakeCam = kFalse;
|
short bSnakeCam = false;
|
||||||
short bRecord = kFalse;
|
short bRecord = false;
|
||||||
short bPlayback = kFalse;
|
short bPlayback = false;
|
||||||
short bInDemo = kFalse;
|
short bInDemo = false;
|
||||||
short bSlipMode = kFalse;
|
short bSlipMode = false;
|
||||||
short bDoFlashes = kTrue;
|
short bDoFlashes = true;
|
||||||
short bHolly = kFalse;
|
short bHolly = false;
|
||||||
|
|
||||||
short nItemTextIndex;
|
short nItemTextIndex;
|
||||||
|
|
||||||
|
@ -784,7 +773,6 @@ void ShutDown(void)
|
||||||
StopCD();
|
StopCD();
|
||||||
|
|
||||||
RemoveEngine();
|
RemoveEngine();
|
||||||
UnInitNet();
|
|
||||||
//UnInitFX();
|
//UnInitFX();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -867,7 +855,7 @@ void DoPassword(int nPassword)
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
if (!nNetPlayerCount) {
|
if (!nNetPlayerCount) {
|
||||||
bHolly = kTrue;
|
bHolly = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -891,12 +879,12 @@ void DoPassword(int nPassword)
|
||||||
|
|
||||||
case 4: // LOBOLITE
|
case 4: // LOBOLITE
|
||||||
{
|
{
|
||||||
if (bDoFlashes == kFalse)
|
if (bDoFlashes == false)
|
||||||
{
|
{
|
||||||
bDoFlashes = kTrue;
|
bDoFlashes = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bDoFlashes = kFalse;
|
bDoFlashes = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -911,13 +899,13 @@ void DoPassword(int nPassword)
|
||||||
{
|
{
|
||||||
if (!nNetPlayerCount)
|
if (!nNetPlayerCount)
|
||||||
{
|
{
|
||||||
if (bSlipMode == kFalse)
|
if (bSlipMode == false)
|
||||||
{
|
{
|
||||||
bSlipMode = kTrue;
|
bSlipMode = true;
|
||||||
StatusMessage(300, "Slip mode ON");
|
StatusMessage(300, "Slip mode ON");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bSlipMode = kFalse;
|
bSlipMode = false;
|
||||||
StatusMessage(300, "Slip mode OFF");
|
StatusMessage(300, "Slip mode OFF");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -928,14 +916,14 @@ void DoPassword(int nPassword)
|
||||||
{
|
{
|
||||||
if (!nNetPlayerCount)
|
if (!nNetPlayerCount)
|
||||||
{
|
{
|
||||||
if (bSnakeCam == kFalse)
|
if (bSnakeCam == false)
|
||||||
{
|
{
|
||||||
bSnakeCam = kTrue;
|
bSnakeCam = true;
|
||||||
StatusMessage(750, "SNAKE CAM ENABLED");
|
StatusMessage(750, "SNAKE CAM ENABLED");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bSnakeCam = kFalse;
|
bSnakeCam = false;
|
||||||
StatusMessage(750, "SNAKE CAM DISABLED");
|
StatusMessage(750, "SNAKE CAM DISABLED");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -945,7 +933,7 @@ void DoPassword(int nPassword)
|
||||||
case 8: // LOBOSPHERE
|
case 8: // LOBOSPHERE
|
||||||
{
|
{
|
||||||
GrabMap();
|
GrabMap();
|
||||||
bShowTowers = kTrue;
|
bShowTowers = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -957,11 +945,11 @@ void DoPassword(int nPassword)
|
||||||
|
|
||||||
case 10: // LOBOXY
|
case 10: // LOBOXY
|
||||||
{
|
{
|
||||||
if (bCoordinates == kFalse) {
|
if (bCoordinates == false) {
|
||||||
bCoordinates = kTrue;
|
bCoordinates = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bCoordinates = kFalse;
|
bCoordinates = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1004,10 +992,10 @@ void CheckKeys()
|
||||||
if (!nFreeze)
|
if (!nFreeze)
|
||||||
{
|
{
|
||||||
if (bCamera) {
|
if (bCamera) {
|
||||||
bCamera = kFalse;
|
bCamera = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bCamera = kTrue;
|
bCamera = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bCamera)
|
if (bCamera)
|
||||||
|
@ -1082,7 +1070,7 @@ void CheckKeys()
|
||||||
{
|
{
|
||||||
// TODO - enums?
|
// TODO - enums?
|
||||||
case 0:
|
case 0:
|
||||||
BuildAnubis(-1, initx, inity, sector[initsect].floorz, initsect, inita, kFalse);
|
BuildAnubis(-1, initx, inity, sector[initsect].floorz, initsect, inita, false);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
BuildSpider(-1, initx, inity, sector[initsect].floorz, initsect, inita);
|
BuildSpider(-1, initx, inity, sector[initsect].floorz, initsect, inita);
|
||||||
|
@ -1132,7 +1120,7 @@ void CheckKeys()
|
||||||
{
|
{
|
||||||
if (nStringLen == 0)
|
if (nStringLen == 0)
|
||||||
{
|
{
|
||||||
bHolly = kFalse;
|
bHolly = false;
|
||||||
StatusMessage(1, " ");
|
StatusMessage(1, " ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1294,7 +1282,7 @@ void FinishLevel()
|
||||||
|
|
||||||
StopAllSounds();
|
StopAllSounds();
|
||||||
|
|
||||||
bCamera = kFalse;
|
bCamera = false;
|
||||||
nMapMode = 0;
|
nMapMode = 0;
|
||||||
|
|
||||||
if (levelnum != kMap20)
|
if (levelnum != kMap20)
|
||||||
|
@ -1357,14 +1345,14 @@ uint8_t ReadPlaybackInputs()
|
||||||
|
|
||||||
besttarget = sPlayerInput[nLocalPlayer].nTarget;
|
besttarget = sPlayerInput[nLocalPlayer].nTarget;
|
||||||
Ra[nLocalPlayer].nTarget = besttarget;
|
Ra[nLocalPlayer].nTarget = besttarget;
|
||||||
return kTrue;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fclose(vcrfp);
|
fclose(vcrfp);
|
||||||
vcrfp = NULL;
|
vcrfp = NULL;
|
||||||
bPlayback = kFalse;
|
bPlayback = false;
|
||||||
return kFalse;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1372,7 +1360,7 @@ void SetHiRes()
|
||||||
{
|
{
|
||||||
//nScreenWidth = 640;
|
//nScreenWidth = 640;
|
||||||
//nScreenHeight = 400;
|
//nScreenHeight = 400;
|
||||||
bHiRes = kTrue;
|
bHiRes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoClockBeep()
|
void DoClockBeep()
|
||||||
|
@ -1619,12 +1607,6 @@ void ExitGame()
|
||||||
fclose(vcrfp);
|
fclose(vcrfp);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
if (nNetPlayerCount != 0) {
|
|
||||||
SendGoodbye();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ShutDown();
|
ShutDown();
|
||||||
throw CExitEvent(0);
|
throw CExitEvent(0);
|
||||||
}
|
}
|
||||||
|
@ -1644,7 +1626,7 @@ void CheckCommandLine(int argc, char const* const* argv, int &doTitle)
|
||||||
//strlwr(pChar);
|
//strlwr(pChar);
|
||||||
|
|
||||||
if (Bstrcasecmp(pChar, "nocreatures") == 0) {
|
if (Bstrcasecmp(pChar, "nocreatures") == 0) {
|
||||||
bNoCreatures = kTrue;
|
bNoCreatures = true;
|
||||||
}
|
}
|
||||||
else if (Bstrcasecmp(pChar, "record") == 0)
|
else if (Bstrcasecmp(pChar, "record") == 0)
|
||||||
{
|
{
|
||||||
|
@ -1652,7 +1634,7 @@ void CheckCommandLine(int argc, char const* const* argv, int &doTitle)
|
||||||
{
|
{
|
||||||
vcrfp = fopen("data.vcr", "wb+");
|
vcrfp = fopen("data.vcr", "wb+");
|
||||||
if (vcrfp != NULL) {
|
if (vcrfp != NULL) {
|
||||||
bRecord = kTrue;
|
bRecord = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DebugOut("Can't open data file for recording\n");
|
DebugOut("Can't open data file for recording\n");
|
||||||
|
@ -1665,8 +1647,8 @@ void CheckCommandLine(int argc, char const* const* argv, int &doTitle)
|
||||||
{
|
{
|
||||||
vcrfp = fopen("data.vcr", "rb");
|
vcrfp = fopen("data.vcr", "rb");
|
||||||
if (vcrfp != NULL) {
|
if (vcrfp != NULL) {
|
||||||
bPlayback = kTrue;
|
bPlayback = true;
|
||||||
doTitle = kFalse;
|
doTitle = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DebugOut("Can't open data file 'data.vcr' for reading\n");
|
DebugOut("Can't open data file 'data.vcr' for reading\n");
|
||||||
|
@ -1677,9 +1659,9 @@ void CheckCommandLine(int argc, char const* const* argv, int &doTitle)
|
||||||
{
|
{
|
||||||
nNetPlayerCount = -1;
|
nNetPlayerCount = -1;
|
||||||
forcelevel = levelnew;
|
forcelevel = levelnew;
|
||||||
bModemPlay = kFalse;
|
bModemPlay = false;
|
||||||
|
|
||||||
doTitle = kFalse;
|
doTitle = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1715,7 +1697,7 @@ void CheckCommandLine(int argc, char const* const* argv, int &doTitle)
|
||||||
levelnew = atoi(pChar);
|
levelnew = atoi(pChar);
|
||||||
forcelevel = levelnew;
|
forcelevel = levelnew;
|
||||||
|
|
||||||
doTitle = kFalse;
|
doTitle = false;
|
||||||
|
|
||||||
Printf("Jumping to level %d...\n", levelnew);
|
Printf("Jumping to level %d...\n", levelnew);
|
||||||
}
|
}
|
||||||
|
@ -1798,8 +1780,8 @@ int GameInterface::app_main()
|
||||||
int i;
|
int i;
|
||||||
//int esi = 1;
|
//int esi = 1;
|
||||||
//int edi = esi;
|
//int edi = esi;
|
||||||
int doTitle = kTrue; // REVERT kTrue;
|
int doTitle = true; // REVERT true;
|
||||||
int stopTitle = kFalse;
|
int stopTitle = false;
|
||||||
levelnew = 1;
|
levelnew = 1;
|
||||||
|
|
||||||
buttonMap.SetButtons(actions, NUM_ACTIONS);
|
buttonMap.SetButtons(actions, NUM_ACTIONS);
|
||||||
|
@ -1818,8 +1800,8 @@ int GameInterface::app_main()
|
||||||
mi->cdSongId = (nTrack % 8) + 11;
|
mi->cdSongId = (nTrack % 8) + 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
// REVERT - change back to kTrue
|
// REVERT - change back to true
|
||||||
// short bDoTitle = kFalse;
|
// short bDoTitle = false;
|
||||||
|
|
||||||
wConsoleNode = 0;
|
wConsoleNode = 0;
|
||||||
|
|
||||||
|
@ -1891,7 +1873,6 @@ int GameInterface::app_main()
|
||||||
enginePostInit();
|
enginePostInit();
|
||||||
|
|
||||||
InitView();
|
InitView();
|
||||||
myloadconfig();
|
|
||||||
InitFX();
|
InitFX();
|
||||||
seq_LoadSequences();
|
seq_LoadSequences();
|
||||||
InitStatus();
|
InitStatus();
|
||||||
|
@ -1917,7 +1898,7 @@ int GameInterface::app_main()
|
||||||
while (!stopTitle)
|
while (!stopTitle)
|
||||||
{
|
{
|
||||||
DoTitle();
|
DoTitle();
|
||||||
stopTitle = kTrue;
|
stopTitle = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// loc_11811:
|
// loc_11811:
|
||||||
|
@ -1952,8 +1933,8 @@ MENU:
|
||||||
}
|
}
|
||||||
|
|
||||||
InitRandom();
|
InitRandom();
|
||||||
bInDemo = kTrue;
|
bInDemo = true;
|
||||||
bPlayback = kTrue;
|
bPlayback = true;
|
||||||
|
|
||||||
inputState.ClearAllInput();
|
inputState.ClearAllInput();
|
||||||
break;
|
break;
|
||||||
|
@ -1966,7 +1947,7 @@ STARTGAME1:
|
||||||
}
|
}
|
||||||
STARTGAME2:
|
STARTGAME2:
|
||||||
|
|
||||||
bCamera = kFalse;
|
bCamera = false;
|
||||||
ClearCinemaSeen();
|
ClearCinemaSeen();
|
||||||
PlayerCount = 0;
|
PlayerCount = 0;
|
||||||
lastlevel = -1;
|
lastlevel = -1;
|
||||||
|
@ -2095,7 +2076,7 @@ LOOP3:
|
||||||
GrabPalette();
|
GrabPalette();
|
||||||
ResetMoveFifo();
|
ResetMoveFifo();
|
||||||
moveframes = 0;
|
moveframes = 0;
|
||||||
bInMove = kFalse;
|
bInMove = false;
|
||||||
tclocks = totalclock;
|
tclocks = totalclock;
|
||||||
nPlayerDAng = 0;
|
nPlayerDAng = 0;
|
||||||
lPlayerXVel = 0;
|
lPlayerXVel = 0;
|
||||||
|
@ -2135,7 +2116,7 @@ GAMELOOP:
|
||||||
|
|
||||||
if (bRecord || bPlayback)
|
if (bRecord || bPlayback)
|
||||||
{
|
{
|
||||||
bInMove = kTrue;
|
bInMove = true;
|
||||||
|
|
||||||
moveframes = ((int)totalclock - (int)tclocks2) / 4;
|
moveframes = ((int)totalclock - (int)tclocks2) / 4;
|
||||||
|
|
||||||
|
@ -2152,8 +2133,8 @@ GAMELOOP:
|
||||||
{
|
{
|
||||||
inputState.ClearAllInput();
|
inputState.ClearAllInput();
|
||||||
|
|
||||||
bPlayback = kFalse;
|
bPlayback = false;
|
||||||
bInDemo = kFalse;
|
bInDemo = false;
|
||||||
|
|
||||||
if (vcrfp) {
|
if (vcrfp) {
|
||||||
fclose(vcrfp);
|
fclose(vcrfp);
|
||||||
|
@ -2225,7 +2206,7 @@ GAMELOOP:
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
bInMove = kFalse;
|
bInMove = false;
|
||||||
|
|
||||||
// END YELLOW SECTION
|
// END YELLOW SECTION
|
||||||
|
|
||||||
|
@ -2243,7 +2224,7 @@ GAMELOOP:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bInMove = kTrue;
|
bInMove = true;
|
||||||
|
|
||||||
if (paused)
|
if (paused)
|
||||||
{
|
{
|
||||||
|
@ -2292,7 +2273,7 @@ GAMELOOP:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bInMove = kFalse;
|
bInMove = false;
|
||||||
|
|
||||||
PlayerInterruptKeys();
|
PlayerInterruptKeys();
|
||||||
|
|
||||||
|
@ -2308,7 +2289,7 @@ GAMELOOP:
|
||||||
{
|
{
|
||||||
MenuExitCondition = -2;
|
MenuExitCondition = -2;
|
||||||
// MENU2:
|
// MENU2:
|
||||||
bInMove = kTrue;
|
bInMove = true;
|
||||||
|
|
||||||
switch (nMenu)
|
switch (nMenu)
|
||||||
{
|
{
|
||||||
|
@ -2332,7 +2313,7 @@ GAMELOOP:
|
||||||
}
|
}
|
||||||
|
|
||||||
totalclock = ototalclock = tclocks;
|
totalclock = ototalclock = tclocks;
|
||||||
bInMove = kFalse;
|
bInMove = false;
|
||||||
RefreshStatus();
|
RefreshStatus();
|
||||||
}
|
}
|
||||||
else if (buttonMap.ButtonDown(gamefunc_Map)) // e.g. TAB (to show 2D map)
|
else if (buttonMap.ButtonDown(gamefunc_Map)) // e.g. TAB (to show 2D map)
|
||||||
|
|
|
@ -29,7 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "c_buttons.h"
|
#include "c_buttons.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "tarray.h"
|
#include "tarray.h"
|
||||||
#include "save.h"
|
|
||||||
#include "zstring.h"
|
#include "zstring.h"
|
||||||
#include "filesystem.h"
|
#include "filesystem.h"
|
||||||
|
|
||||||
|
@ -330,6 +329,26 @@ extern int loaddefinitions_game(const char* fn, int32_t preload);
|
||||||
void G_LoadGroupsInDir(const char* dirname);
|
void G_LoadGroupsInDir(const char* dirname);
|
||||||
void G_DoAutoload(const char* dirname);
|
void G_DoAutoload(const char* dirname);
|
||||||
|
|
||||||
|
// savegame.
|
||||||
|
|
||||||
|
int savegame(int nSlot);
|
||||||
|
int loadgame(int nSlot);
|
||||||
|
|
||||||
|
|
||||||
|
struct SavegameHelper
|
||||||
|
{
|
||||||
|
FString Name;
|
||||||
|
TArray<std::pair<void*, size_t>> Elements;
|
||||||
|
SavegameHelper(const char* name, ...);
|
||||||
|
void Load();
|
||||||
|
void Save();
|
||||||
|
};
|
||||||
|
|
||||||
|
#define SV(v) &v, sizeof(v)
|
||||||
|
#define SA(a) &a, sizeof(a)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct GameInterface : ::GameInterface
|
struct GameInterface : ::GameInterface
|
||||||
{
|
{
|
||||||
const char* Name() override { return "Exhumed"; }
|
const char* Name() override { return "Exhumed"; }
|
||||||
|
|
|
@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "random.h"
|
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include "init.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "init.h"
|
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "random.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
@ -317,7 +315,7 @@ void FuncGrenade(int a, int UNUSED(nDamage), int nRun)
|
||||||
|
|
||||||
if (PlayerList[nPlayer].nAmmo[kWeaponGrenade])
|
if (PlayerList[nPlayer].nAmmo[kWeaponGrenade])
|
||||||
{
|
{
|
||||||
PlayerList[nPlayer].bIsFiring = kFalse;
|
PlayerList[nPlayer].bIsFiring = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,17 +18,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "init.h"
|
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "light.h"
|
|
||||||
#include "ps_input.h"
|
#include "ps_input.h"
|
||||||
#include "util.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "v_2ddrawer.h"
|
#include "v_2ddrawer.h"
|
||||||
|
@ -49,17 +44,17 @@ struct Weapon
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Weapon WeaponInfo[] = {
|
Weapon WeaponInfo[] = {
|
||||||
{ kSeqSword, { 0, 1, 3, 7, -1, 2, 4, 5, 6, 8, 9, 10 }, 0, 0, 0, kTrue },
|
{ kSeqSword, { 0, 1, 3, 7, -1, 2, 4, 5, 6, 8, 9, 10 }, 0, 0, 0, true },
|
||||||
{ kSeqPistol, { 0, 3, 2, 4, -1, 1, 0, 0, 0, 0, 0, 0 }, 1, 0, 1, kFalse },
|
{ kSeqPistol, { 0, 3, 2, 4, -1, 1, 0, 0, 0, 0, 0, 0 }, 1, 0, 1, false },
|
||||||
{ kSeqM60, { 0, 5, 6, 16, -1, 21, 0, 0, 0, 0, 0, 0 }, 2, 0, 1, kFalse },
|
{ kSeqM60, { 0, 5, 6, 16, -1, 21, 0, 0, 0, 0, 0, 0 }, 2, 0, 1, false },
|
||||||
{ kSeqFlamer, { 0, 2, 5, 5, 6, 1, 0, 0, 0, 0, 0, 0 }, 3, 4, 1, kFalse },
|
{ kSeqFlamer, { 0, 2, 5, 5, 6, 1, 0, 0, 0, 0, 0, 0 }, 3, 4, 1, false },
|
||||||
{ kSeqGrenade, { 0, 2, 3, 4, -1, 1, 0, 0, 0, 0, 0, 0 }, 4, 0, 1, kTrue },
|
{ kSeqGrenade, { 0, 2, 3, 4, -1, 1, 0, 0, 0, 0, 0, 0 }, 4, 0, 1, true },
|
||||||
{ kSeqCobra, { 0, 1, 2, 2, -1, 4, 0, 0, 0, 0, 0, 0 }, 5, 0, 1, kTrue },
|
{ kSeqCobra, { 0, 1, 2, 2, -1, 4, 0, 0, 0, 0, 0, 0 }, 5, 0, 1, true },
|
||||||
{ kSeqRavolt, { 0, 1, 2, 3, -1, 4, 0, 0, 0, 0, 0, 0 }, 6, 0, 1, kTrue },
|
{ kSeqRavolt, { 0, 1, 2, 3, -1, 4, 0, 0, 0, 0, 0, 0 }, 6, 0, 1, true },
|
||||||
{ kSeqRothands,{ 0, 1, 2, -1, -1, -1, 0, 0, 0, 0, 0, 0 }, 7, 0, 0, kTrue },
|
{ kSeqRothands,{ 0, 1, 2, -1, -1, -1, 0, 0, 0, 0, 0, 0 }, 7, 0, 0, true },
|
||||||
{ kSeqDead, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 1, 0, kFalse },
|
{ kSeqDead, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 1, 0, false },
|
||||||
{ kSeqDeadEx, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 1, 0, kFalse },
|
{ kSeqDeadEx, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 1, 0, false },
|
||||||
{ kSeqDeadBrn, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 1, 0, kFalse }
|
{ kSeqDeadBrn, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 0, 1, 0, false }
|
||||||
};
|
};
|
||||||
|
|
||||||
short nTemperature[kMaxPlayers];
|
short nTemperature[kMaxPlayers];
|
||||||
|
@ -137,9 +132,9 @@ void SetNewWeapon(short nPlayer, short nWeapon)
|
||||||
if (nWeapon == kWeaponMummified)
|
if (nWeapon == kWeaponMummified)
|
||||||
{
|
{
|
||||||
PlayerList[nPlayer].field_3C = PlayerList[nPlayer].nCurrentWeapon;
|
PlayerList[nPlayer].field_3C = PlayerList[nPlayer].nCurrentWeapon;
|
||||||
PlayerList[nPlayer].bIsFiring = kFalse;
|
PlayerList[nPlayer].bIsFiring = false;
|
||||||
PlayerList[nPlayer].field_3A = 5;
|
PlayerList[nPlayer].field_3A = 5;
|
||||||
SetPlayerMummified(nPlayer, kTrue);
|
SetPlayerMummified(nPlayer, true);
|
||||||
|
|
||||||
PlayerList[nPlayer].field_3FOUR = 0;
|
PlayerList[nPlayer].field_3FOUR = 0;
|
||||||
}
|
}
|
||||||
|
@ -227,20 +222,20 @@ void SelectNewWeapon(short nPlayer)
|
||||||
if (nWeapon < 0)
|
if (nWeapon < 0)
|
||||||
nWeapon = kWeaponSword;
|
nWeapon = kWeaponSword;
|
||||||
|
|
||||||
PlayerList[nPlayer].bIsFiring = kFalse;
|
PlayerList[nPlayer].bIsFiring = false;
|
||||||
|
|
||||||
SetNewWeapon(nPlayer, nWeapon);
|
SetNewWeapon(nPlayer, nWeapon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StopFiringWeapon(short nPlayer)
|
void StopFiringWeapon(short nPlayer)
|
||||||
{
|
{
|
||||||
PlayerList[nPlayer].bIsFiring = kFalse;
|
PlayerList[nPlayer].bIsFiring = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FireWeapon(short nPlayer)
|
void FireWeapon(short nPlayer)
|
||||||
{
|
{
|
||||||
if (!PlayerList[nPlayer].bIsFiring) {
|
if (!PlayerList[nPlayer].bIsFiring) {
|
||||||
PlayerList[nPlayer].bIsFiring = kTrue;
|
PlayerList[nPlayer].bIsFiring = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,11 +268,11 @@ uint8_t WeaponCanFire(short nPlayer)
|
||||||
short nAmmoType = WeaponInfo[nWeapon].nAmmoType;
|
short nAmmoType = WeaponInfo[nWeapon].nAmmoType;
|
||||||
|
|
||||||
if (WeaponInfo[nWeapon].d <= PlayerList[nPlayer].nAmmo[nAmmoType]) {
|
if (WeaponInfo[nWeapon].d <= PlayerList[nPlayer].nAmmo[nAmmoType]) {
|
||||||
return kTrue;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return kFalse;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// UNUSED
|
// UNUSED
|
||||||
|
@ -460,7 +455,7 @@ void MoveWeapons(short nPlayer)
|
||||||
PlayerList[nPlayer].field_3A = 3;
|
PlayerList[nPlayer].field_3A = 3;
|
||||||
PlayerList[nPlayer].field_3FOUR = 0;
|
PlayerList[nPlayer].field_3FOUR = 0;
|
||||||
|
|
||||||
nPistolClip[nPlayer] = Min(6, PlayerList[nPlayer].nAmmo[kWeaponPistol]);
|
nPistolClip[nPlayer] = std::min<int>(6, PlayerList[nPlayer].nAmmo[kWeaponPistol]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (nWeapon == kWeaponGrenade)
|
else if (nWeapon == kWeaponGrenade)
|
||||||
|
@ -483,7 +478,7 @@ void MoveWeapons(short nPlayer)
|
||||||
|
|
||||||
nWeapon = PlayerList[nPlayer].nCurrentWeapon;
|
nWeapon = PlayerList[nPlayer].nCurrentWeapon;
|
||||||
|
|
||||||
SetPlayerMummified(nPlayer, kFalse);
|
SetPlayerMummified(nPlayer, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -17,18 +17,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "init.h"
|
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "light.h"
|
|
||||||
#include "map.h"
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "ps_input.h"
|
#include "ps_input.h"
|
||||||
#include "util.h"
|
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
#include "gamecontrol.h"
|
#include "gamecontrol.h"
|
||||||
#include "v_video.h"
|
#include "v_video.h"
|
||||||
|
@ -65,7 +61,7 @@ short SectSpeed[kMaxSectors] = { 0 };
|
||||||
int SectBelow[kMaxSectors] = { 0 };
|
int SectBelow[kMaxSectors] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
uint8_t bIsVersion6 = kTrue;
|
uint8_t bIsVersion6 = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -131,7 +127,7 @@ uint8_t LoadLevel(int nMap)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nMap < 0) {
|
if (nMap < 0) {
|
||||||
return kFalse;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec3_t startPos;
|
vec3_t startPos;
|
||||||
|
@ -168,7 +164,7 @@ uint8_t LoadLevel(int nMap)
|
||||||
|
|
||||||
levelnum = nMap;
|
levelnum = nMap;
|
||||||
|
|
||||||
return kTrue;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetBelow(short nCurSector, short nBelowSector)
|
void SetBelow(short nCurSector, short nBelowSector)
|
||||||
|
@ -856,16 +852,6 @@ void LoadObjects()
|
||||||
nCameraz = initz;
|
nCameraz = initz;
|
||||||
}
|
}
|
||||||
|
|
||||||
int myloadconfig()
|
|
||||||
{
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int mysaveconfig()
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static SavegameHelper sgh("init",
|
static SavegameHelper sgh("init",
|
||||||
SV(initx),
|
SV(initx),
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __init_h__
|
|
||||||
#define __init_h__
|
|
||||||
|
|
||||||
#include "compat.h"
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
#define kMap20 20
|
|
||||||
|
|
||||||
enum {
|
|
||||||
kSectUnderwater = 0x2000,
|
|
||||||
kSectLava = 0x4000,
|
|
||||||
};
|
|
||||||
|
|
||||||
extern ClockTicks ototalclock;
|
|
||||||
|
|
||||||
extern int initx;
|
|
||||||
extern int inity;
|
|
||||||
extern int initz;
|
|
||||||
extern short inita;
|
|
||||||
extern short initsect;
|
|
||||||
|
|
||||||
extern short nCurChunkNum;
|
|
||||||
extern short nBodyGunSprite[50];
|
|
||||||
extern int movefifoend;
|
|
||||||
extern int movefifopos;
|
|
||||||
extern short nCurBodyGunNum;
|
|
||||||
|
|
||||||
void SnapSectors(short nSectorA, short nSectorB, short b);
|
|
||||||
|
|
||||||
extern short SectSound[];
|
|
||||||
extern short SectDamage[];
|
|
||||||
extern short SectSpeed[];
|
|
||||||
extern int SectBelow[];
|
|
||||||
extern short SectFlag[];
|
|
||||||
extern int SectDepth[];
|
|
||||||
extern short SectSoundSect[];
|
|
||||||
extern int SectAbove[];
|
|
||||||
|
|
||||||
uint8_t LoadLevel(int nMap);
|
|
||||||
void LoadObjects();
|
|
||||||
|
|
||||||
int myloadconfig();
|
|
||||||
int mysaveconfig();
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -20,7 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "network.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
@ -129,13 +128,15 @@ void LogoffPlayer(int nPlayer)
|
||||||
nNetPlayerCount--;
|
nNetPlayerCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
short nNetMoveFrames = 0;
|
||||||
|
|
||||||
void UpdateInputs()
|
void UpdateInputs()
|
||||||
{
|
{
|
||||||
nNetMoveFrames = moveframes;
|
nNetMoveFrames = moveframes;
|
||||||
|
|
||||||
if (nNetPlayerCount)
|
if (nNetPlayerCount)
|
||||||
{
|
{
|
||||||
UpdateNetInputs();
|
//UpdateNetInputs();
|
||||||
|
|
||||||
nNetMoves++;
|
nNetMoves++;
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "random.h"
|
|
||||||
#include "init.h"
|
|
||||||
#include "ps_input.h"
|
#include "ps_input.h"
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -18,10 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "random.h"
|
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
|
@ -16,11 +16,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "light.h"
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "cd.h"
|
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "../glbackend/glbackend.h"
|
#include "../glbackend/glbackend.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __light_h__
|
|
||||||
#define __light_h__
|
|
||||||
|
|
||||||
#include "compat.h"
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
int LoadPaletteLookups();
|
|
||||||
void WaitVBL();
|
|
||||||
void SetGreenPal();
|
|
||||||
void RestoreGreenPal();
|
|
||||||
void FixPalette();
|
|
||||||
void FadeToWhite();
|
|
||||||
int HavePLURemap();
|
|
||||||
uint8_t RemapPLU(uint8_t pal);
|
|
||||||
|
|
||||||
//extern unsigned char kenpal[];
|
|
||||||
extern short overscanindex;
|
|
||||||
|
|
||||||
extern char *origpalookup[];
|
|
||||||
|
|
||||||
extern short nPalDiff;
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -16,14 +16,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "light.h"
|
|
||||||
#include "random.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
@ -150,8 +147,8 @@ void InitLights()
|
||||||
nGlowCount = 0;
|
nGlowCount = 0;
|
||||||
nFlowCount = 0;
|
nFlowCount = 0;
|
||||||
nFlashes = 0;
|
nFlashes = 0;
|
||||||
bDoFlicks = kFalse;
|
bDoFlicks = false;
|
||||||
bDoGlows = kFalse;
|
bDoGlows = false;
|
||||||
|
|
||||||
for (i = 0; i < kMaxFlashes; i++) {
|
for (i = 0; i < kMaxFlashes; i++) {
|
||||||
nFreeFlash[i] = i;
|
nFreeFlash[i] = i;
|
||||||
|
|
|
@ -21,8 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "random.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -16,10 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "init.h"
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
|
@ -28,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
||||||
|
|
||||||
short bShowTowers = kFalse;
|
short bShowTowers = false;
|
||||||
int ldMapZoom;
|
int ldMapZoom;
|
||||||
int lMapZoom;
|
int lMapZoom;
|
||||||
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __map_h__
|
|
||||||
#define __map_h__
|
|
||||||
|
|
||||||
#include "compat.h"
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
extern short bShowTowers;
|
|
||||||
extern int ldMapZoom;
|
|
||||||
extern int lMapZoom;
|
|
||||||
|
|
||||||
void InitMap();
|
|
||||||
void GrabMap();
|
|
||||||
void UpdateMap();
|
|
||||||
void DrawMap();
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -19,7 +19,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
|
@ -28,14 +27,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "c_bind.h"
|
#include "c_bind.h"
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "random.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "names.h"
|
#include "names.h"
|
||||||
#include "init.h"
|
|
||||||
#include "ps_input.h"
|
#include "ps_input.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "light.h"
|
|
||||||
#include "cd.h"
|
|
||||||
#include "raze_sound.h"
|
#include "raze_sound.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "v_2ddrawer.h"
|
#include "v_2ddrawer.h"
|
||||||
|
@ -626,7 +621,7 @@ int menu_DrawTheMap(int nLevel, int nLevelNew, int nLevelBest)
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int var_2C = 0;
|
int var_2C = 0;
|
||||||
int nIdleSeconds = 0;
|
int nIdleSeconds = 0;
|
||||||
int bFadeDone = kFalse;
|
int bFadeDone = false;
|
||||||
|
|
||||||
int startTime = (int)totalclock;
|
int startTime = (int)totalclock;
|
||||||
|
|
||||||
|
@ -756,7 +751,7 @@ int menu_DrawTheMap(int nLevel, int nLevelNew, int nLevelBest)
|
||||||
videoNextPage();
|
videoNextPage();
|
||||||
if (!bFadeDone)
|
if (!bFadeDone)
|
||||||
{
|
{
|
||||||
bFadeDone = kTrue;
|
bFadeDone = true;
|
||||||
FadeIn();
|
FadeIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1227,7 +1222,7 @@ void GoToTheCinema(int nVal)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FadeOut(kFalse);
|
FadeOut(false);
|
||||||
StopAllSounds();
|
StopAllSounds();
|
||||||
NoClip();
|
NoClip();
|
||||||
|
|
||||||
|
@ -1299,7 +1294,7 @@ void GoToTheCinema(int nVal)
|
||||||
DoCinemaText(ebx);
|
DoCinemaText(ebx);
|
||||||
}
|
}
|
||||||
|
|
||||||
FadeOut(kTrue);
|
FadeOut(true);
|
||||||
|
|
||||||
overwritesprite(0, 0, kMovieTile, 100, 2, kPalNormal, currentCinemaPalette);
|
overwritesprite(0, 0, kMovieTile, 100, 2, kPalNormal, currentCinemaPalette);
|
||||||
videoNextPage();
|
videoNextPage();
|
||||||
|
|
|
@ -20,7 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#define __menu_h__
|
#define __menu_h__
|
||||||
|
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -19,21 +19,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "init.h"
|
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include "random.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#ifndef __WATCOMC__
|
|
||||||
//#include <cmath>
|
|
||||||
#else
|
|
||||||
#include <stdlib.h>
|
|
||||||
//#include <math.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
||||||
|
@ -312,7 +304,7 @@ int BelowNear(short nSprite)
|
||||||
overridesect = nSector;
|
overridesect = nSector;
|
||||||
sprite[nSprite].zvel = 0;
|
sprite[nSprite].zvel = 0;
|
||||||
|
|
||||||
bTouchFloor = kTrue;
|
bTouchFloor = true;
|
||||||
|
|
||||||
return var_24;
|
return var_24;
|
||||||
}
|
}
|
||||||
|
@ -402,7 +394,7 @@ int movespritez(short nSprite, int z, int height, int UNUSED(flordist), int clip
|
||||||
{
|
{
|
||||||
if (z > 0)
|
if (z > 0)
|
||||||
{
|
{
|
||||||
bTouchFloor = kTrue;
|
bTouchFloor = true;
|
||||||
|
|
||||||
if ((lohit & 0xC000) == 0xC000)
|
if ((lohit & 0xC000) == 0xC000)
|
||||||
{
|
{
|
||||||
|
@ -503,7 +495,7 @@ int GetSpriteHeight(int nSprite)
|
||||||
int movesprite(short nSprite, int dx, int dy, int dz, int UNUSED(ceildist), int flordist, unsigned int clipmask)
|
int movesprite(short nSprite, int dx, int dy, int dz, int UNUSED(ceildist), int flordist, unsigned int clipmask)
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
bTouchFloor = kFalse;
|
bTouchFloor = false;
|
||||||
|
|
||||||
int x = pSprite->x;
|
int x = pSprite->x;
|
||||||
int y = pSprite->y;
|
int y = pSprite->y;
|
||||||
|
|
|
@ -19,12 +19,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "names.h"
|
#include "names.h"
|
||||||
#include "movie.h"
|
|
||||||
#include "light.h"
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include "c_bind.h"
|
#include "c_bind.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "v_2ddrawer.h"
|
#include "v_2ddrawer.h"
|
||||||
|
@ -192,7 +189,7 @@ void PlayMovie(const char* fileName)
|
||||||
TArray<uint8_t> f(64000, true);
|
TArray<uint8_t> f(64000, true);
|
||||||
CurFrame = f.Data();
|
CurFrame = f.Data();
|
||||||
|
|
||||||
int bDoFade = kTrue;
|
int bDoFade = true;
|
||||||
int hFx = -1;
|
int hFx = -1;
|
||||||
auto fp = fileSystem.OpenFileReader(fileName);
|
auto fp = fileSystem.OpenFileReader(fileName);
|
||||||
if (!fp.isOpen())
|
if (!fp.isOpen())
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __movie_h__
|
|
||||||
#define __movie_h__
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
void PlayMovie(const char *fileName);
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -18,11 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "map.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "random.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
#include "ns.h"
|
|
||||||
// this is net.c in the original code
|
|
||||||
|
|
||||||
#include "typedefs.h"
|
|
||||||
#include "network.h"
|
|
||||||
#include "ps_input.h"
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
short nNetMoveFrames = 0;
|
|
||||||
|
|
||||||
|
|
||||||
void SendGoodbye()
|
|
||||||
{
|
|
||||||
UpdateInputs();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateNetInputs()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
int InitNet(short nSocket, int nPlayers)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void AbortNetworkPlay()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void UnInitNet()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
END_PS_NS
|
|
|
@ -1,34 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __network_h__
|
|
||||||
#define __network_h__
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
extern short nNetMoveFrames;
|
|
||||||
|
|
||||||
void SendGoodbye();
|
|
||||||
void UpdateNetInputs();
|
|
||||||
int InitNet(short nSocket, int nPlayers);
|
|
||||||
void AbortNetworkPlay();
|
|
||||||
void UnInitNet();
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -19,14 +19,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "random.h"
|
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "init.h"
|
|
||||||
#include "names.h"
|
#include "names.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "osdcmds.h"
|
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "mapinfo.h"
|
#include "mapinfo.h"
|
||||||
|
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010 EDuke32 developers and contributors
|
|
||||||
|
|
||||||
This file is part of EDuke32.
|
|
||||||
|
|
||||||
EDuke32 is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef osdcmds_h_
|
|
||||||
#define osdcmds_h_
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
|
|
||||||
int32_t registerosdcommands(void);
|
|
||||||
void GAME_onshowosd(int shown);
|
|
||||||
void GAME_clearbackground(int numcols, int numrows);
|
|
||||||
|
|
||||||
extern const char *const ConsoleButtons[];
|
|
||||||
|
|
||||||
//extern uint32_t cl_cheatmask;
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif // osdcmds_h_
|
|
||||||
|
|
|
@ -24,16 +24,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "random.h"
|
|
||||||
#include "ps_input.h"
|
#include "ps_input.h"
|
||||||
#include "light.h"
|
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "init.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "cd.h"
|
|
||||||
#include "map.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "buildtiles.h"
|
#include "buildtiles.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -278,39 +272,39 @@ void PlayerInterruptKeys()
|
||||||
// Look/aim up/down functions.
|
// Look/aim up/down functions.
|
||||||
if (buttonMap.ButtonDown(gamefunc_Look_Up) || buttonMap.ButtonDown(gamefunc_Aim_Up))
|
if (buttonMap.ButtonDown(gamefunc_Look_Up) || buttonMap.ButtonDown(gamefunc_Aim_Up))
|
||||||
{
|
{
|
||||||
bLockPan = kFalse;
|
bLockPan = false;
|
||||||
if (PlayerList[nLocalPlayer].q16horiz < fix16_from_int(180)) {
|
if (PlayerList[nLocalPlayer].q16horiz < fix16_from_int(180)) {
|
||||||
PlayerList[nLocalPlayer].q16horiz = fix16_sadd(PlayerList[nLocalPlayer].q16horiz, fix16_from_dbl(scaleAdjustmentToInterval(4)));
|
PlayerList[nLocalPlayer].q16horiz = fix16_sadd(PlayerList[nLocalPlayer].q16horiz, fix16_from_dbl(scaleAdjustmentToInterval(4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bPlayerPan = kTrue;
|
bPlayerPan = true;
|
||||||
nDestVertPan[nLocalPlayer] = PlayerList[nLocalPlayer].q16horiz;
|
nDestVertPan[nLocalPlayer] = PlayerList[nLocalPlayer].q16horiz;
|
||||||
}
|
}
|
||||||
else if (buttonMap.ButtonDown(gamefunc_Look_Down) || buttonMap.ButtonDown(gamefunc_Aim_Down))
|
else if (buttonMap.ButtonDown(gamefunc_Look_Down) || buttonMap.ButtonDown(gamefunc_Aim_Down))
|
||||||
{
|
{
|
||||||
bLockPan = kFalse;
|
bLockPan = false;
|
||||||
if (PlayerList[nLocalPlayer].q16horiz > fix16_from_int(4)) {
|
if (PlayerList[nLocalPlayer].q16horiz > fix16_from_int(4)) {
|
||||||
PlayerList[nLocalPlayer].q16horiz = fix16_ssub(PlayerList[nLocalPlayer].q16horiz, fix16_from_dbl(scaleAdjustmentToInterval(4)));
|
PlayerList[nLocalPlayer].q16horiz = fix16_ssub(PlayerList[nLocalPlayer].q16horiz, fix16_from_dbl(scaleAdjustmentToInterval(4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
bPlayerPan = kTrue;
|
bPlayerPan = true;
|
||||||
nDestVertPan[nLocalPlayer] = PlayerList[nLocalPlayer].q16horiz;
|
nDestVertPan[nLocalPlayer] = PlayerList[nLocalPlayer].q16horiz;
|
||||||
}
|
}
|
||||||
else if (buttonMap.ButtonDown(gamefunc_Center_View))
|
else if (buttonMap.ButtonDown(gamefunc_Center_View))
|
||||||
{
|
{
|
||||||
bLockPan = kFalse;
|
bLockPan = false;
|
||||||
bPlayerPan = kFalse;
|
bPlayerPan = false;
|
||||||
PlayerList[nLocalPlayer].q16horiz = fix16_from_int(92);
|
PlayerList[nLocalPlayer].q16horiz = fix16_from_int(92);
|
||||||
nDestVertPan[nLocalPlayer] = fix16_from_int(92);
|
nDestVertPan[nLocalPlayer] = fix16_from_int(92);
|
||||||
}
|
}
|
||||||
|
|
||||||
// loc_1C048:
|
// loc_1C048:
|
||||||
if (totalvel[nLocalPlayer] > 20) {
|
if (totalvel[nLocalPlayer] > 20) {
|
||||||
bPlayerPan = kFalse;
|
bPlayerPan = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_MyAimMode)
|
if (g_MyAimMode)
|
||||||
bLockPan = kTrue;
|
bLockPan = true;
|
||||||
|
|
||||||
// loc_1C05E
|
// loc_1C05E
|
||||||
fix16_t ecx = nDestVertPan[nLocalPlayer] - PlayerList[nLocalPlayer].q16horiz;
|
fix16_t ecx = nDestVertPan[nLocalPlayer] - PlayerList[nLocalPlayer].q16horiz;
|
||||||
|
@ -605,7 +599,7 @@ void RestartPlayer(short nPlayer)
|
||||||
|
|
||||||
PlayerList[nPlayer].field_2 = 0;
|
PlayerList[nPlayer].field_2 = 0;
|
||||||
PlayerList[nPlayer].nSprite = nSprite;
|
PlayerList[nPlayer].nSprite = nSprite;
|
||||||
PlayerList[nPlayer].bIsMummified = kFalse;
|
PlayerList[nPlayer].bIsMummified = false;
|
||||||
|
|
||||||
if (PlayerList[nPlayer].invincibility >= 0) {
|
if (PlayerList[nPlayer].invincibility >= 0) {
|
||||||
PlayerList[nPlayer].invincibility = 0;
|
PlayerList[nPlayer].invincibility = 0;
|
||||||
|
|
|
@ -20,8 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "random.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "names.h"
|
#include "names.h"
|
||||||
|
|
|
@ -16,7 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "random.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __random_h__
|
|
||||||
#define __random_h__
|
|
||||||
#include "compat.h"
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
void InitRandom();
|
|
||||||
int RandomBit();
|
|
||||||
char RandomByte();
|
|
||||||
uint16_t RandomWord();
|
|
||||||
int RandomLong();
|
|
||||||
int RandomSize(int nSize);
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -19,9 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "random.h"
|
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "init.h"
|
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "record.h"
|
#include "engine.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include "save.h"
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __record_h__
|
|
||||||
#define __record_h__
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
|
|
||||||
extern short record_mode;
|
|
||||||
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -21,8 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "random.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "random.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -20,10 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include "random.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "init.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -16,14 +16,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "save.h"
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "init.h"
|
#include "build.h"
|
||||||
#include "raze_music.h"
|
#include "raze_music.h"
|
||||||
//#include <fcntl.h>
|
|
||||||
//#include <sys/stat.h>
|
|
||||||
//#include <io.h>
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "mmulti.h"
|
#include "mmulti.h"
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __save_h__
|
|
||||||
#define __save_h__
|
|
||||||
#include "zstring.h"
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
int savegame(int nSlot);
|
|
||||||
int loadgame(int nSlot);
|
|
||||||
|
|
||||||
|
|
||||||
struct SavegameHelper
|
|
||||||
{
|
|
||||||
FString Name;
|
|
||||||
TArray<std::pair<void*, size_t>> Elements;
|
|
||||||
SavegameHelper(const char* name, ...);
|
|
||||||
void Load();
|
|
||||||
void Save();
|
|
||||||
};
|
|
||||||
|
|
||||||
#define SV(v) &v, sizeof(v)
|
|
||||||
#define SA(a) &a, sizeof(a)
|
|
||||||
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -21,8 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "random.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -16,17 +16,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "typedefs.h"
|
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "init.h"
|
|
||||||
#include "light.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "random.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "ps_input.h"
|
#include "ps_input.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
|
@ -22,13 +22,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "init.h"
|
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "random.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "cd.h"
|
|
||||||
#include "raze_sound.h"
|
#include "raze_sound.h"
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -20,9 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "random.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
|
@ -22,15 +22,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "init.h"
|
|
||||||
#include "names.h"
|
#include "names.h"
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "typedefs.h"
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "trigdat.h"
|
#include "engine.h"
|
||||||
#ifndef __WATCOMC__
|
#ifndef __WATCOMC__
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __trigdat_h__
|
|
||||||
#define __trigdat_h__
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
#define kAngleMask 0x7FF
|
|
||||||
|
|
||||||
int GetMyAngle(int x, int y);
|
|
||||||
|
|
||||||
int AngleDiff(short a, short b);
|
|
||||||
int AngleDelta(int a, int b, int c);
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,25 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __typedefs_h__
|
|
||||||
#define __typedefs_h__
|
|
||||||
|
|
||||||
#define kTrue (0 == 0)
|
|
||||||
#define kFalse (0 != 0)
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,43 +0,0 @@
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
/*
|
|
||||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
||||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
||||||
This file is part of PCExhumed.
|
|
||||||
PCExhumed is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License version 2
|
|
||||||
as published by the Free Software Foundation.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
See the GNU General Public License for more details.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef __util_h__
|
|
||||||
#define __util_h__
|
|
||||||
|
|
||||||
BEGIN_PS_NS
|
|
||||||
|
|
||||||
|
|
||||||
inline int Min(int a, int b)
|
|
||||||
{
|
|
||||||
if (a < b)
|
|
||||||
return a;
|
|
||||||
else
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline int Max(int a, int b)
|
|
||||||
{
|
|
||||||
if (a < b)
|
|
||||||
return b;
|
|
||||||
else
|
|
||||||
return a;
|
|
||||||
}
|
|
||||||
|
|
||||||
END_PS_NS
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -24,21 +24,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "light.h"
|
|
||||||
#include "init.h"
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
#include "cd.h"
|
|
||||||
#include "typedefs.h"
|
|
||||||
#include "map.h"
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
#include "trigdat.h"
|
|
||||||
#include "v_video.h"
|
#include "v_video.h"
|
||||||
#include "glbackend/glbackend.h"
|
#include "glbackend/glbackend.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
||||||
short bSubTitles = kTrue;
|
short bSubTitles = true;
|
||||||
|
|
||||||
int zbob;
|
int zbob;
|
||||||
|
|
||||||
|
@ -57,12 +51,12 @@ short nChunkTotal = 0;
|
||||||
fix16_t nCameraa;
|
fix16_t nCameraa;
|
||||||
fix16_t nCamerapan;
|
fix16_t nCamerapan;
|
||||||
short nViewTop;
|
short nViewTop;
|
||||||
short bClip = kFalse;
|
short bClip = false;
|
||||||
short nViewBottom;
|
short nViewBottom;
|
||||||
short nViewRight;
|
short nViewRight;
|
||||||
short besttarget;
|
short besttarget;
|
||||||
short nViewLeft;
|
short nViewLeft;
|
||||||
short bCamera = kFalse;
|
short bCamera = false;
|
||||||
|
|
||||||
short nViewy;
|
short nViewy;
|
||||||
|
|
||||||
|
@ -605,7 +599,7 @@ void NoClip()
|
||||||
{
|
{
|
||||||
videoSetViewableArea(0, 0, xdim - 1, ydim - 1);
|
videoSetViewableArea(0, 0, xdim - 1, ydim - 1);
|
||||||
|
|
||||||
bClip = kFalse;
|
bClip = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Clip()
|
void Clip()
|
||||||
|
@ -615,7 +609,7 @@ void Clip()
|
||||||
MaskStatus();
|
MaskStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
bClip = kTrue;
|
bClip = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#include "ns.h"
|
#include "ns.h"
|
||||||
#include "aistuff.h"
|
#include "aistuff.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "random.h"
|
|
||||||
#include "exhumed.h"
|
#include "exhumed.h"
|
||||||
#include "sequence.h"
|
#include "sequence.h"
|
||||||
#include "init.h"
|
|
||||||
#include "trigdat.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
@ -95,9 +92,9 @@ int BuildWasp(short nSprite, int x, int y, int z, short nSector, short nAngle)
|
||||||
short nWasp = nWaspCount;
|
short nWasp = nWaspCount;
|
||||||
nWaspCount++;
|
nWaspCount++;
|
||||||
|
|
||||||
uint8_t bEggWasp = kFalse;
|
uint8_t bEggWasp = false;
|
||||||
if (nSprite == -2) {
|
if (nSprite == -2) {
|
||||||
bEggWasp = kTrue;
|
bEggWasp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nSprite < 0)
|
if (nSprite < 0)
|
||||||
|
|
Loading…
Reference in a new issue