Skip to content

Commit

Permalink
Use sprites for getItemImage
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Dec 23, 2024
1 parent de938bd commit 06cbbc0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/bankImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,13 @@ export class BankImageTask {
}
}

const data = this.spriteSheetData[itemID];
if (data) {
const [sX, sY, width, height] = data;
const image = await getClippedRegionImage(this.spriteSheetImage, sX, sY, width, height);
return image;
}

const cachedImage = this.itemIconImagesCache.get(itemID);
if (cachedImage) return cachedImage;

Expand Down
Binary file modified tests/unit/snapshots/cl.OSB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 06cbbc0

Please sign in to comment.