| www.delorie.com/archives/browse.cgi | search |
| From: | "23yrold3yrold" <cbarry AT pangea DOT ca> |
| Newsgroups: | comp.os.msdos.djgpp |
| References: | <39553338_2 AT spamkiller DOT newsfeeds DOT com> <MPG DOT 13bf615f916589c498bc4e AT news DOT freeserve DOT net> <395566df_1 AT spamkiller DOT newsfeeds DOT com> |
| Subject: | Re: "load_bitmap" newbie... |
| Date: | Sat, 24 Jun 2000 21:26:08 -0500 |
| Lines: | 49 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.00.2919.6600 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2919.6600 |
| NNTP-Posting-Host: | 64.4.88.68 |
| Message-ID: | <39556f53_4@spamkiller.newsfeeds.com> |
| X-Trace: | 24 Jun 2000 21:32:51 -0500, 64.4.88.68 |
| X-Comments: | This message was posted through Newsfeeds.com |
| X-Comments2: | IMPORTANT: Newsfeeds.com does not condone, nor support, spam or any illegal or copyrighted postings. |
| X-Comments3: | IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!! |
| X-Report: | Please report illegal or inappropriate use to <abuse AT newsfeeds DOT com> You may also use our online abuse reporting from: http://www.newsfeeds.com/abuseform.htm |
| X-Abuse-Info: | Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS) |
| Organization: | Newsfeeds.com http://www.newsfeeds.com 73,000+ UNCENSORED Newsgroups. |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
> OK, last thing, I swear. I got it to blit (so ignore the last post) but it
won't move when you push the arrow keys. Sorry if all these posts are
annoying you; I assure you their annoying me.
> #include <stdlib.h>
> #include <stdio.h>
>
> #include "allegro.h"
>
> BITMAP *pic;
> PALETTE pal;
>
> int x,y;
>
> main(void)
> {
> //////The initpart
> allegro_init();
> install_keyboard();
> set_color_depth(16);
> set_gfx_mode(GFX_AUTODETECT,640,480,0,0);
> pic = load_bitmap ("test.bmp", pal);
>
> do
>
> {
> clear(screen);
> blit(pic, screen,0,0,0,0,32,32); //
>
> //////// Now handle the control
> if(key[KEY_LEFT])
> x--;
> if(key[KEY_RIGHT])
> x++;
> if(key[KEY_UP])
> y--;
> if(key[KEY_DOWN])
> y++;
> } while(!key[KEY_ESC]);
>
> set_gfx_mode(GFX_TEXT,0,0,0,0);
> destroy_bitmap(pic);
> }
>
>
>
>
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |