Re: [dcrpg-devel] DC RPG
Status: Inactive
Brought to you by:
falkkin
|
From: Miles R. <reu...@ya...> - 2002-02-05 17:05:46
|
Why would this be struct be memory-intensive? It uses a bit-field so that each tile consists of 16bits or 2bytes. Maybe I'm just not understanding your suggestion... can you give an example code fragment which utilizes your proposal? -Miles Raymond EML: m_r...@bi... AIM: Killer2Ray ICQ: 13217756 IRC: Killer2 WWW: http://www.bigfoot.com/~m_rayman ----- Original Message ----- From: "Atonkelton" <Ato...@gm...> To: "Mailinglist" <dcr...@li...> Sent: Tuesday, February 05, 2002 10:51 AM Subject: Re: [dcrpg-devel] DC RPG > hi, > > I personally like the con-/destructor suggestion. It's more flexible. > So we're not bound with a particular map-layout (other than rectangular, > that is). > > I just played around with FF1 and Zelda (NES/SNES) they do not seem to have > wrap-around maps. But we could make that optional for our mappers. > > NOTE: > this structure can get pretty big, if used in big numbers > struct tile > { > unsigned int walkable : 1; //0 not walk, 1, walkable > unsigned int front : 1; //0 back, 1 front > unsigned int monster_info : 7; //monster id(s) > unsigned int event_id : 7; //event id * > unsigned int fg_sprite_id : 8; //foreground sprite id * > unsigned int bg_sprite_id : 8; //background sprite id * > } tile; > > I suggest putting boolean into a integer-value and then > AND or XOR them out -> little memory-friendlier. > > /* > Atonkelton <Ato...@gm...> > ICQ #7062663 > Please do not send any files larger than 512kb without request! > */ |