#pragma once
void gamesound_play(WORD s, byte x, byte y);
void inval_game_view();
void show_message(byte time, char* text);
void clear_chat();
byte get_player_team(int p);
void set_player_team(int p, byte t);
byte get_player_controler(int p);
int get_val(int adress, int player);
int t_val(int c, int p);
bool cmp_args(byte m, byte v, byte c);
bool cmp_args2(byte m, WORD v, WORD c);
bool cmp_args4(byte m, int v, int c);
void lose(bool t);
void win(bool t);
void lose2(bool t, byte vid);
void win2(bool t, byte vid);
bool check_ally(byte p1, byte p2);
bool check_av(byte p1, byte p2);
void tile_remove_trees(int x, int y);
void tile_remove_rocks(int x, int y);
void tile_remove_walls(int x, int y);
byte get_all_kills(byte id, byte pla, byte plt);
void bullet_create(WORD x, WORD y, byte id);
void bullet_disp_fires();
void bullet_create_unit(int* u, byte b);
void bullet_create8_around_unit(int* u, byte b);
bool check_unit_dead(int* p);
bool check_unit_complete(int* p);
bool check_unit_hidden(int* p);
bool check_unit_preplaced(int* p);
bool check_unit_near_death(int* p);
bool check_peon_loaded(int* p, byte r);
void unit_kill(int* u);
void unit_hide(int* u);
void unit_remove(int* u);
void unit_cast(int* u);
bool stat_byte(byte s);
bool cmp_stat(int* p, int v, byte pr, byte cmp);
void set_stat(int* p, int v, byte pr);
int get_stat(int* p, byte pr);
void unit_convert(byte player, int who, int tounit, int a);
void unit_create(int x, int y, int id, byte owner, byte n);
int* unit_create_place(int x, int y, int id, byte owner);
void set_region(int x1, int y1, int x2, int y2);
WORD region_center();
bool in_region(byte x, byte y, byte x1, byte y1, byte x2, byte y2);
bool unit_move(byte x, byte y, int* unit, bool inval);
void give_order(int* u, byte x, byte y, byte o);
void give_order_spell_target(int* u, int* t, byte o);
bool slot_alive(byte p);
void ally(byte p1, byte p2, byte a);
void ally_one_sided(byte p1, byte p2, byte a);
bool check_opponents(byte player);
void viz(int p1, int p2, byte a);
void viz_one_sided(int p1, int p2, byte a);
void viz_obs(int p1, int p2);
void set_mission(char b);
void comps_vision(bool v);
void change_res(byte p, byte r, byte k, int m);
void add_total_res(byte p, byte r, byte k, int m);
void set_res(byte p, byte r, byte k1, byte k2, byte k3, byte k4);
bool cmp_res(byte p, byte r, byte k1, byte k2, byte k3, byte k4, byte cmp);