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
|
|
|
|
|
2021-09-04 07:37:17 +00:00
|
|
|
class DBloodActor;
|
2021-11-26 13:03:21 +00:00
|
|
|
using HitInfo = THitInfo<DBloodActor>;
|
|
|
|
using Collision = TCollision<DBloodActor>;
|
2021-09-04 07:37:17 +00:00
|
|
|
|
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);
|
2021-12-29 21:56:21 +00:00
|
|
|
void UpdateNetworkMenus(void);
|
2020-07-25 18:34:40 +00:00
|
|
|
void InitMirrors(void);
|
2021-11-16 17:30:23 +00:00
|
|
|
void setPortalFlags(int mode);
|
2021-03-20 22:01:16 +00:00
|
|
|
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);
|
2019-09-22 06:39:22 +00:00
|
|
|
|
2020-07-25 22:07:59 +00:00
|
|
|
struct PLAYER;
|
|
|
|
|
2022-05-05 23:16:10 +00:00
|
|
|
bool checkLitSprayOrTNT(PLAYER* pPlayer);
|
2020-07-25 22:07:59 +00:00
|
|
|
void WeaponInit(void);
|
2021-12-29 21:56:21 +00:00
|
|
|
void WeaponDraw(PLAYER* pPlayer, int a2, double a3, double a4, int a5);
|
|
|
|
void WeaponRaise(PLAYER* pPlayer);
|
|
|
|
void WeaponLower(PLAYER* pPlayer);
|
|
|
|
int WeaponUpgrade(PLAYER* pPlayer, int newWeapon);
|
|
|
|
void WeaponProcess(PLAYER* pPlayer);
|
2020-07-25 22:07:59 +00:00
|
|
|
void WeaponUpdateState(PLAYER* pPlayer);
|
2021-12-29 21:56:21 +00:00
|
|
|
void teslaHit(DBloodActor* pMissile, int a2);
|
2021-04-11 10:42:59 +00:00
|
|
|
void WeaponPrecache();
|
2020-07-25 22:07:59 +00:00
|
|
|
|
|
|
|
struct ZONE {
|
2022-08-22 16:25:40 +00:00
|
|
|
DVector3 pos;
|
2021-11-23 23:55:57 +00:00
|
|
|
sectortype* sector;
|
2021-11-16 17:20:24 +00:00
|
|
|
short ang;
|
2020-07-25 22:07:59 +00:00
|
|
|
};
|
|
|
|
extern ZONE gStartZone[8];
|
|
|
|
|
2021-12-03 20:36:32 +00:00
|
|
|
void warpInit(TArray<DBloodActor*>& actors);
|
2021-12-29 21:56:21 +00:00
|
|
|
int CheckLink(DBloodActor* pSprite);
|
|
|
|
int CheckLink(int* x, int* y, int* z, sectortype** pSector);
|
2020-07-25 22:07:59 +00:00
|
|
|
|
2021-12-29 21:56:21 +00:00
|
|
|
void RotateVector(int* dx, int* dy, int nAngle);
|
2020-07-25 22:07:59 +00:00
|
|
|
|
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-12-29 21:56:21 +00:00
|
|
|
return sintable[ang & 2047];
|
2020-07-25 22:07:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline int Cos(int ang)
|
|
|
|
{
|
2021-12-29 21:56:21 +00:00
|
|
|
return sintable[(ang + 512) & 2047];
|
2020-09-01 13:00:35 +00:00
|
|
|
}
|
|
|
|
|
2020-07-25 22:07:59 +00:00
|
|
|
enum SurfaceType {
|
2021-12-29 21:56:21 +00:00
|
|
|
kSurfNone = 0,
|
|
|
|
kSurfStone,
|
|
|
|
kSurfMetal,
|
|
|
|
kSurfWood,
|
|
|
|
kSurfFlesh,
|
|
|
|
kSurfWater,
|
|
|
|
kSurfDirt,
|
|
|
|
kSurfClay,
|
|
|
|
kSurfSnow,
|
|
|
|
kSurfIce,
|
|
|
|
kSurfLeaves,
|
|
|
|
kSurfCloth,
|
|
|
|
kSurfPlant,
|
|
|
|
kSurfGoo,
|
|
|
|
kSurfLava,
|
|
|
|
kSurfMax
|
2020-07-25 22:07:59 +00:00
|
|
|
};
|
|
|
|
|
2021-11-16 17:36:34 +00:00
|
|
|
extern uint8_t 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
|
|
|
|
2021-08-27 19:49:18 +00:00
|
|
|
int tileGetSurfType(int hit);
|
2021-12-05 19:55:19 +00:00
|
|
|
int tileGetSurfType(CollisionBase& hit);
|
2020-07-25 22:07:59 +00:00
|
|
|
|
2019-09-22 06:39:22 +00:00
|
|
|
END_BLD_NS
|