; Grisu's Terabit DataPacker Tutorial ; ___________________________________ ; ; Example 2: Plain program that uses a single image as background tile. ; Uses an external file for data! ; [ Terabit Packer ]________________________________________ Include "Bones.bb" ; Add Terabit Packer routines PakOutputDir "" ; This can be set anywhere ("C:\Windows\Temp\" etc.) PakInit "Data.pak", $9FAF43FB, "TMP", $629FC914 ; this is your init code line from above! PakBulkOverWrite = True ; Set this to True when in Development / False when Released ; [ Variables ]_____________________________________________ Global IMGGrisu ; image handle for the data image Global angle#,r# ; angle and radius used for rotating text ; [ Loading Data ]__________________________________________ Function LoadData() IMGGrisu=LoadImage(Pak("DATA\GRISU.PNG")) ; Loads the image, nothing special! DlPak() ; Delete TMP file used MaskImage IMGGrisu,255,255,255 ; Masks image End Function ; [ Main Loop ]_____________________________________________ Graphics 640,480,16,2 ; set gfx mode SetBuffer BackBuffer() ; use buffering ClsColor 33,57,73 ; set global background color angle#=0:r#=0 ; reset angle and radius LoadData() ; Load all data While Not KeyHit(1) ; While not Esc do... Cls If IMGGrisu > 0 Then TileImage IMGGrisu,0,0 ; Display image if found angle=(angle+1) Mod 360 ; Calc rotation r=(r+0.5) Mod 300 Text GraphicsWidth()/2+Cos(angle)*r,GraphicsHeight()/2-Sin(angle)*r,"Grisu's Tutorial No. 2",1,1 ; Give some text Flip Wend ; End of main loop PakClean() ; Clean all data files used before End ; Bye!