Coder's Guild Mailing List

Re: Making structs global(in DJGPP)

Posted by Frank Hale on 1999-10-05

Wouldn't something like this work?

typedef struct sprite_type {
    unsigned x, y;
    unsigned x_vel,y_vel;
    char width;
    char height;
    char num_frames;
    char cur_frame;
    char *background, **frame;
} sprite;
 
sprite *mysprite;

int main()
{

/* allocate memory for mysprite */

/* do other code here */

/* free memory used by mysprite */

return 0;
}


Hope this helps,
Frank

=====
From: Frank Hale
ICQ: 7205161
Webpage: http://jade.netpedia.net/sapphire
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com