home *** CD-ROM | disk | FTP | other *** search
- Path: nwgw.infi.net!usenet
- From: dhopkins@infi.net (DHopkins)
- Newsgroups: comp.sys.amiga.programmer
- Subject: unsigned long addition question(GDS)
- Date: 10 Apr 1996 10:27:07 GMT
- Organization: InfiNet
- Message-ID: <1052.6674T364T2106@infi.net>
- NNTP-Posting-Host: pa8dsp3.orf.infi.net
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
-
- I'm using Gamesmith with SAS/C and have run into a complete
- blank in my math knowledge. GDS uses an 8-bit color table
- eg. 0x00rrggbb. Usually, I just ignore this type of stuff
- but now it's hit me square in the face.
-
- I want to do a screen fade and figured that I'd use the
- gs_SetRGB function to fade each color. the Commodore
- version of SetRGB32 lets you enter a value for r, g, and b.
- But gs_SetRGB only has 1 variable for the color, and it
- has r,g,b embedded in it.(like I said, 0x00rrggbb). How
- can I subtract from just r,g or b?
-
- I don't think I can do this...
-
- n=0x00rrggbb
- n--
-
- but what about...
-
- n = 0x00rrggbb - 0x000001 (to subtract from b)
-
- or
-
- n = 0x00rrggbb - 0x00010000 (to subtract from r)
-
-
- and would a maxed out register look like 0x000f0000 (for max red)?
-
- thanks for any help...
-
- D
-
-
- dhopkins@infi.net'1edv[please excuse the mess while3g4awsxcvz4r3t
- AMIGA 1200 030/50mhz.d[this .sig is being remodeledg5SEBR$%5fq3#%G
- r6t4555thgbcsr6rg8il34[33rzdbzd xv455e55tg24wgrvaer#RsE6#3$G#$TWDw
-
-
-