NXEngine v1.0.0.6
[NXEngine.git] / ai / stdai.h
blobc3007b4bcd9d858182c6691bdb2f41a95c0a1122
2 #ifndef _STDAI_H
3 #define _STDAI_H
5 #include "../nx.h"
7 extern InitList AIRoutines;
9 #define ONTICK(OBJTYPE, FUNCTION) objprop[OBJTYPE].ai_routines.ontick = FUNCTION;
10 #define ONDEATH(OBJTYPE, FUNCTION) objprop[OBJTYPE].ai_routines.ondeath = FUNCTION;
11 #define AFTERMOVE(OBJTYPE, FUNCTION) objprop[OBJTYPE].ai_routines.aftermove = FUNCTION;
12 #define ONSPAWN(OBJTYPE, FUNCTION) objprop[OBJTYPE].ai_routines.onspawn = FUNCTION;
14 #define GENERIC_NPC(O) \
15 { \
16 ONSPAWN(O, onspawn_generic_npc); \
17 ONTICK(O, ai_generic_npc); \
20 #define GENERIC_NPC_NOFACEPLAYER(O) \
21 { \
22 ONSPAWN(O, onspawn_generic_npc); \
23 ONTICK(O, ai_generic_npc_nofaceplayer); \
26 void aftermove_StickToLinkedActionPoint(Object *o);
27 void onspawn_set_frame_from_id2(Object *o);
28 void onspawn_snap_to_ground(Object *o);
29 void ai_generic_angled_shot(Object *o);
31 void ai_generic_npc(Object *o);
32 void ai_generic_npc_nofaceplayer(Object *o);
33 void onspawn_generic_npc(Object *o);
35 void ai_animate1(Object *o);
36 void ai_animate2(Object *o);
37 void ai_animate3(Object *o);
38 void ai_animate4(Object *o);
39 void ai_animate5(Object *o);
41 void KillObjectsOfType(int type);
42 void DeleteObjectsOfType(int type);
44 #endif