"GOAL for TOA #2 Copyright 1984 Infocom, Inc. All rights reserved. " "This code is the local T system." > > )) #DECL ((DIR CNT) FIX) ) ( ,BACK-ALLEY-LINE-C> ) (T )> .DIR> >> )> >> )> >>> "Rapid Transit Line Definitions and Identifiers" > > > > > > > > > > > > > > > > > ;"up to 16 corridors (65536)" "CODE" ) LINE LN RM GT GOAL FLG (GOAL-FLAG <>) (IGOAL <>) LOC (CNT 1) DIR) #DECL ((PERSON HERE LOC RM) OBJECT (LN CNT) FIX (GOAL-FLAG) ) >> > > >) (> )> > .HERE>> >)> ;% '<>) (T '> .HERE>> >)>)> >>> 0> > >)> ) (<==? .HERE .GOAL> >>> > ) (>> > >> ) (T > >)>)> >> > .HERE> >>) (T >>)> >) (<==? .RM .GOAL> )> >>> >>> > .HERE> ) (<==? .RM .THERE> )> >> > ,ROAD-WHARF-LINE) (<==? .LN 1> ,EAST-ROAD-LINE) (<==? .LN 2> ,BEDROOM-LINE) (<==? .LN 3> ,BACK-ALLEY-LINE) (<==? .LN 4> ,TRAWLER-LINE) (<==? .LN 5> ,SALVAGER-LINE)>> ,COR-1) (<==? .NUM 2> ,COR-2) (<==? .NUM 4> ,COR-4) (<==? .NUM 8> ,COR-8) (<==? .NUM 16> ,COR-16) (<==? .NUM 32> ,COR-32) (<==? .NUM 64> ,COR-64) (<==? .NUM 128> ,COR-128) (<==? .NUM 256> ,COR-256) (T ,COR-512)>> "Goal tables for the 4 characters (plus delivery boy), offset by a constant, which, for a given character, is the P?CHARACTER property of the object." <> <> 1 <> I-FOLLOW 5 5> <> <> 1 <> I-MCGINTY 5 5>
<> <> 1 <> I-JOHNNY 5 5>
<> <> 1 <> I-PETE 5 5>
<> <> 1 <> I-WEASEL 5 5>
<> <> 1 <> I-DELIVERY-BOY 0 0>>> "Offsets into GOAL-TABLEs" ;"final goal" ;"station of final goal" ;"intermediate goal (transfer point)" ;"character can move; usually false only when he's interrupted enroute" ;"secondary goal to go to when current, higher- priority one has been reached" ;"routine to apply on arrival" ;"how long character will wait when interrupted" ;"used to count down from ATTENTION-SPAN to 0" "Goal-function constants, similar to M-xxx in MAIN" "Routines to do looking down corridors" ) "AUX" C Z COR VAL (FOUND <>)) > > 0>> ) (> 0>> ) (> 0>> ) (> 0>> ) (> 0>> ) (> 0>> ) (> 0>> ) (> 0>> ) (> 0>> ) (> 0>> ) (> 0>> ) (T )> > )> > .FOUND)>> ) RM OBJ) > 0> ) (<==? .RM ,HERE> ) (> > )>) ( > > > >>> ; )> > )> > )>> )>)> >>> > "Goal tables for the 6 characters (including PLAYER), offset by the preceding constants, which, for a given character, is the P?CHARACTER property of the object." "The ATTENTION-TABLE is now a thing of the past. ATTENTION in the GOAL-TABLES is used instead." "Here's how the movement goals are done: For each player is a table which consists of triplets, a number of minutes until the next movement (an clock interrupt number), a number of minutes allowed variation (for a bit of randomness), and a room toward which to start. All movement is controlled by the GOAL-ENABLE flag in the GOAL-TABLE for a character." "Time starts at 8AM. Characters are at that point in their starting positions, as reflected in PEOPLE." ;"MCGINTY"
;"JOHNNY"
;"PETE"
;"WEASEL"
;"DELIVERY-BOY"
>> > > > >> <==? 1>> >>> ) (T )>> > > > > > > > >> "This routine does the interrupt-driven goal establishment for the various characters, using the MOVEMENT-GOALS table." > (ID VAR DIS TIM) FIX) >>> > >>> ) (T )>)> >>> > >> >> > >> <- .VAR .DIS>>>)>)> > ) (CNT 0) GT VAL) > ,CHARACTER-MAX> ) (> ,GOAL-S> <0? >>> >> > )>)>)>> .FLG> ) (CNT 0) ATT GT) > ,CHARACTER-MAX> ) (<0? > ,ATTENTION> 1>>> ) ;(<==? > ,ATTENTION> 1>> 1> ,HERE> > > )>) ;(<==? .ATT 0> )> > .FLG> ) GT ATT) #DECL ((PERSON) OBJECT (ATT) FIX) > >> ) ( >)>)> > " Movement etc." ;>> > >)>> ) "AUX" (HERE ) HL GL GT) #DECL ((PERSON GOAL HERE) OBJECT (HL GL) FIX (PRIORITY) ) ; )> >> )> 12> <* 2>>> ;% '<>) (T ',)>> > >> ,GOAL-S <>> ,G-REACHED>> ) ;DR (VAL <>) DF CD) #DECL ((PERSON WHERE) OBJECT) >>> > > ;>> ,DEXIT> > > ;> )>) (T >)>) (T >)> >> )> ) (<==? .DIR ,P?IN> ;)> ;> ; )> ) (T ;)> ,TRAWLER-LINE-C> >> )> ;> ; )> )> )>) ( >> >> <==? .WHERE ,HERE> <==? .OL ,LAST-PLAYER-LOC>> ) (T )> )> )>) (> >> > 0>>> > > ;)> > ;> ; )> )> ) (<0? >> > >> )> ) (T >> >> ) (T )> )> )>) (> 0>>> > > )> )>)> ; .WHERE> >> <==? ,HERE .WHERE> >> )>) (T ,G-ENROUTE>)> ; )> .VAL) (T .FLG)>> ) (P 0) L Z O) #DECL ((HERE THERE O) OBJECT (P L) FIX) >> ) ( T) (> > > <==? .THERE>> ) (T )>) ( > )>)>>> ;) "AUX" WT NC (CNT 0)) > > ) (<==? .CNT .NC>) ( .FLG> >> .NC ,PRESENT-TIME>)> >>> ;
>>