Name Last Update
..
CVS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
README_jp Loading commit data...
draw.c Loading commit data...
external.h Loading commit data...
frmbuffer.c Loading commit data...
headers.h Loading commit data...
kbuffer.c Loading commit data...
main.c Loading commit data...
msg Loading commit data...
msg.sjs Loading commit data...
project.h Loading commit data...
spec Loading commit data...
static.c Loading commit data...
struct.h Loading commit data...
vars.h Loading commit data...
zbuffer.c Loading commit data...
int LeoGetKAdr(int sjis);

You can get the offset address where the kanji charactor is stored by 
calling LeoGetKAdr(). The argument is expected to be a Shift-JIS code.

Example:
	i=LeoGetKAdr(sjiscode);

        dmaIOMessageBuf.hdr.pri         = OS_MESG_PRI_NORMAL;
        dmaIOMessageBuf.hdr.retQueue    = &dmaMessageQ;
        dmaIOMessageBuf.dramAddr        = &kbuffer[kanadr];
        dmaIOMessageBuf.devAddr         = DDROM_FONT_START + i;
        dmaIOMessageBuf.size            = 128;
        
        handler->transferInfo.cmdType   = OS_OTHERS;
        osEPiStartDma(handler, &dmaIOMessageBuf, OS_READ);

	gDPLoadTextureBlock_4b(glistp++,&kbuffer[kanadr],G_IM_FMT_I,16,16,0,G_TX_CLAMP,G_TX_CLAMP,G_TX_NOMASK,G_TX_NOMASK,G_TX_NOLOD,G_TX_NOLOD);
	gSPTextureRectangle(glistp++,x<<2,y<<2,(x+16)<<2,(y+16)<<2,0,0,0,0x400,0x400);



int LeoGetAAdr(int code,int *dx,int *dy, int *cy);

You can get the offset address where the alphabet is stored by calling
LeoGetAAdr(). code should be one of the codes between 0x480-0x6BF or
0x780-0x797. The width of the charactor will be stored in dx, the 
height of the charactor will be stored in dy, the center y of the
charactor will be stored in cy. The return value of this function is
the offset address from the start address of font data (DDROM_FONT_
START). It's prohibited to specify code other than the values above.
If the return value is -1, it means that the charactor is not readable.

Example:
	ofs=LeoGetAAdr(code,&dx,&dy,&cy);

	dmaIOMessageBuf.hdr.pri         = OS_MESG_PRI_NORMAL;
	dmaIOMessageBuf.hdr.retQueue    = &dmaMessageQ;
	dmaIOMessageBuf.dramAddr        = &kbuffer[kanadr];
	dmaIOMessageBuf.devAddr         = DDROM_FONT_START + ofs;
	dmaIOMessageBuf.size            = 128;

	handler->transferInfo.cmdType   = OS_OTHERS;
	osEPiStartDma(handler, &dmaIOMessageBuf, OS_READ);

	gDPLoadTextureTile_4b(glistp++,&kbuffer[kanadr+ofs],G_IM_FMT_I,dx,dy,0,0,(dx-1)<<G_TEXTURE_IMAGE_FRAC,(dy-1)<<G_TEXTURE_IMAGE_FRAC,0,G_TX_CLAMP,G_TX_CLAMP,G_TX_NOMASK,G_TX_NOMASK,G_TX_NOLOD,G_TX_NOLOD);
	gSPTextureRectangle(glistp++,x<<2,(y-cy)<<2,(x+dx)<<2,(y-cy+dy)<<2,0,0,0,0x400,0x400);



For more information, see draw.c. Triggering Z changes the color of the 
charactors.