Author Topic: 'Written In Stone' - Word Puzzle Game by Dav  (Read 7626 times)

0 Members and 1 Guest are viewing this topic.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
'Written In Stone' - Word Puzzle Game by Dav
« on: April 01, 2020, 06:37:57 am »
'Written In Stone'

Author: @Dav
Source: qb64.org Forum
URL: https://www.qb64.org/forum/index.php?topic=2434.msg116494#msg116494
Version: 1.1
Tags: [Graphics], [Puzzle]

Description:
It's a word puzzle game.  There are 50 well known quotes, scrambled up.  Using the mouse you arrange the letters to make the quote.  Only letters over and under each other can be swapped (same column), not side by side.

Source Code (given for reference only - you will need to download the .zip file):
Code: QB64: [Select]
  1. '================
  2. 'WRITTEN IN STONE v1.1 by Dav for QB64-GL v1.4
  3. '================
  4.  
  5. 'A Word puzzle game by Dav (My 1st ever game in QB64)
  6. 'First version coded FEB 1st-13th, 2013 for QB64-SDL.
  7. 'Updated code MAR 31st, 2020 to work in QB64-GL v1.4.
  8.  
  9. 'There are 50 well know quotes, all scrambled up.
  10. 'Using mouse, unscramble the letters to make quote.
  11. 'You can only swap letters in the same column.
  12.  
  13. '======================================================
  14. 'NOTE:  THIS PROGRAM REQUIRES THE "winstone-data"folder
  15. '       AND ALL OF ITS DATA FILES!
  16. '======================================================
  17.  
  18. DEFINT A-Z
  19.  
  20. DECLARE SUB Credits ()
  21. DECLARE SUB DrawRows ()
  22. DECLARE SUB HelpScreen (imagehandle&)
  23. DECLARE SUB ConfigScreen (imagehandle&)
  24. DECLARE SUB GetQuote (quote)
  25. DECLARE SUB SelectLetter ()
  26. DECLARE SUB SelectQuote ()
  27. DECLARE SUB SelectNumber (number$, x, y, image&)
  28. DECLARE SUB ButtonShow (ButtonType%, ButtonFile$, x, y)
  29. DECLARE SUB StoneRoll (way$, image&, speed!)
  30. DECLARE SUB ScrollScreenUp (image&, speed!)
  31. DECLARE SUB ScrollScreenDown (image&, speed!)
  32. DECLARE SUB ScreenCurtain (way$, left&, right&, speed!)
  33. DECLARE SUB ScreenShake (image&, val1, val2, speed!)
  34.  
  35.  
  36. '=== Shared data SUBs/FUNCs use...
  37. DIM SHARED quote, maxquote, row1$, row2$, row3$
  38. DIM SHARED OrigRow1$, OrigRow2$, OrigRow3$
  39. DIM SHARED selected, selectedcol%, selectedrow%, col%, row%, sel$, sel2$
  40. DIM SHARED source$, config$, unsolved, music&, musicflag, sfxflag, timerflag
  41. DIM SHARED back&
  42.  
  43. source$ = "winstone-data\" '<<<<<<---- Location of Data files! <<<<<<<
  44.  
  45.  
  46. 'Set screen, fullscreen
  47.  
  48. 'Give it a title....
  49. DO: LOOP UNTIL _SCREENEXISTS: _TITLE "Written In Stone v1.1"
  50.  
  51. LOCATE 24, 54: PRINT "Loading Data..."
  52.  
  53. '==================================================================================
  54. '  LOAD WINSTONE.DAT CONFIG FILE - HOLDS SOUND SETTINGS AND QUOTE INFO
  55. '==================================================================================
  56. 'The config file is simple. It's 53 bytes, holding settings for 50 quotes and
  57. '3 for game settings, music, sfx, timer.  CHR$(1) for TRUE, CHR$(0) for false.
  58. 'Byte #1 of CHR$(0) means quote #1 isn't solved.  CHR$(1) means it is, and so on...
  59.  
  60. '== these are failsafes in case on config problem
  61.  
  62. musicflag = 1
  63. sfxflag = 1
  64. timerflag = 1
  65.  
  66. '== max # of quotes (don't change this...)
  67. maxquote = 50
  68.  
  69. unsolved = 0 'How many quotes are solved
  70.  
  71.  
  72. OPEN "winstone.dat" FOR BINARY AS #1
  73.  
  74.  
  75. '=== IF NO CONFIG FILE, MAKE ONE
  76.  
  77. IF LOF(1) = 0 THEN
  78.     '=== file not there so make a new dat file
  79.     '=== mark all quotes unsolved
  80.     config$ = ""
  81.     FOR i = 1 TO maxquote
  82.         v$ = CHR$(0)
  83.         config$ = config$ + v$ 'all unsolved for now
  84.         PUT #1, i, v$
  85.         unsolved = unsolved + 1
  86.     NEXT
  87.     V2$ = CHR$(1)
  88.     PUT #1, 51, V2$: config$ = config$ + CHR$(1)
  89.     PUT #1, 52, V2$: config$ = config$ + CHR$(1)
  90.     PUT #1, 53, V2$: config$ = config$ + CHR$(1)
  91.  
  92.     GOTO loadedconfig
  93.  
  94. '=== see if file is large enough to read settings
  95. '=== if not then make a new file
  96. IF LOF(1) > 0 AND LOF(1) < 53 THEN '(50 quotes & 3 game settings)
  97.     '=== file must be currupt, so close file, kill it, make new one.
  98.     CLOSE 1: KILL "winstone.dat": OPEN "winstone.dat" FOR BINARY AS #1
  99.     config$ = ""
  100.     FOR i = 1 TO maxquote
  101.         v$ = CHR$(0)
  102.         config$ = config$ + v$ 'all unsolved for now
  103.         PUT #1, i, v$
  104.         unsolved = unsolved + 1
  105.     NEXT
  106.     '=== add music, sfx & timer settings (all 1 by default)
  107.     V2$ = CHR$(1)
  108.     PUT #1, 51, V2$: config$ = config$ + CHR$(1)
  109.     PUT #1, 52, V2$: config$ = config$ + CHR$(1)
  110.     PUT #1, 53, V2$: config$ = config$ + CHR$(1)
  111.     GOTO loadedconfig
  112.  
  113. '==== file must be there and large enough so load data.
  114. config$ = ""
  115. FOR i = 1 TO maxquote
  116.     a$ = INPUT$(1, 1)
  117.     config$ = config$ + a$
  118.     IF a$ = CHR$(0) THEN unsolved = unsolved + 1
  119.  
  120. '=== get game settings now
  121. IF INPUT$(1, 1) = CHR$(0) THEN
  122.     musicflag = 0: config$ = config$ + CHR$(0)
  123.     musicflag = 1: config$ = config$ + CHR$(1)
  124. IF INPUT$(1, 1) = CHR$(0) THEN
  125.     sfxflag = 0: config$ = config$ + CHR$(0)
  126.     sfxflag = 1: config$ = config$ + CHR$(1)
  127. IF INPUT$(1, 1) = CHR$(0) THEN
  128.     timerflag = 0: config$ = config$ + CHR$(1)
  129.     timerflag = 1: config$ = config$ + CHR$(1) '<<, TIMER ALWAYS 1 for now
  130.  
  131. loadedconfig:
  132.  
  133.  
  134. '=== CHEATER COMMAND LINE OPTION. MARKS ALL SOLVED
  135. IF UCASE$(COMMAND$) = "/SOLVE" THEN
  136.     FOR i = 1 TO maxquote
  137.         MID$(config$, i, 1) = CHR$(1)
  138.     NEXT
  139.     unsolved = 0
  140.  
  141.  
  142. '===================================================================================================
  143. '
  144. '===================================================================================================
  145.  
  146.  
  147. '==== Go ahead and Start music if musicflag on
  148.  
  149. music& = _SNDOPEN(source$ + "sfx\sfx_music.ogg", "VOL,SYNC,LEN,PAUSE")
  150. IF musicflag = 1 THEN _SNDLOOP music&
  151.  
  152.  
  153. '===================================================================================================
  154. '                                   OPEN SHARED IMAGE FILES
  155. '===================================================================================================
  156.  
  157.  
  158. '=== load title page
  159.  
  160. back& = _LOADIMAGE(source$ + "img\paper-title.jpg", 32)
  161.  
  162.  
  163. '===== load select menu fly in vid frames.
  164.  
  165. DIM SHARED selectframe(0 TO 15) AS LONG
  166. FOR t = 0 TO 15
  167.     a$ = LTRIM$(STR$(t))
  168.     IF LEN(a$) = 2 THEN a$ = "00" + a$
  169.     IF LEN(a$) = 1 THEN a$ = "000" + a$
  170.     selectframe(t) = _LOADIMAGE(source$ + "vid\sel" + a$ + ".jpg")
  171.  
  172.  
  173. '===================================================================================================
  174. '===================================================================================================
  175.  
  176. _DELAY 1 'let screen res change play catch up if needed
  177.  
  178.  
  179. '=========== drop down screen
  180.  
  181. IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_dropdown.mp3"
  182. ScrollScreenDown back&, 60
  183.  
  184. IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_boom.mp3"
  185. ScreenShake back&, 5, 4, 75
  186.  
  187.  
  188. '=== Load images for Timer bar (3 colors)
  189.  
  190. timegrn& = _LOADIMAGE(source$ + "img\time_grn2.jpg", 32)
  191. timeyel& = _LOADIMAGE(source$ + "img\time_yel2.jpg", 32)
  192. timered& = _LOADIMAGE(source$ + "img\time_red2.jpg", 32)
  193.  
  194.  
  195. '=========
  196. titlemenu:
  197. '=========
  198.  
  199.  
  200. '=== Pop in Main Menu on screen
  201. IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_pop1.mp3" '<< POP sound
  202. menutop& = _LOADIMAGE(source$ + "img\menu_top2.jpg", 32) '<< Get it,
  203. _PUTIMAGE (238, 152), menutop&, 0 '<< Set it...
  204. _FREEIMAGE menutop& '<< ... and forget it.
  205.  
  206. 'draw bitton as normal first
  207. ButtonShow "startbtn.jpg", 565, 335
  208. ButtonShow "quitbtn.jpg", 565, 283
  209. ButtonShow "help.jpg", 565, 177
  210. ButtonShow "config.jpg", 565, 229
  211.  
  212. '=== get menu choice
  213.  
  214.  
  215.         mx = _MOUSEX: my = _MOUSEY
  216.         LeftDown = _MOUSEBUTTON(1)
  217.  
  218.         '=== highlight buttons if mouse over it
  219.  
  220.         IF mx > 565 AND mx < 721 AND my > 335 AND my < 375 THEN
  221.             ButtonShow "_startbtn.jpg", 565, 335: but1 = 1
  222.         ELSE
  223.             IF but1 = 1 THEN
  224.                 ButtonShow "startbtn.jpg", 565, 335
  225.                 but1 = 0
  226.             END IF
  227.         END IF
  228.         IF mx > 565 AND mx < 721 AND my > 283 AND my < 323 THEN
  229.             ButtonShow "_quitbtn.jpg", 565, 283: but2 = 1
  230.         ELSE
  231.             IF but2 = 1 THEN
  232.                 ButtonShow "quitbtn.jpg", 565, 283
  233.                 but2 = 0
  234.             END IF
  235.         END IF
  236.         IF mx > 565 AND mx < 721 AND my > 177 AND my < 217 THEN
  237.             ButtonShow "_help.jpg", 565, 177: but3 = 1
  238.         ELSE
  239.             IF but3 = 1 THEN
  240.                 ButtonShow "help.jpg", 565, 177
  241.                 but3 = 0
  242.             END IF
  243.         END IF
  244.         IF mx > 565 AND mx < 721 AND my > 229 AND my < 269 THEN
  245.             ButtonShow "_config.jpg", 565, 229: but4 = 1
  246.         ELSE
  247.             IF but4 = 1 THEN
  248.                 ButtonShow "config.jpg", 565, 229
  249.                 but4 = 0
  250.             END IF
  251.         END IF
  252.  
  253.     LOOP
  254.  
  255.     IF LeftDown THEN
  256.  
  257.         '=== if start button clicked
  258.         IF mx > 565 AND mx < 721 AND my > 335 AND my < 375 THEN
  259.             ButtonClick 1, "startbtn.jpg", 565, 335
  260.             EXIT DO
  261.         END IF
  262.         IF mx > 565 AND mx < 721 AND my > 283 AND my < 323 THEN
  263.             ButtonClick 1, "quitbtn.jpg", 565, 283
  264.             _PUTIMAGE (0, 0), back&, 0
  265.             GOTO Quit
  266.         END IF
  267.         IF mx > 565 AND mx < 721 AND my > 177 AND my < 217 THEN
  268.  
  269.             ButtonClick 1, "help.jpg", 565, 177
  270.  
  271.             _PUTIMAGE (0, 0), back&, 0
  272.             _DELAY .25
  273.             HelpScreen (back&)
  274.             _DELAY .25
  275.  
  276.             GOTO titlemenu
  277.  
  278.         END IF
  279.         IF mx > 565 AND mx < 721 AND my > 229 AND my < 269 THEN
  280.             ButtonClick 1, "config.jpg", 565, 229
  281.             _PUTIMAGE (0, 0), back&, 0
  282.             _DELAY .25
  283.             ConfigScreen (back&)
  284.             _DELAY .25
  285.  
  286.             GOTO titlemenu
  287.  
  288.         END IF
  289.     END IF
  290.  
  291.     IF INKEY$ = CHR$(27) THEN GOTO Quit
  292.  
  293.  
  294. _PUTIMAGE (0, 0), back&, 0
  295. _DELAY .25
  296.  
  297. ScrollScreenUp back&, 75
  298.  
  299.  
  300.  
  301. '=======================================================================================
  302. '                                   START GAME
  303. '=======================================================================================
  304.  
  305. quote = 1 'just a safety...
  306.  
  307.  
  308. SelectQuote
  309. GetQuote (quote)
  310.  
  311. '========
  312. NewBoard:
  313. '========
  314.  
  315.  
  316. '=== scroll down playing board
  317.  
  318. back& = _LOADIMAGE(source$ + "img\board6.jpg", 32)
  319.  
  320. ScrollScreenDown back&, 60
  321.  
  322. DrawRows
  323.  
  324.  
  325.  
  326.  
  327. '========================================================================================
  328. '                               MAIN GAME LOOP
  329. '========================================================================================
  330.  
  331. Mainloop:
  332.  
  333. starttime! = TIMER
  334. poppy = 0 'flag to not show more than one popup message in a second
  335. rumbleon = 0 'flag for rumble happening
  336.  
  337. LOCATE 17, 90: PRINT "Quote:"; quote; "("; LTRIM$(STR$(unsolved)); " to solve)";
  338.  
  339.  
  340.     '=== Catch mouse
  341.         mx = _MOUSEX: my = _MOUSEY
  342.         '=== break up screen in 35x35 grid
  343.         col% = INT(mx / 35) - 2: row% = INT(my / 35) - 2
  344.         LeftDown = _MOUSEBUTTON(1)
  345.     LOOP
  346.  
  347.     IF LeftDown = -1 THEN
  348.         '=== clicked quote button here...
  349.         IF mx > 402 AND mx < 558 AND my > 302 AND my < 342 THEN
  350.  
  351.             '=== turn off rumble if it was on
  352.             IF rumbleon = 1 THEN
  353.                 IF sfxflag = 1 THEN
  354.                     IF _SNDPLAYING(rumble&) THEN _SNDSTOP rumble&: _SNDSTOP rumble&
  355.                 END IF
  356.             END IF
  357.  
  358.             ButtonClick 0, "quote.jpg", 403, 302
  359.             ScrollScreenUp 0, 60 'scroll up current screen
  360.  
  361.             SelectQuote
  362.             GetQuote (quote)
  363.  
  364.             GOTO NewBoard
  365.  
  366.         END IF
  367.  
  368.         'Clicked HINT button
  369.         IF mx > 580 AND mx < 736 AND my > 302 AND my < 342 THEN
  370.             ButtonClick 0, "hint.jpg", 580, 302
  371.             'Find first hint letter here, and select it for user.
  372.             'hint letter is first letter in row that doesn't line up with origrow
  373.             'Look in 1st row first
  374.             found = 0
  375.             FOR tt = 1 TO LEN(row1$) 'check row1 data
  376.                 H1$ = UCASE$(MID$(row1$, tt, 1)) 'get letter in row1
  377.                 H2$ = UCASE$(MID$(OrigRow1$, tt, 1)) 'compare with original spot
  378.                 'If row1$ part needs moved, then mark this
  379.                 IF H1$ <> H2$ THEN
  380.                     hintcol% = tt: hintrow% = 1: found = 1: EXIT FOR
  381.                 END IF
  382.             NEXT
  383.             IF found = 0 THEN
  384.                 FOR tt = 1 TO LEN(row2$) 'check row1 data
  385.                     H1$ = UCASE$(MID$(row2$, tt, 1)) 'get letter in row1
  386.                     H2$ = UCASE$(MID$(OrigRow2$, tt, 1)) 'compare with original spot
  387.                     'If row2$ part needs moved, then mark this
  388.                     IF H1$ <> H2$ THEN
  389.                         hintcol% = tt: hintrow% = 2: found = 1: EXIT FOR
  390.                     END IF
  391.                 NEXT
  392.             END IF
  393.             IF found = 0 THEN
  394.                 FOR tt = 1 TO LEN(row3$) 'check row1 data
  395.                     H1$ = UCASE$(MID$(row3$, tt, 1)) 'get letter in row1
  396.                     H2$ = UCASE$(MID$(OrigRow3$, tt, 1)) 'compare with original spot
  397.                     'If row3$ part needs moved, then mark this
  398.                     IF H1$ <> H2$ THEN
  399.                         hintcol% = tt: hintrow% = 3: found = 1: EXIT FOR
  400.                     END IF
  401.                 NEXT
  402.  
  403.             END IF
  404.  
  405.  
  406.             IF found = 1 THEN
  407.                 'flash hint letter
  408.                 FOR fl = 1 TO 3
  409.                     letter& = _LOADIMAGE(source$ + "fnt2\_" + H1$ + ".jpg", 32)
  410.                     _PUTIMAGE (70 + (hintcol% * 35), 70 + (hintrow% * 35)), letter&
  411.                     _FREEIMAGE letter&
  412.  
  413.                     _DELAY .15
  414.  
  415.                     letter& = _LOADIMAGE(source$ + "fnt2\" + H1$ + ".jpg", 32)
  416.                     _PUTIMAGE (70 + (hintcol% * 35), 70 + (hintrow% * 35)), letter&
  417.                     _FREEIMAGE letter&
  418.  
  419.                     _DELAY .15
  420.                 NEXT
  421.             END IF
  422.  
  423.  
  424.         END IF
  425.  
  426.  
  427.         '=== clicked title menu button here...
  428.         IF mx > 759 AND mx < 915 AND my > 302 AND my < 342 THEN
  429.  
  430.             ESCBail:
  431.  
  432.             '=== turn off rumble if it was on
  433.             IF rumbleon = 1 THEN
  434.                 IF sfxflag = 1 THEN _SNDSTOP rumble&
  435.             END IF
  436.  
  437.             ButtonClick 0, "title.jpg", 759, 302
  438.  
  439.             ScrollScreenUp 0, 75 'scroll up current screen
  440.  
  441.             _FREEIMAGE back& 'release board as back&
  442.  
  443.             '=== reload title as back&  '<<<<<<<<<<<<<< NEED TO CHANGE THIS STUPID WAY
  444.             back& = _LOADIMAGE(source$ + "img\paper-title.jpg", 32)
  445.  
  446.             '=== load slide in sides (left right)
  447.             left& = _LOADIMAGE(source$ + "\img\paper-title-left.jpg")
  448.             right& = _LOADIMAGE(source$ + "\img\paper-title-right.jpg")
  449.  
  450.             ScreenCurtain "CLOSE", left&, right&, 120
  451.  
  452.             _FREEIMAGE left&
  453.             _FREEIMAGE right&
  454.  
  455.             _PUTIMAGE , back&, 0
  456.             _DELAY .25
  457.  
  458.             GOTO titlemenu
  459.  
  460.         END IF
  461.  
  462.  
  463.         '===If inbound col & row fields clicked
  464.         IF col% <= 23 AND col% > 0 AND row% <= 3 AND row% > 0 THEN
  465.  
  466.             IF selected = 0 THEN
  467.                 '=== If no letter selected yet, then...
  468.                 '=== Get 1st selected letter on current row
  469.                 SelectLetter
  470.             ELSE
  471.                 '=== must already but one selected, so...
  472.                 '=== get another selected letter (only on same Col%)
  473.                 '=== then do the swap in rows$, then redraw new placements.
  474.  
  475.                 '=== if same column (but not same row)...ok
  476.                 IF col% = selectedcol% AND row% <> selectedrow% THEN
  477.                     '=== get 2nd selected letter
  478.                     SELECT CASE row%
  479.                         CASE 1: sel2$ = MID$(row1$, col%, 1)
  480.                         CASE 2: sel2$ = MID$(row2$, col%, 1)
  481.                         CASE 3: sel2$ = MID$(row3$, col%, 1)
  482.                     END SELECT
  483.                     '=== only select if not a space or empty place
  484.                     IF sel2$ <> " " AND sel2$ <> "" THEN
  485.  
  486.                         '=== load 2st selected letter (highlighted one)
  487.                         letter& = _LOADIMAGE(source$ + "fnt2\_" + sel2$ + ".jpg", 32)
  488.                         _PUTIMAGE (70 + (col% * 35), 70 + (row% * 35)), letter&
  489.                         _FREEIMAGE letter&
  490.  
  491.                         IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_click2.mp3"
  492.                         '=== SWAP LETTER DISPLAY HERE
  493.                         FOR o = 1 TO 2
  494.  
  495.                             'load 2nd letter normal
  496.                             letter& = _LOADIMAGE(source$ + "fnt2\" + sel2$ + ".jpg", 32)
  497.                             _PUTIMAGE (70 + (col% * 35), 70 + (row% * 35)), letter&
  498.                             _FREEIMAGE letter&
  499.  
  500.                             'load first letter normal
  501.                             letter& = _LOADIMAGE(source$ + "fnt2\" + sel$ + ".jpg", 32)
  502.                             _PUTIMAGE (70 + (col% * 35), 70 + (selectedrow% * 35)), letter&
  503.                             _FREEIMAGE letter&
  504.  
  505.                             _DELAY .05
  506.  
  507.                             'load 2nd letter highlighted
  508.                             letter& = _LOADIMAGE(source$ + "fnt2\_" + sel2$ + ".jpg", 32)
  509.                             _PUTIMAGE (70 + (col% * 35), 70 + (row% * 35)), letter&
  510.                             _FREEIMAGE letter&
  511.  
  512.                             'load first letter highlighted
  513.                             letter& = _LOADIMAGE(source$ + "fnt2\_" + sel$ + ".jpg", 32)
  514.                             _PUTIMAGE (70 + (col% * 35), 70 + (selectedrow% * 35)), letter&
  515.                             _FREEIMAGE letter&
  516.  
  517.                             '_DELAY .02
  518.  
  519.                         NEXT
  520.  
  521.                         _DELAY .2
  522.  
  523.                         '=== SWAP LETTERS INTERNALLY HERE
  524.                         'replace current row letter with 1st sel$ letter
  525.                         SELECT CASE row%
  526.                             CASE 1: MID$(row1$, col%, 1) = sel$
  527.                             CASE 2: MID$(row2$, col%, 1) = sel$
  528.                             CASE 3: MID$(row3$, col%, 1) = sel$
  529.                         END SELECT
  530.                         'replace 1st select row with curr row letter
  531.                         SELECT CASE selectedrow%
  532.                             CASE 1: MID$(row1$, col%, 1) = sel2$
  533.                             CASE 2: MID$(row2$, col%, 1) = sel2$
  534.                             CASE 3: MID$(row3$, col%, 1) = sel2$
  535.                         END SELECT
  536.  
  537.                         '=== DONE! Redraw rows'''
  538.                         selected = 0
  539.                         DrawRows
  540.  
  541.                     END IF
  542.                 ELSE
  543.                     '=== must be a new column, so
  544.                     '=== un select letters, select this new one...
  545.                     DrawRows '=== fresh look
  546.                     SelectLetter
  547.                 END IF
  548.  
  549.  
  550.             END IF
  551.  
  552.         END IF
  553.  
  554.         '==== If rows match original, YOU GOT IT!!!!
  555.         IF row1$ = OrigRow1$ AND row2$ = OrigRow2$ AND row3$ = OrigRow3$ THEN
  556.  
  557.             '=== turn off rumble if it was on
  558.             IF rumbleon = 1 THEN
  559.                 IF sfxflag = 1 THEN
  560.                     IF _SNDPLAYING(rumble&) THEN _SNDSTOP rumble&: _SNDSTOP rumble&
  561.                 END IF
  562.             END IF
  563.  
  564.             IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_clap.ogg"
  565.  
  566.             '=== Popup a good message
  567.             rndpop$ = LTRIM$(STR$(FIX((RND * 16) + 1))) 'get 1 of 16
  568.             pop& = _LOADIMAGE(source$ + "img\pop-z-" + rndpop$ + ".jpg", 32)
  569.             _PUTIMAGE (0, 450), pop&, 0: _FREEIMAGE pop&
  570.  
  571.  
  572.             '==== flash letters here...
  573.             FlashRows
  574.             _DELAY 1
  575.  
  576.  
  577.             '=== Mark quote # as solved in config$ data
  578.             MID$(config$, quote, 1) = CHR$(1)
  579.             IF unsolved > 0 THEN
  580.                 unsolved = unsolved - 1 'decrease one from unsolved count
  581.             END IF
  582.  
  583.             ScrollScreenUp 0, 60
  584.  
  585.             '=== IF ALL QUOTES SOLVED - WIN - SHOW CREDITS!!!
  586.             IF unsolved = 0 THEN
  587.                 Credits
  588.                 _AUTODISPLAY
  589.                 back& = _LOADIMAGE(source$ + "img\paper-title.jpg", 32)
  590.                 GOTO Quit
  591.             END IF
  592.  
  593.             '=== if already solved next quote, go to select quote
  594.             quote = quote + 1
  595.             IF MID$(config$, quote, 1) = CHR$(1) THEN SelectQuote
  596.  
  597.  
  598.             '=== if at last quote, then go to select menu
  599.             IF quote > maxquote THEN
  600.                 SelectQuote
  601.             END IF
  602.  
  603.             '==== next quote , scroll down board again..
  604.  
  605.             back& = _LOADIMAGE(source$ + "img\board6.jpg", 32)
  606.             ScrollScreenDown back&, 60
  607.  
  608.             GetQuote quote
  609.             DrawRows
  610.  
  611.             GOTO Mainloop
  612.  
  613.         END IF
  614.  
  615.  
  616.     END IF
  617.  
  618.  
  619.     '=== update timer stuff here...
  620.     L = INT(TIMER - starttime!) + 1
  621.  
  622.  
  623.     'New way to draw timer because hint delay made it skip a draw sometimes
  624.     FOR V = 0 TO L
  625.         IF V > 0 AND V <= 34 THEN _PUTIMAGE (88 + (V * 10), 253), timegrn&
  626.         IF V > 34 AND V <= 49 THEN _PUTIMAGE (88 + (V * 10), 253), timeyel&
  627.         IF V > 49 THEN _PUTIMAGE (88 + (V * 10), 253), timered&
  628.     NEXT
  629.  
  630.     '============ GET A POPUP here ==========================
  631.     rndpop$ = LTRIM$(STR$(FIX((RND * 6) + 1)))
  632.     '========================================================
  633.     '=== open pop....
  634.     IF L = 2 AND poppy <> L THEN '<<<<<<<< poppy
  635.         pop& = _LOADIMAGE(source$ + "img\pop-a-" + rndpop$ + ".jpg", 32)
  636.         _PUTIMAGE (0, 450), pop&, 0: _FREEIMAGE pop&
  637.         poppy = L '<<<<<<<< poppy
  638.     END IF
  639.     IF L = 10 AND poppy <> L THEN
  640.         pop& = _LOADIMAGE(source$ + "img\pop-b-" + rndpop$ + ".jpg", 32)
  641.         _PUTIMAGE (0, 450), pop&, 0: _FREEIMAGE pop&
  642.         poppy = L '<<<<<<<< poppy
  643.     END IF
  644.     IF L = 18 AND poppy <> L THEN
  645.         pop& = _LOADIMAGE(source$ + "img\pop-c-" + rndpop$ + ".jpg", 32)
  646.         _PUTIMAGE (0, 450), pop&, 0: _FREEIMAGE pop&
  647.         poppy = L '<<<<<<<< poppy
  648.     END IF
  649.     IF L = 26 AND poppy <> L THEN
  650.         pop& = _LOADIMAGE(source$ + "img\pop-d-" + rndpop$ + ".jpg", 32)
  651.         _PUTIMAGE (0, 450), pop&, 0: _FREEIMAGE pop&
  652.         poppy = L '<<<<<<<< poppy
  653.     END IF
  654.     '==== yellow....
  655.     IF L = 34 AND poppy <> L THEN
  656.         pop& = _LOADIMAGE(source$ + "img\pop-e-" + rndpop$ + ".jpg", 32)
  657.         _PUTIMAGE (0, 450), pop&, 0: _FREEIMAGE pop&
  658.         poppy = L '<<<<<<<< poppy
  659.     END IF
  660.     IF L = 41 AND poppy <> L THEN
  661.         pop& = _LOADIMAGE(source$ + "img\pop-f-" + rndpop$ + ".jpg", 32)
  662.         _PUTIMAGE (0, 450), pop&, 0: _FREEIMAGE pop&
  663.         poppy = L '<<<<<<<< poppy
  664.     END IF
  665.     '=== red.....
  666.     IF L = 49 AND poppy <> L THEN
  667.         pop& = _LOADIMAGE(source$ + "img\pop-g-" + rndpop$ + ".jpg", 32)
  668.         _PUTIMAGE (0, 450), pop&, 0: _FREEIMAGE pop&
  669.         poppy = L '<<<<<<<< poppy
  670.     END IF
  671.     IF L = 54 AND poppy <> L THEN
  672.         pop& = _LOADIMAGE(source$ + "img\pop-h-" + rndpop$ + ".jpg", 32)
  673.         _PUTIMAGE (0, 450), pop&, 0: _FREEIMAGE pop&
  674.         poppy = L '<<<<<<<< poppy
  675.     END IF
  676.  
  677.     '=== Start rumble is time near end (dooom coming...)
  678.     IF L > 54 AND rumbleon = 0 THEN '<<<< was 114
  679.         rumble& = _SNDOPEN(source$ + "sfx\sfx_rumble2.ogg", "VOL,SYNC,LEN,PAUSE")
  680.         IF sfxflag = 1 THEN _SNDLOOP rumble&
  681.         rumbleon = 1 'tag as rumble is playing
  682.     END IF
  683.  
  684.     'start shaking screen if > 56 or maybe if rumble on
  685.     IF L > 56 THEN
  686.         '=== grab current background, shake it
  687.         _DISPLAY
  688.         'curr& = _SCREENIMAGE
  689.         curr& = _COPYIMAGE(_DISPLAY)
  690.         _AUTODISPLAY
  691.         _PUTIMAGE (RND * 3, RND * 3)-(1023, 767), curr&, 0: _DISPLAY
  692.         _PUTIMAGE , curr&, 0: _DISPLAY
  693.     END IF
  694.  
  695.     '========================================================
  696.  
  697.     IF L = 60 THEN '<<<< 60 seconds and timer is up
  698.  
  699.         '=========== Play drop down sound
  700.         IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_dropdown.mp3"
  701.  
  702.         '=== drop down screen
  703.         timesup& = _LOADIMAGE(source$ + "img\paper-timeup.jpg", 32)
  704.         ScrollScreenDown timesup&, 75
  705.  
  706.         _SNDSTOP rumble&
  707.         _SNDCLOSE rumble&
  708.  
  709.         '=== shake (BOOM)
  710.  
  711.         IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_boom.mp3"
  712.         ScreenShake timesup&, 5, 4, 60
  713.  
  714.         _DELAY 1.5
  715.  
  716.         _FREEIMAGE timesup&
  717.  
  718.         IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_roll.ogg"
  719.  
  720.         StoneRoll "RIGHT", 0, 25
  721.  
  722.         '=== do retry quote here, or main menu....
  723.  
  724.         SelectQuote
  725.         GetQuote quote
  726.  
  727.         'Place board back
  728.         back& = _LOADIMAGE(source$ + "img\board6.jpg", 32)
  729.         ScrollScreenDown back&, 60
  730.  
  731.         DrawRows
  732.  
  733.         GOTO Mainloop
  734.  
  735.     END IF
  736.  
  737.     IF INKEY$ = CHR$(27) THEN GOTO ESCBail
  738.  
  739.  
  740. Quit:
  741.  
  742. '=================================================================
  743. ' CLOSE ALL OPENED IMAGE & SOUND FILES, SAVE CONFIG DATA
  744. '=================================================================
  745.  
  746. 'free all select frame video image handles first...
  747. FOR t = 0 TO 14
  748.     _FREEIMAGE selectframe(t)
  749.  
  750. IF musicflag = 1 THEN
  751.     _SNDSTOP music&
  752.     _SNDCLOSE music&
  753.  
  754. IF sfxflag = 1 THEN
  755.     roll& = _SNDOPEN(source$ + "sfx\sfx_crumble.ogg", "VOL,SYNC,LEN,PAUSE")
  756.     _SNDPLAY roll&
  757.  
  758. 'Shake the screen a little
  759. '=== shake (BOOM)
  760. ScreenShake back&, 6, 4, 60
  761.  
  762. IF sfxflag = 1 THEN
  763.     _SNDSTOP roll&: _SNDCLOSE roll&
  764.     _SNDPLAYFILE source$ + "sfx\sfx_slideup.ogg"
  765.  
  766. ScrollScreenUp back&, 60
  767.  
  768. '===== Save config data
  769.  
  770. OPEN "winstone.dat" FOR OUTPUT AS #1
  771. SEEK #1, 1
  772. PRINT #1, config$;
  773.  
  774.  
  775. '=========================
  776.  
  777. _FREEIMAGE timegrn&
  778. _FREEIMAGE timeyel&
  779. _FREEIMAGE timered&
  780.  
  781.  
  782.  
  783. '=================================================================================================================
  784. ' * * * * * * * * * * *  SUBS/FUNCTIONS & OTHER NOTES  * * * * * * * * * * * *
  785. '=================================================================================================================
  786.  
  787.  
  788.  
  789. '=================================================================================================================
  790.  
  791. SUB DrawRows ()
  792.  
  793.     '== Draws the row1$, row2$, row3$ data to screen.
  794.  
  795.     '===draw row1
  796.     FOR t = 1 TO LEN(row1$)
  797.         L$ = UCASE$(MID$(row1$, t, 1))
  798.         'IF L$ = " " THEN L$ = "space"
  799.         IF L$ <> " " THEN
  800.             letter& = _LOADIMAGE(source$ + "fnt2\" + L$ + ".jpg", 32)
  801.             _PUTIMAGE (70 + (t * 35), 105), letter&
  802.             _FREEIMAGE letter&
  803.         END IF
  804.     NEXT
  805.  
  806.     '===draw row2
  807.     FOR t = 1 TO LEN(row2$)
  808.         L$ = UCASE$(MID$(row2$, t, 1))
  809.         'IF L$ = " " THEN L$ = "space"
  810.         IF L$ <> " " THEN
  811.             letter& = _LOADIMAGE(source$ + "fnt2\" + L$ + ".jpg", 32)
  812.             _PUTIMAGE (70 + (t * 35), 140), letter&
  813.             _FREEIMAGE letter&
  814.         END IF
  815.     NEXT
  816.  
  817.     '===draw row3
  818.     FOR t = 1 TO LEN(row3$)
  819.         L$ = UCASE$(MID$(row3$, t, 1))
  820.         'IF L$ = " " THEN L$ = "space"
  821.         IF L$ <> " " THEN
  822.             letter& = _LOADIMAGE(source$ + "fnt2\" + L$ + ".jpg", 32)
  823.             _PUTIMAGE (70 + (t * 35), 175), letter&
  824.             _FREEIMAGE letter&
  825.         END IF
  826.     NEXT
  827.  
  828.  
  829. '=================================================================================================================
  830.  
  831. SUB FlashRows ()
  832.  
  833.     '=== Animate quote rows for a sec to show solved.
  834.  
  835.     FOR flash = 1 TO 6
  836.         '===draw row1 highlighted
  837.         FOR t = 1 TO LEN(row1$)
  838.             L$ = UCASE$(MID$(row1$, t, 1))
  839.             'IF L$ = " " THEN L$ = "space"
  840.             IF L$ <> " " THEN
  841.                 letter& = _LOADIMAGE(source$ + "fnt2\_" + L$ + ".jpg", 32)
  842.                 _PUTIMAGE (70 + (t * 35), 105), letter&
  843.                 _FREEIMAGE letter&
  844.             END IF
  845.         NEXT
  846.  
  847.         '===draw row2
  848.         FOR t = 1 TO LEN(row2$)
  849.             L$ = UCASE$(MID$(row2$, t, 1))
  850.             'IF L$ = " " THEN L$ = "space"
  851.             IF L$ <> " " THEN
  852.                 letter& = _LOADIMAGE(source$ + "fnt2\_" + L$ + ".jpg", 32)
  853.                 _PUTIMAGE (70 + (t * 35), 140), letter&
  854.                 _FREEIMAGE letter&
  855.             END IF
  856.         NEXT
  857.  
  858.         '===draw row3
  859.         FOR t = 1 TO LEN(row3$)
  860.             L$ = UCASE$(MID$(row3$, t, 1))
  861.             'IF L$ = " " THEN L$ = "space"
  862.             IF L$ <> " " THEN
  863.                 letter& = _LOADIMAGE(source$ + "fnt2\_" + L$ + ".jpg", 32)
  864.                 _PUTIMAGE (70 + (t * 35), 175), letter&
  865.                 _FREEIMAGE letter&
  866.             END IF
  867.         NEXT
  868.  
  869.         _DELAY .15
  870.  
  871.         DrawRows 'Show them normal
  872.  
  873.         _DELAY .15
  874.  
  875.     NEXT
  876.  
  877.  
  878.  
  879. '=================================================================================================================
  880.  
  881. SUB SelectLetter ()
  882.  
  883.     'gets a selected letter, only if no space...
  884.  
  885.     SELECT CASE row%
  886.         CASE 1: sel$ = MID$(row1$, col%, 1)
  887.         CASE 2: sel$ = MID$(row2$, col%, 1)
  888.         CASE 3: sel$ = MID$(row3$, col%, 1)
  889.     END SELECT
  890.     '=== dont select if a space or empty place
  891.     IF sel$ = " " OR sel$ = "" THEN
  892.         selected = 0
  893.     ELSE
  894.         IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_select.ogg"
  895.         '=== load 1st selected letter (highlighted one)
  896.         letter& = _LOADIMAGE(source$ + "fnt2\_" + sel$ + ".jpg", 32)
  897.         _PUTIMAGE (70 + (col% * 35), 70 + (row% * 35)), letter&
  898.         _FREEIMAGE letter&
  899.         selected = 1: selectedrow% = row%: selectedcol% = col%
  900.     END IF
  901.  
  902.     '=== select sound
  903.     '=== time for mouse button to get up
  904.     _DELAY .3
  905.  
  906.  
  907. '=================================================================================================================
  908.  
  909. SUB HelpScreen (imagehandle&)
  910.  
  911.     pic& = _LOADIMAGE(source$ + "\img\helpscreen.jpg")
  912.  
  913.     StoneRoll "RIGHT", pic&, 25
  914.  
  915.     IF sfxflag = 1 THEN _SNDSTOP roll&
  916.  
  917.  
  918.     DO
  919.         '=== Catch mouse
  920.         DO WHILE _MOUSEINPUT
  921.             mx = _MOUSEX: my = _MOUSEY
  922.             LeftDown = _MOUSEBUTTON(1)
  923.             IF mx > 417 AND mx < 573 AND my > 687 AND my < 727 THEN
  924.                 ButtonShow "_back.jpg", 417, 687
  925.             ELSE
  926.                 ButtonShow "back.jpg", 417, 687
  927.             END IF
  928.         LOOP
  929.  
  930.         IF LeftDown THEN
  931.             '=== if back button
  932.             IF mx > 417 AND mx < 573 AND my > 687 AND my < 727 THEN
  933.                 ButtonClick 1, "back.jpg", 417, 687
  934.                 EXIT DO
  935.             END IF
  936.  
  937.         END IF
  938.  
  939.     LOOP
  940.  
  941.     StoneRoll "LEFT", imagehandle&, 25
  942.  
  943.     _FREEIMAGE pic&
  944.  
  945.  
  946. '=================================================================================================================
  947.  
  948. SUB ConfigScreen (imagehandle&)
  949.  
  950.     pic& = _LOADIMAGE(source$ + "\img\configscreen2.jpg")
  951.  
  952.     _DEST pic&
  953.  
  954.     '=== Mark setting on screen here.
  955.  
  956.     IF musicflag = 1 THEN
  957.         LINE (451, 252)-(476, 275), _RGB32(0, 255, 0), BF 'ON = green
  958.     ELSE
  959.         LINE (585, 252)-(610, 275), _RGB32(0, 255, 0), BF 'OFF = green
  960.     END IF
  961.  
  962.     IF sfxflag = 1 THEN
  963.         LINE (451, 309)-(476, 332), _RGB32(0, 255, 0), BF 'ON = green
  964.     ELSE
  965.         LINE (587, 309)-(612, 332), _RGB32(0, 255, 0), BF 'OFF = green
  966.     END IF
  967.  
  968.     IF timerflag = 1 THEN
  969.         LINE (451, 369)-(477, 393), _RGB32(0, 255, 0), BF 'ON = green
  970.     ELSE
  971.         LINE (588, 370)-(614, 394), _RGB32(0, 255, 0), BF 'OFF = green
  972.     END IF
  973.  
  974.     _DEST 0
  975.  
  976.  
  977.     IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_roll.ogg"
  978.  
  979.     StoneRoll "RIGHT", pic&, 25
  980.  
  981.  
  982.     ConfigTop:
  983.  
  984.  
  985.     DO
  986.         '=== Catch mouse
  987.         DO WHILE _MOUSEINPUT
  988.             mx = _MOUSEX: my = _MOUSEY
  989.             LeftDown = _MOUSEBUTTON(1)
  990.             IF mx > 417 AND mx < 573 AND my > 687 AND my < 727 THEN
  991.                 ButtonShow "_back.jpg", 417, 687
  992.             ELSE
  993.                 ButtonShow "back.jpg", 417, 687
  994.             END IF
  995.         LOOP
  996.  
  997.         IF LeftDown THEN
  998.             '=== if back button
  999.             IF mx > 417 AND mx < 573 AND my > 687 AND my < 727 THEN
  1000.                 ButtonClick 1, "back.jpg", 417, 687
  1001.                 EXIT DO
  1002.             END IF
  1003.  
  1004.             'Music ON click
  1005.             IF mx > 451 AND mx < 477 AND my > 252 AND my < 276 THEN
  1006.                 musicflag = 1
  1007.                 MID$(config$, 51, 1) = CHR$(1) 'MARK CONFIG SPOT AS MUSIC ON
  1008.                 _SNDLOOP music&
  1009.  
  1010.                 IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_click2.mp3"
  1011.                 LINE (451, 252)-(476, 275), _RGB32(0, 255, 0), BF 'ON = green
  1012.                 LINE (585, 252)-(610, 275), _RGB32(255, 255, 255), BF 'OFF = white
  1013.                 _DELAY .3
  1014.             END IF
  1015.             'Music OFF clicked
  1016.             IF mx > 585 AND mx < 610 AND my > 252 AND my < 275 THEN
  1017.                 musicflag = 0
  1018.                 MID$(config$, 51, 1) = CHR$(0) 'MARK CONFIG SPOT AS MUSIC OFF
  1019.                 _SNDSTOP music&
  1020.  
  1021.                 IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_click2.mp3"
  1022.                 LINE (451, 252)-(476, 275), _RGB32(255, 255, 255), BF 'ON
  1023.                 LINE (585, 252)-(610, 275), _RGB32(0, 255, 0), BF 'OFF
  1024.                 _DELAY .3
  1025.             END IF
  1026.             'SFX ON clicked
  1027.             IF mx > 451 AND mx < 477 AND my > 309 AND my < 333 THEN
  1028.                 sfxflag = 1
  1029.                 MID$(config$, 52, 1) = CHR$(1) 'MARK CONFIG SPOT AS SFX ON
  1030.  
  1031.                 _SNDPLAYFILE source$ + "sfx\sfx_click2.mp3"
  1032.                 LINE (451, 309)-(476, 332), _RGB32(0, 255, 0), BF 'ON
  1033.                 LINE (587, 309)-(612, 332), _RGB32(255, 255, 255), BF
  1034.                 _DELAY .3
  1035.             END IF
  1036.             'SFX OFF clicked
  1037.             IF mx > 587 AND mx < 612 AND my > 309 AND my < 332 THEN
  1038.                 sfxflag = 0
  1039.                 MID$(config$, 52, 1) = CHR$(0) 'MARK CONFIG SPOT AS SFX OFF
  1040.  
  1041.                 _SNDPLAYFILE source$ + "sfx\sfx_click2.mp3"
  1042.                 LINE (451, 309)-(476, 332), _RGB32(255, 255, 255), BF 'ON
  1043.                 LINE (587, 309)-(612, 332), _RGB32(0, 255, 0), BF
  1044.                 _DELAY .3
  1045.             END IF
  1046.             'TIMER OFF CLICKED
  1047.             IF mx > 588 AND mx < 614 AND my > 370 AND my < 394 THEN
  1048.                 timerflag = 1
  1049.                 MID$(config$, 53, 1) = CHR$(1) 'MARK CONFIG SPOT AS TIMER ON
  1050.  
  1051.                 IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_click2.mp3"
  1052.                 _DELAY .3
  1053.  
  1054.                 _DISPLAY
  1055.                 snapshot& = _COPYIMAGE(_DISPLAY)
  1056.                 _AUTODISPLAY
  1057.  
  1058.                 timerwimp& = _LOADIMAGE(source$ + "img\timernotice.jpg")
  1059.                 _PUTIMAGE (218, 160), timerwimp&, 0
  1060.                 _FREEIMAGE timerwimp&
  1061.  
  1062.                 '=== wait for Reply...
  1063.                 DO
  1064.                     cheese = _MOUSEINPUT
  1065.                     mx2 = _MOUSEX: my2 = _MOUSEY
  1066.                     LeftDown2 = _MOUSEBUTTON(1)
  1067.                     'hover button
  1068.                     IF mx2 > 286 AND mx2 < 717 AND my2 > 466 AND my2 < 520 THEN
  1069.                         ButtonShow "_wimp.jpg", 286, 466
  1070.                         IF _MOUSEBUTTON(1) THEN
  1071.                             ButtonClick 1, "wimp.jpg", 286, 466
  1072.                             EXIT DO
  1073.                         END IF
  1074.  
  1075.                     ELSE
  1076.                         ButtonShow "wimp.jpg", 286, 466
  1077.                     END IF
  1078.                 LOOP
  1079.  
  1080.                 _PUTIMAGE , snapshot&, 0
  1081.  
  1082.                 _FREEIMAGE snapshot&
  1083.  
  1084.                 GOTO ConfigTop
  1085.  
  1086.             END IF
  1087.             '==== RESET GAME CLICKED
  1088.             IF mx > 369 AND mx < 617 AND my > 585 AND my < 639 THEN
  1089.                 ButtonClick 0, "reset.jpg", 369, 585
  1090.  
  1091.                 _DISPLAY
  1092.                 snapshot& = _COPYIMAGE(_DISPLAY)
  1093.                 _AUTODISPLAY
  1094.  
  1095.                 timerwimp& = _LOADIMAGE(source$ + "img\resetnotice.jpg")
  1096.                 _PUTIMAGE (276, 160), timerwimp&, 0
  1097.                 _FREEIMAGE timerwimp&
  1098.  
  1099.                 '=== Get YES or NO
  1100.                 DO
  1101.                     cheese = _MOUSEINPUT
  1102.                     mx2 = _MOUSEX: my2 = _MOUSEY
  1103.                     LeftDown2 = _MOUSEBUTTON(1)
  1104.  
  1105.                     'YES button poll
  1106.                     IF mx2 > 318 AND mx2 < 474 AND my2 > 395 AND my2 < 435 THEN
  1107.                         ButtonShow "_yes.jpg", 318, 395
  1108.                         IF _MOUSEBUTTON(1) THEN
  1109.                             ButtonClick 1, "yes.jpg", 318, 395
  1110.  
  1111.                             '===  RESET CONFIG DATA HERE (ONLY QUOTE STUFF)
  1112.                             FOR cc = 1 TO 50
  1113.                                 MID$(config$, cc, 1) = CHR$(0)
  1114.                             NEXT
  1115.                             unsolved = 50
  1116.                             EXIT DO
  1117.                         END IF
  1118.                     ELSE
  1119.                         ButtonShow "yes.jpg", 318, 395
  1120.                     END IF
  1121.                     'NO BUTTON poll
  1122.                     IF mx2 > 516 AND mx2 < 672 AND my2 > 395 AND my2 < 435 THEN
  1123.                         ButtonShow "_no.jpg", 516, 395
  1124.                         IF _MOUSEBUTTON(1) THEN
  1125.                             ButtonClick 1, "no.jpg", 516, 395
  1126.                             EXIT DO
  1127.                         END IF
  1128.                     ELSE
  1129.                         ButtonShow "no.jpg", 516, 395
  1130.                     END IF
  1131.  
  1132.  
  1133.                 LOOP
  1134.  
  1135.                 _PUTIMAGE , snapshot&, 0
  1136.  
  1137.                 _FREEIMAGE snapshot&
  1138.  
  1139.                 GOTO ConfigTop
  1140.  
  1141.  
  1142.             END IF
  1143.  
  1144.         END IF
  1145.  
  1146.     LOOP
  1147.  
  1148.  
  1149.     IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_roll.ogg"
  1150.  
  1151.     StoneRoll "LEFT", imagehandle&, 25
  1152.  
  1153.     _FREEIMAGE pic&
  1154.  
  1155.  
  1156.  
  1157. '=================================================================================================================
  1158.  
  1159. SUB SelectQuote ()
  1160.  
  1161.     '=== Brings up Select Quote Menu
  1162.  
  1163.     selectmenu& = _LOADIMAGE(source$ + "img\select.jpg", 32)
  1164.     solvedimg& = _LOADIMAGE(source$ + "img\solved.jpg", 32)
  1165.  
  1166.  
  1167.     '=== Play Select menu fly in vid
  1168.  
  1169.     '========================
  1170.     FOR t = 15 TO 0 STEP -1
  1171.         _PUTIMAGE (0, 0), selectframe(t)
  1172.         _LIMIT 40
  1173.     NEXT
  1174.  
  1175.     _PUTIMAGE , selectmenu&, 0
  1176.  
  1177.     '=======================
  1178.  
  1179.  
  1180.     _FREEIMAGE selectmenu& 'no need it because we're going to change it so much, just grab background now
  1181.  
  1182.  
  1183.     '=== If quotes have been solved, put solved tag image ..
  1184.     IF MID$(config$, 1, 1) = CHR$(1) THEN _PUTIMAGE (209, 173), solvedimg&, 0
  1185.     IF MID$(config$, 2, 1) = CHR$(1) THEN _PUTIMAGE (284, 173), solvedimg&, 0
  1186.     IF MID$(config$, 3, 1) = CHR$(1) THEN _PUTIMAGE (359, 173), solvedimg&, 0
  1187.     IF MID$(config$, 4, 1) = CHR$(1) THEN _PUTIMAGE (434, 173), solvedimg&, 0
  1188.     IF MID$(config$, 5, 1) = CHR$(1) THEN _PUTIMAGE (509, 173), solvedimg&, 0
  1189.     IF MID$(config$, 6, 1) = CHR$(1) THEN _PUTIMAGE (584, 173), solvedimg&, 0
  1190.     IF MID$(config$, 7, 1) = CHR$(1) THEN _PUTIMAGE (659, 173), solvedimg&, 0
  1191.     IF MID$(config$, 8, 1) = CHR$(1) THEN _PUTIMAGE (734, 173), solvedimg&, 0
  1192.  
  1193.     IF MID$(config$, 9, 1) = CHR$(1) THEN _PUTIMAGE (209, 235), solvedimg&, 0
  1194.     IF MID$(config$, 10, 1) = CHR$(1) THEN _PUTIMAGE (284, 235), solvedimg&, 0
  1195.     IF MID$(config$, 11, 1) = CHR$(1) THEN _PUTIMAGE (359, 235), solvedimg&, 0
  1196.     IF MID$(config$, 12, 1) = CHR$(1) THEN _PUTIMAGE (434, 235), solvedimg&, 0
  1197.     IF MID$(config$, 13, 1) = CHR$(1) THEN _PUTIMAGE (509, 235), solvedimg&, 0
  1198.     IF MID$(config$, 14, 1) = CHR$(1) THEN _PUTIMAGE (584, 235), solvedimg&, 0
  1199.     IF MID$(config$, 15, 1) = CHR$(1) THEN _PUTIMAGE (659, 235), solvedimg&, 0
  1200.     IF MID$(config$, 16, 1) = CHR$(1) THEN _PUTIMAGE (734, 235), solvedimg&, 0
  1201.  
  1202.     IF MID$(config$, 17, 1) = CHR$(1) THEN _PUTIMAGE (209, 297), solvedimg&, 0
  1203.     IF MID$(config$, 18, 1) = CHR$(1) THEN _PUTIMAGE (284, 297), solvedimg&, 0
  1204.     IF MID$(config$, 19, 1) = CHR$(1) THEN _PUTIMAGE (359, 297), solvedimg&, 0
  1205.     IF MID$(config$, 20, 1) = CHR$(1) THEN _PUTIMAGE (434, 297), solvedimg&, 0
  1206.     IF MID$(config$, 21, 1) = CHR$(1) THEN _PUTIMAGE (509, 297), solvedimg&, 0
  1207.     IF MID$(config$, 22, 1) = CHR$(1) THEN _PUTIMAGE (584, 297), solvedimg&, 0
  1208.     IF MID$(config$, 23, 1) = CHR$(1) THEN _PUTIMAGE (659, 297), solvedimg&, 0
  1209.     IF MID$(config$, 24, 1) = CHR$(1) THEN _PUTIMAGE (734, 297), solvedimg&, 0
  1210.  
  1211.     IF MID$(config$, 25, 1) = CHR$(1) THEN _PUTIMAGE (209, 359), solvedimg&, 0
  1212.     IF MID$(config$, 26, 1) = CHR$(1) THEN _PUTIMAGE (284, 359), solvedimg&, 0
  1213.     IF MID$(config$, 27, 1) = CHR$(1) THEN _PUTIMAGE (359, 359), solvedimg&, 0
  1214.     IF MID$(config$, 28, 1) = CHR$(1) THEN _PUTIMAGE (434, 359), solvedimg&, 0
  1215.     IF MID$(config$, 29, 1) = CHR$(1) THEN _PUTIMAGE (509, 359), solvedimg&, 0
  1216.     IF MID$(config$, 30, 1) = CHR$(1) THEN _PUTIMAGE (584, 359), solvedimg&, 0
  1217.     IF MID$(config$, 31, 1) = CHR$(1) THEN _PUTIMAGE (659, 359), solvedimg&, 0
  1218.     IF MID$(config$, 32, 1) = CHR$(1) THEN _PUTIMAGE (734, 359), solvedimg&, 0
  1219.  
  1220.     IF MID$(config$, 33, 1) = CHR$(1) THEN _PUTIMAGE (209, 421), solvedimg&, 0
  1221.     IF MID$(config$, 34, 1) = CHR$(1) THEN _PUTIMAGE (284, 421), solvedimg&, 0
  1222.     IF MID$(config$, 35, 1) = CHR$(1) THEN _PUTIMAGE (359, 421), solvedimg&, 0
  1223.     IF MID$(config$, 36, 1) = CHR$(1) THEN _PUTIMAGE (434, 421), solvedimg&, 0
  1224.     IF MID$(config$, 37, 1) = CHR$(1) THEN _PUTIMAGE (509, 421), solvedimg&, 0
  1225.     IF MID$(config$, 38, 1) = CHR$(1) THEN _PUTIMAGE (584, 421), solvedimg&, 0
  1226.     IF MID$(config$, 39, 1) = CHR$(1) THEN _PUTIMAGE (659, 421), solvedimg&, 0
  1227.     IF MID$(config$, 40, 1) = CHR$(1) THEN _PUTIMAGE (734, 421), solvedimg&, 0
  1228.  
  1229.     IF MID$(config$, 41, 1) = CHR$(1) THEN _PUTIMAGE (209, 483), solvedimg&, 0
  1230.     IF MID$(config$, 42, 1) = CHR$(1) THEN _PUTIMAGE (284, 483), solvedimg&, 0
  1231.     IF MID$(config$, 43, 1) = CHR$(1) THEN _PUTIMAGE (359, 483), solvedimg&, 0
  1232.     IF MID$(config$, 44, 1) = CHR$(1) THEN _PUTIMAGE (434, 483), solvedimg&, 0
  1233.     IF MID$(config$, 45, 1) = CHR$(1) THEN _PUTIMAGE (509, 483), solvedimg&, 0
  1234.     IF MID$(config$, 46, 1) = CHR$(1) THEN _PUTIMAGE (584, 483), solvedimg&, 0
  1235.     IF MID$(config$, 47, 1) = CHR$(1) THEN _PUTIMAGE (659, 483), solvedimg&, 0
  1236.     IF MID$(config$, 48, 1) = CHR$(1) THEN _PUTIMAGE (734, 483), solvedimg&, 0
  1237.  
  1238.     IF MID$(config$, 49, 1) = CHR$(1) THEN _PUTIMAGE (209, 545), solvedimg&, 0
  1239.     IF MID$(config$, 50, 1) = CHR$(1) THEN _PUTIMAGE (284, 545), solvedimg&, 0
  1240.  
  1241.  
  1242.     '===load select menu message based on solved #
  1243.     IF unsolved = 0 THEN
  1244.         selectmsg& = _LOADIMAGE(source$ + "img\select-champ.jpg", 32)
  1245.         _PUTIMAGE (376, 547), selectmsg&, 0
  1246.     ELSE
  1247.         selectmsg& = _LOADIMAGE(source$ + "img\select-msg.jpg", 32)
  1248.         _PUTIMAGE (400, 548), selectmsg&, 0
  1249.     END IF
  1250.     _FREEIMAGE selectmsg&
  1251.  
  1252.  
  1253.  
  1254.  
  1255.     'NOW grab screen again as select menu
  1256.     '=== Grab background
  1257.     _DISPLAY
  1258.     selectmenu& = _COPYIMAGE(_DISPLAY)
  1259.  
  1260.     '=== get menu choice
  1261.  
  1262.     DO
  1263.         '=== Catch mouse
  1264.         DO WHILE _MOUSEINPUT
  1265.             mx = _MOUSEX: my = _MOUSEY: LeftDown = _MOUSEBUTTON(1)
  1266.         LOOP
  1267.  
  1268.         IF LeftDown THEN
  1269.             '== 1
  1270.             IF mx > 209 AND mx < 277 AND my > 173 AND my < 227 THEN
  1271.                 SelectNumber "1", 209, 173, selectmenu&: EXIT DO
  1272.             END IF
  1273.             '== 2
  1274.             IF mx > 284 AND mx < 353 AND my > 173 AND my < 227 THEN
  1275.                 SelectNumber "2", 284, 173, selectmenu&: EXIT DO
  1276.             END IF
  1277.             '== 3
  1278.             IF mx > 359 AND mx < 428 AND my > 173 AND my < 227 THEN
  1279.                 SelectNumber "3", 359, 173, selectmenu&: EXIT DO
  1280.             END IF
  1281.             '== 4
  1282.             IF mx > 434 AND mx < 503 AND my > 173 AND my < 227 THEN
  1283.                 SelectNumber "4", 434, 173, selectmenu&: EXIT DO
  1284.             END IF
  1285.             '== 5
  1286.             IF mx > 509 AND mx < 578 AND my > 173 AND my < 227 THEN
  1287.                 SelectNumber "5", 509, 173, selectmenu&: EXIT DO
  1288.             END IF
  1289.             '== 6
  1290.             IF mx > 584 AND mx < 652 AND my > 173 AND my < 227 THEN
  1291.                 SelectNumber "6", 584, 173, selectmenu&: EXIT DO
  1292.             END IF
  1293.             '== 7
  1294.             IF mx > 659 AND mx < 727 AND my > 173 AND my < 227 THEN
  1295.                 SelectNumber "7", 659, 173, selectmenu&: EXIT DO
  1296.             END IF
  1297.             '== 8
  1298.             IF mx > 734 AND mx < 803 AND my > 173 AND my < 227 THEN
  1299.                 SelectNumber "8", 734, 173, selectmenu&: EXIT DO
  1300.             END IF
  1301.             '== 9
  1302.             IF mx > 209 AND mx < 278 AND my > 235 AND my < 289 THEN
  1303.                 SelectNumber "9", 209, 235, selectmenu&: EXIT DO
  1304.             END IF
  1305.             '== 10
  1306.             IF mx > 284 AND mx < 353 AND my > 235 AND my < 289 THEN
  1307.                 SelectNumber "10", 284, 235, selectmenu&: EXIT DO
  1308.             END IF
  1309.             '== 11
  1310.             IF mx > 359 AND mx < 428 AND my > 235 AND my < 289 THEN
  1311.                 SelectNumber "11", 359, 235, selectmenu&: EXIT DO
  1312.             END IF
  1313.             '== 12
  1314.             IF mx > 434 AND mx < 503 AND my > 235 AND my < 289 THEN
  1315.                 SelectNumber "12", 434, 235, selectmenu&: EXIT DO
  1316.             END IF
  1317.             '== 13
  1318.             IF mx > 509 AND mx < 578 AND my > 235 AND my < 289 THEN
  1319.                 SelectNumber "13", 509, 235, selectmenu&: EXIT DO
  1320.             END IF
  1321.             '=== 14
  1322.             IF mx > 584 AND mx < 653 AND my > 235 AND my < 289 THEN
  1323.                 SelectNumber "14", 584, 235, selectmenu&: EXIT DO
  1324.             END IF
  1325.             '=== 15
  1326.             IF mx > 659 AND mx < 728 AND my > 235 AND my < 289 THEN
  1327.                 SelectNumber "15", 659, 235, selectmenu&: EXIT DO
  1328.             END IF
  1329.             '=== 16
  1330.             IF mx > 734 AND mx < 803 AND my > 235 AND my < 289 THEN
  1331.                 SelectNumber "16", 734, 235, selectmenu&: EXIT DO
  1332.             END IF
  1333.             '=== 17
  1334.             IF mx > 209 AND mx < 278 AND my > 297 AND my < 351 THEN
  1335.                 SelectNumber "17", 209, 297, selectmenu&: EXIT DO
  1336.             END IF
  1337.             '=== 18
  1338.             IF mx > 284 AND mx < 353 AND my > 297 AND my < 351 THEN
  1339.                 SelectNumber "18", 284, 297, selectmenu&: EXIT DO
  1340.             END IF
  1341.             '=== 19
  1342.             IF mx > 359 AND mx < 428 AND my > 297 AND my < 351 THEN
  1343.                 SelectNumber "19", 359, 297, selectmenu&: EXIT DO
  1344.             END IF
  1345.             '=== 20
  1346.             IF mx > 434 AND mx < 503 AND my > 297 AND my < 351 THEN
  1347.                 SelectNumber "20", 434, 297, selectmenu&: EXIT DO
  1348.             END IF
  1349.             '=== 21
  1350.             IF mx > 509 AND mx < 578 AND my > 297 AND my < 351 THEN
  1351.                 SelectNumber "21", 509, 297, selectmenu&: EXIT DO
  1352.             END IF
  1353.             '=== 22
  1354.             IF mx > 584 AND mx < 653 AND my > 297 AND my < 351 THEN
  1355.                 SelectNumber "22", 584, 297, selectmenu&: EXIT DO
  1356.             END IF
  1357.             '=== 23
  1358.             IF mx > 659 AND mx < 728 AND my > 297 AND my < 351 THEN
  1359.                 SelectNumber "23", 659, 297, selectmenu&: EXIT DO
  1360.             END IF
  1361.             '=== 24
  1362.             IF mx > 734 AND mx < 803 AND my > 297 AND my < 351 THEN
  1363.                 SelectNumber "24", 734, 297, selectmenu&: EXIT DO
  1364.             END IF
  1365.             '=== 25
  1366.             IF mx > 209 AND mx < 278 AND my > 359 AND my < 413 THEN
  1367.                 SelectNumber "25", 209, 359, selectmenu&: EXIT DO
  1368.             END IF
  1369.             '=== 26
  1370.             IF mx > 284 AND mx < 353 AND my > 359 AND my < 413 THEN
  1371.                 SelectNumber "26", 284, 359, selectmenu&: EXIT DO
  1372.             END IF
  1373.             '=== 27
  1374.             IF mx > 359 AND mx < 428 AND my > 359 AND my < 413 THEN
  1375.                 SelectNumber "27", 359, 359, selectmenu&: EXIT DO
  1376.             END IF
  1377.             '=== 28
  1378.             IF mx > 434 AND mx < 503 AND my > 359 AND my < 413 THEN
  1379.                 SelectNumber "28", 434, 359, selectmenu&: EXIT DO
  1380.             END IF
  1381.             '=== 29
  1382.             IF mx > 509 AND mx < 578 AND my > 359 AND my < 413 THEN
  1383.                 SelectNumber "29", 509, 359, selectmenu&: EXIT DO
  1384.             END IF
  1385.             '=== 30
  1386.             IF mx > 584 AND mx < 653 AND my > 359 AND my < 413 THEN
  1387.                 SelectNumber "30", 584, 359, selectmenu&: EXIT DO
  1388.             END IF
  1389.             '=== 31
  1390.             IF mx > 659 AND mx < 728 AND my > 359 AND my < 413 THEN
  1391.                 SelectNumber "31", 659, 359, selectmenu&: EXIT DO
  1392.             END IF
  1393.             '=== 32
  1394.             IF mx > 734 AND mx < 803 AND my > 359 AND my < 413 THEN
  1395.                 SelectNumber "32", 734, 359, selectmenu&: EXIT DO
  1396.             END IF
  1397.             '=== 33
  1398.             IF mx > 209 AND mx < 278 AND my > 421 AND my < 475 THEN
  1399.                 SelectNumber "33", 209, 421, selectmenu&: EXIT DO
  1400.             END IF
  1401.             '=== 34
  1402.             IF mx > 284 AND mx < 353 AND my > 421 AND my < 475 THEN
  1403.                 SelectNumber "34", 284, 421, selectmenu&: EXIT DO
  1404.             END IF
  1405.             '=== 35
  1406.             IF mx > 359 AND mx < 428 AND my > 421 AND my < 475 THEN
  1407.                 SelectNumber "35", 359, 421, selectmenu&: EXIT DO
  1408.             END IF
  1409.             '=== 36
  1410.             IF mx > 434 AND mx < 503 AND my > 421 AND my < 475 THEN
  1411.                 SelectNumber "36", 434, 421, selectmenu&: EXIT DO
  1412.             END IF
  1413.             '=== 37
  1414.             IF mx > 509 AND mx < 578 AND my > 421 AND my < 475 THEN
  1415.                 SelectNumber "37", 509, 421, selectmenu&: EXIT DO
  1416.             END IF
  1417.             '=== 38
  1418.             IF mx > 584 AND mx < 653 AND my > 421 AND my < 475 THEN
  1419.                 SelectNumber "38", 584, 421, selectmenu&: EXIT DO
  1420.             END IF
  1421.             '=== 39
  1422.             IF mx > 659 AND mx < 728 AND my > 421 AND my < 475 THEN
  1423.                 SelectNumber "39", 659, 421, selectmenu&: EXIT DO
  1424.             END IF
  1425.             '=== 40
  1426.             IF mx > 734 AND mx < 803 AND my > 421 AND my < 475 THEN
  1427.                 SelectNumber "40", 734, 421, selectmenu&: EXIT DO
  1428.             END IF
  1429.             '=== 41
  1430.             IF mx > 209 AND mx < 278 AND my > 483 AND my < 537 THEN
  1431.                 SelectNumber "41", 209, 483, selectmenu&: EXIT DO
  1432.             END IF
  1433.             '=== 42
  1434.             IF mx > 284 AND mx < 353 AND my > 483 AND my < 537 THEN
  1435.                 SelectNumber "42", 284, 483, selectmenu&: EXIT DO
  1436.             END IF
  1437.             '=== 43
  1438.             IF mx > 359 AND mx < 428 AND my > 483 AND my < 537 THEN
  1439.                 SelectNumber "43", 359, 483, selectmenu&: EXIT DO
  1440.             END IF
  1441.             '=== 44
  1442.             IF mx > 434 AND mx < 503 AND my > 483 AND my < 537 THEN
  1443.                 SelectNumber "44", 434, 483, selectmenu&: EXIT DO
  1444.             END IF
  1445.             '=== 45
  1446.             IF mx > 509 AND mx < 578 AND my > 483 AND my < 537 THEN
  1447.                 SelectNumber "45", 509, 483, selectmenu&: EXIT DO
  1448.             END IF
  1449.             '=== 46
  1450.             IF mx > 584 AND mx < 653 AND my > 483 AND my < 537 THEN
  1451.                 SelectNumber "46", 584, 483, selectmenu&: EXIT DO
  1452.             END IF
  1453.             '=== 47
  1454.             IF mx > 659 AND mx < 728 AND my > 483 AND my < 537 THEN
  1455.                 SelectNumber "47", 659, 483, selectmenu&: EXIT DO
  1456.             END IF
  1457.             '=== 48
  1458.             IF mx > 734 AND mx < 803 AND my > 483 AND my < 537 THEN
  1459.                 SelectNumber "48", 734, 483, selectmenu&: EXIT DO
  1460.             END IF
  1461.             '=== 49
  1462.             IF mx > 209 AND mx < 278 AND my > 545 AND my < 599 THEN
  1463.                 SelectNumber "49", 209, 545, selectmenu&: EXIT DO
  1464.             END IF
  1465.             '=== 50
  1466.             IF mx > 284 AND mx < 353 AND my > 545 AND my < 599 THEN
  1467.                 SelectNumber "50", 284, 545, selectmenu&: EXIT DO
  1468.             END IF
  1469.  
  1470.         END IF
  1471.  
  1472.     LOOP
  1473.  
  1474.     '=== Play select menu again, flying out.
  1475.  
  1476.     '========================
  1477.     FOR t = 0 TO 15
  1478.         _PUTIMAGE (0, 0), selectframe(t)
  1479.         _DISPLAY
  1480.         _LIMIT 40
  1481.     NEXT
  1482.     '=======================
  1483.  
  1484.     _FREEIMAGE selectmenu&
  1485.     _FREEIMAGE solvedimg&
  1486.  
  1487.  
  1488. SUB SelectNumber (number$, x, y, image&)
  1489.     IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_click.mp3"
  1490.     btn& = _LOADIMAGE(source$ + "num\" + number$ + ".jpg", 32)
  1491.     _PUTIMAGE (x, y), btn&, 0: _FREEIMAGE btn&
  1492.     _DELAY .15: _PUTIMAGE (0, 0), image&, 0: _DELAY .15
  1493.     quote = VAL(number$)
  1494.  
  1495. '================================================================================================================
  1496.  
  1497. SUB GetQuote (quote)
  1498.  
  1499.     '=== Gets new quote to solve based on quote value,
  1500.     '=== Sets the Row data...
  1501.  
  1502.     SELECT CASE quote
  1503.         '' QUOTES MUST NOT BE LONGER THAN 23 LETTERS ON ONE ROW
  1504.         '' AND ALL ROWS SHOULD BE SAME LENGTH (PAD WITH SPACES)
  1505.  
  1506.         CASE 1
  1507.             OrigRow1$ = "GREAT MINDS ": row1$ = OrigRow1$
  1508.             OrigRow2$ = "THINK ALIKE ": row2$ = OrigRow2$
  1509.             OrigRow3$ = "            ": row3$ = OrigRow3$
  1510.         CASE 2
  1511.             OrigRow1$ = "TO ERR IS HUMAN  ": row1$ = OrigRow1$
  1512.             OrigRow2$ = "TO FORGIVE DEVINE": row2$ = OrigRow2$
  1513.             OrigRow3$ = "                 ": row3$ = OrigRow3$
  1514.         CASE 3
  1515.             OrigRow1$ = "IT AINT OVER TILL  ": row1$ = OrigRow1$
  1516.             OrigRow2$ = "THE FAT LADY SINGS ": row2$ = OrigRow2$
  1517.             OrigRow3$ = "                   ": row3$ = OrigRow3$
  1518.         CASE 4
  1519.             OrigRow1$ = "A ROLLING STONE ": row1$ = OrigRow1$
  1520.             OrigRow2$ = "GATHERS NO MOSS ": row2$ = OrigRow2$
  1521.             OrigRow3$ = "                ": row3$ = OrigRow3$
  1522.         CASE 5
  1523.             OrigRow1$ = "LAUGHTER IS THE ": row1$ = OrigRow1$
  1524.             OrigRow2$ = "BEST  MEDICINE  ": row2$ = OrigRow2$
  1525.             OrigRow3$ = "                ": row3$ = OrigRow3$
  1526.  
  1527.         CASE 6
  1528.             OrigRow1$ = "ABSENCE MAKES THE ": row1$ = OrigRow1$
  1529.             OrigRow2$ = "HEART GROW FONDER ": row2$ = OrigRow2$
  1530.             OrigRow3$ = "                  ": row3$ = OrigRow3$
  1531.  
  1532.         CASE 7
  1533.             OrigRow1$ = "YOU CANT HAVE YOUR ": row1$ = OrigRow1$
  1534.             OrigRow2$ = "CAKE AND EAT IT TOO": row2$ = OrigRow2$
  1535.             OrigRow3$ = "                   ": row3$ = OrigRow3$
  1536.  
  1537.         CASE 8
  1538.             OrigRow1$ = "IF AT FIRST YOU DONT ": row1$ = OrigRow1$
  1539.             OrigRow2$ = "SUCCEED TRY TRY AGAIN": row2$ = OrigRow2$
  1540.             OrigRow3$ = "                     ": row3$ = OrigRow3$
  1541.         CASE 9
  1542.             OrigRow1$ = "NECESSITY IS  ": row1$ = OrigRow1$
  1543.             OrigRow2$ = "THE MOTHER OF ": row2$ = OrigRow2$
  1544.             OrigRow3$ = "INVENTION     ": row3$ = OrigRow3$
  1545.         CASE 10
  1546.             OrigRow1$ = "CLEANLINESS ": row1$ = OrigRow1$
  1547.             OrigRow2$ = "IS NEXT TO  ": row2$ = OrigRow2$
  1548.             OrigRow3$ = "GODLINESS": row3$ = OrigRow3$
  1549.         CASE 11
  1550.             OrigRow1$ = "THE BIGGER THEY ": row1$ = OrigRow1$
  1551.             OrigRow2$ = "ARE  THE HARDER ": row2$ = OrigRow2$
  1552.             OrigRow3$ = "THEY FALL       ": row3$ = OrigRow3$
  1553.         CASE 12
  1554.             OrigRow1$ = "ACTIONS SPEAK  ": row1$ = OrigRow1$
  1555.             OrigRow2$ = "LOUDER THAN    ": row2$ = OrigRow2$
  1556.             OrigRow3$ = "WORDS          ": row3$ = OrigRow3$
  1557.         CASE 13
  1558.             OrigRow1$ = "A CHAIN IS ONLY  ": row1$ = OrigRow1$
  1559.             OrigRow2$ = "AS STRONG AS ITS ": row2$ = OrigRow2$
  1560.             OrigRow3$ = "WEAKEST LINK     ": row3$ = OrigRow3$
  1561.         CASE 14
  1562.             OrigRow1$ = "BIRDS OF A    ": row1$ = OrigRow1$
  1563.             OrigRow2$ = "FEATHER FLOCK ": row2$ = OrigRow2$
  1564.             OrigRow3$ = "TOGETHER      ": row3$ = OrigRow3$
  1565.         CASE 15
  1566.             OrigRow1$ = "WHEN THE CATS  ": row1$ = OrigRow1$
  1567.             OrigRow2$ = "AWAY  THE MICE ": row2$ = OrigRow2$
  1568.             OrigRow3$ = "WILL PLAY      ": row3$ = OrigRow3$
  1569.         CASE 16
  1570.             OrigRow1$ = "A FOOL AND HIS ": row1$ = OrigRow1$
  1571.             OrigRow2$ = "MONEY ARE SOON ": row2$ = OrigRow2$
  1572.             OrigRow3$ = "PARTED         ": row3$ = OrigRow3$
  1573.         CASE 17
  1574.             OrigRow1$ = "NONE SO BLIND ": row1$ = OrigRow1$
  1575.             OrigRow2$ = "AS THOSE WHO  ": row2$ = OrigRow2$
  1576.             OrigRow3$ = "WILL NOT SEE  ": row3$ = OrigRow3$
  1577.         CASE 18
  1578.             OrigRow1$ = "YOU CANT JUDGE ": row1$ = OrigRow1$
  1579.             OrigRow2$ = "A BOOK BY ITS  ": row2$ = OrigRow2$
  1580.             OrigRow3$ = "COVER          ": row3$ = OrigRow3$
  1581.         CASE 19
  1582.             OrigRow1$ = "DONT PUT ALL ": row1$ = OrigRow1$
  1583.             OrigRow2$ = "YOUR EGGS IN ": row2$ = OrigRow2$
  1584.             OrigRow3$ = "ONE  BASKET  ": row3$ = OrigRow3$
  1585.         CASE 20
  1586.             OrigRow1$ = "FOOLS RUSH IN ": row1$ = OrigRow1$
  1587.             OrigRow2$ = "WHERE ANGELS  ": row2$ = OrigRow2$
  1588.             OrigRow3$ = "FEAR TO TREAD ": row3$ = OrigRow3$
  1589.         CASE 21
  1590.             OrigRow1$ = "ALL WORK AND NO ": row1$ = OrigRow1$
  1591.             OrigRow2$ = "PLAY MAKES JACK ": row2$ = OrigRow2$
  1592.             OrigRow3$ = "A    DULL  BOY  ": row3$ = OrigRow3$
  1593.         CASE 22
  1594.             OrigRow1$ = "OLD SOLDIERS NEVER ": row1$ = OrigRow1$
  1595.             OrigRow2$ = "DIE THEY  SIMPLY   ": row2$ = OrigRow2$
  1596.             OrigRow3$ = "FADE AWAY          ": row3$ = OrigRow3$
  1597.         CASE 23
  1598.             OrigRow1$ = "DONT COUNT YOUR ": row1$ = OrigRow1$
  1599.             OrigRow2$ = "CHICKENS BEFORE ": row2$ = OrigRow2$
  1600.             OrigRow3$ = "THEY ARE HATCHED": row3$ = OrigRow3$
  1601.         CASE 24
  1602.             OrigRow1$ = "LIGHTNING NEVER  ": row1$ = OrigRow1$
  1603.             OrigRow2$ = "STRIKES TWICE IN ": row2$ = OrigRow2$
  1604.             OrigRow3$ = "THE  SAME  PLACE ": row3$ = OrigRow3$
  1605.         CASE 25
  1606.             OrigRow1$ = "AN OUNCE OF PREVENTION": row1$ = OrigRow1$
  1607.             OrigRow2$ = "IS WORTH A   POUND  OF": row2$ = OrigRow2$
  1608.             OrigRow3$ = "   CURE               ": row3$ = OrigRow3$
  1609.         CASE 26
  1610.             OrigRow1$ = "DONT CROSS YOUR ": row1$ = OrigRow1$
  1611.             OrigRow2$ = "BRIDGES  BEFORE ": row2$ = OrigRow2$
  1612.             OrigRow3$ = "YOU COME TO THEM": row3$ = OrigRow3$
  1613.         CASE 27
  1614.             OrigRow1$ = "IT WAS THE LAST  ": row1$ = OrigRow1$
  1615.             OrigRow2$ = "STRAW THAT BROKE ": row2$ = OrigRow2$
  1616.             OrigRow3$ = "THE   CAMELS BACk": row3$ = OrigRow3$
  1617.         CASE 28
  1618.             OrigRow1$ = "YOU CAN CATCH MORE ": row1$ = OrigRow1$
  1619.             OrigRow2$ = "FLIES WITH HONEY   ": row2$ = OrigRow2$
  1620.             OrigRow3$ = "THAN WITH  VINEGAR ": row3$ = OrigRow3$
  1621.         CASE 29
  1622.             OrigRow1$ = "NEVER PUT OFF UNTIL": row1$ = OrigRow1$
  1623.             OrigRow2$ = "TOMORROW  WHAT YOU  ": row2$ = OrigRow2$
  1624.             OrigRow3$ = "CAN DO    TODAY     ": row3$ = OrigRow3$
  1625.         CASE 30
  1626.             OrigRow1$ = "IF YOU LIE DOWN   ": row1$ = OrigRow1$
  1627.             OrigRow2$ = "WITH DOGS YOU WILL": row2$ = OrigRow2$
  1628.             OrigRow3$ = "GET UP WITH FLEAS ": row3$ = OrigRow3$
  1629.         CASE 31
  1630.             OrigRow1$ = "THOSE WHO LIVE IN  ": row1$ = OrigRow1$
  1631.             OrigRow2$ = "GLASS HOUSES SHOULD": row2$ = OrigRow2$
  1632.             OrigRow3$ = "NOT THROW STONES   ": row3$ = OrigRow3$
  1633.         CASE 32
  1634.             OrigRow1$ = " NECESSITY IS A HARD": row1$ = OrigRow1$
  1635.             OrigRow2$ = "NURSE BUT SHE RAISES": row2$ = OrigRow2$
  1636.             OrigRow3$ = "STRONG  CHILDREN    ": row3$ = OrigRow3$
  1637.         CASE 33
  1638.             OrigRow1$ = "IT IS BETTER TO BE  ": row1$ = OrigRow1$
  1639.             OrigRow2$ = "GREEN AND  GROWING  ": row2$ = OrigRow2$
  1640.             OrigRow3$ = "THAN RIPE AND ROTTEN": row3$ = OrigRow3$
  1641.         CASE 34
  1642.             OrigRow1$ = "HE WHO FIGHTS  AND  ": row1$ = OrigRow1$
  1643.             OrigRow2$ = "RUNS AWAY MAY  LIVE ": row2$ = OrigRow2$
  1644.             OrigRow3$ = "TO FIGHT ANOTHER DAY": row3$ = OrigRow3$
  1645.         CASE 35
  1646.             OrigRow1$ = "YOU CAN  LEAD A HORSE": row1$ = OrigRow1$
  1647.             OrigRow2$ = "TO WATER BUT  YOU    ": row2$ = OrigRow2$
  1648.             OrigRow3$ = "CANT MAKE HIM DRINK  ": row3$ = OrigRow3$
  1649.         CASE 36
  1650.             OrigRow1$ = "THE GRASS  IS ALWAYS": row1$ = OrigRow1$
  1651.             OrigRow2$ = "GREENER ON THE OTHER": row2$ = OrigRow2$
  1652.             OrigRow3$ = "SIDE OF THE FENCE   ": row3$ = OrigRow3$
  1653.         CASE 37
  1654.             OrigRow1$ = "THOSE WHO  DO NOT     ": row1$ = OrigRow1$
  1655.             OrigRow2$ = "LEARN FROM HISTORY ARE": row2$ = OrigRow2$
  1656.             OrigRow3$ = "DOOMED  TO  REPEAT IT ": row3$ = OrigRow3$
  1657.         CASE 38
  1658.             OrigRow1$ = "BETTER TO HAVE LOVED  ": row1$ = OrigRow1$
  1659.             OrigRow2$ = "AND LOST  THAN NEVER  ": row2$ = OrigRow2$
  1660.             OrigRow3$ = "TO HAVE LOVED AT ALL  ": row3$ = OrigRow3$
  1661.         CASE 39
  1662.             OrigRow1$ = "LAUGH AND THE WORLD   ": row1$ = OrigRow1$
  1663.             OrigRow2$ = " LAUGHS WITH YOU WEEP  ": row2$ = OrigRow2$
  1664.             OrigRow3$ = "   AND  YOU WEEP ALONE ": row3$ = OrigRow3$
  1665.         CASE 40
  1666.             OrigRow1$ = "OH WHAT A TANGLED WEB  ": row1$ = OrigRow1$
  1667.             OrigRow2$ = "WE WEAVE WHEN FIRST WE ": row2$ = OrigRow2$
  1668.             OrigRow3$ = "PRACTICE TO DECEIVE    ": row3$ = OrigRow3$
  1669.         CASE 41
  1670.             OrigRow1$ = "IF YOU DONT KNOW WHERE ": row1$ = OrigRow1$
  1671.             OrigRow2$ = "YOURE  GOING THEN THE  ": row2$ = OrigRow2$
  1672.             OrigRow3$ = "JOURNEYS NEVER ENDING  ": row3$ = OrigRow3$
  1673.         CASE 42
  1674.             OrigRow1$ = "ANSWER TO THE ULTIMATE ": row1$ = OrigRow1$
  1675.             OrigRow2$ = "QUESTION OF LIFE THE   ": row2$ = OrigRow2$
  1676.             OrigRow3$ = "UNIVERSE AND EVERYTHING": row3$ = OrigRow3$
  1677.         CASE 43
  1678.             OrigRow1$ = "FOOL ME ONCE SHAME ON ": row1$ = OrigRow1$
  1679.             OrigRow2$ = "YOU  FOOL ME TWICE    ": row2$ = OrigRow2$
  1680.             OrigRow3$ = "    SHAME ON ME       ": row3$ = OrigRow3$
  1681.         CASE 44
  1682.             OrigRow1$ = "A BROKEN FRIENDSHIP  ": row1$ = OrigRow1$
  1683.             OrigRow2$ = "MAY BE SOLDERED BUT  ": row2$ = OrigRow2$
  1684.             OrigRow3$ = "WILL NEVER BE SOUND  ": row3$ = OrigRow3$
  1685.         CASE 45
  1686.             OrigRow1$ = "IF YOU CANNOT HAVE THE": row1$ = OrigRow1$
  1687.             OrigRow2$ = "BEST THEN MAKE   THE  ": row2$ = OrigRow2$
  1688.             OrigRow3$ = "BEST OF WHAT YOU HAVE ": row3$ = OrigRow3$
  1689.         CASE 46
  1690.             OrigRow1$ = "HE WHO SAYS WHAT HE  ": row1$ = OrigRow1$
  1691.             OrigRow2$ = "LIKES SHALL HEAR WHAT": row2$ = OrigRow2$
  1692.             OrigRow3$ = " HE DOESNT  LIKE     ": row3$ = OrigRow3$
  1693.         CASE 47
  1694.             OrigRow1$ = "HE THAT HAS A GREAT  ": row1$ = OrigRow1$
  1695.             OrigRow2$ = "NOSE THINKS EVERYBODY": row2$ = OrigRow2$
  1696.             OrigRow3$ = "IS SPEAKING OF IT    ": row3$ = OrigRow3$
  1697.         CASE 48
  1698.             OrigRow1$ = "HE THAT WOULD HAVE   ": row1$ = OrigRow1$
  1699.             OrigRow2$ = "EGGS MUST ENDURE THE ": row2$ = OrigRow2$
  1700.             OrigRow3$ = "CRACKLING OF THE HENS": row3$ = OrigRow3$
  1701.         CASE 49
  1702.             OrigRow1$ = "A  FRIEND IS SOMEONE": row1$ = OrigRow1$
  1703.             OrigRow2$ = "KNOWS ALL ABOUT YOU ": row2$ = OrigRow2$
  1704.             OrigRow3$ = " AND STILL LOVES YOU": row3$ = OrigRow3$
  1705.  
  1706.         CASE 50
  1707.             OrigRow1$ = "A MAN OF  WORDS AND ": row1$ = OrigRow1$
  1708.             OrigRow2$ = "NOT DEEDS IS LIKE A ": row2$ = OrigRow2$
  1709.             OrigRow3$ = "GARDEN FULL OF WEEDS": row3$ = OrigRow3$
  1710.  
  1711.             'failsafe...
  1712.         CASE ELSE
  1713.             OrigRow1$ = "TO ERR IS HUMAN  ": row1$ = OrigRow1$
  1714.             OrigRow2$ = "TO FORGIVE DEVINE": row2$ = OrigRow2$
  1715.             OrigRow3$ = "                 ": row3$ = OrigRow3$
  1716.  
  1717.     END SELECT
  1718.  
  1719.     remix:
  1720.  
  1721.     'maybe make tag to set if 1&2 were not swapped, swap 1&3, if no space.?
  1722.  
  1723.     '=== Randomly Mix up the letters in rows
  1724.     FOR t = 1 TO LEN(row1$)
  1725.         '=== mix up row 1 with 2
  1726.         r1$ = MID$(row1$, t, 1)
  1727.         r2$ = MID$(row2$, t, 1)
  1728.         '=== Only swap 1 & 2 when no space present
  1729.         IF r1$ <> " " AND r2$ <> " " THEN
  1730.             IF INT(RND * 2) = 1 THEN
  1731.                 MID$(row1$, t, 1) = r2$
  1732.                 MID$(row2$, t, 1) = r1$
  1733.             END IF
  1734.         END IF
  1735.         '=== mix up row 2 with 3
  1736.         r2$ = MID$(row2$, t, 1)
  1737.         r3$ = MID$(row3$, t, 1)
  1738.         '=== Only swap 2 &3 when no space present
  1739.         IF r2$ <> " " AND r3$ <> " " THEN
  1740.             IF INT(RND * 2) = 1 THEN
  1741.                 MID$(row2$, t, 1) = r3$
  1742.                 MID$(row3$, t, 1) = r2$
  1743.             END IF
  1744.         END IF
  1745.     NEXT
  1746.  
  1747.     '=== just in case no mixing occurred (happens once in a blue moon)..
  1748.     IF OrigRow1$ = row1$ AND OrigRow2$ = row2$ THEN GOTO remix
  1749.  
  1750.  
  1751. '==================================================================================================
  1752. '===================================================================================================
  1753.  
  1754. '======================================================================================
  1755. '                                  ScrollScreenDown
  1756. '======================================================================================
  1757.  
  1758.  
  1759. SUB ScrollScreenDown (image&, speed!)
  1760.  
  1761.     '=== This SUB Scrolls Down a previously opened image.
  1762.     '=== image& = previously opened image handle to use.
  1763.     '=== THE IMAGE MUST BE PREVIOUSLY OPENED OR AN ERROR WILL OCCUR!
  1764.     '=== speed& = Value for the _LIMIT.
  1765.  
  1766.     FOR y = -767 TO 0 STEP 25
  1767.         _PUTIMAGE (0, y), image&, 0
  1768.         _DISPLAY
  1769.         _LIMIT speed!
  1770.     NEXT
  1771.  
  1772.     _PUTIMAGE , image&, 0 'make sure it's centered
  1773.     _DISPLAY
  1774.  
  1775.  
  1776.  
  1777.  
  1778. '======================================================================================
  1779. '                                  ScrollScreenUp
  1780. '======================================================================================
  1781.  
  1782.  
  1783. SUB ScrollScreenUp (image&, speed!)
  1784.  
  1785.     '=== This SUB Scrolls the screen UP out of sight.
  1786.     '=== image& = previously opened image handle to use.
  1787.     '=== THE IMAGE MUST BE PREVIOUSLY OPENED OR AN ERROR WILL OCCUR!
  1788.     '=== speed! = Value for the _LIMIT.
  1789.  
  1790.     '=== NOTE: If image& value is 0, then scrolls up the current screen.
  1791.  
  1792.     usecurrent = 0
  1793.     IF image& = 0 OR image& > -1 THEN
  1794.         'image& = _SCREENIMAGE
  1795.         image& = _COPYIMAGE(_DISPLAY)
  1796.         usecurrent = 1
  1797.     END IF
  1798.  
  1799.     rev = 767
  1800.     FOR y = 0 TO -767 STEP -25
  1801.         _PUTIMAGE (0, y), image&, 0: _DISPLAY
  1802.         LINE (0, rev - 25)-(1023, rev), _RGB32(0, 0, 0), BF
  1803.         rev = rev - 25
  1804.         _LIMIT speed!
  1805.     NEXT
  1806.  
  1807.     IF usecurrent = 1 THEN _FREEIMAGE image&
  1808.  
  1809.  
  1810.  
  1811.  
  1812. '======================================================================================
  1813. '                                  StoneRoll
  1814. '======================================================================================
  1815.  
  1816.  
  1817. SUB StoneRoll (way$, image&, speed!)
  1818.  
  1819.     '=== The SUB rolls a stone column sequence left or right.
  1820.     '=== An optional image& can be given to drag along from behind.
  1821.     '=== way$: "LEFT" = Roll left. "RIGHT" = Roll right.
  1822.     '=== image& = Optional Previously opened imagehandle to drag in.
  1823.     '=== speed! = Value for the _LIMIT. (I think in fps)
  1824.  
  1825.     '=== Load the stone column image sequence below....
  1826.  
  1827.     REDIM rollframe(0 TO 5) AS LONG
  1828.     FOR t = 0 TO 5: a$ = LTRIM$(STR$(t))
  1829.         IF LEN(a$) = 2 THEN a$ = "00" + a$
  1830.         IF LEN(a$) = 1 THEN a$ = "000" + a$
  1831.         rollframe(t) = _LOADIMAGE(source$ + "vid\roll" + a$ + ".jpg")
  1832.     NEXT
  1833.  
  1834.     IF sfxflag = 1 THEN
  1835.         roll& = _SNDOPEN(source$ + "sfx\sfx_roll.ogg", "VOL,SYNC,LEN,PAUSE")
  1836.         _SNDPLAY roll&
  1837.     END IF
  1838.  
  1839.     '=== choose what to do...
  1840.  
  1841.     SELECT CASE UCASE$(way$)
  1842.  
  1843.         CASE "RIGHT"
  1844.             x = -135
  1845.             DO
  1846.                 FOR t = 0 TO 5 STEP 1
  1847.                     a$ = LTRIM$(STR$(t))
  1848.                     IF LEN(a$) = 2 THEN a$ = "00" + a$
  1849.                     IF LEN(a$) = 1 THEN a$ = "000" + a$
  1850.                     _PUTIMAGE (x, 0), rollframe(t), 0
  1851.                     _DISPLAY
  1852.                     IF image& <> 0 THEN
  1853.                         IF x > 1024 THEN
  1854.                             _PUTIMAGE (0, RND * 2), image&, 0
  1855.                         ELSE
  1856.                             _PUTIMAGE (x - 1024, RND * 2), image&, 0
  1857.                         END IF
  1858.                         _DISPLAY
  1859.                     ELSE
  1860.                         LINE (x - 20, 0)-(x, 768), _RGB32(0, 0, 0), BF
  1861.                     END IF
  1862.                     x = x + 20
  1863.                     _LIMIT speed!
  1864.                     '_AUTODISPLAY
  1865.                 NEXT
  1866.             LOOP UNTIL x > 1024 + 135
  1867.  
  1868.         CASE "LEFT"
  1869.  
  1870.             x = 1024
  1871.             DO
  1872.                 FOR t = 5 TO 0 STEP -1
  1873.                     a$ = LTRIM$(STR$(t))
  1874.                     IF LEN(a$) = 2 THEN a$ = "00" + a$
  1875.                     IF LEN(a$) = 1 THEN a$ = "000" + a$
  1876.                     _PUTIMAGE (x, 0), rollframe(t), 0
  1877.                     _DISPLAY
  1878.                     IF image& <> 0 THEN
  1879.                         IF x > -135 THEN
  1880.                             _PUTIMAGE (x + 135, RND * 2), image&, 0
  1881.                         ELSE
  1882.                             _PUTIMAGE (0, RND * 2), image&, 0
  1883.                         END IF
  1884.                         _DISPLAY
  1885.                     ELSE
  1886.                         LINE (x + 135, 0)-(1023, 767), _RGB32(0, 0, 0), BF
  1887.                     END IF
  1888.                     x = x - 20
  1889.                     _LIMIT speed!
  1890.                     '_AUTODISPLAY
  1891.                 NEXT
  1892.             LOOP UNTIL x < -135
  1893.  
  1894.     END SELECT
  1895.  
  1896.     '== center screen if image given
  1897.  
  1898.     IF image& <> 0 THEN
  1899.         _PUTIMAGE , image&, 0
  1900.         _DISPLAY
  1901.     END IF
  1902.  
  1903.     IF sfxflag = 1 THEN
  1904.         _SNDSTOP roll&
  1905.         _SNDCLOSE roll&
  1906.     END IF
  1907.  
  1908.     '=== free up used image handles
  1909.  
  1910.     FOR t = 0 TO 5
  1911.         _FREEIMAGE rollframe(t)
  1912.     NEXT
  1913.  
  1914.  
  1915.  
  1916. '==================================================================================
  1917.  
  1918. SUB ScreenCurtain (way$, left&, right&, speed!)
  1919.  
  1920.     '=== This opened and closes the screen like a curtain.
  1921.     '=== It uses two previously opened images which are just
  1922.     '=== the screen split into a left & right side.
  1923.     '=== way$: "OPEN" = open curtain, "CLOSE" = Close it
  1924.     '=== speed! = Value for the _LIMIT
  1925.  
  1926.     SELECT CASE UCASE$(way$)
  1927.  
  1928.         CASE "CLOSE"
  1929.  
  1930.  
  1931.             IF sfxflag = 1 THEN
  1932.                 roll& = _SNDOPEN(source$ + "sfx\sfx_roll.ogg", "VOL,SYNC,LEN,PAUSE")
  1933.                 _SNDPLAY roll&
  1934.             END IF
  1935.  
  1936.             x2 = 1024
  1937.             FOR x = -511 TO 0 STEP 4
  1938.                 'The y is randoming shaked up
  1939.                 'for a dragging effect
  1940.                 _PUTIMAGE (x, RND * 2), left&, 0:
  1941.                 _PUTIMAGE (x2, RND * 2), right&, 0:
  1942.  
  1943.                 x2 = x2 - 4
  1944.                 _LIMIT speed!
  1945.  
  1946.             NEXT
  1947.  
  1948.             '=== make sure image is centered
  1949.             _PUTIMAGE (0, 0), left&, 0:
  1950.             _PUTIMAGE (513, 0), right&, 0: _DISPLAY
  1951.  
  1952.             _AUTODISPLAY
  1953.  
  1954.             IF sfxflag = 1 THEN
  1955.                 _SNDSTOP roll&: _SNDCLOSE roll&
  1956.                 _SNDPLAYFILE source$ + "sfx\sfx_boom.mp3"
  1957.             END IF
  1958.  
  1959.             '=== A little shake to show joining
  1960.             ScreenShake 0, 4, 3, 60
  1961.  
  1962.         CASE "OPEN"
  1963.  
  1964.             x2 = 513
  1965.             FOR x = 0 TO -512 STEP -5
  1966.                 CLS
  1967.                 _PUTIMAGE (x, RND * 2), left&, 0:
  1968.                 _PUTIMAGE (x2, RND * 2), right&, 0: _DISPLAY
  1969.                 x2 = x2 + 5
  1970.                 _LIMIT speed!
  1971.  
  1972.             NEXT
  1973.  
  1974.             _AUTODISPLAY: CLS 'Clear the screen
  1975.  
  1976.     END SELECT
  1977.  
  1978.  
  1979.  
  1980. '======================================================================================
  1981. '                                     ScreenShake
  1982. '======================================================================================
  1983.  
  1984.  
  1985. SUB ScreenShake (image&, val1, val2, speed!)
  1986.  
  1987.     '=== This SUB shakes the current screen
  1988.     '=== image& = previously image handle to use.
  1989.     '=== val1 = first loop (x)
  1990.     '=== val2 = second loop  (y)
  1991.     '=== speed! = Value for the _LIMIT
  1992.  
  1993.     '=== NOTE: Ifimage& = 0 then uses current screen.
  1994.  
  1995.     usecurrent = 0
  1996.     IF image& = 0 OR image& > -1 THEN
  1997.         image& = _COPYIMAGE(_DISPLAY)
  1998.         usecurrent = 1
  1999.     END IF
  2000.  
  2001.     FOR g = val1 TO 1 STEP -1
  2002.         FOR S = 1 TO val2
  2003.             _PUTIMAGE (RND * (S * g), RND * (S * g))-(1023, 767), image&, 0
  2004.             _DISPLAY
  2005.             _LIMIT speed!
  2006.             _AUTODISPLAY
  2007.         NEXT
  2008.     NEXT
  2009.  
  2010.     '=== center screen after shaking
  2011.     _PUTIMAGE , image&, 0
  2012.     _DISPLAY
  2013.  
  2014.     IF usecurrent = 1 THEN _FREEIMAGE image&
  2015.  
  2016.  
  2017.  
  2018.  
  2019. '======================================================================================
  2020. '======================================================================================
  2021.  
  2022.  
  2023. SUB Credits ()
  2024.  
  2025.     left& = _LOADIMAGE(source$ + "img\paper-title-left.jpg")
  2026.     right& = _LOADIMAGE(source$ + "img\paper-title-right.jpg")
  2027.  
  2028.     IF _SNDPLAYING(music&) THEN _SNDSTOP music&
  2029.  
  2030.     IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_roll.ogg"
  2031.  
  2032.     ScreenCurtain "CLOSE", left&, right&, 60
  2033.  
  2034.     _FREEIMAGE left&
  2035.     _FREEIMAGE right&
  2036.  
  2037.     _DELAY .15
  2038.  
  2039.     '=== load crumble frame numbers...
  2040.     DIM framenum(0 TO 14) AS LONG
  2041.     FOR t = 0 TO 14
  2042.         a$ = LTRIM$(STR$(t))
  2043.         IF LEN(a$) = 2 THEN a$ = "00" + a$
  2044.         IF LEN(a$) = 1 THEN a$ = "000" + a$
  2045.         framenum(t) = _LOADIMAGE(source$ + "vid\crum" + a$ + ".jpg")
  2046.     NEXT
  2047.  
  2048.     '=== start crumble sound
  2049.  
  2050.     IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_crumble.ogg"
  2051.  
  2052.     '=== BIG Shake
  2053.     FOR b = 1 TO 2
  2054.         ScreenShake 0, 6, 5, 60
  2055.     NEXT
  2056.  
  2057.     'CRUMLE!!!!
  2058.     FOR t = 0 TO 14
  2059.         _PUTIMAGE (0, 0), framenum(t)
  2060.         _LIMIT 15
  2061.         'IF INKEY$ <> "" THEN EXIT DO
  2062.     NEXT
  2063.  
  2064.     CLS
  2065.  
  2066.     'WASH OUT!!!!
  2067.     FOR t = 0 TO 255 STEP 6
  2068.         LINE (0, 0)-(1023, 767), _RGB32(t, t, t), BF
  2069.         _LIMIT 50
  2070.     NEXT
  2071.     FOR t = 255 TO 0 STEP -4
  2072.         LINE (0, 0)-(1023, 767), _RGB32(t, t, t), BF
  2073.         _LIMIT 50
  2074.     NEXT
  2075.     CLS
  2076.  
  2077.     IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_fanfare.ogg"
  2078.  
  2079.     _DELAY 2
  2080.  
  2081.     'free all image handles...
  2082.     FOR t = 0 TO 14
  2083.         _FREEIMAGE framenum(t)
  2084.     NEXT
  2085.  
  2086.     creditmusic& = _SNDOPEN(source$ + "sfx\credits.ogg")
  2087.  
  2088.     IF musicflag = 1 THEN _SNDLOOP creditmusic&
  2089.  
  2090.     pic& = _LOADIMAGE(source$ + "\img\win.jpg")
  2091.  
  2092.     y = -768
  2093.  
  2094.     DO
  2095.         CLS
  2096.         _PUTIMAGE (0, 0), pic&, 0, (0, y)-(1024, y + 768)
  2097.         y = y + 1: IF y > 5672 THEN EXIT DO 'or y = 0 to start over
  2098.         IF INKEY$ <> "" THEN EXIT DO
  2099.         x1 = RND * 1024: y1 = RND * 768
  2100.         LINE (x1, y1)-(x1 + 12, y1 + 1), _RGB32(115, 115, 115), BF 'across
  2101.         LINE (x1 + 6, y1 - 6)-(x1 + 7, y1 + 6), _RGB32(115, 115, 115), BF 'down
  2102.         FOR p = 1 TO 1000
  2103.             PSET (RND * 1024, RND * 768), _RGB32(115, 115, 115)
  2104.         NEXT
  2105.         _LIMIT 50
  2106.         _DISPLAY
  2107.     LOOP
  2108.  
  2109.     _FREEIMAGE pic&
  2110.  
  2111.     IF _SNDPLAYING(creditmusic&) THEN _SNDSTOP creditmusic&
  2112.     _SNDCLOSE creditmusic&
  2113.  
  2114.  
  2115. '======================================================================================
  2116. '======================================================================================
  2117.  
  2118. SUB ButtonShow (ButtonFile$, x, y)
  2119.     btn& = _LOADIMAGE(source$ + "img\" + ButtonFile$, 32)
  2120.     _PUTIMAGE (x, y), btn&, 0
  2121.     '_DISPLAY: _AUTODISPLAY
  2122.     _FREEIMAGE btn&
  2123.  
  2124. '======================================================================================
  2125. '======================================================================================
  2126.  
  2127. SUB ButtonClick (ButtonType%, ButtonFile$, x, y)
  2128.     '=== ButtonType% is if a hover highlighted button on not.
  2129.  
  2130.     IF sfxflag = 1 THEN _SNDPLAYFILE source$ + "sfx\sfx_click.mp3"
  2131.     IF ButtonType% = 0 THEN
  2132.         ButtonShow "_" + ButtonFile$, x, y: _DELAY .15
  2133.         ButtonShow ButtonFile$, x, y: _DELAY .15
  2134.     ELSE
  2135.         ButtonShow ButtonFile$, x, y: _DELAY .15
  2136.         ButtonShow "_" + ButtonFile$, x, y: _DELAY .15
  2137.         ButtonShow ButtonFile$, x, y
  2138.     END IF
  2139.  
  2140.  

 
Written In Stone Screenshot.jpg

* WrittenInStone-v1.1-QB64GL.zip (Filesize: 2.89 MB, Downloads: 346)
« Last Edit: April 08, 2020, 05:47:35 am by Qwerkey »