/*=========================================================================== This function draws the image and centers it within the specified rectangle if bCenter is TRUE. - note��return if image bot fit in the rect ===========================================================================*/ void TS_DrawImage(IImage * pImage, AEERect * pRect, boolean bCenter) { AEEImageInfo ii; int x; int y; IIMAGE_GetInfo(pImage, &ii); // Do not display if image does not fit in the allocated rectangle. if (ii.cx > pRect->dx || ii.cy > pRect->dy) return; if (bCenter) { x = pRect->x + (pRect->dx / 2) - (ii.cxFrame / 2); y = pRect->y + (pRect->dy / 2) - (ii.cy / 2); } else { x = pRect->x; y = pRect->y; } IIMAGE_Start(pImage, x, y); }
void StatusBox_Start(StatusBox *me) { if ((IImage *)0 != me->piImage) { if (me->bSelfAnimated) { IIMAGE_Start(me->piImage,me->rcImage.x+1,me->rcImage.y+1); } else { StatusBox_AnimateTimer(me); } } me->pwsz = (AECHAR *)dotdotdot; me->bStarted = TRUE; }