![]() |
|
I can't draw_sprite |
Ricardo Santos
Member #6,609
November 2005
![]() |
Hi there! I've been trying to make a draw_lit_sprite effect, but i don't quite get how to work with truecolor images I don't even can draw a sprite.. when i use draw_sprite nothing happens but with a normal bit i can see the image. What's missing? Thanks! set_color_conversion(COLORCONV_KEEP_TRANS); BITMAP *test = load_bitmap("table.pcx", pal); BITMAP *buffer = create_bitmap(screen->w, screen->h); draw_sprite(test, buffer, 0, 0); // it works if i do a blit blit(buffer, screen, 0, 0, 0, 0, buffer->w, buffer->h);
|
X-G
Member #856
December 2000
![]() |
Someone needs to RTFM more closely. In particular, actually look at what each argument is. -- |
Ricardo Santos
Member #6,609
November 2005
![]() |
Oops, you're right. I was playing with blit and draw_sprite and forgot to switch the args. But still I can't get anything good. The sprite looks like EGA and zoomed with scanlines. Is it colordepth problem? I tried to force colordepth to 8,16 and 32 and won't help anyway. |
Todd Cope
Member #998
November 2000
![]() |
Quote: Is it colordepth problem? Sounds like it. Make sure you set the color depth before setting the graphics mode. |
X-G
Member #856
December 2000
![]() |
Probably, yes. Make sure the bitmap is of the same color depth as what you're actually running. Draw_sprite won't work well with mixed color depths. -- |
Ricardo Santos
Member #6,609
November 2005
![]() |
Oh i got it! It was the set_color_conversion(COLORCONV_KEEP_TRANS); Without conversion all goes well. Thanks |
Evert
Member #794
November 2000
![]() |
Quote: It was the set_color_conversion(COLORCONV_KEEP_TRANS); Without conversion all goes well. Thanks
Eh? |
James Stanley
Member #7,275
May 2006
![]() |
Before calling set_gfx_mode, use set_color_depth(n), where n is an int that is the colour depth you require. |
LennyLen
Member #5,313
December 2004
![]() |
Quote: Before calling set_gfx_mode, use set_color_depth(n), where n is an int that is the colour depth you require. Read before you post! It's already been established that the problem lay elsewhere.
|
|