2019-11-20 16:21:32 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
2019-08-26 03:59:14 +00:00
|
|
|
|
2020-10-11 10:41:38 +00:00
|
|
|
#pragma once
|
2019-08-26 03:59:14 +00:00
|
|
|
|
|
|
|
#include "build.h"
|
|
|
|
|
2019-11-22 23:11:37 +00:00
|
|
|
BEGIN_PS_NS
|
|
|
|
|
2019-08-26 03:59:14 +00:00
|
|
|
enum
|
|
|
|
{
|
2020-10-11 11:14:32 +00:00
|
|
|
kStatIgnited = 404,
|
|
|
|
kMaxSprites = 4096,
|
|
|
|
kMaxVoxels = 4096,
|
|
|
|
kMaxPalookups = 256,
|
|
|
|
kMaxStatus = 1024,
|
|
|
|
kMap20 = 20,
|
|
|
|
kAngleMask = 0x7FF
|
2019-08-26 03:59:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-10-21 18:25:15 +00:00
|
|
|
Collision movesprite(DExhumedActor* spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask);
|
2021-10-17 13:15:33 +00:00
|
|
|
|
2020-08-18 08:28:19 +00:00
|
|
|
void precache();
|
|
|
|
void resettiming();
|
|
|
|
|
|
|
|
// cd
|
|
|
|
|
|
|
|
bool playCDtrack(int nTrack, bool bLoop);
|
|
|
|
int StepFadeCDaudio();
|
|
|
|
bool CDplaying();
|
|
|
|
void StopCD();
|
|
|
|
|
|
|
|
// init
|
|
|
|
|
|
|
|
enum {
|
|
|
|
kSectUnderwater = 0x2000,
|
|
|
|
kSectLava = 0x4000,
|
|
|
|
};
|
|
|
|
|
|
|
|
extern int initx;
|
|
|
|
extern int inity;
|
|
|
|
extern int initz;
|
2021-11-21 19:13:19 +00:00
|
|
|
extern int16_t inita;
|
2021-11-07 19:14:44 +00:00
|
|
|
extern int initsect;
|
2020-08-18 08:28:19 +00:00
|
|
|
|
2021-11-21 19:13:19 +00:00
|
|
|
extern int nCurChunkNum;
|
2021-09-17 13:33:07 +00:00
|
|
|
extern DExhumedActor* nBodyGunSprite[50];
|
2020-08-18 08:28:19 +00:00
|
|
|
extern int movefifoend;
|
|
|
|
extern int movefifopos;
|
2021-11-21 19:13:19 +00:00
|
|
|
extern int nCurBodyGunNum;
|
2020-08-18 08:28:19 +00:00
|
|
|
|
2021-10-17 16:23:42 +00:00
|
|
|
// all static counters combined in an array for easier maintenance.
|
|
|
|
enum ECounter
|
|
|
|
{
|
|
|
|
kCountAnubis,
|
|
|
|
kCountAnubisDrum,
|
2021-10-17 19:06:56 +00:00
|
|
|
kCountLava,
|
2021-10-17 20:03:08 +00:00
|
|
|
kCountLion,
|
2021-10-17 23:05:38 +00:00
|
|
|
kCountMummy,
|
2021-10-17 22:28:59 +00:00
|
|
|
kCountRex,
|
2021-10-18 16:54:35 +00:00
|
|
|
kCountRoach,
|
|
|
|
kCountScorp,
|
2021-10-19 17:53:42 +00:00
|
|
|
kCountSet,
|
|
|
|
kCountSoul,
|
2021-10-18 18:05:33 +00:00
|
|
|
kCountSpider,
|
2021-10-24 11:20:50 +00:00
|
|
|
kCountWasp,
|
2021-10-17 16:23:42 +00:00
|
|
|
|
|
|
|
kNumCounters
|
|
|
|
};
|
|
|
|
extern int Counters[kNumCounters];
|
|
|
|
|
2021-11-09 16:27:54 +00:00
|
|
|
void SnapSectors(int nSectorA, int nSectorB, int b);
|
2020-08-18 08:28:19 +00:00
|
|
|
|
|
|
|
void LoadObjects();
|
|
|
|
|
|
|
|
// light
|
|
|
|
|
|
|
|
int LoadPaletteLookups();
|
|
|
|
void SetGreenPal();
|
|
|
|
void RestoreGreenPal();
|
|
|
|
void FixPalette();
|
|
|
|
int HavePLURemap();
|
|
|
|
uint8_t RemapPLU(uint8_t pal);
|
|
|
|
|
|
|
|
extern char *origpalookup[];
|
|
|
|
|
2021-11-21 19:13:19 +00:00
|
|
|
extern int nPalDiff;
|
2020-08-18 08:28:19 +00:00
|
|
|
|
|
|
|
// map
|
|
|
|
|
2021-11-21 19:13:19 +00:00
|
|
|
extern bool bShowTowers;
|
2020-08-18 08:28:19 +00:00
|
|
|
|
|
|
|
void GrabMap();
|
|
|
|
void UpdateMap();
|
2021-01-02 07:23:01 +00:00
|
|
|
void DrawMap(double const smoothratio);
|
2020-08-18 08:28:19 +00:00
|
|
|
|
|
|
|
// random
|
|
|
|
|
|
|
|
void InitRandom();
|
|
|
|
int RandomBit();
|
2021-11-09 16:46:10 +00:00
|
|
|
uint8_t RandomByte();
|
2020-08-18 08:28:19 +00:00
|
|
|
uint16_t RandomWord();
|
|
|
|
int RandomLong();
|
|
|
|
int RandomSize(int nSize);
|
|
|
|
|
|
|
|
// record
|
|
|
|
|
|
|
|
// save
|
|
|
|
|
|
|
|
// trigdat
|
|
|
|
|
|
|
|
|
|
|
|
int GetMyAngle(int x, int y);
|
|
|
|
|
2021-11-21 19:13:19 +00:00
|
|
|
int AngleDiff(int a, int b);
|
2020-08-18 08:28:19 +00:00
|
|
|
int AngleDelta(int a, int b, int c);
|
|
|
|
|
2019-11-22 23:11:37 +00:00
|
|
|
END_PS_NS
|
|
|
|
|