rem: ((1 << 8) - gscale)) >> 8;
add: (gscale_identity - gscale)) / gscale_identity;
context: TFB_Prim_StampFill (PSTAMP stmp, TFB_Palette *color){	int x, y;	PFRAME_DESC SrcFramePtr;	TFB_Image *img;	int r, g, b;	int gscale;	SrcFramePtr = (PFRAME_DESC)stmp->frame;	if (!SrcFramePtr)	{		fprintf (stderr, "TFB_Prim_StampFill: Tried to draw a NULL frame  (Stamp address = %p)\n", stmp);		return;	}	img = SrcFramePtr->image;	gscale = GetGraphicScale ();	if (!img)	{		fprintf (stderr, "Non-existent image to TFB_Prim_StampFill()\n");		return;	}	LockMutex (img->mutex);	x = stmp->origin.x - _CurFramePtr->HotSpot.x - SrcFramePtr->HotSpot.x;	y = stmp->origin.y - _CurFramePtr->HotSpot.y - SrcFramePtr->HotSpot.y;	r = color->r;	g = color->g;	b = color->b;	if (gscale != 0 && gscale != 256)	{		TFB_DrawImage_FixScaling (img, gscale);		x += (SrcFramePtr->HotSpot.x *		      ((1 << 8) - gscale)) >> 8;		y += (SrcFramePtr->HotSpot.y *		      ((1 << 8) - gscale)) >> 8;	}	UnlockMutex (img->mutex);	if (TYPE_GET (_CurFramePtr->TypeIndexAndFlags) == SCREEN_DRAWABLE)	{		TFB_DrawScreen_FilledImage (img, x, y, gscale, r, g, b,					    TFB_SCREEN_MAIN);	}	else	{		TFB_DrawImage_FilledImage (img, x, y, gscale, r, g, b,					   _CurFramePtr->image);	}}