Message-Id: <01BD848E.54F1D800@secp6071.mlg.cit.alcatel.es> From: =?iso-8859-1?Q?Diego_Dom=EDnguez_Cazorla?= To: "'djgpp'" Subject: Transparent pointer pixels in 16 bit color mode (ALLEGRO 3.0 + BGUI) Date: Thu, 21 May 1998 07:59:04 +-300 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Precedence: bulk Hello, Short question: How to make a pointer with transparent pixels in 16 bit color mode? "Long" question: I have already read (many many times) ALLEGRO and BGUI docs, but I can't get pixels on a poiter to be transparent. (I don't wanna transparency color table, just one fully transparent 'color'). I now it is possible because the default pointer DOES work. I also have tried in the examples given in both libraries, but no poiter example comes in truecolor or 16 bit color format. They only say that brigth pink is the color for the transparent mask (is it "RGB bright_pink={255,0,255}?"), but I don't know how to get that!!! (I don't understand very well why and how palletes must be handled in >256 color modes). Well, that's the point. Can any one help me? Thanx in advance. (I have appended at the end my code related with this stuff to see if that helps you in helping me) ==> Diego Domínguez <== ddomingu AT cit DOT alcatel DOT es BITMAP * mouse_busy; #define p0 3 #define p1 1 #define p2 2 char mouse_busy_char[256]= { p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2, ...................... p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2,p2 }; int main() { char color; RGB brigth_pink = {255, 0, 255}; allegro_init(); install_keyboard(); install_timer(); install_mouse(); set_mouse_speed(16,12); set_color_conversion(COLORCONV_TOTAL); set_color_depth(16); set_gfx_mode(GFX_AUTODETECT, SCR_W, SCR_H, 0, 0); bill_init(); bill_init_pal(); clear_to_color(screen, 0); set_gui_mode(TRUE); .... mouse_busy = create_bitmap(16,16); clear(mouse_busy); drawing_mode(DRAW_MODE_MASKED_PATTERN, mouse_busy, 0, 0); for (i=0; i<16; i++) // taken from an BGUI example { for (j=0; j<16; j++) { switch(mouse_busy_char[i+16*j]) { case 1: color=255; break; case 2: color=0; break; default: color=get_billcolor(bright_pink);break; } putpixel(mouse_busy, i, j, color); } } do_dialog(main_window, 0); /* and in do_dialog I do: show_mouse(NULL); set_mouse_sprite(mouse_busy); show_mouse(screen); */ return(0); }