omi-eikyo/src/g_player.h

44 lines
1.0 KiB
C
Raw Normal View History

2017-09-27 19:26:32 -07:00
// Copyright © 2017 Project Golan, all rights reserved.
2017-10-04 17:14:46 -07:00
// See COPYING for more information.
2017-09-27 19:26:32 -07:00
#ifndef g_player_h
#define g_player_h
#include "g_object.h"
2017-09-29 04:50:36 -07:00
#define G_Player_max 2
2017-09-27 19:26:32 -07:00
#define G_Player_propMem(t, name) G_Entity_propMem(G_Player_##name, t, name)
// Types ---------------------------------------------------------------------|
enum
{
G_Player_ammo,
2017-09-29 04:50:36 -07:00
G_Player_lives,
2017-10-04 02:07:02 -07:00
G_Player_lvx,
2017-09-29 04:50:36 -07:00
G_Player_nextfire,
2017-09-27 19:26:32 -07:00
G_Player_propC
};
#define G_Player_props() G_Entity_props() \
2017-10-04 02:07:02 -07:00
G_Player_propMem(unsigned, ammo) \
G_Player_propMem(unsigned, lives) \
G_Player_propMem(DGE_Accum, lvx) \
G_Player_propMem(unsigned, nextfire)
2017-09-27 19:26:32 -07:00
typedef struct G_playr // Player
{
int id;
G_Player_props()
} G_playr;
// Extern Objects ------------------------------------------------------------|
2017-09-29 04:50:36 -07:00
extern int G_Player_Count;
extern G_playr G_Player_InGame[G_Player_max];
2017-09-27 19:26:32 -07:00
// Extern Functions ----------------------------------------------------------|
2017-10-04 02:07:02 -07:00
DGE_Callback void G_Player_Think(G_entty const *ty, unsigned id);
2017-09-27 19:26:32 -07:00
#endif