From 1403bd17f9c784fc5a90c68688d330c97c7be1de Mon Sep 17 00:00:00 2001 From: me4502 Date: Sun, 18 Sep 2011 12:02:48 +0800 Subject: [PATCH] added dcolour to set and get --- src/luaconsole.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/luaconsole.c b/src/luaconsole.c index 5febe486c..77a35fd9c 100644 --- a/src/luaconsole.c +++ b/src/luaconsole.c @@ -464,6 +464,9 @@ int luatpt_set_property(lua_State* l) } else if (strcmp(prop,"y")==0){ offset = offsetof(particle, y); format = 2; + } else if (strcmp(prop,"dcolour")==0){ + offset = offsetof(particle, dcolour); + format = 1; } else { return luaL_error(l, "Invalid property '%s'", prop); } @@ -612,6 +615,10 @@ int luatpt_get_property(lua_State* l) lua_pushnumber(l, parts[i].y); return 1; } + if (strcmp(prop,"dcolour")==0){ + lua_pushinteger(l, parts[i].dcolour); + return 1; + } if (strcmp(prop,"id")==0){ lua_pushnumber(l, i); return 1;