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

UWORD Sprite_data []=
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase;

struct Screen *CustScr;
struct Window *Wdw;
struct ViewPort *WVP;

#define Rp   Wdw->RPort

struct TextAttr StdFont =
    {
   "topaz.font",
   TOPAZ_EIGHTY,
   FS_NORMAL,
   FPF_ROMFONT,
   };
   
struct NewScreen NewCustScr =
   {
   0,0,
   380,230,3,
   0,0,
   0x0001,
   CUSTOMSCREEN,
   &StdFont,
   NULL,
   NULL,
   NULL,
   };

struct NewWindow NewWdw =
   {
   0,0,
   380,230,
   0,0,
   MOUSEBUTTONS,
   SMART_REFRESH | ACTIVATE
    | BORDERLESS,
   NULL,
   NULL,
   NULL,
   NULL,
   NULL,
   0,0,
   0,0,
   CUSTOMSCREEN
   };
   
void OpenAll()
 {
   IntuitionBase = (struct IntuitionBase *)
      OpenLibrary("intuition.library", LIBRARY_VERSION);
   if (IntuitionBase == NULL) exit(FALSE);
   
   GfxBase = (struct GfxBase *)
      OpenLibrary("graphics.library", LIBRARY_VERSION);
   if (GfxBase == NULL) exit(FALSE);
   
   if ((NewWdw.Screen = CustScr =
   (struct Screen *)OpenScreen(&NewCustScr)) == NULL)
      exit(FALSE);
      
   if ((Wdw = (struct Window *)OpenWindow(&NewWdw)) == NULL)
      exit(FALSE);
      
WVP = (struct ViewPort *)ViewPortAddress(Wdw);
SetRGB4(WVP,0,0,0,0);
SetPointer(Wdw, &Sprite_data[0],15,15,-7,-7);
 }

void CloseAll()
 {
   ClearPointer(Wdw);
   CloseWindow(Wdw);
   CloseScreen(CustScr);
   CloseLibrary(GfxBase);
   CloseLibrary(IntuitionBase);
}
