cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/15/08:53:06

From: "Chewbaklava" <kalit AT ctel DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: something went wrong
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <QBpt3.73$%J4.17627@harpo.ctel.net>
Date: Sat, 14 Aug 1999 22:39:06 -0400
NNTP-Posting-Host: 209.222.102.114
X-Trace: harpo.ctel.net 934684144 209.222.102.114 (Sat, 14 Aug 1999 22:29:04 EDT)
NNTP-Posting-Date: Sat, 14 Aug 1999 22:29:04 EDT
Lines: 102
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 <stdio.h>
#include <stdlib.h>

#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;
}



- Raw text -


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