1 #ifndef _TSHIP_H 2 #define _TSHIP_H 3 4 #define STATE_TRANSPORT 0 5 #define STATE_RUN 1 6 #define STATE_END 2 7 #define STATE_PAUSED 3 8 #define STATE_CONSOLE 4 9 #define STATE_GET_READY 5 10 #define STATE_COMPLETE 6 11 12 #include "tfloor.h" 13 #include "tparadroid.h" 14 #include "tdroid_1xx.h" 15 #include "tdroid_2xx.h" 16 #include "tdroid_3xx.h" 17 #include "tdroid_4xx.h" 18 #include "tdroid_5xx.h" 19 #include "tdroid_6xx.h" 20 #include "tdroid_7xx.h" 21 #include "tdroid_8xx.h" 22 #include "tdroid_9xx.h" 23 24 typedef struct _tfloor_list 25 { 26 tfloor *curr; 27 struct _tfloor_list *next; 28 } tfloor_list; 29 30 typedef struct _ttransport_list 31 { 32 tfloor *floor; 33 int diagram_px; 34 int diagram_py; 35 int floor_pos_x; 36 int floor_pos_y; 37 int no; 38 struct _ttransport_list *next; 39 } ttransport_list; 40 41 class tship 42 { 43 public: 44 int ship_complete_f, 45 state, 46 console_ptr; 47 char name[STR_LABEL_LEN + 1], 48 type[STR_LABEL_LEN + 1]; 49 tfloor_list *floor_list; 50 ttransport_list *transport_list, *curr_location; 51 bm_t map_bm; 52 tdroid *droids[MAX_DROIDS]; 53 double get_ready_count; 54 float ship_end_cd; 55 56 tship(void); 57 void create_floor(tfloor_list **ptr, char *fname); 58 tfloor *find_floor(char *name); 59 ttransport_list *create_transport( 60 ttransport_list **ptr, char *fn, int px, int py, int fx, int fy, int tn); 61 ttransport_list *find_transport(char *name, int x, int y); 62 void free_all_transport(ttransport_list **ptr); 63 void free_all_floor(tfloor_list **ptr); 64 // void set_ship_noise(void); 65 void load(char *shipname); 66 void unload(void); 67 void get_ready_draw(void); 68 void diagram_draw(void); 69 void transport_set(void); 70 void transport_change(ttransport_list *selection); 71 void transport_change_up(void); 72 void transport_change_dn(void); 73 void console_draw(void); 74 void level_check_event(void); 75 void level_bg_calc(void); 76 void print_score(void); 77 void print_info(void); 78 void play_draw(void); 79 void level_run(void); 80 }; 81 82 #endif 83