Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!caip!cbmvax!carolyn From: carolyn@cbmvax.cbm.UUCP (Carolyn Scheppner) Newsgroups: net.micro.amiga Subject: Re: Custom Intuition Pointer: Setting color registers Message-ID: <872@cbmvax.cbmvax.cbm.UUCP> Date: Fri, 10-Oct-86 11:13:35 EDT Article-I.D.: cbmvax.872 Posted: Fri Oct 10 11:13:35 1986 Date-Received: Sat, 11-Oct-86 20:27:13 EDT References: <556@cubsvax.UUCP> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner) Organization: Commodore Technology, West Chester, PA Lines: 51 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=