home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Jeux / demos / crystalPPC.lha / amiga.cpp next >
C/C++ Source or Header  |  1998-05-05  |  16KB  |  596 lines

  1. #ifdef DO_AMIGAOS
  2.  
  3. #include <rtgmaster/rtgmaster.h>
  4. #include <rtgmaster/rtgsublibs.h>
  5. #include <clib/rtgmaster_protos.h>
  6. #include <powerpc/memoryPPC.h>
  7. #include <clib/powerpc_protos.h>
  8.  
  9. #include <graphics/gfx.h>
  10. #include <graphics/rastport.h>
  11. #include <intuition/intuition.h>
  12. #include <exec/types.h>
  13.  
  14. // Next three structures are internal rtgmaster structures used
  15. // by a hack, that is needed as rtgmaster currently only supports
  16. // LoadRGB32-style color loading, not SetRGB32-style color loading
  17. // Will add this to the next rtgmaster-version. Currently this
  18. // program does not run on EGS.
  19.  
  20. #define byte UBYTE
  21.  
  22. struct MyPort
  23. {
  24.     struct MsgPort *port;
  25.     ULONG signal;
  26.     WORD *MouseX;
  27.     WORD *MouseY;
  28. };
  29.  
  30. int Workbench=0;
  31.  
  32. struct RtgScreenAMI
  33. {
  34.     struct RtgScreen Header;
  35.     UWORD  Locks;
  36.     struct Screen *ScreenHandle;
  37.     ULONG  PlaneSize;
  38.     ULONG  DispBuf;
  39.     ULONG  ChipMem1;
  40.     ULONG  ChipMem2;
  41.     ULONG  ChipMem3;
  42.     struct BitMap Bitmap1;
  43.     struct BitMap Bitmap2;
  44.     struct BitMap Bitmap3;
  45.     ULONG  Flags;
  46.     struct Rectangle MyRect;
  47.     BYTE   Place[52];
  48.     struct RastPort RastPort1;
  49.     struct RastPort RastPort2;
  50.     struct RastPort RastPort3;
  51.     struct Window *MyWindow;
  52.     APTR   Pointer;
  53.     struct MyPort  PortData;
  54.     struct DBufInfo *dbufinfo;
  55.     ULONG DispBuf1;
  56.     ULONG DispBuf2;
  57.     ULONG DispBuf3;
  58.     ULONG SafeToWrite;
  59.     ULONG SafeToDisp;
  60.     ULONG SrcMode;
  61.     APTR   tempras;
  62.     APTR   tempbm;
  63.     APTR   wbcolors;
  64.     ULONG  Width;
  65.     ULONG  Height;
  66.     ULONG  colchanged;
  67. };
  68.  
  69. struct RtgScreenCGX
  70. {
  71.     struct RtgScreen Header;
  72.     struct Screen *MyScreen;
  73.     ULONG  ActiveMap;
  74.     APTR   MapA;
  75.     APTR   MapB;
  76.     APTR   MapC;
  77.     APTR   FrontMap;
  78.     ULONG  Bytes;
  79.     ULONG  Width;
  80.     UWORD  Height;
  81.     ULONG  NumBuf;
  82.     UWORD  Locks;
  83.     ULONG  ModeID;
  84.     struct BitMap *RealMapA;
  85.     ULONG Tags[5];
  86.     ULONG  OffA;
  87.     ULONG  OffB;
  88.     ULONG  OffC;
  89.     struct Window *MyWindow;
  90.     struct MyPort PortData;
  91.     ULONG  BPR;
  92.     struct DBufInfo *dbi;
  93.     ULONG  SafeToWrite;
  94.     ULONG  SafeToDisp;
  95.     ULONG  Special;
  96.     ULONG  SrcMode;
  97.     APTR   tempras;
  98.     APTR   tempbm;
  99.     APTR   wbcolors;
  100.     ULONG  colchanged;
  101.     ULONG  ccol;
  102. };
  103.  
  104. #include "system.h"
  105.  
  106. extern "C" {
  107. #include <exec/types.h>
  108. #include <exec/memory.h>
  109. #include <exec/execbase.h>
  110.  
  111. #include <intuition/intuition.h>
  112. #include <devices/inputevent.h>
  113.  
  114. #include <clib/exec_protos.h>
  115.  
  116. #include "cryst_rev.h"
  117. extern void ConvertFrame(byte *,byte *,unsigned long);
  118.  
  119.  
  120. }
  121.  
  122. #include <clib/rtgmaster_protos.h>
  123. #include <clib/graphics_protos.h>
  124.  
  125. extern struct ExecBase *SysBase;
  126. struct RTGMasterBase *RTGMasterBase;
  127.  
  128. static char *version = VERSTAG;
  129. static struct Screen *scr;
  130. static struct Window *wnd;
  131. static unsigned short *empty_pointer;
  132. static struct RastPort temprp;
  133.  
  134. struct GfxBase *GfxBase;
  135. struct Library *PowerPCBase;
  136. struct Library *WarpBase;
  137.  
  138. static BOOL aga;
  139.  
  140. struct ScreenReq *sr;
  141. struct RtgScreen *MyScreen;
  142.  
  143. struct ViewPort *vp;
  144. extern int mmu;
  145.  
  146.  
  147. // Keyboard fonctions
  148. Graphics::Graphics(int argc, char *argv[])
  149. {
  150.         signal(SIGINT, SIG_IGN);                  // FIXME: make a proper handler
  151.  
  152.         if (mmu) Memory=(char *)AllocVecPPC(FRAME_WIDTH*FRAME_HEIGHT,MEMF_CLEAR|MEMF_FAST|MEMF_CACHEOFF,8);
  153.  
  154.         else Memory = (char *)AllocVecPPC(FRAME_WIDTH*FRAME_HEIGHT, MEMF_CLEAR|MEMF_FAST,8);
  155.  
  156.         // don't touch, please !
  157.         graphicsData = Memory;
  158. }
  159.  
  160. Graphics::~Graphics(void)
  161. {
  162.         if(Memory) { FreeVecPPC(Memory); Memory = NULL; }
  163. }
  164.  
  165.  
  166. static unsigned long WBColorTable[3*256+2],ColorTable[3*256+2];
  167. static int pen_obtained=FALSE;
  168. static struct ColorMap *ColorMap;
  169. static byte transtable[256];
  170. struct Window *Window;
  171.  
  172. void SetPalette_WIN (unsigned char *palette)
  173. {
  174.         struct TagItem EmptyTags[] =
  175.         {
  176.                 TAG_DONE,0
  177.         };
  178.  
  179.         int i,r,g,b;
  180.         unsigned char *p;
  181.         struct ViewPort *VPort;
  182.  
  183.         p = palette;
  184.  
  185.         if (!aga) Window=((struct RtgScreenCGX *)MyScreen)->MyWindow;
  186.         else Window=((struct RtgScreenAMI *)MyScreen)->MyWindow;
  187.  
  188.         ColorMap = Window->WScreen->ViewPort.ColorMap;
  189.         VPort = &Window->WScreen->ViewPort;
  190.         if (!(pen_obtained))
  191.         {
  192.             WBColorTable[0] = 0x01000000;
  193.             WBColorTable[3*256+1] = 0;
  194.             GetRGB32(ColorMap,0,256,WBColorTable+1);
  195.             for (i=0;i<(3*256+2);i++)
  196.                 ColorTable[i] = WBColorTable[i];
  197.             for (i=0; i<256; i++)
  198.             {
  199.                     r = ((ULONG)*p++)<<24;
  200.                     g = ((ULONG)*p++)<<24;
  201.                     b = ((ULONG)*p++)<<24;
  202.                     transtable[i] = ObtainBestPenA(ColorMap,r,g,b,EmptyTags);
  203.             }
  204.         }
  205.         p = palette;
  206.         for (i=0; i<256; i++)
  207.         {
  208.                 ColorTable[3*i+1/*3*transtable[i]+1*/] = ((ULONG)*p++)<<24;
  209.                 ColorTable[3*i+2/*3*transtable[i]+2*/] = ((ULONG)*p++)<<24;
  210.                 ColorTable[3*i+3/*3*transtable[i]+3*/] = ((ULONG)*p++)<<24;
  211.         }
  212.         LoadRGB32(VPort,ColorTable);
  213.         pen_obtained = TRUE;
  214. }
  215.  
  216. int Graphics::Open(void)
  217. {
  218.  
  219.   int display_id, width, height;
  220.  
  221. #ifdef CHIRES
  222.   struct TagItem rtag[] = {
  223.     smr_MinWidth,       640,
  224.     smr_MinHeight,      400,
  225.     smr_MaxWidth,       640,
  226.     smr_MaxHeight,      512,
  227.     smr_ChunkySupport,  512,
  228.     smr_PlanarSupport,  -1,
  229.     smr_ProgramUsesC2P, 0,
  230.     smr_Buffers,2,
  231.     TAG_DONE,           NULL
  232. };
  233. #else
  234. #ifdef TINY
  235.   struct TagItem rtag[] = {
  236.       smr_MinWidth,       160,
  237.           smr_MinHeight,      100,
  238.               smr_MaxWidth,       320,
  239.                   smr_MaxHeight,      256,
  240.                       smr_ChunkySupport,  512,
  241.                           smr_PlanarSupport,  -1,
  242.                               smr_ProgramUsesC2P, 0,
  243.                                   smr_Buffers,2,
  244.                                       TAG_DONE,           NULL
  245.                                       };
  246. #else
  247.  
  248.   struct TagItem rtag[] = {
  249.     smr_MinWidth,       320,
  250.     smr_MinHeight,      200,
  251.     smr_MaxWidth,       320,
  252.     smr_MaxHeight,      256,
  253.     smr_ChunkySupport,  512,
  254.     smr_PlanarSupport,  -1,
  255.     smr_ProgramUsesC2P, 0,
  256.     smr_Buffers,2,
  257.     TAG_DONE,           NULL
  258. };
  259. #endif
  260. #endif
  261.  
  262.   struct TagItem gtag[] = {
  263.     grd_BytesPerRow,    0,
  264.     grd_Width,          0,
  265.     grd_Height,         0,
  266.     grd_Depth,          0,
  267.     grd_PixelLayout,    0,
  268.     grd_ColorSpace,     0,
  269.     grd_PlaneSize,      0,
  270.     TAG_DONE,           0
  271. };
  272.  
  273.   struct TagItem tacks[] = {
  274.     rtg_Buffers,2,
  275.     rtg_Workbench,0,
  276.     rtg_ChangeColors,1,
  277.     TAG_DONE,0
  278. };
  279.  
  280.  
  281.   RTGMasterBase = (struct RTGMasterBase *)OpenLibrary((STRPTR)"rtgmaster.library", 34);
  282.   if (!RTGMasterBase)
  283.   {
  284.    printf("Could not open rtgmaster.library V34!\n");
  285.    exit(0);
  286.   }
  287.   GfxBase=(struct GfxBase *)OpenLibrary("graphics.library",36);
  288.   PowerPCBase=OpenLibrary("powerpc.library",7);
  289.   if (PowerPCBase) CloseLibrary(PowerPCBase);
  290.   else
  291.   {
  292.    printf("This program requires at least powerpc.library V7/warp.library V2.0\n");
  293.    exit(0);
  294.   }
  295.   WarpBase=OpenLibrary("warp.library",2);
  296.   if (WarpBase) CloseLibrary(WarpBase);
  297.   else
  298.   {
  299.    printf("This program requires at least powerpc.library V7/warp.library V2.0\n");
  300.    exit(0);
  301.   }
  302.  
  303.   sr = PPCRtgScreenModeReq(rtag);
  304.  
  305.   if (sr->Flags&sq_WORKBENCH) {tacks[1].ti_Data=LUT8;Workbench=1;}
  306.  
  307.   if (sr==NULL) exit(0);
  308.   MyScreen = PPCOpenRtgScreen(sr, tacks);
  309.   if (!MyScreen) {PPCFreeRtgScreenModeReq(sr);exit(0);CloseLibrary((struct Library *)GfxBase);CloseLibrary((struct Library *)RTGMasterBase);}
  310.  
  311.   PPCGetRtgScreenData(MyScreen, gtag);
  312.      
  313.   width = FRAME_WIDTH;
  314.   height = FRAME_HEIGHT;
  315.  
  316.   empty_pointer = (unsigned short *)AllocVec(8, MEMF_CHIP|MEMF_CLEAR);
  317.   PPCRtgSetPointer(MyScreen, empty_pointer, 0, 0, 0, 0);
  318.   if (gtag[4].ti_Data==grd_PLANAR)
  319.   {
  320.    struct Screen *scr;
  321.    aga=TRUE;
  322.  
  323.    // Hack, as rtgmaster currently only supports LoadRGB32-type color
  324.    // Loading, not SetRGB32-type color loading, i will probably
  325.    // include this in the next version
  326.  
  327.    scr=((struct RtgScreenAMI *)MyScreen)->ScreenHandle;
  328.    vp=&(scr->ViewPort);
  329.   }
  330.   else
  331.   {
  332.    struct Screen *scr;
  333.    aga=FALSE;
  334.  
  335.    // Hack, as rtgmaster currently only supports LoadRGB32-type color
  336.    // Loading, not SetRGB32-type color loading, i will probably
  337.    // include this in the next version
  338.  
  339.    scr=((struct RtgScreenCGX *)MyScreen)->MyScreen;
  340.    vp=&(scr->ViewPort);
  341.   }
  342.   return 1;
  343. }
  344.  
  345. void Graphics::Close(void)
  346. {
  347.  if (pen_obtained)
  348.  {
  349.   int i;
  350.   //for (i=0; i<256; i++)
  351.    //ReleasePen(ColorMap,transtable[i]);
  352.   //LoadRGB32(&(Window->WScreen->ViewPort),WBColorTable);
  353.  }
  354.  if (MyScreen) {PPCCloseRtgScreen(MyScreen);MyScreen=0;}
  355.  if(empty_pointer) { FreeVec(empty_pointer); empty_pointer = NULL; }
  356.  if(Memory) { FreeVec(Memory); Memory = NULL; }
  357.  if (sr) {PPCFreeRtgScreenModeReq(sr);sr=NULL;}
  358.  if (RTGMasterBase) {CloseLibrary((struct Library *)RTGMasterBase);RTGMasterBase=NULL;}
  359.  if (GfxBase) {CloseLibrary((struct Library *)GfxBase);}
  360. }
  361.  
  362. void Graphics::Print(void)
  363. {
  364.  if ((!aga)&&Workbench)
  365.  {
  366.   int xstop,ystop;
  367.   Window=((struct RtgScreenCGX *)MyScreen)->MyWindow;
  368.   //ConvertFrame(Memory,transtable,FRAME_WIDTH*FRAME_HEIGHT);
  369.                 xstop = FRAME_WIDTH-1;
  370.                 ystop = FRAME_HEIGHT-1;
  371.                 /*WritePixelArray8(Window->RPort,0,0,xstop,ystop,
  372.                                  (UBYTE *)Memory,
  373.                                  (struct RastPort *)((struct RtgScreenCGX *)MyScreen)->tempras);*/
  374.    PPCCopyRtgBlit(MyScreen,PPCGetBufAdr(MyScreen,0),Memory,0,0,0,FRAME_WIDTH,FRAME_HEIGHT,FRAME_WIDTH,FRAME_HEIGHT,0,0);
  375.  }
  376.  else if (Workbench)
  377.  {
  378.   int xstop,ystop;
  379.   Window=((struct RtgScreenAMI *)MyScreen)->MyWindow;
  380.   //ConvertFrame(Memory,transtable,FRAME_WIDTH*FRAME_HEIGHT);
  381.                xstop = FRAME_WIDTH-1;
  382.                ystop = FRAME_HEIGHT-1;
  383.                WritePixelArray8(Window->RPort,0,0,xstop,ystop,
  384.                                 (UBYTE *)Memory,
  385.                                 (struct RastPort *)((struct RtgScreenAMI *)MyScreen)->tempras);
  386.  }
  387.  else PPCCopyRtgBlit(MyScreen,PPCGetBufAdr(MyScreen,0),Memory,0,0,0,FRAME_WIDTH,FRAME_HEIGHT,FRAME_WIDTH,FRAME_HEIGHT,0,0);
  388. }
  389.  
  390. void Graphics::Clear (int color)
  391. {
  392.   // Clear your graphic interface
  393.   // this is the standard one
  394.   if (Memory) memset (Memory, color, FRAME_WIDTH*FRAME_HEIGHT);
  395. }
  396.  
  397. void Graphics::SetPixel (int x, int y, int color)
  398. {
  399.   // print a pixel on your graphic interface
  400.   // this is the standard one
  401.   if (Memory)
  402.     {
  403.       if (x < 0 || x >= FRAME_WIDTH) return;
  404.       if (y < 0 || y >= FRAME_HEIGHT) return;
  405.       y = FRAME_HEIGHT-y;
  406.       *(Memory+y*FRAME_WIDTH+x) = color;
  407.     }
  408. }
  409.  
  410. void Graphics::SetLine (int x1, int y1, int x2, int y2, int color)
  411. {
  412.   // print a line on your graphic interface
  413.   // this is the standard one
  414.   if (Memory)
  415.   {
  416.     if (x1 < 0 || x1 > FRAME_WIDTH) { printf ("*"); return ;}
  417.     if (x2 < 0 || x2 > FRAME_WIDTH) { printf ("*"); return ;}
  418.     if (y1 < 0 || y1 > FRAME_HEIGHT) { printf ("*"); return ;}
  419.     if (y2 < 0 || y2 > FRAME_HEIGHT) { printf ("*"); return ;}
  420.  
  421.     y2 = FRAME_HEIGHT-y2;
  422.     y1 = FRAME_HEIGHT-y1;
  423.     int i, x, y;
  424.     for (i = 0 ; i < 200 ; i++)
  425.     {
  426.       x = (x2-x1)*i/200+x1;
  427.       y = (y2-y1)*i/200+y1;
  428.       *(Memory+y*FRAME_WIDTH+x) = color;
  429.     }
  430.   }
  431. }
  432.  
  433. void Graphics::SetHorLine (int x1, int x2, int y, int color)
  434. {
  435.   // print a line with overflow on your graphic interface
  436.   // this is the standard one
  437.   /*if(Memory)
  438.     {
  439.       y = FRAME_HEIGHT-y;
  440.       char* d = Memory+y*FRAME_WIDTH+x1;
  441.       if (y < 0 || y >= FRAME_HEIGHT) { printf ("OVERFLOW draw_hor_line(y=%d)!\n", y); return; }
  442.       if (x1 < 0 || x1 >= FRAME_WIDTH) { printf ("OVERFLOW draw_hor_line(x1=%d,x2=%d,y=%d)!\n", x1, x2, y); return; }
  443.       if (x2 < 0 || x2 >= FRAME_WIDTH) { printf ("OVERFLOW draw_hor_line(x1=%d,x2=%d,y=%d)!\n", x1, x2, y); return; }
  444.       if (x2 >= x1) memset (d, color, x2-x1+1);
  445.       //for (x = x1 ; x < x2 ; x++) *d++ = color;
  446.     } */
  447. }
  448.  
  449. ULONG rtgpal[770];
  450. char winpal[768];
  451.  
  452. void Graphics::SetRGB(int i, int r, int g, int b)
  453. {
  454.   // set a rgb color in the palette of your graphic interface
  455.  
  456.   // Hack, as rtgmaster currently only supports LoadRGB32-style Color loading,
  457.   // will add this to the next version
  458.  
  459.   //SetRGB32(vp, i, r*0x01010101, g*0x01010101, b*0x01010101);
  460.  
  461. // dont't touch, please !
  462.   //graphicsPalette[i].red = r;
  463.   //graphicsPalette[i].green = g;
  464.   //graphicsPalette[i].blue = b;
  465.   //graphicsPalette_alloc[i] = TRUE;
  466.   //if (!Planar) Window=((struct RtgScreenCGX *)MyScreen)->MyWindow;
  467.   //else Window=((struct RtgScreenAMI *)MyScreen)->MyWindow;
  468.  
  469.   //vp = &Window->WScreen->ViewPort;
  470.  
  471.  
  472.   //if (Workbench) LoadRGB32(vp,rtgpal);
  473.   /*if (Workbench)
  474.   {
  475.    int f;
  476.    for (f=0;f<256;f++)
  477.    {
  478.     winpal[3*f]=graphicsPalette[f].red;
  479.     winpal[3*f+1]=graphicsPalette[f].green;
  480.     winpal[3*f+2]=graphicsPalette[f].blue;
  481.    }
  482.    SetPalette_WIN(winpal);
  483.   }
  484.   else */PPCLoadRGBRtg(MyScreen,rtgpal);
  485. }
  486.  
  487. // Keyboard fonctions
  488. Keyboard::Keyboard(int argc, char *argv[])
  489. {
  490.   // Create your keyboard interface
  491. }
  492.  
  493. Keyboard::~Keyboard(void)
  494. {
  495.   // Destroy your keyboard interface
  496.   Close();
  497. }
  498.  
  499. int Keyboard::Open(void)
  500. {
  501.   // Open your keyboard interface
  502.   return (1);
  503. }
  504.  
  505. void Keyboard::Close(void)
  506. {
  507.   // Close your keyboard interface
  508. }
  509.  
  510. // don't touch, please !
  511. void do_buttonpress (int x, int y, int shift, int alt, int ctrl);
  512. void do_buttonrelease (int x, int y);
  513. void do_mousemotion (int x, int y);
  514. void do_stuff ();
  515. void do_expose ();
  516. void do_keypress (int key, int shift, int alt, int ctrl);
  517.  
  518.  
  519. // System loop !
  520. void System::Loop(void)
  521. {
  522.   struct Message *msg;
  523.   struct IntuiMessage copy;
  524.   int key = 0, shift = 0, alt = 0, ctrl = 0;
  525.   int key_up = 0, key_down = 0, key_left = 0, key_right = 0;
  526.  
  527.   // don't touch, please !
  528.   Graph->Clear(0);
  529.   Shutdown=0;
  530.  
  531.   while(!Shutdown)
  532.   {
  533.     if (key) do_keypress(key, shift, alt, ctrl);
  534.     if (key_up) do_keypress(key_up, shift, alt, ctrl);
  535.     if (key_down) do_keypress(key_down, shift, alt, ctrl);
  536.     if (key_left) do_keypress(key_left, shift, alt, ctrl);
  537.     if (key_right) do_keypress(key_right, shift, alt, ctrl);
  538.     
  539.     do_stuff (); // don't remove, please !
  540.  
  541.     while((msg = (struct Message *)PPCRtgGetMsg(MyScreen)))
  542.     {
  543.       CopyMemPPC(msg, ©, sizeof(struct IntuiMessage));
  544.       PPCRtgReplyMsg(MyScreen,msg);
  545.  
  546.       if(copy.Class ==  IDCMP_RAWKEY)
  547.       {
  548.         if(copy.Code & IECODE_UP_PREFIX)
  549.         {
  550.           copy.Code &= ~IECODE_UP_PREFIX;
  551.           switch(copy.Code)
  552.           {
  553.             case 0x4c: key_up = 0; break;
  554.             case 0x4d: key_down = 0; break;
  555.             case 0x4f: key_left = 0; break;
  556.             case 0x4e: key_right = 0; break;
  557.           }
  558.           key = 0;
  559.         }
  560.         else
  561.         {
  562.           switch(copy.Code)
  563.           {
  564.             case 0x4c: key_up = KEY_UP; key = 0; break;
  565.             case 0x4d: key_down = KEY_DOWN; key = 0; break;
  566.             case 0x4f: key_left = KEY_LEFT; key = 0; break;
  567.             case 0x4e: key_right = KEY_RIGHT; key = 0; break;
  568.             case 0x41: key = KEY_BS; break;
  569.             case 0x3f: key = KEY_PGUP; break;
  570.             case 0x1f: key = KEY_PGDN; break;
  571.             case 0x1d: key = KEY_END; break;
  572.             case 0x45: key = KEY_ESC; break;
  573.             case 0x35: key = 'b'; break;
  574.             case 0x40: key = ' '; break;
  575.             case 0x28: key = 'l'; break;
  576.             case 0x12: key = 'e'; break;
  577.             case 0x33: key = 'c'; break;
  578.             case 0x21: key = 's'; break;
  579.             case 0x10: key = 'q'; break;
  580.             case 0x14: key = 't'; break;
  581.             case 0x17: key = 'i'; break;
  582.             case 0x13: key = 'r'; break;
  583.             case 0x19: key = 'p'; break;
  584.             default: key = 0; break;
  585.           }
  586.         }
  587.         shift = copy.Qualifier & (IEQUALIFIER_LSHIFT|IEQUALIFIER_RSHIFT);
  588.         alt = copy.Qualifier & (IEQUALIFIER_LALT|IEQUALIFIER_RALT);
  589.         ctrl = copy.Qualifier & IEQUALIFIER_CONTROL;
  590.       }
  591.     }
  592.   } // while (!Shutdown)
  593. }
  594.  
  595. #endif // DO_AMIGAOS
  596.