00001 #include <gtc.h>
00002
00003 typedef struct
00004 {
00005 int keys[4];
00006 int speed, shoot;
00007 int runaway;
00008 } ctl;
00009
00010 typedef struct _ducky ducky;
00011 struct _ducky
00012 {
00013 gtcSceneNode *me;
00014 gtcReal vel[3];
00015 int hp,lasthp;
00016 double timeout;
00017 ctl *c;
00018 gtcSpeakerNode *s;
00019 int human;
00020 ducky *target;
00021 int refcount;
00022
00023 ducky *next;
00024 };
00025
00026 extern gtcSGScene *scene;
00027 extern ducky list;
00028 extern int aggro;
00029
00030 ducky *addduck(void);
00031 void gtcducksteer(gtcSceneNode *ship, ctl *c, double dt);
00032 void duck_keydown(KeySym k, ctl *c);
00033 void duck_keyup(KeySym k, ctl *c);
00034 void duck_init(gtcSGHost *host, int gl_is_on);
00035 void duck_loop(double dt);
00036 void duck_display(gtcReal C[4][4]);
00037 void duck_init_display(int w, int h);
00038 void decduckcount(ducky *d);
00039 void destroy_duck(ducky *d);