-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathRM6.CG
167 lines (136 loc) · 2.75 KB
/
RM6.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
[logics for room 6 -- rmAgeTest
[ "Leisure Suit Larry in the Land of the Lounge Lizards"
[ by Al Lowe
%include "rm6.msg"
%include "gamedefs.h"
%define FIRST_QUESTION 1
%define LAST_QUESTION 43
%define missedOne lf0
%define age lv9 [ used in message 5
%define lgcQuestion lv20
if (!forceAtest &&
(passedTest || questionStatus == allDone))
{
Set( passedTest);
AcceptInput();
CancelLine();
PreventInput();
ClearLines( 22, 24, BG_COLOR);
Reset( handsOff);
Reset( programControl);
AcceptInput();
Print( 10);
NewRoom( rmRestart);
}
if (initLog)
{
animationInterval = FASTEST_SPEED;
Set( handsOff);
PreventInput();
Reset( enableMenu);
StopMotion( ego);
Set( programControl);
LoadSound( sError);
picture = rmTitle;
LoadPic( picture);
DrawPic( picture);
DiscardPic( picture);
LoadView( vTitles);
AddToPic( vTitles, 0, 0, 4, 18, 4, 4);
AddToPic( vTitles, 0, 1, 4, 36, 4, 4);
AddToPic( vTitles, 0, 2, 46, 36, 4, 4);
AddToPic( vTitles, 0, 3, 11, 87, 4, 4);
[view, loop, cel, x, y, obj priority, box priority
DiscardView( vTitles);
Random( 2, 4, lgcQuestion);
LoadLogicsV( lgcQuestion);
ClearLines( 22, 24, BG_COLOR);
ShowPic( );
questionStatus = askAnother;
[ Set( forceAtest);
if (!forceAtest)
{
Print( 1);
GetNum( 2, age);
PreventInput();
AcceptInput();
if (age < 18)
{
Print( 4); [ He's so dumb, he admits he's a kid.
Quit( 1);
}
if (age > 99)
{
Print( 12); [ You can't be THAT old!
Quit( 1);
}
if (age > 65)
{
Print( 11); [ You're an old fart!
}
Print( 3); [ He says he's an adult.
question = 1;
}
}
if (questionStatus == askAnother)
{
CallV( lgcQuestion);
}
if (questionStatus == waiting) [ now have answer in answer
{
CloseWindow( );
if ((answer == correctAnswer ||
!correctAnswer))
{
Set( leaveWindow);
Print( 8); [ "Right
questionStatus = waitAwhileAlthoughCorrect;
scriptCycles = 8;
if (machineType == MAC)
{
scriptCycles = 3;
}
}
else
{
if (!missedOne)
{
questionStatus = askAnother;
Print( 5); [ "You blew it.
Set( missedOne);
--question;
}
else
{
Print( 6); [ "Ah Ha!!!
Quit( 1);
}
}
}
if (scriptDone)
{
Reset( scriptDone);
if ((forceAtest ||
questionStatus == waitAwhileAlthoughCorrect))
{
questionStatus = askAnother;
}
else
{
ClearLines( 23, 23, BG_COLOR);
questionStatus = waiting;
}
}
if (aSecondPassed && secondsInRoom == 5)
{
animationInterval = NORMAL_SPEED;
if ((passInRoom < 250 ||
machineType == MAC))
{
Set( slowProcessor);
}
if (forceAtest)
{
Print( 18);
}
}