It is currently Sat Nov 23, 2019 3:35 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How to open screens
PostPosted: Sun Sep 13, 2009 11:17 pm 
Offline
Enthusiast
Enthusiast

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

Code:
;**********************************
;********** HIRES SCREEN **********
;**********************************

InitScreen(0)
InitBitMap(0)
*TagList = InitTagList(40)

AllocateBitMap(0,640,256,5)

UseBitMap(0)
ResetTagList(#SA_Type, #CUSTOMSCREEN | #CUSTOMBITMAP )
   AddTag(#SA_Quiet,1)               ;no border
   AddTag(#SA_BitMap, BitMapID())    ;our bitmap
   AddTag(#SA_Draggable, 0)          ;not moveable
   AddTag(#SA_DisplayID,#HIRES_key)  ;switch To hires
   OpenScreen(0,640,256,5,*TagList)

  DrawingOutput(BitMapRastPort())
  BoxFill(50,50,90,90)
 
  Repeat
    VWait() ;makes it smooooth
    ShowBitMap(0, ScreenID(),0,0)

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

CloseScreen(0)
End


DUAL PLAYFIELD AGA

Code:
;**********************************
;****** DUALPLAYFIELD SCREEN ******
;**********************************

InitScreen(0)
InitBitMap(1)
*TagList = InitTagList(40)

AllocateBitMap(0,640,256,3) ;the 2 bitmaps must have
AllocateBitMap(1,640,256,3) ;the same size!

UseBitMap(0)
ResetTagList(#SA_Type, #CUSTOMSCREEN | #CUSTOMBITMAP )
   AddTag(#SA_Quiet,1)
   AddTag(#SA_BitMap, BitMapID())
   AddTag(#SA_Draggable, 0)
   OpenScreen(0,320,256,5,*TagList)

  ;create dualplayfield
  UseBitMap(1)
  CreateDualPlayField(BitMapID())
 
  ;draw some shit
  UseBitMap(0)
  DrawingOutput(BitMapRastPort())
  For j=0 To 2
  For i=0 To 6
   BoxFill(50+(i*50),50+(j*50),40,40)
  Next
  Next
  UseBitMap(1) 
  DrawingOutput(BitMapRastPort())
  For j=0 To 3
   For i=0 To 8
    BoxFill(30+(i*50),30+(j*50),40,30)
   Next
  Next
 
  Repeat
    VWait()
       
    ShowBackBitMap(1, ScreenID(),screenmousex(),0)
    ShowBitMap(0, ScreenID(),320-ScreenMouseX(),0)
   
    mb.w=MouseButtons()
  Until mb.w=1

;RemoveDualPlayField()
CloseScreen(0)
End


SPLITSCREEN

Code:
;**********************************
;********** SPLIT SCREEN **********
;**********************************

InitScreen(1)
InitBitMap(0)
*TagList = InitTagList(40)

AllocateBitMap(0,640,512,5)
UseBitMap(0)

ResetTagList(#SA_Type, #CUSTOMSCREEN | #CUSTOMBITMAP)
      AddTag(#SA_Quiet, 1)
      AddTag(#SA_BitMap, BitMapID())
      AddTag(#SA_Draggable, 0)
      OpenScreen(0, 320, 130, 5, *TagList)

ResetTagList(#SA_Type, #CUSTOMSCREEN | #CUSTOMBITMAP)
      AddTag(#SA_Quiet,1)
      AddTag(#SA_BitMap, BitMapID())
      AddTag(#SA_Top, 132) ;2 lines space between the screens
      AddTag(#SA_Parent, ScreenID())
      AddTag(#SA_Draggable, 0)
      OpenScreen(1,320,130,5, *TagList)

  DrawingOutput(BitMapRastPort())
  For i=0 To 10
   BoxFill(30+(i*50),30,40,40)
  Next

  Repeat
    VWait()
   
    usescreen(0)
    ShowBitMap(0, ScreenID(),screenmousex(),0)
   
    usescreen(1)
    ShowBitMap(0, ScreenID(),320-ScreenMouseX(),0)
   
    mb.w=MouseButtons()
  Until mb.w=1

CloseScreen(0)
End

_________________
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:  
cron

 


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