/** * @brief Adds a system marker. * * @usage mrk_id = system.mrkAdd( "Hello", vec2.new( 50, 30 ) ) -- Creates a marker at (50,30) * * @luaparam str String to display next to marker. * @luaparam v Position to display marker at. * @luareturn The id of the marker. * @luafunc mrkAdd( str, v ) */ static int systemL_mrkAdd( lua_State *L ) { const char *str; LuaVector *lv; unsigned int id; /* Handle parameters. */ str = luaL_checkstring( L, 1 ); lv = luaL_checkvector( L, 2 ); /* Create marker. */ id = ovr_mrkAddPoint( str, lv->vec.x, lv->vec.y ); lua_pushnumber( L, id ); return 1; }
/** * @brief Adds a system marker. * * @usage mrk_id = system.mrkAdd( "Hello", vec2.new( 50, 30 ) ) -- Creates a marker at (50,30) * * @luatparam string str String to display next to marker. * @luatparam Vec2 v Position to display marker at. * @luatreturn number The id of the marker. * @luafunc mrkAdd( str, v ) */ static int systemL_mrkAdd( lua_State *L ) { const char *str; Vector2d *vec; unsigned int id; /* Handle parameters. */ str = luaL_checkstring( L, 1 ); vec = luaL_checkvector( L, 2 ); /* Create marker. */ id = ovr_mrkAddPoint( str, vec->x, vec->y ); lua_pushnumber( L, id ); return 1; }