From: "DeHackEd" Newsgroups: comp.os.msdos.djgpp References: <001901be47ef$796d13a0$b9d80ad0 AT default> Subject: Re: Need help with paletes Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.0810.800 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.0810.800 Message-ID: Date: Sun, 24 Jan 1999 19:53:33 -0500 NNTP-Posting-Host: 142.194.222.65 X-Trace: tundra.ops.attcanada.net 917225679 142.194.222.65 (Mon, 25 Jan 1999 00:54:39 GMT) NNTP-Posting-Date: Mon, 25 Jan 1999 00:54:39 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Assuming you are working in 8 bit graphics modes, you should just have to do this: PALETTE pal; BITMAP *bmp = load_bitmap("filename.here", pal); bmp will contain your picture and pal will contain it's palette. Paint, the Windows pain editor, saved for me a 136 byte file. A palette, unless compressed (which I doubt) needs to be at least 768 bytes (RBG * 256 plus any header or spacer). Also for rotate_sprite, the angle is done using fixed notation. Example (requires floating point math): fixed degrees(float angle) { return ftofix(angle/360.0*256.0); // float to fix conveter } // 25 degrees rotate_sprite(screen, bmp, x, y, degrees(25)); Hope this helps. ---- "DeHackEd" My Email address in the header is completely fake (spammers). Email me at this address: http://www.geocities.com/cgi-bin/homestead/mail.pl?dehacked Steve Axsom wrote in message news:001901be47ef$796d13a0$b9d80ad0 AT default... > I'm making a game in allegro and I'm trying to load bitmaps. Is there an >easier way of setting the palletes then setting RGB for each color at a >time? With the windows default bitmap editor, I've notice you can save >palate files (.pal). Also, rotate_sprite doesn't seem to work, even with >memory bitmaps. if anybody could give me a *simple* code for it, I'd be very >greatful =). > > -Shane > >