Mercurial > MadButterfly
annotate src/mbaf/mbobject.c @ 1139:a2b068594412
Use pybind with new DOM API (at PYNode).
- MBScene.document is a PYDocument instead of PYSPDocument.
- MBScene.root is a PYNode isntead of PYSPItem.
- getNext() was replaced by next().
- attribute() was replaced by getAttribute().
- getID() was removed, use setAttribute() instead.
- MBScene.dom was removed, use MBScene.document.root() instead.
- MBScene.nodeToItem was removed, use PYNode.spitem instead.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 22 Dec 2010 13:27:37 +0800 |
parents | 152bc503dc99 |
children |
rev | line source |
---|---|
822
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
303
diff
changeset
|
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- |
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
303
diff
changeset
|
2 // vim: sw=4:ts=8:sts=4 |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
3 #include "mb_types.h" |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
4 #include "mb_obj.h" |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
5 #include "mb_config.h" |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
6 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
7 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
8 void mb_obj_set_pos(mb_obj_t *obj, co_aix x, co_aix y) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
9 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
10 if (MBO_TYPE(obj) == MBO_COORD) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
11 coord_x(((coord_t *) obj)) = x; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
12 coord_y(((coord_t *) obj)) = y; |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
13 #ifdef SH_TEXT |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
14 } else if (MBO_TYPE(obj) == MBO_TEXT) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
15 sh_text_set_pos((shape_t *) obj, x, y); |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
16 #endif |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
17 } else { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
18 return; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
19 } |
822
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
303
diff
changeset
|
20 |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
21 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
22 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
23 void mb_obj_get_pos(mb_obj_t *obj, co_aix *x, co_aix *y) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
24 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
25 if (MBO_TYPE(obj) == MBO_COORD) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
26 *x = coord_x((coord_t *) obj); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
27 *y = coord_y((coord_t *) obj); |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
28 #ifdef SH_TEXT |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
29 } else if (MBO_TYPE(obj) == MBO_TEXT) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
30 sh_text_get_pos((shape_t *) obj, x, y); |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
31 #endif |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
32 } else { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
33 return; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
34 } |
822
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
303
diff
changeset
|
35 |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
36 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
37 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
38 void mb_obj_set_text(mb_obj_t *obj, const char *text) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
39 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
40 if (MBO_TYPE(obj) == MBO_COORD) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
41 geo_t *geo; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
42 shape_t *shape; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
43 coord_t *g = (coord_t *) obj; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
44 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
45 FOR_COORD_MEMBERS(g, geo) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
46 shape = geo_get_shape(geo); |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
47 #ifdef SH_TEXT |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
48 if(shape->obj.obj_type == MBO_TEXT) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
49 sh_text_set_text(shape, text); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
50 return; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
51 } |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
52 #endif |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
53 } |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
54 #ifdef SH_TEXT |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
55 } else if (MBO_TYPE(obj) == MBO_TEXT) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
56 sh_text_set_text((shape_t *) obj,text); |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
57 #endif |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
58 } else { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
59 return; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
60 } |
822
586e50f82c1f
Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents:
303
diff
changeset
|
61 |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
62 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
63 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
64 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
65 void mb_obj_get_text(mb_obj_t *obj, char *text,int size) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
66 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
67 if (MBO_TYPE(obj) == MBO_COORD) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
68 geo_t *geo; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
69 shape_t *shape; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
70 coord_t *g = (coord_t *) obj; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
71 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
72 FOR_COORD_MEMBERS(g, geo) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
73 shape = geo_get_shape(geo); |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
74 #ifdef SH_TEXT |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
75 if(shape->obj.obj_type == MBO_TEXT) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
76 sh_text_get_text(shape, text,size); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
77 return; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
78 } |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
79 #endif |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
80 } |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
81 #ifdef SH_TEXT |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
82 } else if (MBO_TYPE(obj) == MBO_TEXT) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
83 sh_text_get_text((shape_t *) obj,text,size); |
922
152bc503dc99
Conditional compile for sh_text in mbaf
Thinker K.F. Li <thinker@codemud.net>
parents:
822
diff
changeset
|
84 #endif |
303
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
85 } else { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
86 *text = 0; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
87 return; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
88 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
89 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
90 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
91 void mb_obj_set_scalex(mb_obj_t *obj,int scale) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
92 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
93 if (MBO_TYPE(obj) == MBO_COORD) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
94 coord_set_scalex((coord_t *) obj, scale); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
95 } else { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
96 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
97 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
98 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
99 int mb_obj_get_scalex(mb_obj_t *obj) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
100 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
101 if (MBO_TYPE(obj) == MBO_COORD) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
102 return coord_scalex((coord_t *) obj); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
103 } else { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
104 return 100; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
105 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
106 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
107 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
108 void mb_obj_set_scaley(mb_obj_t *obj,int scale) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
109 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
110 if (MBO_TYPE(obj) == MBO_COORD) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
111 coord_set_scaley((coord_t *) obj, scale); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
112 } else { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
113 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
114 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
115 int mb_obj_get_scaley(mb_obj_t *obj) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
116 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
117 if (MBO_TYPE(obj) == MBO_COORD) { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
118 return coord_scaley((coord_t *) obj); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
119 } else { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
120 return 100; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
121 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
122 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
123 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
124 void mb_obj_set_rotation(mb_obj_t *obj, int degree) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
125 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
126 printf("%s is not implemented yet\n",__FUNCTION__); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
127 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
128 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
129 int mb_obj_get_rotation(mb_obj_t *obj) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
130 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
131 printf("%s is not implemented yet\n",__FUNCTION__); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
132 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
133 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
134 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
135 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
136 void mb_obj_set_color(mb_obj_t *obj, int color) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
137 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
138 printf("%s is not implemented yet\n",__FUNCTION__); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
139 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
140 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
141 |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
142 int mb_obj_get_color(mb_obj_t *obj) |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
143 { |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
144 printf("%s is not implemented yet\n",__FUNCTION__); |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
145 return 0; |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
146 } |
f894b30676e9
Add MBAF object suport. This is still work in progress yet. However, it won't affect other features. Therefore, it is checked in before it become mature.
wycc
parents:
diff
changeset
|
147 |