-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathRM2.CG
189 lines (164 loc) · 5.11 KB
/
RM2.CG
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
[logics for room 2 -- lgcQuestions1
[ "Leisure-Suit Larry in the Land of the Lounge Lizards"
[ by Al Lowe
%include "rm2.msg"
%include "gamedefs.h"
%define FIRST_QUESTION 1
%define LAST_QUESTION 53
%define toldLastQuestion lf1
%define allsWell lv0
%define question1 lv1
%define question2 lv2
%define question3 lv3
%define question4 lv4
%define question5 lv5
if (initLog)
{
if (forceAtest)
{
Print( 60);
currentQuestion = FIRST_QUESTION;
}
} [ end initLOG
if (!forceAtest)
{
:askAgain;
Random( FIRST_QUESTION, LAST_QUESTION, currentQuestion);
if ((currentQuestion == question1 ||
currentQuestion == question2 ||
currentQuestion == question3 ||
currentQuestion == question4 ||
currentQuestion == question5))
{
goto askAgain;
}
else
{
if (question == 1) {question1 = currentQuestion};
if (question == 2) {question2 = currentQuestion};
if (question == 3) {question3 = currentQuestion};
if (question == 4) {question4 = currentQuestion};
if (question == 5) {question5 = currentQuestion};
if (question == 6) {questionStatus = allDone;}
if (question == 5 &&
!toldLastQuestion)
{
Set( toldLastQuestion);
Print( 69);
}
++question;
}
}
if (currentQuestion == 1) {correctAnswer = 3;}
if (currentQuestion == 2) {correctAnswer = 4;}
if (currentQuestion == 3) {correctAnswer = 1;}
if (currentQuestion == 4) {correctAnswer = 3;}
if (currentQuestion == 5) {correctAnswer = 0;}
if (currentQuestion == 6) {correctAnswer = 2;}
if (currentQuestion == 7) {correctAnswer = 4;}
if (currentQuestion == 8) {correctAnswer = 4;}
if (currentQuestion == 9) {correctAnswer = 1;}
if (currentQuestion == 10) {correctAnswer = 2;}
if (currentQuestion == 11) {correctAnswer = 2;}
if (currentQuestion == 12) {correctAnswer = 3;}
if (currentQuestion == 13) {correctAnswer = 3;}
if (currentQuestion == 14) {correctAnswer = 1;}
if (currentQuestion == 15) {correctAnswer = 3;}
if (currentQuestion == 16) {correctAnswer = 2;}
if (currentQuestion == 17) {correctAnswer = 3;}
if (currentQuestion == 18) {correctAnswer = 3;}
if (currentQuestion == 19) {correctAnswer = 2;}
if (currentQuestion == 20) {correctAnswer = 4;}
if (currentQuestion == 21) {correctAnswer = 3;}
if (currentQuestion == 22) {correctAnswer = 4;}
if (currentQuestion == 23) {correctAnswer = 3;}
if (currentQuestion == 24) {correctAnswer = 0;}
if (currentQuestion == 25) {correctAnswer = 4;}
if (currentQuestion == 26) {correctAnswer = 2;}
if (currentQuestion == 27) {correctAnswer = 4;}
if (currentQuestion == 28) {correctAnswer = 4;}
if (currentQuestion == 29) {correctAnswer = 0;}
if (currentQuestion == 30) {correctAnswer = 3;}
if (currentQuestion == 31) {correctAnswer = 4;}
if (currentQuestion == 32) {correctAnswer = 3;}
if (currentQuestion == 33) {correctAnswer = 2;}
if (currentQuestion == 34) {correctAnswer = 1;}
if (currentQuestion == 35) {correctAnswer = 2;}
if (currentQuestion == 36) {correctAnswer = 3;}
if (currentQuestion == 37) {correctAnswer = 3;}
if (currentQuestion == 38) {correctAnswer = 1;}
if (currentQuestion == 39) {correctAnswer = 3;}
if (currentQuestion == 40) {correctAnswer = 3;}
if (currentQuestion == 41) {correctAnswer = 3;}
if (currentQuestion == 42) {correctAnswer = 2;}
if (currentQuestion == 43) {correctAnswer = 1;}
if (currentQuestion == 44) {correctAnswer = 1;}
if (currentQuestion == 45) {correctAnswer = 2;}
if (currentQuestion == 46) {correctAnswer = 1;}
if (currentQuestion == 47) {correctAnswer = 2;}
if (currentQuestion == 48) {correctAnswer = 4;}
if (currentQuestion == 49) {correctAnswer = 1;}
if (currentQuestion == 50) {correctAnswer = 4;}
if (currentQuestion == 51) {correctAnswer = 3;}
if (currentQuestion == 52) {correctAnswer = 4;}
if (currentQuestion == 53) {correctAnswer = 2;}
if (questionStatus != allDone)
{
if (forceAtest)
{
ClearLines( 23, 23, 0);
Display( 23, 0, 66);
PrintV( currentQuestion);
++currentQuestion;
if (!currentQuestion > LAST_QUESTION)
{
questionStatus = waitAwhile;
scriptTimer = 2;
}
else
{
questionStatus = allDone;
}
}
else
{
AcceptInput();
CancelLine();
PreventInput();
ClearLines( 22, 24, BG_COLOR);
Set( leaveWindow);
PrintV( currentQuestion);
lastChar = 0;
Display( 23, 0, 67);
SetScanStart();
if (!lastChar)
{
Return();
}
if (lastChar > 64 && [ ABCD
lastChar < 69)
{
lastChar += 32; [ Convert to abcd (lower case).
}
if ((lastChar < 97 || [ not abcd.
lastChar > 100))
{
Sound( sError, done);
Return();
}
ResetScanStart(); [ We've got a valid letter.
answer = lastChar; [ abcd.
lastChar = 0;
answer -= 96; [ Now answer between a and d.
message = 60; [ 1 less than first message #
message += answer;
y = 23;
x = 29;
DisplayV( y, x, message);
questionStatus = waitAwhile;
scriptTimer = 3;
}
}
[*****
:exit [ test for leaving the room
[*****