Krom2Tim

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

int Krom2Tim (
        u_char *sjis,
        u_long *taddr,
        int dx,
        int dy,
        int cx,
        int cy,
        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.

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:

128 x (length of character string specified by sjis) + 84(bytes)