X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/55c4a511be47d16c259623bf0f76ddd0df0a42ac..5395af2c00ffe8b4a251932ea65bec2b4b185d8c:/robots/robots.h diff --git a/robots/robots.h b/robots/robots.h index 63bf7cd6..edd37a92 100644 --- a/robots/robots.h +++ b/robots/robots.h @@ -1,4 +1,4 @@ -/* $NetBSD: robots.h,v 1.4 1995/04/22 10:09:11 cgd Exp $ */ +/* $NetBSD: robots.h,v 1.15 2002/01/31 17:35:52 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -35,8 +35,19 @@ * @(#)robots.h 8.1 (Berkeley) 5/31/93 */ +# include +# include # include +# include +# include +# include +# include # include +# include +# include +# include +# include +# include /* * miscellaneous constants @@ -49,6 +60,7 @@ # define MAXLEVELS 4 # define MAXROBOTS (MAXLEVELS * 10) # define ROB_SCORE 10 +# undef S_BONUS # define S_BONUS (60 * ROB_SCORE) # define Y_SCORE 21 # define X_SCORE (X_FIELDSIZE + 9) @@ -74,24 +86,36 @@ typedef struct { int y, x; } COORD; +typedef struct { + u_int32_t s_uid; + u_int32_t s_score; + u_int32_t s_auto; + u_int32_t s_level; + char s_name[MAXNAME]; +} SCORE; + +typedef struct passwd PASSWD; + /* * global variables */ extern bool Dead, Full_clear, Jump, Newscore, Real_time, Running, - Teleport, Waiting, Was_bonus; + Teleport, Waiting, Was_bonus, Auto_bot; #ifdef FANCY extern bool Pattern_roll, Stand_still; #endif -extern char Cnt_move, Field[Y_FIELDSIZE][X_FIELDSIZE], *Next_move, - *Move_list, Run_ch; +extern char Cnt_move, Field[Y_FIELDSIZE][X_FIELDSIZE], Run_ch; +extern const char *Next_move, *Move_list; -extern int Count, Level, Num_robots, Num_scores, Score, - Start_level, Wait_bonus; +extern int Count, Level, Num_robots, Num_scrap, Num_scores, + Start_level, Wait_bonus, Num_games; -extern COORD Max, Min, My_pos, Robots[]; +extern u_int32_t Score; + +extern COORD Max, Min, My_pos, Robots[], Scrap[]; extern jmp_buf End_move; @@ -99,11 +123,27 @@ extern jmp_buf End_move; * functions types */ -int cmp_sc(); -void move_robots(); - -COORD *rnd_pos(); - - - - +void add_score __P((int)); +bool another __P((void)); +char automove __P((void)); +int cmp_sc __P((const void *, const void *)); +bool do_move __P((int, int)); +bool eaten __P((const COORD *)); +void flush_in __P((void)); +void get_move __P((void)); +void init_field __P((void)); +bool jumping __P((void)); +void make_level __P((void)); +void move_robots __P((int)); +bool must_telep __P((void)); +void play_level __P((void)); +int query __P((const char *)); +void quit __P((int)) __attribute__((__noreturn__)); +void reset_count __P((void)); +int rnd __P((int)); +COORD *rnd_pos __P((void)); +void score __P((int)); +void set_name __P((SCORE *)); +void show_score __P((void)); +int sign __P((int)); +void telmsg __P((int));