Skip to content

Commit

Permalink
Merge pull request #1 from samszotkowski/world-map-dumper-chunk-sprit…
Browse files Browse the repository at this point in the history
…e-fix-2

World map dumper chunk sprite fix 2
  • Loading branch information
MESLewis authored Sep 24, 2024
2 parents 1874a8b + f699cd3 commit 8c30ca2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cache/src/main/java/net/runelite/cache/MapImageDumper.java
Original file line number Diff line number Diff line change
Expand Up @@ -1504,9 +1504,8 @@ else if (rotation == 3)
ObjectDefinition object = findObject(location.getId());

int drawX = (drawBaseX + localX) * MAP_SCALE;
//What is offsetY?
int objSizeOffset = Math.max(2, object.getOffsetY());
int drawY = (drawBaseY + (Region.Y - objSizeOffset - localY)) * MAP_SCALE;
int objSizeOffset = Math.max(object.getSizeX(), object.getSizeY()) / 2;
int drawY = (drawBaseY + (Region.Y - objSizeOffset - localY - 1)) * MAP_SCALE;
if (object.getMapSceneID() != -1)
{
blitMapDecoration(image, drawX, drawY, object);
Expand Down Expand Up @@ -1836,7 +1835,7 @@ private void blitMapDecoration(BufferedImage dst, int x, int y, ObjectDefinition
{
SpriteDefinition sprite = mapDecorations[object.getMapSceneID()];
float scale = MAP_SCALE / (float) 4;
blitIcon(dst, x, y + MAP_SCALE, sprite, scale);
blitIcon(dst, x, y, sprite, scale);
}

private void blitIcon(BufferedImage dst, int x, int y, SpriteDefinition sprite, float scale)
Expand Down

0 comments on commit 8c30ca2

Please sign in to comment.