www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/24/15:33:40

Message-ID: <36F5641C.C017A30B@lycosmail.com>
Date: Sun, 21 Mar 1999 16:26:52 -0500
From: Adam Schrotenboer <ajschrotenboer AT lycosmail DOT com>
X-Mailer: Mozilla 4.51 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: i have some questions :)
References: <19990320045526 DOT 25910 DOT 00000315 AT ng-ft1 DOT aol DOT com>
Reply-To: djgpp AT delorie DOT com

Assuming 24-bit color, you should be able to use bit shifting, and then do a
bitwise OR. Don't ask me anything about 16-bit, 15 bit, or 32 bit however. I have
no idea whatsoever.
example
set_color = (0,( (mycolor[0]<<16) || (mycolor[1]<<8) || (mycolor[2)]) );

When I give you the above paragraph, I should say that I have not actually done
this before, but it just seemed logical.

Et1850 wrote:

> Some Questions
>
> 1. how do i get and r,g,b, into a one diget color. rgb needs three numbers but
>    the command in allegro want one number.
>
>    RGB mycolor = {43,56,123};   *rgb colors here are ex.
>
>    set_color = (0,mycolor);     *Wrong, mycolor is not const
>                (0,&mycolor)     *Wrong, mycolor is not int
>
>    looking to mask sprites. but can't figure out my colors. (did it in windows
>    using hex colors). so how would i get grey or pink (24-bit). also need to
>    use colors for gui.
>
> 2. when getting .bmp or .pcx files(pics) from a data file is there a way to
>    index to the next file without calling the name of the pic i have chose
>
>    BASIC Ex.
>      for i=0 to eof
>        bmp = i
>      next i
>
>    if so that would shrink my code down considerably. :)
>
> 3. is there a way to get two dialogs to initialize at once, i've tried to
> create a tool bar of icons and a menu bar(in one dialog), but with all the icon
> procs the menu bar does not display correctly. when i put the menu bar in one
> dialog and the tool bar in another they both display fine. but i lose the
> ability to use one of the dialogs in the process.(usually the menu bar). memory
> is not a prob have 13M to play with. if code would be of help e-mail me for its
> somewhat big.
>
> 4. i get strange errors in something called sigxxx ?
>
> 5. how would one create a .h file so that way i could add them as new libs to
> djgpp?
>
> et1850 AT aol DOT com


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019