.FUNCT RT-RM-COMMAND-MODULE:ANY:0:1,CONTEXT EQUAL? CONTEXT,M-F-LOOK,M-V-LOOK,M-LOOK \?CCL3 PRINTC TAB PRINTI "You " EQUAL? CONTEXT,M-LOOK \?CCL6 PRINTI "are in" JUMP ?CND4 ?CCL6: PRINTI "enter" ?CND4: ICALL RT-PRINT-OBJ,RM-COMMAND-MODULE,K-ART-THE PRINTI ", a long narrow cabin like the inside of a Winnebago packed with instrumentation. At the far end, a chair sits in front of a bank of monitors. The only exit is in the aft wall." CRLF RFALSE ?CCL3: EQUAL? CONTEXT,M-BEG \?CCL8 EQUAL? PRSA,V?SIT \FALSE EQUAL? PRSO,ROOMS \FALSE CALL1 RT-COMMAND-MENU RSTACK ?CCL8: ZERO? CONTEXT \FALSE RFALSE .FUNCT RT-TH-MONITORS:ANY:0:1,CONTEXT ZERO? CONTEXT \FALSE EQUAL? PRSA,V?EXAMINE \?CCL5 PRINTC TAB PRINTR "The monitors glow with data gathered from all over Deepcore." ?CCL5: EQUAL? PRSA,V?SIT \FALSE CALL1 RT-COMMAND-MENU RSTACK .FUNCT RT-TH-COMMAND-CHAIR:ANY:0:1,CONTEXT ZERO? CONTEXT \FALSE EQUAL? PRSA,V?EXAMINE \?CCL5 PRINTC TAB PRINTR "The chair is right in front of the main control panel." ?CCL5: EQUAL? PRSA,V?ENTER,V?SIT \FALSE CALL1 RT-COMMAND-MENU RSTACK .FUNCT RT-COMMAND-MENU:ANY:0:0,C,L,ON?,X1,Y1,X2,Y2,?TMP2,?TMP1 SET 'X1,1 CALL2 L-PIXELS,4 >Y1 CALL2 C-PIXELS,16 >X2 CALL2 L-PIXELS,12 >Y2 MOUSE-LIMIT -1 CLEAR -1 GET 0,18 >?TMP1 MUL 6,GL-FONT-Y SUB ?TMP1,STACK ADD 1,STACK WINPOS 0,STACK,1 MUL 6,GL-FONT-Y >?TMP1 GET 0,17 WINSIZE 0,?TMP1,STACK ADD GL-FONT-Y,1 WINPOS 2,STACK,1 GET 0,18 >?TMP2 MUL 7,GL-FONT-Y SUB ?TMP2,STACK >?TMP1 GET 0,17 WINSIZE 2,?TMP1,STACK WINPOS 7,1,1 GET 0,18 >?TMP1 GET 0,17 WINSIZE 7,?TMP1,STACK SET 'GL-SL-HERE,FALSE-VALUE ?PRG1: CLEAR 2 ICALL1 UPDATE-STATUS-LINE SCREEN 2 CURSET 1,1 PRINTI "Main menu" ICALL CCURSET,4,1 PRINTI "Emergency" ICALL CCURSET,4,15 PRINTC 69 ICALL CCURSET,5,1 PRINTI "ROV" ICALL CCURSET,5,15 PRINTC 82 ICALL CCURSET,6,1 PRINTI "Air" ICALL CCURSET,6,15 PRINTC 65 ICALL CCURSET,7,1 PRINTI "Power" ICALL CCURSET,7,15 PRINTC 80 ICALL CCURSET,8,1 PRINTI "Lights" ICALL CCURSET,8,15 PRINTC 76 ICALL CCURSET,9,1 PRINTI "Life Support" ICALL CCURSET,9,15 PRINTC 83 ICALL CCURSET,10,1 PRINTI "Pump" ICALL CCURSET,10,15 PRINTC 77 ICALL CCURSET,11,1 PRINTI "Exit" ICALL CCURSET,11,15 PRINTC 88 ?PRG3: SCREEN 0 SET 'GL-INPUT-TIMEOUT,FALSE-VALUE INPUT 1,3,RT-STOP-READ >C ZERO? GL-INPUT-TIMEOUT \?CCL7 EQUAL? C,K-CLICK1,K-CLICK2 \?CCL10 CALL MOUSE-INPUT?,2,X1,Y1,X2,Y2 ZERO? STACK /?CCL13 CALL2 PIXELS-L,GL-MOUSE-Y >L EQUAL? L,1 \?CCL16 SET 'C,101 JUMP ?REP4 ?CCL16: EQUAL? L,2 \?CCL18 SET 'C,114 JUMP ?REP4 ?CCL18: EQUAL? L,3 \?CCL20 SET 'C,97 JUMP ?REP4 ?CCL20: EQUAL? L,4 \?CCL22 SET 'C,112 JUMP ?REP4 ?CCL22: EQUAL? L,5 \?CCL24 SET 'C,108 JUMP ?REP4 ?CCL24: EQUAL? L,6 \?CCL26 SET 'C,115 JUMP ?REP4 ?CCL26: EQUAL? L,7 \?CCL28 SET 'C,109 JUMP ?REP4 ?CCL28: SET 'C,120 JUMP ?REP4 ?CCL13: SOUND S-BEEP JUMP ?PRG3 ?CCL10: LESS? C,65 /?CND29 GRTR? C,90 /?CND29 ADD C,32 >C ?CND29: EQUAL? C,101,114,97 /?REP4 EQUAL? C,112,108,115 /?REP4 EQUAL? C,109,120 /?REP4 SOUND S-BEEP JUMP ?PRG3 ?CCL7: SCREEN 2 ICALL CCURSET,4,1 ZERO? ON? /?PRT41 SET 'ON?,0 JUMP ?PRE43 ?PRT41: SET 'ON?,1 ?PRE43: ZERO? ON? /?CND39 HLIGHT K-H-INV ?CND39: PRINTI "Emergency" HLIGHT K-H-NRM JUMP ?PRG3 ?REP4: EQUAL? C,101 \?CCL46 ICALL1 RT-EMERGENCY-MENU JUMP ?PRG1 ?CCL46: EQUAL? C,114 \?CCL48 ICALL1 RT-ROV-MENU JUMP ?PRG1 ?CCL48: EQUAL? C,97 \?CCL50 ICALL1 RT-AIR-MENU JUMP ?PRG1 ?CCL50: EQUAL? C,112 \?CCL52 ICALL1 RT-POWER-MENU JUMP ?PRG1 ?CCL52: EQUAL? C,108 \?CCL54 ICALL1 RT-LIGHT-MENU JUMP ?PRG1 ?CCL54: EQUAL? C,115 \?CCL56 ICALL1 RT-SUPPORT-MENU JUMP ?PRG1 ?CCL56: EQUAL? C,109 \?CCL58 ICALL1 RT-PUMP-MENU JUMP ?PRG1 ?CCL58: EQUAL? C,120 \?PRG1 CLEAR -1 ICALL1 INIT-STATUS-LINE SCREEN 0 PRINTC TAB PRINTR "You get up from the command chair." .FUNCT RT-EMERGENCY-MENU:ANY:0:0,X1,Y1,X2,Y2,C,L SET 'X1,1 CALL2 L-PIXELS,4 >Y1 CALL2 C-PIXELS,25 >X2 CALL2 L-PIXELS,6 >Y2 CLEAR 2 ICALL1 UPDATE-STATUS-LINE SCREEN 2 CURSET 1,1 PRINTI "Emergency menu" ICALL CCURSET,4,1 HLIGHT K-H-INV ZERO? GL-KLAXON-ON /?CCL3 PRINTI "ON " JUMP ?CND1 ?CCL3: PRINTI "OFF" ?CND1: HLIGHT K-H-NRM ICALL CCURSET,4,4 PRINTI "Emergency klaxons" ICALL CCURSET,4,24 PRINTC 75 HLIGHT K-H-NRM ICALL CCURSET,5,4 PRINTI "Exit" ICALL CCURSET,5,24 PRINTC 88 ?PRG4: SCREEN 0 INPUT 1 >C EQUAL? C,K-CLICK1,K-CLICK2 \?CCL8 CALL MOUSE-INPUT?,2,X1,Y1,X2,Y2 ZERO? STACK /?CND6 CALL2 PIXELS-L,GL-MOUSE-Y >L EQUAL? L,1 \?CCL13 SET 'C,107 JUMP ?CND6 ?CCL13: SET 'C,120 JUMP ?CND6 ?CCL8: LESS? C,65 /?CND6 GRTR? C,90 /?CND6 ADD C,32 >C ?CND6: EQUAL? C,107 \?CCL19 SCREEN 2 ICALL CCURSET,4,1 HLIGHT K-H-INV ZERO? GL-KLAXON-ON /?PRT23 SET 'GL-KLAXON-ON,0 JUMP ?PRE25 ?PRT23: SET 'GL-KLAXON-ON,1 ?PRE25: ZERO? GL-KLAXON-ON /?CCL22 ADD GL-MOVES,1 ICALL RT-QUEUE,RT-I-KLAXON,STACK PRINTI "ON " JUMP ?CND20 ?CCL22: ICALL2 RT-DEQUEUE,RT-I-KLAXON PRINTI "OFF" ?CND20: HLIGHT K-H-NRM JUMP ?PRG4 ?CCL19: EQUAL? C,120 /TRUE SOUND S-BEEP JUMP ?PRG4 .FUNCT RT-ROV-MENU:ANY:0:0 CLEAR 2 ICALL1 UPDATE-STATUS-LINE SCREEN 2 CURSET 1,1 PRINTI "R.O.V. menu" SCREEN 0 INPUT 1 RTRUE .FUNCT RT-AIR-MENU:ANY:0:0 CLEAR 2 ICALL1 UPDATE-STATUS-LINE SCREEN 2 CURSET 1,1 PRINTI "Breathing Mix menu" ICALL CCURSET,4,1 PRINTI "Oxygen: " ICALL RT-PRINT-FLOAT,GL-OXYGEN-QTY,K-OXYGEN-FACTOR PRINTI "% - " ICALL RT-GAS-LEVEL-MSG,GL-OXYGEN-QTY,K-OXY-LOW-1,K-OXY-HIGH-1,K-OXY-NOM PRINTI " Carbon dioxide: " ICALL RT-PRINT-FLOAT,GL-CO2-QTY,K-CO2-FACTOR PRINTI "% - " ICALL RT-GAS-LEVEL-MSG,GL-CO2-QTY,-1,K-CO2-HIGH-1,K-CO2-NOM PRINTI " Nitrogen: " ICALL RT-PRINT-FLOAT,GL-NITROGEN-QTY,K-NITROGEN-FACTOR PRINTI "% - " ICALL RT-GAS-LEVEL-MSG,GL-NITROGEN-QTY,K-NIT-LOW-1,K-NIT-HIGH-1,K-NIT-NOM PRINTI " Helium: " ICALL RT-PRINT-FLOAT,GL-HELIUM-QTY,K-HELIUM-FACTOR PRINTI "% " SCREEN 0 INPUT 1 RTRUE .FUNCT RT-GAS-LEVEL-MSG:ANY:4:4,QTY,LOW,HIGH,NOM GRTR? QTY,LOW /?CCL3 PRINTI "low" RTRUE ?CCL3: LESS? QTY,HIGH /?CCL5 PRINTI "high" RTRUE ?CCL5: EQUAL? QTY,NOM \?CCL7 PRINTI "nominal" RTRUE ?CCL7: LESS? QTY,NOM \?CCL9 PRINTI "less than nominal" RTRUE ?CCL9: PRINTI "more than nominal" RTRUE .FUNCT RT-POWER-MENU:ANY:0:0 CLEAR 2 ICALL1 UPDATE-STATUS-LINE SCREEN 2 CURSET 1,1 PRINTI "Power menu" SCREEN 0 INPUT 1 RTRUE .FUNCT RT-LIGHT-MENU:ANY:0:0 CLEAR 2 ICALL1 UPDATE-STATUS-LINE SCREEN 2 CURSET 1,1 PRINTI "Lighting menu" SCREEN 0 INPUT 1 RTRUE .FUNCT RT-SUPPORT-MENU:ANY:0:0,X1,Y1,X2,Y2,C,L SET 'X1,1 CALL2 L-PIXELS,4 >Y1 CALL2 C-PIXELS,28 >X2 CALL2 L-PIXELS,9 >Y2 CLEAR 2 ICALL1 UPDATE-STATUS-LINE SCREEN 2 CURSET 1,1 PRINTI "Life support menu" ICALL CCURSET,4,1 HLIGHT K-H-INV ZERO? GL-SCRUBBERS-ON /?CCL3 PRINTI "ON " JUMP ?CND1 ?CCL3: PRINTI "OFF" ?CND1: HLIGHT K-H-NRM ICALL CCURSET,4,4 PRINTI "CO2 scrubbers" ICALL CCURSET,4,27 PRINTC 83 ICALL CCURSET,5,1 HLIGHT K-H-INV ZERO? GL-HEATERS-ON /?CCL6 PRINTI "ON " JUMP ?CND4 ?CCL6: PRINTI "OFF" ?CND4: HLIGHT K-H-NRM ICALL CCURSET,5,4 PRINTI "Heaters" ICALL CCURSET,5,27 PRINTC 72 ICALL CCURSET,6,1 HLIGHT K-H-INV PRINTI "ON " HLIGHT K-H-NRM ICALL CCURSET,6,4 PRINTI "Helium de-scramblers" ICALL CCURSET,6,27 PRINTC 68 ICALL CCURSET,7,1 HLIGHT K-H-INV PRINTI "ON " HLIGHT K-H-NRM ICALL CCURSET,7,4 PRINTI "De-humidifiers" ICALL CCURSET,7,27 PRINTC 77 HLIGHT K-H-NRM ICALL CCURSET,8,4 PRINTI "Exit" ICALL CCURSET,8,27 PRINTC 88 ICALL CCURSET,4,50 PRINTI "Interior temp:" ICALL CCURSET,5,50 ICALL RT-PRINT-FLOAT,GL-DEEPCORE-TEMP,K-TEMP-FACTOR PRINTI " deg. F" ?PRG7: SCREEN 0 INPUT 1 >C EQUAL? C,K-CLICK1,K-CLICK2 \?CCL11 CALL MOUSE-INPUT?,2,X1,Y1,X2,Y2 ZERO? STACK /?CND9 CALL2 PIXELS-L,GL-MOUSE-Y >L EQUAL? L,1 \?CCL16 SET 'C,115 JUMP ?CND9 ?CCL16: EQUAL? L,2 \?CCL18 SET 'C,104 JUMP ?CND9 ?CCL18: EQUAL? L,3 \?CCL20 SET 'C,100 JUMP ?CND9 ?CCL20: EQUAL? L,4 \?CCL22 SET 'C,109 JUMP ?CND9 ?CCL22: SET 'C,120 JUMP ?CND9 ?CCL11: LESS? C,65 /?CND9 GRTR? C,90 /?CND9 ADD C,32 >C ?CND9: EQUAL? C,115 \?CCL28 ZERO? GL-SCRUBBERS-ON /?PRT29 SET 'GL-SCRUBBERS-ON,0 JUMP ?PRE31 ?PRT29: SET 'GL-SCRUBBERS-ON,1 ?PRE31: SCREEN 2 ICALL CCURSET,4,1 HLIGHT K-H-INV ZERO? GL-SCRUBBERS-ON /?CCL34 PRINTI "ON " JUMP ?CND32 ?CCL34: PRINTI "OFF" ?CND32: HLIGHT K-H-NRM JUMP ?PRG7 ?CCL28: EQUAL? C,104 \?CCL36 ZERO? GL-HEATERS-ON /?PRT37 SET 'GL-HEATERS-ON,0 JUMP ?PRE39 ?PRT37: SET 'GL-HEATERS-ON,1 ?PRE39: SCREEN 2 ICALL CCURSET,5,1 HLIGHT K-H-INV ZERO? GL-HEATERS-ON /?CCL42 PRINTI "ON " JUMP ?CND40 ?CCL42: PRINTI "OFF" ?CND40: HLIGHT K-H-NRM JUMP ?PRG7 ?CCL36: EQUAL? C,100 /?PRG7 EQUAL? C,109 /?PRG7 EQUAL? C,120 /TRUE SOUND S-BEEP JUMP ?PRG7 .FUNCT RT-PUMP-MENU:ANY:0:0,X1,Y1,X2,Y2,C,L SET 'X1,1 CALL2 L-PIXELS,4 >Y1 CALL2 C-PIXELS,24 >X2 CALL2 L-PIXELS,6 >Y2 CLEAR 2 ICALL1 UPDATE-STATUS-LINE SCREEN 2 CURSET 1,1 PRINTI "Pump and compressor menu" ICALL CCURSET,4,1 HLIGHT K-H-INV ZERO? GL-WATER-PUMP-ON /?CCL3 PRINTI "ON " JUMP ?CND1 ?CCL3: PRINTI "OFF" ?CND1: HLIGHT K-H-NRM ICALL CCURSET,4,4 PRINTI "Fresh water pumps" ICALL CCURSET,4,23 PRINTC 80 HLIGHT K-H-NRM ICALL CCURSET,5,4 PRINTI "Exit" ICALL CCURSET,5,23 PRINTC 88 ?PRG4: SCREEN 0 INPUT 1 >C EQUAL? C,K-CLICK1,K-CLICK2 \?CCL8 CALL MOUSE-INPUT?,2,X1,Y1,X2,Y2 ZERO? STACK /?CND6 CALL2 PIXELS-L,GL-MOUSE-Y >L EQUAL? L,1 \?CCL13 SET 'C,112 JUMP ?CND6 ?CCL13: SET 'C,120 JUMP ?CND6 ?CCL8: LESS? C,65 /?CND6 GRTR? C,90 /?CND6 ADD C,32 >C ?CND6: EQUAL? C,112 \?CCL19 SCREEN 2 ICALL CCURSET,4,1 HLIGHT K-H-INV ZERO? GL-WATER-PUMP-ON /?PRT23 SET 'GL-WATER-PUMP-ON,0 JUMP ?PRE25 ?PRT23: SET 'GL-WATER-PUMP-ON,1 ?PRE25: ZERO? GL-WATER-PUMP-ON /?CCL22 PRINTI "ON " JUMP ?CND20 ?CCL22: PRINTI "OFF" ?CND20: HLIGHT K-H-NRM JUMP ?PRG4 ?CCL19: EQUAL? C,120 /TRUE SOUND S-BEEP JUMP ?PRG4 .FUNCT RT-TH-DESCRAMBLER-CONTROL-BOX:ANY:0:1,CONTEXT RFALSE .ENDI