Original Post
I am having complaints of my bitmap loading/displaying engine being very slow. I'm not sure what is making it slow... if anybody could look at my code, I would appreciate it. I think the problem lies within the drawing part:
int DDDrawSprite( DDSPRITE sprite ){
RECT DestRect,SourceRect;
DestRect.left=sprite.x;
DestRect.top=sprite.y;
DestRect.right=sprite.x + sprite.width;
DestRect.bottom=sprite.y + sprite.height;
SourceRect.left=1;
SourceRect.top=1;
SourceRect.right=sprite.width;
SourceRect.bottom=sprite.height;
if(lpddsback->Blt(&DestRect, sprite.images[ sprite.curr_frame ],
NULL,DDBLT_WAIT | DDBLT_KEYSRC,
NULL!=DD_OK)) return 0;
return 1;
} // End DDDrawSprite();
Is there anything wrong with this??? Let me know if you need me to post the creating/loading routines. THANKS a lot!
I am using DirectX 5 for the engine, for compatibility on older systems.
*==================*
www.syntasoft.com
*==================*
Edited by - Gf11speed on November 25, 2001 1:03:18 PM