LSL Wiki Mirror 10-5-2006: BlindWanderer

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
Strife Onizuka in game,
I'm an immigrant from URU. Was in all 3 of it's beta's.

Wiki Troll (but a good one, causing drama isn't why i'm here).

I have a webpage but haven't updated it in a few months...

Wiki's are the way of the future when it comes to making documentation Ad-hoc but eventually become static as graffiti grows with popularity as a way of controling it.

also contribute to some other wiki's
http://history.secondserver.net/index.php/Main_Page
AviSynth:BlindWanderer

Updates:Preview Download
DMZPreview
AgniPreview
ColoPreview
SivaPreview
DurgaPreview
AditiPreview
SomaPreview
GangaPreview
ShaktiPreview

string TightListDump(list a, string b) {
    string c = (string)a;
    if(llStringLength(b)==1)
        if(llSubStringIndex(c,b) == -1)
            jump end;
    integer d = 1 - llStringLength(b += "|\\/?!@#$%^&*()_=:;~{}[],\n\" qQxXzZ");
    while(1+llSubStringIndex(c,llGetSubString(b,d,d)) && d)
        ++d;
    b = llGetSubString(b,d,d);
    @end;
    c = "";//save memory
    return b + llDumpList2String(a, b);
}

list TightListParse(string a) {
    string b = llGetSubString(a,0,0);//save memory
    return llParseStringKeepNulls(llDeleteSubString(a,0,0), [a=b],[]);
}

list quickread(string a)
{
    string c = llGetSubString(a,0,6);
    return llDeleteSubList([a]+//a = llGetSubString(c,0,0) by this point
                        llParseStringKeepNulls(llDeleteSubString(a,0,5), [],[a=llGetSubString(c,0,0),
                        llGetSubString(c,1,1),llGetSubString(c,2,2),llGetSubString(c,3,3),
                        llGetSubString(c,4,4),llGetSubString(c,5,5)]),
                        (llSubStringIndex(c,llGetSubString(c,6,6))==-1),1);
}

integer TightListTypeLength(string a)
{
    return llGetListLength(quickread(a))/2;
}

integer TightListTypeEntryType(string a, integer b)
{
    string c = llGetSubString(a,0,6);
    a = llList2String(quickread(a),  b * 2);
    return 1 + llSubStringIndex(c, a) - !llStringLength(a);
}

list TightListTypeParse(string a) {
    if(llStringLength(a) < 7)  return [];
    string m = llGetSubString(a,0,6);
    list b = quickread((a = "") + a);
    integer c = -llGetListLength(b);
    list f;
    integer d;
    do
    {
        f = [a = llList2String(b,c + 1)]; //TYPE_STRING || TYPE_INVALID (though we don't care about invalid)
        if((d = (1 + llSubStringIndex(m, llList2String(b,c)))) == TYPE_FLOAT)
            f = [(float)a];
        else if(d == TYPE_VECTOR)
            f = [(vector)a];
        else if(d == TYPE_ROTATION)
            f = [(rotation)a];
        else if(d == TYPE_KEY)
            f = [(key)a];
        else if(d == TYPE_INTEGER)
            f = [(integer)a];
        b = llListReplaceList(b, f, c, c+1);
    }while(0 > (c+=2));
    return b;
}

string TightListTypeDump(list a, string b) {
    b += "|\\/?!@#$%^&*()_=:;~{}[],\n\" qQxXzZ";
    string c = (string)a;
    integer d = 0;
    do
        if(1+llSubStringIndex(c,llGetSubString(b,d,d)))
            b = llDeleteSubString(b,d,d);
        else
            ++d;
    while(d<6);
    b = " " + c = llGetSubString(b,0,5);
    integer e;
    string f;
    if((d = -llGetListLength(a)))
    {
        do
        {
            e = llGetListEntryType(a,d);
            if(e == TYPE_VECTOR)
                f = vec(llList2Vector(a,d));
            else if(e == TYPE_ROTATION)
                f = rot(llList2Rot(a,d));
            else if(e == TYPE_FLOAT)
                f = flo(llList2Float(a,d));
            else
                f = llList2String(a,d);
            c+= llGetSubString(b,e,e) + f;
        }while(++d);
    }
    return c;
}

