N64® Functions Menu

al - Audio Library Functions
etc - String Manipulation Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

## LeoGetKAdr
LeoGetAAdr
LeoGetAAdr2

Syntax

    #include <leo.h>

    int LeoGetKAdr (int sjis);
    int LeoGetAAdr (int code,
       int *dx, int *dy, int *cy);
    int LeoGetAAdr2 (int ccode,
       int *dx, int *dy, int *cy);

Explanation
A variety of different kanji and ASCII character fonts are held in the mask ROM (DDROM) in the N64 Disk Drive. The application programmer can use these three functions to get the storage address of the desired character.
LeoGetKAdr gets the storage offset address for a kanji character specified by the shift-JIS code in the sjis argument.
LeoGetAAdr gets the storage offset address for the ASCII character specified by the character code in the code argument. The dx argument specifies the character width, dy the height, and cy the alignment. For details about characters and character codes, please see Appendix B, "Drive Internal Font Data" in the N64 Disk Drive Programmer's Guide.
LeoGetAAdr2 gets the storage offset address for an ASCII character for the character information data specified by the ccode argument. The dx argument specified the character width, dy the height, and cy the alignment. The character information data is obtained from the asccode tool, which collects the character information data about an ASCII character. This character information data comprises the DDROM storage address and the character width, height, and alignment -- all compressed into 32 bits of data for use by the LeoGetAAdr2 function. LeoGetAAdr links to all the tables relating to characters so that it can look up the offset address for the specified character by using the specified character code.
LeoGetAAdr2 can be the faster way to go if your use of characters is limited in a game. Using LeoGetAAdr2 can make the size smaller. However, it is better to use LeoGetAAdr if your game uses all of the characters as is the case, for example, when the game user is presented with a menu of characters to input their name.
The term "offset" refers to the offset from the font portion of the DDROM. You must add DDROM_FONT_START to it in order to make the number refer to the offset from the start (top) of the DDROM. After adding DDROM_FONT_START, pass the resulting number to the osEPiStartDma function.
To learn more about the meaning of the dx, dy, and cy arguments, see the "Internal ROM Access" section of the N64 Disk Drive Programmer's Guide.
See Also
Leo
LeoCreateLeoManager
asccode

Nintendo® Confidential Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated April, 1999