diff options
Diffstat (limited to 'engines/tsage/core.cpp')
-rw-r--r-- | engines/tsage/core.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index c2ce426052..0a8c4ef1b4 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -1354,13 +1354,15 @@ void ScenePalette::setEntry(int index, uint r, uint g, uint b) { * @param g G component * @param b B component * @param threshold Closeness threshold. + * @param start Starting index + * @param count Number of indexes to scan * @remarks A threshold may be provided to specify how close the matching color must be */ -uint8 ScenePalette::indexOf(uint r, uint g, uint b, int threshold) { +uint8 ScenePalette::indexOf(uint r, uint g, uint b, int threshold, int start, int count) { int palIndex = -1; byte *palData = &_palette[0]; - for (int i = 0; i < 256; ++i) { + for (int i = start; i < (start + count); ++i) { byte ir = *palData++; byte ig = *palData++; byte ib = *palData++; |