corrade-lsl-templates – Diff between revs 26 and 29

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 26 Rev 29
Line 1... Line 1...
1 /////////////////////////////////////////////////////////////////////////// 1 ///////////////////////////////////////////////////////////////////////////
2 // Copyright (C) Wizardry and Steamworks 2016 - License: GNU GPLv3 // 2 // Copyright (C) Wizardry and Steamworks 2016 - License: CC BY 2.0 //
3 /////////////////////////////////////////////////////////////////////////// 3 ///////////////////////////////////////////////////////////////////////////
4 // 4 //
5 // A template HUD script for Corrade that reads a configuration notecard 5 // A template HUD script for Corrade that reads a configuration notecard
6 // and then feeds that configuration to various other components of the HUD 6 // and then feeds that configuration to various other components of the HUD
7 // that request the configuration. Additionally, this HUD is programmed to 7 // that request the configuration. Additionally, this HUD is programmed to
Line 10... Line 10...
10 // http://grimore.org/secondlife/scripted_agents/corrade 10 // http://grimore.org/secondlife/scripted_agents/corrade
11 // 11 //
12 /////////////////////////////////////////////////////////////////////////// 12 ///////////////////////////////////////////////////////////////////////////
Line 13... Line 13...
13   13  
14 /////////////////////////////////////////////////////////////////////////// 14 ///////////////////////////////////////////////////////////////////////////
15 // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // 15 // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 //
16 /////////////////////////////////////////////////////////////////////////// 16 ///////////////////////////////////////////////////////////////////////////
17 string wasKeyValueGet(string k, string data) { 17 string wasKeyValueGet(string k, string data) {
18 if(llStringLength(data) == 0) return ""; 18 if(llStringLength(data) == 0) return "";
19 if(llStringLength(k) == 0) return ""; 19 if(llStringLength(k) == 0) return "";
Line 22... Line 22...
22 if(i != -1) return llList2String(a, 2*i+1); 22 if(i != -1) return llList2String(a, 2*i+1);
23 return ""; 23 return "";
24 } 24 }
Line 25... Line 25...
25 25
26 /////////////////////////////////////////////////////////////////////////// 26 ///////////////////////////////////////////////////////////////////////////
27 // Copyright (C) 2013 Wizardry and Steamworks - License: GNU GPLv3 // 27 // Copyright (C) 2013 Wizardry and Steamworks - License: CC BY 2.0 //
28 /////////////////////////////////////////////////////////////////////////// 28 ///////////////////////////////////////////////////////////////////////////
29 string wasKeyValueEncode(list data) { 29 string wasKeyValueEncode(list data) {
30 list k = llList2ListStrided(data, 0, -1, 2); 30 list k = llList2ListStrided(data, 0, -1, 2);
31 list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2); 31 list v = llList2ListStrided(llDeleteSubList(data, 0, 0), 0, -1, 2);
Line 37... Line 37...
37 } while(llGetListLength(k) != 0); 37 } while(llGetListLength(k) != 0);
38 return llDumpList2String(data, "&"); 38 return llDumpList2String(data, "&");
39 } 39 }
Line 40... Line 40...
40   40  
41 /////////////////////////////////////////////////////////////////////////// 41 ///////////////////////////////////////////////////////////////////////////
42 // Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 // 42 // Copyright (C) 2015 Wizardry and Steamworks - License: CC BY 2.0 //
43 /////////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////////
44 // escapes a string in conformance with RFC1738 44 // escapes a string in conformance with RFC1738
45 string wasURLEscape(string i) { 45 string wasURLEscape(string i) {
46 string o = ""; 46 string o = "";