Weekly Qbasic and Qb64 Lesson Topics
January 22, 2018, 10:16:32 pm
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

Splash Image


Pages: [1]
  Print  
Author Topic: Splash Image  (Read 231 times)
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« on: April 06, 2012, 12:22:16 pm »

This a splash Image I made, as a Demo
The .bas is very long and dose not fit in the code window, here is the drop box
http://dl.dropbox.com/u/15387474/GoodSplash1.bas.zip
 And this other one has the game written by Terry Richie, SMGBGE,..
http://dl.dropbox.com/u/15387474/SMGBUG-qb64splash.bas.zip
This uses the QB64 Logo as the splash.
« Last Edit: April 06, 2012, 12:29:48 pm by GarrisonRicketson » Report Spam   Logged

Social Buttons

GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #1 on: April 08, 2012, 08:37:00 am »

Thanks too Galleon, and Terrie Richie, this developed, into a practical and useful utility.
http://www.qb64.net/forum/index.php?topic=5816.msg59940#msg59940
  For more details,
Below is a sample of the ultimate,"version" so to speak.
Copied from qb64.net:
Code:
'*************************
'* SPLASH SCREEN CREATOR *
'*************************
'

DIM strdata$
DIM filename$
DIM splashfile$
DIM count&
DIM outputfile$
DIM yesno$

strdata$ = ""
CLS
PRINT "SPLASH SCREEN CREATOR"
PRINT
PRINT "Enter file name of image to convert."
PRINT "(enter nothing to quit)"
PRINT
LINE INPUT "> "; filename$
IF filename$ = "" THEN END
IF NOT _FILEEXISTS(filename$) THEN
    PRINT
    PRINT "FILE NOT FOUND!"
    END
END IF
PRINT
PRINT "Enter file name of output (ex: splash1.bas)"
PRINT "(enter nothing to quit)"
PRINT
LINE INPUT "> "; outputfile$
IF outputfile$ = "" THEN END
PRINT
PRINT "Include QB64 viewer code in output?"
PRINT "(Y = include viewing code)"
PRINT "(N = just output the string data)"
PRINT
DO
    LINE INPUT "(Y/N)> "; yesno$
    yesno$ = LEFT$(UCASE$(yesno$), 1)
LOOP UNTIL yesno$ = "Y" OR yesno$ = "N"
PRINT
PRINT "Creating "; outputfile$; "... one moment please"
IF INSTR(filename$, ".") THEN
    splashfile$ = LEFT$(filename$, INSTR(filename$, ".") - 1) + RIGHT$(filename$, LEN(filename$) - INSTR(filename$, "."))
ELSE
    splashfile$ = filename$
END IF
OPEN outputfile$ FOR OUTPUT AS #2
IF yesno$ = "Y" THEN
    PRINT #2, "'************************"
    PRINT #2, "'* SPLASH SCREEN VIEWER *"
    PRINT #2, "'************************"
    PRINT #2, ""
    PRINT #2, "DIM "; splashfile$; "$"
    PRINT #2, "DIM byte~%%"
    PRINT #2, "DIM count&"
    PRINT #2, "DIM splash&"
    PRINT #2, "DIM "; splashfile$; "_bin$"
    PRINT #2, ""
END IF
PRINT #2, splashfile$; "$ = "; CHR$(34);
OPEN filename$ FOR BINARY AS #1
strdata$ = SPACE$(LOF(1))
GET #1, , strdata$
CLOSE #1
FOR count& = 1 TO LEN(strdata$)
    PRINT #2, RIGHT$("0" + HEX$(ASC(strdata$, count&)), 2);
NEXT count&
PRINT #2, CHR$(34)
IF yesno$ = "Y" THEN
    PRINT #2, ""
    PRINT #2, splashfile$; "_bin$ = SPACE$(LEN("; splashfile$; "$) \ 2)"
    PRINT #2, "FOR count& = 1 TO LEN("; splashfile$; "_bin$)"
    PRINT #2, "    ASC("; splashfile$; "_bin$, count&) = VAL("; CHR$(34); "&H"; CHR$(34); " + MID$("; splashfile$; "$, (count& - 1) * 2 + 1, 2))"
    PRINT #2, "NEXT count&"
    PRINT #2, "OPEN "; CHR$(34); "splash_"; filename$; CHR$(34); " FOR BINARY AS #1"
    PRINT #2, "PUT #1, , "; splashfile$; "_bin$"
    PRINT #2, "CLOSE #1"
    PRINT #2, ""
    PRINT #2, "splash& = _LOADIMAGE("; CHR$(34); "splash_"; filename$; CHR$(34); ", 32)"
    PRINT #2, "SCREEN splash&"
    PRINT #2, "_DELAY 5"
    PRINT #2, "SCREEN _NEWIMAGE(640, 480, 32)"
    PRINT #2, "KILL "; CHR$(34); "splash_"; filename$; CHR$(34)
    PRINT #2, "_FREEIMAGE splash&"
    PRINT #2, "PRINT "; CHR$(34); "CONTINUE YOUR PROGRAM HERE"; CHR$(34)
END IF
CLOSE #2
PRINT
PRINT outputfile$; " has been successfully created."

From Garry
Report Spam   Logged


Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Buy traffic for your forum/website
traffic-masters
Powered by SMF | SMF © 2016, Simple Machines