aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--LuaSL/src/LSL.lua89
1 files changed, 71 insertions, 18 deletions
diff --git a/LuaSL/src/LSL.lua b/LuaSL/src/LSL.lua
index d0c97c4..12b3236 100644
--- a/LuaSL/src/LSL.lua
+++ b/LuaSL/src/LSL.lua
@@ -287,23 +287,6 @@ function --[[integer]] LSL.llSubStringIndex(--[[string]] text, --[[string]] sub
287function --[[list]] LSL.llParseString2List(--[[string]] In, --[[list]] l, --[[list]] l1) return {} end; 287function --[[list]] LSL.llParseString2List(--[[string]] In, --[[list]] l, --[[list]] l1) return {} end;
288function --[[list]] LSL.llParseStringKeepNulls(--[[string]] In, --[[list]] l, --[[list]] l1) return {} end; 288function --[[list]] LSL.llParseStringKeepNulls(--[[string]] In, --[[list]] l, --[[list]] l1) return {} end;
289 289
290function --[[list]] LSL.llCSV2List(--[[string]] text) return {} end;
291function --[[list]] LSL.llDeleteSubList(--[[list]] l,--[[integer]] start,--[[integer]] eNd) return {} end;
292function --[[string]] LSL.llDumpList2String(--[[list]] l, --[[string]] separator) return "" end;
293function --[[string]] LSL.llList2CSV(--[[list]] l) return "" end;
294function --[[float]] LSL.llList2Float(--[[list]] l,--[[integer]] index) return 0.0 end;
295function --[[integer]] LSL.llList2Integer(--[[list]] l,--[[integer]] index) return 0 end;
296function --[[key]] LSL.llList2Key(--[[list]] l,--[[integer]] index) return LSL.NULL_KEY end;
297function --[[list]] LSL.llList2List(--[[list]] l,--[[integer]] start,--[[integer]] eNd) return {} end;
298function --[[string]] LSL.llList2String(--[[list]] l,--[[integer]] index) return "" end;
299function --[[rotation]] LSL.llList2Rotation(--[[list]] l,--[[integer]] index) return LSL.ZERO_ROTATION end;
300function --[[vector]] LSL.llList2Vector(--[[list]] l,--[[integer]] index) return LSL.ZERO_VECTOR end;
301function --[[integer]] LSL.llListFindList(--[[list]] l, --[[list]] l1) return 0 end;
302function --[[list]] LSL.llListInsertList(--[[list]] l, --[[list]] l1,--[[integer]] index) return {} end;
303function --[[integer]] LSL.llGetListLength(--[[list]] l) return 0 end;
304function --[[list]] LSL.llListReplaceList(--[[list]] l, --[[list]] part,--[[integer]] start,--[[integer]] eNd) return {} end;
305function --[[list]] LSL.llListSort(--[[list]] l,--[[integer]] stride,--[[integer]] ascending) return {} end;
306
307function --[[key]] LSL.llAvatarOnSitTarget() return LSL.NULL_KEY end; 290function --[[key]] LSL.llAvatarOnSitTarget() return LSL.NULL_KEY end;
308function --[[list]] LSL.llGetAnimationList(--[[key]] id) return {} end; 291function --[[list]] LSL.llGetAnimationList(--[[key]] id) return {} end;
309function --[[key]] LSL.llGetKey() return LSL.NULL_KEY end; 292function --[[key]] LSL.llGetKey() return LSL.NULL_KEY end;
@@ -326,6 +309,76 @@ function LSL.llWhisper(--[[integer]] channel, --[[string]] text) print("Channe
326 309
327function LSL.llMessageLinked(--[[integer]] link,--[[integer]] num, --[[string]] text, --[[key]] aKey) end; 310function LSL.llMessageLinked(--[[integer]] link,--[[integer]] num, --[[string]] text, --[[key]] aKey) end;
328 311
312
313-- LSL list functions.
314
315function --[[list]] LSL.llCSV2List(--[[string]] text) return {} end;
316function --[[list]] LSL.llDeleteSubList(--[[list]] l,--[[integer]] start,--[[integer]] eNd)
317 local temp = {}
318 local x = 1
319
320 -- Deal with the impedance mismatch.
321 start = start + 1
322 eNd = eNd + 1
323 for i = 1,#l do
324 if i < start then temp[x] = l[i]; x = x + 1
325 elseif i > eNd then temp[x] = l[i]; x = x + 1
326 end
327 end
328
329 return temp
330end
331
332function --[[string]] LSL.llDumpList2String(--[[list]] l, --[[string]] separator) return "" end;
333function --[[string]] LSL.llList2CSV(--[[list]] l) return "" end;
334function --[[float]] LSL.llList2Float(--[[list]] l,--[[integer]] index)
335 local temp = tonumber(l[index])
336 if nil == temp then temp = 0.0 end
337 return temp;
338end
339
340function --[[integer]] LSL.llList2Integer(--[[list]] l,--[[integer]] index)
341 local temp = tonumber(l[index+1])
342 if nil == temp then temp = 0 end
343 return temp;
344end
345
346function --[[key]] LSL.llList2Key(--[[list]] l,--[[integer]] index)
347 local temp = l[index+1]
348 if temp then return "" .. temp else return LSL.NULL_KEY end
349end
350
351function --[[list]] LSL.llList2List(--[[list]] l,--[[integer]] start,--[[integer]] eNd) return {} end;
352function --[[string]] LSL.llList2String(--[[list]] l,--[[integer]] index)
353 local temp = l[index+1]
354 if temp then return "" .. temp else return "" end
355end
356
357function --[[rotation]] LSL.llList2Rotation(--[[list]] l,--[[integer]] index)
358 local temp = l[index+1]
359 if nil == temp then temp = LSL.ZERO_ROTATION end
360 -- TODO - check if it's not an actual rotation, then return LSS.ZERO_ROTATION
361 return temp;
362end
363
364function --[[vector]] LSL.llList2Vector(--[[list]] l,--[[integer]] index)
365 local temp = l[index+1]
366 if nil == temp then temp = LSL.ZERO_VECTOR end
367 -- TODO - check if it's not an actual rotation, then return LSS.ZERO_VECTOR
368 return temp;
369end
370
371function --[[integer]] LSL.llListFindList(--[[list]] l, --[[list]] l1) return 0 end;
372function --[[list]] LSL.llListInsertList(--[[list]] l, --[[list]] l1,--[[integer]] index) return {} end;
373function --[[integer]] LSL.llGetListLength(--[[list]] l)
374 return #l
375end
376
377function --[[list]] LSL.llListReplaceList(--[[list]] l, --[[list]] part,--[[integer]] start,--[[integer]] eNd) return {} end;
378function --[[list]] LSL.llListSort(--[[list]] l,--[[integer]] stride,--[[integer]] ascending) return {} end;
379
380
381
329-- Crements stuff. 382-- Crements stuff.
330 383
331function LSL.preDecrement(name) _G[name] = _G[name] - 1; return _G[name]; end; 384function LSL.preDecrement(name) _G[name] = _G[name] - 1; return _G[name]; end;
@@ -336,7 +389,7 @@ function LSL.postIncrement(name) local temp = _G[name]; _G[name] = _G[name] + 1;
336-- State stuff 389-- State stuff
337 390
338local currentState = {} 391local currentState = {}
339local running = true; 392local running = true
340 393
341-- Stuff called from the wire protocol has to be global, but I think this means just global to this file. 394-- Stuff called from the wire protocol has to be global, but I think this means just global to this file.
342function quit() 395function quit()