Mercurial > MadButterfly
diff tools/mb_c_source.m4 @ 197:bcad1ccdf45c
Translate the path string into binary array to save the parsing in the runtime. It can reduce the size as well.
author | wycc@wycc-desktop |
---|---|
date | Wed, 19 Nov 2008 00:27:20 +0800 |
parents | 530bb7728546 |
children | 3fadd2f2742e |
line wrap: on
line diff
--- a/tools/mb_c_source.m4 Tue Nov 18 21:42:30 2008 +0800 +++ b/tools/mb_c_source.m4 Wed Nov 19 00:27:20 2008 +0800 @@ -86,12 +86,18 @@ define([S_ADD_RECT],[[ obj->$1 = rdman_shape_rect_new(rdman, $2, $3, $4, $5, $6, $7); + rdman_add_shape(rdman, obj->$1, obj->$8); ]]) define([S_ADD_PATH],[[ - obj->$1 = rdman_shape_path_new(rdman, "$2"); - rdman_add_shape(rdman, obj->$1, obj->$3); + { + char _cmds[] = "$3"; + float _args[] = {$4}; + int _fix_args[] = {$6}; + obj->$1 = rdman_shape_path_new_from_binary(rdman, _cmds,_args,$5,_fix_args,$7); + rdman_add_shape(rdman, obj->$1, obj->$2); + } ]]) define([S_ADD_COORD],[[