diff options
author | dholland <dholland@NetBSD.org> | 2009-03-14 22:52:52 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-03-14 22:52:52 +0000 |
commit | e98a44895c7ca5a00b080fce0b3cbb16bcdff859 (patch) | |
tree | a74a3e03e0056c3de3d2b751b6dea1f59baec1c7 /sail/dr_5.c | |
parent | 5e8d1f0902b592fc872212ecccaca23c8ce85231 (diff) | |
download | bsdgames-darwin-e98a44895c7ca5a00b080fce0b3cbb16bcdff859.tar.gz bsdgames-darwin-e98a44895c7ca5a00b080fce0b3cbb16bcdff859.tar.zst bsdgames-darwin-e98a44895c7ca5a00b080fce0b3cbb16bcdff859.zip |
Create some abstraction for sending messages.
Make a send and receive function for each possible message.
Make these have useful argument signatures.
Hide the list of message codes inside sync.c.
Diffstat (limited to 'sail/dr_5.c')
-rw-r--r-- | sail/dr_5.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sail/dr_5.c b/sail/dr_5.c index 7fab0b48..5846ccbb 100644 --- a/sail/dr_5.c +++ b/sail/dr_5.c @@ -1,4 +1,4 @@ -/* $NetBSD: dr_5.c,v 1.13 2009/03/14 19:35:13 dholland Exp $ */ +/* $NetBSD: dr_5.c,v 1.14 2009/03/14 22:52:52 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)dr_5.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: dr_5.c,v 1.13 2009/03/14 19:35:13 dholland Exp $"); +__RCSID("$NetBSD: dr_5.c,v 1.14 2009/03/14 22:52:52 dholland Exp $"); #endif #endif /* not lint */ @@ -57,11 +57,11 @@ subtract(struct ship *from, struct ship *fromcap, int totalfrom, int *crewfrom, totalfrom = 0; } } - Write(W_CREW, from, crewfrom[0], crewfrom[1], crewfrom[2], 0); + send_crew(from, crewfrom[0], crewfrom[1], crewfrom[2]); } else if (totalfrom) { pcfrom -= totalfrom; pcfrom = pcfrom < 0 ? 0 : pcfrom; - Write(W_PCREW, from, pcfrom, 0, 0, 0); + send_pcrew(from, pcfrom); } } |