1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "LuaHelper.h"
using namespace LuaBind;
template <>
Rect State::GetValue < Rect >(int idx, const Rect value)
{
Rect rect;
rect.x = GetField<float>(idx, 1, 0);
rect.y = GetField<float>(idx, 2, 0);
rect.width = GetField<float>(idx, 3, 0);
rect.height = GetField<float>(idx, 4, 0);
return rect;
}
template <>
Vector2 State::GetValue < Vector2 >(int idx, const Vector2 value)
{
Vector2 v2;
v2.x = GetField<float>(idx, 1, 0);
v2.y = GetField<float>(idx, 2, 0);
return v2;
}
int LuaHelper::Call(const char* func, const char* params, ...)
{
return 1;
}
|