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
Wrap
C/C++ Source or Header
|
1989-01-31
|
979b
|
61 lines
/* from Jim Mackraz' ucop/cop.c -- fuck with copper list */
#define HLINESTART (0L)
#include <graphics/gfxmacros.h>
#include <graphics/view.h>
#include <intuition/intuition.h>
#include <intuition/intuitionbase.h>
#include "jiff.h"
#include "vcomp.h"
#include "playriff.h"
extern struct IntuitionBase *IntuitionBase;
extern WORD colors;
WORD mid_width; /* height of middle slice of color if any */
qput_cmap(cmap)
register UWORD *cmap;
{
register UWORD *cl;
register WORD i;
register struct View *ViewLord;
WORD damn;
ViewLord = &IntuitionBase->ViewLord;
i = colors;
damn = 0;
Forbid();
cl = ViewLord->LOFCprList->start + 2;
for (i=0x180; i< 0x180+colors*2; i+=2)
{
if (*cl != i)
{
damn = 1;
break;
}
cl += 2;
}
if (damn)
{
Permit();
LoadRGB4(&demo_screen->ViewPort, cmap, (long)colors); /* slow way*/
}
else
{
cl = ViewLord->LOFCprList->start + 3;
i = colors;
while (--i >= 0)
{
*cl = *cmap++;
cl += 2;
}
Permit();
LoadView(ViewLord);
}
}