Here's an example done from memory ( as I havent installed FB yet ) of how I setup and use the TinyPTC library.
Notice how different it is to GFXLib setting up, you will also more often then not have to create your own Drawing Subroutines; like boxes, lines, Text, etc. But the results I find are far better, plus it also gives you the excuse to develope your own custom routines.
'
' TinyPTC Setup Example.
' By Clyde Radcliffe.
'
Option Static
Option Explicit
#Include Once "Tinyptc.bi"
Const ScreenW=640
Const ScreenH=480
Const ScreenArea=ScreenW * ScreenH
Dim Shared ScreenBuffer( ScreenArea ) ' this is used for storing / updating pixel info with tinyptc
'
' Subroutine Initialization and setup.
'
Declare Sub DrawLine ( ByVal PosY As Integer, ByVal R As Integer, ByVal G As Integer, ByVal B As Integer )
Declare Sub FeedPixels( Byval x As Integer, Byval y As Integer, Byval col As Integer)
'
' Setup TinyPTC / Screen Resolution.
'
If( PTC_Open( "Example", ScreenW, ScreenH ) = 0 ) Then
End -1
End if
'
' Main Program Loop.
'
Dim Key As String
Dim LinePosY
While Key<>Chr(27)
'
' Update Lines Y Position.
'
LinePosY=LinePosY+1
If LinePosY>ScreenH Then LinePosY=0
'
' Send info to Subroutine And feed results to the Screen Buffer.
'
DrawLine( LinePosY,255,0,0)
PTC_Update @ScreenBuffer(0)
Key=Inkey()
'
' Quick Way To Clear / Empty The Screen Buffer.
'
Erase ScreenBuffer
Wend
'
' Shutdown.
'
Ptc_Close()
End
Sub DrawLine( ByVal PosY As Integer, ByVal R As Integer, ByVal G As Integer, ByVal B As Integer )
Dim X, Col
Col=(R Shl 16 ) Or ( G Shl 8 ) Or ( B Shl 0 )
For X=0 To ScreenW-1
FeedPixels( X, PosY, Col )
Next
End Sub
Sub FeedPixels( Byval x As Integer, Byval y As Integer, Byval col As Integer)
If X>0 and X<ScreenW-1 and Y>0 and Y<ScreenH-1 Then
ScreenBuffer(Y * ScreenW + X) = col
End If
End Sub
Hope it helps.
Clyde.