diff options
author | Talun | 2012-04-14 00:37:55 +0100 |
---|---|---|
committer | nebadon | 2012-04-13 17:08:00 -0700 |
commit | 4d652c704186e9e399ffc6fc1bdf1f1dca056370 (patch) | |
tree | 9ec3bf715b1b4f70d9c430e52c545239480cf606 /OpenSim | |
parent | Add very basic TestGetRootPartPosition() test (diff) | |
download | opensim-SC_OLD-4d652c704186e9e399ffc6fc1bdf1f1dca056370.zip opensim-SC_OLD-4d652c704186e9e399ffc6fc1bdf1f1dca056370.tar.gz opensim-SC_OLD-4d652c704186e9e399ffc6fc1bdf1f1dca056370.tar.bz2 opensim-SC_OLD-4d652c704186e9e399ffc6fc1bdf1f1dca056370.tar.xz |
Missing or unimplemented LSL memory functions.
Implemented to behave as if scripts were LSO.
Signed-off-by: nebadon <michael@osgrid.org>
Diffstat (limited to 'OpenSim')
4 files changed, 62 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 078a22a..a19427d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -10949,34 +10949,50 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10949 | return 1; | 10949 | return 1; |
10950 | } | 10950 | } |
10951 | 10951 | ||
10952 | #region Not Implemented | 10952 | public LSL_Integer llGetMemoryLimit() |
10953 | // | 10953 | { |
10954 | // Listing the unimplemented lsl functions here, please move | 10954 | m_host.AddScriptLPS(1); |
10955 | // them from this region as they are completed | 10955 | // The value returned for LSO scripts in SL |
10956 | // | 10956 | return 16384; |
10957 | } | ||
10957 | 10958 | ||
10958 | public void llGetEnv(LSL_String name) | 10959 | public LSL_Integer llSetMemoryLimit(LSL_Integer limit) |
10959 | { | 10960 | { |
10960 | m_host.AddScriptLPS(1); | 10961 | m_host.AddScriptLPS(1); |
10961 | NotImplemented("llGetEnv"); | 10962 | // Treat as an LSO script |
10963 | return ScriptBaseClass.FALSE; | ||
10962 | } | 10964 | } |
10963 | 10965 | ||
10964 | public void llGetSPMaxMemory() | 10966 | public LSL_Integer llGetSPMaxMemory() |
10965 | { | 10967 | { |
10966 | m_host.AddScriptLPS(1); | 10968 | m_host.AddScriptLPS(1); |
10967 | NotImplemented("llGetSPMaxMemory"); | 10969 | // The value returned for LSO scripts in SL |
10970 | return 16384; | ||
10968 | } | 10971 | } |
10969 | 10972 | ||
10970 | public void llGetUsedMemory() | 10973 | public LSL_Integer llGetUsedMemory() |
10971 | { | 10974 | { |
10972 | m_host.AddScriptLPS(1); | 10975 | m_host.AddScriptLPS(1); |
10973 | NotImplemented("llGetUsedMemory"); | 10976 | // The value returned for LSO scripts in SL |
10977 | return 16384; | ||
10974 | } | 10978 | } |
10975 | 10979 | ||
10976 | public void llScriptProfiler(LSL_Integer flags) | 10980 | public void llScriptProfiler(LSL_Integer flags) |
10977 | { | 10981 | { |
10978 | m_host.AddScriptLPS(1); | 10982 | m_host.AddScriptLPS(1); |
10979 | NotImplemented("llScriptProfiler"); | 10983 | // This does nothing for LSO scripts in SL |
10984 | } | ||
10985 | |||
10986 | #region Not Implemented | ||
10987 | // | ||
10988 | // Listing the unimplemented lsl functions here, please move | ||
10989 | // them from this region as they are completed | ||
10990 | // | ||
10991 | |||
10992 | public void llGetEnv(LSL_String name) | ||
10993 | { | ||
10994 | m_host.AddScriptLPS(1); | ||
10995 | NotImplemented("llGetEnv"); | ||
10980 | } | 10996 | } |
10981 | 10997 | ||
10982 | public void llSetSoundQueueing(int queue) | 10998 | public void llSetSoundQueueing(int queue) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 0f53bc3..11b21d4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -147,7 +147,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
147 | LSL_Vector llGetLocalPos(); | 147 | LSL_Vector llGetLocalPos(); |
148 | LSL_Rotation llGetLocalRot(); | 148 | LSL_Rotation llGetLocalRot(); |
149 | LSL_Float llGetMass(); | 149 | LSL_Float llGetMass(); |
150 | void llGetNextEmail(string address, string subject); | 150 | LSL_Integer llGetMemoryLimit(); |
151 | void llGetNextEmail(string address, string subject); | ||
151 | LSL_String llGetNotecardLine(string name, int line); | 152 | LSL_String llGetNotecardLine(string name, int line); |
152 | LSL_Key llGetNumberOfNotecardLines(string name); | 153 | LSL_Key llGetNumberOfNotecardLines(string name); |
153 | LSL_Integer llGetNumberOfPrims(); | 154 | LSL_Integer llGetNumberOfPrims(); |
@@ -185,6 +186,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
185 | LSL_String llGetScriptName(); | 186 | LSL_String llGetScriptName(); |
186 | LSL_Integer llGetScriptState(string name); | 187 | LSL_Integer llGetScriptState(string name); |
187 | LSL_String llGetSimulatorHostname(); | 188 | LSL_String llGetSimulatorHostname(); |
189 | LSL_Integer llGetSPMaxMemory(); | ||
188 | LSL_Integer llGetStartParameter(); | 190 | LSL_Integer llGetStartParameter(); |
189 | LSL_Integer llGetStatus(int status); | 191 | LSL_Integer llGetStatus(int status); |
190 | LSL_String llGetSubString(string src, int start, int end); | 192 | LSL_String llGetSubString(string src, int start, int end); |
@@ -198,6 +200,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
198 | LSL_String llGetTimestamp(); | 200 | LSL_String llGetTimestamp(); |
199 | LSL_Vector llGetTorque(); | 201 | LSL_Vector llGetTorque(); |
200 | LSL_Integer llGetUnixTime(); | 202 | LSL_Integer llGetUnixTime(); |
203 | LSL_Integer llGetUsedMemory(); | ||
201 | LSL_Vector llGetVel(); | 204 | LSL_Vector llGetVel(); |
202 | LSL_Float llGetWallclock(); | 205 | LSL_Float llGetWallclock(); |
203 | void llGiveInventory(string destination, string inventory); | 206 | void llGiveInventory(string destination, string inventory); |
@@ -319,6 +322,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
319 | void llSay(int channelID, string text); | 322 | void llSay(int channelID, string text); |
320 | void llScaleTexture(double u, double v, int face); | 323 | void llScaleTexture(double u, double v, int face); |
321 | LSL_Integer llScriptDanger(LSL_Vector pos); | 324 | LSL_Integer llScriptDanger(LSL_Vector pos); |
325 | void llScriptProfiler(LSL_Integer flag); | ||
322 | LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata); | 326 | LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata); |
323 | void llSensor(string name, string id, int type, double range, double arc); | 327 | void llSensor(string name, string id, int type, double range, double arc); |
324 | void llSensorRemove(); | 328 | void llSensorRemove(); |
@@ -342,6 +346,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
342 | void llSetLinkTexture(int linknumber, string texture, int face); | 346 | void llSetLinkTexture(int linknumber, string texture, int face); |
343 | void llSetLinkTextureAnim(int linknum, int mode, int face, int sizex, int sizey, double start, double length, double rate); | 347 | void llSetLinkTextureAnim(int linknum, int mode, int face, int sizex, int sizey, double start, double length, double rate); |
344 | void llSetLocalRot(LSL_Rotation rot); | 348 | void llSetLocalRot(LSL_Rotation rot); |
349 | LSL_Integer llSetMemoryLimit(LSL_Integer limit); | ||
345 | void llSetObjectDesc(string desc); | 350 | void llSetObjectDesc(string desc); |
346 | void llSetObjectName(string name); | 351 | void llSetObjectName(string name); |
347 | void llSetObjectPermMask(int mask, int value); | 352 | void llSetObjectPermMask(int mask, int value); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index f58f9d6..fd7c41e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -381,6 +381,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
381 | public const int PRIM_SCULPT_FLAG_INVERT = 64; | 381 | public const int PRIM_SCULPT_FLAG_INVERT = 64; |
382 | public const int PRIM_SCULPT_FLAG_MIRROR = 128; | 382 | public const int PRIM_SCULPT_FLAG_MIRROR = 128; |
383 | 383 | ||
384 | public const int PROFILE_NONE = 0; | ||
385 | public const int PROFILE_SCRIPT_MEMORY = 1; | ||
386 | |||
384 | public const int MASK_BASE = 0; | 387 | public const int MASK_BASE = 0; |
385 | public const int MASK_OWNER = 1; | 388 | public const int MASK_OWNER = 1; |
386 | public const int MASK_GROUP = 2; | 389 | public const int MASK_GROUP = 2; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index f8e3c36..3c2f7bd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -569,6 +569,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
569 | return m_LSL_Functions.llGetMass(); | 569 | return m_LSL_Functions.llGetMass(); |
570 | } | 570 | } |
571 | 571 | ||
572 | public LSL_Integer llGetMemoryLimit() | ||
573 | { | ||
574 | return m_LSL_Functions.llGetMemoryLimit(); | ||
575 | } | ||
576 | |||
572 | public void llGetNextEmail(string address, string subject) | 577 | public void llGetNextEmail(string address, string subject) |
573 | { | 578 | { |
574 | m_LSL_Functions.llGetNextEmail(address, subject); | 579 | m_LSL_Functions.llGetNextEmail(address, subject); |
@@ -759,6 +764,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
759 | return m_LSL_Functions.llGetSimulatorHostname(); | 764 | return m_LSL_Functions.llGetSimulatorHostname(); |
760 | } | 765 | } |
761 | 766 | ||
767 | public LSL_Integer llGetSPMaxMemory() | ||
768 | { | ||
769 | return m_LSL_Functions.llGetSPMaxMemory(); | ||
770 | } | ||
771 | |||
762 | public LSL_Integer llGetStartParameter() | 772 | public LSL_Integer llGetStartParameter() |
763 | { | 773 | { |
764 | return m_LSL_Functions.llGetStartParameter(); | 774 | return m_LSL_Functions.llGetStartParameter(); |
@@ -824,6 +834,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
824 | return m_LSL_Functions.llGetUnixTime(); | 834 | return m_LSL_Functions.llGetUnixTime(); |
825 | } | 835 | } |
826 | 836 | ||
837 | public LSL_Integer llGetUsedMemory() | ||
838 | { | ||
839 | return m_LSL_Functions.llGetUsedMemory(); | ||
840 | } | ||
841 | |||
827 | public LSL_Vector llGetVel() | 842 | public LSL_Vector llGetVel() |
828 | { | 843 | { |
829 | return m_LSL_Functions.llGetVel(); | 844 | return m_LSL_Functions.llGetVel(); |
@@ -1423,6 +1438,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1423 | return m_LSL_Functions.llScriptDanger(pos); | 1438 | return m_LSL_Functions.llScriptDanger(pos); |
1424 | } | 1439 | } |
1425 | 1440 | ||
1441 | public void llScriptProfiler(LSL_Integer flags) | ||
1442 | { | ||
1443 | m_LSL_Functions.llScriptProfiler(flags); | ||
1444 | } | ||
1445 | |||
1426 | public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata) | 1446 | public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata) |
1427 | { | 1447 | { |
1428 | return m_LSL_Functions.llSendRemoteData(channel, dest, idata, sdata); | 1448 | return m_LSL_Functions.llSendRemoteData(channel, dest, idata, sdata); |
@@ -1533,6 +1553,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1533 | m_LSL_Functions.llSetLocalRot(rot); | 1553 | m_LSL_Functions.llSetLocalRot(rot); |
1534 | } | 1554 | } |
1535 | 1555 | ||
1556 | public LSL_Integer llSetMemoryLimit(LSL_Integer limit) | ||
1557 | { | ||
1558 | return m_LSL_Functions.llSetMemoryLimit(limit); | ||
1559 | } | ||
1560 | |||
1536 | public void llSetObjectDesc(string desc) | 1561 | public void llSetObjectDesc(string desc) |
1537 | { | 1562 | { |
1538 | m_LSL_Functions.llSetObjectDesc(desc); | 1563 | m_LSL_Functions.llSetObjectDesc(desc); |