1 #ifndef __PACKAGE_SPRITESTUDIO__
2 #define __PACKAGE_SPRITESTUDIO__
4 #define BOOST_PYTHON_STATIC_LIB
7 #include <boost/python.hpp>
13 using namespace boost::python;
20 void PYDEBUG_PRINTF(
const char* strFormat, ... );
23 template<
class my
class>
32 virtual bool debug(){
return true; }
33 void bind(myclass* c) { bind_inst = c;}
34 bool isNull(){
return bind_inst ==0 ; }
39 #define BIND_RETURN_PROP( _a ) this->bind_inst->_a
40 #define BIND_RETURN_PROPEX( type, _a ) type _a() { return (type)this->bind_inst->_a; }
41 #define BIND_NEW_PROP( type, _a ) \
43 type* new_type = new type();\
44 new_type->bind(bind_inst->_a);\
49 #define BIND_NEW_PROP_REF( type, _a ) \
51 type* new_type = new type();\
52 new_type->bind(&bind_inst->_a);\
59 inline void _bp_array_resize( boost::python::numeric::array& _array ,
int x ,
int y)
65 _array.resize( boost::python::make_tuple(x, y) );
69 #define BIND_RETURN_PROPEX_ARRAY( type , _a ,_dx,_dy) \
70 boost::python::numeric::array _a() { \
71 std::vector<type> array_;\
72 size_t len = sizeof(this->bind_inst->_a) / sizeof(type);\
73 for ( size_t i = 0 ; i < len ; i++ )\
75 array_.push_back(this->bind_inst->_a[i]);\
77 boost::python::numeric::array _aa(array_);\
78 _bp_array_resize( _aa , _dx , _dy );\
83 #define BIND_RETURN_PROPEX_ARRAY( type , _a ) \
84 boost::python::numeric::array _a() { \
85 boost::python::numeric::array _aa(this->bind_inst->_a);\
95 #include "bind_Animation.h"
96 #include "bind_SsAnimeDecoder.h"
97 #include "bind_SsAttribute.h"
98 #include "bind_AnimePack.h"
99 #include "bind_SsPart.h"
100 #include "bind_SsPartAnime.h"
101 #include "bind_SSXML.h"
103 #include "bind_SsKeyframe.h"
104 #include "bind_Cellmap.h"