home *** CD-ROM | disk | FTP | other *** search
- /* > $.CLIB.C.palette
- *
- * HASWIN Graphics Library
- * =========================
- *
- * Copyright (C) H.A.Shaw 1990.
- * Howard A. Shaw.
- * The Unit for Space Sciences,
- * Room 165,
- * Physics Building,
- * University of Kent at Canterbury.
- * Canterbury.
- * Kent. CT2 7NJ
- * You may use and distribute this code freely, however please leave
- * it alone. If you find bugs (and there will be many) please contact
- * me and the master source can be modified. If you keep me informed
- * of who you give copies of this to then I can get release upgrades
- * to them.
- *
- * Routines to do things with palettes. This is short!
- */
- #include "includes.h"
-
- void haswin_setpalette(palette *pal) {
-
- _kernel_swi_regs regs;
-
- if (!pal)
- return;
- regs.r[1] = (int)pal;
- haswin_swi(HASWIN_Set_palette, ®s);
- return;
- }
-
- palette *haswin_getpalette(palette *pal) {
-
- _kernel_swi_regs regs;
-
- if (!pal) {
- pal = haswin_malloc(sizeof(palette), "haswin_getpalette",
- "new palette");
- if (!pal)
- return(0);
- }
- regs.r[1] = (int)pal;
- haswin_swi(HASWIN_Read_palette, ®s);
- return(pal);
- }
-
-