Nice! I can't help but note that eschewing the use of horizontal half-blocks really makes it look pixellated, but I recognize that's probably unavoidable. You're using vertical half-blocks aggressively to minimize the amount of vertical space needed, and CP437 doesn't have quarter blocks, so it'd be hard to improve much in that direction. I think this would be a good "alternate" news font, for when you
really need to fit a huge heading in.
We do indeed have documentation on the .cpc file format; I reverse engineered it six years ago, and made sure to save the information for posterity.
This is an explanation of the .cpc colored ascii image format used, so that you can alter, read, or create new images of the format currently used by LCS.
The first 4 bytes indicate how many images are in the file. Each file can contain multiple images, but they all have to have the same dimensions. newstops.cpc, for example, contains five different newspaper headers at the time of this writing, and only one is ever printed to the screen at any one time.
The second 4 bytes indicate the x dimension of each image.
The third 4 bytes indicate the y dimension of each image.
After that, the first image starts. It runs vertically down the y axis, giving data for each cell of the image sequentially. So the first cell is for x=0, y=0, the second cell is x=1, y=0, the third cell is for x=2, y=0, etc., until it wraps around and starts with x=0, y=1, and then eventually starts in on the next image. When reading in, you'll want three nested loops, one for reading in each image, one for the x axis, and one for the y. See the news.cpp function loadgraphics() for an example.
Each cell is four bytes long. The first byte gives the ascii code of the symbol to print to the screen. The second byte is the color code for the foreground. The second byte is the color code for the background. The third byte is the brightnees bool for the foreground, 1 for bright, 0 for dim.
That's all there is to it.
Jonathan Stickles
22 Jun 2007
I didn't look into cmv files specifically, but I would guess they're probably in the same format, just treating successive images as frames instead of as separate images.