2019-09-19 22:42:45 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
|
|
Copyright (C) 2019 Nuke.YKT
|
|
|
|
|
|
|
|
This file is part of NBlood.
|
|
|
|
|
|
|
|
NBlood 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.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
#pragma once
|
2019-09-22 06:39:22 +00:00
|
|
|
|
2020-09-08 16:39:47 +00:00
|
|
|
#include "m_fixed.h"
|
2020-07-25 18:34:40 +00:00
|
|
|
#include "filesystem.h"
|
|
|
|
|
2019-09-22 06:39:22 +00:00
|
|
|
BEGIN_BLD_NS
|
|
|
|
|
2020-07-29 21:18:08 +00:00
|
|
|
void playlogos();
|
2019-09-19 22:42:45 +00:00
|
|
|
unsigned int qrand(void);
|
|
|
|
int wrand(void);
|
|
|
|
void wsrand(int);
|
2020-07-25 18:34:40 +00:00
|
|
|
void FireInit(void);
|
|
|
|
void FireProcess(void);
|
|
|
|
void UpdateNetworkMenus(void);
|
|
|
|
void InitMirrors(void);
|
2021-03-20 22:01:16 +00:00
|
|
|
void setPortalFlags(char mode);
|
|
|
|
void processSpritesOnOtherSideOfPortal(int x, int y, int interpolation);
|
2020-09-01 13:00:35 +00:00
|
|
|
void DrawMirrors(int x, int y, int z, fixed_t a, fixed_t horiz, int smooth, int viewPlayer);
|
2020-07-25 18:34:40 +00:00
|
|
|
int qanimateoffs(int a1, int a2);
|
|
|
|
void HookReplaceFunctions();
|
2019-09-22 06:39:22 +00:00
|
|
|
|
2020-07-25 22:07:59 +00:00
|
|
|
struct PLAYER;
|
|
|
|
|
2021-08-27 19:38:02 +00:00
|
|
|
bool checkFired6or7(PLAYER *pPlayer);
|
2020-07-25 22:07:59 +00:00
|
|
|
void WeaponInit(void);
|
2021-08-05 02:38:26 +00:00
|
|
|
void WeaponDraw(PLAYER *pPlayer, int a2, double a3, double a4, int a5);
|
2020-07-25 22:07:59 +00:00
|
|
|
void WeaponRaise(PLAYER *pPlayer);
|
|
|
|
void WeaponLower(PLAYER *pPlayer);
|
2021-04-17 08:34:12 +00:00
|
|
|
int WeaponUpgrade(PLAYER *pPlayer, int newWeapon);
|
2020-07-25 22:07:59 +00:00
|
|
|
void WeaponProcess(PLAYER *pPlayer);
|
|
|
|
void WeaponUpdateState(PLAYER* pPlayer);
|
2020-11-21 18:30:00 +00:00
|
|
|
void teslaHit(spritetype *pMissile, int a2);
|
2021-04-11 10:42:59 +00:00
|
|
|
void WeaponPrecache();
|
2020-07-25 22:07:59 +00:00
|
|
|
|
|
|
|
struct ZONE {
|
|
|
|
int x, y, z;
|
|
|
|
short sectnum, ang;
|
|
|
|
};
|
|
|
|
extern ZONE gStartZone[8];
|
|
|
|
|
|
|
|
void warpInit(void);
|
|
|
|
int CheckLink(spritetype *pSprite);
|
|
|
|
int CheckLink(int *x, int *y, int *z, int *nSector);
|
|
|
|
|
|
|
|
extern int costable[2048];
|
|
|
|
|
|
|
|
int GetOctant(int x, int y);
|
|
|
|
void RotateVector(int *dx, int *dy, int nAngle);
|
|
|
|
void RotatePoint(int *x, int *y, int nAngle, int ox, int oy);
|
|
|
|
void trigInit();
|
|
|
|
|
2020-09-01 13:00:35 +00:00
|
|
|
#include "m_fixed.h"
|
|
|
|
|
2020-07-25 22:07:59 +00:00
|
|
|
inline int Sin(int ang)
|
|
|
|
{
|
2021-10-30 06:25:10 +00:00
|
|
|
return sintable[ang & 2047];
|
2020-07-25 22:07:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline int Cos(int ang)
|
|
|
|
{
|
|
|
|
return costable[ang & 2047];
|
2020-09-01 13:00:35 +00:00
|
|
|
}
|
|
|
|
|
2020-07-25 22:07:59 +00:00
|
|
|
enum SurfaceType {
|
|
|
|
kSurfNone = 0,
|
|
|
|
kSurfStone,
|
|
|
|
kSurfMetal,
|
|
|
|
kSurfWood,
|
|
|
|
kSurfFlesh,
|
|
|
|
kSurfWater,
|
|
|
|
kSurfDirt,
|
|
|
|
kSurfClay,
|
|
|
|
kSurfSnow,
|
|
|
|
kSurfIce,
|
|
|
|
kSurfLeaves,
|
|
|
|
kSurfCloth,
|
|
|
|
kSurfPlant,
|
|
|
|
kSurfGoo,
|
|
|
|
kSurfLava,
|
|
|
|
kSurfMax
|
|
|
|
};
|
|
|
|
|
|
|
|
extern char surfType[MAXTILES];
|
2021-04-17 08:14:03 +00:00
|
|
|
extern int8_t tileShade[MAXTILES];
|
2020-07-25 22:07:59 +00:00
|
|
|
extern short voxelIndex[MAXTILES];
|
|
|
|
|
|
|
|
extern int nPrecacheCount;
|
|
|
|
|
2021-04-11 10:42:59 +00:00
|
|
|
void tilePrecacheTile(int nTile, int nType, int palette);
|
2020-09-01 17:59:15 +00:00
|
|
|
|
2020-07-25 22:07:59 +00:00
|
|
|
char tileGetSurfType(int hit);
|
|
|
|
|
2019-09-22 06:39:22 +00:00
|
|
|
END_BLD_NS
|