• Advertisement

Archived

This topic is now archived and is closed to further replies.

Textures

This topic is 6584 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

To store all textures (for example, DX Surfaces for tiles), what''s the recommended storage? Should everything go into a big array and access it by named index? Here''s what I mean... (DXSurface *) Textures[50]; enum TEXTURETYPE {SAND, WATER, ROCK, GRASS, BORDER, etc...}; Blit( Tile, Textures[WATER] ); Yeah, I know, that''s just a bunch of half-pseudo half-dx code... But what''s a good way to keep track of each type of texture in the game for an isometric engine? Could someone help me out here? -John

Share this post


Link to post
Share on other sites
Advertisement
Use either a large surface and access each texture by offset (this is the preferred approach if you have a ton of small textures) or an array of surfaces and access by index - names is a NONO! If you need names in your world definition, make it so that you can "pre-compile" it into indices at run-time.

/NJ

Share this post


Link to post
Share on other sites

  • Advertisement