1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: gr_Viewport.h 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: 47511 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_GR_CTR_GR_VIEWPORT_H_ 17 #define NN_GR_CTR_GR_VIEWPORT_H_ 18 19 #include <nn/gr/CTR/gr_Utility.h> 20 21 namespace nn 22 { 23 namespace gr 24 { 25 namespace CTR 26 { 27 28 /* Please see man pages for details 29 30 31 */ 32 class Viewport 33 { 34 public: 35 /* Please see man pages for details 36 37 */ Viewport(void)38 Viewport( void ) : 39 x( 0 ), 40 y( 0 ), 41 width( 240 ), 42 height( 320 ) 43 { 44 } 45 46 /* Please see man pages for details 47 48 49 50 51 52 53 */ Viewport(s32 x_,s32 y_,u32 width_,u32 height_)54 Viewport( s32 x_, s32 y_, u32 width_, u32 height_ ) : 55 x( x_ ), 56 y( y_ ), 57 width( width_ ), 58 height( height_ ) 59 { 60 } 61 62 public: 63 /* Please see man pages for details 64 65 66 67 68 69 */ 70 bit32* MakeCommand( bit32* command ) const; 71 72 public: 73 /* Please see man pages for details 74 75 76 77 78 79 80 81 */ Set(s32 x_,s32 y_,u32 width_,u32 height_)82 void Set( s32 x_, s32 y_, u32 width_, u32 height_ ) 83 { 84 x = x_; y = y_; width = width_; height = height_; 85 } 86 87 public: 88 /* Please see man pages for details 89 90 */ 91 s32 x; 92 93 /* Please see man pages for details 94 95 */ 96 s32 y; 97 98 /* Please see man pages for details 99 100 */ 101 u32 width; 102 103 /* Please see man pages for details 104 105 */ 106 u32 height; 107 }; 108 109 } // namespace CTR 110 } // namespace gr 111 } // namespace nn 112 113 #endif // NN_GR_CTR_GR_VIEWPORT_H_ 114