Merge git://github.com/Shyotl/SingularityViewer
This commit is contained in:
@@ -196,20 +196,28 @@ LLOSInfo::LLOSInfo() :
|
|||||||
else
|
else
|
||||||
mOSStringSimple = "Microsoft Windows Server 2003 ";
|
mOSStringSimple = "Microsoft Windows Server 2003 ";
|
||||||
}
|
}
|
||||||
else if(osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 1)
|
else if(osvi.dwMajorVersion == 6 && osvi.dwMinorVersion <= 2)
|
||||||
{
|
{
|
||||||
if(osvi.dwMinorVersion == 0)
|
if(osvi.dwMinorVersion == 0)
|
||||||
{
|
{
|
||||||
|
if(osvi.wProductType == VER_NT_WORKSTATION)
|
||||||
mOSStringSimple = "Microsoft Windows Vista ";
|
mOSStringSimple = "Microsoft Windows Vista ";
|
||||||
|
else
|
||||||
|
mOSStringSimple = "Windows Server 2008 ";
|
||||||
}
|
}
|
||||||
else if(osvi.dwMinorVersion == 1)
|
else if(osvi.dwMinorVersion == 1)
|
||||||
{
|
{
|
||||||
|
if(osvi.wProductType == VER_NT_WORKSTATION)
|
||||||
mOSStringSimple = "Microsoft Windows 7 ";
|
mOSStringSimple = "Microsoft Windows 7 ";
|
||||||
|
else
|
||||||
|
mOSStringSimple = "Windows Server 2008 R2 ";
|
||||||
}
|
}
|
||||||
|
else if(osvi.dwMinorVersion == 2)
|
||||||
if(osvi.wProductType != VER_NT_WORKSTATION)
|
|
||||||
{
|
{
|
||||||
mOSStringSimple += "Server ";
|
if(osvi.wProductType == VER_NT_WORKSTATION)
|
||||||
|
mOSStringSimple = "Microsoft Windows 8 ";
|
||||||
|
else
|
||||||
|
mOSStringSimple = "Windows Server 2012 ";
|
||||||
}
|
}
|
||||||
|
|
||||||
///get native system info if available..
|
///get native system info if available..
|
||||||
@@ -314,8 +322,7 @@ LLOSInfo::LLOSInfo() :
|
|||||||
std::string compatibility_mode;
|
std::string compatibility_mode;
|
||||||
if(got_shell32_version)
|
if(got_shell32_version)
|
||||||
{
|
{
|
||||||
if(osvi.dwMajorVersion != shell32_major
|
if(osvi.dwMajorVersion != shell32_major || osvi.dwMinorVersion != shell32_minor)
|
||||||
|| osvi.dwMinorVersion != shell32_minor)
|
|
||||||
{
|
{
|
||||||
compatibility_mode = llformat(" compatibility mode. real ver: %d.%d (Build %d)",
|
compatibility_mode = llformat(" compatibility mode. real ver: %d.%d (Build %d)",
|
||||||
shell32_major,
|
shell32_major,
|
||||||
|
|||||||
@@ -556,7 +556,7 @@ const U32 LSCRIPTRunTimePermissionBits[SCRIPT_PERMISSION_EOF] =
|
|||||||
// http_request string constants
|
// http_request string constants
|
||||||
extern const char* URL_REQUEST_GRANTED;
|
extern const char* URL_REQUEST_GRANTED;
|
||||||
extern const char* URL_REQUEST_DENIED;
|
extern const char* URL_REQUEST_DENIED;
|
||||||
extern const U64 LSL_HTTP_REQUEST_TIMEOUT;
|
extern const U64 LSL_HTTP_REQUEST_TIMEOUT_USEC;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ void LLScriptScriptCodeChunk::build(LLFILE *efp, LLFILE *bcfp)
|
|||||||
set_register(mCompleteCode, LREG_TM, mTotalSize);
|
set_register(mCompleteCode, LREG_TM, mTotalSize);
|
||||||
|
|
||||||
|
|
||||||
if (fwrite(mCompleteCode, 1, mTotalSize, bcfp) != mTotalSize)
|
if (fwrite(mCompleteCode, 1, mTotalSize, bcfp) != (size_t)mTotalSize)
|
||||||
{
|
{
|
||||||
llwarns << "Short write" << llendl;
|
llwarns << "Short write" << llendl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -631,8 +631,8 @@ static void print_cil_cast(LLFILE* fp, LSCRIPTType srcType, LSCRIPTType targetTy
|
|||||||
switch(targetType)
|
switch(targetType)
|
||||||
{
|
{
|
||||||
case LST_INTEGER:
|
case LST_INTEGER:
|
||||||
//fprintf(fp, "call int32 [LslLibrary]LindenLab.SecondLife.LslRunTime::ToInteger(float32)\n");
|
fprintf(fp, "call int32 [LslLibrary]LindenLab.SecondLife.LslRunTime::ToInteger(float32)\n");
|
||||||
fprintf(fp, "conv.i4\n"); // TODO replace this line with the above
|
//fprintf(fp, "conv.i4\n"); // TODO replace this line with the above
|
||||||
// we the entire grid is > 1.25.1
|
// we the entire grid is > 1.25.1
|
||||||
break;
|
break;
|
||||||
case LST_STRING:
|
case LST_STRING:
|
||||||
@@ -8375,10 +8375,18 @@ void LLScriptStateChange::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTComp
|
|||||||
chunk->addInteger(mIdentifier->mScopeEntry->mCount);
|
chunk->addInteger(mIdentifier->mScopeEntry->mCount);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case LSCP_TYPE:
|
||||||
|
mReturnType = basetype;
|
||||||
|
break;
|
||||||
case LSCP_EMIT_CIL_ASSEMBLY:
|
case LSCP_EMIT_CIL_ASSEMBLY:
|
||||||
fprintf(fp, "ldarg.0\n");
|
fprintf(fp, "ldarg.0\n");
|
||||||
fprintf(fp, "ldstr \"%s\"\n", mIdentifier->mName);
|
fprintf(fp, "ldstr \"%s\"\n", mIdentifier->mName);
|
||||||
fprintf(fp, "call instance void class [LslUserScript]LindenLab.SecondLife.LslUserScript::ChangeState(string)\n");
|
fprintf(fp, "call instance void class [LslUserScript]LindenLab.SecondLife.LslUserScript::ChangeState(string)\n");
|
||||||
|
// We are doing a state change. In the LSL interpreter, this is basically a longjmp. We emulate it
|
||||||
|
// here using a call to the ChangeState followed by a short cut return of the current method. To
|
||||||
|
// maintain type safety we need to push an arbitrary variable of the current method's return type
|
||||||
|
// onto the stack before returning. This will be ignored and discarded.
|
||||||
|
print_cil_init_variable(fp, mReturnType);
|
||||||
fprintf(fp, "ret\n");
|
fprintf(fp, "ret\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -9799,6 +9807,9 @@ void LLScriptEventHandler::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
|
|||||||
break;
|
break;
|
||||||
case LSCP_EMIT_BYTE_CODE:
|
case LSCP_EMIT_BYTE_CODE:
|
||||||
{
|
{
|
||||||
|
llassert(mEventp);
|
||||||
|
if (!mEventp) return;
|
||||||
|
|
||||||
// order for event handler
|
// order for event handler
|
||||||
// set jump table value
|
// set jump table value
|
||||||
S32 jumpoffset;
|
S32 jumpoffset;
|
||||||
@@ -9812,13 +9823,11 @@ void LLScriptEventHandler::recurse(LLFILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
|
|||||||
chunk->addBytes(4);
|
chunk->addBytes(4);
|
||||||
|
|
||||||
// null terminated event name and null terminated parameters
|
// null terminated event name and null terminated parameters
|
||||||
if (mEventp)
|
|
||||||
{
|
|
||||||
LLScriptByteCodeChunk *event = new LLScriptByteCodeChunk(FALSE);
|
LLScriptByteCodeChunk *event = new LLScriptByteCodeChunk(FALSE);
|
||||||
mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, event, heap, stacksize, entry, entrycount, NULL);
|
mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, event, heap, stacksize, entry, entrycount, NULL);
|
||||||
chunk->addBytes(event->mCodeChunk, event->mCurrentOffset);
|
chunk->addBytes(event->mCodeChunk, event->mCurrentOffset);
|
||||||
delete event;
|
delete event;
|
||||||
}
|
|
||||||
chunk->addBytes(1);
|
chunk->addBytes(1);
|
||||||
|
|
||||||
// now we're at the first opcode
|
// now we're at the first opcode
|
||||||
@@ -10620,6 +10629,8 @@ LLScriptScript::LLScriptScript(LLScritpGlobalStorage *globals,
|
|||||||
}
|
}
|
||||||
temp = temp->mNextp;
|
temp = temp->mNextp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mClassName[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLScriptScript::setBytecodeDest(const char* dst_filename)
|
void LLScriptScript::setBytecodeDest(const char* dst_filename)
|
||||||
|
|||||||
@@ -1876,7 +1876,7 @@ class LLScriptStateChange : public LLScriptStatement
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLScriptStateChange(S32 line, S32 col, LLScriptIdentifier *identifier)
|
LLScriptStateChange(S32 line, S32 col, LLScriptIdentifier *identifier)
|
||||||
: LLScriptStatement(line, col, LSSMT_STATE_CHANGE), mIdentifier(identifier)
|
: LLScriptStatement(line, col, LSSMT_STATE_CHANGE), mIdentifier(identifier), mReturnType(LST_NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1888,6 +1888,7 @@ public:
|
|||||||
S32 getSize();
|
S32 getSize();
|
||||||
|
|
||||||
LLScriptIdentifier *mIdentifier;
|
LLScriptIdentifier *mIdentifier;
|
||||||
|
LSCRIPTType mReturnType;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLScriptJump : public LLScriptStatement
|
class LLScriptJump : public LLScriptStatement
|
||||||
@@ -2209,7 +2210,7 @@ class LLScriptState : public LLScriptFilePosition
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLScriptState(S32 line, S32 col, LSCRIPTStateType type, LLScriptIdentifier *identifier, LLScriptEventHandler *event)
|
LLScriptState(S32 line, S32 col, LSCRIPTStateType type, LLScriptIdentifier *identifier, LLScriptEventHandler *event)
|
||||||
: LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mEvent(event), mNextp(NULL)
|
: LLScriptFilePosition(line, col), mType(type), mIdentifier(identifier), mEvent(event), mNextp(NULL), mStateScope(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
#include "lscript_byteconvert.h"
|
#include "lscript_byteconvert.h"
|
||||||
#include "linked_lists.h"
|
#include "linked_lists.h"
|
||||||
#include "lscript_library.h"
|
#include "lscript_library.h"
|
||||||
#include "lltimer.h"
|
|
||||||
|
class LLTimer;
|
||||||
|
|
||||||
// Return values for run() methods
|
// Return values for run() methods
|
||||||
const U32 NO_DELETE_FLAG = 0x0000;
|
const U32 NO_DELETE_FLAG = 0x0000;
|
||||||
@@ -370,8 +371,7 @@ class LLScriptExecute
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLScriptExecute();
|
LLScriptExecute();
|
||||||
virtual ~LLScriptExecute() {;}
|
virtual ~LLScriptExecute() = 0;
|
||||||
|
|
||||||
virtual S32 getVersion() const = 0;
|
virtual S32 getVersion() const = 0;
|
||||||
virtual void deleteAllEvents() = 0;
|
virtual void deleteAllEvents() = 0;
|
||||||
virtual void addEvent(LLScriptDataCollection* event) = 0;
|
virtual void addEvent(LLScriptDataCollection* event) = 0;
|
||||||
|
|||||||
@@ -41,6 +41,8 @@
|
|||||||
#include "lscript_library.h"
|
#include "lscript_library.h"
|
||||||
#include "lscript_heapruntime.h"
|
#include "lscript_heapruntime.h"
|
||||||
#include "lscript_alloc.h"
|
#include "lscript_alloc.h"
|
||||||
|
#include "llstat.h"
|
||||||
|
|
||||||
|
|
||||||
// Static
|
// Static
|
||||||
const S32 DEFAULT_SCRIPT_TIMER_CHECK_SKIP = 4;
|
const S32 DEFAULT_SCRIPT_TIMER_CHECK_SKIP = 4;
|
||||||
@@ -72,12 +74,12 @@ const char* URL_REQUEST_GRANTED = "URL_REQUEST_GRANTED";
|
|||||||
const char* URL_REQUEST_DENIED = "URL_REQUEST_DENIED";
|
const char* URL_REQUEST_DENIED = "URL_REQUEST_DENIED";
|
||||||
|
|
||||||
// HTTP Requests to LSL scripts will time out after 25 seconds.
|
// HTTP Requests to LSL scripts will time out after 25 seconds.
|
||||||
const U64 LSL_HTTP_REQUEST_TIMEOUT = 25 * USEC_PER_SEC;
|
const U64 LSL_HTTP_REQUEST_TIMEOUT_USEC = 25 * USEC_PER_SEC;
|
||||||
|
|
||||||
LLScriptExecuteLSL2::LLScriptExecuteLSL2(LLFILE *fp)
|
LLScriptExecuteLSL2::LLScriptExecuteLSL2(LLFILE *fp)
|
||||||
{
|
{
|
||||||
U8 sizearray[4];
|
U8 sizearray[4];
|
||||||
S32 filesize;
|
size_t filesize;
|
||||||
S32 pos = 0;
|
S32 pos = 0;
|
||||||
if (fread(&sizearray, 1, 4, fp) != 4)
|
if (fread(&sizearray, 1, 4, fp) != 4)
|
||||||
{
|
{
|
||||||
@@ -110,6 +112,7 @@ LLScriptExecuteLSL2::LLScriptExecuteLSL2(const U8* bytecode, U32 bytecode_size)
|
|||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLScriptExecute::~LLScriptExecute() {}
|
||||||
LLScriptExecuteLSL2::~LLScriptExecuteLSL2()
|
LLScriptExecuteLSL2::~LLScriptExecuteLSL2()
|
||||||
{
|
{
|
||||||
delete[] mBuffer;
|
delete[] mBuffer;
|
||||||
@@ -4234,19 +4237,16 @@ S32 lscript_push_variable(LLScriptLibData *data, U8 *buffer)
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL run_calllib(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
|
|
||||||
|
// Shared code for run_calllib() and run_calllib_two_byte()
|
||||||
|
BOOL run_calllib_common(U8 *buffer, S32 &offset, const LLUUID &id, U16 arg)
|
||||||
{
|
{
|
||||||
if (b_print)
|
if (arg >= gScriptLibrary.mFunctions.size())
|
||||||
printf("[0x%X]\tCALLLIB ", offset);
|
|
||||||
offset++;
|
|
||||||
U8 arg = safe_instruction_bytestream2byte(buffer, offset);
|
|
||||||
if (arg >= (U8)gScriptLibrary.mFunctions.size())
|
|
||||||
{
|
{
|
||||||
set_fault(buffer, LSRF_BOUND_CHECK_ERROR);
|
set_fault(buffer, LSRF_BOUND_CHECK_ERROR);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (b_print)
|
LLScriptLibraryFunction const & function = gScriptLibrary.mFunctions[arg];
|
||||||
printf("%d (%s)\n", (U32)arg, gScriptLibrary.mFunctions[arg].mName);
|
|
||||||
|
|
||||||
// pull out the arguments and the return values
|
// pull out the arguments and the return values
|
||||||
LLScriptLibData *arguments = NULL;
|
LLScriptLibData *arguments = NULL;
|
||||||
@@ -4254,14 +4254,14 @@ BOOL run_calllib(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
|
|||||||
|
|
||||||
S32 i, number;
|
S32 i, number;
|
||||||
|
|
||||||
if (gScriptLibrary.mFunctions[arg].mReturnType)
|
if (function.mReturnType)
|
||||||
{
|
{
|
||||||
returnvalue = new LLScriptLibData;
|
returnvalue = new LLScriptLibData;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gScriptLibrary.mFunctions[arg].mArgs)
|
if (function.mArgs)
|
||||||
{
|
{
|
||||||
number = (S32)strlen(gScriptLibrary.mFunctions[arg].mArgs); /*Flawfinder: ignore*/
|
number = (S32)strlen(function.mArgs); //Flawfinder: ignore
|
||||||
arguments = new LLScriptLibData[number];
|
arguments = new LLScriptLibData[number];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -4271,24 +4271,18 @@ BOOL run_calllib(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
|
|||||||
|
|
||||||
for (i = number - 1; i >= 0; i--)
|
for (i = number - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
lscript_pop_variable(&arguments[i], buffer, gScriptLibrary.mFunctions[arg].mArgs[i]);
|
lscript_pop_variable(&arguments[i], buffer, function.mArgs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b_print)
|
// Actually execute the function call
|
||||||
{
|
function.mExecFunc(returnvalue, arguments, id);
|
||||||
printf("See LSLTipText_%s in strings.xml for usage\n", gScriptLibrary.mFunctions[arg].mName);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
add_register_fp(buffer, LREG_ESR, -(function.mEnergyUse));
|
||||||
// LLFastTimer time_in_libraries1(LLFastTimer::FTM_TEMP7);
|
add_register_fp(buffer, LREG_SLR, function.mSleepTime);
|
||||||
gScriptLibrary.mFunctions[arg].mExecFunc(returnvalue, arguments, id);
|
|
||||||
}
|
|
||||||
add_register_fp(buffer, LREG_ESR, -gScriptLibrary.mFunctions[arg].mEnergyUse);
|
|
||||||
add_register_fp(buffer, LREG_SLR, gScriptLibrary.mFunctions[arg].mSleepTime);
|
|
||||||
|
|
||||||
if (returnvalue)
|
if (returnvalue)
|
||||||
{
|
{
|
||||||
returnvalue->mType = char2type(*gScriptLibrary.mFunctions[arg].mReturnType);
|
returnvalue->mType = char2type(*function.mReturnType);
|
||||||
lscript_push_return_variable(returnvalue, buffer);
|
lscript_push_return_variable(returnvalue, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4305,72 +4299,32 @@ BOOL run_calllib(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOL run_calllib(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
|
||||||
|
{
|
||||||
|
offset++;
|
||||||
|
U16 arg = (U16) safe_instruction_bytestream2byte(buffer, offset);
|
||||||
|
if (b_print &&
|
||||||
|
arg < gScriptLibrary.mFunctions.size())
|
||||||
|
{
|
||||||
|
printf("[0x%X]\tCALLLIB ", offset);
|
||||||
|
LLScriptLibraryFunction const & function = gScriptLibrary.mFunctions[arg];
|
||||||
|
printf("%d (%s)\n", (U32)arg, function.mName);
|
||||||
|
//printf("%s\n", function.mDesc);
|
||||||
|
}
|
||||||
|
return run_calllib_common(buffer, offset, id, arg);
|
||||||
|
}
|
||||||
|
|
||||||
BOOL run_calllib_two_byte(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
|
BOOL run_calllib_two_byte(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
|
||||||
{
|
{
|
||||||
if (b_print)
|
|
||||||
printf("[0x%X]\tCALLLIB ", offset);
|
|
||||||
offset++;
|
offset++;
|
||||||
U16 arg = safe_instruction_bytestream2u16(buffer, offset);
|
U16 arg = safe_instruction_bytestream2u16(buffer, offset);
|
||||||
if (arg >= (U16)gScriptLibrary.mFunctions.size())
|
if (b_print &&
|
||||||
|
arg < gScriptLibrary.mFunctions.size())
|
||||||
{
|
{
|
||||||
set_fault(buffer, LSRF_BOUND_CHECK_ERROR);
|
printf("[0x%X]\tCALLLIB ", (offset-1));
|
||||||
return FALSE;
|
LLScriptLibraryFunction const & function = gScriptLibrary.mFunctions[arg];
|
||||||
|
printf("%d (%s)\n", (U32)arg, function.mName);
|
||||||
|
//printf("%s\n", function.mDesc);
|
||||||
}
|
}
|
||||||
if (b_print)
|
return run_calllib_common(buffer, offset, id, arg);
|
||||||
printf("%d (%s)\n", (U32)arg, gScriptLibrary.mFunctions[arg].mName);
|
|
||||||
|
|
||||||
// pull out the arguments and the return values
|
|
||||||
LLScriptLibData *arguments = NULL;
|
|
||||||
LLScriptLibData *returnvalue = NULL;
|
|
||||||
|
|
||||||
S32 i, number;
|
|
||||||
|
|
||||||
if (gScriptLibrary.mFunctions[arg].mReturnType)
|
|
||||||
{
|
|
||||||
returnvalue = new LLScriptLibData;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gScriptLibrary.mFunctions[arg].mArgs)
|
|
||||||
{
|
|
||||||
number = (S32)strlen(gScriptLibrary.mFunctions[arg].mArgs); /*Flawfinder: ignore*/
|
|
||||||
arguments = new LLScriptLibData[number];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
number = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = number - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
lscript_pop_variable(&arguments[i], buffer, gScriptLibrary.mFunctions[arg].mArgs[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (b_print)
|
|
||||||
{
|
|
||||||
printf("See LSLTipText_%s in strings.xml for usage\n", gScriptLibrary.mFunctions[arg].mName);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
// LLFastTimer time_in_libraries2(LLFastTimer::FTM_TEMP8);
|
|
||||||
gScriptLibrary.mFunctions[arg].mExecFunc(returnvalue, arguments, id);
|
|
||||||
}
|
|
||||||
add_register_fp(buffer, LREG_ESR, -gScriptLibrary.mFunctions[arg].mEnergyUse);
|
|
||||||
add_register_fp(buffer, LREG_SLR, gScriptLibrary.mFunctions[arg].mSleepTime);
|
|
||||||
|
|
||||||
if (returnvalue)
|
|
||||||
{
|
|
||||||
returnvalue->mType = char2type(*gScriptLibrary.mFunctions[arg].mReturnType);
|
|
||||||
lscript_push_return_variable(returnvalue, buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
delete [] arguments;
|
|
||||||
delete returnvalue;
|
|
||||||
|
|
||||||
// reset the BP after calling the library files
|
|
||||||
S32 bp = lscript_pop_int(buffer);
|
|
||||||
set_bp(buffer, bp);
|
|
||||||
|
|
||||||
// pop off the spot for the instruction pointer
|
|
||||||
lscript_poparg(buffer, 4);
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
LLScriptLSOParse::LLScriptLSOParse(LLFILE *fp)
|
LLScriptLSOParse::LLScriptLSOParse(LLFILE *fp)
|
||||||
{
|
{
|
||||||
U8 sizearray[4];
|
U8 sizearray[4];
|
||||||
S32 filesize;
|
size_t filesize;
|
||||||
S32 pos = 0;
|
S32 pos = 0;
|
||||||
if (fread(&sizearray, 1, 4, fp) != 4)
|
if (fread(&sizearray, 1, 4, fp) != 4)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,6 @@
|
|||||||
|
|
||||||
#include "lscript_library.h"
|
#include "lscript_library.h"
|
||||||
|
|
||||||
extern LLScriptLibrary gScriptLibrary;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
std::vector<LLScriptLibraryFunction> mFunctions;
|
std::vector<LLScriptLibraryFunction> mFunctions;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern LLScriptLibrary gScriptLibrary;
|
|
||||||
|
|
||||||
class LLScriptLibData
|
class LLScriptLibData
|
||||||
{
|
{
|
||||||
@@ -428,4 +428,6 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern LLScriptLibrary gScriptLibrary;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -449,12 +449,13 @@ void LLScriptLibrary::init()
|
|||||||
addFunction(10.f, 0.f, dummy_func, "llReleaseURL", NULL, "s");
|
addFunction(10.f, 0.f, dummy_func, "llReleaseURL", NULL, "s");
|
||||||
addFunction(10.f, 0.f, dummy_func, "llHTTPResponse", NULL, "kis");
|
addFunction(10.f, 0.f, dummy_func, "llHTTPResponse", NULL, "kis");
|
||||||
addFunction(10.f, 0.f, dummy_func, "llGetHTTPHeader", "s", "ks");
|
addFunction(10.f, 0.f, dummy_func, "llGetHTTPHeader", "s", "ks");
|
||||||
//Lesse if I can crash the sim! -HgB
|
|
||||||
|
// Prim media (see lscript_prim_media.h)
|
||||||
addFunction(10.f, 1.0f, dummy_func, "llSetPrimMediaParams", "i", "il");
|
addFunction(10.f, 1.0f, dummy_func, "llSetPrimMediaParams", "i", "il");
|
||||||
addFunction(10.f, 1.0f, dummy_func, "llGetPrimMediaParams", "l", "il");
|
addFunction(10.f, 1.0f, dummy_func, "llGetPrimMediaParams", "l", "il");
|
||||||
addFunction(10.f, 1.0f, dummy_func, "llClearPrimMedia", "i", "i");
|
addFunction(10.f, 1.0f, dummy_func, "llClearPrimMedia", "i", "i");
|
||||||
addFunction(10.f, 0.f, dummy_func, "llSetLinkPrimitiveParamsFast", NULL, "il");
|
addFunction(10.f, 0.f, dummy_func, "llSetLinkPrimitiveParamsFast", NULL, "il");
|
||||||
addFunction(10.f, 0.f, dummy_func, "llGetLinkPrimitiveParams", NULL, "il");
|
addFunction(10.f, 0.f, dummy_func, "llGetLinkPrimitiveParams", "l", "il");
|
||||||
addFunction(10.f, 0.f, dummy_func, "llLinkParticleSystem", NULL, "il");
|
addFunction(10.f, 0.f, dummy_func, "llLinkParticleSystem", NULL, "il");
|
||||||
addFunction(10.f, 0.f, dummy_func, "llSetLinkTextureAnim", NULL, "iiiiifff");
|
addFunction(10.f, 0.f, dummy_func, "llSetLinkTextureAnim", NULL, "iiiiifff");
|
||||||
|
|
||||||
@@ -466,7 +467,10 @@ void LLScriptLibrary::init()
|
|||||||
addFunction(10.f, 0.f, dummy_func, "llGetDisplayName", "s", "k");
|
addFunction(10.f, 0.f, dummy_func, "llGetDisplayName", "s", "k");
|
||||||
addFunction(10.f, 0.f, dummy_func, "llRequestDisplayName", "k", "k");
|
addFunction(10.f, 0.f, dummy_func, "llRequestDisplayName", "k", "k");
|
||||||
|
|
||||||
// energy, sleep, dummy_func, name, return type, parameters, gods-only
|
addFunction(10.f, 0.f, dummy_func, "llGetEnv", "s", "s");
|
||||||
|
addFunction(10.f, 0.f, dummy_func, "llRegionSayTo", NULL, "kis");
|
||||||
|
|
||||||
|
// 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.
|
// IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST.
|
||||||
// Otherwise the bytecode numbers for each call will be wrong, and all
|
// Otherwise the bytecode numbers for each call will be wrong, and all
|
||||||
|
|||||||
@@ -1428,6 +1428,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
|
|||||||
if (mAutoPilotFinishedCallback)
|
if (mAutoPilotFinishedCallback)
|
||||||
{
|
{
|
||||||
mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < (mAutoPilotStopDistance * mAutoPilotStopDistance), mAutoPilotCallbackData);
|
mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < (mAutoPilotStopDistance * mAutoPilotStopDistance), mAutoPilotCallbackData);
|
||||||
|
mAutoPilotFinishedCallback = NULL;
|
||||||
}
|
}
|
||||||
mLeaderID = LLUUID::null;
|
mLeaderID = LLUUID::null;
|
||||||
|
|
||||||
|
|||||||
@@ -585,9 +585,10 @@ bool LLAppViewer::init()
|
|||||||
// *NOTE:Mani - LLCurl::initClass is not thread safe.
|
// *NOTE:Mani - LLCurl::initClass is not thread safe.
|
||||||
// Called before threads are created.
|
// Called before threads are created.
|
||||||
LLCurl::initClass();
|
LLCurl::initClass();
|
||||||
|
LL_INFOS("InitInfo") << "LLCurl initialized." << LL_ENDL ;
|
||||||
|
|
||||||
initThreads();
|
initThreads();
|
||||||
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ; ;
|
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ;
|
||||||
|
|
||||||
writeSystemInfo();
|
writeSystemInfo();
|
||||||
|
|
||||||
@@ -700,6 +701,7 @@ bool LLAppViewer::init()
|
|||||||
// Early out from user choice.
|
// Early out from user choice.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
LL_INFOS("InitInfo") << "Hardware test initialization done." << LL_ENDL ;
|
||||||
|
|
||||||
// Always fetch the Ethernet MAC address, needed both for login
|
// Always fetch the Ethernet MAC address, needed both for login
|
||||||
// and password load.
|
// and password load.
|
||||||
@@ -2371,6 +2373,7 @@ bool LLAppViewer::initWindow()
|
|||||||
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
|
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
|
||||||
|
|
||||||
gPipeline.init();
|
gPipeline.init();
|
||||||
|
LL_INFOS("AppInit") << "gPipeline Initialized" << LL_ENDL;
|
||||||
stop_glerror();
|
stop_glerror();
|
||||||
gViewerWindow->initGLDefaults();
|
gViewerWindow->initGLDefaults();
|
||||||
|
|
||||||
@@ -2398,7 +2401,7 @@ bool LLAppViewer::initWindow()
|
|||||||
// show viewer window
|
// show viewer window
|
||||||
//gViewerWindow->mWindow->show();
|
//gViewerWindow->mWindow->show();
|
||||||
|
|
||||||
|
LL_INFOS("AppInit") << "Window initialization done." << LL_ENDL;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -351,25 +351,47 @@ void create_console()
|
|||||||
// redirect unbuffered STDOUT to the console
|
// redirect unbuffered STDOUT to the console
|
||||||
l_std_handle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
|
l_std_handle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
|
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
|
||||||
|
if (h_con_handle == -1)
|
||||||
|
{
|
||||||
|
llwarns << "create_console() failed to open stdout handle" << llendl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
fp = _fdopen( h_con_handle, "w" );
|
fp = _fdopen( h_con_handle, "w" );
|
||||||
*stdout = *fp;
|
*stdout = *fp;
|
||||||
setvbuf( stdout, NULL, _IONBF, 0 );
|
setvbuf( stdout, NULL, _IONBF, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
// redirect unbuffered STDIN to the console
|
// redirect unbuffered STDIN to the console
|
||||||
l_std_handle = (long)GetStdHandle(STD_INPUT_HANDLE);
|
l_std_handle = (long)GetStdHandle(STD_INPUT_HANDLE);
|
||||||
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
|
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
|
||||||
|
if (h_con_handle == -1)
|
||||||
|
{
|
||||||
|
llwarns << "create_console() failed to open stdin handle" << llendl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
fp = _fdopen( h_con_handle, "r" );
|
fp = _fdopen( h_con_handle, "r" );
|
||||||
*stdin = *fp;
|
*stdin = *fp;
|
||||||
setvbuf( stdin, NULL, _IONBF, 0 );
|
setvbuf( stdin, NULL, _IONBF, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
// redirect unbuffered STDERR to the console
|
// redirect unbuffered STDERR to the console
|
||||||
l_std_handle = (long)GetStdHandle(STD_ERROR_HANDLE);
|
l_std_handle = (long)GetStdHandle(STD_ERROR_HANDLE);
|
||||||
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
|
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
|
||||||
|
if (h_con_handle == -1)
|
||||||
|
{
|
||||||
|
llwarns << "create_console() failed to open stderr handle" << llendl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
fp = _fdopen( h_con_handle, "w" );
|
fp = _fdopen( h_con_handle, "w" );
|
||||||
*stderr = *fp;
|
*stderr = *fp;
|
||||||
setvbuf( stderr, NULL, _IOFBF, 1024 ); //Assigning a buffer improves speed a LOT, esp on vista/win7
|
setvbuf( stderr, NULL, _IOFBF, 1024 ); //Assigning a buffer improves speed a LOT, esp on vista/win7
|
||||||
//_IOLBF is borked.
|
//_IOLBF is borked.
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
LLAppViewerWin32::LLAppViewerWin32(const char* cmd_line) :
|
LLAppViewerWin32::LLAppViewerWin32(const char* cmd_line) :
|
||||||
mCmdLine(cmd_line)
|
mCmdLine(cmd_line)
|
||||||
|
|||||||
@@ -100,6 +100,13 @@ void LLStandardBumpmap::restoreGL()
|
|||||||
// static
|
// static
|
||||||
void LLStandardBumpmap::addstandard()
|
void LLStandardBumpmap::addstandard()
|
||||||
{
|
{
|
||||||
|
if(!gTextureList.isInitialized())
|
||||||
|
{
|
||||||
|
//Note: loading pre-configuration sometimes triggers this call.
|
||||||
|
//But it is safe to return here because bump images will be reloaded during initialization later.
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
// can't assert; we destroyGL and restoreGL a lot during *first* startup, which populates this list already, THEN we explicitly init the list as part of *normal* startup. Sigh. So clear the list every time before we (re-)add the standard bumpmaps.
|
// can't assert; we destroyGL and restoreGL a lot during *first* startup, which populates this list already, THEN we explicitly init the list as part of *normal* startup. Sigh. So clear the list every time before we (re-)add the standard bumpmaps.
|
||||||
//llassert( LLStandardBumpmap::sStandardBumpmapCount == 0 );
|
//llassert( LLStandardBumpmap::sStandardBumpmapCount == 0 );
|
||||||
clear();
|
clear();
|
||||||
@@ -891,6 +898,11 @@ void LLBumpImageList::destroyGL()
|
|||||||
|
|
||||||
void LLBumpImageList::restoreGL()
|
void LLBumpImageList::restoreGL()
|
||||||
{
|
{
|
||||||
|
if(!gTextureList.isInitialized())
|
||||||
|
{
|
||||||
|
//safe to return here because bump images will be reloaded during initialization later.
|
||||||
|
return ;
|
||||||
|
}
|
||||||
LLStandardBumpmap::restoreGL();
|
LLStandardBumpmap::restoreGL();
|
||||||
// Images will be recreated as they are needed.
|
// Images will be recreated as they are needed.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -366,10 +366,8 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
|
|||||||
{
|
{
|
||||||
LLVolume* volume = mVO->getVolume();
|
LLVolume* volume = mVO->getVolume();
|
||||||
LLPath *path = &volume->getPath();
|
LLPath *path = &volume->getPath();
|
||||||
if ((mSimulateRes == 0 || !mInitialized)) // if its uninitialized but not visible, what then? - Nyx
|
if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible())
|
||||||
{
|
{
|
||||||
//if(mInitialized && !mVO->mDrawable->isVisible())
|
|
||||||
// return; //avoiding the assert below...
|
|
||||||
mVO->markForUpdate(TRUE);
|
mVO->markForUpdate(TRUE);
|
||||||
if (!doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0))
|
if (!doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0))
|
||||||
{
|
{
|
||||||
@@ -377,7 +375,11 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
llassert_always(mInitialized);
|
if(!mInitialized)
|
||||||
|
{
|
||||||
|
//the object is not visible
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
S32 num_sections = 1 << mSimulateRes;
|
S32 num_sections = 1 << mSimulateRes;
|
||||||
|
|
||||||
|
|||||||
@@ -1385,6 +1385,11 @@ BOOL LLPanelAvatar::postBuild(void)
|
|||||||
childSetVisible("csr_btn", FALSE);
|
childSetVisible("csr_btn", FALSE);
|
||||||
childSetEnabled("csr_btn", FALSE);
|
childSetEnabled("csr_btn", FALSE);
|
||||||
|
|
||||||
|
//This text never changes. We simply toggle visibility.
|
||||||
|
childSetVisible("online_yes", FALSE);
|
||||||
|
childSetColor("online_yes",LLColor4::green);
|
||||||
|
childSetValue("online_yes","Currently Online");
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1443,12 +1448,7 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
|
|||||||
online_status = ONLINE_STATUS_YES;
|
online_status = ONLINE_STATUS_YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(online_status == ONLINE_STATUS_YES)
|
mPanelSecondLife->childSetVisible("online_yes", online_status == ONLINE_STATUS_YES);
|
||||||
{
|
|
||||||
mPanelSecondLife->childSetVisible("online_yes", TRUE);
|
|
||||||
mPanelSecondLife->childSetColor("online_yes",LLColor4::green);
|
|
||||||
mPanelSecondLife->childSetValue("online_yes","Currently Online");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Since setOnlineStatus gets called after setAvatarID
|
// Since setOnlineStatus gets called after setAvatarID
|
||||||
// need to make sure that "Offer Teleport" doesn't get set
|
// need to make sure that "Offer Teleport" doesn't get set
|
||||||
|
|||||||
@@ -87,13 +87,16 @@ LLViewerTextureList::LLViewerTextureList()
|
|||||||
: mForceResetTextureStats(FALSE),
|
: mForceResetTextureStats(FALSE),
|
||||||
mUpdateStats(FALSE),
|
mUpdateStats(FALSE),
|
||||||
mMaxResidentTexMemInMegaBytes(0),
|
mMaxResidentTexMemInMegaBytes(0),
|
||||||
mMaxTotalTextureMemInMegaBytes(0)
|
mMaxTotalTextureMemInMegaBytes(0),
|
||||||
|
mInitialized(FALSE)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLViewerTextureList::init()
|
void LLViewerTextureList::init()
|
||||||
{
|
{
|
||||||
|
mInitialized = TRUE ;
|
||||||
sNumImages = 0;
|
sNumImages = 0;
|
||||||
|
mUpdateStats = TRUE;
|
||||||
mMaxResidentTexMemInMegaBytes = 0;
|
mMaxResidentTexMemInMegaBytes = 0;
|
||||||
mMaxTotalTextureMemInMegaBytes = 0 ;
|
mMaxTotalTextureMemInMegaBytes = 0 ;
|
||||||
if (gNoRender)
|
if (gNoRender)
|
||||||
@@ -102,8 +105,6 @@ void LLViewerTextureList::init()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mUpdateStats = TRUE;
|
|
||||||
|
|
||||||
// Update how much texture RAM we're allowed to use.
|
// Update how much texture RAM we're allowed to use.
|
||||||
updateMaxResidentTexMem(0); // 0 = use current
|
updateMaxResidentTexMem(0); // 0 = use current
|
||||||
|
|
||||||
@@ -115,6 +116,10 @@ void LLViewerTextureList::doPreloadImages()
|
|||||||
{
|
{
|
||||||
LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL;
|
LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL;
|
||||||
|
|
||||||
|
llassert_always(mInitialized) ;
|
||||||
|
llassert_always(mImageList.empty()) ;
|
||||||
|
llassert_always(mUUIDMap.empty()) ;
|
||||||
|
|
||||||
// Set the "missing asset" image
|
// Set the "missing asset" image
|
||||||
LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);
|
LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);
|
||||||
|
|
||||||
@@ -286,6 +291,8 @@ void LLViewerTextureList::shutdown()
|
|||||||
mUUIDMap.clear();
|
mUUIDMap.clear();
|
||||||
|
|
||||||
mImageList.clear();
|
mImageList.clear();
|
||||||
|
|
||||||
|
mInitialized = FALSE ; //prevent loading textures again.
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLViewerTextureList::dump()
|
void LLViewerTextureList::dump()
|
||||||
@@ -312,6 +319,7 @@ void LLViewerTextureList::destroyGL(BOOL save_state)
|
|||||||
|
|
||||||
void LLViewerTextureList::restoreGL()
|
void LLViewerTextureList::restoreGL()
|
||||||
{
|
{
|
||||||
|
llassert_always(mInitialized) ;
|
||||||
LLImageGL::restoreGL();
|
LLImageGL::restoreGL();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,6 +340,11 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
|
|||||||
LLGLenum primary_format,
|
LLGLenum primary_format,
|
||||||
const LLUUID& force_id)
|
const LLUUID& force_id)
|
||||||
{
|
{
|
||||||
|
if(!mInitialized)
|
||||||
|
{
|
||||||
|
return NULL ;
|
||||||
|
}
|
||||||
|
|
||||||
std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
|
std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
|
||||||
if (full_path.empty())
|
if (full_path.empty())
|
||||||
{
|
{
|
||||||
@@ -352,6 +365,11 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
|
|||||||
LLGLenum primary_format,
|
LLGLenum primary_format,
|
||||||
const LLUUID& force_id)
|
const LLUUID& force_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(!mInitialized)
|
||||||
|
{
|
||||||
|
return NULL ;
|
||||||
|
}
|
||||||
if (gNoRender)
|
if (gNoRender)
|
||||||
{
|
{
|
||||||
// Never mind that this ignores image_set_id;
|
// Never mind that this ignores image_set_id;
|
||||||
@@ -418,6 +436,11 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
|
|||||||
LLGLenum primary_format,
|
LLGLenum primary_format,
|
||||||
LLHost request_from_host)
|
LLHost request_from_host)
|
||||||
{
|
{
|
||||||
|
if(!mInitialized)
|
||||||
|
{
|
||||||
|
return NULL ;
|
||||||
|
}
|
||||||
|
|
||||||
// Return the image with ID image_id
|
// Return the image with ID image_id
|
||||||
// If the image is not found, creates new image and
|
// If the image is not found, creates new image and
|
||||||
// enqueues a request for transmission
|
// enqueues a request for transmission
|
||||||
@@ -846,7 +869,7 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
|
|||||||
for (entries_list_t::iterator iter3 = entries.begin();
|
for (entries_list_t::iterator iter3 = entries.begin();
|
||||||
iter3 != entries.end(); )
|
iter3 != entries.end(); )
|
||||||
{
|
{
|
||||||
LLPointer<LLViewerFetchedTexture> imagep = *iter3++;
|
LLViewerFetchedTexture* imagep = *iter3++;
|
||||||
|
|
||||||
bool fetching = imagep->updateFetch();
|
bool fetching = imagep->updateFetch();
|
||||||
if (fetching)
|
if (fetching)
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ public:
|
|||||||
void dump();
|
void dump();
|
||||||
void destroyGL(BOOL save_state = TRUE);
|
void destroyGL(BOOL save_state = TRUE);
|
||||||
void restoreGL();
|
void restoreGL();
|
||||||
|
BOOL isInitialized() const {return mInitialized;}
|
||||||
|
|
||||||
LLViewerFetchedTexture *findImage(const LLUUID &image_id);
|
LLViewerFetchedTexture *findImage(const LLUUID &image_id);
|
||||||
|
|
||||||
@@ -196,6 +197,7 @@ private:
|
|||||||
// simply holds on to LLViewerFetchedTexture references to stop them from being purged too soon
|
// simply holds on to LLViewerFetchedTexture references to stop them from being purged too soon
|
||||||
std::set<LLPointer<LLViewerFetchedTexture> > mImagePreloads;
|
std::set<LLPointer<LLViewerFetchedTexture> > mImagePreloads;
|
||||||
|
|
||||||
|
BOOL mInitialized ;
|
||||||
BOOL mUpdateStats;
|
BOOL mUpdateStats;
|
||||||
S32 mMaxResidentTexMemInMegaBytes;
|
S32 mMaxResidentTexMemInMegaBytes;
|
||||||
S32 mMaxTotalTextureMemInMegaBytes;
|
S32 mMaxTotalTextureMemInMegaBytes;
|
||||||
|
|||||||
@@ -1560,6 +1560,7 @@ LLViewerWindow::LLViewerWindow(
|
|||||||
gSavedSettings.setBOOL("RenderVBOEnable", FALSE);
|
gSavedSettings.setBOOL("RenderVBOEnable", FALSE);
|
||||||
}
|
}
|
||||||
LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable"));
|
LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable"));
|
||||||
|
LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ;
|
||||||
|
|
||||||
if (LLFeatureManager::getInstance()->isSafe()
|
if (LLFeatureManager::getInstance()->isSafe()
|
||||||
|| (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion())
|
|| (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion())
|
||||||
|
|||||||
@@ -379,8 +379,7 @@ Returns the rotation of detected object number (returns <0,0,0,1> if numbe
|
|||||||
</string>
|
</string>
|
||||||
<string name="LSLTipText_llDetectedGroup">
|
<string name="LSLTipText_llDetectedGroup">
|
||||||
integer llDetectedGroup(integer number)
|
integer llDetectedGroup(integer number)
|
||||||
Returns an integer that is a boolean representing if the detected object or avatar is in the same group
|
Returns TRUE if detected object is part of same group as owner
|
||||||
that the prim containing the script is set to
|
|
||||||
</string>
|
</string>
|
||||||
<string name="LSLTipText_llDetectedLinkNumber">
|
<string name="LSLTipText_llDetectedLinkNumber">
|
||||||
integer llDetectedLinkNumber(integer number)
|
integer llDetectedLinkNumber(integer number)
|
||||||
@@ -1656,7 +1655,8 @@ Returns the value for header for request_id
|
|||||||
</string>
|
</string>
|
||||||
<string name="LSLTipText_llGetPrimMediaParams">
|
<string name="LSLTipText_llGetPrimMediaParams">
|
||||||
list llGetPrimMediaParams(integer face, list params)
|
list llGetPrimMediaParams(integer face, list params)
|
||||||
Returns a list of values in the order requested.
|
Returns the media params for a particular face on an object, given the desired list of names, in the order requested.
|
||||||
|
(Returns an empty list if no media exists on the face.)
|
||||||
</string>
|
</string>
|
||||||
<string name="LSLTipText_llClearPrimMedia">
|
<string name="LSLTipText_llClearPrimMedia">
|
||||||
integer llClearPrimMedia(integer face)
|
integer llClearPrimMedia(integer face)
|
||||||
@@ -1667,12 +1667,13 @@ Returns the value for header for request_id
|
|||||||
Set primitive parameters for linknumber based on rules with no built-in script sleep.
|
Set primitive parameters for linknumber based on rules with no built-in script sleep.
|
||||||
</string>
|
</string>
|
||||||
<string name="LSLTipText_llGetLinkPrimitiveParams">
|
<string name="LSLTipText_llGetLinkPrimitiveParams">
|
||||||
list llGetLinkPrimitiveParams(integer link, list params)
|
list llGetLinkPrimitiveParams(integer linknumber,list rules)
|
||||||
Returns the list of primitive attributes requested in the params list for link.
|
Get primitive parameters for linknumber based on rules.
|
||||||
</string>
|
</string>
|
||||||
<string name="LSLTipText_llLinkParticleSystem">
|
<string name="LSLTipText_llLinkParticleSystem">
|
||||||
list llLinkParticleSystem(integer link, list rules)
|
list llLinkParticleSystem(integer linknumber, list rules)
|
||||||
A particle system defined by a list of rules is set for the prim(s) link.
|
Creates a particle system based on rules. Empty list removes particle system from object.
|
||||||
|
List format is [ rule1, data1, rule2, data2 . . . rulen, datan ].
|
||||||
</string>
|
</string>
|
||||||
<string name="LSLTipText_llSetLinkTextureAnim">
|
<string name="LSLTipText_llSetLinkTextureAnim">
|
||||||
llSetLinkTextureAnim(integer link, integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate)
|
llSetLinkTextureAnim(integer link, integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate)
|
||||||
@@ -1698,6 +1699,14 @@ Returns the value for header for request_id
|
|||||||
key llRequestDisplayName(key id)
|
key llRequestDisplayName(key id)
|
||||||
Requests name of an avatar. When data is available the dataserver event will be raised.
|
Requests name of an avatar. When data is available the dataserver event will be raised.
|
||||||
</string>
|
</string>
|
||||||
|
<string name="LSLTipText_llRegionSayTo">
|
||||||
|
llRegionSayTo(key target, integer channel, string msg)
|
||||||
|
Sends msg on channel (not DEBUG_CHANNEL) directly to prim or avatar target anywhere within the region
|
||||||
|
</string>
|
||||||
|
<string name="LSLTipText_llGetEnv">
|
||||||
|
string llGetEnv(string name)
|
||||||
|
Returns a string with the requested data about the region
|
||||||
|
</string>
|
||||||
|
|
||||||
</strings>
|
</strings>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user