Code: Select all
;**********************************
;********** 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
Code: Select all
;**********************************
;****** 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
Code: Select all
;**********************************
;********** 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