integer fui(float a){//union float to integer
    if(a){//is it non zero?
        integer b = (a < 0) << 31;//the sign, but later this variable is reused to store the shift
        if((a = llFabs(a)) < 2.3509887016445750159374730744445e-38)//Denormalized range check & last stirde of normalized range
            return b | (integer)(a / 1.4012984643248170709237295832899e-45);//this works because the math overlaps; saves cpu time.
        integer c = llFloor(llLog(a) / 0.69314718055994530941723212145818);//extremes will error towards extreme. following yuch corrects it.
        return (0x7FFFFF & (integer)(a * (0x1000000 >> b))) | (((c + 126 + (b = ((integer)a - (3 <= (a /= (float)("0x1p"+(string)(c -= (c == 128)))))))) << 23 ) | b);
    }//for grins, detect the sign on zero. it's not pretty but it works. the previous requires alot of unwinding to understand it.
    return ((string)a == (string)(-0.0)) << 31;
}

float iuf(integer a)
{//union integer to float
    return ((float)("0x1p"+(string)((a | !a) - 150))) * ((!!(a = (0xff & (a >> 23))) << 23) | ((a & 0x7fffff))) * (1 | (a >> 31));
}//will crash if the raw exponent == 0xff; reason for crash deviates from float standard; though a crash is warented.

integer FloatCompare(float a, float b, integer c)
{//compare floats and allow for a margin of error, requires fui().
    if(a - b)//(c) Strife Onizuka 2006 
    {//they are not equal
        //First we convert the floats to integer form, as they would be in memory;
        integer a_i = fui(a);
        integer b_i = fui(b);
        integer a_e = (a_i >> 23) & 0xff;
        integer b_e = (b_i >> 23) & 0xff;
        if(!(a_e || b_e) || ((a_i & 0x80000000) == (b_i & 0x80000000)))//sign match check
        {//start by getting and testing the difference, this is what limits c
            integer diff = a_e - b_e;//ugly is fast, basicly, it gets the mantissa, sets the sign on the mantisa,
            if(!(diff && ~diff && ~-diff))//shifts it depending on exponent, finaly executes the test.
                if(llAbs(((((a_i & 0x7FFFFF) | ((!!a_e) << 23)) * ((a_i >> 31) | 1)) >> diff) - 
                         ((((b_i & 0x7FFFFF) | ((!!b_e) << 23)) * ((b_i >> 31) | 1)) >> -diff)) <= c)
                    jump out;//they were close enough for government work :P
        }
        return (a > b) - (a < b);
    }
    @out;
    return 0;
}

integer bitcount(integer n)
{//MIT Hackmem 169, modified to work in LSL
    integer tmp = n - ((n >> 1) & 0x5B6DB6DB)//modified mask
                    - ((n >> 2) & 0x49249249);
    return (((tmp + (tmp >> 3)) & 0xC71C71C7) % 63) + (n < 0);
}


Asset Types by number
HexValueInventory FlagHandle8 char nameNice NameDescription
BAD TYPE
0x00000INVENTORY_TEXTURETEXTUREtexture JPEG2000 encoded image
0x01001INVENTORY_SOUNDSOUNDsound Ogg-Vorbis encoded Sound
0x02002 CALLINGCARDcallcardcalling cardCalling card
0x03003INVENTORY_LANDMARKLANDMARKlandmark Landmark, there are 2 versions of this format
0x04004 SCRIPTscriptlegacy scriptLSL1 we assume
0x05005INVENTORY_CLOTHINGCLOTHINGclothing LLWearable
0x06006INVENTORY_OBJECTOBJECTobject Object
0x07007INVENTORY_NOTECARDNOTECARDnotecardnote cardNotecard, only one version of the format exists
0x08008 CATEGORYcategory Something to do with inventory
0x09009 ROOT_CATEGORY Something to do with inventory
0x0A0010INVENTORY_SCRIPTLSL_TEXTlsltextlsl2 scriptlsl2 script text
0x0B0011 LSL_BYTECODElslbytelsl bytecodelsl bytecode and memory space, 16k
0x0C0012 TEXTURE_TGAtxtr_tgatga texturetga image, used in static cache
0x0D0013INVENTORY_BODYPARTBODYPARTbodypartbody partLLWearable
0x0E0014 TRASHtrash Something to do with inventory
0x0F0015 SNAPSHOT_CATEGORYsnapshot Something to do with inventory
0x100016 LOST_AND_FOUNDlstndfndlost and foundSomething to do with inventory
0x110017 SOUND_WAVsnd_wav Decoded Ogg-Vorbis
0x120018 IMAGE_TGAimg_tgatarga imageStandard Targa Image - decoded texture
0x130019 IMAGE_JPEGjpegjpeg imageStandard Jpeg Image - decoded texture or postcard
0x140020INVENTORY_ANIMATIONANIMATIONanimatnanimationbinary file format
0x150021INVENTORY_GESTUREGESTUREgesture 2 Versions?
0x160022 SIMSTATEsimstate Unknown
LLWearable version matches value of "wearable_definition_version" found in ".\character\avatar_lad.xml"

