home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 580a.lha / HDFView_v3.01 / source.LZH / source / src / myCredits.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-02  |  1.8 KB  |  83 lines

  1. #include <stdlib.h>
  2. #include <exec/types.h>
  3. #include <exec/memory.h>
  4. #include <intuition/intuition.h>
  5. #include <proto/graphics.h>
  6.  
  7. #include "viewprotos.h"
  8.  
  9. #include <proto/intuition.h>
  10. #include <proto/exec.h>
  11.  
  12. struct NewWindow nw1 = {
  13.    180, 30,
  14.    300, 150,
  15.    -1, 3,
  16.    CLOSEWINDOW,
  17.    WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_CLOSEGADGET,
  18.    NULL,
  19.    NULL,
  20.    "About HDFView v3.01...",
  21.    NULL,
  22.    NULL,
  23.    -1, -1,
  24.    -1, -1,
  25.    CUSTOMSCREEN
  26. };
  27.    
  28.  
  29. struct Window *
  30. myCredits(struct Screen *screen, struct MsgPort *mp,int w, int h)
  31. {
  32.    struct Window *creditwindow;
  33.    ULONG chipsize, fastsize;
  34.    char buf[80];
  35.    struct MsgPort *oldmp;
  36.    
  37.    struct IntuiText it = {
  38.       1, 0,
  39.       JAM1,
  40.       8, 10,
  41.       NULL,
  42.       "HDFView: an HDF Utility Program",
  43.       NULL
  44.    };
  45.    
  46.    
  47.    nw1.Screen = screen;
  48.    creditwindow = OpenWindow(&nw1);
  49.    if(creditwindow==NULL) myExit("Credit window");
  50.    if(oldmp=creditwindow->UserPort) DeletePort(oldmp);
  51.    creditwindow->UserPort = mp;
  52.    
  53. /*   SetAPen(creditwindow->RPort,0x3);
  54.    RectFill(creditwindow->RPort,5,12,294,147);
  55. */   
  56.    PrintIText(creditwindow->RPort,&it,10,20);
  57.    it.FrontPen = 1;
  58.    it.IText = "Freely Distributable, but...";
  59.    PrintIText(creditwindow->RPort,&it,10,40);
  60.    it.IText = "(c) 1991 Richard Gerber";
  61.    PrintIText(creditwindow->RPort,&it,10,50);
  62.    
  63.    sprintf(buf,"Image Width: %d   Height: %d",w,h);
  64.    it.FrontPen = 3;
  65.    it.IText = buf;
  66.    PrintIText(creditwindow->RPort,&it,10,80);
  67.    
  68.    chipsize = AvailMem(MEMF_CHIP)/1024;
  69.    fastsize = AvailMem(MEMF_FAST)/1024;
  70.    
  71.    it.FrontPen = 2;
  72.    it.IText = "Free Memory:";
  73.    PrintIText(creditwindow->RPort,&it,10,100);
  74.    sprintf(buf,"Graphics: %d K    Fast: %d K",chipsize, fastsize);
  75.    it.IText = buf;
  76.    PrintIText(creditwindow->RPort,&it,10,110);
  77.    
  78.    return(creditwindow);
  79. }  
  80.    
  81.    
  82.      
  83.