annotate enter.c @ 3:5a977ccbc7a9 default tip

Empty changelog
author darius
date Sat, 06 Dec 1997 05:41:29 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1 /* $Id: enter.c,v 1.1.1.1 1997/12/06 05:41:29 darius Exp $ */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
2
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
3 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
4 * enter.c
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
5 *
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
6 * This version modified to work as the client in a socket based protocol.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
7 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
8 #include "copyright.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
9
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
10 #include <stdio.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
11 #include <sys/types.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
12 #include <errno.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
13 #include <pwd.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
14 #include <string.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
15 #include <ctype.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
16 #include "Wlib.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
17 #include "defs.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
18 #include "struct.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
19 #include "data.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
20 #include "proto.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
21 #include "packets.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
22
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
23 /* Enter the game */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
24
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
25 /* Prototypes */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
26
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
27 void
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
28 enter()
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
29 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
30 redrawTstats();
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
31 delay = 0;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
32 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
33
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
34 /* Doesn't really openmem, but it will
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
35 * set some stuff up...
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
36 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
37 static struct status dummy1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
38 static struct status2 dummy2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
39 void
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
40 openmem()
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
41 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
42 /* players, weapons, planets are handled in build_default_configuration */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
43
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
44 /* thingies allocation is handled in build_default_configuration */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
45 /* thingies = universe.drones; */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
46
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
47
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
48 status = &dummy1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
49 status2 = &dummy2;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
50
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
51 /* mctl->mc_current=0; */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
52 status->time = 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
53 status->timeprod = 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
54 status->kills = 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
55 status->losses = 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
56 status->time = 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
57 status->planets = 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
58 status->armsbomb = 1;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
59
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
60 if (ghoststart) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
61 me = &players[ghost_pno];
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
62 myship = me->p_ship;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
63 mystats = &(me->p_stats);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
64 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
65 }