home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / quake_src / vid_cppcstatic68k.c < prev    next >
C/C++ Source or Header  |  2000-06-17  |  962b  |  38 lines

  1. #include <libraries/asl.h>
  2. #include <proto/graphics.h>
  3. #include "amigacompiler.h"
  4.  
  5. extern int cppc_minwidth;
  6. extern int cppc_minheight;
  7. extern int cppc_maxwidth;
  8. extern int cppc_maxheight;
  9. extern int cppc_mindepth;
  10. extern int cppc_maxdepth;
  11.  
  12.  
  13.  
  14. ULONG ASM filterfunc(REG(a0,struct Hook *hook),REG(a1,void *mode),
  15.                      REG(a2,struct ScreenModeRequester *req))
  16. {
  17.   struct DimensionInfo dimsinfo;
  18.   int width;
  19.   int height;
  20.  
  21.   if (!GetDisplayInfoData(NULL, (UBYTE *)&dimsinfo,
  22.                           sizeof(struct DimensionInfo), DTAG_DIMS,
  23.                           (ULONG)mode)) {
  24.     return FALSE;
  25.   }
  26.  
  27.   width=dimsinfo.Nominal.MaxX-dimsinfo.Nominal.MinX+1;
  28.   height=dimsinfo.Nominal.MaxY-dimsinfo.Nominal.MinY+1;
  29.  
  30.   if ((dimsinfo.MaxDepth < cppc_mindepth)||(dimsinfo.MaxDepth>cppc_maxdepth)||
  31.       (cppc_minwidth>width)||(cppc_maxwidth<width)||(cppc_minheight>height)||
  32.       (cppc_maxheight<height)) {
  33.     return FALSE;
  34.   }
  35.  
  36.   return TRUE;
  37. }
  38.