Added code for debugging clipping (guarded with #ifdef CLIPDEBUG)

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1005 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2003-07-01 21:11:37 +00:00
parent 53631819f4
commit 26c1e7d198
@@ -61,8 +61,29 @@ process_image (FRAMEPTR FramePtr, SDL_Surface *img[], AniData *ani, int cel_ct)
tfbimg->colormap_index = ani[cel_ct].colormap_index;
img[cel_ct] = (SDL_Surface *)tfbimg->NormalImg;
FramePtr->HotSpot = MAKE_HOT_SPOT (hx, hy);
FramePtr->HotSpot = MAKE_HOT_SPOT (hx, hy);
SetFrameBounds (FramePtr, img[cel_ct]->w, img[cel_ct]->h);
#ifdef CLIPDEBUG
{
/* for debugging clipping:
draws white (or most matching color from palette) pixels to
every corner of the image
*/
Uint32 color = SDL_MapRGB (img[cel_ct]->format, 255, 255, 255);
SDL_Rect r = {0, 0, 1, 1};
if (img[cel_ct]->w > 2 && img[cel_ct]->h > 2)
{
SDL_FillRect (img[cel_ct], &r, color);
r.x = img[cel_ct]->w - 1;
SDL_FillRect (img[cel_ct], &r, color);
r.y = img[cel_ct]->h - 1;
SDL_FillRect (img[cel_ct], &r, color);
r.x = 0;
SDL_FillRect (img[cel_ct], &r, color);
}
}
#endif
}
static void