29
|
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|
|
30
|
20 _ctor overload bzVec2 function(float, float)
|
29
|
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 }
|