From 7f6002caba3f0a6749820c2772161caf55b8d267 Mon Sep 17 00:00:00 2001 From: neonloop Date: Fri, 7 May 2021 20:00:12 +0000 Subject: Initial commit (uqm-0.8.0) --- src/uqm/supermelee/meleeship.h | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/uqm/supermelee/meleeship.h (limited to 'src/uqm/supermelee/meleeship.h') diff --git a/src/uqm/supermelee/meleeship.h b/src/uqm/supermelee/meleeship.h new file mode 100644 index 0000000..e917b75 --- /dev/null +++ b/src/uqm/supermelee/meleeship.h @@ -0,0 +1,55 @@ +#ifndef MELEESHIP_H +#define MELEESHIP_H + +#include "types.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +typedef enum MeleeShip { + MELEE_ANDROSYNTH, + MELEE_ARILOU, + MELEE_CHENJESU, + MELEE_CHMMR, + MELEE_DRUUGE, + MELEE_EARTHLING, + MELEE_ILWRATH, + MELEE_KOHR_AH, + MELEE_MELNORME, + MELEE_MMRNMHRM, + MELEE_MYCON, + MELEE_ORZ, + MELEE_PKUNK, + MELEE_SHOFIXTI, + MELEE_SLYLANDRO, + MELEE_SPATHI, + MELEE_SUPOX, + MELEE_SYREEN, + MELEE_THRADDASH, + MELEE_UMGAH, + MELEE_URQUAN, + MELEE_UTWIG, + MELEE_VUX, + MELEE_YEHAT, + MELEE_ZOQFOTPIK, + + MELEE_UNSET = ((BYTE) ~0) - 1, + // Used with the Update protocol, to register in the sentTeam + MELEE_NONE = (BYTE) ~0 + // Empty fleet position. +} MeleeShip; +#define NUM_MELEE_SHIPS (MELEE_ZOQFOTPIK + 1) + +static inline bool +MeleeShip_valid (MeleeShip ship) +{ + return (ship < NUM_MELEE_SHIPS) || (ship == MELEE_NONE); +} + +#if defined(__cplusplus) +} +#endif + +#endif /* MELEESHIP_H */ + -- cgit v1.2.3