1. image: download

    Trying out to implement ordered dithering on the console background.
Initially I was going to rewrite the whole drawing function for the console, until I realized that the original code stretches out the whole image without using any floating point variables. It’s all written using some smart fixed point math tricks, like multiplying the scale of the final image by 0x10000 and then bitshifting its results in the index of the source pixels 16 bits to the right to allow subpixel precision.
However, for some reason I couldn’t get my dithering algorithm to also work vertically; as you can see, it only dithers horizontally.
After spending out some hours trying to figure out why, I’ve come to the conclusion that it’s just one of those cases where it may be better to just scrap the original code and rewrite most (if not all) of the code by myself. After all, it worked wonders for the particle drawing code.
This means I’m going to rewrite it and use floating points instead, which should make it easier for me to get the dithering working properly.

    Trying out to implement ordered dithering on the console background.

    Initially I was going to rewrite the whole drawing function for the console, until I realized that the original code stretches out the whole image without using any floating point variables. It’s all written using some smart fixed point math tricks, like multiplying the scale of the final image by 0x10000 and then bitshifting its results in the index of the source pixels 16 bits to the right to allow subpixel precision.

    However, for some reason I couldn’t get my dithering algorithm to also work vertically; as you can see, it only dithers horizontally.

    After spending out some hours trying to figure out why, I’ve come to the conclusion that it’s just one of those cases where it may be better to just scrap the original code and rewrite most (if not all) of the code by myself. After all, it worked wonders for the particle drawing code.

    This means I’m going to rewrite it and use floating points instead, which should make it easier for me to get the dithering working properly.