home *** CD-ROM | disk | FTP | other *** search
- /* wasp - Copyright 1991 by Steven Reiz
- * see COPYING and wasp.c for further info,
- * scrsz.c, 27/12/90, 8/7/91 - 9/7/91, 8/12/91
- */
-
- #ifndef AMIGA
- #error AMIGA should be defined!
- #endif
-
- #ifdef AZTEC_C
- #include <functions.h>
- #endif
- #ifdef LATTICE
- #include <proto/exec.h>
- #include <proto/dos.h>
- #endif
- #include <graphics/view.h>
- #include <intuition/intuitionbase.h>
-
- struct IntuitionBase *IntuitionBase;
- extern short scrw, scrh; /* also defined in wasp.h */
-
- void
- get_scr_size(void)
- {
- struct ViewPort *vp;
-
- if (IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library", 0L)) {
- vp=IntuitionBase->ViewLord.ViewPort;
- scrw=vp->DWidth;
- scrh=vp->DHeight;
- if (vp->Modes & HIRES)
- scrw/=2;
- if (vp->Modes & LACE)
- scrh/=2;
- CloseLibrary((struct Library *)IntuitionBase);
- }
- }
-