/*---------------------------------------------------------------------------* Project: TwlIPL File: DS_Chat.c Copyright 2007 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Date:: $ $Rev$ $Author$ *---------------------------------------------------------------------------*/ #include #include #include "misc.h" #include "PictoChat.h" // define data------------------------------------------ #define RETURN_BUTTON_TOP_X 2 #define RETURN_BUTTON_TOP_Y 21 #define RETURN_BUTTON_BOTTOM_X ( RETURN_BUTTON_TOP_X + 8 ) #define RETURN_BUTTON_BOTTOM_Y ( RETURN_BUTTON_TOP_Y + 2 ) // extern data------------------------------------------ // function's prototype declaration--------------------- // global variable ------------------------------------- RTCDrawProperty g_rtcDraw = { TRUE, RTC_DATE_TOP_X, RTC_DATE_TOP_Y, RTC_TIME_TOP_X, RTC_TIME_TOP_Y }; // static variable ------------------------------------- // const data ----------------------------------------- //====================================================== // ピクトチャット //====================================================== // ピクトチャットの初期化 void PictoChatInit( void ) { GX_DispOff(); GXS_DispOff(); NNS_G2dCharCanvasClear( &gCanvas, TXT_COLOR_WHITE ); PutStringUTF16( 1 * 8, 0 * 8, TXT_COLOR_BLUE, (const u16 *)L"PictoChat"); PutStringUTF16( 4 * 8, 8 * 8, TXT_COLOR_BLACK, (const u16 *)L"Under Construction..."); GetAndDrawRTCData( &g_rtcDraw, TRUE ); GXS_SetVisiblePlane( GX_PLANEMASK_BG0 ); GX_DispOn(); GXS_DispOn(); } // ピクトチャットのメインループ void PictoChatMain(void) { BOOL tp_cancel = FALSE; ReadTP(); // タッチパネル入力の取得 // [RETURN]ボタン押下チェック if(tpd.disp.touch) { tp_cancel = WithinRangeTP( RETURN_BUTTON_TOP_X * 8, RETURN_BUTTON_TOP_Y * 8 - 4, RETURN_BUTTON_BOTTOM_X * 8, RETURN_BUTTON_BOTTOM_Y * 8 - 4, &tpd.disp ); } if( ( pad.trg & PAD_BUTTON_B ) || tp_cancel ) { // SYSM_RebootLauncher(); } GetAndDrawRTCData( &g_rtcDraw, FALSE ); }