.bb to .bmx

BlitzMax Forums/BlitzMax Beginners Area/.bb to .bmx

I tried importing this from a .bb file. blitzmax converted it to .bmx but I'm getting errors when compiling. Any help appreciated.

Graphics 800,600
SetBuffer BackBuffer()
Repeat
Cls
x=MilliSecs()/10.0 Mod 800
SinScroll("A nice sinus scroller, just a small example how this can be done :)",800-x,300,MilliSecs()/5.0)
SinScroll("A nice sinus scroller, just a small example how this can be done :)",800-x-800,300,MilliSecs()/5.0)
Flip
Until KeyDown(1)
End
Function SinScroll(txt$,x,y,am,amp=25,per=20,d=10)
For n=1 To Len(txt$)
Text x+xx,y+Sin(am+n*per)*amp,Mid$(txt$,n,1)
xx=xx+d
Next
End Function


How good is the import bb project function in BlitzMax ?

Graphics 800,600

Repeat
Cls
x=MilliSecs()/10.0 Mod 800
SinScroll("A nice sinus scroller, just a small example how this can be done :)",800-x,300,MilliSecs()/5.0)
SinScroll("A nice sinus scroller, just a small example how this can be done :)",800-x-800,300,MilliSecs()/5.0)
Flip
Until KeyDown(1)
End
Function SinScroll(txt$,x,y,am,amp=25,per=20,d=10)
For n=1 To Len(txt$)
DrawText Mid$(txt$,n,1),x+xx,y+Sin(am+n*per)*amp
xx=xx+d
Next
End Function


I removed the "SetBuffer" line, and changed the Text..... line as BlitxMax uses DrawText instead, and with the parameters swapped around - string, x, y - instead of - x, y, string.

Ahh yes indeed. thanks mate.

I would not use the BB importer. It creates a extremely unoptimized procedural code which is next to useless ...
Better rewrite stuff from scratch with BMs OO behaviour in mind to make sure you won't have speed issues because of that.

Thanks for the info. The importer doesn't even change the comments from bb's ; to bmx's ' !