private Image LayerOverImageItem(Image baseImage, int item, int generation) { Image itemimg = (Image?)Resources.ResourceManager.GetObject(GetItemResourceName(item)) ?? Resources.bitem_unk; if (328 <= item && item <= 419) // gen2/3/4 TM { itemimg = Resources.bitem_tm; } else if (1130 <= item && item <= 1229) // Gen8 TR { itemimg = Resources.bitem_tr; } // Redraw item in bottom right corner; since images are cropped, try to not have them at the edge int x = ItemShiftX + ((ItemMaxSize - itemimg.Width) / 2); if (x + itemimg.Width > baseImage.Width) { x = baseImage.Width - itemimg.Width; } int y = ItemShiftY + (ItemMaxSize - itemimg.Height); return(ImageUtil.LayerImage(baseImage, itemimg, x, y)); }
private static Image LayerOverImageEggAsItem(Image baseImage, int species) { var egg = GetEggSprite(species); return(ImageUtil.LayerImage(baseImage, egg, EggOverLayerAsItemShiftX, EggOverLayerAsItemShiftY)); // similar to held item, since they can't have any }