Browse Source

AddItemToStashGrid: Use PointsInRectangleRange with a starting position (#4297)

pull/4300/head
obligaron 4 years ago committed by GitHub
parent
commit
7b7cee52db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Source/qol/stash.cpp

4
Source/qol/stash.cpp

@ -52,8 +52,8 @@ Art StashNavButtonArt;
*/
void AddItemToStashGrid(unsigned page, Point position, uint16_t stashListIndex, Size itemSize)
{
for (auto point : PointsInRectangleRange({ { 0, 0 }, itemSize })) {
Stash.stashGrids[page][position.x + point.x][position.y + point.y] = stashListIndex + 1;
for (auto point : PointsInRectangleRange({ position, itemSize })) {
Stash.stashGrids[page][point.x][point.y] = stashListIndex + 1;
}
}

Loading…
Cancel
Save