//PROTOTYPES:

//actor.cpp
//type, team, hp, max_hp, R, U, D
ACTOR * create_actor(int type, int team, int hp, int max_hp, int r1, int r2, int r3, int u1, int u2, int u3, int d1, int d2, int d3);
void destroy_actor(ACTOR * a);
void draw_actor(int cx, int cy, ACTOR * a);
void walk_actor(ACTOR * a, int DIR);
void animate_actor(ACTOR * a);
int new_actor(int type, int team, int hp, int max_hp, int r1, int r2, int r3, int u1, int u2, int u3, int d1, int d2, int d3);
ACTOR * copy_actor(ACTOR * a);
int create_skeleton(int x, int y, int hp, int smart);
int create_goblin(int x, int y, int hp, int smart);
void npcs_think();
void npc_think(ACTOR * n);
void move_npc(ACTOR * n, int dir);
void hurt_actor(ACTOR * a, int vx, int vy);

//ctrl.cpp
int control(int btn);
char * what_char(int kp);
int find_key(char * name);

//gfx.cpp
int install_gfx();
void page_flip();
int load_tileset();
int file_exists(char * filename);
BITMAP * load_bitmap2(char * filename);
void calc_colors(void);
void show_loading(int step, int max_steps);
void fix_tileset_and_palette();
int cut_tileset();
PMASK * create_box_pmask(BITMAP * bmp);

//main.cpp
int startup();
void shutdown();
void setup_timers();
void logic();
void move_player();
void draw();
void touch();
void load_config();
int start_engine();
void build_player();
void build_town();
void populate_dungeon_entrances();
void draw_map(int cx, int cy);
void set_map(int x, int y, int c);
int get_map(int x, int y);
int object_collision_with_wall(OBJECT * o);
int collision(ACTOR * a);
int actor_object_collision(ACTOR * a, OBJECT * o);
void save_map(int lvl);
void load_map(int lvl);
void generate_dungeon_level(int lvl);
void particle_logic();
void draw_particles(int cx, int cy);
int find_particle();
void explode(int x, int y, int size, int length, int c1, int c2, int c3, int c4);
void draw_hud(void);
void give_exp(int exp);
void main_menu();
void save_world();
void load_world();
void get_saves();
void put_saves();
void spawn();

//menu.cpp
MYMENU * create_menu(int id, char * title, int x, int y, int w, int h);
void destroy_menu(MYMENU * m);
void draw_menu(MYMENU * m);
void POP_MENU();
void PUSH_MENU();
void menu_logic();

//object.cpp
OBJECT * create_object();
void destroy_object(OBJECT * o);
int new_object();
void create_staircase(int id, int x, int y, int lvl, int dir);
void create_house(int id, int x, int y, char * text);
void create_chain(int x, int y, int length, int speed, int delay);
void draw_object(int cx, int cy, OBJECT * o);
void do_objects();
void object_logic(OBJECT * o);
OBJECT * copy_obj(OBJECT * o);
void shoot_bone(int team, int x, int y, int dir);
void shoot_boomberang(int team, int x, int y, int dir);
void shoot_sword(int team, int x, int y, int dir);
