1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: LytCtrl.h 4 5 Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain proprietary 8 information of Nintendo and/or its licensed developers and are protected by 9 national and international copyright laws. They may not be disclosed to third 10 parties or copied or duplicated in any form, in whole or in part, without the 11 prior written consent of Nintendo. 12 13 The content herein is highly confidential and should be handled accordingly. 14 15 $Revision: $ 16 *---------------------------------------------------------------------------*/ 17 #ifndef LYT_CTRL_H_ 18 #define LYT_CTRL_H_ 19 20 #include <nw/lyt.h> 21 #include "../include/SmBase.h" 22 #include "../include/SmFile.h" 23 #include "../include/SmLayout.h" 24 25 26 27 //------------------------------------------------------------------------------ 28 //! ���C�A�E�g�̃t�@�C���\�����L�q����ׂ̍\���̂ł��B 29 typedef nw::ut::FixedSizeArray<std::string, 8> StringArray; 30 struct LytResourceFile 31 { 32 std::string clyt; // ���C�A�E�g�t�@�C�� 33 StringArray clan; // �A�j���[�V�����t�@�C��(8�܂�) 34 }; 35 36 typedef nw::ut::FixedSizeArray<std::string, 1> StringArray2; 37 38 struct testtest 39 { 40 std::string clyt; 41 StringArray clan; 42 }; 43 44 //------------------------------------------------------------------------------ 45 //! ���C�A�E�g�Ɋւ���N���X�����E�j������N���X�ł��B 46 class LytCtrl : public SmBase 47 { 48 public: 49 struct LytResourceSet 50 { 51 nw::lyt::ArcResourceAccessor* resAccessor; 52 SmFile lytFile; 53 }; 54 #define LYT_RESOURCES_COUNT (32) 55 typedef nw::ut::FixedSizeArray<LytResourceSet, LYT_RESOURCES_COUNT> LytResourceArray; 56 typedef nw::ut::FixedSizeArray<SmLayoutResource*, LYT_RESOURCES_COUNT> SmLytResourceArray; 57 typedef nw::ut::FixedSizeArray<SmLayout*, LYT_RESOURCES_COUNT> SmLytInstanceArray; 58 59 public: 60 LytCtrl(); 61 ~LytCtrl(); 62 63 //! ���C�A�E�g���\�[�X���Z�b�g�A�b�v���܂��B 64 SmLayoutResource* CreateSmLayoutResource( const wchar_t* archivePath, LytResourceFile& lytResFile ); 65 66 //! ���C�A�E�g���\�[�X�N���X�̃C���X�^���X�������ɁASmLayout�N���X�̃C���X�^���X�����܂��B 67 SmLayout* CreateSmLayout( SmLayoutResource* layoutResource ); 68 69 //! �ێ�����SmLayout�N���X�̕`����s���܂��B 70 void Render(); 71 72 private: 73 // m_DrawInfo�̏��������s���܂��B 74 void setupCamera( nw::ut::Rect rect ); 75 76 private: 77 nw::lyt::Drawer m_Drawer; 78 nw::lyt::GraphicsResource m_GraphicsResource; 79 nw::lyt::DrawInfo m_DrawInfo; 80 81 LytResourceArray m_ResourcesArray; 82 SmLytResourceArray m_SmLytResourceArray; 83 SmLytInstanceArray m_SmLytInstanceArray; 84 }; 85 86 87 #endif // LYT_CTRL_H_ 88