Open gfx-card screen

AmigaOS specific forum
xperience2003
Enthusiast
Enthusiast
Posts: 111
Joined: Tue Oct 05, 2004 9:05 pm
Location: germany
Contact:

Open gfx-card screen

Post by xperience2003 »

not final now

opens a 640x480 screen with 256 colors

Code: Select all

; ***********************************************
; 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.