diff options
author | Josh Bell <josh@lindenlab.com> | 2008-02-14 01:45:59 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2008-02-14 01:45:59 +0000 |
commit | 98fd90ddd6595f2ee7e626c14117f51def621ec5 (patch) | |
tree | 9a9caf8bffa53b753fe850f445bd133195e9bb03 /indra/lscript | |
parent | 89d938efe371645756240da72f4c359c36985060 (diff) |
svn merge -r 79730:79944 svn+ssh://svn.lindenlab.com/svn/linden/branches/parcel_media/sl-parcelmedia-6 --> release
QAR-275 Parcel Media
Sam made me do it.
Diffstat (limited to 'indra/lscript')
-rw-r--r-- | indra/lscript/lscript_compile/indra.l | 14 | ||||
-rw-r--r-- | indra/lscript/lscript_library/lscript_library.cpp | 12 |
2 files changed, 25 insertions, 1 deletions
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 57aef07e18..c8458a3ff0 100644 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -36,6 +36,7 @@ FS (f|F) #include "llparcelflags.h" #include "llregionflags.h" #include "lscript_http.h" +#include "llclickaction.h" void count(); void comment(); @@ -522,6 +523,10 @@ extern "C" { int yyerror(const char *fmt, ...); } "PARCEL_MEDIA_COMMAND_AGENT" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_AGENT; return(INTEGER_CONSTANT); } "PARCEL_MEDIA_COMMAND_UNLOAD" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_UNLOAD; return(INTEGER_CONSTANT); } "PARCEL_MEDIA_COMMAND_AUTO_ALIGN" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_AUTO_ALIGN; return(INTEGER_CONSTANT); } +"PARCEL_MEDIA_COMMAND_TYPE" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_TYPE; return(INTEGER_CONSTANT); } +"PARCEL_MEDIA_COMMAND_SIZE" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_SIZE; return(INTEGER_CONSTANT); } +"PARCEL_MEDIA_COMMAND_DESC" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_DESC; return(INTEGER_CONSTANT); } +"PARCEL_MEDIA_COMMAND_LOOP_SET" { count(); yylval.ival = PARCEL_MEDIA_COMMAND_LOOP_SET; return(INTEGER_CONSTANT); } "LIST_STAT_MAX" { count(); yylval.ival = LIST_STAT_MAX; return(INTEGER_CONSTANT); } "LIST_STAT_MIN" { count(); yylval.ival = LIST_STAT_MIN; return(INTEGER_CONSTANT); } @@ -587,6 +592,15 @@ extern "C" { int yyerror(const char *fmt, ...); } "STRING_TRIM_TAIL" { count(); yylval.ival = STRING_TRIM_TAIL; return(INTEGER_CONSTANT); } "STRING_TRIM" { count(); yylval.ival = STRING_TRIM; return(INTEGER_CONSTANT); } +"CLICK_ACTION_NONE" { count(); yylval.ival = CLICK_ACTION_NONE; return(INTEGER_CONSTANT); } +"CLICK_ACTION_TOUCH" { count(); yylval.ival = CLICK_ACTION_TOUCH; return(INTEGER_CONSTANT); } +"CLICK_ACTION_SIT" { count(); yylval.ival = CLICK_ACTION_SIT; return(INTEGER_CONSTANT); } +"CLICK_ACTION_BUY" { count(); yylval.ival = CLICK_ACTION_BUY; return(INTEGER_CONSTANT); } +"CLICK_ACTION_PAY" { count(); yylval.ival = CLICK_ACTION_PAY; return(INTEGER_CONSTANT); } +"CLICK_ACTION_OPEN" { count(); yylval.ival = CLICK_ACTION_OPEN; return(INTEGER_CONSTANT); } +"CLICK_ACTION_PLAY" { count(); yylval.ival = CLICK_ACTION_PLAY; return(INTEGER_CONSTANT); } +"CLICK_ACTION_OPEN_MEDIA" { count(); yylval.ival = CLICK_ACTION_OPEN_MEDIA; return(INTEGER_CONSTANT); } + {L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); } {N}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp index e082220353..47ea62b888 100644 --- a/indra/lscript/lscript_library/lscript_library.cpp +++ b/indra/lscript/lscript_library/lscript_library.cpp @@ -29,7 +29,15 @@ * $/LicenseInfo$ */ -// *WARNING* + +// ## ## ### ######## ## ## #### ## ## ###### #### #### +// ## ## ## ## ## ## ## ### ## ## ### ## ## ## #### #### +// ## ## ## ## ## ## ## #### ## ## #### ## ## #### #### +// ## ## ## ## ## ######## ## ## ## ## ## ## ## ## #### ## ## +// ## ## ## ######### ## ## ## #### ## ## #### ## ## +// ## ## ## ## ## ## ## ## ### ## ## ### ## ## #### #### +// ### ### ## ## ## ## ## ## #### ## ## ###### #### #### +// // When adding functions, they <b>MUST</b> be appended to the end of // the init() method. The init() associates the name with a number, // which is then serialized into the bytecode. Inserting a new @@ -431,6 +439,8 @@ void LLScriptLibrary::init() addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetObjectDetails", "l", "kl", "list llGetObjectDetails(key id, list params)\nGets the object details specified in params for the object with key id.\nDetails are OBJECT_NAME, _DESC, _POS, _ROT, _VELOCITY, _OWNER, _GROUP, _CREATOR.")); + addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetClickAction", NULL, "i", "llSetClickAction(integer action)\nSets the action performed when a prim is clicked upon.")); + // energy, sleep, dummy_func, name, return type, parameters, help text, gods-only // IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST. |