From: "23yrold3yrold" Newsgroups: comp.os.msdos.djgpp Subject: Passing a datafile to a function Date: Sun, 24 Sep 2000 00:27:04 -0500 Lines: 21 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: spamkiller Message-ID: <39cd90d5_4@spamkiller.newsfeeds.com> 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 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 Hello. I've been working on a tilemap drawing function using Allegro. I've got it working beautifully except for one small detail; the function is supposed to get the width and height of the tile sprite from the ->w and ->h of the RLE_SPRITE in the datafile passed to it, but it won't work. The below code results in an error, saying that I can't check the w and h values of image.dat because it's a void pointer. If anyone can help me with this I'd really appreciate it. Chris void DrawTilemap(BITMAP *buffer, DATAFILE *image, vector > map, int x = 0, int y = 0, int cl = 0, int repeat = 0) { ........ int w = (RLE_SPRITE *)image[map[0][0]].dat->w; int h = (RLE_SPRITE *)image[map[0][0]].dat->h; ........ }