-
Notifications
You must be signed in to change notification settings - Fork 16
/
clues.zap
645 lines (610 loc) · 12.8 KB
/
clues.zap
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
.SEGMENT "HINTS"
.FUNCT DO-HINTS:ANY:0:0,Q,WIN,WCLR,QN,FG,BG,NUM,MAXC,?TMP1
HLIGHT H-NORMAL
CURSET -1,0
CALL1 INIT-HINT-SCREEN >WIN
WINATTR S-TEXT,A-WRAP,O-CLEAR
FONT 1
WINGET -3,WFSIZE
SHIFT STACK,-8 >Q
WINGET -3,WHIGH
DIV STACK,Q >BOTTOM-HINT-NUM
SCREEN S-WINDOW
WINGET S-WINDOW,WCOLOR >WCLR
GETB 0,30
EQUAL? STACK,APPLE-2C,APPLE-2E,APPLE-2GS \?CCL3
COLOR 1,1
HLIGHT H-INVERSE
JUMP ?PRG12
?CCL3: GET 0,0
BTST STACK,1 \?PRG6
ICALL CCURSET,2,9
COLOR 1,-1
JUMP ?PRG12
?PRG6: WINGET S-TEXT,WCOLOR >BG
SHIFT BG,-8 >FG
EQUAL? FG,-1,255 \?CND8
SET 'FG,1
?CND8: BAND BG,255 >BG
EQUAL? BG,-1,255 \?CND10
SET 'BG,1
?CND10: COLOR FG,BG
?PRG12: CLEAR S-TEXT
SCREEN S-WINDOW
FONT 1
ICALL HINT-TITLE,INVISICLUES,S-WINDOW
SCREEN S-TEXT
WINATTR -3,A-SCRIPT,O-CLEAR
DIROUT D-TABLE-ON,SLINE
DIROUT D-TABLE-OFF
SET 'GET-HINT-ROUTINE,H-CHAPT-NAME
GET HINTS,0
ICALL2 H-PUT-UP-FROBS,STACK
SET 'QN,H-CHAPT-NUM
GET HINTS,0
GRTR? QN,STACK \?CND14
PRINTI " ["
PRINTN QN
PRINTC 93
SET 'QN,1
?CND14: ICALL2 H-NEW-CURSOR,QN
?PRG16: GET HINTS,0 >MAXC
ZERO? DEMO-VERSION? /?CCL20
CALL2 INPUT-DEMO,1 >BG
JUMP ?CND18
?CCL20: INPUT 1 >BG
?CND18: EQUAL? BG,CLICK1,CLICK2 \?CND21
CALL1 SELECT-HINT-BY-MOUSE >FG
GRTR? FG,0 /?CND21
EQUAL? FG,-1 \?CCL27
SET 'BG,78
JUMP ?CND21
?CCL27: EQUAL? FG,-2 \?CCL29
SET 'BG,80
JUMP ?CND21
?CCL29: EQUAL? FG,-3 \?CCL31
SET 'BG,13
JUMP ?CND21
?CCL31: EQUAL? FG,-4 \?CCL33
SET 'BG,81
?CND21: EQUAL? BG,77,109,81 /?CTR35
EQUAL? BG,113 \?CCL36
?CTR35: SET 'Q,TRUE-VALUE
JUMP ?REP17
?CCL33: SOUND S-BEEP
JUMP ?PRG16
?CCL36: EQUAL? BG,LEFT-ARROW \?CCL40
SUB QN,BOTTOM-HINT-NUM >NUM
LESS? 0,NUM \?CCL43
ICALL H-NEW-CURSOR,QN,TRUE-VALUE
SET 'QN,NUM
ICALL2 H-NEW-CURSOR,QN
SET 'H-QUEST-NUM,1
JUMP ?PRG16
?CCL43: SOUND S-BEEP
JUMP ?PRG16
?CCL40: EQUAL? BG,RIGHT-ARROW \?CCL45
ADD QN,BOTTOM-HINT-NUM >NUM
LESS? MAXC,NUM /?CCL48
ICALL H-NEW-CURSOR,QN,TRUE-VALUE
SET 'QN,NUM
ICALL2 H-NEW-CURSOR,QN
SET 'H-QUEST-NUM,1
JUMP ?PRG16
?CCL48: SOUND S-BEEP
JUMP ?PRG16
?CCL45: EQUAL? BG,78,110,DOWN-ARROW \?CCL50
SET 'NUM,QN
ICALL H-NEW-CURSOR,NUM,TRUE-VALUE
?PRG51: IGRTR? 'NUM,MAXC \?CND53
SET 'NUM,1
?CND53: EQUAL? NUM,QN \?CCL57
SOUND S-BEEP
ICALL2 H-NEW-CURSOR,QN
JUMP ?PRG16
?CCL57: CALL2 H-NEW-CURSOR,NUM
ZERO? STACK /?PRG51
SET 'QN,NUM
SET 'H-QUEST-NUM,1
JUMP ?PRG16
?CCL50: EQUAL? BG,80,112,UP-ARROW \?CCL60
SET 'NUM,QN
ICALL H-NEW-CURSOR,NUM,TRUE-VALUE
?PRG61: DLESS? 'NUM,1 \?CND63
SET 'NUM,MAXC
?CND63: EQUAL? NUM,QN \?CCL67
SOUND S-BEEP
ICALL2 H-NEW-CURSOR,QN
JUMP ?PRG16
?CCL67: CALL2 H-NEW-CURSOR,NUM
ZERO? STACK /?PRG61
SET 'QN,NUM
SET 'H-QUEST-NUM,1
JUMP ?PRG16
?CCL60: EQUAL? BG,13,10,32 \?CCL70
SET 'H-CHAPT-NUM,QN
CALL1 H-PICK-QUESTION >Q
JUMP ?REP17
?CCL70: EQUAL? BG,CLICK1,CLICK2 \?CCL72
GRTR? FG,MAXC \?CCL75
SOUND S-BEEP
JUMP ?PRG16
?CCL75: ICALL H-NEW-CURSOR,QN,TRUE-VALUE
CALL2 H-NEW-CURSOR,FG
ZERO? STACK /?CCL78
SET 'QN,FG
SET 'H-QUEST-NUM,1
EQUAL? BG,CLICK2 \?PRG16
SET 'H-CHAPT-NUM,QN
CALL1 H-PICK-QUESTION >Q
?REP17: ZERO? Q /?PRG12
CLEAR -1
SCREEN S-WINDOW
GETB 0,30
EQUAL? STACK,APPLE-2C,APPLE-2E,APPLE-2GS \?CCL85
HLIGHT H-NORMAL
JUMP ?CND83
?CCL78: SOUND S-BEEP
ICALL2 H-NEW-CURSOR,QN
JUMP ?PRG16
?CCL72: SOUND S-BEEP
JUMP ?PRG16
?CCL85: BAND WCLR,255 >?TMP1
SHIFT WCLR,-8
COLOR ?TMP1,STACK
?CND83: SCREEN S-TEXT
HLIGHT H-NORMAL
WINATTR S-TEXT,A-WRAP,O-SET
WINATTR S-TEXT,A-SCRIPT,O-SET
CURSET -2,0
ICALL1 LEAVE-HINT-SCREEN
RETURN M-FATAL
.FUNCT H-PICK-QUESTION:ANY:0:0,CHR,MAXQ,Q,WID,QN,TMP,NUM
?FCN: CATCH >PARSE-SENTENCE-ACTIVATION
HLIGHT H-NORMAL
CLEAR S-TEXT
GET HINTS,H-CHAPT-NUM
GET STACK,1
ICALL HINT-TITLE,STACK,S-WINDOW
CALL CENTER-LINE,M-MAIN-HINT-MENU,2 >WID
GET HINTS,H-CHAPT-NUM
GET STACK,0
SUB STACK,1 >MAXQ
SCREEN S-TEXT
SET 'GET-HINT-ROUTINE,H-GET-QUEST
ICALL2 H-PUT-UP-FROBS,MAXQ
SET 'QN,H-QUEST-NUM
GRTR? QN,MAXQ \?CND1
PRINTI " ["
PRINTN QN
PRINTC 93
SET 'QN,1
?CND1: ICALL2 H-NEW-CURSOR,QN
?PRG3: ZERO? DEMO-VERSION? /?CCL7
CALL2 INPUT-DEMO,1 >CHR
JUMP ?CND5
?CCL7: INPUT 1 >CHR
?CND5: EQUAL? CHR,CLICK1,CLICK2 \?CND8
CALL SELECT-HINT-BY-MOUSE,WID,TRUE-VALUE >TMP
GRTR? TMP,0 /?CND8
EQUAL? TMP,-1 \?CCL14
SET 'CHR,78
JUMP ?CND8
?CCL14: EQUAL? TMP,-2 \?CCL16
SET 'CHR,80
JUMP ?CND8
?CCL16: EQUAL? TMP,-3 \?CCL18
SET 'CHR,13
JUMP ?CND8
?CCL18: EQUAL? TMP,-4 \?CCL20
SET 'CHR,81
JUMP ?CND8
?CCL20: EQUAL? TMP,-5 \?CCL22
SET 'CHR,77
?CND8: EQUAL? CHR,81,113 /TRUE
EQUAL? CHR,77,109 \?CCL27
SET 'Q,TRUE-VALUE
JUMP ?REP4
?CCL22: SOUND S-BEEP
JUMP ?PRG3
?CCL27: EQUAL? CHR,LEFT-ARROW \?CCL29
SUB QN,BOTTOM-HINT-NUM >NUM
LESS? 0,NUM \?CCL32
ICALL H-NEW-CURSOR,QN,TRUE-VALUE
SET 'QN,NUM
ICALL2 H-NEW-CURSOR,QN
JUMP ?PRG3
?CCL32: SOUND S-BEEP
JUMP ?PRG3
?CCL29: EQUAL? CHR,RIGHT-ARROW \?CCL34
ADD QN,BOTTOM-HINT-NUM >NUM
LESS? MAXQ,NUM /?CCL37
ICALL H-NEW-CURSOR,QN,TRUE-VALUE
SET 'QN,NUM
ICALL2 H-NEW-CURSOR,QN
JUMP ?PRG3
?CCL37: SOUND S-BEEP
JUMP ?PRG3
?CCL34: EQUAL? CHR,78,110,DOWN-ARROW \?CCL39
SET 'NUM,QN
ICALL H-NEW-CURSOR,NUM,TRUE-VALUE
?PRG40: IGRTR? 'NUM,MAXQ \?CND42
SET 'NUM,1
?CND42: EQUAL? NUM,QN \?CCL46
SOUND S-BEEP
JUMP ?REP41
?CCL46: CALL2 H-NEW-CURSOR,NUM
ZERO? STACK /?PRG40
SET 'QN,NUM
?REP41: ICALL2 H-NEW-CURSOR,QN
JUMP ?PRG3
?CCL39: EQUAL? CHR,80,112,UP-ARROW \?CCL49
SET 'NUM,QN
ICALL H-NEW-CURSOR,NUM,TRUE-VALUE
?PRG50: DLESS? 'NUM,1 \?CND52
SET 'NUM,MAXQ
?CND52: EQUAL? NUM,QN \?CCL56
SOUND S-BEEP
JUMP ?REP51
?CCL56: CALL2 H-NEW-CURSOR,NUM
ZERO? STACK /?PRG50
SET 'QN,NUM
?REP51: ICALL2 H-NEW-CURSOR,QN
JUMP ?PRG3
?CCL49: EQUAL? CHR,CLICK1,CLICK2 \?CCL59
GRTR? TMP,MAXQ \?CCL62
SOUND S-BEEP
JUMP ?PRG3
?CCL62: ICALL H-NEW-CURSOR,QN,TRUE-VALUE
CALL2 H-NEW-CURSOR,TMP
ZERO? STACK /?CCL65
SET 'QN,TMP
EQUAL? CHR,CLICK2 \?PRG3
SET 'H-QUEST-NUM,QN
ICALL1 DISPLAY-HINT
JUMP ?REP4
?CCL65: SOUND S-BEEP
ICALL2 H-NEW-CURSOR,QN
JUMP ?PRG3
?CCL59: EQUAL? CHR,13,10,32 \?CCL69
SET 'H-QUEST-NUM,QN
ICALL1 DISPLAY-HINT
?REP4: ZERO? Q /?FCN
RFALSE
?CCL69: SOUND S-BEEP
JUMP ?PRG3
.FUNCT H-NEW-CURSOR:ANY:1:2,POS,OFF?,Y,X,?TMP1
SET 'Y,POS
SET 'X,LEFT-HINT-COLUMN
GRTR? POS,BOTTOM-HINT-NUM \?CND1
SUB Y,BOTTOM-HINT-NUM >Y
WINGET -3,WWIDE
DIV STACK,2 >X
?CND1: SUB Y,1 >?TMP1
WINGET -3,WFSIZE
SHIFT STACK,-8
MUL ?TMP1,STACK
ADD 1,STACK
CURSET STACK,X
ZERO? OFF? \?CCL5
HLIGHT H-INVERSE
JUMP ?CND3
?CCL5: HLIGHT H-NORMAL
?CND3: CALL GET-HINT-ROUTINE,POS >X
ZERO? X /?CND6
PRINT X
PRINTC 32
?CND6: ZERO? OFF? \?CND8
HLIGHT H-NORMAL
?CND8: RETURN X
.FUNCT SELECT-HINT-BY-MOUSE:ANY:0:2,WID,Q?,VAL,MID,X,Y,WIN,?TMP1
GET 0,27
GET STACK,2 >Y
GET 0,27
GET STACK,1 >X
WINGET S-WINDOW,WTOP >VAL
GRTR? VAL,Y /?CCL3
SUB Y,VAL >?TMP1
WINGET S-WINDOW,WHIGH
LESS? ?TMP1,STACK \?CCL3
SET 'WIN,S-WINDOW
JUMP ?CND1
?CCL3: WINGET S-TEXT,WTOP >VAL
SET 'WIN,S-TEXT
?CND1: SUB Y,VAL >Y
WINGET WIN,WFSIZE
SHIFT STACK,-8 >VAL
DIV Y,VAL >VAL
GETB 0,33 >?TMP1
WINGET WIN,WFSIZE
BAND STACK,255
MUL ?TMP1,STACK
DIV STACK,2 >MID
EQUAL? WIN,S-WINDOW \?CCL8
EQUAL? VAL,1 \?CCL11
DIV WID,2 >VAL
ZERO? VAL /?CCL14
SUB MID,VAL
GRTR? X,STACK \?CCL14
ADD MID,VAL
LESS? X,STACK \?CCL14
RETURN -5
?CCL14: GRTR? X,MID /?CCL19
RETURN -1
?CCL19: RETURN -3
?CCL11: EQUAL? VAL,2 \FALSE
DIV H-OR-USE-MOUSE-WID,2 >VAL
SUB MID,VAL
LESS? X,STACK \?CCL24
RETURN -2
?CCL24: ADD MID,VAL
GRTR? X,STACK \FALSE
RETURN -4
?CCL8: INC 'VAL
GRTR? X,MID \?CCL30
ZERO? Q? \?CCL30
ADD VAL,BOTTOM-HINT-NUM >VAL
RETURN VAL
?CCL30: GRTR? VAL,BOTTOM-HINT-NUM \?CND28
SET 'VAL,BOTTOM-HINT-NUM
?CND28: RETURN VAL
.FUNCT INVERSE-LINE:ANY:0:2,LN,INV,?TMP1
ASSIGNED? 'INV /?CND1
SET 'INV,H-INVERSE
?CND1: ZERO? LN /?CND3
ICALL CCURSET,LN,1
?CND3: HLIGHT INV
ZERO? INV \?CCL7
ERASE 1
RTRUE
?CCL7: FONT 4
GETB 0,39 >LN
WINGET -3,WWIDE >INV
ADD LN,INV
DIV STACK,LN
ICALL2 PRINT-SPACES,STACK
GETB 0,30
EQUAL? STACK,APPLE-2E,APPLE-2C,APPLE-2GS \?CND8
CURGET SLINE
GET SLINE,0 >?TMP1
SUB INV,LN
CURSET ?TMP1,STACK
PRINTC 32
?CND8: FONT 1
HLIGHT H-NORMAL
RTRUE
.FUNCT DISPLAY-HINT:ANY:0:0,H,MX,CNT,CV,SHIFT?,COUNT-OFFS,WID,CURCX,CURC,FLG,?TMP1
HLIGHT H-NORMAL
CLEAR S-TEXT
SCREEN S-WINDOW
ICALL INVERSE-LINE,3,H-NORMAL
ICALL RIGHT-LINE,Q-RESUME-STORY,3
ICALL INVERSE-LINE,2,H-NORMAL
ICALL RIGHT-LINE,RETURN-SEE-NEW-HINT,2
GET 0,8
BTST STACK,32 \?CND1
CALL CENTER-LINE,H-OR-USE-MOUSE,3 >H-OR-USE-MOUSE-WID
?CND1: ICALL INVERSE-LINE,1,H-NORMAL
HLIGHT H-BOLD
GET HINTS,H-CHAPT-NUM >?TMP1
ADD H-QUEST-NUM,1
GET ?TMP1,STACK >H
SUB H-CHAPT-NUM,1
GET HINT-COUNTS,STACK >CV
GET H,1
ICALL CENTER-LINE,STACK,1,H-INVERSE
HLIGHT H-NORMAL
CALL CENTER-LINE,M-SEE-HINT-MENU,2 >WID
GET H,0 >MX
DIROUT D-SCREEN-OFF
GET H,1
PRINT STACK
CRLF
DIROUT D-SCREEN-ON
SCREEN S-TEXT
WINATTR -3,A-SCRIPT,O-SET
WINATTR S-TEXT,A-WRAP,O-SET
CURSET 1,1
MOD H-QUEST-NUM,2 >SHIFT?
SUB H-QUEST-NUM,1
DIV STACK,2 >COUNT-OFFS
SET 'CNT,1
GETB CV,COUNT-OFFS >CURCX
ZERO? SHIFT? /?CCL5
SHIFT CURCX,-4
JUMP ?CND3
?CCL5: PUSH CURCX
?CND3: BAND STACK,15
ADD 1,STACK >CURC
?PRG6: IGRTR? 'CNT,CURC /?REP7
SUB MX,CNT
ADD STACK,1
PRINTN STACK
PRINTI "> "
GET H,CNT
PRINT STACK
CRLF
JUMP ?PRG6
?REP7: SET 'FLG,TRUE-VALUE
?PRG11: ZERO? FLG /?CND13
SET 'FLG,FALSE-VALUE
GRTR? CNT,MX \?CCL17
PRINT NO-MORE-HINTS
CRLF
SCREEN S-WINDOW
ICALL INVERSE-LINE,2,H-NORMAL
ICALL CENTER-LINE,M-SEE-HINT-MENU,2
SCREEN S-TEXT
JUMP ?CND13
?CCL17: SUB MX,CNT
ADD STACK,1
PRINTN STACK
PRINTI "> "
?CND13: ZERO? DEMO-VERSION? /?CCL20
CALL2 INPUT-DEMO,1 >CURC
JUMP ?CND18
?CCL20: INPUT 1 >CURC
?CND18: EQUAL? CURC,CLICK1,CLICK2 \?CND21
CALL2 SELECT-HINT-BY-MOUSE,WID >CURCX
GRTR? CURCX,0 /?CND21
EQUAL? CURCX,-3 \?CCL27
SET 'CURC,13
JUMP ?CND21
?CCL27: EQUAL? CURCX,-4 \?CCL29
SET 'CURC,81
JUMP ?CND21
?CCL29: EQUAL? CURCX,-5 \?CCL31
SET 'CURC,77
?CND21: EQUAL? CURC,77,109,81 /?CTR33
EQUAL? CURC,113 \?CCL34
?CTR33: ZERO? SHIFT? /?CCL39
GETB CV,COUNT-OFFS
BAND STACK,15 >?TMP1
SUB CNT,2
SHIFT STACK,4
BOR ?TMP1,STACK
PUTB CV,COUNT-OFFS,STACK
JUMP ?CND37
?CCL31: SOUND S-BEEP
JUMP ?PRG11
?CCL39: GETB CV,COUNT-OFFS
BAND STACK,240 >?TMP1
SUB CNT,2
BOR ?TMP1,STACK
PUTB CV,COUNT-OFFS,STACK
?CND37: EQUAL? CURC,81,113 \?CCL42
THROW TRUE-VALUE,PARSE-SENTENCE-ACTIVATION
JUMP ?PRG11
?CCL42: WINATTR -3,A-SCRIPT,O-CLEAR
WINATTR S-TEXT,A-WRAP,O-CLEAR
RTRUE
?CCL34: EQUAL? CURC,13,10 \?CCL44
GRTR? CNT,MX /?CCL47
SET 'FLG,TRUE-VALUE
GET H,CNT
PRINT STACK
CRLF
IGRTR? 'CNT,MX \?PRG11
SET 'FLG,FALSE-VALUE
PRINT NO-MORE-HINTS
CRLF
SCREEN S-WINDOW
ICALL INVERSE-LINE,2,H-NORMAL
ICALL CENTER-LINE,M-SEE-HINT-MENU,2
SCREEN S-TEXT
JUMP ?PRG11
?CCL47: SOUND S-BEEP
JUMP ?PRG11
?CCL44: SOUND S-BEEP
JUMP ?PRG11
.FUNCT H-CHAPT-NAME:ANY:1:1,N
GET HINTS,N
GET STACK,1
RSTACK
.FUNCT H-GET-QUEST:ANY:1:1,N,?TMP1
GET HINTS,H-CHAPT-NUM >?TMP1
ADD N,1
GET ?TMP1,STACK
GET STACK,1
RSTACK
.FUNCT H-PUT-UP-FROBS:ANY:1:1,MX,ST,QN,X,Y,TMP,BHL,WID
SET 'QN,1
SET 'X,LEFT-HINT-COLUMN
SET 'Y,TOP-HINT-LINE
HLIGHT H-NORMAL
SET 'BHL,BOTTOM-HINT-NUM
WINGET -3,WFSIZE
SHIFT STACK,-8 >WID
?PRG1: IGRTR? 'ST,MX /TRUE
CALL GET-HINT-ROUTINE,ST >TMP
ZERO? TMP /?PRG1
SUB Y,1
MUL STACK,WID
ADD 1,STACK
CURSET STACK,X
PRINT TMP
ERASE 1
IGRTR? 'Y,BHL \?PRG1
SET 'Y,TOP-HINT-LINE
WINGET -3,WWIDE
DIV STACK,2 >X
JUMP ?PRG1
.FUNCT INIT-HINT-SCREEN:ANY:0:0
SCREEN S-FULL
CLEAR S-FULL
ICALL1 RESET-MARGIN
EQUAL? MACHINE,APPLE-2E,APPLE-2C,APPLE-2GS /?CCL3
ICALL DISPLAY-BORDER,P-HINT-BORDER,FALSE-VALUE
JUMP ?CND1
?CCL3: MUL 3,FONT-Y
ADD 1,STACK
DISPLAY P-HINT-BORDER,STACK,1
?CND1: ICALL2 SETUP-TEXT-AND-STATUS,P-HINT-LOC
SCREEN S-TEXT
MARGIN 0,0
RETURN S-STATUS
.FUNCT LEAVE-HINT-SCREEN:ANY:0:0
RFALSE
.FUNCT HINT-TITLE:ANY:2:3,TITLE,WIN,THIRD
ASSIGNED? 'THIRD /?CND1
SET 'THIRD,TRUE-VALUE
?CND1: SCREEN S-WINDOW
ICALL INVERSE-LINE,1,H-NORMAL
ICALL INVERSE-LINE,2,H-NORMAL
ICALL INVERSE-LINE,3,H-NORMAL
HLIGHT H-BOLD
ICALL CENTER-LINE,TITLE,1,H-INVERSE
HLIGHT H-NORMAL
ICALL LEFT-LINE,2,NEXT-HINT
GET 0,8
BTST STACK,32 \?CND3
CALL CENTER-LINE,H-OR-USE-MOUSE,3 >H-OR-USE-MOUSE-WID
?CND3: ICALL LEFT-LINE,3,PREVIOUS-HINT
ZERO? THIRD /FALSE
ICALL RIGHT-LINE,RETURN-SEE-HINT,2
CALL RIGHT-LINE,Q-RESUME-STORY,3
RSTACK
.FUNCT LEFT-LINE:ANY:2:3,LN,STR,INV
ICALL CCURSET,LN,1
ZERO? INV /?CND1
HLIGHT INV
?CND1: PRINT STR
ZERO? INV /FALSE
HLIGHT H-NORMAL
RTRUE
.FUNCT RIGHT-LINE:ANY:1:4,STR,LN,INV,LEN
CALL JUSTIFIED-LINE,STR,LN,INV,LEN,1
RSTACK
.FUNCT CENTER-LINE:ANY:1:4,STR,LN,INV,LEN
CALL JUSTIFIED-LINE,STR,LN,INV,LEN,2
RSTACK
.FUNCT JUSTIFIED-LINE:ANY:5:5,STR,LN,INV,LEN,CTR
ZERO? LN \?CCL3
CURGET SLINE
GET SLINE,0 >LN
JUMP ?CND1
?CCL3: DEC 'LN
WINGET -3,WFSIZE
SHIFT STACK,-8
MUL LN,STACK
ADD 1,STACK >LN
?CND1: ZERO? LEN \?CND4
DIROUT D-TABLE-ON,SLINE
PRINT STR
PRINTC 32
DIROUT D-TABLE-OFF
GET 0,24 >LEN
?CND4: WINGET -3,WWIDE
SUB STACK,LEN
DIV STACK,CTR
CURSET LN,STACK
ZERO? INV /?CND6
HLIGHT INV
?CND6: PRINT STR
PRINTC 32
ZERO? INV \?CCL9
RETURN LEN
?CCL9: HLIGHT H-NORMAL
RETURN LEN
.ENDSEG
.ENDI