MCPcopy Create free account
hub / github.com/doldecomp/mkdd / convertSjis

Method convertSjis

libs/JSystem/JUtility/JUTResFont.cpp:518–532  ·  view source on GitHub ↗

probably needs some work to match TP(debug)

Source from the content-addressed store, hash-verified

516
517// probably needs some work to match TP(debug)
518int JUTResFont::convertSjis(int inChr, u16 *inLead) const
519{
520 u8 hi = JSUHiByte(inChr);
521 u16 lead = JSULoByte(inChr);
522 int out = lead - 0x40;
523 if (0x40 <= out)
524 {
525 out--;
526 }
527 lead = 0x31c;
528 if(inLead) {
529 lead = *inLead;
530 }
531 return out + (hi - 0x88) * 0xbc + -0x5e + lead;
532}

Callers

nothing calls this directly

Calls 2

JSUHiByteFunction · 0.85
JSULoByteFunction · 0.85

Tested by

no test coverage detected