mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Fix indexing check for tile rotation
Closes #3950 Does not resolve #3953 , separate issue as caused by the April refactor. Need to debug old & new and see where the data is being copied wrong
This commit is contained in:
parent
a483bf9a24
commit
d647f15f23
1 changed files with 4 additions and 3 deletions
|
@ -420,8 +420,8 @@ public sealed class Tile
|
|||
const int pixels = TileWidth * TileHeight;
|
||||
for (int i = 0; i < pixels; i++)
|
||||
{
|
||||
var index = (8 * (1 + (i / 8))) + (i & 7);
|
||||
if (ColorChoices[^index] != tileColors[i])
|
||||
var index = pixels - (8 * (1 + (i / 8))) + (i & 7);
|
||||
if (ColorChoices[index] != tileColors[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -433,7 +433,8 @@ public sealed class Tile
|
|||
const int pixels = TileWidth * TileHeight;
|
||||
for (int i = 0; i < pixels; i++)
|
||||
{
|
||||
if (ColorChoices[^i] != tileColors[i])
|
||||
var index = pixels - 1 - i;
|
||||
if (ColorChoices[index] != tileColors[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue