u32 pixels = 0, total = 256*256, data = 0;
u8 image[256*256];
- while( pixels < total )
- {
- for( int b = 31; b >= 0; b-- )
- {
- image[ pixels ++ ] = (compressed[data] & (0x1 << b))? 0xff: 0x00;
+ while( pixels < total ){
+ for( int b = 31; b >= 0; b-- ){
+ image[ pixels ++ ] = (compressed[data] & (0x1u << b))? 0xffu: 0x00u;
- if( pixels >= total )
- {
+ if( pixels >= total ){
total = 0;
break;
}
text_cursor[2] = 8*scale;
text_cursor[3] = 14*scale;
- while( (c = *(_c ++)) )
- {
- if( c == '\n' )
- {
+ while( (c = *(_c ++)) ){
+ if( c == '\n' ){
text_cursor[1] += 14*scale;
text_cursor[0] = pos[0] + ui_text_line_offset( _c, scale, align );
continue;
}
- else if( c >= 33 )
- {
+ else if( c >= 33 ){
u8 glyph_base[2];
u8 glyph_index = c;
glyph_base[0] = glyph_index & 0xf;
glyph_base[1]+8
});
}
- else if( c == '\x1B' )
- {
+ else if( c == '\x1B' ){
_c ++;
u16 colour_id = 0;
- for( int i = 0; i < 3; i ++ )
- {
- if( _c[i] )
- {
- if( _c[i] == 'm' )
- {
+ for( int i = 0; i < 3; i ++ ){
+ if( _c[i] ){
+ if( _c[i] == 'm' ){
_c = _c + i + 1;
- switch( colour_id )
- {
+ switch( colour_id ){
case '0': current_colour = 0x00ffffff; break;
case '3'|'1'<<8: current_colour = 0x00201fee; break;
case '3'|'2'<<8: current_colour = 0x0037e420; break;
colour_id |= _c[i] << (i*8);
}
- else
- {
+ else{
_c = _c +i;
break;
}
continue;
}
- else if( c == '\t' )
- {
+ else if( c == '\t' ){
text_cursor[0] += UI_GLYPH_SPACING_X*scale*4;
continue;
}