diff options
Diffstat (limited to 'backends/platform/dc/label.cpp')
-rw-r--r-- | backends/platform/dc/label.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/backends/platform/dc/label.cpp b/backends/platform/dc/label.cpp index cba5553dd3..44e4701a43 100644 --- a/backends/platform/dc/label.cpp +++ b/backends/platform/dc/label.cpp @@ -47,13 +47,13 @@ static void draw_char(unsigned short *dst, int mod, int c, void *font_base) { unsigned char *src; int i, j; - if(c<=32 || c>255 || (c>=127 && c<160)) c=160; - if(c<128) c -= 32; else c -= 64; + if (c<=32 || c>255 || (c>=127 && c<160)) c=160; + if (c<128) c -= 32; else c -= 64; src = c*36 + (unsigned char *)font_base; - for(i=0; i<12; i++) { + for (i=0; i<12; i++) { int n = (src[0]<<16)|(src[1]<<8)|src[2]; - for(j=0; j<12; j++, n<<=1) - if(n & (1<<23)) { + for (j=0; j<12; j++, n<<=1) + if (n & (1<<23)) { dst[j] = 0xffff; dst[j+1] = 0xffff; dst[j+2] = 0xa108; @@ -61,8 +61,8 @@ static void draw_char(unsigned short *dst, int mod, int c, void *font_base) dst[j+mod+1] = 0xa108; } dst += mod; - for(j=0; j<12; j++, n<<=1) - if(n & (1<<23)) { + for (j=0; j<12; j++, n<<=1) + if (n & (1<<23)) { dst[j] = 0xffff; dst[j+1] = 0xffff; dst[j+2] = 0xa108; @@ -78,15 +78,15 @@ void Label::create_texture(const char *text) { void *font = get_romfont_address(); int l = strlen(text); - if(l>64) l=64; + if (l>64) l=64; int w = 14*l; - for(tex_u=TA_POLYMODE2_U_SIZE_8, u=8; u<w; u<<=1, tex_u += 1<<3); + for (tex_u=TA_POLYMODE2_U_SIZE_8, u=8; u<w; u<<=1, tex_u += 1<<3); int tsz = u*32; unsigned short *tex = (unsigned short *)ta_txalloc(tsz*2); - for(int i=0; i<tsz; i++) + for (int i=0; i<tsz; i++) tex[i] = 0; int p=l*14; - while(l>0) + while (l>0) draw_char(tex+(p-=14), u, text[--l], font); texture = tex; } |