home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 501.lha / ProjectileMotion_v1.01 / src / Glibload.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-09  |  1.1 KB  |  56 lines

  1. /*       
  2.  * glibload.c
  3.  * ~~~~~~~~~~~~~~~~~~
  4.  * loads libraries intuition, graphics, mathtrans, mathffp and req.
  5.  * success returns 1
  6.  * © Copyright 1991 Christian E. Hopps
  7. */
  8. #include <intuition/intuition.h>
  9. #include <graphics/gfxbase.h>
  10. #include <libraries/reqbase.h>
  11. #include <libraries/mathffp.h>
  12.  
  13. extern struct IntuitionBase     *IntuitionBase;
  14. extern struct GfxBase         *GfxBase;
  15. extern struct ReqLib           *ReqBase; 
  16. extern struct MathBase        *MathBase;
  17. extern struct MathTransBase        *MathTransBase;
  18.  
  19. int GLibLoad()
  20. {
  21.     int success = 1;
  22.  
  23.     if(!(IntuitionBase =         (struct IntuitionBase *)
  24.                     OpenLibrary("intuition.library",NULL)))
  25.     {
  26.         success = 0;
  27.     }
  28.     
  29.     if(!(GfxBase =                 (struct GfxBase *)
  30.                 OpenLibrary("graphics.library",NULL)))
  31.     {
  32.         success = 0;
  33.     }
  34.  
  35.     if(!(ReqBase =                 (struct ReqLib *)
  36.                 OpenLibrary("req.library",NULL)))
  37.     {
  38.         success = 0;
  39.     }
  40.  
  41.     if(!(MathBase =                 (struct MathBase *)
  42.                 OpenLibrary("mathffp.library",NULL)))
  43.     {
  44.         
  45.         success = 0;
  46.     }
  47.  
  48.     if(!(MathTransBase =                 (struct MathTransBase *)
  49.                 OpenLibrary("mathtrans.library",NULL)))
  50.     {
  51.         printf("\ncould not find mathtans.library check libs:\n");
  52.         success = 0;
  53.     }
  54.  
  55.     return(success);
  56. }