-
Notifications
You must be signed in to change notification settings - Fork 13
/
game.c
94 lines (91 loc) · 3.11 KB
/
game.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* Digger Remastered
Copyright (c) Andrew Jenner 1998-2004 */
#include <stdbool.h>
#include <stdint.h>
#include "game.h"
/* Game state that is shared by multiple modules */
struct gamestate dgstate = {
.nplayers = 1, .diggers = 1, .curplayer = 0, .startlev = 1,
.levfflag = false, .randv = 0, .gtime = 0, .gauntlet = false,
.timeout = false, .unlimlives = false,
.leveldat = {{"S B HHHHS",
"V CC C V B ",
"VB CC C V ",
"V CCB CB V CCC",
"V CC C V CCC",
"HH CC C V CCC",
" V B B V ",
" HHHH V ",
"C V V C",
"CC HHHHHHH CC"},
{"SHHHHH B B HS",
" CC V V ",
" CC V CCCCC V ",
"BCCB V CCCCC V ",
"CCCC V V ",
"CCCC V B HHHH ",
" CC V CC V ",
" BB VCCCCV CC ",
"C V CC V CC ",
"CC HHHHHH "},
{"SHHHHB B BHHHHS",
"CC V C C V BB ",
"C V C C V CC ",
" BB V C C VCCCC",
"CCCCV C C VCCCC",
"CCCCHHHHHHH CC ",
" CC C V C CC ",
" CC C V C ",
"C C V C C",
"CC C H C CC"},
{"SHBCCCCBCCCCBHS",
"CV CCCCCCC VC",
"CHHH CCCCC HHHC",
"C V CCC V C",
" HHH C HHH ",
" B V B V B ",
" C VCCCV C ",
" CCC HHHHH CCC ",
"CCCCC CVC CCCCC",
"CCCCC CHC CCCCC"},
{"SHHHHHHHHHHHHHS",
"VBCCCCBVCCCCCCV",
"VCCCCCCV CCBC V",
"V CCCC VCCBCCCV",
"VCCCCCCV CCCC V",
"V CCCC VBCCCCCV",
"VCCBCCCV CCCC V",
"V CCBC VCCCCCCV",
"VCCCCCCVCCCCCCV",
"HHHHHHHHHHHHHHH"},
{"SHHHHHHHHHHHHHS",
"VCBCCV V VCCBCV",
"VCCC VBVBV CCCV",
"VCCCHH V HHCCCV",
"VCC V CVC V CCV",
"VCCHH CVC HHCCV",
"VC V CCVCC V CV",
"VCHHBCCVCCBHHCV",
"VCVCCCCVCCCCVCV",
"HHHHHHHHHHHHHHH"},
{"SHCCCCCVCCCCCHS",
" VCBCBCVCBCBCV ",
"BVCCCCCVCCCCCVB",
"CHHCCCCVCCCCHHC",
"CCV CCCVCCC VCC",
"CCHHHCCVCCHHHCC",
"CCCCV CVC VCCCC",
"CCCCHH V HHCCCC",
"CCCCCV V VCCCCC",
"CCCCCHHHHHCCCCC"},
{"HHHHHHHHHHHHHHS",
"V CCBCCCCCBCC V",
"HHHCCCCBCCCCHHH",
"VBV CCCCCCC VBV",
"VCHHHCCCCCHHHCV",
"VCCBV CCC VBCCV",
"VCCCHHHCHHHCCCV",
"VCCCC V V CCCCV",
"VCCCCCV VCCCCCV",
"HHHHHHHHHHHHHHH"}}
};