summaryrefslogtreecommitdiffstats
path: root/robots/play_level.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-07-20 06:39:06 +0000
committerdholland <dholland@NetBSD.org>2009-07-20 06:39:06 +0000
commitc723a928778be55849c00d5cc692bf522bb8dae3 (patch)
tree5df93c1e2785c24ec08fe81f3847cfb843ef6956 /robots/play_level.c
parent2259ef99814e890037423ad7beecb3fa28ca0f78 (diff)
downloadbsdgames-darwin-c723a928778be55849c00d5cc692bf522bb8dae3.tar.gz
bsdgames-darwin-c723a928778be55849c00d5cc692bf522bb8dae3.tar.zst
bsdgames-darwin-c723a928778be55849c00d5cc692bf522bb8dae3.zip
Assorted minor cleanups, no functional change:
- u_int* -> uint* - don't make private typedefs of system structures - use curses TRUE and FALSE only with curses booleans, otherwise true and false; - includes cleanup - group globals in extern.c by functionality Object file diffs inspected.
Diffstat (limited to 'robots/play_level.c')
-rw-r--r--robots/play_level.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/robots/play_level.c b/robots/play_level.c
index b9fa09f5..f338e9df 100644
--- a/robots/play_level.c
+++ b/robots/play_level.c
@@ -1,4 +1,4 @@
-/* $NetBSD: play_level.c,v 1.8 2009/07/20 06:00:56 dholland Exp $ */
+/* $NetBSD: play_level.c,v 1.9 2009/07/20 06:39:06 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,10 +34,12 @@
#if 0
static char sccsid[] = "@(#)play_level.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: play_level.c,v 1.8 2009/07/20 06:00:56 dholland Exp $");
+__RCSID("$NetBSD: play_level.c,v 1.9 2009/07/20 06:39:06 dholland Exp $");
#endif
#endif /* not lint */
+#include <curses.h>
+#include <unistd.h>
#include "robots.h"
/*
@@ -77,15 +79,15 @@ play_level(void)
if (Real_time)
alarm(0);
if (Field[My_pos.y][My_pos.x] != 0)
- Dead = TRUE;
+ Dead = true;
if (!Dead)
- move_robots(FALSE);
+ move_robots(false);
if (Was_bonus) {
move(Y_PROMPT, X_PROMPT);
clrtoeol();
move(Y_PROMPT + 1, X_PROMPT);
clrtoeol();
- Was_bonus = FALSE;
+ Was_bonus = false;
}
}
@@ -94,14 +96,14 @@ play_level(void)
*/
if (!Dead) {
- Was_bonus = FALSE;
+ Was_bonus = false;
if (Level == Start_level && Start_level > 1) {
move(Y_PROMPT, X_PROMPT);
printw("Advance bonus: %d", S_BONUS);
refresh();
add_score(S_BONUS);
- Was_bonus = TRUE;
+ Was_bonus = true;
}
if (Wait_bonus != 0) {
@@ -112,7 +114,7 @@ play_level(void)
printw("Wait bonus: %d", Wait_bonus);
refresh();
add_score(Wait_bonus);
- Was_bonus = TRUE;
+ Was_bonus = true;
}
}
}