]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - sail/pl_5.c
- for readability when the exponent < 10 don't prefix it with 0x (from kre)
[bsdgames-darwin.git] / sail / pl_5.c
index 09dd902fafb4ef8470e51e1f94d2b23e937dd95c..240ac0b9d90df16b786287762048e7a8749104c3 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: pl_5.c,v 1.23 2009/03/14 22:52:52 dholland Exp $       */
+/*     $NetBSD: pl_5.c,v 1.26 2019/02/03 03:19:25 mrg Exp $    */
 
 /*
  * Copyright (c) 1983, 1993
 #if 0
 static char sccsid[] = "@(#)pl_5.c     8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: pl_5.c,v 1.23 2009/03/14 22:52:52 dholland Exp $");
+__RCSID("$NetBSD: pl_5.c,v 1.26 2019/02/03 03:19:25 mrg Exp $");
 #endif
 #endif /* not lint */
 
 #include <ctype.h>
-#include <curses.h>
 #include <signal.h>
 #include <stdio.h>
 #include <string.h>
@@ -79,6 +78,7 @@ acceptmove(void)
                switch (*p) {
                case 'l':
                        dir -= 2;
+                       /* FALLTHROUGH */
                case 'r':
                        if (++dir == 0)
                                dir = 8;
@@ -202,9 +202,6 @@ acceptboard(void)
                        (struct ship *)0, 1);
                parties(ms, crew, 1, c);
        }
-       blockalarm();
-       draw_slot();
-       unblockalarm();
 }
 
 static void
@@ -237,27 +234,16 @@ parties(struct ship *to, int *crew, int isdefense, int buf)
                                send_obp(ms, j, turn, to->file->index, men);
                        }
                        if (isdefense) {
-                               wmove(slot_w, 2, 0);
                                for (k=0; k < NBP; k++)
-                                       if (temp[k] && !crew[k])
-                                               waddch(slot_w, k + '1');
-                                       else
-                                               wmove(slot_w, 2, 1 + k);
-                               mvwaddstr(slot_w, 3, 0, "DBP");
+                                       display_set_dbp(k,
+                                                        temp[k] && !crew[k]);
                                makemsg(ms, "repelling boarders");
                        } else {
-                               wmove(slot_w, 0, 0);
                                for (k=0; k < NBP; k++)
-                                       if (temp[k] && !crew[k])
-                                               waddch(slot_w, k + '1');
-                                       else
-                                               wmove(slot_w, 0, 1 + k);
-                               mvwaddstr(slot_w, 1, 0, "OBP");
+                                       display_set_obp(k,
+                                                        temp[k] && !crew[k]);
                                makesignal(ms, "boarding the $$", to);
                        }
-                       blockalarm();
-                       wrefresh(slot_w);
-                       unblockalarm();
                } else
                        Msg("Sending no crew sections.");
        }