Krom2Tim2

Converts a SHIFT-JIS character string to 4-bit CLUT TIM data

int Krom2Tim2 (
        u_char *sjis,
        u_long *taddr,
        int dx,
        int dy,
        int cdx,
        int cdy,
        u_int fg ,
        u_int bg
)

Arguments

sjis SHIFT-JIS Character String
taddr Pointer to TIM data result storage area
dx, dy x,y coordinates of pixel data in VRAM
cx, cy x,y coordinates of CLUT data in VRAM
fg , bg Foreground and background colours

Return Value

0 is returned when conversion is successful.
-1 is returned when the code specified by sjis is invalid.

Explanation

The SHIFT-JIS character string specified by sjis is converted to 4-bit CLUT TIM data.
The result is placed in the buffer pointed to by taddr. Krom2Tim2() is the user-defined character version of Krom2Tim().

Notes

The Kanji code must be SHIFT-JIS encoded.
Full-width and half-width characters can be mixed in the character string, but they are all changed to full-width at the time the characters are displayed.
Half-width kana are not supported.
For the area specified by taddr, the size shown in the following formula must be allocated in advance, where num is the length of the string specified by sjis.

If (num<16)
 (32 * num + 16) * 4 (bytes)
else
 (32 * 16* ((num-1/16 + 1) +16) * 4 (bytes)