The Bob s graphics tutorial updated for qb64

Announce and discuss the progress of your various programming-related projects...programs, games, websites, tutorials, libraries...anything!

Moderators: Pete, Mods

User avatar
GarryRicketson
Veteran
Posts: 90
Joined: Fri Jul 16, 2010 10:02 am
Location: Cuencame,Durango,Mexico
Contact:

The Bob s graphics tutorial updated for qb64

Postby GarryRicketson » Thu Jun 06, 2013 9:18 pm

Some of you all ready know this, but for those that don't know about it,..
"The Bob", upgraded, or updated his qbasic graphics tutorial with qb64 so that it can run on windows, "QBG.zip"
It is available on dropbox. :
https://www.dropbox.com/s/1iwpcufomow8wip/qbg.zip
This is a great tutorial on graphics with qbasic, and qb64,
Guess that is all for now, from garry
Edited: He was also kind enough to include the .bas (source).
https://www.dropbox.com/s/xu5law2lu1q2qe1/qbg.bas
You will still need the QBG.ZIP because it contains the images needed.
Also if you want to compile this with qb64 for linux, you will find this very useful,

'' quote: The BobThis seems to change all the upper/lowercase filenames to uppercase, including the calls to the PutIMAGE and Display sub programs that caused the 1% problems. If anything explodes, at least you have the option of downloading QBG.BAS again. '' end quote.

-------------------------- code below------------------------------


'Copy code from here ------------------------------------------------------
OPEN "QBG.BAS" FOR INPUT AS #1
OPEN "QBGL.BAS" FOR OUTPUT AS #2 'QBGL for "Linux"?
DO WHILE NOT EOF(1)
LINE INPUT #1, Text$
Search$ = "Display " + CHR$(34)
Search2$ = "OPEN " + CHR$(34)

IF INSTR(Text$, "BLOAD") THEN
IF INSTR(Text$, "PRINT") = 0 THEN Text$ = UCASE$(Text$)
END IF

IF INSTR(Text$, "PutIMAGE") THEN Text$ = UCASE$(Text$)
IF INSTR(Text$, Search$) THEN Text$ = UCASE$(Text$)

IF INSTR(Text$, Search2$) THEN
IF INSTR(Text$, "CHR$(34)") = 0 THEN
IF INSTR(Text$, "PRINT") = 0 THEN Text$ = UCASE$(Text$)
END IF
END IF

PRINT #2, Text$
LOOP
CLOSE #1, #2

'The IF blocks with the extra tests are to distinguish actual lines of
'code from instructional examples in the printed text. Let me know if
'it works out.
--------------------------- end code --------------------------

'-Bob
--------------------------------------------------------------------------
Run the above utility , to change the case of the filenames, etc if you are trying to compile this with qb64 for linux,..it worked fine for me.

Return to “News and Announcements”

Who is online

Users browsing this forum: No registered users and 8 guests