00001 /*-----------------------------------------------------------------------* 00002 Project:Nintendo Augmented Reality Library. 00003 File:narPort.h 00004 00005 Copyright (C)2011-2012 Nintendo Co., Ltd. All rights reserved. 00006 00007 These coded instructions, statements, and computer programs contain 00008 proprietary information of Nintendo and/or its licensed developers 00009 and are protected by national and international copyright laws. They 00010 may not be disclosed to third parties or copied or duplicated in any 00011 form, in whole or in part, without the prior written consent of 00012 Nintendo. 00013 The content herein is highly confidential and should be handled 00014 accordingly. 00015 *-----------------------------------------------------------------------*/ 00016 00018 00023 #ifndef NAR_PORT_H__ 00024 #define NAR_PORT_H__ 00025 00026 #include "narConfig.h" 00027 00028 // 00029 // CTR 00030 // 00031 #ifdef NAR_CTR__ 00032 #include <nn/types.h> 00033 #endif 00034 00035 namespace mw { namespace nar 00036 { 00037 //===================================================================== 00041 void ClearFast( void * p_Dest, u32 size ); 00042 //===================================================================== 00046 void Clear( void * p_Dest, u32 size ); 00047 //===================================================================== 00051 #ifdef NAR_CTR__ 00052 #if NAR_DEBUG__ 00053 # define NAR_PRINTF( ... ) (void)nn::dbg::detail::Printf( __VA_ARGS__) 00054 #else 00055 # define NAR_PRINTF( ... ) 00056 #endif 00057 #endif 00058 //===================================================================== 00062 #ifdef NAR_CTR__ 00063 #if NAR_DEBUG__ 00064 # define NAR_TPRINTF( ... ) (void)nn::dbg::detail::TPrintf( __VA_ARGS__) 00065 #else 00066 # define NAR_TPRINTF( ... ) 00067 #endif 00068 #endif 00069 //===================================================================== 00073 #ifdef NAR_CTR__ 00074 # define NAR_NULL_TASSERT( exp ) NN_NULL_TASSERT_( exp ) 00075 # define NAR_TASSERT( exp ) NN_TASSERT( exp ) 00076 # define NAR_MIN_TASSERT( exp, min ) NN_MIN_TASSERT_( exp, min ) 00077 # define NAR_ASSERT_MSG( exp, ... ) NN_ASSERTMSG( exp, __VA_ARGS__) 00078 #endif // NAR_CTR__ 00079 00080 } 00081 } 00082 00083 #ifdef NAR_TWL__ 00084 # define NAR_RGB5A1_R_SHIFT (0) 00085 # define NAR_RGB5A1_G_SHIFT (5) 00086 # define NAR_RGB5A1_B_SHIFT (10) 00087 # define NAR_RGB5A1_A_SHIFT (15) 00088 #endif 00089 00090 #ifdef NAR_CTR__ 00091 # define NAR_RGB5A1_R_SHIFT (11) 00092 # define NAR_RGB5A1_G_SHIFT (6) 00093 # define NAR_RGB5A1_B_SHIFT (1) 00094 # define NAR_RGB5A1_A_SHIFT (0) 00095 #endif 00096 00097 #define NAR_RGB5A1( r, g, b, a ) ((u16)((((r)&0x1f) << NAR_RGB5A1_R_SHIFT) | \ 00098 (((g)&0x1f) << NAR_RGB5A1_G_SHIFT) | \ 00099 (((b)&0x1f) << NAR_RGB5A1_B_SHIFT) | \ 00100 (((a)&0x1) << NAR_RGB5A1_A_SHIFT))) 00101 00102 #define NAR_DEC_TO_FX32( x ) FX_F32_TO_FX32( x ) 00103 00104 #endif 00105
© 2011-2012 Nintendo. All rights reserved.
CONFIDENTIAL