Mail Archives: djgpp/1999/03/24/15:33:43
Just tried your code, and it works fine for me. It turns the entire screen
white.
Don't exactly know what you did. Try setting the GFX_MODE explicitly, rather
than leaving it to autodetect. Try VESA, or MODEX, or something like that.
Could be something weird w/ the video mode.
Matthew Feeney wrote:
> I ve been trying to blit one colour to the screen using the code below but
> it doesnt work (this is my first c/c++ proggy). All it does is display a
> small band of the colour on the top of the screen ( its about 4 in wide).
> Can anyone tell me why this isnt working because i think it should.
>
> #include <stdlib.h>
> #include <stdio.h>
> #include "allegro.h"
>
> int main()
> {
> BITMAP *memory_bitmap;
>
> /* allegro init stuff (video and keyboard routines) */
> allegro_init();
> set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0);
> set_pallete(desktop_pallete);
>
> /* make a memory bitmap sized 320x200 */
> memory_bitmap = create_bitmap(320, 200);
>
> /* draw something onto it */
> clear_to_color(memory_bitmap ,0);
>
> /* stick it onto the screen */
> blit(memory_bitmap, screen, 0 ,0 ,0 ,0 ,320 ,200);
> return 0;
> }
>
> Thanks
>
> -----------------------------------------------------
> Matthew "Max Damage" Feeney
> Email- mathewf AT enterprise DOT net
> -----------------------------------------------------
- Raw text -