home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
564a.lha
/
wasp_v1.21
/
Src.LZH
/
Src
/
scrsz.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-10-19
|
1KB
|
83 lines
/* wasp - copyright Steven Reiz 1990, 1991
* see wasp.c for further info,
* scrsz.c, 27/12/90, 8/7/91 - 9/7/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>
#ifndef NOSH
#include "scrsz.sh"
#endif
struct IntuitionBase *IntuitionBase;
extern short scrw, scrh; /* also defined in wasp.h */
#ifdef __STDC__
get_scr_size(void)
#else
get_scr_size()
#endif
{
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);
}
}
#ifdef DEBUG
static long startticks;
#ifdef __STDC__
resetsecs(void)
#else
resetsecs()
#endif
{
long dv[3];
#ifdef AZTEC_C
DateStamp(dv);
#else
DateStamp((struct DateStamp *)dv);
#endif
startticks=dv[1]*6000+dv[2]*2;
}
#ifdef __STDC__
long centisecs(void)
#else
long centisecs()
#endif
{
long curticks, dv[3];
#ifdef AZTEC_C
DateStamp(dv);
#else
DateStamp((struct DateStamp *)dv);
#endif
curticks=dv[1]*6000+dv[2]*2;
return curticks-startticks;
}
#endif