#include <intuition/intuition.h>
#include <hardware/custom.h>
#include <hardware/dmabits.h>
#include <graphics/gfxmacros.h>

#include <clib/intuition_protos.h>
#include <clib/graphics_protos.h>
#include <clib/macros.h>

 /***************
 *              *
 * SCREEN STUFF *
 *              *
 ***************/

#define custom (*((struct Custom *)0xDFF000L))

struct Screen *blackScr;
extern ULONG DisplayID;

BOOL PopUpBlackScreen( void )
{
if ( blackScr )
	return( TRUE );

if ( blackScr = OpenScreenTags( NULL,
				SA_DisplayID, DisplayID,
				SA_Depth, 0,
				TAG_END ) )
	{
	OFF_SPRITE
	SetRGB4( &(blackScr->ViewPort), 0, 0, 0, 0 );
	return( TRUE );
	}
return( FALSE );
}


void CloseBlackScreen( void )
{
if ( blackScr )
	{
	ON_SPRITE
	CloseScreen( blackScr );
	blackScr = NULL;
	}
}
