Пример #1
0
/**
 * This is used to put font pixels onto the screen - we adjust differently, so that we won't
 *  do triple pixel lines in any case on upscaled hires. That way the font will not get distorted
 *  Sierra SCI didn't do this
 */
void GfxScreen::putFontPixel(int startingY, int x, int y, byte color) {
	int actualY = startingY + y;
	if (_fontIsUpscaled) {
		// Do not scale ourselves, but put it on the display directly
		putPixelOnDisplay(x, actualY, color);
	} else {
		int offset = actualY * _pitch + x;

		_visualScreen[offset] = color;
		switch (_upscaledHires) {
		case GFX_SCREEN_UPSCALED_DISABLED:
			_displayScreen[offset] = color;
			break;
		default:
			putScaledPixelOnDisplay(x, actualY, color);
			break;
		}
	}
}
Пример #2
0
/**
 * This is used to put font pixels onto the screen - we adjust differently, so that we won't
 *  do triple pixel lines in any case on upscaled hires. That way the font will not get distorted
 *  Sierra SCI didn't do this
 */
void GfxScreen::putFontPixel(int startingY, int x, int y, byte color) {
	if (_fontIsUpscaled) {
		// Do not scale ourselves, but put it on the display directly
		putPixelOnDisplay(x, y + startingY, color);
	} else {
		int offset = (startingY + y) * _pitch + x;

		_visualScreen[offset] = color;
		if (!_upscaledHires) {
			_displayScreen[offset] = color;
		} else {
			int displayOffset = (_upscaledMapping[startingY] + y * 2) * _displayWidth + x * 2;
			_displayScreen[displayOffset] = color;
			_displayScreen[displayOffset + 1] = color;
			displayOffset += _displayWidth;
			_displayScreen[displayOffset] = color;
			_displayScreen[displayOffset + 1] = color;
		}
	}
}