X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/97e04d4fb9d218f2fb01cc75da027de2f4035be8..e6d453933c7d1e7aab62f4d627dd5a1cb105a7b0:/sail/pl_6.c diff --git a/sail/pl_6.c b/sail/pl_6.c index 0f071f68..0a520066 100644 --- a/sail/pl_6.c +++ b/sail/pl_6.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl_6.c,v 1.7 2001/01/04 02:43:32 jwise Exp $ */ +/* $NetBSD: pl_6.c,v 1.14 2009/03/15 03:33:56 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -38,15 +34,15 @@ #if 0 static char sccsid[] = "@(#)pl_6.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: pl_6.c,v 1.7 2001/01/04 02:43:32 jwise Exp $"); +__RCSID("$NetBSD: pl_6.c,v 1.14 2009/03/15 03:33:56 dholland Exp $"); #endif #endif /* not lint */ +#include +#include "extern.h" #include "player.h" -void repair(void); -static int turned(void); -void loadplayer(void); +static int turned(void); void repair(void) @@ -85,7 +81,7 @@ repair(void) int max = ptr->guns/4; if (ptr->hull < max) { FIX(hull, max); - Write(W_HULL, ms, ptr->hull, 0, 0, 0); + send_hull(ms, ptr->hull); } break; } @@ -94,15 +90,13 @@ repair(void) int max = ptr->guns/5 - ptr->carL; if (ptr->gunL < max) { FIX(gunL, max); - Write(W_GUNL, ms, ptr->gunL, - ptr->carL, 0, 0); + send_gunl(ms, ptr->gunL, ptr->carL); } } else { int max = ptr->guns/5 - ptr->carR; if (ptr->gunR < max) { FIX(gunR, max); - Write(W_GUNR, ms, ptr->gunR, - ptr->carR, 0, 0); + send_gunr(ms, ptr->gunR, ptr->carR); } } break; @@ -110,19 +104,19 @@ repair(void) #define X 2 if (ptr->rig4 >= 0 && ptr->rig4 < X) { FIX(rig4, X); - Write(W_RIG4, ms, ptr->rig4, 0, 0, 0); + send_rig4(ms, ptr->rig4); } if (count && ptr->rig3 < X) { FIX(rig3, X); - Write(W_RIG3, ms, ptr->rig3, 0, 0, 0); + send_rig3(ms, ptr->rig3); } if (count && ptr->rig2 < X) { FIX(rig2, X); - Write(W_RIG2, ms, ptr->rig2, 0, 0, 0); + send_rig2(ms, ptr->rig2); } if (count && ptr->rig1 < X) { FIX(rig1, X); - Write(W_RIG1, ms, ptr->rig1, 0, 0, 0); + send_rig1(ms, ptr->rig1); } break; } @@ -131,14 +125,8 @@ repair(void) *repairs = 2; } else { *repairs = 0; - blockalarm(); - draw_stat(); - unblockalarm(); } } - blockalarm(); - draw_slot(); - unblockalarm(); repaired = 1; }