Skip to content

Commit

Permalink
replace all with \xff
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps committed Jul 11, 2024
1 parent 249b6e2 commit dab8dd4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions src/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ static const u8 sjis_lookup_81[256] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x10
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x20
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x30
' ', ',', '.', ',', '.', 0xFF, ':', ';', '?', '!', 0xFF, 0xFF, '', '`', 0xFF, '^', // 0x40
' ', ',', '.', ',', '.', 0xFF, ':', ';', '?', '!', 0xFF, 0xFF, '\xff', '`', 0xFF, '^', // 0x40
0xFF, '_', 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, '0', 0xFF, '-', '-', 0xFF, 0xFF, // 0x50
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, '\'', '\'', '"', '"', '(', ')', 0xFF, 0xFF, '[', ']', '{', // 0x60
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, '+', '-', 0xFF, '*', 0xFF, // 0x70
'/', '=', 0xFF, '<', '>', 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, '', 0xFF, 0xFF, '', 0xFF, // 0x80
'/', '=', 0xFF, '<', '>', 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, '\xff', 0xFF, 0xFF, '\xff', 0xFF, // 0x80
'$', 0xFF, 0xFF, '%', '#', '&', '*', '@', 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x90
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0xA0
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0xB0
Expand Down Expand Up @@ -1034,15 +1034,15 @@ int printXY(const char *s, int x, int y, u64 colour, int draw, int space)
break;
continue;
} //End if for normal character
// Here we got a sequence starting with 0xFF ('')
// Here we got a sequence starting with 0xFF ('\xff')
if ((c2 = (unsigned char)s[i++]) == 0)
break;
if ((c2 < '0') || (c2 > '='))
continue;
c1 = (c2 - '0') * 2 + 0x100;
if (draw) {
//expand sequence �0=Circle �1=Cross �2=Square �3=Triangle �4=FilledBox
//":"=Pad_Right ";"=Pad_Down "<"=Pad_Left "="=Pad_Up
//"\xff:"=Pad_Right "\xff;"=Pad_Down "\xff<"=Pad_Left "\xff="=Pad_Up
drawChar(c1, x, y, colour);
x += 8;
if (x > SCREEN_WIDTH - SCREEN_MARGIN - FONT_WIDTH)
Expand Down Expand Up @@ -1082,7 +1082,7 @@ int printXY_sjis(const unsigned char *s, int x, int y, u64 colour, int draw)
}
x += 16;
break;
// Cross == "~"
// Cross == "\xff~"
case 0x817E:
if (draw) {
drawChar(0x102, x, y, colour);
Expand Down
18 changes: 9 additions & 9 deletions src/jpgviewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ static void Command_List(void)
printXY(LNG(Right_Joystick_Vertical_Zoom), x, y, setting->color[COLOR_TEXT], TRUE, 0);
y += FONT_HEIGHT;
if (swapKeys)
sprintf(tmp, "ÿ1: %s", LNG(FullScreen_Mode));
sprintf(tmp, "\xff1: %s", LNG(FullScreen_Mode));
else
sprintf(tmp, "ÿ0: %s", LNG(FullScreen_Mode));
sprintf(tmp, "\xff0: %s", LNG(FullScreen_Mode));
printXY(tmp, x, y, setting->color[COLOR_TEXT], TRUE, 0);
y += FONT_HEIGHT;
sprintf(tmp, "ÿ3: %s", LNG(Exit_To_Jpg_Browser));
sprintf(tmp, "\xff3: %s", LNG(Exit_To_Jpg_Browser));
printXY(tmp, x, y, setting->color[COLOR_TEXT], TRUE, 0);
y += FONT_HEIGHT;

Expand Down Expand Up @@ -173,13 +173,13 @@ static void View_Render(void)
// Draw color8 graph4
gsKit_prim_sprite(gsGlobal, ScreenPosX, ScreenPosY, ScreenPosX1, ScreenPosY1, 0, setting->color[COLOR_GRAPH4]);
// Draw picture
if (PicRotate == 0 || PicRotate == 1 || PicRotate == 3) { // No rotation, rotate +90°, -90°
if (PicRotate == 0 || PicRotate == 1 || PicRotate == 3) { // No rotation, rotate +90, -90
gsKit_prim_sprite_texture(gsGlobal,
&TexPicture,
ScreenPosX + ScreenOffsetX, ScreenPosY + ScreenOffsetY, PanPosX, PanPosY,
ScreenPosX1 - ScreenOffsetX, ScreenPosY1 - ScreenOffsetY, PanPosX1, PanPosY1,
0, GS_SETREG_RGBAQ(Brightness * 1.28f, Brightness * 1.28f, Brightness * 1.28f, 0x80, 0x00));
} else if (PicRotate == 2) { // Rotate 180°
} else if (PicRotate == 2) { // Rotate 180
gsKit_prim_sprite_texture(gsGlobal,
&TexPicture,
ScreenPosX + ScreenOffsetX, ScreenPosY + ScreenOffsetY, PanPosX1, PanPosY1,
Expand Down Expand Up @@ -812,13 +812,13 @@ void JpgViewer(char *file)
//Tooltip section
msg1[0] = '\0';
if (swapKeys)
sprintf(msg1, "ÿ1:%s", LNG(View));
sprintf(msg1, "\xff1:%s", LNG(View));
else
sprintf(msg1, "ÿ0:%s", LNG(View));
sprintf(msg1, "\xff0:%s", LNG(View));
if (jpg_browser_mode == LIST)
sprintf(tmp, " ÿ3:%s ÿ2:%s", LNG(Up), LNG(Thumb));
sprintf(tmp, " \xff3:%s \xff2:%s", LNG(Up), LNG(Thumb));
else
sprintf(tmp, " ÿ3:%s ÿ2:%s", LNG(Up), LNG(List));
sprintf(tmp, " \xff3:%s \xff2:%s", LNG(Up), LNG(List));
strcat(msg1, tmp);
sprintf(tmp, " Sel:%s Start:%s L1/R1:%dsec L2:",
LNG(Exit), LNG(SlideShow), SlideShowTime);
Expand Down

0 comments on commit dab8dd4

Please sign in to comment.