Reduce player.h includes

This commit is contained in:
Kp 2015-04-19 04:18:52 +00:00
parent 83afd8d96f
commit ae8a8c98ce

View file

@ -23,14 +23,12 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
* *
*/ */
#ifndef _PLAYER_H #pragma once
#define _PLAYER_H
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
#include <physfs.h> #include <physfs.h>
#include "vecmat.h" #include "vecmat.h"
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
#include "weapon.h" #include "weapon.h"
#endif
#ifdef __cplusplus #ifdef __cplusplus
#include <algorithm> #include <algorithm>
@ -92,8 +90,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#define TEAM_RED 1 #define TEAM_RED 1
#endif #endif
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
struct callsign_t struct callsign_t
{ {
static const std::size_t array_length = CALLSIGN_LEN + 1; static const std::size_t array_length = CALLSIGN_LEN + 1;
@ -288,7 +284,6 @@ static_assert(sizeof(player_rw) == 116, "wrong size player_rw");
#elif defined(DXX_BUILD_DESCENT_II) #elif defined(DXX_BUILD_DESCENT_II)
static_assert(sizeof(player_rw) == 142, "wrong size player_rw"); static_assert(sizeof(player_rw) == 142, "wrong size player_rw");
#endif #endif
#endif
#define N_PLAYER_GUNS 8 #define N_PLAYER_GUNS 8
#define N_PLAYER_SHIP_TEXTURES 32 #define N_PLAYER_SHIP_TEXTURES 32
@ -319,10 +314,8 @@ extern playernum_t Player_num; // The player number who is on the console.
#elif defined(DXX_BUILD_DESCENT_II) #elif defined(DXX_BUILD_DESCENT_II)
#define DXX_PLAYER_HEADER_ADD_EXTRA_PLAYERS 4 #define DXX_PLAYER_HEADER_ADD_EXTRA_PLAYERS 4
#endif #endif
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
extern array<player, MAX_PLAYERS + DXX_PLAYER_HEADER_ADD_EXTRA_PLAYERS> Players; // Misc player info extern array<player, MAX_PLAYERS + DXX_PLAYER_HEADER_ADD_EXTRA_PLAYERS> Players; // Misc player info
void player_rw_swap(player_rw *p, int swap); void player_rw_swap(player_rw *p, int swap);
#endif
extern array<object *, MAX_PLAYERS> Guided_missile; extern array<object *, MAX_PLAYERS> Guided_missile;
extern array<object_signature_t, MAX_PLAYERS> Guided_missile_sig; extern array<object_signature_t, MAX_PLAYERS> Guided_missile_sig;