-
Notifications
You must be signed in to change notification settings - Fork 16
/
clues.zabstr
83 lines (82 loc) · 4.59 KB
/
clues.zabstr
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
<FLAGS-AND-DEFAULTS (("SOUND" %<>)) (("LEAVE-HINT-SCREEN" "VERBS" #WORD
*12501633253*) ("INIT-HINT-SCREEN" "VERBS" #WORD *22324330117*))>
<FILE-FLAGS CLEAN-STACK? MDL-ZIL?>
<COMPILATION-FLAG-DEFAULT SEGMENTED-HINTS <>>
<COMPILATION-FLAG-DEFAULT SPLIT-HINTS <>>
<COMPILATION-FLAG-DEFAULT SELECTIVE-HINTS <>>
<DEFAULTS-DEFINED HINT-TITLES INIT-HINT-SCREEN LEAVE-HINT-SCREEN>
<BEGIN-SEGMENT HINTS>
<DEFAULT-DEFINITION HINT-TITLES <CONSTANT RETURN-SEE-HINT "Return for hints.">
<CONSTANT RETURN-SEE-NEW-HINT "Return for a hint."> <CONSTANT M-MAIN-HINT-MENU
"M for main menu."> <CONSTANT M-SEE-HINT-MENU "M for hint menu."> <CONSTANT
PREVIOUS-HINT "P for previous item."> <CONSTANT NEXT-HINT "N for next item."> <
CONSTANT Q-RESUME-STORY "Q to resume story."> <CONSTANT H-OR-USE-MOUSE
"(Or use mouse.)"> <GLOBAL H-OR-USE-MOUSE-WID:NUMBER 0> <CONSTANT NO-MORE-HINTS
"[No more hints.]">>
<END-SEGMENT>
<COND (<GASSIGNED? DISTINGUISHED-SEGMENT> <DISTINGUISHED-SEGMENT HINTS>)>
<BEGIN-SEGMENT HINTS>
<DEFINE20 EVAL-INTO-HINTS? () <COND (<COMPILATION-FLAG-VALUE "SEGMENTED-HINTS">
<>) (<COMPILATION-FLAG-VALUE "SPLIT-HINTS"> T)>>
<DEFINE20 CONSTRUCT-HINTS (COUNT-NAME "ARGS" STUFF "AUX" (SS <>) END-STUFF VAL
(HL (T)) (HLL .HL) V (CL (T)) (CLL .CL) TCL TCLL MAIN-SEGMENT (CURRENT-SEGMENT
<>)) <IFFLAG (SEGMENTED-HINTS <BIND () <SET MAIN-SEGMENT "0"> <SET
CURRENT-SEGMENT "0">>)> <REPEAT ((CT 0)) <COND (<OR <EMPTY? .STUFF> <TYPE? <1 .
STUFF> STRING>> <SET END-STUFF .STUFF> <IFFLAG (SEGMENTED-HINTS <COND (<EMPTY?
.STUFF>) (<AND <NOT <EMPTY? <REST .STUFF>>> <TYPE? <2 .STUFF> STRING>> <SET
CURRENT-SEGMENT <2 .STUFF>> <2 .STUFF <1 .STUFF>> <SET STUFF <REST .STUFF>>) (T
<SET CURRENT-SEGMENT .MAIN-SEGMENT>)>) (T <COND (<EMPTY? .STUFF>) (<AND <NOT <
EMPTY? <REST .STUFF>>> <TYPE? <2 .STUFF> STRING>> <2 .STUFF <1 .STUFF>> <SET
STUFF <REST .STUFF>>)>)> <COND (<NOT .SS> <SET SS .STUFF> <SET TCL (T)> <SET
TCLL .TCL> <SET CT 0>) (T <SET V <IVECTOR <- <LENGTH .SS> <LENGTH .END-STUFF>>>
> <MAPR <> <FUNCTION (L V) <1 .V <1 .L>>> .SS .V> <COND (<L? 17 <LENGTH .V>> <
WARN "Too many answers for: " <1 .V>>)> <COND (<EVAL-INTO-HINTS?> <SET HLL <
REST <PUTREST .HLL (<EVAL <FORM TABLE (LENGTH PURE SEGMENT <IFFLAG (SPLIT-HINTS
"CLUES") (T "HINTS")>) !.V>>)>>>) (T <SET HLL <REST <PUTREST .HLL (<EVAL <FORM
TABLE (LENGTH PURE) !.V>>)>>>)> <COND (.COUNT-NAME <SET CLL <REST <PUTREST .CLL
(<EVAL <FORM TABLE (BYTE) !<REST .TCL!>>>)>>> <SET TCL (T)> <SET TCLL .TCL> <
SET CT 0>)> <SET SS .STUFF>)> <COND (<EMPTY? .STUFF> <RETURN>)> <SET STUFF <
REST .STUFF>>) (T <IFFLAG (SEGMENTED-HINTS <1 .STUFF <EVAL-IN-SEGMENT .
CURRENT-SEGMENT <1 .STUFF>>>) (SPLIT-HINTS <BIND () <MAPR <> <FUNCTION (X "AUX"
(Y <1 .X>) TT) <COND (<TYPE? .Y STRING> <SET TT <EVAL-IN-SEGMENT "HINTS" <FORM
TABLE (TEMP-TABLE) .Y>>> <1 .X <ZGET .TT 0>>) (<TYPE? .Y FORM> <MAPR <> <
FUNCTION (A "AUX" (B <1 .A>) TT) <COND (<TYPE? .B STRING> <SET TT <
EVAL-IN-SEGMENT "HINTS" <FORM TABLE (TEMP-TABLE) .B>>> <1 .A <ZGET .TT 0>>)>> .
Y>)>> <1 .STUFF>> <1 .STUFF <EVAL-IN-SEGMENT "CLUES" <1 .STUFF> T>>>) (T <1 .
STUFF <EVAL-IN-SEGMENT "HINTS" <1 .STUFF> T>>)> <COND (.COUNT-NAME <COND (<1? <
MOD <SET CT <+ .CT 1>> 2>> <SET TCLL <REST <PUTREST .TCLL (0)>>>)>)> <SET STUFF
<REST .STUFF>>)>> <COND (.COUNT-NAME <COND (<EVAL-INTO-HINTS?> <EVAL <FORM
CONSTANT .COUNT-NAME <EVAL <FORM TABLE (PURE SEGMENT <IFFLAG (SPLIT-HINTS
"CLUES") (T "HINTS")>) !<REST .CL!>>>>>) (T <EVAL <FORM CONSTANT .COUNT-NAME <
EVAL <FORM PTABLE !<REST .CL!>>>>>)>)> <SET VAL <COND (<EVAL-INTO-HINTS?> <EVAL
<FORM TABLE (PURE LENGTH SEGMENT <IFFLAG (SPLIT-HINTS "CLUES") (T "HINTS")>) !<
REST .HL!>>>) (T <EVAL <FORM PLTABLE !<REST .HL!>>>)>> <EVAL <FORM CONSTANT
INVISICLUES " InvisiClues (tm)">> .VAL>
<GLOBAL H-QUEST-NUM 1>
<GLOBAL H-CHAPT-NUM 1>
<GLOBAL BOTTOM-HINT-NUM:NUMBER 0>
<CONSTANT TOP-HINT-LINE:NUMBER 1>
<CONSTANT LEFT-HINT-COLUMN:NUMBER 1>
<GLOBAL GET-HINT-ROUTINE 0>
<DEFINE-ROUTINE DO-HINTS>
<DEFINE-ROUTINE H-PICK-QUESTION>
<DEFINE-ROUTINE H-NEW-CURSOR>
<DEFINE-ROUTINE SELECT-HINT-BY-MOUSE>
<LOWCORE MSLOCY %<> T>
<LOWCORE MSLOCX %<> T>
<DEFINE-ROUTINE INVERSE-LINE>
<DEFINE-ROUTINE DISPLAY-HINT>
<DEFINE-ROUTINE H-CHAPT-NAME>
<DEFINE-ROUTINE H-GET-QUEST>
<DEFINE-ROUTINE H-PUT-UP-FROBS>
<DEFAULT-DEFINITION INIT-HINT-SCREEN <DEFINE INIT-HINT-SCREEN () <CLEAR -1> <
CSPLIT 4> <SCREEN ,S-TEXT> ,S-WINDOW>>
<DEFAULT-DEFINITION LEAVE-HINT-SCREEN <DEFINE LEAVE-HINT-SCREEN () <
INIT-STATUS-LINE> <IF-SOUND <COND (,SOUND-ON? <CHECK-LOOPING>)>> <TELL
"Back to the story..." CR>>>
<DEFINE-ROUTINE HINT-TITLE>
<DEFINE-ROUTINE LEFT-LINE>
<DEFINE-ROUTINE RIGHT-LINE>
<DEFINE-ROUTINE CENTER-LINE>
<DEFINE-ROUTINE JUSTIFIED-LINE>
<END-SEGMENT>