Dark Bit Factory & Gravity
PROGRAMMING => Freebasic => Topic started by: bikerboy on December 01, 2008
-
okies i've read the tutorial it helped a lot ! ;D , i also saved it for future reference in case i need to refresh my memory.
now my question is this.
lets say i want to load a picture in the background and have a simple hello world text passing by, no special effects or music or something like that just a pic and plain text.
how will i do that ??? ::) :skint:
also what type of format should i use, .jpeg .gif .png .bmp ?
-
Heya bikerboy :) Sorry for not responding earlier.
ok i made a little something (you know how anxious i am to create a demo), but it's not entirely in free basic, actually 2 parts are freebasic and 3 parts made with "the oldschool demomaker" and i combined all that into one file.
I'm sorry but I don't really understand :P What did you actually do on this file ?
lets say i want to load a picture in the background and have a simple hello world text passing by, no special effects or music or something like that just a pic and plain text.
To load a picture (in BMP format) or Draw easily text on graphics screen in FB, you have some useful functions :)
'' 0) init graphics
Screenres 640,480,32,2
'' 1) Create a pointer
Dim as any ptr MyImage
'' 2) Allocate memory
MyImage = imageCreate(Your_Image_X_Size, Your_Image_Y_Size)
'' 3) Load your image
Bload MyImage, "location_of_your_image.bmp"
'' And then, you can put that image on screen with the.. "put" command :D
4) Draw the image on screen
Put (x,y),MyImage
'' There are a lot of cool options with put. Look on the wiki or in the help file (alpha blending, ..)
'' Now some text ?
Draw String(x,y),"What you want to write"
'hope that'll help a bit :)
-
Heya bikerboy :) Sorry for not responding earlier.
ok i made a little something (you know how anxious i am to create a demo), but it's not entirely in free basic, actually 2 parts are freebasic and 3 parts made with "the oldschool demomaker" and i combined all that into one file.
I'm sorry but I don't really understand :P What did you actually do on this file ?
not much actually ::) , i created 3 intros with OSDM and also took 2 examples from freebasic and put all those together :P
thanx for the code man ;D
/me goes to play with the code and FBide :carrot:
-
Better to code your own stuff, OSDM really sucks goat balls.
If you get stuck, please do open a topic and ask :)
-
Bis repetitam :D
I don't know OSDM but in ANY way, coding your stuff will be a thousand times more enjoyable, efficient, practical (and ego-rewarding :P)
-
lol i know, i only did it for the fun of it :xmas: , i prefer to make my own stuff (if i ever manage to do that :boxer: lol)
anyways i played with the code you gave me and i have a couple of questions.
first with the text thingie, i put this as a code, also added the sleep so the window won't close, it compiles and everything but no text appears ???
'' Now some text ?
Draw String(100,100),"What you want to write"
sleep
also a few questions about the image code.
'' 0) init graphics
Screenres 640,480,32,2
'' 1) Create a pointer
Dim as any ptr MyImage
'' 2) Allocate memory
MyImage = imageCreate(Your_Image_X_Size, Your_Image_Y_Size) *should i make this one (1.bmp_640_Size, 1.bmp_480_Size) ?*
'' 3) Load your image
Bload MyImage, "C:\Documents and Settings\bikerboy\Desktop\1.bmp" *i hope i did this correctly*
4) Draw the image on screen
Put (x,y),MyImage *should i also change this one to 4) Draw the image on screen
Put (640,480),1.bmp ?
-
Time to split these topics up into the right forums I think..
-
Split. Bikerboy, please rename this post as you wish :)
I move it to the good section and I answer you.
[...]
Done :)
Ok so, I start with the image handling :
'' 2) Allocate memory
MyImage = imageCreate(Your_Image_X_Size, Your_Image_Y_Size)
*should i make this one (1.bmp_640_Size, 1.bmp_480_Size) ?*
Nope, you replace "Your_Image_X_Size" by the actual width of the bitmap you want to load. in pixels. Idem for "Your_Image_Y_Size".
'' 3) Load your image
Bload MyImage, "C:\Documents and Settings\bikerboy\Desktop\1.bmp"*i hope i did this correctly*
hum.. I think freebasic handles "/" but I don't know about "\". The best about it is to put the image in the actual .bas file folder and loading it with just "image_name.bmp"
4) Draw the image on screen
Put (x,y),MyImage *should i also change this one to 4) Draw the image on screen
Put (640,480),1.bmp ?
Nope, "MyImage" is the pointer you allocated :) If you'd declare the pointer as My_Supa_Image, you'd write :
Put(50,50),My_Supa_Image
to put the image at the location (x=50, y=50) (it's the position of its up-left corner)
-
ok since the topic is moved and splitted i'll post here. ;)
ok i've read the help me file from freebasinc and i used this code to load a .bmp
'Load a graphic to current work page
SCREEN 18, 32
CLS
BLOAD "C:\Documents and Settings\bikerboy\Desktop\1.bmp"
'Load a 48x48 bitmap into an array
SCREEN 18, 32
DIM garray(4 * (48 * 48) + 4) AS BYTE
BLOAD "C:\Documents and Settings\bikerboy\Desktop\1.bmp", @garray(0)
PUT (10,10),garray(0)
sleep
the image i'm trying to load is this one
(http://img512.imageshack.us/img512/4740/21439448ol8.png)
FBIde gives me no errors but when i run it, it crashed FBIde ???
-
(I edited my previous post, please take a look at it :) )
'Load a graphic to current work page
SCREEN 18, 32
CLS
BLOAD "C:\Documents and Settings\bikerboy\Desktop\1.bmp"
'Load a 48x48 bitmap into an array
SCREEN 18, 32
DIM garray(4 * (48 * 48) + 4) AS BYTE
BLOAD "C:\Documents and Settings\bikerboy\Desktop\1.bmp", @garray(0)
PUT (10,10),garray(0)
sleep
You're initiating the graphics screen two times here (by calling Screen 18,32 two times)
In fact, if you're new with all this, you'd better use the method I showed you (imageCreate, etc..), it'll ensure you to allocate the good memory, everything is automatic :) Of course, learning how all this is stored in memory is really nice too but I'm not sure it's a good thing to start with :)
But it's just my humble opinion :)
Concerning this code in particular, a remark :
DIM garray(4 * (48 * 48) + 4) AS BYTElet me think your image is 48 pixels wide and 48 pixels high. If it's not the case, there's a problem here :) And the image you posted is waaay bigger than 48*48 pixels :D
-
ok now i used this code
'' 0) init graphics
Screenres 640,480,32,2
'' 1) Create a pointer
Dim as any ptr MyImage
'' 2) Allocate memory
MyImage = imageCreate(640, 480)
'' 3) Load your image
Bload MyImage, "1.bmp"
'' And then, you can put that image on screen with the.. "put" command :D
4) Draw the image on screen
Put (50,50),MyImage
and i get this
Compiler output:
C:/Program Files/FreeBASIC/FBIDETEMP.bas(11) error 55: Type mismatch, at parameter 1 of BLOAD() in 'Bload MyImage, "1.bmp"'
C:/Program Files/FreeBASIC/FBIDETEMP.bas(16) error 135: Only valid in -lang deprecated or fblite or qb in '4) Draw the image on screen'
Results:
Compilation failed
also this one here
'' Now some text ?
Draw String(100,100),"What you want to write"
sleep
compiles and runs fine but the string "What you want to write" does not appear.
EDIT: i get those errors a lot, is there something i'm missing? is there something i should do to fix it?
thanx for all your help so far :clap:
error 135: Only valid in -lang deprecated or fblite or qb, found 'option' in 'option explicit'
error 135: Only valid in -lang deprecated or fblite or qb, found 'option' in 'option static'
-
hum.. first about Bload, I'm sorry, I inverted two arguments :(
So it's not
Bload MyImage, "1.bmp"
but
Bload "1.bmp", MyImage
my bad, sry for that.
And look at the 4), it's not commented :) So the compiler was thinking it's a "command" :
Replace
4) Draw the image on screenwith
'' 4) Draw the image on screen
(don't forget the ' (comment) keyword :) )
I typed it a bit quickly maybe, sry for that. it should work now :)
Also, don't forget the "sleep" command !
-
no worries for the typos mate :D it happens to the best ;)
ok it works now perfectly ! , i also found out that it wouldn't load the bmp file when i compiled it (showed a purple screen), but is shows up if you put the bmp in the same folder with the created .exe :clap:
i also added the text and it works too, and i played a bit with it hehe ;D
/me is going to attach the .exe thingie to the post
once again thanx guys for all your help :goodpost:
EDIT: oh forgot to post the code i used ::)
'' 0) init graphics
Screenres 640,480,32,2
'' 1) Create a pointer
Dim as any ptr MyImage
'' 2) Allocate memory
MyImage = imageCreate(640, 480)
'' 3) Load your image
Bload "1.bmp", MyImage
'' And then, you can put that image on screen with the.. "put" command :D
'' 4) Draw the image on screen
Put (0,0),MyImage
Draw String(100,100),"This Is An Image Loader Test !"
Draw String(250,250),"And This Is The Text On Screen !"
Draw String(80,350),"Thank You Guys For All The help You're Giving Me With Coding !"
Draw String(0,1),"Y"
Draw String(0,20),"A"
Draw String(0,40),"Y"
Draw String(0,60),"!"
Draw String(0,80),"I"
Draw String(0,100),"t"
Draw String(0,120),"W"
Draw String(0,140),"o"
Draw String(0,160),"r"
Draw String(0,180),"k"
Draw String(0,200),"s"
Draw String(0,220),"!"
sleep
and another quick question, i tried to compile the code from this post http://www.dbfinteractive.com/forum/index.php/topic,3621.0.html (thanks Shockwave for sharing the code :clap:) , but it gives me this error.
error 24: File not found, "TINYPTC_EXT.BI" in '#INCLUDE "TINYPTC_EXT.BI"'
any idea where i can find TINYPTC_EXT.BI? ::)
-
error 24: File not found, "TINYPTC_EXT.BI" in '#INCLUDE "TINYPTC_EXT.BI"'
any idea where i can find TINYPTC_EXT.BI? ::)
@bikerboy: you can download tinyptc_ext from here -> http://www.dbfinteractive.com/forum/index.php?topic=1382.0 , any problems let me know :)
-
error 24: File not found, "TINYPTC_EXT.BI" in '#INCLUDE "TINYPTC_EXT.BI"'
any idea where i can find TINYPTC_EXT.BI? ::)
@bikerboy: you can download tinyptc_ext from here -> http://www.dbfinteractive.com/forum/index.php?topic=1382.0 , any problems let me know :)
thanx man it no longer probuces that error :goodpost:
EDIT: i tried to load this code Shockwave made, to see what it does and study the code but i get those errors,
#define dbfcls redim as integer buffer (800*600)
#Include Once "tinyptc.bi"
If( ptc_open( "Sine Scroll By Shockwave.", 800, 600 ) = 0 ) Then
End -1
End If
option dynamic
option explicit
Dim Shared As Integer Buffer( 800 * 600 ) , lp
dim shared kk as string
dim shared gadd,gadd2 as integer
declare sub DBFTEXT(BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER , BYVAL CLR AS INTEGER)
dim shared FONT (63 * 95) as integer
FOR LP=1 TO (63*95)
READ FONT(LP)
NEXT
DECLARE SUB MESSAGE()
DIM SHARED SCPTR AS INTEGER:' Letter Pointer In Scroll String.
DIM SHARED SCROFF AS DOUBLE:' Offset Used To Scroll Text
Dim Shared scrolltext as string:' Holds Text.
'=======================================================================
'Our Text;
'=======================================================================
scrolltext=" "
scrolltext=scrolltext+" "
scrolltext=scrolltext+" "
scrolltext=scrolltext+"**** A SINESCROLL IN FREEBASIC **** COOL! THIS IS USING TINYPTC "
scrolltext=scrolltext+" ---------------------- JUST HACKED TOGETHER SO THAT NEWBIES CAN USE AND ABUSE IT IN THEIR OWN STUFF! "
scrolltext=scrolltext+" ----------------------- "
scrolltext=scrolltext+" Feel free to use it... Coded by Shockwave ^ DBF "
scrolltext=scrolltext+" Tata... "
scrolltext=scrolltext+" "
scrolltext=scrolltext+" "
SCROFF=0
SCPTR=0
DO
gadd=gadd+6
gadd2=gadd2+3
'**************************************
' Remove comment to wait for vblank ***
'**************************************
wait &H3DA,8
kk=inkey$
message()
Ptc_update @buffer(0)
dbfcls
LOOP until kk=chr$(27)
Ptc_Close()
SUB MESSAGE()
dim hop,ecl,ch as integer
HOP=0:' Used to jumpto next letter pos
FOR LP=1 TO 101
CH=(ASC(MID(SCROLlTEXT,LP+SCPTR,1)))-31:' Get Ascii for char
'-----------------------------------------------------------------------
' Call DBF Custom Text Routine;
'-----------------------------------------------------------------------
DBFTEXT (HOP-scroff,296,CH,RGB(100,100,255))
HOP=HOP+8
NEXT
'--------------------------------
'Scroll And Update If Needed; ---
'--------------------------------
scroff=scroff+2
if scroff> 8 then
scptr=scptr+1
if scptr>(len(scrolltext)-75) then scptr=0
scroff=scroff-8
end if
END SUB
sub DBFTEXT(BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER , BYVAL CLR AS INTEGER)
dim blx,bly,bm,snval,snval2,mm as integer
IF CH<0 OR CH>95 THEN CH=1
'---------------------------------
'Calculate Offset In Font Data;---
'---------------------------------
bm=(ch*63)-63
FOR BLY=0 TO 8
FOR BLX=1 TO 7
snval=20*COS((BLX+BX+GADD)/100)
snval2=20*COS((BLX+BX+GADD2)/73)
'--------
'Clip;---
'--------
IF (BX+BLX>0) AND (BX+BLX<=799) AND (BY+BLY+snval+snval2>0) AND (BY+BLY+snval+snval2<599) THEN
'----------------------------------------------------
'Draw Pixel In Buffer If Onscreen And If Binary 1 ---
'----------------------------------------------------
MM= FONT(((BLY*7)+BLX)+BM)
IF MM >0 THEN BUFFER (((BY+BLY+snval+snval2)*800)+BX+BLX)=CLR
END IF
NEXT
NEXT
END SUB
'==============================================================================
' Binary Font By Shockwave / DBF; (95 Chars)
'==============================================================================
'space
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
'!
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
'"
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
'#
data 0,0,0,1,0,1,0
data 0,0,0,1,0,1,0
data 0,1,1,1,1,1,1
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 1,1,1,1,1,1,0
data 0,1,0,1,0,0,0
data 0,1,0,1,0,0,0
'£
data 0,0,0,0,0,0,0
data 0,0,1,1,0,0,0
data 0,1,0,0,1,0,0
data 0,1,0,0,0,0,0
data 0,0,1,0,0,0,0
data 0,1,1,1,1,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,1,1,1,1,1,1
'%
data 0,1,0,0,0,0,0
data 1,0,1,0,0,0,1
data 0,1,0,0,0,1,0
data 0,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
data 0,1,0,0,0,1,0
data 1,0,0,0,1,0,1
data 0,0,0,0,0,1,0
'&
data 0,0,1,1,0,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,0,1,0,0,0,0
data 0,1,1,0,0,0,0
data 1,0,0,1,0,0,1
data 1,0,0,1,0,1,0
data 1,0,0,0,1,0,0
data 0,1,1,1,0,1,1
''
data 0,0,1,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
'(
data 0,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,1,0,0
')
data 0,0,1,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
'*
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,0,1,1,0
data 0,0,1,1,1,0,0
data 1,1,1,1,1,1,1
data 0,0,1,1,1,0,0
data 0,1,1,0,1,1,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
'+
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 1,1,1,1,1,1,1
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
',
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,1,0,0,0,0
data 0,1,0,0,0,0,0
'-
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,1,1,1,1
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
'.
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
'/
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,1
data 0,0,0,0,0,1,0
data 0,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
data 0,1,0,0,0,0,0
data 1,0,0,0,0,0,0
data 0,0,0,0,0,0,0
'0
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
'1
data 0,0,0,1,0,0,0
data 0,1,1,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,1,1,1,1,1,0
'2
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,1,1,1,1,0
'3
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,1,1,0,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
'4
data 0,0,0,0,1,0,0
data 0,0,0,1,1,0,0
data 0,0,0,1,1,0,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,1,0,0,1,0,0
data 0,1,1,1,1,1,0
data 0,0,0,0,1,0,0
data 0,0,0,1,1,1,0
'5
data 0,1,1,1,1,1,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,1,1,1,0,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
'6
data 0,0,0,1,1,0,0
data 0,0,1,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,1,1,1,0,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
'7
data 0,1,1,1,1,1,0
data 0,1,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
'8
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
'9
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,1,1,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,1,0,0
data 0,0,1,1,0,0,0
':
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
';
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
'<
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
data 0,1,0,0,0,0,0
data 1,0,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
'=
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,1,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,1,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
'>
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,0,1
data 0,0,0,0,0,1,0
data 0,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
'?
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,1,0,0,0
'@
data 0,0,1,1,1,1,0
data 0,1,0,0,0,0,1
data 1,0,0,1,1,0,1
data 1,0,1,0,1,0,1
data 1,0,1,0,1,0,1
data 1,0,1,0,1,0,1
data 1,0,0,1,1,1,0
data 0,1,0,0,0,0,0
data 0,0,1,1,1,0,0
'a
data 0,0,1,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,1,0,0,0,1,0
data 0,1,1,1,1,1,0
data 0,1,0,0,0,1,0
data 1,1,1,0,1,1,1
'b
data 1,1,1,1,1,1,0
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,1,1,1,1,0
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 1,1,1,1,1,1,0
'c
data 0,0,1,1,1,1,0
data 0,1,0,0,0,0,1
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,0
data 0,1,0,0,0,0,1
data 0,0,1,1,1,1,0
'd
data 1,1,1,1,1,0,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,1,0
data 1,1,1,1,1,0,0
'e
data 1,1,1,1,1,1,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,0
data 0,1,0,0,1,0,0
data 0,1,1,1,1,0,0
data 0,1,0,0,1,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,1
data 1,1,1,1,1,1,1
'f
data 1,1,1,1,1,1,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,0
data 0,1,0,0,1,0,0
data 0,1,1,1,1,0,0
data 0,1,0,0,1,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 1,1,1,1,0,0,0
'g
data 0,0,1,1,1,1,0
data 0,1,0,0,0,0,1
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,0
data 1,0,0,0,1,1,1
data 1,0,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,0,1,1,1,1,0
'h
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,1,1,1,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 1,1,1,0,1,1,1
'i
data 0,1,1,1,1,1,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,1,1,1,1,1,0
'j
data 0,0,0,0,1,1,1
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
'k
data 1,1,1,0,0,1,1
data 0,1,0,0,0,1,0
data 0,1,0,0,1,0,0
data 0,1,0,0,1,0,0
data 0,1,0,1,0,0,0
data 0,1,1,1,0,0,0
data 0,1,0,0,1,0,0
data 0,1,0,0,0,1,0
data 1,1,1,0,0,1,1
'l
data 1,1,1,1,1,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,1
data 1,1,1,1,1,1,1
'm
data 1,1,0,0,0,1,1
data 0,1,0,0,0,1,0
data 0,1,1,0,1,1,0
data 0,1,1,0,1,1,0
data 0,1,0,1,0,1,0
data 0,1,0,1,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 1,1,1,0,1,1,1
'n
data 1,1,0,0,1,1,1
data 0,1,0,0,0,1,0
data 0,1,1,0,0,1,0
data 0,1,1,0,0,1,0
data 0,1,0,1,0,1,0
data 0,1,0,0,1,1,0
data 0,1,0,0,1,1,0
data 0,1,0,0,0,1,0
data 1,1,1,0,0,1,0
'o
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
'p
data 1,1,1,1,1,1,0
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,1,1,1,1,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 1,1,1,1,0,0,0
'q
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
data 0,0,1,1,0,1,1
'r
data 1,1,1,1,1,1,0
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,1,1,1,1,0
data 0,1,0,0,1,0,0
data 0,1,0,0,1,0,0
data 0,1,0,0,0,1,0
data 1,1,1,0,0,1,1
's
data 0,1,1,1,1,1,0
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,0
data 0,1,1,1,1,1,0
data 0,0,0,0,0,0,1
data 0,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 0,1,1,1,1,1,0
't
data 1,1,1,1,1,1,1
data 1,0,0,1,0,0,1
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,1,1,1,0,0
'u
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
'v
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
'w
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,1,0,1,0
data 0,1,0,1,0,1,0
data 0,1,0,1,0,1,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
'x
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,1,0,0,0,1,0
data 1,1,1,0,1,1,1
'y
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,1,1,1,0,0
'z
data 1,1,1,1,1,1,1
data 1,0,0,0,0,1,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,1,0,0,0,0,1
data 1,1,1,1,1,1,1
'[
data 0,0,1,1,1,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,1,1,0,0
'\
data 0,0,0,0,0,0,0
data 1,0,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,0,1
data 0,0,0,0,0,0,0
']
data 0,0,1,1,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,1,1,1,0,0
'^
data 0,0,0,1,0,0,0
data 0,0,1,0,1,0,0
data 0,1,0,0,0,1,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
'_
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,1,1,1,1
'`
data 0,0,1,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
'a
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,0,0
data 0,0,0,0,0,1,0
data 0,1,1,1,1,1,0
data 1,0,0,0,0,1,0
data 1,0,0,0,0,1,0
data 0,1,1,1,1,0,1
'b
data 1,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,1,1,1,1,0
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 1,1,1,1,1,1,0
'c
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,1,0
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,1
data 0,1,1,1,1,1,0
'd
data 0,0,0,0,1,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,0,1,0
data 0,1,1,1,1,1,0
data 1,0,0,0,0,1,0
data 1,0,0,0,0,1,0
data 1,0,0,0,0,1,0
data 1,0,0,0,0,1,0
data 0,1,1,1,1,1,1
'e
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,1,0
data 1,0,0,0,0,0,1
data 1,1,1,1,1,1,1
data 1,0,0,0,0,0,0
data 1,0,0,0,0,0,1
data 0,1,1,1,1,1,0
'f
data 0,0,0,1,1,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,1,1,1,1,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,1,1,1,1,0,0
'g
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,1,1
data 1,0,0,0,0,1,0
data 1,0,0,0,0,1,0
data 0,1,1,1,1,1,0
data 0,0,0,0,0,1,0
data 0,1,1,1,1,0,0
'h
data 1,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,0,1,1,0,0
data 0,1,1,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 1,1,1,0,1,1,1
'i
data 0,0,0,1,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,1,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,1,1,1,1,1,0
'j
data 0,0,0,0,1,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,0,0,0,1,0,0
data 0,1,1,1,0,0,0
'k
data 1,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,0,0,0
data 0,1,0,0,1,1,0
data 0,1,0,0,1,0,0
data 0,1,0,1,0,0,0
data 0,1,1,1,0,0,0
data 0,1,0,0,1,0,0
data 1,1,0,0,0,1,1
'l
data 0,0,1,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,1,1,1,1,1,0
'm
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,0,1,0,0
data 0,1,0,1,0,1,0
data 0,1,0,1,0,1,0
data 0,1,0,1,0,1,0
data 0,1,0,1,0,1,0
data 1,1,0,1,0,1,1
'n
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,0,1,1,0,0
data 0,1,1,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 1,1,1,0,1,1,1
'o
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,1,0
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 1,0,0,0,0,0,1
data 0,1,1,1,1,1,0
'p
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,1,1,1,0
data 0,1,0,0,0,0,1
data 0,1,0,0,0,0,1
data 0,1,1,1,1,1,0
data 0,1,0,0,0,0,0
data 1,1,1,0,0,0,0
'q
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,1,1
data 1,0,0,0,0,1,0
data 1,0,0,0,0,1,0
data 0,1,1,1,1,1,0
data 0,0,0,0,0,1,0
data 0,0,0,0,1,1,1
'r
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,0,1,1,0
data 0,0,1,1,0,0,1
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 1,1,1,1,1,0,0
's
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,1,1,1,1,1,0
data 1,0,0,0,0,0,1
data 0,1,1,1,0,0,0
data 0,0,0,0,1,1,0
data 1,0,0,0,0,0,1
data 0,1,1,1,1,1,0
't
data 0,0,0,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,1,1,1,1,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,0,0
data 0,0,1,0,0,1,0
data 0,0,0,1,1,0,0
'u
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,0,0,1,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,1,0,0,1,1,0
data 0,0,1,1,0,1,1
'v
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
data 0,0,0,1,0,0,0
'w
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,1,0,1,0,1,0
data 0,1,0,1,0,1,0
data 0,0,1,0,1,0,0
data 0,0,1,0,1,0,0
'x
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,0,1,1,1,0,0
data 0,0,1,1,1,0,0
data 0,1,0,0,0,1,0
data 1,1,1,0,1,1,1
'y
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,0,1,1,1
data 0,1,0,0,0,1,0
data 0,1,0,0,0,1,0
data 0,0,1,0,1,0,0
data 0,0,0,1,0,0,0
data 0,1,1,0,0,0,0
'z
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 1,1,1,1,1,1,0
data 1,0,0,0,1,0,0
data 0,0,0,1,0,0,0
data 0,0,1,0,0,0,0
data 0,1,0,0,0,1,0
data 1,1,1,1,1,1,0
'{
data 0,0,0,0,1,1,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,1,1,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,1,1,0
'|
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
'}
data 0,1,1,0,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,0,1,1,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,0,0,1,0,0,0
data 0,1,1,0,0,0,0
'~
data 0,0,0,0,0,0,0
data 0,1,1,0,0,0,1
data 1,0,0,1,0,0,1
data 1,0,0,0,1,1,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
data 0,0,0,0,0,0,0
the errors i get are
Compiler output:
error 135: Only valid in -lang deprecated or fblite or qb, found 'option' in 'option dynamic'
error 135: Only valid in -lang deprecated or fblite or qb, found 'option' in 'option explicit'
error 136: Default types or suffixes are only valid in -lang deprecated or fblite or qb, found ',' in 'dim shared gadd,gadd2 as integer'
error 136: Default types or suffixes are only valid in -lang deprecated or fblite or qb, found ',' in 'dim hop,ecl,ch as integer'
error 136: Default types or suffixes are only valid in -lang deprecated or fblite or qb, found ',' in 'dim blx,bly,bm,snval,snval2,mm as integer'
Results:
Compilation failed
System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for win32 (target:win32)
OS: Windows XP (build 2600, Service Pack 3)
-
Well I guess this code may be a bit old for your freebasic compiler version :D
oh and congrats on your first bmp loader test :)
-
Well I guess this code may be a bit old for your freebasic compiler version :D
oh and congrats on your first bmp loader test :)
oh that's why it's not working ::)
thanx man couldn't have done it without your help ;D
now my goal is to make that text to move, no special effects or anything, just plain text moving from right to left ;D
-
you're welcome, several people here helped me a lot (i mean really, a lot :P), i'm glad I can help my turn :)
For making the text to move it's really, really easy :)
When you write
Draw String (x,y), "what you wanna write here"
you can change this "x" value on each frame in a loop. An example :
Screenres 640,480,32,2 '' init
Dim as single xText '' a variable to keep our x position
Do '' Start of a loop. If you don't know it, look on fb's help, it's easy to understand :)
Cls '' clears the screen
Draw String(xText,10),"Hello World !!" '' draws the string ...
xText+= 2 '' increment the value of xText
Sleep 1,1 '' a little pause on each frame (try commenting it, you'll understand why it's needed :) )
Loop until xText>640 '' End of the previously started loop IF and ONLY IF x>640
After that, you can play with clipping against screen borders :)
-
works like a charm :goodpost: thanx again man ;D
a quick question, at this part of code ->Screenres 640,480,32,2
the 640,480 i know it's the resolution, the 32 and 2 what are those?
also how can i change the text position? from top to put it to the bottom of the screen and make it go from right to left.
thanx again man ;D
EDIT: i just tried to put the moving text to the one i did before with the image, it compiles and everything but there is no moving text, just the image and what i wrote before ::) (the static text)
-
you're welcome :)
32 is the bits per pixel value and 2 is the number of workpages to work with. I'm not sure so wait for a confirmation but afaik, the bits per pixel value is the memory you'll have to store each pixel color. The workpages are useful to avoid flickering. I'm pretty sure they have a lot of other goals but I don't know them. The screen you're writing/drawing on is one workpage.
how can i change the text position? from top to put it to the bottom of the screen and make it go from right to left.
Well, to move the text from LEFT to RIGHT, we moved the x value of the text. So to move it from TOP to BOTTOM, what is the value you'll change ?
a clue :
Draw String(X,Y),"your text"
:)
-
you're welcome :)
32 is the bits per pixel value and 2 is the number of workpages to work with. I'm not sure so wait for a confirmation but afaik, the bits per pixel value is the memory you'll have to store each pixel color. The workpages are useful to avoid flickering. I'm pretty sure they have a lot of other goals but I don't know them. The screen you're writing/drawing on is one workpage.
how can i change the text position? from top to put it to the bottom of the screen and make it go from right to left.
Well, to move the text from LEFT to RIGHT, we moved the x value of the text. So to move it from TOP to BOTTOM, what is the value you'll change ?
a clue :
Draw String(X,Y),"your text"
:)
/me after experimenting a bit with the code :stirrer:
the correct one is
Draw String(xText,470),"Hello World !!"
and to make the string go backwards? , also here's the code i used so far, what am i doing wrong and the moving text is not visible on the image? ::)
'' 0) init graphics
Screenres 640,480,32,2
'' 1) Create a pointer
Dim as any ptr MyImage
'' 2) Allocate memory
MyImage = imageCreate(640, 480)
'' 3) Load your image
Bload "1.bmp", MyImage
'' And then, you can put that image on screen with the.. "put" command :D
'' 4) Draw the image on screen
Put (0,0),MyImage
Draw String(100,100),"This Is An Image Loader Test !"
Draw String(250,250),"And This Is The Text On Screen !"
Draw String(80,350),"Thank You Guys For All The help You're Giving Me With Coding !"
Draw String(0,1),"Y"
Draw String(0,20),"A"
Draw String(0,40),"Y"
Draw String(0,60),"!"
Draw String(0,80),"I"
Draw String(0,100),"t"
Draw String(0,120),"W"
Draw String(0,140),"o"
Draw String(0,160),"r"
Draw String(0,180),"k"
Draw String(0,200),"s"
Draw String(0,220),"!"
Dim as single xText '' a variable to keep our x position
Do '' Start of a loop. If you don't know it, look on fb's help, it's easy to understand :)
Cls '' clears the screen
Draw String(xText,470),"Hello World !!" '' draws the string ...
xText+= 0.5 '' increment the value of xText
Sleep 2,0 '' a little pause on each frame (try commenting it, you'll understand why it's needed :) )
Loop until xText>640 '' End of the previously started loop IF and ONLY IF x>640
sleep
-
Well, to go onward, you added some units to the x value of the text position. So to go backward, what do you need to do the x value ? :)
-
Well, to go onward, you added some units to the x value of the text position. So to go backward, what do you need to do the x value ? :)
got it ;D , changed xText+= 0.5 to xText-= 0.5 :carrot:
but now it appeared at the left and the text didn't start from the right, and there is no y to change to make it start from the right ::)
also played a bit with the loop but it's not looping , i mean the text only shows up only 1 time.
-
You're on the right track :)
but now it appeared at the left and the text didn't start from the right
Well the left of screen x coordinate is 0 so we don't have to add anything to make it start to scroll from left, just adding or subtracting some values to it's x position.
Now if you want to make it start from the right, I'm pretty sure you know you have something to do with the way you're using X in Draw String(X,Y) (maybe adding some value to the x value in Draw string ?)
also played a bit with the loop but it's not looping , i mean the text only shows up only 1 time.
Pay attention, the loop doesn't loop what you see, but what's written between -Do- and -loop-. So if you write
Do
cls
Draw string(80-i,50),"right to leeeeft"
i-=.5
loop, it will [on EACH frame] draw the string and substract 0.5 to i so if after 100 frames, you don't see nothing, that's normal, the instruction i-=.5 is repeated infinitely (i-=.5 <=> i = i-0.5 ) so the text position maybe -500 or -1000, etc..Nothing says to the program to put the text on the right border if it pass the left border of screen :)
-
experimented a bit with the i thingie and also experimented adding values to the draw string, all i managed to get is errors ::)
but i managed to add 3 lines of text and make them move forwards and backwards :P
EDIT: i'm also having trouble loading the .bmp and making the moving text visible at the same time, all it show up is a black screen, or just the .bmp but no moving text ::) :skint:
-
It works fine for me :)
i'm also having trouble loading the .bmp and making the moving text visible at the same time, all it show up is a black screen, or just the .bmp but no moving text
In which order did you put stuff on screen (text can be hidden by the bmp !) ? And can you show the code with which you're experiencing problems ?
A last thing : Do you know the instruction IF-ELSE-END IF ? An example :
If a = 5
draw string(0,0), "a = 5, ok"
else
draw string(0,0), "a <> 5. Non OK"
end if
You see the point ? Now imagine you want to make the text to come back to x = 0 if x>640 (640 is the screen width). In other words, you want the text to be written at position x=0 if its position is > 640. Do you see how you could transform that sentence into a code ?
-
this is the code i use.
'' 0) init graphics
Screenres 640,480,32,2
'' 1) Create a pointer
Dim as any ptr MyImage
'' 2) Allocate memory
MyImage = imageCreate(640, 480)
'' 3) Load your image
Bload "snow.bmp", MyImage
'' And then, you can put that image on screen with the.. "put" command :D
'' 4) Draw the image on screen
Put (0,0),MyImage
Dim as single xText '' a variable to keep our x position
Do '' Start of a loop. If you don't know it, look on fb's help, it's easy to understand :)
Cls '' clears the screen
Draw String(xText,430),"Hello World !!" '' draws the string ...
xText-= 0.5 '' increment the value of xText
Sleep 2,0 '' a little pause on each frame (try commenting it, you'll understand why it's needed :) )
Loop until xText>640 '' End of the previously started loop IF and ONLY IF x>640
sleep
i tried to change the order of the code and i either got just the text or just the image , never both.
-
you must put the image IN the loop :)
CLS is an instruction to clear the screen. In your code, you display the image, and then start a loop which contain a CLS instruction (so every frame, the screen is cleared). You must put the image after the CLS :)
-
i just did what you said, the image loaded ok but no text :-\ , also the image flashed all the time (dunno maybe it's just my pc).
the code
Screenres 640,480,32,2
Dim as single xText '' a variable to keep our x position
Do '' Start of a loop. If you don't know it, look on fb's help, it's easy to understand :)
Cls '' clears the screen
'' 1) Create a pointer
Dim as any ptr MyImage
'' 2) Allocate memory
MyImage = imageCreate(640, 480)
'' 3) Load your image
Bload "snow.bmp", MyImage
'' 4) Draw the image on screen
Put (0,0),MyImage
Draw String(xText,430),"Hello World !!" '' draws the string ...
xText-= 0.5 '' increment the value of xText
Sleep 2,0 '' a little pause on each frame (try commenting it, you'll understand why it's needed :) )
Loop until xText>640 '' End of the previously started loop IF and ONLY IF x>640
sleep
-
@bikerboy - have you tried moving the cls before the do loop - I *think* that is why the screen flashes?
DrewPee
-
@bikerboy - have you tried moving the cls before the do loop - I *think* that is why the screen flashes?
DrewPee
just tried that, and it flashed even more ::)
-
Sorry! I am at work and didnt try it out! :(
-
Sorry! I am at work and didnt try it out! :(
no worries man ,it will work eventually somehow :stirrer: :P
i'll make it work even if i have to nuke the thingie lol :P :P
-
I have just downloaded and installed Freebasic on my PC here . . .
The reason it flashes is because you are re-drawing the image over the top of itself because the draw routine it is in the loop.
I guess it does need to be in the loop because otherwise the text will just overprint itself.
The text is appearing but is in white . . . and on a white background?
Screenres 640,480,32,2
Dim as double xText
Dim as any ptr MyImage
MyImage = imageCreate(640, 480)
Bload "snow.bmp", MyImage
Put (0,0),MyImage
xText=600
Do
color 255,0
Draw String(450,430),"Hello World !!"
xText-= 1
sleep 2,0
if xText<20 then xText=600
Loop until xText=0
sleep
I hope this helps? It isn't right but . . . a step closer? Maybe?
Andy
-
tried moving it outside the loop and i get errors.
it's not the image's fault, i also loaded a dark color image and it still wasn't visible
..... wait i got it it's not flashing ;D
'' 0) init graphics
Screenres 640,480,32,2
Dim as single xText '' a variable to keep our x position
Cls '' clears the screen
'' 1) Create a pointer
Dim as any ptr MyImage
'' 2) Allocate memory
MyImage = imageCreate(640, 480)
'' 3) Load your image
Bload "snow.bmp", MyImage
'' 4) Draw the image on screen
Put (0,0),MyImage
Do '' Start of a loop. If you don't know it, look on fb's help, it's easy to understand :)
Draw String(xText,430),"Hello World !!" '' draws the string ...
xText-= 0.5 '' increment the value of xText
Sleep 2,0 '' a little pause on each frame (try commenting it, you'll understand why it's needed :) )
Loop until xText>640 '' End of the previously started loop IF and ONLY IF x>640
sleep
-
Since you're always drawing directly onto your screen, you can see all updates (clearing & repainting) as flickering.
What you want to do instead is drawing to a hidden buffer and display it when painting is done.
Just create two display buffers (you've already done that!) and flip between the two buffer every frame.
So just initialize your stuff as you did before:
' set screen
Screenres 640,480,32,2
' initially place text-position to right border
Dim as single xText= 640
' load image (only once!)
Dim as any ptr MyImage
MyImage = imageCreate(640, 480)
Bload "snow.bmp", MyImage
Now get an additional variable to remember which buffer you're currently working on:
dim as integer buffer= 1
And swap the buffer after each iteration of your loop:
Do
' waits for vertical refresh:
ScreenSync
' set working and display buffer:
ScreenSet buffer, buffer xor 1
' draw your stuff:
cls
Put (0,0),MyImage
Draw String(xText,430),"Hello World !!"
xText-= 1
' swap buffers:
' if buffer was '1' set it to '0',
' if buffer was '0' set it to '1'
buffer= buffer xor 1
Loop until xText<0
-
Nice one hellfire! :)
-
thanx hellfire but it still flickers
i tried this instead and it's ok, except that instead of text you can see a constant white line ???
'' 0) init graphics
Screenres 640,480,32,2
Dim as single xText '' a variable to keep our x position
Cls '' clears the screen
'' 1) Create a pointer
Dim as any ptr MyImage
'' 2) Allocate memory
MyImage = imageCreate(640, 480)
'' 3) Load your image
Bload "snow.bmp", MyImage
'' 4) Draw the image on screen
Put (0,0),MyImage
Do '' Start of a loop. If you don't know it, look on fb's help, it's easy to understand :)
Draw String(xText,40),"Hello World !!" '' draws the string ...
xText+= 0.5 '' increment the value of xText
Sleep 2,0 '' a little pause on each frame (try commenting it, you'll understand why it's needed :) )
Loop until xText>640 '' End of the previously started loop IF and ONLY IF x>640
sleep
the weird thing is that when i run it in FBIde it shows this white line instead of text, when i make it an .exe file it shows no text or white line at all :-\
i think my freebasic version is possesed or something lol :P
(http://img143.imageshack.us/img143/5188/textsd3.jpg)
-
thanx hellfire but it still flickers
No, it doesn't:
Screenres 640,480,32,2
Dim as any ptr MyImage
MyImage = imageCreate(640, 480)
Bload "snow.bmp", MyImage
dim as single xText= 0
dim as integer buffer= 1
Do
ScreenSync
ScreenSet buffer, buffer xor 1
cls
Put (0,0),MyImage
Draw String(xText,40),"Hello World !!"
xText+= 0.5
buffer= buffer xor 1
Sleep 2,0
Loop until xText>640
sleep
instead of text you can see a constant white line
Do
Draw String(xText,40),"Hello World !!"
xText+= 0.5
Loop until xText>640
You're not removing the old text.
when i make it an .exe file it shows no text or white line at all
Initialize your variables. In your code xText can have any value.
-
what you quoted was the old code i was using ;)
honestly i used the one you said before and it flickered ??? , now it plays as smoothy as it can be ::) , definitely my FBIde is posessed :stirrer:
the code i used now
' load image (only once!)
Dim as any ptr MyImage
MyImage = imageCreate(640, 480)
Bload "snow.bmp", MyImage
dim as integer buffer= 1
Do
' waits for vertical refresh:
ScreenSync
' set working and display buffer:
ScreenSet buffer, buffer xor 1
' draw your stuff:
cls
Put (0,0),MyImage
Draw String(xText,470),"Hello guys !! ... thank you for everything !! .... your help is priceless !! couldn't have done what you see before you without you guys :) ... "
xText-= 1
' swap buffers:
' if buffer was '1' set it to '0',
' if buffer was '0' set it to '1'
buffer= buffer xor 1
Loop until xText<0
sleep
.exe attached
but now another problem arised ::) , i wrote a little something and it shows just fine but after a while the text freezes up :-\
can't thank you enough guys for all your help :clap:
-
I have fixed the scroller . . .
Screenres 640,480,32,2
Dim as any ptr MyImage
MyImage = imageCreate(640, 480)
Bload "snow.bmp", MyImage
dim buffer as integer
dim a as string
dim xText as double
xText=632:buffer=1
a="Hello guys !! ... thank you for everything !! .... your help is priceless !! couldn't have done what you see before you without you guys :) ... "
a=a+" "
Do
ScreenSync
ScreenSet buffer, buffer xor 1
cls
Put (0,0),MyImage
Draw String(xText,470),a
xText=xText-2
buffer= buffer xor 1
if xText<(-len(a)*8) then xText=632
Loop until xText<((-len(a)*8)-16)
sleep
:)
Andy
-
respect guys to all of you :cheers: :cheers:
i only have 2 questions left and this project is finished thanx to all of you ;D
1: how do i make the scroller restart?
2: how do i add a tune?
-
The scroller (using my code) will restart.
Music I will hand over to somebody else . . . :)
DrewPee
-
2: how do i add a tune?
Click here (http://www.dbfinteractive.com/forum/index.php/topic,519.0.html).
-
@ DrewPee
1: how do i make the scroller restart? discard this one i left in a hurry and noticed it afterwards :P thanx again man ;D
@ hellfire
yes i've read this thread, my question should of been like if there is a way to put music like i did with the Bload command.
-
what fileformat do you want to play?
-
um well the fileformat is not a problem, i mean i can convert it to the one that the command supports if there is such a command.
-
If you are using uFmod (http://www.dbfinteractive.com/forum/index.php/topic,519.0.html), you can use this command to load your .xm song:
hWave = uFMOD_PlaySong(@"your_song.xm",0,XM_FILE)
Below you can find a modified version of uFmod test file:
ChDir ExePath
'Includes
#include "windows.bi"
#include "ufmod.bi"
'Variables
Dim hWave As HWAVEOUT
Dim title_ptr as zstring ptr
'Allocate 50 bytes for music title
title_ptr = allocate(50)
'----------------Main
'Play our music
hWave = uFMOD_PlaySong(@"Jos-Chpk.xm",0,XM_FILE)
'Get music title
title_ptr = uFMOD_GetTitle()
'Set music volume
uFMOD_SetVolume(60)
cls
print "Playing ... "; *title_ptr
While Inkey$() <> Chr$(27)
Locate 3,1
Print " "
Print "Time: "; uFMOD_GetTime()
Sleep 500
Wend
uFMOD_StopSong()
'----------------End
-
thanx rbz :D i'll try and find a decent xm tune to load :cheers:
EDIT: found the xm tune :clap: , i'll go now play with uFmod :stirrer:
EDIT2: i tried to follow the instructions of Shockwave found here ->http://www.dbfinteractive.com/forum/index.php/topic,542.0.html
but i get this
Compiler output:
C:/Program Files/FreeBASIC/xmas.bas(2) error 136: Default types or suffixes are only valid in -lang deprecated or fblite or qb, found '.' in 'dim shared XmasAmiga.xm(0 to 162993) as ubyte = { _'
C:/Program Files/FreeBASIC/FBIDETEMP.bas(8) error 41: Variable not declared, Music in 'hWave = uFMOD_PlaySong(@Music(1),50600,XM_MEMORY)'
C:/Program Files/FreeBASIC/FBIDETEMP.bas(8) warning 12(0): Implicit variable allocation, Music
Results:
Compilation failed
System:
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for win32 (target:win32)
OS: Windows XP (build 2600, Service Pack 3)
the code i use is this
Screenres 640,480,32,2
#Include Once "tinyptc.bi"
#include "windows.bi"
#include "ufmod.bi"
#include "xmas.bas"
Dim hWave As HWAVEOUT
hWave = uFMOD_PlaySong(@Music(0),50600,XM_MEMORY)
Dim as any ptr MyImage
MyImage = imageCreate(640, 480)
Bload "snow.bmp", MyImage
dim buffer as integer
dim a as string
dim xText as double
xText=632:buffer=1
a="scroller text "
a=a+" "
Do
ScreenSync
ScreenSet buffer, buffer xor 1
cls
Put (0,0),MyImage
Draw String(xText,470),a
xText=xText-1
buffer= buffer xor 1
if xText<(-len(a)*8) then xText=632
Loop until xText<((-len(a)*8)-16)
sleep
i think i should follow his suggestion too :-\
If you can't figure out how to include ufmod after reading this tut you probably shouldn't be coding.
-
i think i should follow his suggestion too :-\
Quote from: Shockwave on August 13, 2006
If you can't figure out how to include ufmod after reading this tut you probably shouldn't be coding.
Programming throws these problems at you, it's up to you as a coder to work them out, I've seen some promising people quit.
By the way, the problem is that the tutorial is for freebasic 1.5
You have a newer version I am guessing, thats why it on't compile without lang deprecated.
So in a nice way I would ask you to stop threatening to give up, you'll get no sympathy that way, instead post your question and don't feel bad about it!
We're happy to help.
-
Programming throws these problems at you, it's up to you as a coder to work them out, I've seen some promising people quit.
By the way, the problem is that the tutorial is for freebasic 1.5
You have a newer version I am guessing, thats why it on't compile without lang deprecated.
yes i have
FBIde: 0.4.6
fbc: FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for win32 (target:win32)
So in a nice way I would ask you to stop threatening to give up, you'll get no sympathy that way, instead post your question and don't feel bad about it!
We're happy to help.
you misunderstood me mate, i wrote that b/c whatever i do ends up in error, and i feel like a total idiot if ask for everything i do b/c i can't do anything on my own.
i'm not looking for sympathy , i just don't want to bust your b@lls with questions.
i know you guys are happy to help :)
ok so in the version i have how do i load an mp3 file or an xm file or a mod file?
the easiest way ::)
-
Looking at error message you got, you need to change your "xmas.bas" file:
Replace this line:
dim shared XmasAmiga.xm(0 to 162993)
to:
dim shared Music(0 to 162993)
and also on your main .bas file, change this line:
hWave = uFMOD_PlaySong(@Music(0),50601,XM_MEMORY)
to:
hWave = uFMOD_PlaySong(@Music(0),162994,XM_MEMORY)
It should work now...
-
ok changed what you said and now i get ->
Compiler output:
C:\Program Files\FreeBASIC\FBIDETEMP.o:fake:(.text+0x4d): undefined reference to `uFMOD_PlaySong@12'
the beginning of the xmas.bas
'// Created with Bin2Bas V0.22 - by Rbraz (c) 2006
dim shared Music(0 to 162993) as ubyte = { _
&H58,&H6D,&H61,&H73,&H41,&H6D,&H69,&H67,&H61,&H00
and the code
Screenres 640,480,32,2
#Include Once "tinyptc.bi"
#include "windows.bi"
#include "ufmod.bi"
#include "xmas.bas"
Dim hWave As HWAVEOUT
hWave = uFMOD_PlaySong(@Music(0),162994,XM_MEMORY)
Dim as any ptr MyImage
MyImage = imageCreate(640, 480)
Bload "snow.bmp", MyImage
dim buffer as integer
dim a as string
dim xText as double
xText=632:buffer=1
a="scroller text "
a=a+" "
Do
ScreenSync
ScreenSet buffer, buffer xor 1
cls
Put (0,0),MyImage
Draw String(xText,470),a
xText=xText-1
buffer= buffer xor 1
if xText<(-len(a)*8) then xText=632
Loop until xText<((-len(a)*8)-16)
sleep
-
Ok, now you have to compile your .bas file with ufmod.o (object file)
1 - You need to have "ufmod.o" file on same folder of your intro.
2 - Create a .bat file (eg. Compile.bat) and type this line and save:
C:\Program Files\FreeBASIC\fbc -s console ufmod.o your_intro_name.bas
Btw, I'm guessing that your freebasic is installed on this path C:\Program Files\FreeBASIC\ if not just add the correct path.
your_intro_name.bas = your main .bas file
3 - Now, execute your .bat file, it should compile your intro.
-
no i didn't have that one in the code ,where should i put it in the code?
if xText<(-len(a)*Cool) then xText=632
Loop until xText<((-len(a)*Cool-16))
-
Oh, Ok, it's an 8 :)
The correct is:
if xText<(-len(a)*8) then xText=632
Loop until xText<((-len(a)*8)-16)
-
/me is confused ::)
i allready have that in the code
Do
ScreenSync
ScreenSet buffer, buffer xor 1
cls
Put (0,0),MyImage
Draw String(xText,470),a
xText=xText-1
buffer= buffer xor 1
if xText<(-len(a)*8) then xText=632
Loop until xText<((-len(a)*8)-16)
-
Ok mate, that part of code is OK now
Now, just compile it using that method of my previous post
-
but it gives me this error
Compiler output:
C:\Program Files\FreeBASIC\FBIDETEMP.o:fake:(.text+0x4d): undefined reference to `uFMOD_PlaySong@12'
full code i'm using
Screenres 640,480,32,2
#Include Once "tinyptc.bi"
#include "windows.bi"
#include "ufmod.bi"
#include "xmas.bas"
Dim hWave As HWAVEOUT
hWave = uFMOD_PlaySong(@Music(0),162994,XM_MEMORY)
Dim as any ptr MyImage
MyImage = imageCreate(640, 480)
Bload "snow.bmp", MyImage
dim buffer as integer
dim a as string
dim xText as double
xText=632:buffer=1
a="scroller text "
a=a+" "
Do
ScreenSync
ScreenSet buffer, buffer xor 1
cls
Put (0,0),MyImage
Draw String(xText,470),a
xText=xText-1
buffer= buffer xor 1
if xText<(-len(a)*8) then xText=632
Loop until xText<((-len(a)*8)-16)
sleep
the start from the xmas.bas
'// Created with Bin2Bas V0.22 - by Rbraz (c) 2006
dim shared Music(0 to 162993) as ubyte = { _
&H58,&H6D,&H61,&H73,&H41,&H6D,&H69,&H67,&H61,
EDIT: i have attached the files i'm using if it helps :)
-
Fixed, check the attached file below.
In the rar archive you will find a file called "Compile.bat" execute it to compile your intro with ufmod object file, you need this because fbide doesn't have a good way to do it.
Another problem that I found was with your xmas song, somehow it wasn't in fasttracker format, I just converted it to proper (.xm) format using "MOD2XM.EXE" that you can find on this site somewhere.
Also, I changed this line:
Loop until xText<((-len(a)*8)-16)to:
Loop until Inkey$() = Chr$(27)Which stop your intro when user press Escape key
-
thanx man :updance: :carrot:
ok i added some text to the scroller then i run Compile.bat but nothing happens :-\
no intro.exe nowhere ::)
EDIT: discard my last comment ;D
i typed "fbc -s gui ufmod.o intro.bas" in the start_shell.exe window and it created the intro :carrot: :cheers: :cheers: :cheers: :cheers:
intro attached ;D
-
Cool !! Works well here :)
Did you know you can select the color you write with ?
try
Draw String(xText,470),a,rgb(0,0,0)instead of
Draw String(xText,470),a
(if the text doesn't appear, that's because I selected the black color, and since I don't know why there's a black "line" behind the text, black on black => not visible lol So in that case, try to replace rgb(0,0,0) by rgb(255,0,0), you'll see what I mean :) )
-
nice ,thanx man i'll try to change the color in the next one ;D
i put the black line there ::) , couldn't see the text so i put the black line :P
looks nice though like an effect :P
-
Hats off to you Bikerboy.
People come and go from here and many of them never manage to do what you did there.
Loading music, bitmap and doing a scroll is a firm platform to move on from. You can't say you're not cut out for code now!
Well done :)
-
thanx man ;D :cheers:
i'm really happy with the outcome even if it doesn't have a spinning cube effect and a fancy cine scroller, but i really like it :clap:
i may not have coded this by myself but i did learn how to do a similar one again thanx to you guys :goodpost: :cheers:
i know i get dissapointed if it's not working , but who doesn't.
i'm not gonna quit , even if i get dissapointed, i'll try again and again and i'll ask you guys (the cavalry to the rescue) :P
-
Now you know how to make stuff to scroll, I'm sure you could code a very simple Sine Scroller (No per-pixel stuff, no pointers, just text).
To scroll a text horizontally, we changed the X value in time. Now, what is a sine scroller ? You just have to make your letters move along X but also along the Y axis with a sinus method.
Here a little code to make it. Warning, it's not optimized, and I didn't thought about what's the better way to do it. So this code may not be the best example. Anyway, I think it can help to understand the thing.
'' To keep our letters in memory
Dim as string LettersToScroll(12) => {"H","e","l","l","o"," ","W","o","r","l","d"," ","!"}
'' To keep our letters position somewhere :
Dim as single LettersX(12), LettersY(12)
'' init Letters position (I assume a letter width and Height is 10)
For i as integer = 0 to 12
LettersX(i) = i*10
LettersY(i) = 320 '' middle screen
next
Screenres 640,480,16,2
Do : screenlock : cls
For i as integer = 0 to 12
LettersX(i) += 1 ' scroll along X axis
LettersY(i) = 320+10*sin(LettersX(i)/10) ' Sine Scroll along Y axis
Draw String(LettersX(i), LettersY(i)),LettersToScroll(i)
if LettersX(i)>640 then LettersX(i) = 0 '' if a letter is too far on the right, make it start again on the left
Next
Screenunlock : sleep 1,1
Loop until multikey(&h01) '' Will quit loop if ESC is pressed
'hope it helps :)
-
thanx for the example man :cheers:
i'll study the code ;D
nice effect too even if it simple letters :D
-
Yeah. Just d/l your intro.
Congratz for your first intro!
-
Yeah. Just d/l your intro.
Congratz for your first intro!
thanx man, i owe it to you guys ;D
-
Ah I just posted in your other topic before I saw Hezad's post!
Hehe, you should study his code :) and then write your own version!
-
Very nice indeed bikerboy! I superb cardtro! Thanks for the shout out on the scroller! :) That is what I love about this place though - everybody shares stuff and helps everybody out! A really nice bunch of people from different countries too! :)
DrewPee
-
[THIS TOPIC IS LOCKED UNTIL I GET THE TIME TO SPLIT IT INTO MEANINGFUL TOPICS]