1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     gr_Scissor.cpp
4 
5   Copyright (C)2010 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: 26824 $
14  *---------------------------------------------------------------------------*/
15 
16 #include <nn/gr/CTR/gr_Scissor.h>
17 
18 namespace nn
19 {
20     namespace gr
21     {
22         namespace CTR
23         {
24 
MakeCommand(bit32 * command)25             bit32* Scissor::MakeCommand( bit32* command )
26             {
27                 s32 temp_width  = x + width  - 1;
28                 s32 temp_height = y + height - 1;
29 
30                 *command++ = PICA_CMD_DATA_SCISSOR( isEnable );
31                 *command++ = PICA_CMD_HEADER_BURSTSEQ( PICA_REG_SCISSOR, 3 );
32                 *command++ = PICA_CMD_DATA_SCISSOR_XY( x, y, bufferWidth, bufferHeight );
33                 *command++ = PICA_CMD_DATA_SCISSOR_SIZE( temp_width, temp_height );
34 
35                 return command;
36             }
37 
38         } // namespace CTR
39     } // namespace gr
40 } // namespace nn
41