#include <exec/types.h>
#include <exec/memory.h>

#include <intuition/intuition.h>
#include <intuition/screens.h>

#include <graphics/gfx.h>
#include <dos/dos.h>

#include <clib/exec_protos.h>
#include <clib/dos_protos.h>
#include <clib/intuition_protos.h>
#include <clib/graphics_protos.h>
#include <clib/alib_protos.h>

#include <math.h>

#include "Shade.h"
#include "//defs.h"
#include "/main.h"

struct ModulePrefs
{
	LONG Number;
	LONG Length;
};

extern struct ModulePrefs nP;

#define BLANKMOUSE
#define CLONETOPSCREEN
#include "/utility.c"

struct Screen *ModuleScreen( VOID )
{
	return 0L;
}

LONG Blank( VOID *Prefs )
{
	struct ModulePrefs *wP;
	struct Screen *Scr;
	LONG i, j, nw, RetVal = OK;
	Worm *Shade;
	struct BitMap *BMap;

	if( ShadeWnd )
		wP = &nP;
	else
		wP = ( struct ModulePrefs * )Prefs;
	
	nw = wP->Number;

	Scr = cloneTopScreen( FALSE );

	if( Scr )
		BMap = AllocBitMap( 50, 50, 2, BMF_CLEAR, Scr->RastPort.BitMap );
	
	if( Scr && BMap )
	{
		BlankMousePointer( Scr );
		
		while( RetVal == OK )
		{
			

			RetVal = ContinueBlanking();
			WaitTOF();
		}
		
		UnblankMousePointer();
	}
	else
		RetVal = FAILED;
		
	if( BMap )
		FreeBitMap( BMap );

	if( Scr )
		closeTopScreen( Scr );

	return RetVal;
}
