loading textures with animations newbie

Started by
2 comments, last by gobelair 22 years ago
How can I load a animation in DirextX 8? Do I have to load all the textures from their own file. Or can i just load 1 file with all the textures included in that file. Plz give a link from a tutorial or some exemple code sorry for my bad English gobelair
Advertisement
You do it how you''d like to do it.

If youre loading bitmap.. or similar then you need to load each one one by one.

-------
"Programming is like sex make one mistake, and you have to support it forever."
Homepage: www.ussshrike.com/pcwebvia/
-------Homepage: http://www.pclx.com
thanks

but how can I load multiple Images from 1 file. Is there any tutorial for learning it? Or maybe some easy code.
You load one texture with all the frames of animation in it. Then set up a texture-rectangle matrix with a function like this

D3DXMATRIX DXGMatrixTextureRect(float Width,float Height,D3DRECT Rect);
{
D3DXMATRIX mOut;
D3DXMatrixIdentity(mOut);
mOut[0,0] = (1/Width)*Rect.x2;
mOut[1,1] = (1/Height)*Rect.y2;
mOut[3,0] = (1/Width)*Rect.x1;
mOut[3,1] = (1/Height)*Rect.y1;
return mOut;
};

Or something like that. It''s an excerpt from the D3D wrapper I''ll be releasing soon in DLL form.

void Signature()
{
Only for Delphi.
};
void Signature(void* Pointer){PObject(Pointer)->ShowMessage("Why do we need so many pointers?");};

This topic is closed to new replies.

Advertisement