home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!decwrl!concert!rutgers!cbmvax!chrisg
- From: chrisg@cbmvax.commodore.com (Chris Green)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: LoadRGB8() ????
- Keywords: amiga graphics technical programmer AGA
- Message-ID: <36756@cbmvax.commodore.com>
- Date: 6 Nov 92 13:42:40 GMT
- References: <Bx93A3.B0M@sunlab1.bath.ac.uk>
- Reply-To: chrisg@cbmvax.commodore.com (Chris Green)
- Organization: Commodore, West Chester, PA
- Lines: 50
-
- In article <Bx93A3.B0M@sunlab1.bath.ac.uk> ma9tn@sunlab1.bath.ac.uk (T Nettleship) writes:
- >
- >Having read about the new AGA chipset and it's new graphics
- >modes, I have decided to modify a fractal program of my own
- >to use the 256 colour register mode.
- >
- >I have one problem with the conversion. I can open an 8-bitplane
- >screen at the appropriate resolutions, and render to it. This
- >works fine. However, I can't load the new AGA 24-bit palette
- >registers.
- >
- >I use the graphics library call LoadRGB4(), but this only uses
- >12-bit colours, so I am losing a lot of colour definition. What
- >I want to know is what is the library offset / registers definition
- >for a corresponding 24-bit regs function (which I assume will
- >be called LoadRGB8())?
- >
- You want to call LoadRGB32.
- LoadRGB32(a0=viewport,a1=table).
-
- "table" is a pointer to a description of what colors to load with
- what values. Each entry of the list starts with a word for how many colors
- to load, followed by a word for starting color. The color values follow
- with 3 longwords for each RGB value. The table is terminated with a 0 count.
-
- So, to load 3 colors the table might be:
-
- ULONG table[]={ (3<<16)+0, /* load 256 color starting at 0 */
- 0xffffffff,0,0, /* color 0=full red */
- 0,0xffffffff,0, /* color 1=full green */
- 0,0,0xffffffff, /* color 2=full blue */
- 0 /* terminator */ };
-
- a SAS style pragma is:
-
- #pragma libcall GBASE LoadRGB32 372 9802
-
- for assembly,
-
- _LVOLoadRGB32 equ -$372
-
- Good luck with your program.
- --
- *-------------------------------------------*---------------------------*
- |Chris Green - Graphics Software Engineer - chrisg@commodore.COM f
- | Commodore-Amiga - uunet!cbmvax!chrisg n
- |My opinions are my own, and do not - icantforgettheimpression o
- |necessarily represent those of my employer.- youmadeyouleftaholeinthe r
- |"A screaming comes across the sky..." - backofmyhead d
- *-------------------------------------------*---------------------------*
-