41 lines
924 B
C
41 lines
924 B
C
// Copyright © 2017 Project Golan, all rights reserved.
|
|
#ifndef g_player_h
|
|
#define g_player_h
|
|
|
|
#include "g_object.h"
|
|
|
|
#define G_Player_max 2
|
|
#define G_Player_propMem(t, name) G_Entity_propMem(G_Player_##name, t, name)
|
|
|
|
// Types ---------------------------------------------------------------------|
|
|
|
|
enum
|
|
{
|
|
G_Player_ammo,
|
|
G_Player_lives,
|
|
G_Player_nextfire,
|
|
G_Player_propC
|
|
};
|
|
|
|
#define G_Player_props() G_Entity_props() \
|
|
G_Player_propMem(unsigned, ammo) \
|
|
G_Player_propMem(unsigned, lives) \
|
|
G_Player_propMem(unsigned, nextfire)
|
|
typedef struct G_playr // Player
|
|
{
|
|
int id;
|
|
|
|
G_Player_props()
|
|
} G_playr;
|
|
|
|
// Extern Objects ------------------------------------------------------------|
|
|
|
|
extern int G_Player_Count;
|
|
extern G_playr G_Player_InGame[G_Player_max];
|
|
|
|
// Extern Functions ----------------------------------------------------------|
|
|
|
|
DGE_Callback void G_Player_Think(unsigned id);
|
|
|
|
#endif
|