-/* $NetBSD: robots.h,v 1.20 2009/07/20 06:00:56 dholland Exp $ */
+/* $NetBSD: robots.h,v 1.22 2009/08/12 08:30:55 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
* @(#)robots.h 8.1 (Berkeley) 5/31/93
*/
-#include <sys/ttydefaults.h>
-#include <sys/endian.h>
-#include <ctype.h>
-#include <curses.h>
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <pwd.h>
+#include <sys/cdefs.h>
+
#include <setjmp.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
+#include <stdbool.h>
+#include <stdint.h>
/*
* miscellaneous constants
} COORD;
typedef struct {
- u_int32_t s_uid;
- u_int32_t s_score;
- u_int32_t s_auto;
- u_int32_t s_level;
+ uint32_t s_uid;
+ uint32_t s_score;
+ uint32_t s_auto;
+ uint32_t s_level;
char s_name[MAXNAME];
} SCORE;
-typedef struct passwd PASSWD;
-
/*
* global variables
*/
extern int Count, Level, Num_robots, Num_scrap, Num_scores,
Start_level, Wait_bonus, Num_games;
-extern u_int32_t Score;
+extern uint32_t Score;
extern COORD Max, Min, My_pos, Robots[], Scrap[];
*/
void add_score(int);
-bool another(void);
char automove(void);
-int cmp_sc(const void *, const void *);
-bool do_move(int, int);
-bool eaten(const COORD *);
void flush_in(void);
void get_move(void);
void init_field(void);
bool jumping(void);
void make_level(void);
void move_robots(int);
-bool must_telep(void);
void play_level(void);
int query(const char *);
void quit(int) __dead;
void reset_count(void);
-int rnd(int);
COORD *rnd_pos(void);
void score(int);
-void set_name(SCORE *);
void show_score(void);
int sign(int);
void telmsg(int);