-
Notifications
You must be signed in to change notification settings - Fork 32
/
RM51.CG
179 lines (156 loc) · 3.7 KB
/
RM51.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
[logics for room 51 -- lgc.startup
[ "Leisure Suit Larry in the Land of the Lounge Lizards"
[ by Al Lowe
%include "gamedefs.h"
%include "contrlrs.h"
%message 1 "_"
%message 2 "]"
%message 3 "LLLLL"
SetCursorChar( 1); [ cursor
SetString( 0, 2); [ prompt
SetGameId( 3); [ id
TraceInfo( lgcTrace, 2, 9); [ sets: room, y TOP, lines tall
SetTextAttribute( TEXT_COLOR, BG_COLOR);
maxScore = 222; [ set up the status line first
if (monitorType != MONO)
{
ClearLines( 22, 24, BG_COLOR);
}
ConfigureScreen( 1, 23, 0);
Set( enableMenu);
DisableItem( cDummy);
Set( soundOn);
egoStepSize = 1;
egoStepTime = 1;
egoCycleTime = 1;
egoX = 77;
egoY = 166;
mouthMessage = 157; [ First bad breath message.
if ((machineType == PC ||
machineType == JR ||
machineType == TANDY ||
machineType == APPLEII))
{
Set( twoButtonJoystick);
}
else
{
Set( mouseMachine);
if (machineType == ST)
{
Set( enableDoubleClick);
}
}
dollars = 94;
cabFareMin = 5;
cabRideLength = 15;
Set( mouthOK);
sprayMinutes = SPRAY_INIT_MINUTES;
watchHours = WATCH_INIT_HOURS;
one = 1;
two = 2;
three = 3;
four = 4;
five = 5;
[testRoom = 12;
if (testRoom)
{
[ Set( debugging);
[ Reset( demo);
[ Reset( programControl);
[ AcceptInput();
[ animationInterval = FASTEST_SPEED;
[ Set( clockOn);
[ Set( enableMenu);
[ Set( passedTest);
[ StatusLineOn();
}
else
{
if (!restartInProgress)
{
Set( demo); [ Set up for a real start!
Set( programControl);
PreventInput();
animationInterval = NORMAL_SPEED;
Reset( clockOn);
Reset( enableMenu);
StatusLineOff();
}
else
{
Reset( demo); [ Don't do a real start.
StatusLineOn();
Set( passedTest);
Return(); [ Don't reassign keys.
}
}
[ Assign keys to controller functions.
SetKey( 0, 59, cHelp); [F1
SetKey( 0, 60, cSoundToggle); [F2
SetKey( 0, 61, cEchoLine); [F3
SetKey( 0, 62, cF4); [F4
SetKey( 0, 63, cSave); [F5
SetKey( 0, 64, cF6); [F6
SetKey( 0, 65, cRestore); [F7
SetKey( 0, 66, cF8); [F8
SetKey( 0, 67, cRestart); [F9
SetKey( 0, 68, cSpeed); [F10
[ Set control & alt keys.
if (machineType == TANDY)
{
SetKey( 61, 0, cCrescendo); [+
SetKey( 45, 0, cDecrescendo); [-
SetKey( 43, 0, cCrescendo); [+
}
SetKey( 9, 0, cStatus); [TAB
if (machineType == AMIGA)
{
SetKey( 27, 0, cPause); [ESC
}
else
{
SetKey( 27, 0, cMenu); [ESC
}
SetKey( 2, 0, cBoss); [^B
SetKey( 3, 0, cCancelLine); [^C
SetKey( 5, 0, cEchoLine); [^E
SetKey( 10, 0, cInitJoy); [^J
SetKey( 18, 0, cToggleMonitor); [^R
SetKey( 19, 0, cSoundToggle); [^S
SetKey( 0, 32, cDebug); [@D
SetKey( 0, 18, cShowEgo); [@E
SetKey( 0, 23, cObjInfo); [@I
SetKey( 0, 50, cShowMem); [@M
SetKey( 0, 25, cShowPriority); [@P
SetKey( 0, 45, cSkipTest); [@X
SetKey( 0, 47, cVersion); [@V
SetKey( 0, 44, cQuit); [@Z
[ Substitute PCjr number keys as function keys.
if (machineType == JR)
{
SetKey( 49, 0, cHelp); [1
SetKey( 50, 0, cSoundToggle); [2
SetKey( 51, 0, cEchoLine); [3
SetKey( 52, 0, cF4); [4
SetKey( 53, 0, cSave); [5
SetKey( 54, 0, cF6); [6
SetKey( 55, 0, cRestore); [7
SetKey( 56, 0, cF8); [8
SetKey( 57, 0, cRestart); [9
SetKey( 48, 0, cSpeed); [0
}
[ Set joystick controllers.
SetKey( JOYSTICK_LOW_BYTE, BUTTON_0, cMenu);
if (twoButtonJoystick)
{
SetKey( JOYSTICK_LOW_BYTE, BUTTON_1, cStatus);
[SetKey( JOYSTICK_LOW_BYTE, BUTTON_0_DOUBLE, c.doit);
[SetKey( JOYSTICK_LOW_BYTE, BUTTON_1_DOUBLE, c.useit);
}
else {
if (machineType == ST)
{
SetKey( JOYSTICK_LOW_BYTE, BUTTON_0_DOUBLE, cStatus);
}
}