| www.delorie.com/archives/browse.cgi | search |
| From: | "OmniMeta" <meta AT abacom DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| References: | <19990820162609 DOT 24654 DOT 00000345 AT ng-ch1 DOT aol DOT com> |
| Subject: | Re: HELP NEEDED ON ALLEGRO!! |
| Lines: | 37 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.00.2014.211 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2014.211 |
| Message-ID: | <Kndw3.323$Os5.50957@wagner.videotron.net> |
| Date: | Mon, 23 Aug 1999 11:03:19 -0300 |
| NNTP-Posting-Host: | 207.253.161.60 |
| X-Complaints-To: | abuse AT videotron DOT net |
| X-Trace: | wagner.videotron.net 935420522 207.253.161.60 (Mon, 23 Aug 1999 11:02:02 EDT) |
| NNTP-Posting-Date: | Mon, 23 Aug 1999 11:02:02 EDT |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Orvbongat <orvbongat AT aol DOT com> a écrit dans le message :
19990820162609 DOT 24654 DOT 00000345 AT ng-ch1 DOT aol DOT com...
> Here's what i do:
>
> BITMAP *b;
>
> b = create_bitmap(32,32);
>
> for (y = 0; y < 32; y++)
> for (x = 0; x < 32; x++)
> b->line[y][x] = 12;
>
> draw_sprite(screen,b,0,0);
>
> BOOM it crashes after that. Can anyone help???
On what video mode are you ?
Did you set the video mode and color depth using
set_color_depth( [8] [15] [16] [24] [32] )
set_gfx_mode(640, 480, 0, 0);
Your code should work only with 8 bits color depth.
If you are using 15 16 24 or 32 bits color depth, it will not work.
// using 24 bits color depth
for (y = 0; y < 32*3; y++)
for (x = 0; x < 32*3; x++)
b->line[y][x] = 12; // 8 bits
b->line[y][++x] = 12; // 8 bits
b->line[y][++x] = 12; // 8 bits
// total 24 bits
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |