void CharsetRendererV3::setColor(byte color) { bool useShadow = false; _color = color; // FM-TOWNS version of Loom uses old color method as well if ((_vm->_game.version >= 2) && ((_vm->_game.features & GF_16COLOR) || (_vm->_game.id == GID_LOOM && _vm->_game.version == 3))) { useShadow = ((_color & 0xF0) != 0); _color &= 0x0f; } else if (_vm->_game.features & GF_OLD256) { useShadow = ((_color & 0x80) != 0); _color &= 0x7f; } else useShadow = false; #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE if (_vm->_game.platform == Common::kPlatformFMTowns) { _color = (_color & 0x0f) | ((_color & 0x0f) << 4); if (_color == 0) _color = 0x88; } #endif enableShadow(useShadow); translateColor(); }
void CharsetRendererClassic::printChar(int chr, bool ignoreCharsetMask) { int width, height, origWidth, origHeight; int offsX, offsY; VirtScreen *vs; const byte *charPtr; bool is2byte = (chr >= 256 && _vm->_useCJKMode); assertRange(1, _curId, _vm->_numCharsets - 1, "charset"); if ((vs = _vm->findVirtScreen(_top)) == NULL && (vs = _vm->findVirtScreen(_top + getFontHeight())) == NULL) return; if (chr == '@') return; translateColor(); _vm->_charsetColorMap[1] = _color; #ifndef DISABLE_TOWNS_DUAL_LAYER_MODE processTownsCharsetColors(_bytesPerPixel); bool noSjis = false; if (_vm->_game.platform == Common::kPlatformFMTowns && _vm->_useCJKMode) { if ((chr & 0x00ff) == 0x00fd) { chr >>= 8; noSjis = true; } }
void MainWindow::defineColors(){ int c; for(int i = 0 ; i < 8 ; i++){ colors.at(i) = 0; } c = translateColor(cmbBallColors->currentText()); if(c != UNKNOWN){ colors.at(c)++; execConfig.ball_color = c; } c = translateColor(cmbMainColors_1->currentText()); if(c != UNKNOWN){ colors.at(c)++; execConfig.team_color[0] = c; } c = translateColor(cmbMainColors_2->currentText()); if(c != UNKNOWN){ colors.at(c)++; execConfig.team_color[1] = c; } c = translateColor(cmbSecColors_1->currentText()); if(c != UNKNOWN){ colors.at(c)++; execConfig.secundary_color_1[0] = c; } c = translateColor(cmbSecColors_2->currentText()); if(c != UNKNOWN){ colors.at(c)++; execConfig.secundary_color_1[1] = c; } c = translateColor(cmbSecColors_3->currentText()); if(c != UNKNOWN){ colors.at(c)++; execConfig.secundary_color_1[2] = c; } c = translateColor(cmbSecColors_4->currentText()); if(c != UNKNOWN){ colors.at(c)++; execConfig.secundary_color_2[0] = c; } c = translateColor(cmbSecColors_5->currentText()); if(c != UNKNOWN){ colors.at(c)++; execConfig.secundary_color_2[1] = c; } c = translateColor(cmbSecColors_6->currentText()); if(c != UNKNOWN){ colors.at(c)++; execConfig.secundary_color_2[2] = c; } /*for(int i = 0 ; i < 8 ; i++){ qDebug() << colors.at(i); }*/ }