www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/12/09:15:26

From: "Cephaler" <cephaler AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: pointers and errors make cephaler go crazy
Date: 12 Aug 1998 13:14:03 GMT
Organization: ICGNetcom
Lines: 22
Message-ID: <01bdc5f3$003d8b00$78c3b8cd@scully>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980812113039 DOT 16932C-100000 AT is>
NNTP-Posting-Host: wbg-va3-24.ix.netcom.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> Is map[x][y]->tile really an index?  You didn't tell, but it could be
> that map[x][y]->tile is already a pointer to the tile, so you don't
> need to index tiles[] with it.
Well, I know that tiles is perfectly fine, because I did some debugging
code and dumped the tiles to the screen, and tile is an unsigned char..

> This will never work.  You are using a pointer (an address of
> map[x][y]->tile) as an index into an array.
> 

Hmmm is that supposed to be common knowledge? Why not?

> It is usually a bad idea to use names with leading underscores.  ANSI
> C says that these names are reserved for the library, so you could get
> a conflict.
> 

Not my fault, friend started graphics engine and left me to debug it... (I
personally would have used tile_t) I guess this game is doomed, then. Oh
well more time for other game :P

- Cephaler -

- Raw text -


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