'=========================================================================== ' Subject: GRAPHICAL MENU Date: 03-28-97 (19:28) ' Author: Warren Seyle Code: QB, QBasic, PDS ' Origin: wseyle@awod.com Packet: GRAPHICS.ABC '=========================================================================== DECLARE SUB ProcessSelection () DECLARE SUB DialogBox (Cul%, Lin%, BoxLength%, Height%) DECLARE SUB DrawWindow (x1%, y1%, x2%, y2%, c1%, c2%, c3%) DECLARE SUB PalColors () DECLARE SUB LoadImages () DECLARE SUB CursorDown () DECLARE SUB CursorUp () DECLARE SUB OFont (Text$, X%, Y%, Fore%, Back%) DECLARE SUB Frame (X%, Y%, x1%, y1%, LineColor%) DECLARE SUB Background (TubeColor%) CONST White = 255, Black = 180 CONST Gold = 200, Green = 181, Blue = 130, Red = 150 CONST False = 0, True = NOT False UpArrow$ = CHR$(0) + CHR$(72) ' Up arrow key. DownArrow$ = CHR$(0) + CHR$(80) ' Down arrow key. Enter$ = CHR$(13) Escape$ = CHR$(27) DIM SHARED SaveScreen(3300, 4) AS INTEGER DIM SHARED Quit AS INTEGER DIM SHARED PurpleArrow(649) AS INTEGER DIM SHARED PurpleArrowMask(649) AS INTEGER DIM SHARED Back1%(1000) DIM SHARED Back2%(1000) DIM SHARED Back3%(1000) DIM SHARED Area AS INTEGER, Task AS INTEGER TYPE TypeOfPointer X AS INTEGER Y AS INTEGER END TYPE DIM SHARED Arrow AS TypeOfPointer SCREEN 13 PalColors LoadImages Background Green Arrow.X = 95: Arrow.Y = 40 Frame Arrow.X - 39, Arrow.Y - 32, Arrow.X + 164, Arrow.Y + 145, Red OFont "PLAY GAME", Arrow.X + 45, Arrow.Y + 13, 255, 114 OFont "READ RULES", Arrow.X + 45, Arrow.Y + 53, 127, 114 OFont "QUIT", Arrow.X + 45, Arrow.Y + 94, 127, 114 GET (Arrow.X, Arrow.Y)-(Arrow.X + 36, Arrow.Y + 34), Back1% PUT (Arrow.X, Arrow.Y), PurpleArrowMask, AND PUT (Arrow.X, Arrow.Y), PurpleArrow, OR Area = 1 Quit = False 'Main LOOP which loops until one of the activated keys is pressed. 'Note: Pressing the Esc key is the same as selecting quit. DO Key$ = UCASE$(INKEY$) 'This SELECT CASE statement is used to trap the arrow keys and the Escape key SELECT CASE Key$ CASE UpArrow$ CursorUp CASE DownArrow$ CursorDown CASE Enter$ ProcessSelection CASE Escape$ Quit = True END SELECT LOOP UNTIL Quit SCREEN 0 COLOR 15 CLS END Help: IF Task = 1 THEN RETURN WHILE INKEY$ <> "": WEND 'Empty the keyboard buffer. CHAIN "help.bas" ArrowImage: DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,098,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,092,075,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,063,075,056,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,101,092,056,074,000,000,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,113,064,097,073,055,000,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,084,101,098,074,096,055,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,089,058,092,056,096,072,055,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,089,058,108,097,073,072,072,072,000,000,000,000,000,000,000,000,000,000 DATA 059,108,100,077,077,077,077,099,077,099,077,099,077,099,077,077,068,090,108,063,102,062,075,073,055,072,072,072,000,000,000,000,000,000,000,000,000 DATA 058,063,093,077,099,076,076,076,076,076,076,076,076,076,076,077,077,078,067,065,084,089,098,074,055,072,072,072,072,000,000,000,000,000,000,000,000 DATA 063,084,065,068,077,099,076,099,076,099,076,099,076,099,076,099,077,100,093,067,063,065,098,056,096,054,054,054,072,072,000,000,000,000,000,000,000 DATA 093,065,084,065,068,077,099,076,099,076,076,076,076,076,099,076,077,077,068,067,108,065,098,074,096,072,072,054,072,072,072,000,000,000,000,000,000 DATA 077,068,065,102,063,068,077,099,076,076,099,076,099,076,076,099,077,077,068,067,065,090,098,097,096,096,072,054,054,054,072,072,000,000,000,000,000 DATA 077,077,068,063,058,084,067,100,099,099,076,099,076,076,099,076,077,077,068,090,065,067,075,056,096,055,072,072,054,072,054,072,072,000,000,000,000 DATA 076,099,077,068,086,058,081,090,092,077,099,076,099,099,076,099,077,092,067,090,065,092,075,074,073,072,072,072,072,054,054,054,054,072,000,000,000 DATA 076,076,099,077,067,103,058,081,065,092,077,099,099,099,077,077,092,092,090,065,065,099,097,074,096,055,072,054,054,054,049,049,049,054,054,000,000 DATA 076,099,076,077,077,067,062,062,065,092,099,099,052,052,098,098,098,077,092,092,100,077,098,096,055,072,054,054,049,071,071,071,053,053,071,049,000 DATA 099,076,076,076,052,099,099,098,100,100,078,078,078,078,078,078,078,078,078,100,078,078,100,074,054,071,071,053,095,095,070,070,070,070,070,053,049 DATA 076,076,076,098,098,075,097,074,074,074,073,096,096,096,073,073,073,073,074,056,075,075,097,049,053,095,070,070,094,094,091,091,091,091,094,070,000 DATA 076,098,076,098,075,097,073,072,054,071,071,071,071,071,071,071,071,049,049,054,054,054,049,053,070,070,094,091,109,114,069,069,069,109,094,000,000 DATA 076,098,098,075,056,096,072,071,053,095,095,095,070,095,070,095,095,053,053,071,049,049,053,095,094,091,109,069,069,069,069,069,069,048,000,000,000 DATA 098,075,075,074,096,049,053,070,070,070,094,094,094,070,094,070,070,070,095,071,071,071,053,070,091,109,069,069,069,069,069,069,109,000,000,000,000 DATA 075,097,074,055,071,095,070,094,094,091,094,094,091,091,094,091,094,070,070,053,071,071,095,094,091,043,069,069,069,069,069,069,000,000,000,000,000 DATA 097,056,055,071,070,094,091,091,048,091,048,048,091,048,091,091,094,094,095,053,071,071,095,094,109,069,069,069,069,069,043,000,000,000,000,000,000 DATA 074,072,071,070,094,091,091,048,048,048,048,048,048,048,048,048,091,070,095,071,049,049,095,091,069,069,069,069,069,109,000,000,000,000,000,000,000 DATA 096,049,095,070,091,091,091,048,091,091,091,091,091,091,091,094,094,070,071,054,072,049,095,091,069,069,069,069,048,000,000,000,000,000,000,000,000 DATA 060,082,105,106,061,051,091,091,091,066,091,091,091,091,091,091,091,051,071,096,072,054,070,048,069,069,069,043,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,073,096,049,070,109,069,069,043,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,097,096,071,094,043,069,109,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,097,096,053,094,109,048,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,074,072,070,094,091,000,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,073,049,070,094,000,000,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,096,071,095,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,072,071,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 DATA 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,072,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 DEFINT A-Z SUB Background (TubeColor%) EndTubeColor% = TubeColor% + (TubeColor% + 10) X = 1 FOR PaletteColor = TubeColor% TO TubeColor% + 10 COLOR PaletteColor LINE (X, 0)-(X, 200) LINE (X + 20, 0)-(X + 20, 200) LINE (X + 40, 0)-(X + 40, 200) LINE (X + 60, 0)-(X + 60, 200) LINE (X + 80, 0)-(X + 80, 200) LINE (X + 100, 0)-(X + 100, 200) LINE (X + 120, 0)-(X + 120, 200) LINE (X + 140, 0)-(X + 140, 200) LINE (X + 160, 0)-(X + 160, 200): LINE (X + 180, 0)-(X + 180, 200) LINE (X + 200, 0)-(X + 200, 200): LINE (X + 220, 0)-(X + 220, 200) LINE (X + 240, 0)-(X + 240, 200): LINE (X + 260, 0)-(X + 260, 200) LINE (X + 280, 0)-(X + 280, 200): LINE (X + 300, 0)-(X + 300, 200) LINE (X + 320, 0)-(X + 320, 200) COLOR EndTubeColor% - PaletteColor LINE (X + 10, 0)-(X + 10, 200) LINE (X + 30, 0)-(X + 30, 200) LINE (X + 50, 0)-(X + 50, 200) LINE (X + 70, 0)-(X + 70, 200) LINE (X + 90, 0)-(X + 90, 200) LINE (X + 110, 0)-(X + 110, 200) LINE (X + 130, 0)-(X + 130, 200) LINE (X + 150, 0)-(X + 150, 200) LINE (X + 170, 0)-(X + 170, 200): LINE (X + 190, 0)-(X + 190, 200) LINE (X + 210, 0)-(X + 210, 200): LINE (X + 230, 0)-(X + 230, 200) LINE (X + 250, 0)-(X + 250, 200): LINE (X + 270, 0)-(X + 270, 200) LINE (X + 290, 0)-(X + 290, 200) LINE (X + 310, 0)-(X + 310, 200) X = X + 1 NEXT END SUB SUB CursorDown 'Moves the cursor down one selection 'if the down arrow key is pressed. IF Area = 1 THEN Area = 2 OFont "PLAY GAME", Arrow.X + 45, Arrow.Y + 13, 127, 114 OFont "READ RULES", Arrow.X + 45, Arrow.Y + 53, 255, 114 OFont "QUIT", Arrow.X + 45, Arrow.Y + 94, 127, 114 GET (Arrow.X, Arrow.Y + 40)-(Arrow.X + 36, Arrow.Y + 74), Back2%'Get temp background PUT (Arrow.X, Arrow.Y + 40), PurpleArrowMask, AND PUT (Arrow.X, Arrow.Y + 40), PurpleArrow, OR WAIT &H3DA, 8 PUT (Arrow.X, Arrow.Y), Back1%, PSET 'Restore BackGround EXIT SUB END IF IF Area = 2 THEN Area = 3 OFont "PLAY GAME", Arrow.X + 45, Arrow.Y + 13, 127, 114 OFont "READ RULES", Arrow.X + 45, Arrow.Y + 53, 127, 114 OFont "QUIT", Arrow.X + 45, Arrow.Y + 94, 255, 114 GET (Arrow.X, Arrow.Y + 80)-(Arrow.X + 36, Arrow.Y + 114), Back3%'Get temp background PUT (Arrow.X, Arrow.Y + 80), PurpleArrowMask, AND PUT (Arrow.X, Arrow.Y + 80), PurpleArrow, OR WAIT &H3DA, 8 PUT (Arrow.X, Arrow.Y + 40), Back2%, PSET 'Restore BackGround EXIT SUB END IF IF Area = 3 THEN Area = 1 OFont "PLAY GAME", Arrow.X + 45, Arrow.Y + 13, 255, 114 OFont "READ RULES", Arrow.X + 45, Arrow.Y + 53, 127, 114 OFont "QUIT", Arrow.X + 45, Arrow.Y + 94, 127, 114 GET (Arrow.X, Arrow.Y)-(Arrow.X + 36, Arrow.Y + 34), Back1%'Get temp background PUT (Arrow.X, Arrow.Y), PurpleArrowMask, AND PUT (Arrow.X, Arrow.Y), PurpleArrow, OR WAIT &H3DA, 8 PUT (Arrow.X, Arrow.Y + 80), Back3%, PSET 'Restore BackGround EXIT SUB END IF END SUB SUB CursorUp 'Moves the cursor up one selection if 'the up arrow key has been pressed. IF Area = 1 THEN Area = 3 OFont "PLAY GAME", Arrow.X + 45, Arrow.Y + 13, 127, 114 OFont "READ RULES", Arrow.X + 45, Arrow.Y + 53, 127, 114 OFont "QUIT", Arrow.X + 45, Arrow.Y + 94, 255, 114 GET (Arrow.X, Arrow.Y + 80)-(Arrow.X + 36, Arrow.Y + 114), Back3%'Get temp background PUT (Arrow.X, Arrow.Y + 80), PurpleArrowMask, AND PUT (Arrow.X, Arrow.Y + 80), PurpleArrow, OR WAIT &H3DA, 8 PUT (Arrow.X, Arrow.Y), Back1%, PSET 'Restore BackGround EXIT SUB END IF IF Area = 2 THEN Area = 1 OFont "PLAY GAME", Arrow.X + 45, Arrow.Y + 13, 255, 114 OFont "READ RULES", Arrow.X + 45, Arrow.Y + 53, 127, 114 OFont "QUIT", Arrow.X + 45, Arrow.Y + 94, 127, 114 GET (Arrow.X, Arrow.Y)-(Arrow.X + 36, Arrow.Y + 34), Back1%'Get temp background PUT (Arrow.X, Arrow.Y), PurpleArrowMask, AND PUT (Arrow.X, Arrow.Y), PurpleArrow, OR WAIT &H3DA, 8 PUT (Arrow.X, Arrow.Y + 40), Back2%, PSET 'Restore BackGround EXIT SUB END IF IF Area = 3 THEN Area = 2 OFont "PLAY GAME", Arrow.X + 45, Arrow.Y + 13, 127, 114 OFont "READ RULES", Arrow.X + 45, Arrow.Y + 53, 255, 114 OFont "QUIT", Arrow.X + 45, Arrow.Y + 94, 127, 114 GET (Arrow.X, Arrow.Y + 40)-(Arrow.X + 36, Arrow.Y + 74), Back2%'Get temp background PUT (Arrow.X, Arrow.Y + 40), PurpleArrowMask, AND PUT (Arrow.X, Arrow.Y + 40), PurpleArrow, OR WAIT &H3DA, 8 PUT (Arrow.X, Arrow.Y + 80), Back3%, PSET 'Restore BackGround EXIT SUB END IF END SUB SUB DialogBox (Cul%, Lin%, BoxLength%, Height%) STATIC DrawWindow Cul%, Lin%, Cul% + BoxLength%, Lin% + Height%, 255, 255, 7 'status bar LINE (Cul% + 5, Lin% + 34)-(Cul% + BoxLength% - 6, Lin% + 34), 0 LINE (Cul% + 7, Lin% + 7)-(Cul% + BoxLength% - 7, Lin% + 32), 147, BF LINE (Cul% + 6, Lin% + 35)-(Cul% + BoxLength% - 6, Lin% + (Height% - 6)), 139, BF END SUB SUB DrawButton (W.X%, W.Y%, W.W%, W.H%, Border%) STATIC COLOR White LINE (W.X% + W.W%, W.Y%)-(W.X%, W.Y%): LINE -(W.X%, W.Y% + W.H%) LINE (W.X% + W.W% - 1, W.Y% + 1)-(W.X% + 1, W.Y% + 1) LINE -(W.X% + 1, W.Y% + W.H% - 1) COLOR DarkGray LINE (W.X% + 1, W.Y% + W.H%)-(W.X% + W.W%, W.Y% + W.H%) LINE -(W.X% + W.W%, W.Y%) LINE (W.X% + 2, W.Y% + W.H% - 1)-(W.X% + W.W% - 1, W.Y% + W.H% - 1) LINE -(W.X% + W.W% - 1, W.Y% + 1) LINE (W.X% + 2, W.Y% + 2)-(W.X% + W.W% - 2, W.Y% + W.H% - 2), LightGray, BF IF Border% THEN COLOR DarkGray LINE (W.X% + W.W% - 10, W.Y% + 10)-(W.X% + 10, W.Y% + 10) LINE -(W.X% + 10, W.Y% + W.H% - 10) COLOR White LINE -(W.X% + W.W% - 10, W.Y% + W.H% - 10) LINE -(W.X% + W.W% - 10, W.Y% + 10) END IF END SUB SUB DrawWindow (x1, y1, x2, y2, c1, c2, c3) STATIC LINE (x1, y1)-(x2, y2), 0, B LINE (x1 + 1, y1 + 1)-(x2 - 1, y1 + 1), c1 LINE (x1 + 2, y1 + 2)-(x2 - 2, y1 + 2), c1 LINE (x1 + 1, y1 + 1)-(x1 + 1, y2 - 1), c1 LINE (x1 + 2, y1 + 2)-(x1 + 2, y2 - 2), c1 LINE (x2 - 1, y1 + 1)-(x2 - 1, y2 - 1), c2 LINE (x2 - 2, y1 + 2)-(x2 - 2, y2 - 2), c2 LINE (x1 + 1, y2 - 1)-(x2 - 1, y2 - 1), c2 LINE (x1 + 2, y2 - 2)-(x2 - 2, y2 - 2), c2 LINE (x1 + 3, y1 + 3)-(x2 - 3, y2 - 3), c3, BF END SUB SUB Frame (X%, Y%, x1%, y1%, LineColor%) LINE (X% + 5, Y% + 5)-(x1% - 5, y1% - 5), LineColor% + 5, B LINE (X% + 6, Y% + 6)-(x1% - 6, y1% - 6), LineColor% + 6, B LINE (X% + 7, Y% + 7)-(x1% - 7, y1% - 7), LineColor% + 7, B LINE (X% + 8, Y% + 8)-(x1% - 8, y1% - 8), LineColor% + 8, B LINE (X% + 9, Y% + 9)-(x1% - 9, y1% - 9), LineColor% + 9, B LINE (X% + 10, Y% + 10)-(x1% - 10, y1% - 10), LineColor% + 10, B LINE (X% + 11, Y% + 11)-(x1% - 11, y1% - 11), LineColor% + 11, B LINE (X% + 12, Y% + 12)-(x1% - 12, y1% - 12), LineColor% + 12, B LINE (X% + 13, Y% + 13)-(x1% - 13, y1% - 13), LineColor% + 13, B LINE (X% + 14, Y% + 14)-(x1% - 14, y1% - 14), LineColor% + 14, B LINE (X% + 15, Y% + 15)-(x1% - 15, y1% - 15), LineColor% + 15, B LINE (X% + 16, Y% + 16)-(x1% - 16, y1% - 16), LineColor% + 14, B LINE (X% + 17, Y% + 17)-(x1% - 17, y1% - 17), LineColor% + 13, B LINE (X% + 18, Y% + 18)-(x1% - 18, y1% - 18), LineColor% + 12, B LINE (X% + 19, Y% + 19)-(x1% - 19, y1% - 19), LineColor% + 11, B LINE (X% + 20, Y% + 20)-(x1% - 20, y1% - 20), LineColor% + 10, B LINE (X% + 21, Y% + 21)-(x1% - 21, y1% - 21), LineColor% + 9, B LINE (X% + 22, Y% + 22)-(x1% - 22, y1% - 22), LineColor% + 8, B LINE (X% + 23, Y% + 23)-(x1% - 23, y1% - 23), LineColor% + 7, B LINE (X% + 24, Y% + 24)-(x1% - 24, y1% - 24), LineColor% + 6, B LINE (X% + 25, Y% + 25)-(x1% - 25, y1% - 25), LineColor% + 5, B END SUB DEFSNG A-Z SUB LoadImages RESTORE ArrowImage FOR R% = 0 TO 34 FOR C% = 0 TO 36 READ P% IF P% > 0 THEN PSET (C%, R%), P% NEXT: NEXT GET (0, 0)-(36, 34), PurpleArrow CLS LINE (0, 0)-(36, 34), 255, BF RESTORE ArrowImage FOR R% = 0 TO 34 FOR C% = 0 TO 36 READ P% IF P% <> 0 THEN PSET (C%, R%), 0 NEXT: NEXT GET (0, 0)-(36, 34), PurpleArrowMask CLS END SUB DEFINT A-Z SUB OFont (Text$, X, Y, Fore, Back) DEF SEG = &HFFA6 'Stores masks for letters FOR Letter = 1 TO LEN(Text$) 'Does each letter Address = (8 * ASC(MID$(Text$, Letter))) + 14 'Address for start of letter FOR Height = 0 TO 7 'Each letter is an 8x8 pixel matrix Mask = PEEK(Address + Height) * 128 'Address for mask of each line of letter LINE (X + Curntx + 1, Y + Height + 1)-(X + 9 + Curntx, Y + Height + 1), Fore, , Mask NEXT Curntx = Curntx + 8 'Advances X axis by 8 for next letter NEXT 'Continue to next letter DEF SEG = &HA000 'Change to video memory IF Back > 0 THEN 'Background color can't be color 0 FOR V = Y TO Y + 7 'Again, they're 8x8 pixels FOR H = X TO (LEN(Text$) * 8) - 1 + X 'Calculates length of text in pixels PK0& = PEEK(H + V * 320&) 'Is point at H,V = to foreground color? PK1& = PEEK(H + 1 + (V + 1) * 320&) 'Is point at H+1, V+1 = to foreground? PK2& = PEEK(H + 1 + V * 320&) 'Is point at H+1, V = to foreground? PT& = H + V * 320& 'Video memory pointer IF PK0& <> Fore THEN 'If this is foreground, don't overlap it IF PK1& = Fore OR PK2& = Fore THEN POKE PT&, Back 'Put pixel into memory END IF NEXT H 'Next horizontal NEXT V 'Next vertical END IF DEF SEG 'Put us back where END SUB SUB PalColors PALETTE 0, 0 PALETTE 1, 131586 PALETTE 2, 263172 PALETTE 3, 526344 PALETTE 4, 657930 PALETTE 5, 921102 PALETTE 6, 1052688 PALETTE 7, 1315860 PALETTE 8, 1447446 PALETTE 9, 1579032 PALETTE 10, 1710618 PALETTE 11, 1842204 PALETTE 12, 1973790 PALETTE 13, 2171169 PALETTE 14, 2302755 PALETTE 15, 2434341 PALETTE 16, 2565927 PALETTE 17, 2697513 PALETTE 18, 2829099 PALETTE 19, 2960685 PALETTE 20, 3092271 PALETTE 21, 3223857 PALETTE 22, 3355443 PALETTE 23, 3487029 PALETTE 24, 3750201 PALETTE 25, 4013373 PALETTE 26, 3091757 PALETTE 27, 2828585 PALETTE 28, 2960171 PALETTE 29, 2565413 PALETTE 30, 2696999 PALETTE 31, 1973276 PALETTE 32, 2170398 PALETTE 33, 1710104 PALETTE 34, 1578006 PALETTE 35, 3617589 PALETTE 36, 3091245 PALETTE 37, 2959659 PALETTE 38, 2564901 PALETTE 39, 2828073 PALETTE 40, 2301473 PALETTE 41, 1575442 PALETTE 42, 1970200 PALETTE 43, 917512 PALETTE 44, 3614513 PALETTE 45, 3219755 PALETTE 46, 2166810 PALETTE 47, 2691617 PALETTE 48, 1048586 PALETTE 49, 2162708 PALETTE 50, 1575956 PALETTE 51, 1181198 PALETTE 52, 3605029 PALETTE 53, 1835026 PALETTE 54, 2293782 PALETTE 55, 2687002 PALETTE 56, 3080222 PALETTE 57, 3473443 PALETTE 58, 4143421 PALETTE 59, 4140345 PALETTE 60, 2561057 PALETTE 61, 1312784 PALETTE 62, 4134963 PALETTE 63, 4133937 PALETTE 64, 4133425 PALETTE 65, 4131887 PALETTE 66, 918026 PALETTE 67, 4130349 PALETTE 68, 3998763 PALETTE 69, 786440 PALETTE 70, 1572880 PALETTE 71, 1966100 PALETTE 72, 2424856 PALETTE 73, 2818076 PALETTE 74, 2949150 PALETTE 75, 3342371 PALETTE 76, 3604517 PALETTE 77, 3735591 PALETTE 78, 4128811 PALETTE 79, 3220269 PALETTE 80, 2825255 PALETTE 81, 4138295 PALETTE 82, 2167324 PALETTE 83, 2823717 PALETTE 84, 4136501 PALETTE 85, 1707030 PALETTE 86, 4135989 PALETTE 87, 2428958 PALETTE 88, 1575444 PALETTE 89, 4134451 PALETTE 90, 4130863 PALETTE 91, 1049100 PALETTE 92, 3867691 PALETTE 93, 4129837 PALETTE 94, 1310734 PALETTE 95, 1703954 PALETTE 96, 2687004 PALETTE 97, 3080225 PALETTE 98, 3473445 PALETTE 99, 3604519 PALETTE 100, 3866665 PALETTE 101, 4141371 PALETTE 102, 4139321 PALETTE 103, 4137783 PALETTE 104, 1970202 PALETTE 105, 1838616 PALETTE 106, 1443858 PALETTE 107, 4133939 PALETTE 108, 4132401 PALETTE 109, 917514 PALETTE 110, 4011323 PALETTE 111, 3482929 PALETTE 112, 2561571 PALETTE 113, 4140347 PALETTE 114, 786954 PALETTE 115, 3749689 PALETTE 116, 2828587 PALETTE 117, 2960173 PALETTE 118, 3223345 PALETTE 119, 2433829 PALETTE 120, 2697001 PALETTE 121, 4143935 PALETTE 122, 1841692 PALETTE 123, 3354419 PALETTE 124, 1183762 PALETTE 125, 2169889 PALETTE 126, 1051664 PALETTE 127, 63 'blue 130-149 PALETTE 130, 0 PALETTE 131, 262144 PALETTE 132, 524288 PALETTE 133, 786432 PALETTE 134, 1048576 PALETTE 135, 1310720 PALETTE 136, 1572864 PALETTE 137, 1835008 PALETTE 138, 2097152 PALETTE 139, 2359296 PALETTE 140, 2621440 PALETTE 141, 2883584 PALETTE 142, 3145728 PALETTE 143, 3407872 PALETTE 144, 3670016 PALETTE 145, 3932160 PALETTE 146, 16159 PALETTE 147, 16144 PALETTE 148, 16128 PALETTE 149, 1064704 'red palettes 150-165 PALETTE 150, 0 PALETTE 151, 4 PALETTE 152, 8 PALETTE 153, 12 PALETTE 154, 16 PALETTE 155, 20 PALETTE 156, 24 PALETTE 157, 28 PALETTE 158, 32 PALETTE 159, 36 PALETTE 160, 40 PALETTE 161, 44 PALETTE 162, 48 PALETTE 163, 52 PALETTE 164, 56 PALETTE 165, 60 'green 181-196 PALETTE 181, 0 PALETTE 182, 4 * 256'4140342 PALETTE 183, 8 * 256'4140346 PALETTE 184, 12 * 256'4140351 PALETTE 185, 16 * 256'3812671 PALETTE 186, 20 * 256'3550527 PALETTE 187, 24 * 256'3222847 PALETTE 188, 28 * 256'2960703 PALETTE 189, 32 * 256'2961727 PALETTE 190, 36 * 256'2963007 PALETTE 191, 40 * 256'2964031 PALETTE 192, 44 * 256' 2965311 PALETTE 193, 48 * 256'2965306 PALETTE 194, 52 * 256'2965302 PALETTE 195, 56 * 256'2965297 PALETTE 196, 60 * 256'2965293# PALETTE 197, 3227437 PALETTE 198, 3555117 PALETTE 199, 3145728 'gold palettes 200-215 PALETTE 200, 0 PALETTE 201, 1028 PALETTE 202, 2056 PALETTE 203, 3084 PALETTE 204, 4112 PALETTE 205, 5140 PALETTE 206, 6168 PALETTE 207, 7196 PALETTE 208, 8224 PALETTE 209, 9252 PALETTE 210, 10280 PALETTE 211, 11308 PALETTE 212, 12336 PALETTE 213, 13364 PALETTE 214, 14392 PALETTE 215, 15420 PALETTE 216, 528392 PALETTE 217, 659464 PALETTE 218, 790536 PALETTE 219, 921608 PALETTE 220, 1052680 PALETTE 221, 1052168 PALETTE 222, 1051656 PALETTE 223, 1051144 PALETTE 224, 1051403 PALETTE 225, 1051404 PALETTE 226, 1051405 PALETTE 227, 1051407 PALETTE 228, 1051408 PALETTE 229, 985872 PALETTE 230, 854800 PALETTE 231, 789264 PALETTE 232, 723728 PALETTE 233, 723984 PALETTE 234, 724240 PALETTE 235, 724752 PALETTE 236, 725008 PALETTE 237, 725007 PALETTE 238, 725005 PALETTE 239, 725004 PALETTE 240, 725003 PALETTE 241, 790539 PALETTE 242, 856075 PALETTE 243, 987147 PALETTE 244, 1052683 PALETTE 245, 1052427 PALETTE 246, 1051915 PALETTE 247, 1051659 PALETTE 248, 0 PALETTE 249, 0 PALETTE 250, 0 PALETTE 251, 0 PALETTE 252, 0 PALETTE 253, 0 PALETTE 254, 0 PALETTE 254, 3158064 PALETTE 255, 4144959 END SUB DEFSNG A-Z SUB ProcessSelection Selection: 'Checks where the cursor is if the 'enter key has been pressed. SELECT CASE Area CASE 1 GET (80, 40)-(240, 150), SaveScreen DialogBox 80, 40, 160, 110 DrawWindow 140, 105, 175, 135, 255, 7, 18 OFont "FIRST ROW", 125, 55, 255, 114 OFont "YOU SELECTED", 110, 80, 255, 114 OFont "PLAY GAME", 125, 90, 255, 114 OFont "OK", 148, 117, White, Black DO LOOP UNTIL INKEY$ <> "" PUT (80, 40), SaveScreen, PSET ERASE SaveScreen EXIT SUB CASE 2 GET (80, 40)-(240, 150), SaveScreen DialogBox 80, 40, 160, 110 DrawWindow 140, 105, 175, 135, 255, 7, 18 OFont "SECOND ROW", 125, 55, 255, 114 OFont "YOU SELECTED", 110, 80, 127, 114 OFont "READ RULES", 120, 90, 127, 114 OFont "OK", 148, 117, White, Black DO LOOP UNTIL INKEY$ <> "" PUT (80, 40), SaveScreen, PSET ERASE SaveScreen EXIT SUB CASE 3 GET (80, 40)-(240, 150), SaveScreen DialogBox 80, 40, 160, 110 DrawWindow 140, 105, 175, 135, 255, 7, 18 OFont "THIRD ROW", 125, 55, 255, 114 OFont "YOU SELECTED", 110, 80, 127, 114 OFont "END PROGRAM", 120, 90, 127, 114 OFont "OK", 148, 117, White, Black DO LOOP UNTIL INKEY$ <> "" PUT (80, 40), SaveScreen, PSET ERASE SaveScreen END END SELECT END SUB