From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: Are THESE two statements EQUAL? Date: 29 Jun 2000 14:50:28 -0700 Organization: Posted via Supernews, http://www.supernews.com Lines: 42 Sender: nate AT mercury DOT bitbucket Message-ID: <83u2ec9mxn.fsf@mercury.bitbucket> References: <5t7klskbj285civf9serk693otnho6t5j0 AT 4ax DOT com> <7qmkls0k46jupmhklc5sqesf999hn7vmjl AT 4ax DOT com> <8F61A359BASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <8F626A568ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> X-Complaints-To: newsabuse AT supernews DOT com User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Sinan_Unur AT mail DOT com (A. Sinan Unur) writes: > as for BITMAP and PALLETE, all one should care about is the API > through which you access these structures (that is the whole point > why you are provided with a BITMAP data type rather than an array of > int.) further, BITMAP and PALLETE are logically separate concepts > regardless of any affinity that might exist between their underlying > implementations. And in fact, there isn't any. typedef struct BITMAP /* a bitmap structure */ { int w, h; /* width and height in pixels */ int clip; /* flag if clipping is turned on */ int cl, cr, ct, cb; /* clip left, right, top and bottom values */ GFX_VTABLE *vtable; /* drawing functions */ void (*write_bank)(); /* write bank selector, see bank.s */ void (*read_bank)(); /* read bank selector, see bank.s */ void *dat; /* the memory we allocated for the bitmap */ int bitmap_id; /* for identifying sub-bitmaps */ void *extra; /* points to a structure with more info */ int line_ofs; /* line offset (for screen sub-bitmaps) */ int seg; /* bitmap segment */ unsigned char *line[0]; /* pointers to the start of each line */ } BITMAP; vs. typedef struct RGB { unsigned char r, g, b; unsigned char filler; } RGB; typedef RGB PALLETE[PAL_SIZE]; No similarities whatever. -- Nate Eldredge neldredge AT hmc DOT edu