Skip to content

ASCII terminal output #36

@pwalig

Description

@pwalig
// Windows
std::string console_out;
for (uint32_t y = 0; y < framebuf.height(); y += 16) {
	for (uint32_t x = 0; x < framebuf.width(); x += 8) {
		console_out += char(0x1B) + std::string("[38;2;") + std::to_string(framebuf.color(x, y).r) + ';' + std::to_string(framebuf.color(x, y).g) + ';' + std::to_string(framebuf.color(x, y).b) + "m#";
	}
	console_out += '\n';
}
std::cout << console_out << char(0x1B) << '[' << std::to_string(framebuf.height()) << "A\r";

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions