It is currently Mon Dec 10, 2018 3:37 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How to sineflag
PostPosted: Mon Sep 14, 2009 9:39 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 05, 2004 9:05 pm
Posts: 103
Location: germany
Image

Code:
;************************************
;*******      SINUSPIC      *********
;************************************
InitScreen(0)
InitBitMap(2)
initpicture(0)
InitPalette(0)
*TagList = InitTagList(40)

AllocateBitMap(1,320,256,4)
AllocateBitMap(0,320,256,4)

ResetTagList(#SA_Type, #CUSTOMSCREEN | #CUSTOMBITMAP)
      AddTag(#SA_Quiet, 1)
      AddTag(#SA_BitMap, BitMapID())
      ;AddTag(#SA_Draggable, 0)
      OpenScreen(0, 320, 256, 4, *TagList)
   
 ;we load the picture
  AllocateBitMap(2,113,135,4)
  LoadPicture(0,"dat/face.iff")
  PictureToBitMap(0, BitMapID())
   
  GetPicturePalette(0,PictureID())
  DisplayPalette(0,ScreenID())

  DB=1

  Repeat
    ;VWait()
    ShowBitMap(DB,ScreenID(),0,0)
   
    DB=1-DB
   
     UseBitMap(DB)
     drawingoutput(bitmaprastport())
     Cls(0)     
     UseBitMap(2)
     For y=0 To 130 Step 5
       sini+1
       If sini>360:sini=0:EndIf
       sinus=PeekL(?sintable+(sini*4))
       CopyBitMap(BitMapID(),0,y,50+sinus/20,y,112,5)
     Next

    mb.w=mouseButtons()
  Until mb.w=2
 
  End

DisableDebugger
sintable:
IncludeBinary "dat/sintable"
EnableDebugger


files and sources here
download 10kb

_________________
Kultstudio


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye