Advertisement

Textures

Started by January 04, 2000 05:38 PM
0 comments, last by ColdfireV 25 years, 2 months ago
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
[email=jperegrine@customcall.com]ColdfireV[/email]
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
<b>/NJ</b>

This topic is closed to new replies.

Advertisement