Mercurial > projects > openmelee
comparison test/wrap.d @ 29:da11cc30423f
Added miniD wrap
author | zzzzrrr <mason.green@gmail.com> |
---|---|
date | Mon, 30 Mar 2009 15:35:54 -0400 |
parents | |
children | 1cd0d4c7258e |
comparison
equal
deleted
inserted
replaced
28:1cc6b8c0acd2 | 29:da11cc30423f |
---|---|
1 module openmelee.test.wrap; | |
2 | |
3 import blaze.common.bzMath; | |
4 | |
5 private { | |
6 import xf.xpose2.Expose; | |
7 import xf.xpose2.MiniD; | |
8 } | |
9 | |
10 char[] mdxpose(char[] name, char[] expStr) { | |
11 return " | |
12 struct MDWrapper__"~name~" { | |
13 mixin(xpose2(`"~name~"`, `"~expStr~"`)); | |
14 mixin xposeMiniDNoSubclass!(`"~name~"`); | |
15 }"; | |
16 } | |
17 | |
18 mixin(mdxpose(`bzVec2`, ` | |
19 x|y| | |
20 _ctor overload bzVec function(float, float) | |
21 `)); | |
22 | |
23 void initMD(MDThread* t) { | |
24 pushGlobal(t, "modules"); | |
25 field(t, -1, "customLoaders"); | |
26 | |
27 newFunction(t, function uword(MDThread* t, uword numParams) | |
28 { | |
29 xposeMiniD_initAll(t); | |
30 return 0; | |
31 }, "boxen"); | |
32 | |
33 fielda(t, -2, "boxen"); | |
34 pop(t, 2); | |
35 } |