Backlinks:
AboutACLs
AirSeaAltimeter
AllarKamloops
alpha
AlternativeCommunications
alternative_communications
AND
AngelaSalome
AnimationNames
Animations
API
AssetPermissions
Base64
Benchmarks
bitfield
bitflag
bitmask
BitShift
BlindWanderer
Boobies
BVH
byte
Bytecode
CamperDave
CatFart
clever
Contributors
CrashCourse9
CyclopeanSprocket
Debate
DevonCassidy
DotOperator
DoWhile
Encapsulation
energy
EOF
Euler
Event
ExampleAnimationBasic
ExampleEventOrder
ExampleFixedPrecision
ExampleGetRootPos
ExampleGun
ExampleNumberConversion
Exchange
exchangeLockGuardItem
exchangeLockGuardSource
exchangeTLML
exchangeTLMLGenerator
exchangeTLMLRenderer
exchangeTLTP
exchangeTLTPBrowser
ExperimentllRezObject
FanZjie1
FanZjie11
float
FlyingTakoTips
FollowCam
for
formatSetText
framerate
functionLibrary
FunctionUnescape
FutureRevisions
GlobalCoordinate
GlobalVariable
group
GroupObjects
groups
Hacks
HeadsUpDisplay
HUD
IconSerpentine
InstantMessage
IridescentEnzyme
JPEG2000
kilobyte
KnownBugs
LexFile
LibraryAirSeaAltimeter
LibraryDialogModule
LibraryFastFind
LibraryFloat2Hex
LibraryGoGame
LibraryInventoryMenuModule
LibraryLindenAIML
LibraryNumRs
LibraryPrimTorture
LibraryPseudoRandomGenerator
LibraryRotationFunctions
LibrarySerialize
LibrarySettingsNotecard
LibrarySLPrint
LibraryTextureSwitcher
LibraryTimeElapsed
LibraryVigenereCipher
LibraryWarpPos
LindenAIML
Lisp
list
listen?show_comments=1
llAddToLandBanList
llAttachToAvatar
llAvatarOnSitTarget
llBase64ToInteger
llBase64ToString
llClearCameraParams
llDetectedSex
llEscapeURL
llFloor
llGetAnimationList
llGetCameraPos
llGetCameraRot
llGetInventoryType
llGetListLength
llGetNumberOfPrims
llGetObjectMass
llGetObjectPermMask
llGetParcelFlags
llGetPrimitiveParams
llGetRegionFlags
llGetRegionName
llGetTorque
llGodLikeRezObject
llGround
llHTTPRequest
llInsertString
llList2CSV
llList2List
llListReplaceList
llLoadURL
llMapDestination
llOwnerSay
llParcelMediaCommandList
llParcelMediaQuery
llParseStringKeepNulls
llPizza
llPreloadSound
llRefreshPrimURL
llRemoveFromLandBanList
llRemoveFromLandPassList
llRemoveVehicleFlags
llRequestAgentData
llRequestInventoryData
llRequestSimulatorData
llResetLandBanList
llResetLandPassList
llRotBetween
llSetCameraEyeOffset
llSetCameraParams
llSetHoverHeight
llSetPayPrice
llSetPrimitiveParams
llSetPrimURL
llSetScale
llSetVehicleFloatParam
llSetVehicleRotationParam
llSetVehicleVectorParam
llTeleportAgent
llUnescapeURL
llVecMag
llXorBase64StringsCorrect
LSL101Appendix2
LSLFunctionRequest
LSLGroups
LSLwiki
Mainframe1
MediaWiki
mouselook
MPEG4
Mycroft
NaN
newview
OoPsGalatea
OR
PageIndex
ParametricDebate
permissions
pitch
precision
Preview
QuickReferenceGuide
QuickTime
RawHeightMap
RemovalPetition
roll
script
ScriptDelay
ScriptingGroups
ScriptingMentors
ScriptLibrary
ScriptPermissions
ScXx
Serialization
ShadowGretzky
shadows
SimulatorNames
SL
Stack
StPsaltery
StrifeOnizuka
string
StyleGuide
SysOp
TextSearch?phrase=DEG_TO_RAD
TextSearch?phrase=FALSE
TextSearch?phrase=TRUE
TextSearch?phrase=ZERO_ROTATION
TextSearch?phrase=ZERO_VECTOR
ToDo
Typecast
Unicode
UserDefinedFunction
UUID
UV
VanlerOdets
VektorLinden
WikiEtiquette
WikiRenamingPages
WikiUsers
WrongPageSetup
XML
XMLRPCDiscussion
XyText
yaw
ZonaxD
There are 2 comments on this page. [Display comments/form]