Author Topic: [video] QB64 v2 - Stepping  (Read 3035 times)

0 Members and 1 Guest are viewing this topic.

FellippeHeitor

  • Guest
[video] QB64 v2 - Stepping
« on: October 22, 2021, 07:44:36 pm »
So you added the new $Debug metacommand in your program. Now what?


Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: [video] QB64 v2 - Stepping
« Reply #1 on: October 22, 2021, 08:13:47 pm »
  • Best Answer
  • Ah, so F6 is really only for people who make mistakes. Well, no wooreis hear. Knot sumthiinng I sea myselph kneading.

    Hey have you ever thought of getting an animated dog to do these spots? We could call him QB Doo 🐶

    Just a thought...

    Kidding aside, love it. Keep um coming. OH, and have you thought about a video library section for these?

    Pete
    « Last Edit: October 22, 2021, 10:41:48 pm by Pete »
    Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

    FellippeHeitor

    • Guest
    Re: [video] QB64 v2 - Stepping
    « Reply #2 on: October 22, 2021, 11:17:05 pm »
  • Best Answer
  • Thanks, Pete.

    I don’t think an extra section is needed, since these are all grouped in the YouTube channel, but I’ll leave it to the librarians.

    Offline SMcNeill

    • QB64 Developer
    • Forum Resident
    • Posts: 3972
      • View Profile
      • Steve’s QB64 Archive Forum
    Re: [video] QB64 v2 - Stepping
    « Reply #3 on: October 23, 2021, 12:15:46 am »
  • Best Answer
  • Hey have you ever thought of getting an animated dog to do these spots? We could call him QB Doo 🐶

    How about an animated paper clip?  Call him Qlippy-B64!
    https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

    Offline Pete

    • Forum Resident
    • Posts: 2361
    • Cuz I sez so, varmint!
      • View Profile
    Re: [video] QB64 v2 - Stepping
    « Reply #4 on: October 23, 2021, 12:57:09 am »
  • Best Answer
  • How about an animated paper clip?  Call him Qlippy-B64!

    Nope! I'll stick with QB-Doo, for Version 2!

    Code: QB64: [Select]
    1. title$ = "QB-Doo Version 2"
    2. _TITLE title$
    3. Screen0 = _NEWIMAGE(80, 25, 0)
    4. SCREEN Screen0
    5.  
    6.  
    7. COLOR 0, 7
    8. FOR x = 1 TO 25
    9.     LOCATE x, 1: PRINT STRING$(80, 176);
    10.  
    11. _DEST overlay
    12. COLOR MidnightBlue, 0
    13.  
    14. REDIM text$(6)
    15. i = 0
    16.     i = i + 1
    17.     DO
    18.         READ a
    19.         IF a = 0 THEN EXIT DO
    20.         text$(i) = text$(i) + CHR$(a)
    21.     LOOP
    22. LOOP UNTIL i = 6
    23.  
    24. font = _LOADFONT("lucon.ttf", 25, "monospace")
    25. IF font <= 0 THEN font = 16
    26. _FONT font
    27.  
    28. 'music$ = "L6n33n33n31n31L2n29L6n31n33L3n26P4L4n31L6n28L2n24L6n33n33L4n31L2n29"
    29. 'music$ = "MBO4" + music$ + music$
    30. music$ = "MBO4" + "L7n33n33n31n31L4n29 P8 L8n31L7n33L4n26 P6 L5n31L8n28L4n24L7n33n33n31L4n29"
    31. music$ = music$ + "P6 L7n33n33n31n31L4n29 P8 L6n31n33L4n34 P6 L5n31L8n28L4n24L7n33n33n31L4n29"
    32.  
    33. PLAY music$
    34.  
    35. startrow = 2
    36. FOR k = 1 TO 6
    37.     t$ = text$(k)
    38.     y = startrow + k * 2 - 1 ' Double space.
    39.  
    40.     pslc y, t$, overlay, Overlay_hardware
    41.  
    42.     _DELAY 1.9
    43.  
    44. _FONT 16 'select inbuilt 8x16 default font
    45. _FREEFONT font ' Must be placed after the font is changed.
    46.  
    47. COLOR Black, 0
    48. msg$ = "Press space bar to toggle overlay. Press Esc to end."
    49.  
    50. psl 25, 1, msg$, overlay, Overlay_hardware
    51.  
    52. _DELAY .75
    53.     _LIMIT 30
    54.     b$ = INKEY$
    55.     IF LEN(b$) THEN
    56.         IF b$ = CHR$(27) THEN EXIT DO
    57.         IF Show_Overlay THEN _PUTIMAGE (0, 0), Overlay_hardware
    58.         Show_Overlay = NOT Show_Overlay
    59.         _DISPLAY
    60.     END IF
    61.  
    62. _FREEIMAGE Overlay_hardware
    63. _DEST 0 'Reset dest back to the normal screen 0.
    64. COLOR 0, 7
    65. _DELAY .75
    66. COLOR 1, 7
    67. LOCATE 2, 2
    68. PRINT "Hi, back in SCREEN 0. Bye!"
    69. _DELAY 2.25
    70.  
    71. DATA 81,66,32,86,101,114,115,105,111,110,32,50,0
    72. DATA 89,111,117,39,114,101,32,98,114,97,110,100,32,110,101,119,0
    73. DATA 65,32,112,105,99,107,101,114,32,97,110,100,32,97,32,99,104,111,111,115,101,114,0
    74. DATA 65,110,100,32,119,101,32,97,108,108,32,119,97,110,116,32,116,111,32,117,115,101,0
    75. DATA 81,66,44,32,116,111,111,0
    76. DATA 39,67,97,117,115,101,32,70,66,39,115,32,115,117,99,104,32,97,32,108,111,115,101,114,0
    77.  
    78. SUB psl (y, x, t$, overlay, Overlay_hardware)
    79.     _PRINTSTRING ((x - 1) * _FONTWIDTH, (y - 1) * _FONTHEIGHT), t$
    80.     Overlay_hardware = _COPYIMAGE(overlay, 33)
    81.     _PUTIMAGE (0, 0), Overlay_hardware
    82.     _DISPLAY
    83.  
    84. SUB pslc (y, t$, overlay, Overlay_hardware)
    85.     _PRINTSTRING ((_WIDTH - _PRINTWIDTH(t$)) \ 2, (y - 1) * _FONTHEIGHT), t$
    86.     Overlay_hardware = _COPYIMAGE(overlay, 33)
    87.     _PUTIMAGE (0, 0), Overlay_hardware
    88.     _DISPLAY

    Pete 🎶

    Edit: We really need that QB45 PLAY(0) function implemented one of these versions.
    « Last Edit: October 25, 2021, 04:45:20 pm by Pete »
    Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/