public DirectDrawSpriteSurface(string spriteName, string spriteImagePath, int xFrames, int yFrames)
{
#if TRACE
GraphicsEngine.Profiler.Start("DirectDrawSpriteSurface..ctor()");
#endif
this.spriteName = spriteName;
ddsurface = new DirectDrawSurface(spriteImagePath);
if (ddsurface == null)
{
ddsurface = new DirectDrawSurface(spriteImagePath, DirectDrawSurface.SystemMemorySurfaceDescription);
}
ddsurface.TransparencyKey = new ColorKey(DirectDrawSurface.DefaultColorKey);
animationFrames = xFrames;
animationTypes = yFrames;
frameHeight = ddsurface.Rect.Bottom/animationTypes;
frameWidth = ddsurface.Rect.Right/animationFrames;
#if TRACE
GraphicsEngine.Profiler.End("DirectDrawSpriteSurface..ctor()");
#endif
}