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