1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     gfx_Skeleton.cpp
4 
5   Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc.  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   $Revision: 24950 $
14  *---------------------------------------------------------------------------*/
15 
16 #include "precompiled.h"
17 
18 #include <nw/gfx/gfx_Skeleton.h>
19 
20 #include <nw/ut/ut_ResUtil.h>
21 #include <nw/ut/ut_ResDictionary.h>
22 
23 namespace nw
24 {
25 namespace gfx
26 {
27 
28 NW_UT_RUNTIME_TYPEINFO_DEFINITION(Skeleton, SceneObject);
29 
30 //----------------------------------------
31 void
CreateCallbacks(os::IAllocator * allocator,int maxCallbacks,bool isFixedSizeMemory)32 Skeleton::CreateCallbacks(os::IAllocator* allocator, int maxCallbacks, bool isFixedSizeMemory)
33 {
34     if (isFixedSizeMemory)
35     {
36         if (maxCallbacks == 0)
37         {
38             this->m_PreCalculateMatrixSignal =
39                 CalculateMatrixSignal::CreateInvalidateSignal(allocator);
40             this->m_PostCalculateMatrixSignal =
41                 CalculateMatrixSignal::CreateInvalidateSignal(allocator);
42         }
43         else
44         {
45             this->m_PreCalculateMatrixSignal =
46                 CalculateMatrixSignal::CreateFixedSizedSignal(maxCallbacks, allocator);
47             this->m_PostCalculateMatrixSignal =
48                 CalculateMatrixSignal::CreateFixedSizedSignal(maxCallbacks, allocator);
49         }
50     }
51     else
52     {
53         this->m_PreCalculateMatrixSignal =
54             CalculateMatrixSignal::CreateVariableSizeSignal(allocator);
55         this->m_PostCalculateMatrixSignal =
56             CalculateMatrixSignal::CreateVariableSizeSignal(allocator);
57     }
58 }
59 
60 } // namespace gfx
61 } // namespace nw
62