From 185d9a6b38a94150edb98a9a0d3c90fe9a3bd68d Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 15 Aug 2003 02:32:46 +0000 Subject: "" svn path=/trunk/; revision=848 --- externals/grill/flext/source/flbase.cpp | 37 +++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'externals/grill/flext/source/flbase.cpp') diff --git a/externals/grill/flext/source/flbase.cpp b/externals/grill/flext/source/flbase.cpp index 525cb294..bbd4cc1c 100644 --- a/externals/grill/flext/source/flbase.cpp +++ b/externals/grill/flext/source/flbase.cpp @@ -17,6 +17,19 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "flext.h" #include "flinternal.h" #include +#include + +#if FLEXT_SYS == FLEXT_SYS_PD +#ifdef _MSC_VER + #pragma warning (push) + #pragma warning (disable:4091) +#endif +#include +#ifdef _MSC_VER + #pragma warning (pop) +#endif +#endif + ///////////////////////////////////////////////////////// // @@ -82,7 +95,27 @@ void flext_obj::DefineHelp(t_classid c,const char *ref,const char *dir,bool addt #endif } +const t_symbol *flext_obj::GetParamSym(const t_symbol *sym,t_canvas *c) +{ + if(!c) c = canvas_getcurrent(); - - +#if FLEXT_SYS == FLEXT_SYS_PD + const char *s = GetString(sym); + if((s[0] == '$' || s[0] == '#') && isdigit(s[1])) { + // patcher parameter detected... get value! + if(s[0] != '$') { + char tmp[MAXPDSTRING]; + strcpy(tmp,s); + tmp[0] = '$'; + return canvas_realizedollar(c,const_cast(MakeSymbol(tmp))); + } + else + return canvas_realizedollar(c,const_cast(sym)); + } + else +#else + #pragma warning("Not implemented") +#endif + return sym; +} -- cgit v1.2.1