1 /*---------------------------------------------------------------------------*
2 Project: TwlSDK - NA - include
3 File: shared_font.h
4
5 Copyright 2007-2008 Nintendo. All rights reserved.
6
7 These coded instructions, statements, and computer programs contain
8 proprietary information of Nintendo of America Inc. and/or Nintendo
9 Company Ltd., and are protected by Federal copyright law. They may
10 not be disclosed to third parties or copied or duplicated in any form,
11 in whole or in part, without the prior written consent of Nintendo.
12
13 $Date:: 2008-09-17#$
14 $Rev: 8556 $
15 $Author: okubata_ryoma $
16 *---------------------------------------------------------------------------*/
17 #ifndef TWL_NA_ARM9_SHARED_FONT_H_
18 #define TWL_NA_ARM9_SHARED_FONT_H_
19
20 #include <twl/misc.h>
21 #include <twl/types.h>
22 #include <nitro/os/common/emulator.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /*===========================================================================*/
29
30
31 typedef enum NASharedFontIndex
32 {
33 NA_SHARED_FONT_WW_L = 0,
34 NA_SHARED_FONT_WW_M = 1,
35 NA_SHARED_FONT_WW_S = 2,
36 NA_SHARED_FONT_MAX = 3
37 }
38 NASharedFontIndex;
39
40
41 BOOL NAi_InitSharedFont(void);
42 int NAi_GetSharedFontTableSize(void);
43 BOOL NAi_LoadSharedFontTable(void* pBuffer);
44 int NAi_GetSharedFontSize(NASharedFontIndex index);
45 BOOL NAi_LoadSharedFont(NASharedFontIndex index, void* pBuffer);
46
NA_InitSharedFont(void)47 static inline BOOL NA_InitSharedFont(void)
48 { return OS_IsRunOnTwl() ? NAi_InitSharedFont(): FALSE; }
NA_GetSharedFontTableSize(void)49 static inline int NA_GetSharedFontTableSize(void)
50 { return OS_IsRunOnTwl() ? NAi_GetSharedFontTableSize(): -1; }
NA_LoadSharedFontTable(void * pBuffer)51 static inline BOOL NA_LoadSharedFontTable(void* pBuffer)
52 { return OS_IsRunOnTwl() ? NAi_LoadSharedFontTable(pBuffer): FALSE; }
NA_GetSharedFontSize(NASharedFontIndex index)53 static inline int NA_GetSharedFontSize(NASharedFontIndex index)
54 { return OS_IsRunOnTwl() ? NAi_GetSharedFontSize(index): -1; }
NA_LoadSharedFont(NASharedFontIndex index,void * pBuffer)55 static inline BOOL NA_LoadSharedFont(NASharedFontIndex index, void* pBuffer)
56 { return OS_IsRunOnTwl() ? NAi_LoadSharedFont(index, pBuffer): FALSE; }
57
58 // The following functions are for internal use only
59 const u8* NAi_GetSharedFontName(NASharedFontIndex index);
60 u32 NAi_GetSharedFontTimestamp(void);
61
62
63 /*===========================================================================*/
64
65 #ifdef __cplusplus
66 } /* extern "C" */
67 #endif
68
69 #endif /* TWL_NA_ARM9_SHARED_FONT_H_ */
70
71 /*---------------------------------------------------------------------------*
72 End of file
73 *---------------------------------------------------------------------------*/
74