kwsch / NHSE

Animal Crossing: New Horizons save editor
https://berichan.github.io/GetNHSE/
GNU General Public License v3.0
1.01k stars 260 forks source link

Unable to place rotated items on edge of map... #529

Closed Waltee closed 2 years ago

Waltee commented 2 years ago

If the original item is 3x2 for example, if you try and rotate the item using flag0=1 it's still not possible to place the item on the edge of the map, it still acts as if the item is 3 in length and requires a space at the edge of the map.

Please see below image, top placed item is flag0=0, works fine. Second placed item is flag0=1, placed as far to the right as it allows it. Ideally it would be placed on the square with the arrow but it's not possible.

image

kwsch commented 2 years ago

Looks like the out-of-bounds check is performed prior to acknowledging the swapping of width & height: https://github.com/kwsch/NHSE/blob/3e7bacb80b725679fecd715d6a73b9dfe994a934/NHSE.Core/Structures/Map/Layers/ItemLayer.cs#L118-L134