raze/source/games/duke/src/player.h

86 lines
2 KiB
C
Raw Normal View History

//-------------------------------------------------------------------------
/*
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 player_h_
#define player_h_
#include "names.h"
#include "fix16.h"
#include "tarray.h"
2020-07-06 11:26:26 +00:00
#include "constants.h"
2020-07-06 21:50:14 +00:00
#include "types.h"
BEGIN_DUKE_NS
extern int32_t playerswhenstarted;
extern int32_t PHEIGHT;
enum gamemode_t {
MODE_MENU = 0x00000001,
MODE_DEMO = 0x00000002,
MODE_GAME = 0x00000004,
MODE_EOL = 0x00000008,
MODE_TYPE = 0x00000010,
MODE_RESTART = 0x00000020,
};
2020-05-05 20:07:54 +00:00
typedef struct
{
input_t *input;
bool horizRecenter;
float horizAngleAdjust;
2020-06-21 20:18:12 +00:00
fix16_t horizSkew;
int32_t pcolor, pteam;
// NOTE: wchoice[HANDREMOTE_WEAPON .. MAX_WEAPONS-1] unused
char user_name[32];
double lastInputTicks;
2020-05-07 22:03:51 +00:00
} playerdata_t;
extern uint16_t frags[MAXPLAYERS][MAXPLAYERS];
2020-05-07 22:03:51 +00:00
# define PWEAPON(Player, Weapon, Wmember) (aplWeapon ## Wmember [Weapon][Player])
extern playerdata_t *const g_player;
extern int32_t mouseyaxismode;
void P_GetInput(int playerNum);
void P_GetInputMotorcycle(int playerNum);
void P_GetInputBoat(int playerNum);
extern int16_t max_ammo_amount[MAX_WEAPONS];
2020-05-17 21:44:53 +00:00
2020-05-18 20:28:12 +00:00
extern int lastvisinc;
END_DUKE_NS
#endif