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.
Name |
Last commit
|
History
|
Last Update |
---|---|---|
.. | ||
CVS | ||
Makefile | ||
README | ||
README_jp | ||
draw.c | ||
external.h | ||
frmbuffer.c | ||
headers.h | ||
kbuffer.c | ||
main.c | ||
msg | ||
msg.sjs | ||
project.h | ||
spec | ||
static.c | ||
struct.h | ||
vars.h | ||
zbuffer.c |