From: Groman Newsgroups: comp.os.msdos.djgpp Subject: Re: something went wrong Date: Sat, 14 Aug 1999 22:28:16 -0700 Organization: Posted via RemarQ, http://www.remarQ.com - The Internet's Discussion Network Lines: 102 Message-ID: <37B64FF0.60C6C914@tfz.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: 934694869 WQ39EUJ1V392DB781 usenet44.supernews.com X-Complaints-To: newsabuse AT remarQ DOT com X-Mailer: Mozilla 4.04 [en] (WinNT; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com maybe there is something wrong with my netscape, but I see a lot of file://k in the end, which is weird...that should give you a lot of parse errors Chewbaklava wrote: > i was creating a program that would let you create 24x24 bitmaps and it was > all working good until i quit for the day. this morning i got up, and it > didn't compile as it did the night before. > > whenever i compile it, it gives me a HUGE list of "parse error before " for > practically every line. maybe i'm an idiot and am just missing something > REALLY little, like a semi-colon or something. > > anyway, the code - > > #include > #include > > #include "allegro.h" > > BITMAP *bmp; > BITMAP *sub; > BITMAP *poo; > PALETTE pal; > int c = 0; > int k, x, y; > > void drawscreen() > { > int i, a; > clear(bmp); > show_mouse(screen); > > for (a = 0; a < 10; a++) > { > for (i = 0; i < 256; i++) > } > putpixel(bmp, i, a, i); > } > } > circlefill(bmp, 250, 50, 30, c); > > putpixel(bmp, c-1, 11, 15); > putpixel(bmp, c+1, 11, 15); > putpixel(bmp, c-2, 12, 15); > putpixel(bmp, c+2, 12, 15); > for (a = 10; a < 20; a++) > { > putpixel(bmp, c, a, 15); > } > > stretch_blit(sub, bmp, 0, 0, 24, 24, 50, 50, 146, 146); > blit(sub, bmp, 0, 0, 240, 140, 24, 24); > rect(bmp, 49, 49, 196, 196, 15); > blit(bmp, screen, 0, 0, 0, 0, 320, 200); > } > > int main() > { > int k; > > allegro_init(); > set_gfx_mode(GFX_VGA, 320, 200, 0, 0); > install_keyboard(); > install_mouse(); > install_timer(); > clear_keybuf(); > poo = load_bitmap("pal.pcx", pal); > > sub = create_bitmap(24, 24); > bmp = create_bitmap(320, 200); > set_pallete(pal); > clear(sub); > clear_to_color(bmp, 1); > > while (!key[KEY_ESC]) > { > drawscreen(); > file://k = readkey(); > file://k = k >> 8; > > if (key[KEY_LEFT]) {c = c - 1;} > if (key[KEY_RIGHT]) {c = c + 1;} > if (c > 255) {c = 255;} > if (c < 0) {c = 0;} > > file://if (mouse_b & 1) > file://{ > file://if ((mouse_x > 50) && (mouse_y > 50)) > file://{ > file://if ((mouse_x < 132) && (mouse_y > 132)) > file://{ > file://x = mouse_x; > file://y = > }; > > return; > }