dss@cubsvax.UUCP (David Silver) (10/08/86)
I want to use a custom pointer and want to set the colors explicitly, intead of using the current preferences default. The C language output of "SpriteMaker" generates code that calls the routine SetRGB4() with args (viewport, register, red, green, blue) - by the way, where is this call documented??? Anyway, it sets registers 17, 18 and 19 to my new sprite colors. According to the Hardware (or was it technical) reference manual, these are the color registers for sprite #1. It doesn't seem to work. I still get the default preferences pointer colors for my new pointer. Help! Have you ever seen a little black mouse with yellow ears??? Thanks for any answers! -- David Silver {philabs,rna}!cubsvax!dss cubsvax!dss@columbia
carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) (10/10/86)
In article <556@cubsvax.UUCP> dss@cubsvax.UUCP (David Silver) writes: > >I want to use a custom pointer and want to set the colors explicitly, >intead of using the current preferences default. The C language output >of "SpriteMaker" generates code that calls the routine SetRGB4() with >args (viewport, register, red, green, blue) - by the way, where is >this call documented??? Anyway, it sets registers 17, 18 and 19 to >my new sprite colors. According to the Hardware (or was it technical) >reference manual, these are the color registers for sprite #1. > >It doesn't seem to work. Works fine for me. SetRGB4() is documented in the autodocs of the graphics library functions (in an RK manual appendix). I think the Addison-Wesley RK manual mixed the functions from the various libraries together and then alphabetized them. It's on their page A-160. Some people get confused on this one because the vp parameter is described as "viewport to affect" rather than "pointer to viewport to affect". As far as I know, in any autodocs, vp means a pointer to a viewport, rp means a pointer to a rastport etc. Here's a real quick and dirty example that changes my mouse's gray fur to white. ---------------------------------------------------------------------- /* BleachMouse.c */ #include "intuition/intuitionbase.h" struct IntuitionBase *IntuitionBase; ULONG GfxBase; main() { IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",0); GfxBase = OpenLibrary("graphics.library",0); SetRGB4(ViewPortAddress(IntuitionBase->ActiveWindow),17,15,15,15); CloseLibrary(IntuitionBase); CloseLibrary(GfxBase); } -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CBM >>Amiga Technical Support<< UUCP ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=