home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 290.dms / 290.adf / quickrif.source / zoecop.c < prev   
C/C++ Source or Header  |  1989-01-31  |  979b  |  61 lines

  1.  
  2. /* from Jim Mackraz' ucop/cop.c -- fuck with copper list    */
  3.  
  4. #define HLINESTART (0L)
  5.  
  6. #include <graphics/gfxmacros.h>
  7. #include <graphics/view.h>
  8. #include <intuition/intuition.h>
  9. #include <intuition/intuitionbase.h>
  10. #include "jiff.h"
  11. #include "vcomp.h"
  12. #include "playriff.h"
  13.  
  14.  
  15. extern struct IntuitionBase *IntuitionBase;
  16.  
  17. extern WORD colors;
  18. WORD mid_width;    /* height of middle slice of color if any */
  19.  
  20. qput_cmap(cmap)
  21. register UWORD *cmap;
  22. {
  23. register UWORD *cl;
  24. register WORD i;
  25. register struct View *ViewLord;
  26. WORD damn;
  27.  
  28. ViewLord = &IntuitionBase->ViewLord;
  29. i = colors;
  30. damn = 0;
  31. Forbid();
  32. cl = ViewLord->LOFCprList->start + 2;
  33. for (i=0x180; i< 0x180+colors*2; i+=2)
  34.     {
  35.     if (*cl != i)
  36.         {
  37.         damn = 1;
  38.         break;
  39.         }
  40.     cl += 2;
  41.     }
  42. if (damn)
  43.     {
  44.     Permit();
  45.     LoadRGB4(&demo_screen->ViewPort, cmap, (long)colors);    /* slow way*/
  46.     }
  47. else
  48.     {
  49.     cl = ViewLord->LOFCprList->start + 3;
  50.     i = colors;
  51.     while (--i >= 0)
  52.         {
  53.         *cl = *cmap++;
  54.         cl += 2;
  55.         }
  56.     Permit();
  57.     LoadView(ViewLord);
  58.     }
  59. }
  60.  
  61.