Permalink
Browse files

Fix Arrow Button texture

  • Loading branch information...
EXL committed May 13, 2017
1 parent a057628 commit 4015e263673baf1a595db50bc599f0a2b7995d6e
Showing with 15 additions and 8 deletions.
  1. +4 −4 gish/src/main/cpp/Gish/menu/menu.c
  2. +4 −4 gish/src/main/cpp/Gish/video/text.c
  3. +7 −0 gish/src/test/0x80.c
@@ -543,10 +543,10 @@ void setupmenuitems(void)
strcpy(keyboardlabel[SCAN_9],"9");
strcpy(keyboardlabel[SCAN_0],"0");
#ifndef GERMAN
strcpy(keyboardlabel[SCAN_LEFT],"€");
strcpy(keyboardlabel[SCAN_RIGHT],"?");
strcpy(keyboardlabel[SCAN_UP],"ƒ");
strcpy(keyboardlabel[SCAN_DOWN],"‚");
strcpy(keyboardlabel[SCAN_LEFT],"\x80");
strcpy(keyboardlabel[SCAN_RIGHT],"\x81");
strcpy(keyboardlabel[SCAN_UP],"\x83");
strcpy(keyboardlabel[SCAN_DOWN],"\x82");
#else
strcpy(keyboardlabel[SCAN_LEFT],"{");
strcpy(keyboardlabel[SCAN_RIGHT],"|");
@@ -170,7 +170,7 @@ void drawtext(char *textstring,int x,int y,int textsize,float red,float green,fl
vec[1]=(float)y;
convertscreenvertex(vec,font.sizex,font.sizey);
texcoord[0]=(float)(textstring2[count]&15)*16.0f+0.5f;
texcoord[1]=(float)(textstring2[count]>>4)*16.0f+0.5f;
texcoord[1]=(float)((unsigned char) textstring2[count]>>4)*16.0f+0.5f;
texcoord[0]/=256.0f;
texcoord[1]/=256.0f;
#if defined(USE_GLES)
@@ -187,7 +187,7 @@ void drawtext(char *textstring,int x,int y,int textsize,float red,float green,fl
vec[1]=(float)y;
convertscreenvertex(vec,font.sizex,font.sizey);
texcoord[0]=(float)(textstring2[count]&15)*16.0f+16.0f-0.5f;
texcoord[1]=(float)(textstring2[count]>>4)*16.0f+0.5f;
texcoord[1]=(float)((unsigned char) textstring2[count]>>4)*16.0f+0.5f;
texcoord[0]/=256.0f;
texcoord[1]/=256.0f;
@@ -205,7 +205,7 @@ void drawtext(char *textstring,int x,int y,int textsize,float red,float green,fl
vec[1]=(float)y+(float)textsize;
convertscreenvertex(vec,font.sizex,font.sizey);
texcoord[0]=(float)(textstring2[count]&15)*16.0f+16.0f-0.5f;
texcoord[1]=(float)(textstring2[count]>>4)*16.0f+16.0f-0.5f;
texcoord[1]=(float)((unsigned char) textstring2[count]>>4)*16.0f+16.0f-0.5f;
texcoord[0]/=256.0f;
texcoord[1]/=256.0f;
@@ -223,7 +223,7 @@ void drawtext(char *textstring,int x,int y,int textsize,float red,float green,fl
vec[1]=(float)y+(float)textsize;
convertscreenvertex(vec,font.sizex,font.sizey);
texcoord[0]=(float)(textstring2[count]&15)*16.0f+0.5f;
texcoord[1]=(float)(textstring2[count]>>4)*16.0f+16.0f-0.5f;
texcoord[1]=(float)((unsigned char) textstring2[count]>>4)*16.0f+16.0f-0.5f;
texcoord[0]/=256.0f;
texcoord[1]/=256.0f;
#if defined(USE_GLES)
View
@@ -0,0 +1,7 @@
#include <stdio.h>
int main() {
printf("%f\n", ((char) 0x80 >> 4) * 16.0f + 0.5f);
printf("%f\n", ((unsigned char) 0x80 >> 4) * 16.0f + 0.5f);
return 0;
}

0 comments on commit 4015e26

Please sign in to comment.