1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     rtc.cpp
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  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   $Rev: 46365 $
14  *---------------------------------------------------------------------------*/
15 
16 #include <nn/fnd.h>
17 #include "rtc.h"
18 
DrawFrame(void)19 void RtcDemo::DrawFrame(void)
20 {
21     // String data for day of the week
22     const char WeekStr[][4] =
23     {
24         "SUN",
25         "MON",
26         "TUE",
27         "WED",
28         "THU",
29         "FRI",
30         "SAT"
31     };
32 
33     mp_RenderSystem->SetColor(1.0f, 1.0f, 1.0f, 1.0f);
34 
35     // Gets current time
36     nn::fnd::DateTime now = nn::fnd::DateTime::GetNow();
37 
38     // Title
39     mp_RenderSystem->DrawText(248, 0, "CTR demo1");
40     // Display current time
41     mp_RenderSystem->DrawText(208, 8, "%04d.%02d.%02d %s", now.GetYear(), now.GetMonth(), now.GetDay(), WeekStr[now.GetWeek()]);
42     mp_RenderSystem->DrawText(256, 16, "%02d:%02d:%02d", now.GetHour(), now.GetMinute(), now.GetSecond());
43 }
44 
45 /*---------------------------------------------------------------------------*
46   End of file
47  *---------------------------------------------------------------------------*/
48