TSAGE: Cleaner bugfix for text colours being incorrect

This commit is contained in:
Paul Gilbert 2011-04-20 23:02:07 +10:00
parent 1eb75f7892
commit 3fee10eb60
2 changed files with 1 additions and 2 deletions

View File

@ -791,7 +791,6 @@ Speaker::Speaker() : EventHandler() {
_fontNumber = 2;
_textMode = ALIGN_LEFT;
_color1 = _color2 = _color3 = _globals->_scenePalette._colors.foreground;
_color2 = _color3 = 0;
_action = NULL;
_speakerName = "SPEAKER";
}

View File

@ -1300,7 +1300,7 @@ uint8 ScenePalette::indexOf(uint r, uint g, uint b, int threshold) {
int bDiff = abs(ib - (int)b);
int idxThreshold = rDiff * rDiff + gDiff * gDiff + bDiff * bDiff;
if (idxThreshold <= threshold) {
if (idxThreshold < threshold) {
threshold = idxThreshold;
palIndex = i;
}