Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Merry Christmas Scroller
#1
Here is my offering for Christmas. You will need to switch of any Screen Saver if you intend to place a monitor running it in a window all over Christmas, or devise a simulated Ctrl key press. I could not get it to compile with FB as it does not like my silent SOUND delay, or persuade it to display full screen.

Gordon

Code:
DEFSNG A-Z
     REM Neon Lights
     SCREEN 13
     P = 65536 * 0 + 256 * 10 + 0: PALETTE 0, P: b = b + 1
     P = 65536 * 0 + 256 * 12 + 0: PALETTE 2, P: b = b + 1
     REM near invisible color 2
     COLOR 2: LOCATE 1, 1
     PRINT "    MERRY CHRISTMAS TO ALL    "
MORE:
     xp% = 10: yp% = 60: a% = 0: b% = 210
     WHILE a% < 212: REM change b%, and a% limit for a text change
        FOR x% = a% TO b%
          FOR y% = 0 TO 6
            IF POINT(x%, y%) <> 0 THEN COLOR 12 ELSE COLOR 0
            CIRCLE (xp%, yp%), 5: PAINT (xp% + 1, yp%)
            yp% = yp% + 10
          NEXT y%
          xp% = xp% + 10: yp% = 60
        NEXT x%
    SOUND 30000,4 : REM silent delay
        a% = a% + 1: b% = b% + 1: xp% = 10: yp% = 60
        COLOR 7: LOCATE 23, 17: PRINT TIME$
        IF INKEY$ <> "" THEN STOP
     WEND: GOTO MORE
Reply
#2
Couldn't you just do this for FB?

Code:
DEFSNG A-Z
     REM Neon Lights
     SCREEN 13,,,1
     P = 65536 * 0 + 256 * 10 + 0: PALETTE 0, P: b = b + 1
     P = 65536 * 0 + 256 * 12 + 0: PALETTE 2, P: b = b + 1
     REM near invisible color 2
     COLOR 2: LOCATE 1, 1
     PRINT "    MERRY CHRISTMAS TO ALL    "
MORE:
     xp% = 10: yp% = 60: a% = 0: b% = 210
     WHILE a% < 212: REM change b%, and a% limit for a text change
        FOR x% = a% TO b%
          FOR y% = 0 TO 6
            IF POINT(x%, y%) <> 0 THEN COLOR 12 ELSE COLOR 0
            CIRCLE (xp%, yp%), 5: PAINT (xp% + 1, yp%)
            yp% = yp% + 10
          NEXT y%
          xp% = xp% + 10: yp% = 60
        NEXT x%
SLEEP 50
        a% = a% + 1: b% = b% + 1: xp% = 10: yp% = 60
        COLOR 7: LOCATE 23, 17: PRINT TIME$
        IF INKEY$ <> "" THEN STOP
     WEND: GOTO MORE
url=http://www.sloganizer.net/en/][Image: style4,TheDarkJay.png][/url]
Reply
#3
Thanks. I didn't try very hard with FB did I? Actually a few stars makes a difference. If anyone cares to goto below and download the UTILITES, they will find a nice BBCBASIC version, using proper Windows Fonts under XMASscrol2 created with help from Richard Russell. Click on BBCMENU.EXE and it has the simulated Ctrl press included to block any screen saver.

http://sionet.mysite.wanadoo-members.co....CBASIC.htm

Gordon

Code:
DEFSNG A-Z
     REM Neon Lights
     SCREEN 13, , , 1: COLOR 15
     FOR star = 1 TO 20
AGAIN:    xs% = RND * 38 + 1: ys% = RND * 23 + 1
      IF ys% > 5 AND ys% < 18 THEN GOTO AGAIN
          LOCATE ys%, xs%: PRINT "*";
     NEXT star
     P = 65536 * 0 + 256 * 10 + 0: PALETTE 0, P
     P = 65536 * 0 + 256 * 12 + 0: PALETTE 2, P
     REM near invisible color 2
     COLOR 2: LOCATE 1, 1
     PRINT "    MERRY CHRISTMAS TO ALL    "
MORE:
     xp% = 10: yp% = 60: a% = 0: b% = 210
     WHILE a% < 212: REM change b%, and a% limit for a text change
        FOR x% = a% TO b%
          FOR y% = 0 TO 6
            IF POINT(x%, y%) <> 0 THEN COLOR 12 ELSE COLOR 0
            CIRCLE (xp%, yp%), 5: PAINT (xp% + 1, yp%)
            yp% = yp% + 10
          NEXT y%
          xp% = xp% + 10: yp% = 60
        NEXT x%
SLEEP 50
        a% = a% + 1: b% = b% + 1: xp% = 10: yp% = 60
        COLOR 7: LOCATE 23, 17: PRINT TIME$
        IF INKEY$ <> "" THEN STOP
     WEND: GOTO MORE
Reply
#4
pretty nice
Reply
#5
Gordon:

I have a question. If a program starts with the DEFSNG A-Z, why does it refer to variables as a%, b%, x%, y%, etc? Having declared that they are SINGLE, why are they then redefined as integers? Why not just use DEFINT A-Z and a, b, x, y, etc.?
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)