naev 0.12.6
pilot_flags.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#define pilot_clearFlagsRaw( a ) \
7 memset( ( a ), 0, PILOT_FLAGS_MAX )
8#define pilot_copyFlagsRaw( d, s ) \
9 memcpy( ( d ), ( s ), \
10 PILOT_FLAGS_MAX )
11#define pilot_isFlagRaw( a, f ) \
12 ( ( a )[f] )
13#define pilot_setFlagRaw( a, f ) ( ( a )[f] = 1 )
14#define pilot_isFlag( p, f ) \
15 ( ( p )->flags[f] )
16#define pilot_setFlag( p, f ) \
17 ( ( p )->flags[f] = 1 )
18#define pilot_rmFlag( p, f ) \
19 ( ( p )->flags[f] = 0 )
20enum {
21 /*
22 * Creation-time flags
23 */
24 PILOT_PLAYER,
25 PILOT_PLAYER_FLEET,
26 PILOT_CARRIED,
27 PILOT_CREATED_AI,
28 PILOT_NO_OUTFITS,
29 PILOT_NO_EQUIP,
30 /*
31 * Dynamic flags
32 */
33 /* Escort stuff. */
34 PILOT_NOFREE,
35 PILOT_PERSIST,
36 PILOT_NOCLEAR,
37 PILOT_CARRIER_DIED,
38 /* Hyperspace. */
39 PILOT_HYP_PREP,
40 PILOT_HYP_BRAKE,
41 PILOT_HYP_BEGIN,
42 PILOT_HYPERSPACE,
43 PILOT_HYP_END,
44 PILOT_HAILING,
45 /* Boarding. */
46 PILOT_BOARDABLE,
47 PILOT_BOARDED,
48 PILOT_NOBOARD,
49 PILOT_BOARDING,
50 /* Disabling. */
51 PILOT_NODISABLE,
52 PILOT_DISABLED,
53 PILOT_DISABLED_PERM,
54 /* Death. */
55 PILOT_NODEATH,
56 PILOT_DEAD,
57 PILOT_DEATH_SOUND,
58 PILOT_EXPLODED,
59 PILOT_DELETE,
60 /* Invincibility. */
61 PILOT_INVINCIBLE,
62 PILOT_INVINC_PLAYER,
63 /* Player-related stuff. */
64 PILOT_HOSTILE,
65 PILOT_FRIENDLY,
66 PILOT_SCANNING,
67 PILOT_COMBAT,
68 PILOT_BRIBED,
69 PILOT_DISTRESSED,
70 PILOT_NONTARGETABLE,
72 PILOT_PLAYER_SCANNED,
73 /* Landing stuff. */
74 PILOT_LANDING,
75 PILOT_TAKEOFF,
76 /* Visibility stuff. */
77 PILOT_STEALTH,
78 PILOT_NORENDER,
79 PILOT_VISPLAYER,
80 PILOT_VISIBLE,
81 PILOT_INVISIBLE,
83 PILOT_HIDE,
84 PILOT_HILIGHT,
86 /* Outfit stuff. */
87 PILOT_AFTERBURNER,
88 /* Refueling. */
89 PILOT_REFUELING,
90 PILOT_REFUELBOARDING,
91 /* Cooldown. */
92 PILOT_COOLDOWN,
93 PILOT_COOLDOWN_BRAKE,
94 /* Manual control and limits. */
95 PILOT_MANUAL_CONTROL,
97 PILOT_NOJUMP,
98 PILOT_NOLAND,
99 PILOT_HASSPEEDLIMIT,
100 PILOT_BRAKING,
101 /* Sentinal. */
102 PILOT_FLAGS_MAX
103};
104typedef char PilotFlags[PILOT_FLAGS_MAX];