DEADSOFTWARE

engine: use lib cp866 where needed
[flatwaifu.git] / src / gl / render.c
index c057b90e4fa84bc6d0d1a7d3647089995c33c047..f7180f9b0b8cbace0399c9827b5c6e42c0070e8d 100644 (file)
@@ -22,6 +22,8 @@
 #include "view.h"
 #include "switch.h" // sw_secrets
 
+#include "cp866.h"
+
 #ifdef __APPLE__
 #  include <OpenGL/gl.h>
 #else
@@ -30,7 +32,6 @@
 #include <stdarg.h>
 #include <stdlib.h>
 #include <string.h>
-#include <ctype.h>
 #include <assert.h>
 
 #define VGA_TRANSPARENT_COLOR 0
@@ -629,11 +630,9 @@ static image Z_getspr (const char n[4], int s, int d, char *dir) {
 
 static image *Z_get_char_image (image *img, int ch) {
   image *p = NULL;
+  ch = cp866_toupper(ch);
   if (ch > 32 && ch < 160) {
     p = &img[ch - '!'];
-    if (p->n == NULL) {
-      p = &img[toupper(ch) - '!'];
-    }
   }
   return p;
 }