Optimize references to player ship

This commit is contained in:
Kp 2013-11-17 00:50:32 +00:00
parent 9db2badadb
commit 2d01f3a649
4 changed files with 5 additions and 2 deletions

View file

@ -74,7 +74,10 @@ typedef struct {
extern int Num_object_types;
struct player_ship;
//right now there's only one player ship, but we can have another by
//adding an array and setting the pointer to the active ship.
extern struct player_ship only_player_ship;
static struct player_ship *const Player_ship=&only_player_ship;
extern int Num_cockpits;
extern bitmap_index cockpit_bitmap[N_COCKPIT_BITMAPS];
extern short tmap_xlate_table[MAX_TEXTURES];

View file

@ -240,7 +240,6 @@ extern int Player_num; // The player number who is on the console.
extern player Players[MAX_PLAYERS + DXX_PLAYER_HEADER_ADD_EXTRA_PLAYERS]; // Misc player info
void player_rw_swap(player_rw *p, int swap);
#endif
extern player_ship *Player_ship;
extern struct object *Guided_missile[MAX_PLAYERS];
extern int Guided_missile_sig[MAX_PLAYERS];

View file

@ -83,7 +83,7 @@ int Dead_modelnums[MAX_POLYGON_MODELS];
//right now there's only one player ship, but we can have another by
//adding an array and setting the pointer to the active ship.
player_ship only_player_ship,*Player_ship=&only_player_ship;
player_ship only_player_ship;
//----------------- Miscellaneous bitmap pointers ---------------
int Num_cockpits = 0;

View file

@ -28,6 +28,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "game.h"
#include "object.h"
#include "player.h"
#include "bm.h"
#include "controls.h"
#include "render.h"
#include "args.h"