[aseprite] 105/196: Do not remap indexes between palette entries that are equal (fix #914)
Tobias Hansen
thansen at moszumanska.debian.org
Wed Apr 20 18:50:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit f696d895b44234b4be3398cce4fd9eb0ec6bfb9e
Author: David Capello <davidcapello at gmail.com>
Date: Thu Mar 24 17:37:04 2016 -0300
Do not remap indexes between palette entries that are equal (fix #914)
---
src/doc/remap.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/doc/remap.cpp b/src/doc/remap.cpp
index c8350f6..cd1e6a5 100644
--- a/src/doc/remap.cpp
+++ b/src/doc/remap.cpp
@@ -102,6 +102,14 @@ Remap create_remap_to_change_palette(
continue;
const color_t color = oldPalette->getEntry(i);
+
+ // If in both palettes, it's the same color, we don't need to
+ // remap this entry.
+ if (color == newPalette->getEntry(i)) {
+ remap.map(i, i);
+ continue;
+ }
+
int j = newPalette->findExactMatch(
rgba_getr(color),
rgba_getg(color),
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list