home *** CD-ROM | disk | FTP | other *** search
-
- #include <intuition/intuition.h>
-
- /* this works under Manx (16 bit ints). It's better than declaring
- everything as "chip" (which my compiler tragically can't do),
- since it only uses chip memory for as long as needed.
-
- It needs the global "win" defined somehow. */
-
- struct Image thing = { 0, 0, 32, 24, 5, NL, 0x1f, 0, NL },
-
-
- void
- popChip (array, size, xsize, ysize, xx, yy)
- USHORT *array; long size;
- {
- REG USHORT *myChip;
-
-
- if (!(myChip = (USHORT *) AllocMem (size, MEMF_CHIP | MEMF_CLEAR)))
- { /* puts ("Can't do it - no chips left!"); */ return; }
-
- CopyMem (array, myChip, size);
- thing.ImageData = myChip;
- thing.Width = xsize;
- thing.Height = ysize;
- DrawImage (win->RPort, &thing, (long) xx, (long) yy);
- FreeMem (myChip, size);
-
- }
-
-