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

Message-ID: <36F56592.338DEAD3@lycosmail.com>
Date: Sun, 21 Mar 1999 16:33:06 -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: Allegro - why doesnt this work??
References: <CWWE2.25$gZ4 DOT 281 AT news DOT enterprise DOT net>
Reply-To: djgpp AT delorie DOT com

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 -


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