Add highlighting, fixed len instructions and more
This commit is contained in:
@@ -12,8 +12,12 @@ prepText(SDL_Renderer *renderer, unsigned char pxSize, const char *file, uint8_t
|
||||
out.color = (SDL_Color) {r, g, b, a};
|
||||
unsigned int i = 1;
|
||||
do {
|
||||
if (i == 173) { //specifically this char is 0 width (IDK why)
|
||||
out.surface[i] = SDL_CreateRGBSurface(0,pxSize,pxSize,32,0,0,0,0);
|
||||
} else {
|
||||
char tmpOut[2] = {i, 0};
|
||||
out.surface[i] = TTF_RenderText_Solid(gFont, tmpOut, out.color);
|
||||
}
|
||||
out.texture[i] = SDL_CreateTextureFromSurface(renderer, out.surface[i]);
|
||||
i++;
|
||||
} while (i < 256);
|
||||
|
Reference in New Issue
Block a user