It is currently Wed Sep 18, 2019 9:24 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Open gfx-card screen
PostPosted: Sun Apr 17, 2011 7:57 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 05, 2004 9:05 pm
Posts: 103
Location: germany
not final now

opens a 640x480 screen with 256 colors

Code:
; ***********************************************
; Open gfx card screen
; ***********************************************

#BIDTAG_Depth  = $80000008
#BIDTAG_DesiredWidth = $80000006 ;  \ Nominal Width and Height of the
#BIDTAG_DesiredHeight = $80000007
#SA_Width      =   $80000023
#SA_Height      =   $80000024
#SA_Depth      =   $80000025
#SA_DisplayID=   $80000032

InitBitMap(2)   ; 3 bitmaps...

opengraphicslibrary_(0)
openintuitionlibrary_(0)

AllocateBitMap(0,640,480,8)  ; Create our bitmaps
AllocateBitMap(1,640,480,8)  ;

UseBitMap(0)
*taglist=InitTagList(80)
ResetTagList(#SA_Type     ,#CUSTOMSCREEN| #CUSTOMBITMAP )
      AddTag(#sa_displayid,1342377984);*modeID.l)
      AddTag(#SA_BitMap,BitMapID())  ;bitmap
      AddTag(#SA_Draggable,0)           ;non moveabla
      AddTag(#sa_width,640)
      AddTag(#sa_height,480)
      AddTag(#sa_depth,8)
      AddTag(#SA_Quiet,1)           ;no intuition drawing
;OpenScreen(0,640,480,8,*TagList)   ;and open teehhh beast ^^
*scr=OpenScreenTagList_(0,*TagList) ;use pb-command Or this

DB=0
  Repeat
   ShowBitMap(DB,*scr,0,0)
   VWait()

   DB = 1-DB 

   ;draw something
   ;-> under gfx-card u can draw by pc-way

   UseBitMap(DB) 
     ;DrawingOutput(BitMapRastPort())
     ;BoxFill(20,20,200,200)

   RectFill_(BitMapRastPort(), 20, 20, 200, 200);

    bhh.w = MouseButtons()
  Until bhh.w = 1

closescreen_(*scr)
End      ; Finish the program and free all stuffs.

_________________
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 2 guests


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