void VW_DrawPropString( const char* string) { fontstruct* font = static_cast<fontstruct*>(grsegs[STARTFONT + fontnumber]); int height = font->height; int string_length = static_cast<int>(strlen(string)); for (int c = 0; c < string_length; ++c) { std::uint8_t ch = string[c]; int width = font->width[ch]; const std::uint8_t* source = (reinterpret_cast<const std::uint8_t*>(font)) + font->location[ch]; for (int w = 0; w < width; ++w) { for (int h = 0; h < height; ++h) { if (source[h * width] != 0) { VL_Plot(px + w, py + h, fontcolor); } } ++source; } px = static_cast<std::int16_t>(px + width); } }
void VL_MemToScreen( const Uint8* source, int width, int height, int x, int y) { for (int p = 0; p < 4; ++p) { for (int h = 0; h < height; ++h) { for (int w = p; w < width; w += 4) VL_Plot(x + w, y + h, *source++); } } }
void VL_MaskMemToScreen( const Uint8* source, int width, int height, int x, int y, Uint8 mask) { for (int p = 0; p < 4; ++p) { for (int h = 0; h < height; ++h) { for (int w = p; w < width; w += 4) { Uint8 color = *source++; if (color != mask) VL_Plot(x + w, y + h, color); } } } }