Okay as promised, here it is! I think it will help you!
You just have to make some tuneup: change the font (sorry, I am a bit too busy these days), and also change to speed value.
Global xres.w , yres.w , loop.w , t.s , tptr.w , sco.b
Define.f PI = 3.141593
Structure D3DTLVERTEX
x.f
y.f
z.f
rhw.f
Color.l
tu.f
tv.f
EndStructure
Structure PB_DX9Sprite3D
TexRes.l ; TexRes
Vertice.D3DTLVERTEX[4] ; The 4 vertices for the rectangle sprite
TmpVertice.D3DTLVERTEX[4] ; The 4 vertices for the rectangle sprite
Width.l ; width set with ZoomSprite3D()
Height.l ; height set with ZoomSprite3D()
RealWidth.l
RealHeight.l
Angle.f
Transformed.l
EndStructure
CompilerIf Defined(PB_MirrorSprite3D_None, #PB_Constant)=0
#MirrorSprite3D_None=0
#MirrorSprite3D_Horizontal=1
#MirrorSprite3D_Vertical=2
#MirrorSprite3D_Both=#MirrorSprite3D_Horizontal | #MirrorSprite3D_Vertical
CompilerEndIf
Procedure MirrorSprite3D(Sprite3D, MirrorMode) ;Mirror 3D sprite image (returns TRUE if any changes)
Protected *Sprite3D.PB_DX9Sprite3D=IsSprite3D(Sprite3D)
Protected MirroringChanges.b=0
Protected IsMirrored.b
Protected DoMirroring.b
IsMirrored=*Sprite3D\Vertice[0]\tu>*Sprite3D\Vertice[1]\tu
DoMirroring=1 And MirrorMode & #MirrorSprite3D_Horizontal
If (DoMirroring And IsMirrored=0) Or (DoMirroring=0 And IsMirrored)
MirroringChanges=1
Swap *Sprite3D\Vertice[0]\tu, *Sprite3D\Vertice[1]\tu
Swap *Sprite3D\Vertice[2]\tu, *Sprite3D\Vertice[3]\tu
EndIf
IsMirrored=*Sprite3D\Vertice[0]\tv>*Sprite3D\Vertice[3]\tv
DoMirroring=1 And MirrorMode & #MirrorSprite3D_Vertical
If (DoMirroring And IsMirrored=0) Or (DoMirroring=0 And IsMirrored)
MirroringChanges=1
Swap *Sprite3D\Vertice[0]\tv, *Sprite3D\Vertice[3]\tv
Swap *Sprite3D\Vertice[1]\tv, *Sprite3D\Vertice[2]\tv
EndIf
ProcedureReturn MirroringChanges
EndProcedure
Procedure ClipSprite3D(Sprite3D,ClipX,ClipY,ClipWidth,ClipHeight)
Protected *ptr.PB_DX9Sprite3D = IsSprite3D(Sprite3D)
If *ptr = 0 : ProcedureReturn #False : EndIf
If ClipX < 0 : ClipX = 0 : EndIf
If ClipY < 0 : ClipY = 0 : EndIf
If ClipWidth < 0 : ClipWidth = 0 : EndIf
If ClipHeight < 0 : ClipHeight = 0 : EndIf
If ClipX > *ptr\RealWidth : ClipX = *ptr\RealWidth : EndIf
If ClipY > *ptr\RealHeight : ClipY = *ptr\RealHeight : EndIf
If ClipX + ClipWidth > *ptr\RealWidth : ClipWidth = *ptr\RealWidth - ClipX : EndIf
If ClipY + ClipHeight > *ptr\RealHeight : ClipHeight = *ptr\RealHeight - ClipY : EndIf
*ptr\Vertice[0]\tu = ClipX / *ptr\RealWidth
*ptr\Vertice[0]\tv = ClipY / *ptr\RealHeight
*ptr\Vertice[1]\tu = (ClipX + ClipWidth) / *ptr\RealWidth
*ptr\Vertice[1]\tv = ClipY / *ptr\RealHeight
*ptr\Vertice[2]\tu = ClipX / *ptr\RealWidth
*ptr\Vertice[2]\tv = (ClipY + ClipHeight) / *ptr\RealHeight
*ptr\Vertice[3]\tu = (ClipX + ClipWidth) / *ptr\RealWidth
*ptr\Vertice[3]\tv = (ClipY + ClipHeight) / *ptr\RealHeight
ProcedureReturn #True
EndProcedure
t.s =" HI THIS IS A NEW REMAKE AND I HOPE IT IS GOOD! "
xres = 800
yres = 600
sco = 0
tptr = 1
FPS = 60
TimerDuration = 1000 / FPS
InitSprite()
InitSprite3D()
;InitDisplay()
InitKeyboard()
;InitMouse()
If OpenWindow(0,0,0,xres,yres, "TCB Replicants Intro",#PB_Window_BorderLess | #PB_Window_ScreenCentered )
;ButtonGadget(0, 170, 135, 45, 20, "Quitter")
If OpenWindowedScreen(WindowID(0), 0, 0, xres , yres,false,0,0,#PB_Screen_SmartSynchronization) =0
MessageRequester("Error", "This is fucked up, I can't open the window", 0)
End
EndIf
Else
MessageRequester("Error", "This is fucked up, I can't create the window", 0)
EndIf
; Creating the Sprite texture and the sprite 3D associated
CreateSprite(1,640,50,#PB_Sprite_Texture)
CreateSprite3D(11,1)
ZoomSprite3D(11,32,50) ; have to zoom on the final display size : blocks of 32*50 pixels
;catching the font into a sprite
CatchSprite(2, ?fontes)
;wave
angle2 = 0
speed = 6 ; change to 4, 6 , 8
;buffer for the scrolling font
Dim tScroll.c(11)
For i=0 To 10
tScroll(i) = 32
Next
Repeat
;begin of the frame, we are going to make the scolltext sprite!
StartDrawing (ScreenOutput())
cco = 0
For cc = 0 To 10
letter = tScroll(cc)
x = (letter % 10)*64
y = (letter - (letter%10))/10*50
ClipSprite(2,x,y,64,50)
DisplayTransparentSprite(2, cco+sco, 0)
cco = cco + 64
Next
StopDrawing()
; ok we got a line onto the screen, have to grab it into a sprite texture!
GrabSprite(1,64,0,640,50,#PB_Sprite_Texture)
sco = sco - 4
If sco <= 0
For i= 0 To 9
tScroll(i) = tScroll(i+1)
Next
tptr = tptr + 1
tScroll(10) = (Asc(UCase(Mid(t.s, tptr, 1)))-32)
sco= 32*2
EndIf
If tptr > (Len(t.s)- 10)
tptr = 1
EndIf
;now the "displayed" frame begin
ClearScreen(0)
StartDrawing (ScreenOutput())
;put here all the other effects...
;at the end, I'm displaying the sine scroll mirrored!
Start3D()
For i = 0 To 19
ClipSprite3D(11,i*32,0,32,50)
DisplaySprite3D(11,64+i*32,100+10*Sin(Radian(angle2+i*speed))*2)
MirrorSprite3D(11, #MirrorSprite3D_Vertical)
DisplaySprite3D(11,64+i*32,400+10*-Sin(Radian(angle2+i*speed))*2)
Next
Stop3D()
angle2 = angle2 + speed
If angle2 >= 360
angle2 = angle2 - 360
EndIf
StopDrawing()
FlipBuffers()
If fullscreen<>#PB_Checkbox_Checked
Event = WaitWindowEvent(0)
;WindowEventDispatcher()
EndIf
timer = ElapsedMilliseconds()
ExamineKeyboard()
Until KeyboardPushed (#PB_Key_Escape)
End
DataSection
fontes: IncludeBinary "fontes.bmp"
EndDataSection