requires two bytes on input (second CAN be 0), returns unicode mapping, assigns used bytes (1/2) This function takes a u8 by design - we do NOT want sign extension of the characters!!
| 806 | // requires two bytes on input (second CAN be 0), returns unicode mapping, assigns used bytes (1/2) |
| 807 | // This function takes a u8 by design - we do NOT want sign extension of the characters!! |
| 808 | wchar_t ShiftJIS_ConvertChar(const u8* input, int& used) |
| 809 | { |
| 810 | const uint FirstByte = input[0]; |
| 811 | |
| 812 | if(NumBytes[FirstByte] == 1) |
| 813 | { |
| 814 | used = 1; |
| 815 | return OneByte[FirstByte]; |
| 816 | } |
| 817 | else |
| 818 | { |
| 819 | //if( !pxAssert( NumBytes[FirstByte] != 0 ) ) |
| 820 | if( NumBytes[FirstByte] == 0 ) |
| 821 | { |
| 822 | // FIXME : Hackfixed a null pointer in FFX (during opening scenes). It tries to |
| 823 | // print an 0xfc/0x0a combo, followed by a NULL. Other IOP prints seem to have valid |
| 824 | // Shift-JIS encodings. not sure what's going on yet, so this needs reviewed sometime |
| 825 | // --air |
| 826 | used = 1; return (u16)FirstByte; |
| 827 | } |
| 828 | |
| 829 | used = 2; |
| 830 | return TwoBytes[FirstByte][input[1]]; |
| 831 | } |
| 832 | } |
| 833 | |
| 834 | std::string ShiftJIS_ConvertString( const char* src ) |
| 835 | { |
no outgoing calls
no test coverage detected